source-highlight-3.1.6/0000775000175000017500000000000011676051667012010 500000000000000source-highlight-3.1.6/source-highlight.spec0000664000175000017500000000245211675324142016042 00000000000000# # spec file for package GNU Source Highlight (Version 1.x) # # Author: Christian W. Zuckschwerdt , Jan 2003 # Summary: syntax highlighting for source documents Name: source-highlight Version: 3.1.6 Release: 3.1.6 License: GPL Group: Utilities/Console Source: ftp://ftp.gnu.org/gnu/source-highlight/%{name}-%{version}.tar.gz URL: http://www.gnu.org/software/src-highlite/ BuildRoot: %{_tmppath}/%{name}-%{version}-root %description This program, given a source file, produces a document with syntax highlighting. Both source languages and output formats can be specified with a simple syntax and added dynamically. At the moment this package can handle many programming languages, such as, e.g., Java, C/C++, Prolog, Perl, Php3, Python, Flex, ChangeLog, etc. as source languages, and some output formats such, as, e.g., HTML, XHTML, LaTeX, etc. %prep %setup -q %build ./configure $MYARCH_FLAGS \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ --datadir=%{_datadir} make %install rm -rf $RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT install %clean rm -rf $RPM_BUILD_ROOT %files %defattr(644, root, root, 755) %doc README COPYING ChangeLog TODO.txt AUTHORS THANKS %doc doc/*.html doc/*.css %attr(755,root,root) %{_prefix}/bin/* %{_datadir}/%{name}/* %{_mandir}/man?/* source-highlight-3.1.6/aclocal.m40000664000175000017500000011307311675044671013571 00000000000000# generated automatically by aclocal 1.11.1 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, [m4_warning([this file was generated for autoconf 2.68. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.11' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.11.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.11.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 9 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 10 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], UPC, [depcc="$UPC" am_compiler_list=], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. #serial 5 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 8 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2008, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 16 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.62])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES(OBJC)], [define([AC_PROG_OBJC], defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl dnl The `parallel-tests' driver may need to know about EXEEXT, so add the dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl ]) dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # AM_PROG_LEX # ----------- # Autoconf leaves LEX=: if lex or flex can't be found. Change that to a # "missing" invocation, for better error output. AC_DEFUN([AM_PROG_LEX], [AC_PREREQ(2.50)dnl AC_REQUIRE([AM_MISSING_HAS_RUN])dnl AC_REQUIRE([AC_PROG_LEX])dnl if test "$LEX" = :; then LEX=${am_missing_run}flex fi]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # AM_MAINTAINER_MODE([DEFAULT-MODE]) # ---------------------------------- # Control maintainer-specific portions of Makefiles. # Default is to disable them, unless `enable' is passed literally. # For symmetry, `disable' may be passed as well. Anyway, the user # can override the default with the --enable/--disable switch. AC_DEFUN([AM_MAINTAINER_MODE], [m4_case(m4_default([$1], [disable]), [enable], [m4_define([am_maintainer_other], [disable])], [disable], [m4_define([am_maintainer_other], [enable])], [m4_define([am_maintainer_other], [enable]) m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) dnl maintainer-mode's default is 'disable' unless 'enable' is passed AC_ARG_ENABLE([maintainer-mode], [ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful (and sometimes confusing) to the casual installer], [USE_MAINTAINER_MODE=$enableval], [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) AC_MSG_RESULT([$USE_MAINTAINER_MODE]) AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) MAINT=$MAINTAINER_MODE_TRUE AC_SUBST([MAINT])dnl ] ) AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 6 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_MKDIR_P # --------------- # Check for `mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], [AC_PREREQ([2.60])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, dnl while keeping a definition of mkdir_p for backward compatibility. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of dnl Makefile.ins that do not define MKDIR_P, so we do our own dnl adjustment using top_builddir (which is defined more often than dnl MKDIR_P). AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl case $mkdir_p in [[\\/$]]* | ?:[[\\/]]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([gl/m4/00gnulib.m4]) m4_include([gl/m4/ac_prog_doxygen.m4]) m4_include([gl/m4/dirent_h.m4]) m4_include([gl/m4/dirname.m4]) m4_include([gl/m4/double-slash-root.m4]) m4_include([gl/m4/extensions.m4]) m4_include([gl/m4/getopt.m4]) m4_include([gl/m4/gnulib-common.m4]) m4_include([gl/m4/gnulib-comp.m4]) m4_include([gl/m4/include_next.m4]) m4_include([gl/m4/malloc.m4]) m4_include([gl/m4/memset.m4]) m4_include([gl/m4/mkdir.m4]) m4_include([gl/m4/nocrash.m4]) m4_include([gl/m4/ssize_t.m4]) m4_include([gl/m4/stdbool.m4]) m4_include([gl/m4/stddef_h.m4]) m4_include([gl/m4/stdlib_h.m4]) m4_include([gl/m4/strdup.m4]) m4_include([gl/m4/string_h.m4]) m4_include([gl/m4/sys_stat_h.m4]) m4_include([gl/m4/time_h.m4]) m4_include([gl/m4/unistd_h.m4]) m4_include([gl/m4/warn-on-use.m4]) m4_include([gl/m4/wchar_t.m4]) m4_include([m4/ax_boost_base.m4]) m4_include([m4/ax_boost_regex.m4]) m4_include([m4/libtool.m4]) m4_include([m4/ltoptions.m4]) m4_include([m4/ltsugar.m4]) m4_include([m4/ltversion.m4]) m4_include([m4/lt~obsolete.m4]) m4_include([acinclude.m4]) source-highlight-3.1.6/_sstream0000644000175000017500000001270611672675560013474 00000000000000/* This is part of libio/iostream, providing -*- C++ -*- input/output. Copyright (C) 2000 Free Software Foundation This file is part of the GNU IO Library. This library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this library; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. As a special exception, if you link this library with files compiled with a GNU compiler to produce an executable, this does not cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ /* Written by Magnus Fromreide (magfr@lysator.liu.se). */ /* Mofified by Lorenzo Bettini check whether namespaces are implemented including stl_config.h and using the macros __STL_BEGIN_NAMESPACE and __STL_END_NAMESPACE This file will be transformed into sstream in case such header is not present in the building system */ #ifndef __SSTREAM__ #define __SSTREAM__ #include #include #include #include __STL_BEGIN_NAMESPACE class stringbuf : public streambuf { public: typedef char char_type; typedef int int_type; typedef streampos pos_type; typedef streamoff off_type; explicit stringbuf(int which=ios::in|ios::out) : streambuf(which), buf(), mode(static_cast(which)), rpos(0), bufsize(1) { } explicit stringbuf(const std::string &s, int which=ios::in|ios::out) : streambuf(which), buf(s), mode(static_cast(which)), bufsize(1) { if(mode & ios::in) { setg(&defbuf, &defbuf + bufsize, &defbuf + bufsize); } if(mode & ios::out) { setp(&defbuf, &defbuf + bufsize); } rpos = (mode & ios::ate ? s.size() : 0); } std::string str() const { const_cast(this)->sync(); // Sigh, really ugly hack return buf; }; void str(const std::string& s) { buf = s; if(mode & ios::in) { gbump(egptr() - gptr()); } if(mode & ios::out) { pbump(pbase() - pptr()); } rpos = (mode & ios::ate ? s.size() : 0); } protected: inline virtual int sync(); inline virtual int overflow(int = EOF); inline virtual int underflow(); private: std::string buf; ios::open_mode mode; std::string::size_type rpos; streamsize bufsize; char defbuf; }; class stringstreambase : virtual public ios { protected: stringbuf __my_sb; public: std::string str() const { return dynamic_cast(_strbuf)->str(); } void str(const std::string& s) { clear(); dynamic_cast(_strbuf)->str(s); } stringbuf* rdbuf() { return &__my_sb; } protected: stringstreambase(int which) : __my_sb(which) { init (&__my_sb); } stringstreambase(const std::string& s, int which) : __my_sb(s, which) { init (&__my_sb); } }; class istringstream : public stringstreambase, public istream { public: istringstream(int which=ios::in) : stringstreambase(which) { } istringstream(const std::string& s, int which=ios::in) : stringstreambase(s, which) { } }; class ostringstream : public stringstreambase, public ostream { public: ostringstream(int which=ios::out) : stringstreambase(which) { } ostringstream(const std::string& s, int which=ios::out) : stringstreambase(s, which) { } }; class stringstream : public stringstreambase, public iostream { public: stringstream(int which=ios::in|ios::out) : stringstreambase(which) { } stringstream(const std::string &s, int which=ios::in|ios::out) : stringstreambase(s, which) { } }; __STL_END_NAMESPACE inline int std::stringbuf::sync() { if((mode & ios::out) == 0) return EOF; streamsize n = pptr() - pbase(); if(n) { buf.replace(rpos, std::string::npos, pbase(), n); if(buf.size() - rpos != n) return EOF; rpos += n; pbump(-n); gbump(egptr() - gptr()); } return 0; } inline int std::stringbuf::overflow(int ch) { if((mode & ios::out) == 0) return EOF; streamsize n = pptr() - pbase(); if(n && sync()) return EOF; if(ch != EOF) { std::string::size_type oldSize = buf.size(); buf.replace(rpos, std::string::npos, ch); if(buf.size() - oldSize != 1) return EOF; ++rpos; } return 0; } inline int std::stringbuf::underflow() { sync(); if((mode & ios::in) == 0) { return EOF; } if(rpos >= buf.size()) { return EOF; } std::string::size_type n = egptr() - eback(); std::string::size_type s; s = buf.copy(eback(), n, rpos); pbump(pbase() - pptr()); gbump(eback() - gptr()); int res = (0377 & buf[rpos]); rpos += s; return res; } #endif /* not __STRSTREAM__ */ source-highlight-3.1.6/completion/0000775000175000017500000000000011676051667014161 500000000000000source-highlight-3.1.6/completion/source-highlight0000644000175000017500000000470111672675561017272 00000000000000# completion for source-highlight # by Tiziano Muller, dev-zero _source_highlight() { local cur prev opts COMPREPLY=() cur="${COMP_WORDS[COMP_CWORD]}" prev="${COMP_WORDS[COMP_CWORD-1]}" opts="-h --help -V --version -i --input -o --output -s --src-lang \ --lang-list --outlang-list -f --out-format -d --doc --no-doc -c --css \ -T --title -t --tab -H --header -F --footer --style-file --outlang-def \ --outlang-map --data-dir --output-dir --lang-def --lang-map --show-lang-elements \ --infer-lang -n --line-number --line-number-ref --line-range --range-separator --range-context --regex-range --gen-references --ctags-file \ --ctags -v --verbose --statistics --gen-version --check-lang --check-outlang \ --failsafe -g --debug-langdef --show-regex" if [[ "${cur}" == -* || ${COMP_CWORD} -eq 1 ]] ; then COMPREPLY=($(compgen -W "${opts}" -- "${cur}")) return 0 fi case "${prev}" in -T|--title|-t|--tab|--gen-references|--line-range|--range-separator|--range-context|--regex-range) COMPREPLY=() ;; -i|--input|-o|--output|-c|--css|-H|--header|-F|--footer|--style-file|--outlang-def|--outlang-map|--lang-def|--lang-map|--show-lang-elements|--ctags-file|--check-lang|--check-outlang|--show-regex) COMPREPLY=($(compgen -A file -- "${cur}")) ;; -s|--src-lang) COMPREPLY=($(compgen -W "C H ac ada am applescript asm autoconf awk bat bib bison c caml cc changelog clipper cls cobol conf cpp cs csh csharp css \ d diff docbook dtx el eps erlang fixed-fortran flex fortran free-fortran glsl h haskell haxe hh hpp htm html hx in ini java javalog javascript js kcfg kdevelop kidl ksh l lang \ langdef latex ldap ldif lex lgt lisp ll log logtalk lsm lua m4 manifest ml mli moc opa outlang oz pas pascal patch pc perl php php3 php4 php5 \ pl pm po pot postscript prolog properties proto ps py python rb rc ruby scala scheme sh shell sig sl slang slsh sml spec sql sty style syslog tcl tcsh texinfo \ tex tk tml txt ui upc vala vbscript xhtml xml xorg y yacc yy" -- "${cur}")) ;; -f|--out-format) COMPREPLY=($(compgen -W "docbook esc html html-css htmltable\ javadoc latex latexcolor odf texinfo xhtml xhtml-css xhtmltable" -- "${cur}")) ;; --data-dir|--output-dir) COMPREPLY=($(compgen -A directory -- "${cur}")) ;; *) COMPREPLY=($(compgen -W "${opts/${preprev}}" -- "${cur}")) ;; esac } complete -F _source_highlight source-highlight # vim: set ft=sh tw=80 sw=4 et : source-highlight-3.1.6/m4/0000775000175000017500000000000011676051670012322 500000000000000source-highlight-3.1.6/m4/ltoptions.m40000644000175000017500000002725611672675564014563 00000000000000# Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, # Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 7 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) # ------------------------------------------ m4_define([_LT_MANGLE_OPTION], [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) # --------------------------------------- # Set option OPTION-NAME for macro MACRO-NAME, and if there is a # matching handler defined, dispatch to it. Other OPTION-NAMEs are # saved as a flag. m4_define([_LT_SET_OPTION], [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), _LT_MANGLE_DEFUN([$1], [$2]), [m4_warning([Unknown $1 option `$2'])])[]dnl ]) # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) # ------------------------------------------------------------ # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. m4_define([_LT_IF_OPTION], [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) # ------------------------------------------------------- # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME # are set. m4_define([_LT_UNLESS_OPTIONS], [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), [m4_define([$0_found])])])[]dnl m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 ])[]dnl ]) # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) # ---------------------------------------- # OPTION-LIST is a space-separated list of Libtool options associated # with MACRO-NAME. If any OPTION has a matching handler declared with # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about # the unknown option and exit. m4_defun([_LT_SET_OPTIONS], [# Set options m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [_LT_SET_OPTION([$1], _LT_Option)]) m4_if([$1],[LT_INIT],[ dnl dnl Simply set some default values (i.e off) if boolean options were not dnl specified: _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no ]) _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no ]) dnl dnl If no reference was made to various pairs of opposing options, then dnl we run the default mode handler for the pair. For example, if neither dnl `shared' nor `disable-shared' was passed, we enable building of shared dnl archives by default: _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], [_LT_ENABLE_FAST_INSTALL]) ]) ])# _LT_SET_OPTIONS ## --------------------------------- ## ## Macros to handle LT_INIT options. ## ## --------------------------------- ## # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) # ----------------------------------------- m4_define([_LT_MANGLE_DEFUN], [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) # ----------------------------------------------- m4_define([LT_OPTION_DEFINE], [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl ])# LT_OPTION_DEFINE # dlopen # ------ LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes ]) AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `dlopen' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) # win32-dll # --------- # Declare package support for building win32 dll's. LT_OPTION_DEFINE([LT_INIT], [win32-dll], [enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; esac test -z "$AS" && AS=as _LT_DECL([], [AS], [1], [Assembler program])dnl test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl ])# win32-dll AU_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_REQUIRE([AC_CANONICAL_HOST])dnl _LT_SET_OPTION([LT_INIT], [win32-dll]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `win32-dll' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) # _LT_ENABLE_SHARED([DEFAULT]) # ---------------------------- # implement the --enable-shared flag, and supports the `shared' and # `disable-shared' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_SHARED], [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([shared], [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) _LT_DECL([build_libtool_libs], [enable_shared], [0], [Whether or not to build shared libraries]) ])# _LT_ENABLE_SHARED LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) # Old names: AC_DEFUN([AC_ENABLE_SHARED], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) ]) AC_DEFUN([AC_DISABLE_SHARED], [_LT_SET_OPTION([LT_INIT], [disable-shared]) ]) AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_SHARED], []) dnl AC_DEFUN([AM_DISABLE_SHARED], []) # _LT_ENABLE_STATIC([DEFAULT]) # ---------------------------- # implement the --enable-static flag, and support the `static' and # `disable-static' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_STATIC], [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([static], [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_static=]_LT_ENABLE_STATIC_DEFAULT) _LT_DECL([build_old_libs], [enable_static], [0], [Whether or not to build static libraries]) ])# _LT_ENABLE_STATIC LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) # Old names: AC_DEFUN([AC_ENABLE_STATIC], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) ]) AC_DEFUN([AC_DISABLE_STATIC], [_LT_SET_OPTION([LT_INIT], [disable-static]) ]) AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_STATIC], []) dnl AC_DEFUN([AM_DISABLE_STATIC], []) # _LT_ENABLE_FAST_INSTALL([DEFAULT]) # ---------------------------------- # implement the --enable-fast-install flag, and support the `fast-install' # and `disable-fast-install' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_FAST_INSTALL], [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([fast-install], [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) _LT_DECL([fast_install], [enable_fast_install], [0], [Whether or not to optimize for fast installation])dnl ])# _LT_ENABLE_FAST_INSTALL LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) # Old names: AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `fast-install' option into LT_INIT's first parameter.]) ]) AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `disable-fast-install' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) # _LT_WITH_PIC([MODE]) # -------------------- # implement the --with-pic flag, and support the `pic-only' and `no-pic' # LT_INIT options. # MODE is either `yes' or `no'. If omitted, it defaults to `both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], [AS_HELP_STRING([--with-pic], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [pic_mode="$withval"], [pic_mode=default]) test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl ])# _LT_WITH_PIC LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) # Old name: AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `pic-only' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) ## ----------------- ## ## LTDL_INIT Options ## ## ----------------- ## m4_define([_LTDL_MODE], []) LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], [m4_define([_LTDL_MODE], [nonrecursive])]) LT_OPTION_DEFINE([LTDL_INIT], [recursive], [m4_define([_LTDL_MODE], [recursive])]) LT_OPTION_DEFINE([LTDL_INIT], [subproject], [m4_define([_LTDL_MODE], [subproject])]) m4_define([_LTDL_TYPE], []) LT_OPTION_DEFINE([LTDL_INIT], [installable], [m4_define([_LTDL_TYPE], [installable])]) LT_OPTION_DEFINE([LTDL_INIT], [convenience], [m4_define([_LTDL_TYPE], [convenience])]) source-highlight-3.1.6/m4/ax_boost_regex.m40000644000175000017500000001001311672675564015517 00000000000000# =========================================================================== # http://www.gnu.org/software/autoconf-archive/ax_boost_regex.html # =========================================================================== # # SYNOPSIS # # AX_BOOST_REGEX # # DESCRIPTION # # Test for Regex library from the Boost C++ libraries. The macro requires # a preceding call to AX_BOOST_BASE. Further documentation is available at # . # # This macro calls: # # AC_SUBST(BOOST_REGEX_LIB) # # And sets: # # HAVE_BOOST_REGEX # # LICENSE # # Copyright (c) 2008 Thomas Porschberg # Copyright (c) 2008 Michael Tindal # # Copying and distribution of this file, with or without modification, are # permitted in any medium without royalty provided the copyright notice # and this notice are preserved. This file is offered as-is, without any # warranty. #serial 19 AC_DEFUN([AX_BOOST_REGEX], [ AC_ARG_WITH([boost-regex], AS_HELP_STRING([--with-boost-regex@<:@=special-lib@:>@], [use the Regex library from boost - it is possible to specify a certain library for the linker e.g. --with-boost-regex=boost_regex-gcc-mt-d-1_33_1 ]), [ if test "$withval" = "no"; then want_boost="no" elif test "$withval" = "yes"; then want_boost="yes" ax_boost_user_regex_lib="" else want_boost="yes" ax_boost_user_regex_lib="$withval" fi ], [want_boost="yes"] ) if test "x$want_boost" = "xyes"; then AC_REQUIRE([AC_PROG_CC]) CPPFLAGS_SAVED="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" export CPPFLAGS LDFLAGS_SAVED="$LDFLAGS" LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" export LDFLAGS AC_CACHE_CHECK(whether the Boost::Regex library is available, ax_cv_boost_regex, [AC_LANG_PUSH([C++]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include ]], [[boost::regex r(); return 0;]])], ax_cv_boost_regex=yes, ax_cv_boost_regex=no) AC_LANG_POP([C++]) ]) if test "x$ax_cv_boost_regex" = "xyes"; then AC_DEFINE(HAVE_BOOST_REGEX,,[define if the Boost::Regex library is available]) BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'` if test "x$ax_boost_user_regex_lib" = "x"; then for libextension in `ls $BOOSTLIBDIR/libboost_regex*.so* $BOOSTLIBDIR/libboost_regex*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_regex.*\)\.so.*$;\1;' -e 's;^lib\(boost_regex.*\)\.a*$;\1;'` ; do ax_lib=${libextension} AC_CHECK_LIB($ax_lib, exit, [BOOST_REGEX_LIB="-l$ax_lib"; AC_SUBST(BOOST_REGEX_LIB) link_regex="yes"; break], [link_regex="no"]) done if test "x$link_regex" != "xyes"; then for libextension in `ls $BOOSTLIBDIR/boost_regex*.{dll,a}* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_regex.*\)\.dll.*$;\1;' -e 's;^\(boost_regex.*\)\.a*$;\1;'` ; do ax_lib=${libextension} AC_CHECK_LIB($ax_lib, exit, [BOOST_REGEX_LIB="-l$ax_lib"; AC_SUBST(BOOST_REGEX_LIB) link_regex="yes"; break], [link_regex="no"]) done fi else for ax_lib in $ax_boost_user_regex_lib boost_regex-$ax_boost_user_regex_lib; do AC_CHECK_LIB($ax_lib, main, [BOOST_REGEX_LIB="-l$ax_lib"; AC_SUBST(BOOST_REGEX_LIB) link_regex="yes"; break], [link_regex="no"]) done fi if test "x$ax_lib" = "x"; then AC_MSG_ERROR(Could not find a version of the Boost::Regex library!) fi if test "x$link_regex" != "xyes"; then AC_MSG_ERROR(Could not link against $ax_lib !) fi fi CPPFLAGS="$CPPFLAGS_SAVED" LDFLAGS="$LDFLAGS_SAVED" fi ]) source-highlight-3.1.6/m4/libtool.m40000644000175000017500000104622011672675564014165 00000000000000# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010 Free Software Foundation, # Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. m4_define([_LT_COPYING], [dnl # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010 Free Software Foundation, # Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool 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. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ]) # serial 57 LT_INIT # LT_PREREQ(VERSION) # ------------------ # Complain and exit if this libtool version is less that VERSION. m4_defun([LT_PREREQ], [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, [m4_default([$3], [m4_fatal([Libtool version $1 or higher is required], 63)])], [$2])]) # _LT_CHECK_BUILDDIR # ------------------ # Complain if the absolute build directory name contains unusual characters m4_defun([_LT_CHECK_BUILDDIR], [case `pwd` in *\ * | *\ *) AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; esac ]) # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl AC_BEFORE([$0], [LTDL_INIT])dnl m4_require([_LT_CHECK_BUILDDIR])dnl dnl Autoconf doesn't catch unexpanded LT_ macros by default: m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 dnl unless we require an AC_DEFUNed macro: AC_REQUIRE([LTOPTIONS_VERSION])dnl AC_REQUIRE([LTSUGAR_VERSION])dnl AC_REQUIRE([LTVERSION_VERSION])dnl AC_REQUIRE([LTOBSOLETE_VERSION])dnl m4_require([_LT_PROG_LTMAIN])dnl _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl _LT_SETUP # Only expand once: m4_define([LT_INIT]) ])# LT_INIT # Old names: AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PROG_LIBTOOL], []) dnl AC_DEFUN([AM_PROG_LIBTOOL], []) # _LT_CC_BASENAME(CC) # ------------------- # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. m4_defun([_LT_CC_BASENAME], [for cc_temp in $1""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` ]) # _LT_FILEUTILS_DEFAULTS # ---------------------- # It is okay to use these file commands and assume they have been set # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. m4_defun([_LT_FILEUTILS_DEFAULTS], [: ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} ])# _LT_FILEUTILS_DEFAULTS # _LT_SETUP # --------- m4_defun([_LT_SETUP], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl dnl _LT_DECL([], [build_alias], [0], [The build system])dnl _LT_DECL([], [build], [0])dnl _LT_DECL([], [build_os], [0])dnl dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl dnl AC_REQUIRE([AC_PROG_LN_S])dnl test -z "$LN_S" && LN_S="ln -s" _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl dnl AC_REQUIRE([LT_CMD_MAX_LEN])dnl _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl m4_require([_LT_CMD_RELOAD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_WITH_SYSROOT])dnl _LT_CONFIG_LIBTOOL_INIT([ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi ]) if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi _LT_CHECK_OBJDIR m4_require([_LT_TAG_COMPILER])dnl case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then _LT_PATH_MAGIC fi ;; esac # Use C for the default configuration in the libtool script LT_SUPPORTED_TAG([CC]) _LT_LANG_C_CONFIG _LT_LANG_DEFAULT_CONFIG _LT_CONFIG_COMMANDS ])# _LT_SETUP # _LT_PREPARE_SED_QUOTE_VARS # -------------------------- # Define a few sed substitution that help us do robust quoting. m4_defun([_LT_PREPARE_SED_QUOTE_VARS], [# Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([["`\\]]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ]) # _LT_PROG_LTMAIN # --------------- # Note that this code is called both from `configure', and `config.status' # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, # `config.status' has no value for ac_aux_dir unless we are using Automake, # so we pass a copy along to make sure it has a sensible value anyway. m4_defun([_LT_PROG_LTMAIN], [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) ltmain="$ac_aux_dir/ltmain.sh" ])# _LT_PROG_LTMAIN ## ------------------------------------- ## ## Accumulate code for creating libtool. ## ## ------------------------------------- ## # So that we can recreate a full libtool script including additional # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS # in macros and then make a single call at the end using the `libtool' # label. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) # ---------------------------------------- # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL_INIT], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_INIT], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_INIT]) # _LT_CONFIG_LIBTOOL([COMMANDS]) # ------------------------------ # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) # ----------------------------------------------------- m4_defun([_LT_CONFIG_SAVE_COMMANDS], [_LT_CONFIG_LIBTOOL([$1]) _LT_CONFIG_LIBTOOL_INIT([$2]) ]) # _LT_FORMAT_COMMENT([COMMENT]) # ----------------------------- # Add leading comment marks to the start of each line, and a trailing # full-stop to the whole comment if one is not present already. m4_define([_LT_FORMAT_COMMENT], [m4_ifval([$1], [ m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) )]) ## ------------------------ ## ## FIXME: Eliminate VARNAME ## ## ------------------------ ## # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) # ------------------------------------------------------------------- # CONFIGNAME is the name given to the value in the libtool script. # VARNAME is the (base) name used in the configure script. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on # VARNAME. Any other value will be used directly. m4_define([_LT_DECL], [lt_if_append_uniq([lt_decl_varnames], [$2], [, ], [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], [m4_ifval([$1], [$1], [$2])]) lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) m4_ifval([$4], [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) lt_dict_add_subkey([lt_decl_dict], [$2], [tagged?], [m4_ifval([$5], [yes], [no])])]) ]) # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) # -------------------------------------------------------- m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_tag_varnames], [_lt_decl_filter([tagged?], [yes], $@)]) # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) # --------------------------------------------------------- m4_define([_lt_decl_filter], [m4_case([$#], [0], [m4_fatal([$0: too few arguments: $#])], [1], [m4_fatal([$0: too few arguments: $#: $1])], [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], [lt_dict_filter([lt_decl_dict], $@)])[]dnl ]) # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) # -------------------------------------------------- m4_define([lt_decl_quote_varnames], [_lt_decl_filter([value], [1], $@)]) # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_dquote_varnames], [_lt_decl_filter([value], [2], $@)]) # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_varnames_tagged], [m4_assert([$# <= 2])dnl _$0(m4_quote(m4_default([$1], [[, ]])), m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) m4_define([_lt_decl_varnames_tagged], [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_all_varnames], [_$0(m4_quote(m4_default([$1], [[, ]])), m4_if([$2], [], m4_quote(lt_decl_varnames), m4_quote(m4_shift($@))))[]dnl ]) m4_define([_lt_decl_all_varnames], [lt_join($@, lt_decl_varnames_tagged([$1], lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl ]) # _LT_CONFIG_STATUS_DECLARE([VARNAME]) # ------------------------------------ # Quote a variable value, and forward it to `config.status' so that its # declaration there will have the same value as in `configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) # _LT_CONFIG_STATUS_DECLARATIONS # ------------------------------ # We delimit libtool config variables with single quotes, so when # we write them to config.status, we have to be sure to quote all # embedded single quotes properly. In configure, this macro expands # each variable declared with _LT_DECL (and _LT_TAGDECL) into: # # ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAGS # ---------------- # Output comment and list of tags supported by the script m4_defun([_LT_LIBTOOL_TAGS], [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl available_tags="_LT_TAGS"dnl ]) # _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) # ----------------------------------- # Extract the dictionary values for VARNAME (optionally with TAG) and # expand to a commented shell variable setting: # # # Some comment about what VAR is for. # visible_name=$lt_internal_name m4_define([_LT_LIBTOOL_DECLARE], [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [description])))[]dnl m4_pushdef([_libtool_name], m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), [0], [_libtool_name=[$]$1], [1], [_libtool_name=$lt_[]$1], [2], [_libtool_name=$lt_[]$1], [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl ]) # _LT_LIBTOOL_CONFIG_VARS # ----------------------- # Produce commented declarations of non-tagged libtool config variables # suitable for insertion in the LIBTOOL CONFIG section of the `libtool' # script. Tagged libtool config variables (even for the LIBTOOL CONFIG # section) are produced by _LT_LIBTOOL_TAG_VARS. m4_defun([_LT_LIBTOOL_CONFIG_VARS], [m4_foreach([_lt_var], m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAG_VARS(TAG) # ------------------------- m4_define([_LT_LIBTOOL_TAG_VARS], [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) # _LT_TAGVAR(VARNAME, [TAGNAME]) # ------------------------------ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) # _LT_CONFIG_COMMANDS # ------------------- # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of # variables for single and double quote escaping we saved from calls # to _LT_DECL, we can put quote escaped variables declarations # into `config.status', and then the shell code to quote escape them in # for loops in `config.status'. Finally, any additional code accumulated # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. m4_defun([_LT_CONFIG_COMMANDS], [AC_PROVIDE_IFELSE([LT_OUTPUT], dnl If the libtool generation code has been placed in $CONFIG_LT, dnl instead of duplicating it all over again into config.status, dnl then we will have config.status run $CONFIG_LT later, so it dnl needs to know what name is stored there: [AC_CONFIG_COMMANDS([libtool], [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], dnl If the libtool generation code is destined for config.status, dnl expand the accumulated commands and init code now: [AC_CONFIG_COMMANDS([libtool], [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) ])#_LT_CONFIG_COMMANDS # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], [ # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' _LT_CONFIG_STATUS_DECLARATIONS LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$[]1 _LTECHO_EOF' } # Quote evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_dquote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done _LT_OUTPUT_LIBTOOL_INIT ]) # _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) # ------------------------------------ # Generate a child script FILE with all initialization necessary to # reuse the environment learned by the parent script, and make the # file executable. If COMMENT is supplied, it is inserted after the # `#!' sequence but before initialization text begins. After this # macro, additional text can be appended to FILE to form the body of # the child script. The macro ends with non-zero status if the # file could not be fully written (such as if the disk is full). m4_ifdef([AS_INIT_GENERATED], [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], [m4_defun([_LT_GENERATED_FILE_INIT], [m4_require([AS_PREPARE])]dnl [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl [lt_write_fail=0 cat >$1 <<_ASEOF || lt_write_fail=1 #! $SHELL # Generated by $as_me. $2 SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$1 <<\_ASEOF || lt_write_fail=1 AS_SHELL_SANITIZE _AS_PREPARE exec AS_MESSAGE_FD>&1 _ASEOF test $lt_write_fail = 0 && chmod +x $1[]dnl m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT # LT_OUTPUT # --------- # This macro allows early generation of the libtool script (before # AC_OUTPUT is called), incase it is used in configure for compilation # tests. AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} AC_MSG_NOTICE([creating $CONFIG_LT]) _LT_GENERATED_FILE_INIT(["$CONFIG_LT"], [# Run this file to recreate a libtool stub with the current configuration.]) cat >>"$CONFIG_LT" <<\_LTEOF lt_cl_silent=false exec AS_MESSAGE_LOG_FD>>config.log { echo AS_BOX([Running $as_me.]) } >&AS_MESSAGE_LOG_FD lt_cl_help="\ \`$as_me' creates a local libtool stub from the current configuration, for use in further configure time tests before the real libtool is generated. Usage: $[0] [[OPTIONS]] -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 Report bugs to ." lt_cl_version="\ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. Copyright (C) 2010 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." while test $[#] != 0 do case $[1] in --version | --v* | -V ) echo "$lt_cl_version"; exit 0 ;; --help | --h* | -h ) echo "$lt_cl_help"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --quiet | --q* | --silent | --s* | -q ) lt_cl_silent=: ;; -*) AC_MSG_ERROR([unrecognized option: $[1] Try \`$[0] --help' for more information.]) ;; *) AC_MSG_ERROR([unrecognized argument: $[1] Try \`$[0] --help' for more information.]) ;; esac shift done if $lt_cl_silent; then exec AS_MESSAGE_FD>/dev/null fi _LTEOF cat >>"$CONFIG_LT" <<_LTEOF _LT_OUTPUT_LIBTOOL_COMMANDS_INIT _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AC_MSG_NOTICE([creating $ofile]) _LT_OUTPUT_LIBTOOL_COMMANDS AS_EXIT(0) _LTEOF chmod +x "$CONFIG_LT" # configure is writing to config.log, but config.lt does its own redirection, # appending to config.log, which fails on DOS, as config.log is still kept # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. lt_cl_success=: test "$silent" = yes && lt_config_lt_args="$lt_config_lt_args --quiet" exec AS_MESSAGE_LOG_FD>/dev/null $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false exec AS_MESSAGE_LOG_FD>>config.log $lt_cl_success || AS_EXIT(1) ])# LT_OUTPUT # _LT_CONFIG(TAG) # --------------- # If TAG is the built-in tag, create an initial libtool script with a # default configuration from the untagged config vars. Otherwise add code # to config.status for appending the configuration named by TAG from the # matching tagged config vars. m4_defun([_LT_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_CONFIG_SAVE_COMMANDS([ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl m4_if(_LT_TAG, [C], [ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # _LT_COPYING _LT_LIBTOOL_TAGS # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac _LT_PROG_LTMAIN # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) _LT_PROG_REPLACE_SHELLFNS mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ], [cat <<_LT_EOF >> "$ofile" dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded dnl in a comment (ie after a #). # ### BEGIN LIBTOOL TAG CONFIG: $1 _LT_LIBTOOL_TAG_VARS(_LT_TAG) # ### END LIBTOOL TAG CONFIG: $1 _LT_EOF ])dnl /m4_if ], [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS ])# _LT_CONFIG # LT_SUPPORTED_TAG(TAG) # --------------------- # Trace this macro to discover what tags are supported by the libtool # --tag option, using: # autoconf --trace 'LT_SUPPORTED_TAG:$1' AC_DEFUN([LT_SUPPORTED_TAG], []) # C support is built-in for now m4_define([_LT_LANG_C_enabled], []) m4_define([_LT_TAGS], []) # LT_LANG(LANG) # ------------- # Enable libtool support for the given language if not already enabled. AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], [Windows Resource], [_LT_LANG(RC)], [m4_ifdef([_LT_LANG_]$1[_CONFIG], [_LT_LANG($1)], [m4_fatal([$0: unsupported language: "$1"])])])dnl ])# LT_LANG # _LT_LANG(LANGNAME) # ------------------ m4_defun([_LT_LANG], [m4_ifdef([_LT_LANG_]$1[_enabled], [], [LT_SUPPORTED_TAG([$1])dnl m4_append([_LT_TAGS], [$1 ])dnl m4_define([_LT_LANG_]$1[_enabled], [])dnl _LT_LANG_$1_CONFIG($1)])dnl ])# _LT_LANG # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], [AC_PROVIDE_IFELSE([AC_PROG_CXX], [LT_LANG(CXX)], [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) AC_PROVIDE_IFELSE([AC_PROG_F77], [LT_LANG(F77)], [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) AC_PROVIDE_IFELSE([AC_PROG_FC], [LT_LANG(FC)], [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal dnl pulling things in needlessly. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([LT_PROG_GCJ], [LT_LANG(GCJ)], [m4_ifdef([AC_PROG_GCJ], [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([A][M_PROG_GCJ], [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) ])# _LT_LANG_DEFAULT_CONFIG # Obsolete macros: AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_CXX], []) dnl AC_DEFUN([AC_LIBTOOL_F77], []) dnl AC_DEFUN([AC_LIBTOOL_FC], []) dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) dnl AC_DEFUN([AC_LIBTOOL_RC], []) # _LT_TAG_COMPILER # ---------------- m4_defun([_LT_TAG_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_TAG_COMPILER # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. m4_defun([_LT_COMPILER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. m4_defun([_LT_LINKER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS # ------------------------- m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) AC_CHECK_TOOL([LIPO], [lipo], [:]) AC_CHECK_TOOL([OTOOL], [otool], [:]) AC_CHECK_TOOL([OTOOL64], [otool64], [:]) _LT_DECL([], [DSYMUTIL], [1], [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) _LT_DECL([], [NMEDIT], [1], [Tool to change global to local symbols on Mac OS X]) _LT_DECL([], [LIPO], [1], [Tool to manipulate fat objects and archives on Mac OS X]) _LT_DECL([], [OTOOL], [1], [ldd/readelf like tool for Mach-O binaries on Mac OS X]) _LT_DECL([], [OTOOL64], [1], [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -rf libconftest.dylib* rm -f conftest.* fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) LDFLAGS="$save_LDFLAGS" ]) AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], [lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then lt_cv_ld_force_load=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM ]) case $host_os in rhapsody* | darwin1.[[012]]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[[012]]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ]) # _LT_DARWIN_LINKER_FEATURES # -------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ m4_require([_LT_REQUIRED_DARWIN_CHECKS]) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported if test "$lt_cv_ld_force_load" = "yes"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else _LT_TAGVAR(whole_archive_flag_spec, $1)='' fi _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" m4_if([$1], [CXX], [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi ],[]) else _LT_TAGVAR(ld_shlibs, $1)=no fi ]) # _LT_SYS_MODULE_PATH_AIX([TAGNAME]) # ---------------------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. # Store the results from the different compilers for each TAGNAME. # Allow to override them for all tags through lt_cv_aix_libpath. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ lt_aix_libpath_sed='[ /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }]' _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" fi ]) aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) fi ])# _LT_SYS_MODULE_PATH_AIX # _LT_SHELL_INIT(ARG) # ------------------- m4_define([_LT_SHELL_INIT], [m4_divert_text([M4SH-INIT], [$1 ])])# _LT_SHELL_INIT # _LT_PROG_ECHO_BACKSLASH # ----------------------- # Find how we can fake an echo command that does not interpret backslash. # In particular, with Autoconf 2.60 or later we add some code to the start # of the generated configure script which will find a shell with a builtin # printf (which we can use as an echo command). m4_defun([_LT_PROG_ECHO_BACKSLASH], [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO AC_MSG_CHECKING([how to print strings]) # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $[]1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } case "$ECHO" in printf*) AC_MSG_RESULT([printf]) ;; print*) AC_MSG_RESULT([print -r]) ;; *) AC_MSG_RESULT([cat]) ;; esac m4_ifdef([_AS_DETECT_SUGGESTED], [_AS_DETECT_SUGGESTED([ test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test "X`printf %s $ECHO`" = "X$ECHO" \ || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) ])# _LT_PROG_ECHO_BACKSLASH # _LT_WITH_SYSROOT # ---------------- AC_DEFUN([_LT_WITH_SYSROOT], [AC_MSG_CHECKING([for sysroot]) AC_ARG_WITH([sysroot], [ --with-sysroot[=DIR] Search for dependent libraries within DIR (or the compiler's sysroot if not specified).], [], [with_sysroot=no]) dnl lt_sysroot will always be passed unquoted. We quote it here dnl in case the user passed a directory name. lt_sysroot= case ${with_sysroot} in #( yes) if test "$GCC" = yes; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) AC_MSG_RESULT([${with_sysroot}]) AC_MSG_ERROR([The sysroot must be an absolute path.]) ;; esac AC_MSG_RESULT([${lt_sysroot:-no}]) _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl [dependent libraries, and in which our libraries should be installed.])]) # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], [AC_ARG_ENABLE([libtool-lock], [AS_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" ])# _LT_ENABLE_LOCK # _LT_PROG_AR # ----------- m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} : ${AR_FLAGS=cru} _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], [lt_cv_ar_at_file=no AC_COMPILE_IFELSE([AC_LANG_PROGRAM], [echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([lt_ar_try]) if test "$ac_status" -eq 0; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a AC_TRY_EVAL([lt_ar_try]) if test "$ac_status" -ne 0; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a ]) ]) if test "x$lt_cv_ar_at_file" = xno; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi _LT_DECL([], [archiver_list_spec], [1], [How to feed a file listing to the archiver]) ])# _LT_PROG_AR # _LT_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], [_LT_PROG_AR AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: _LT_DECL([], [STRIP], [1], [A symbol stripping program]) AC_CHECK_TOOL(RANLIB, ranlib, :) test -z "$RANLIB" && RANLIB=: _LT_DECL([], [RANLIB], [1], [Commands used to install an old-style archive]) # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac _LT_DECL([], [old_postinstall_cmds], [2]) _LT_DECL([], [old_postuninstall_cmds], [2]) _LT_TAGDECL([], [old_archive_cmds], [2], [Commands used to build an old-style archive]) _LT_DECL([], [lock_old_archive_extraction], [0], [Whether to use a lock for old archive extraction]) ])# _LT_CMD_OLD_ARCHIVE # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $RM conftest* ]) if test x"[$]$2" = xyes; then m4_if([$5], , :, [$5]) else m4_if([$6], , :, [$6]) fi ])# _LT_COMPILER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------- # Check whether the given linker option works AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then m4_if([$4], , :, [$4]) else m4_if([$5], , :, [$5]) fi ])# _LT_LINKER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) # LT_CMD_MAX_LEN #--------------- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl # find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac ]) if test -n $lt_cv_sys_max_cmd_len ; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi max_cmd_len=$lt_cv_sys_max_cmd_len _LT_DECL([], [max_cmd_len], [0], [What is the maximum length of a command?]) ])# LT_CMD_MAX_LEN # Old name: AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) # _LT_HEADER_DLFCN # ---------------- m4_defun([_LT_HEADER_DLFCN], [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl ])# _LT_HEADER_DLFCN # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ---------------------------------------------------------------- m4_defun([_LT_TRY_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "$cross_compiling" = yes; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF [#line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; }] _LT_EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_TRY_DLOPEN_SELF # LT_SYS_DLOPEN_SELF # ------------------ AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) ]) ]) ]) ]) ]) ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi _LT_DECL([dlopen_support], [enable_dlopen], [0], [Whether dlopen is supported]) _LT_DECL([dlopen_self], [enable_dlopen_self], [0], [Whether dlopen of programs is supported]) _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], [Whether dlopen of statically linked programs is supported]) ])# LT_SYS_DLOPEN_SELF # Old name: AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) # _LT_COMPILER_C_O([TAGNAME]) # --------------------------- # Check to see if options -c and -o are simultaneously supported by compiler. # This macro does not hard code the compiler like AC_PROG_CC_C_O. m4_defun([_LT_COMPILER_C_O], [m4_require([_LT_DECL_SED])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* ]) _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], [Does compiler simultaneously support -c and -o options?]) ])# _LT_COMPILER_C_O # _LT_COMPILER_FILE_LOCKS([TAGNAME]) # ---------------------------------- # Check to see if we can do hard links to lock some files if needed m4_defun([_LT_COMPILER_FILE_LOCKS], [m4_require([_LT_ENABLE_LOCK])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_COMPILER_C_O([$1]) hard_links="nottested" if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test "$hard_links" = no; then AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) ])# _LT_COMPILER_FILE_LOCKS # _LT_CHECK_OBJDIR # ---------------- m4_defun([_LT_CHECK_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir _LT_DECL([], [objdir], [0], [The name of the directory that contains temporary libtool files])dnl m4_pattern_allow([LT_OBJDIR])dnl AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", [Define to the sub-directory in which libtool stores uninstalled libraries.]) ])# _LT_CHECK_OBJDIR # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) # -------------------------------------- # Check hardcoding attributes. m4_defun([_LT_LINKER_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_TAGVAR(hardcode_action, $1)= if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || test -n "$_LT_TAGVAR(runpath_var, $1)" || test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existent directories. if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi _LT_TAGDECL([], [hardcode_action], [0], [How to hardcode a shared library path into an executable]) ])# _LT_LINKER_HARDCODE_LIBPATH # _LT_CMD_STRIPLIB # ---------------- m4_defun([_LT_CMD_STRIPLIB], [m4_require([_LT_DECL_EGREP]) striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) ])# _LT_CMD_STRIPLIB # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics m4_defun([_LT_SYS_DYNAMIC_LINKER], [AC_REQUIRE([AC_CANONICAL_HOST])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; *) lt_sed_strip_eq="s,=/,/,g" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[[4-9]]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[123]]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; haiku*) version_type=linux need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[[3-9]]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], [lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], [lt_cv_shlibpath_overrides_runpath=yes])]) LDFLAGS=$save_LDFLAGS libdir=$save_libdir ]) shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[[89]] | openbsd2.[[89]].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) _LT_DECL([], [need_lib_prefix], [0], [Do we need the "lib" prefix for modules?]) _LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) _LT_DECL([], [version_type], [0], [Library versioning type]) _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) _LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) _LT_DECL([], [shlibpath_overrides_runpath], [0], [Is shlibpath searched before the hard-coded library search path?]) _LT_DECL([], [libname_spec], [1], [Format of library name prefix]) _LT_DECL([], [library_names_spec], [1], [[List of archive names. First name is the real one, the rest are links. The last name is the one that the linker finds with -lNAME]]) _LT_DECL([], [soname_spec], [1], [[The coded name of the library, if different from the real name]]) _LT_DECL([], [install_override_mode], [1], [Permission mode override for installation of shared libraries]) _LT_DECL([], [postinstall_cmds], [2], [Command to use after installation of a shared archive]) _LT_DECL([], [postuninstall_cmds], [2], [Command to use after uninstallation of a shared archive]) _LT_DECL([], [finish_cmds], [2], [Commands used to finish a libtool library installation in a directory]) _LT_DECL([], [finish_eval], [1], [[As "finish_cmds", except a single script fragment to be evaled but not shown]]) _LT_DECL([], [hardcode_into_libs], [0], [Whether we should hardcode library paths into libraries]) _LT_DECL([], [sys_lib_search_path_spec], [2], [Compile-time system search path for libraries]) _LT_DECL([], [sys_lib_dlsearch_path_spec], [2], [Run-time system search path for libraries]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- # find a file program which can recognize shared library AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="m4_if([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then lt_cv_path_MAGIC_CMD="$ac_dir/$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac]) MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi _LT_DECL([], [MAGIC_CMD], [0], [Used to examine libraries when file_magic_cmd begins with "file"])dnl ])# _LT_PATH_TOOL_PREFIX # Old name: AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) # _LT_PATH_MAGIC # -------------- # find a file program which can recognize a shared library m4_defun([_LT_PATH_MAGIC], [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# _LT_PATH_MAGIC # LT_PATH_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PROG_ECHO_BACKSLASH])dnl AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test "$withval" = no || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown _LT_DECL([], [deplibs_check_method], [1], [Method to check whether dependent libraries are shared objects]) _LT_DECL([], [file_magic_cmd], [1], [Command to use when deplibs_check_method = "file_magic"]) _LT_DECL([], [file_magic_glob], [1], [How to find potential files when deplibs_check_method = "file_magic"]) _LT_DECL([], [want_nocaseglob], [1], [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) ])# _LT_CHECK_MAGIC_METHOD # LT_PATH_NM # ---------- # find the pathname to a BSD- or MS-compatible name lister AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi]) if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols" ;; *) DUMPBIN=: ;; esac fi AC_SUBST([DUMPBIN]) if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm AC_SUBST([NM]) _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], [lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) cat conftest.out >&AS_MESSAGE_LOG_FD if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest*]) ])# LT_PATH_NM # Old names: AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_PROG_NM], []) dnl AC_DEFUN([AC_PROG_NM], []) # _LT_CHECK_SHAREDLIB_FROM_LINKLIB # -------------------------------- # how to determine the name of the shared library # associated with a specific link library. # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) m4_require([_LT_DECL_DLLTOOL]) AC_CACHE_CHECK([how to associate runtime and link libraries], lt_cv_sharedlib_from_linklib_cmd, [lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh # decide which to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd="$ECHO" ;; esac ]) sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO _LT_DECL([], [sharedlib_from_linklib_cmd], [1], [Command to associate shared and link libraries]) ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB # _LT_PATH_MANIFEST_TOOL # ---------------------- # locate the manifest tool m4_defun([_LT_PATH_MANIFEST_TOOL], [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], [lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&AS_MESSAGE_LOG_FD if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest*]) if test "x$lt_cv_path_mainfest_tool" != xyes; then MANIFEST_TOOL=: fi _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl ])# _LT_PATH_MANIFEST_TOOL # LT_LIB_M # -------- # check for math library AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac AC_SUBST([LIBM]) ])# LT_LIB_M # Old name: AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_CHECK_LIBM], []) # _LT_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------- m4_defun([_LT_COMPILER_NO_RTTI], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then case $cc_basename in nvcc*) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; *) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; esac _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], [Compiler flag to turn off builtin functions]) ])# _LT_COMPILER_NO_RTTI # _LT_CMD_GLOBAL_SYMBOLS # ---------------------- m4_defun([_LT_CMD_GLOBAL_SYMBOLS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([LT_PATH_NM])dnl AC_REQUIRE([LT_PATH_LD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_TAG_COMPILER])dnl # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[[ABCDGISTW]]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[[ABCDEGRST]]' fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx]" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT@&t@_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT@&t@_DLSYM_CONST #else # define LT@&t@_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT@&t@_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[[]] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then nm_file_list_spec='@' fi _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], [Transform the output of nm in a proper C declaration]) _LT_DECL([global_symbol_to_c_name_address], [lt_cv_sys_global_symbol_to_c_name_address], [1], [Transform the output of nm in a C name address pair]) _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) _LT_DECL([], [nm_file_list_spec], [1], [Specify filename containing input files for $NM]) ]) # _LT_CMD_GLOBAL_SYMBOLS # _LT_COMPILER_PIC([TAGNAME]) # --------------------------- m4_defun([_LT_COMPILER_PIC], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_wl, $1)= _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)= m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix[[4-9]]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; dgux*) case $cc_basename in ec++*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64 which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL 8.0, 9.0 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test "$GCC" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; hpux9* | hpux10* | hpux11*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # Lahey Fortran 8.1. lf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' ;; nagfor*) # NAG Fortran compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ F* | *Sun*Fortran*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; esac ;; esac ;; newsos6) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" ;; esac AC_CACHE_CHECK([for $compiler option to produce PIC], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], [Additional compiler flags for building library objects]) _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], [How to pass a linker flag through the compiler]) # # Check to make sure the static flag actually works. # wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], [Compiler flag to prevent dynamic linking]) ])# _LT_COMPILER_PIC # _LT_LINKER_SHLIBS([TAGNAME]) # ---------------------------- # See if the linker supports building shared libraries. m4_defun([_LT_LINKER_SHLIBS], [AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) m4_if([$1], [CXX], [ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global defined # symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl*) ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] ;; esac ;; linux* | k*bsd*-gnu | gnu*) _LT_TAGVAR(link_all_deplibs, $1)=no ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac ], [ runpath_var= _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_cmds, $1)= _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(old_archive_from_new_cmds, $1)= _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_TAGVAR(thread_safe_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. dnl Note also adjust exclude_expsyms for C++ above. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; linux* | k*bsd*-gnu | gnu*) _LT_TAGVAR(link_all_deplibs, $1)=no ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test "$with_gnu_ld" = yes; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 _LT_TAGVAR(whole_archive_flag_spec, $1)= tmp_sharedflag='--shared' ;; xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then runpath_var= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_TAGVAR(hardcode_minus_L, $1)=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi _LT_TAGVAR(link_all_deplibs, $1)=no else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; bsdi[[45]]*) _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; freebsd1*) _LT_TAGVAR(ld_shlibs, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) m4_if($1, [], [ # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) _LT_LINKER_OPTION([if $CC understands -b], _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) ;; esac fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], [lt_cv_irix_exported_symbol], [save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" AC_LINK_IFELSE( [AC_LANG_SOURCE( [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], [C++], [[int foo (void) { return 0; }]], [Fortran 77], [[ subroutine foo end]], [Fortran], [[ subroutine foo end]])])], [lt_cv_irix_exported_symbol=yes], [lt_cv_irix_exported_symbol=no]) LDFLAGS="$save_LDFLAGS"]) if test "$lt_cv_irix_exported_symbol" = yes; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' fi else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes _LT_TAGVAR(link_all_deplibs, $1)=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ;; esac fi else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(ld_shlibs, $1)=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' ;; esac fi fi ]) AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl _LT_DECL([], [extract_expsyms_cmds], [2], [The commands to extract the exported symbol list from a shared archive]) # # Do we need to explicitly link libc? # case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_TAGVAR(archive_cmds_need_lc, $1)=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $_LT_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_CACHE_CHECK([whether -lc should be explicitly linked in], [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), [$RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) _LT_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) then lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no else lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* ]) _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) ;; esac fi ;; esac _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], [Whether or not to add -lc for building shared libraries]) _LT_TAGDECL([allow_libtool_libs_with_static_runtimes], [enable_shared_with_static_runtimes], [0], [Whether or not to disallow shared libs when runtime libs are static]) _LT_TAGDECL([], [export_dynamic_flag_spec], [1], [Compiler flag to allow reflexive dlopens]) _LT_TAGDECL([], [whole_archive_flag_spec], [1], [Compiler flag to generate shared objects directly from archives]) _LT_TAGDECL([], [compiler_needs_object], [1], [Whether the compiler copes with passing no objects directly]) _LT_TAGDECL([], [old_archive_from_new_cmds], [2], [Create an old-style archive from a shared archive]) _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], [Create a temporary old-style archive to link instead of a shared archive]) _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) _LT_TAGDECL([], [archive_expsym_cmds], [2]) _LT_TAGDECL([], [module_cmds], [2], [Commands used to build a loadable module if different from building a shared archive.]) _LT_TAGDECL([], [module_expsym_cmds], [2]) _LT_TAGDECL([], [with_gnu_ld], [1], [Whether we are building with GNU ld or not]) _LT_TAGDECL([], [allow_undefined_flag], [1], [Flag that allows shared libraries with undefined symbols to be built]) _LT_TAGDECL([], [no_undefined_flag], [1], [Flag that enforces no undefined symbols]) _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) _LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], [[If ld is used when linking, flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_direct_absolute], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary and the resulting library dependency is "absolute", i.e impossible to change by setting ${shlibpath_var} if the library is relocated]) _LT_TAGDECL([], [hardcode_minus_L], [0], [Set to "yes" if using the -LDIR flag during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_shlibpath_var], [0], [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_automatic], [0], [Set to "yes" if building a shared library automatically hardcodes DIR into the library and all subsequent libraries and executables linked against it]) _LT_TAGDECL([], [inherit_rpath], [0], [Set to yes if linker adds runtime paths of dependent libraries to runtime path list]) _LT_TAGDECL([], [link_all_deplibs], [0], [Whether libtool must link a program against all its dependency libraries]) _LT_TAGDECL([], [always_export_symbols], [0], [Set to "yes" if exported symbols are required]) _LT_TAGDECL([], [export_symbols_cmds], [2], [The commands to list exported symbols]) _LT_TAGDECL([], [exclude_expsyms], [1], [Symbols that should not be listed in the preloaded symbols]) _LT_TAGDECL([], [include_expsyms], [1], [Symbols that must always be exported]) _LT_TAGDECL([], [prelink_cmds], [2], [Commands necessary for linking programs (against libraries) with templates]) _LT_TAGDECL([], [postlink_cmds], [2], [Commands necessary for finishing linking programs]) _LT_TAGDECL([], [file_list_spec], [1], [Specify filename containing input files]) dnl FIXME: Not yet implemented dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], dnl [Compiler flag to generate thread safe objects]) ])# _LT_LINKER_SHLIBS # _LT_LANG_C_CONFIG([TAG]) # ------------------------ # Ensure that the configuration variables for a C compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_C_CONFIG], [m4_require([_LT_DECL_EGREP])dnl lt_save_CC="$CC" AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' _LT_TAG_COMPILER # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) LT_SYS_DLOPEN_SELF _LT_CMD_STRIPLIB # Report which library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_CONFIG($1) fi AC_LANG_POP CC="$lt_save_CC" ])# _LT_LANG_C_CONFIG # _LT_LANG_CXX_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_CXX_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_PROG_CXXCPP else _lt_caught_CXX_error=yes fi AC_LANG_PUSH(C++) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_caught_CXX_error" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} CFLAGS=$CXXFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration LT_PATH_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GXX" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty # executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared # libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in ,cl* | no,cl*) # Native MSVC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ func_to_tool_file "$lt_outputfile"~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd[[12]]*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes ;; gnu*) ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; hpux9*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' fi fi _LT_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) _LT_TAGVAR(ld_shlibs, $1)=yes ;; openbsd2*) # C++ shared libraries are fairly broken _LT_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; cxx*) case $host in osf3*) _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; esac _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ '"$_LT_TAGVAR(old_archive_cmds, $1)" _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ '"$_LT_TAGVAR(reload_cmds, $1)" ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(GCC, $1)="$GXX" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test "$_lt_caught_CXX_error" != yes AC_LANG_POP ])# _LT_LANG_CXX_CONFIG # _LT_FUNC_STRIPNAME_CNF # ---------------------- # func_stripname_cnf prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # # This function is identical to the (non-XSI) version of func_stripname, # except this one can be used by m4 code that may be executed by configure, # rather than the libtool script. m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl AC_REQUIRE([_LT_DECL_SED]) AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) func_stripname_cnf () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname_cnf ])# _LT_FUNC_STRIPNAME_CNF # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. m4_defun([_LT_SYS_HIDDEN_LIBDEPS], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl # Dependencies to place before and after the object being linked: _LT_TAGVAR(predep_objects, $1)= _LT_TAGVAR(postdep_objects, $1)= _LT_TAGVAR(predeps, $1)= _LT_TAGVAR(postdeps, $1)= _LT_TAGVAR(compiler_lib_search_path, $1)= dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF int a; void foo (void) { a = 0; } _LT_EOF ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer*4 a a=0 return end _LT_EOF ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer a a=0 return end _LT_EOF ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF public class foo { private int a; public void bar (void) { a = 0; } }; _LT_EOF ]) _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; esac dnl Parse the compiler output and extract the necessary dnl objects, libraries and library flags. if AC_TRY_EVAL(ac_compile); then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case ${prev}${p} in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" || test $p = "-R"; then prev=$p continue fi # Expand the sysroot to ease extracting the directories later. if test -z "$prev"; then case $p in -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; esac fi case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac if test "$pre_test_object_deps_done" = no; then case ${prev} in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" else _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$_LT_TAGVAR(postdeps, $1)"; then _LT_TAGVAR(postdeps, $1)="${prev}${p}" else _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" fi fi prev= ;; *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$_LT_TAGVAR(predep_objects, $1)"; then _LT_TAGVAR(predep_objects, $1)="$p" else _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" fi else if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then _LT_TAGVAR(postdep_objects, $1)="$p" else _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling $1 test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken m4_if([$1], [CXX], [case $host_os in interix[[3-9]]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. _LT_TAGVAR(predep_objects,$1)= _LT_TAGVAR(postdep_objects,$1)= _LT_TAGVAR(postdeps,$1)= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; esac ]) case " $_LT_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac _LT_TAGVAR(compiler_lib_search_dirs, $1)= if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi _LT_TAGDECL([], [compiler_lib_search_dirs], [1], [The directories searched by this compiler when creating a shared library]) _LT_TAGDECL([], [predep_objects], [1], [Dependencies to place before and after the objects being linked to create a shared library]) _LT_TAGDECL([], [postdep_objects], [1]) _LT_TAGDECL([], [predeps], [1]) _LT_TAGDECL([], [postdeps], [1]) _LT_TAGDECL([], [compiler_lib_search_path], [1], [The library search path used internally by the compiler when linking a shared library]) ])# _LT_SYS_HIDDEN_LIBDEPS # _LT_LANG_F77_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_F77_CONFIG], [AC_LANG_PUSH(Fortran 77) if test -z "$F77" || test "X$F77" = "Xno"; then _lt_disable_F77=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the F77 compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_F77" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${F77-"f77"} CFLAGS=$FFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) GCC=$G77 if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$G77" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC="$lt_save_CC" CFLAGS="$lt_save_CFLAGS" fi # test "$_lt_disable_F77" != yes AC_LANG_POP ])# _LT_LANG_F77_CONFIG # _LT_LANG_FC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_FC_CONFIG], [AC_LANG_PUSH(Fortran) if test -z "$FC" || test "X$FC" = "Xno"; then _lt_disable_FC=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for fc test sources. ac_ext=${ac_fc_srcext-f} # Object file extension for compiled fc test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the FC compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_FC" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${FC-"f95"} CFLAGS=$FCFLAGS compiler=$CC GCC=$ac_cv_fc_compiler_gnu _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS fi # test "$_lt_disable_FC" != yes AC_LANG_POP ])# _LT_LANG_FC_CONFIG # _LT_LANG_GCJ_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Java Compiler compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_GCJ_CONFIG], [AC_REQUIRE([LT_PROG_GCJ])dnl AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GCJ-"gcj"} CFLAGS=$GCJFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)="$LD" _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GCJ_CONFIG # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_RC_CONFIG], [AC_REQUIRE([LT_PROG_RC])dnl AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC= CC=${RC-"windres"} CFLAGS= compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes if test -n "$compiler"; then : _LT_CONFIG($1) fi GCC=$lt_save_GCC AC_LANG_RESTORE CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_RC_CONFIG # LT_PROG_GCJ # ----------- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) # Old name: AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) ]) # Old name: AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_RC], []) # _LT_DECL_EGREP # -------------- # If we don't have a new enough Autoconf to choose the best grep # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_EGREP], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_REQUIRE([AC_PROG_FGREP])dnl test -z "$GREP" && GREP=grep _LT_DECL([], [GREP], [1], [A grep program that handles long lines]) _LT_DECL([], [EGREP], [1], [An ERE matcher]) _LT_DECL([], [FGREP], [1], [A literal string matcher]) dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too AC_SUBST([GREP]) ]) # _LT_DECL_OBJDUMP # -------------- # If we don't have a new enough Autoconf to choose the best objdump # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_OBJDUMP], [AC_CHECK_TOOL(OBJDUMP, objdump, false) test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) AC_SUBST([OBJDUMP]) ]) # _LT_DECL_DLLTOOL # ---------------- # Ensure DLLTOOL variable is set. m4_defun([_LT_DECL_DLLTOOL], [AC_CHECK_TOOL(DLLTOOL, dlltool, false) test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program]) AC_SUBST([DLLTOOL]) ]) # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. m4_defun([_LT_DECL_SED], [AC_PROG_SED test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" _LT_DECL([], [SED], [1], [A sed program that does not truncate output]) _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], [Sed that helps us avoid accidentally triggering echo(1) options like -n]) ])# _LT_DECL_SED m4_ifndef([AC_PROG_SED], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ])#AC_PROG_SED ])#m4_ifndef # Old name: AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_SED], []) # _LT_CHECK_SHELL_FEATURES # ------------------------ # Find out whether the shell is Bourne or XSI compatible, # or has some other useful features. m4_defun([_LT_CHECK_SHELL_FEATURES], [AC_MSG_CHECKING([whether the shell understands some XSI constructs]) # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes AC_MSG_RESULT([$xsi_shell]) _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) AC_MSG_CHECKING([whether the shell understands "+="]) lt_shell_append=no ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes AC_MSG_RESULT([$lt_shell_append]) _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl ])# _LT_CHECK_SHELL_FEATURES # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) # ------------------------------------------------------ # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. m4_defun([_LT_PROG_FUNCTION_REPLACE], [dnl { sed -e '/^$1 ()$/,/^} # $1 /c\ $1 ()\ {\ m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: ]) # _LT_PROG_REPLACE_SHELLFNS # ------------------------- # Replace existing portable implementations of several shell functions with # equivalent extended shell implementations where those features are available.. m4_defun([_LT_PROG_REPLACE_SHELLFNS], [if test x"$xsi_shell" = xyes; then _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac]) _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl func_basename_result="${1##*/}"]) _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac func_basename_result="${1##*/}"]) _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary parameter first. func_stripname_result=${3} func_stripname_result=${func_stripname_result#"${1}"} func_stripname_result=${func_stripname_result%"${2}"}]) _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl func_split_long_opt_name=${1%%=*} func_split_long_opt_arg=${1#*=}]) _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl func_split_short_opt_arg=${1#??} func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl case ${1} in *.lo) func_lo2o_result=${1%.lo}.${objext} ;; *) func_lo2o_result=${1} ;; esac]) _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) fi if test x"$lt_shell_append" = xyes; then _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl func_quote_for_eval "${2}" dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) # Save a `func_append' function call where possible by direct use of '+=' sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: else # Save a `func_append' function call even when '+=' is not available sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$_lt_function_replace_fail" = x":"; then AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) fi ]) # _LT_PATH_CONVERSION_FUNCTIONS # ----------------------------- # Determine which file name conversion functions should be used by # func_to_host_file (and, implicitly, by func_to_host_path). These are needed # for certain cross-compile configurations and native mingw. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_MSG_CHECKING([how to convert $build file names to $host format]) AC_CACHE_VAL(lt_cv_to_host_file_cmd, [case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac ]) to_host_file_cmd=$lt_cv_to_host_file_cmd AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], [0], [convert $build file names to $host format])dnl AC_MSG_CHECKING([how to convert $build file names to toolchain format]) AC_CACHE_VAL(lt_cv_to_tool_file_cmd, [#assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac ]) to_tool_file_cmd=$lt_cv_to_tool_file_cmd AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], [0], [convert $build files to toolchain format])dnl ])# _LT_PATH_CONVERSION_FUNCTIONS source-highlight-3.1.6/m4/ltversion.m40000644000175000017500000000125611672675564014545 00000000000000# ltversion.m4 -- version numbers -*- Autoconf -*- # # Copyright (C) 2004 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # @configure_input@ # serial 3293 ltversion.m4 # This file is part of GNU Libtool m4_define([LT_PACKAGE_VERSION], [2.4]) m4_define([LT_PACKAGE_REVISION], [1.3293]) AC_DEFUN([LTVERSION_VERSION], [macro_version='2.4' macro_revision='1.3293' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) source-highlight-3.1.6/m4/ltsugar.m40000644000175000017500000001042411672675564014176 00000000000000# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 6 ltsugar.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) # lt_join(SEP, ARG1, [ARG2...]) # ----------------------------- # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their # associated separator. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier # versions in m4sugar had bugs. m4_define([lt_join], [m4_if([$#], [1], [], [$#], [2], [[$2]], [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) m4_define([_lt_join], [m4_if([$#$2], [2], [], [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) # lt_car(LIST) # lt_cdr(LIST) # ------------ # Manipulate m4 lists. # These macros are necessary as long as will still need to support # Autoconf-2.59 which quotes differently. m4_define([lt_car], [[$1]]) m4_define([lt_cdr], [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], [$#], 1, [], [m4_dquote(m4_shift($@))])]) m4_define([lt_unquote], $1) # lt_append(MACRO-NAME, STRING, [SEPARATOR]) # ------------------------------------------ # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. # Note that neither SEPARATOR nor STRING are expanded; they are appended # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). # No SEPARATOR is output if MACRO-NAME was previously undefined (different # than defined and empty). # # This macro is needed until we can rely on Autoconf 2.62, since earlier # versions of m4sugar mistakenly expanded SEPARATOR but not STRING. m4_define([lt_append], [m4_define([$1], m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) # ---------------------------------------------------------- # Produce a SEP delimited list of all paired combinations of elements of # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list # has the form PREFIXmINFIXSUFFIXn. # Needed until we can rely on m4_combine added in Autoconf 2.62. m4_define([lt_combine], [m4_if(m4_eval([$# > 3]), [1], [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl [[m4_foreach([_Lt_prefix], [$2], [m4_foreach([_Lt_suffix], ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) # ----------------------------------------------------------------------- # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. m4_define([lt_if_append_uniq], [m4_ifdef([$1], [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], [lt_append([$1], [$2], [$3])$4], [$5])], [lt_append([$1], [$2], [$3])$4])]) # lt_dict_add(DICT, KEY, VALUE) # ----------------------------- m4_define([lt_dict_add], [m4_define([$1($2)], [$3])]) # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) # -------------------------------------------- m4_define([lt_dict_add_subkey], [m4_define([$1($2:$3)], [$4])]) # lt_dict_fetch(DICT, KEY, [SUBKEY]) # ---------------------------------- m4_define([lt_dict_fetch], [m4_ifval([$3], m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) # ----------------------------------------------------------------- m4_define([lt_if_dict_fetch], [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], [$5], [$6])]) # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) # -------------------------------------------------------------- m4_define([lt_dict_filter], [m4_if([$5], [], [], [lt_join(m4_quote(m4_default([$4], [[, ]])), lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl ]) source-highlight-3.1.6/m4/ax_boost_base.m40000644000175000017500000002415311672675564015331 00000000000000# =========================================================================== # http://www.gnu.org/software/autoconf-archive/ax_boost_base.html # =========================================================================== # # SYNOPSIS # # AX_BOOST_BASE([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # # DESCRIPTION # # Test for the Boost C++ libraries of a particular version (or newer) # # If no path to the installed boost library is given the macro searchs # under /usr, /usr/local, /opt and /opt/local and evaluates the # $BOOST_ROOT environment variable. Further documentation is available at # . # # This macro calls: # # AC_SUBST(BOOST_CPPFLAGS) / AC_SUBST(BOOST_LDFLAGS) # # And sets: # # HAVE_BOOST # # LICENSE # # Copyright (c) 2008 Thomas Porschberg # Copyright (c) 2009 Peter Adolphs # # Copying and distribution of this file, with or without modification, are # permitted in any medium without royalty provided the copyright notice # and this notice are preserved. This file is offered as-is, without any # warranty. #serial 19 AC_DEFUN([AX_BOOST_BASE], [ AC_ARG_WITH([boost], [AS_HELP_STRING([--with-boost@<:@=ARG@:>@], [use Boost library from a standard location (ARG=yes), from the specified location (ARG=), or disable it (ARG=no) @<:@ARG=yes@:>@ ])], [ if test "$withval" = "no"; then want_boost="no" elif test "$withval" = "yes"; then want_boost="yes" ac_boost_path="" else want_boost="yes" ac_boost_path="$withval" fi ], [want_boost="yes"]) AC_ARG_WITH([boost-libdir], AS_HELP_STRING([--with-boost-libdir=LIB_DIR], [Force given directory for boost libraries. Note that this will override library path detection, so use this parameter only if default library detection fails and you know exactly where your boost libraries are located.]), [ if test -d "$withval" then ac_boost_lib_path="$withval" else AC_MSG_ERROR(--with-boost-libdir expected directory name) fi ], [ac_boost_lib_path=""] ) if test "x$want_boost" = "xyes"; then boost_lib_version_req=ifelse([$1], ,1.20.0,$1) boost_lib_version_req_shorten=`expr $boost_lib_version_req : '\([[0-9]]*\.[[0-9]]*\)'` boost_lib_version_req_major=`expr $boost_lib_version_req : '\([[0-9]]*\)'` boost_lib_version_req_minor=`expr $boost_lib_version_req : '[[0-9]]*\.\([[0-9]]*\)'` boost_lib_version_req_sub_minor=`expr $boost_lib_version_req : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'` if test "x$boost_lib_version_req_sub_minor" = "x" ; then boost_lib_version_req_sub_minor="0" fi WANT_BOOST_VERSION=`expr $boost_lib_version_req_major \* 100000 \+ $boost_lib_version_req_minor \* 100 \+ $boost_lib_version_req_sub_minor` AC_MSG_CHECKING(for boostlib >= $boost_lib_version_req) succeeded=no dnl On 64-bit systems check for system libraries in both lib64 and lib. dnl The former is specified by FHS, but e.g. Debian does not adhere to dnl this (as it rises problems for generic multi-arch support). dnl The last entry in the list is chosen by default when no libraries dnl are found, e.g. when only header-only libraries are installed! libsubdirs="lib" ax_arch=`uname -m` if test $ax_arch = x86_64 -o $ax_arch = ppc64 -o $ax_arch = s390x -o $ax_arch = sparc64; then libsubdirs="lib64 lib lib64" fi dnl first we check the system location for boost libraries dnl this location ist chosen if boost libraries are installed with the --layout=system option dnl or if you install boost with RPM if test "$ac_boost_path" != ""; then BOOST_CPPFLAGS="-I$ac_boost_path/include" for ac_boost_path_tmp in $libsubdirs; do if test -d "$ac_boost_path"/"$ac_boost_path_tmp" ; then BOOST_LDFLAGS="-L$ac_boost_path/$ac_boost_path_tmp" break fi done elif test "$cross_compiling" != yes; then for ac_boost_path_tmp in /usr /usr/local /opt /opt/local ; do if test -d "$ac_boost_path_tmp/include/boost" && test -r "$ac_boost_path_tmp/include/boost"; then for libsubdir in $libsubdirs ; do if ls "$ac_boost_path_tmp/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi done BOOST_LDFLAGS="-L$ac_boost_path_tmp/$libsubdir" BOOST_CPPFLAGS="-I$ac_boost_path_tmp/include" break; fi done fi dnl overwrite ld flags if we have required special directory with dnl --with-boost-libdir parameter if test "$ac_boost_lib_path" != ""; then BOOST_LDFLAGS="-L$ac_boost_lib_path" fi CPPFLAGS_SAVED="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" export CPPFLAGS LDFLAGS_SAVED="$LDFLAGS" LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" export LDFLAGS AC_REQUIRE([AC_PROG_CXX]) AC_LANG_PUSH(C++) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ @%:@include ]], [[ #if BOOST_VERSION >= $WANT_BOOST_VERSION // Everything is okay #else # error Boost version is too old #endif ]])],[ AC_MSG_RESULT(yes) succeeded=yes found_system=yes ],[ ]) AC_LANG_POP([C++]) dnl if we found no boost with system layout we search for boost libraries dnl built and installed without the --layout=system option or for a staged(not installed) version if test "x$succeeded" != "xyes"; then _version=0 if test "$ac_boost_path" != ""; then if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do _version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'` V_CHECK=`expr $_version_tmp \> $_version` if test "$V_CHECK" = "1" ; then _version=$_version_tmp fi VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'` BOOST_CPPFLAGS="-I$ac_boost_path/include/boost-$VERSION_UNDERSCORE" done fi else if test "$cross_compiling" != yes; then for ac_boost_path in /usr /usr/local /opt /opt/local ; do if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do _version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'` V_CHECK=`expr $_version_tmp \> $_version` if test "$V_CHECK" = "1" ; then _version=$_version_tmp best_path=$ac_boost_path fi done fi done VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'` BOOST_CPPFLAGS="-I$best_path/include/boost-$VERSION_UNDERSCORE" if test "$ac_boost_lib_path" = ""; then for libsubdir in $libsubdirs ; do if ls "$best_path/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi done BOOST_LDFLAGS="-L$best_path/$libsubdir" fi fi if test "x$BOOST_ROOT" != "x"; then for libsubdir in $libsubdirs ; do if ls "$BOOST_ROOT/stage/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi done if test -d "$BOOST_ROOT" && test -r "$BOOST_ROOT" && test -d "$BOOST_ROOT/stage/$libsubdir" && test -r "$BOOST_ROOT/stage/$libsubdir"; then version_dir=`expr //$BOOST_ROOT : '.*/\(.*\)'` stage_version=`echo $version_dir | sed 's/boost_//' | sed 's/_/./g'` stage_version_shorten=`expr $stage_version : '\([[0-9]]*\.[[0-9]]*\)'` V_CHECK=`expr $stage_version_shorten \>\= $_version` if test "$V_CHECK" = "1" -a "$ac_boost_lib_path" = "" ; then AC_MSG_NOTICE(We will use a staged boost library from $BOOST_ROOT) BOOST_CPPFLAGS="-I$BOOST_ROOT" BOOST_LDFLAGS="-L$BOOST_ROOT/stage/$libsubdir" fi fi fi fi CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" export CPPFLAGS LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" export LDFLAGS AC_LANG_PUSH(C++) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ @%:@include ]], [[ #if BOOST_VERSION >= $WANT_BOOST_VERSION // Everything is okay #else # error Boost version is too old #endif ]])],[ AC_MSG_RESULT(yes) succeeded=yes found_system=yes ],[ ]) AC_LANG_POP([C++]) fi if test "$succeeded" != "yes" ; then if test "$_version" = "0" ; then AC_MSG_NOTICE([[We could not detect the boost libraries (version $boost_lib_version_req_shorten or higher). If you have a staged boost library (still not installed) please specify \$BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in . See http://randspringer.de/boost for more documentation.]]) else AC_MSG_NOTICE([Your boost libraries seems to old (version $_version).]) fi # execute ACTION-IF-NOT-FOUND (if present): ifelse([$3], , :, [$3]) else AC_SUBST(BOOST_CPPFLAGS) AC_SUBST(BOOST_LDFLAGS) AC_DEFINE(HAVE_BOOST,,[define if the Boost library is available]) # execute ACTION-IF-FOUND (if present): ifelse([$2], , :, [$2]) fi CPPFLAGS="$CPPFLAGS_SAVED" LDFLAGS="$LDFLAGS_SAVED" fi ]) source-highlight-3.1.6/m4/Makefile.in0000664000175000017500000007740111675044677014330 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Copyright (C) 1999-2009 Lorenzo Bettini # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = m4 SUBDIRS = DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/gl/m4/00gnulib.m4 \ $(top_srcdir)/gl/m4/ac_prog_doxygen.m4 \ $(top_srcdir)/gl/m4/dirent_h.m4 $(top_srcdir)/gl/m4/dirname.m4 \ $(top_srcdir)/gl/m4/double-slash-root.m4 \ $(top_srcdir)/gl/m4/extensions.m4 \ $(top_srcdir)/gl/m4/getopt.m4 \ $(top_srcdir)/gl/m4/gnulib-common.m4 \ $(top_srcdir)/gl/m4/gnulib-comp.m4 \ $(top_srcdir)/gl/m4/include_next.m4 \ $(top_srcdir)/gl/m4/malloc.m4 $(top_srcdir)/gl/m4/memset.m4 \ $(top_srcdir)/gl/m4/mkdir.m4 $(top_srcdir)/gl/m4/nocrash.m4 \ $(top_srcdir)/gl/m4/ssize_t.m4 $(top_srcdir)/gl/m4/stdbool.m4 \ $(top_srcdir)/gl/m4/stddef_h.m4 \ $(top_srcdir)/gl/m4/stdlib_h.m4 $(top_srcdir)/gl/m4/strdup.m4 \ $(top_srcdir)/gl/m4/string_h.m4 \ $(top_srcdir)/gl/m4/sys_stat_h.m4 \ $(top_srcdir)/gl/m4/time_h.m4 $(top_srcdir)/gl/m4/unistd_h.m4 \ $(top_srcdir)/gl/m4/warn-on-use.m4 \ $(top_srcdir)/gl/m4/wchar_t.m4 \ $(top_srcdir)/m4/ax_boost_base.m4 \ $(top_srcdir)/m4/ax_boost_regex.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ABSOLUTEDATADIR = @ABSOLUTEDATADIR@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ ARFLAGS = @ARFLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASH_COMPLETION_DIR = @BASH_COMPLETION_DIR@ BASH_SHELL = @BASH_SHELL@ BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ BOOST_LDFLAGS = @BOOST_LDFLAGS@ BOOST_REGEX_LIB = @BOOST_REGEX_LIB@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHROOT_INPUT_DIR = @CHROOT_INPUT_DIR@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOUBLECPP = @DOUBLECPP@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GENGETOPT = @GENGETOPT@ GETOPT_H = @GETOPT_H@ GNULIB_ALPHASORT = @GNULIB_ALPHASORT@ GNULIB_ATOLL = @GNULIB_ATOLL@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ GNULIB_CHDIR = @GNULIB_CHDIR@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@ GNULIB_DIRFD = @GNULIB_DIRFD@ GNULIB_DUP = @GNULIB_DUP@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ GNULIB_FDATASYNC = @GNULIB_FDATASYNC@ GNULIB_FDOPENDIR = @GNULIB_FDOPENDIR@ GNULIB_FFSL = @GNULIB_FFSL@ GNULIB_FFSLL = @GNULIB_FFSLL@ GNULIB_FSTAT = @GNULIB_FSTAT@ GNULIB_FSTATAT = @GNULIB_FSTATAT@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@ GNULIB_GRANTPT = @GNULIB_GRANTPT@ GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@ GNULIB_LCHMOD = @GNULIB_LCHMOD@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MBTOWC = @GNULIB_MBTOWC@ GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_MKDIRAT = @GNULIB_MKDIRAT@ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ GNULIB_MKFIFO = @GNULIB_MKFIFO@ GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@ GNULIB_MKNOD = @GNULIB_MKNOD@ GNULIB_MKNODAT = @GNULIB_MKNODAT@ GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_MKTIME = @GNULIB_MKTIME@ GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@ GNULIB_OPENDIR = @GNULIB_OPENDIR@ GNULIB_PIPE = @GNULIB_PIPE@ GNULIB_PIPE2 = @GNULIB_PIPE2@ GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PTSNAME = @GNULIB_PTSNAME@ GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PWRITE = @GNULIB_PWRITE@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_READ = @GNULIB_READ@ GNULIB_READDIR = @GNULIB_READDIR@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ GNULIB_REWINDDIR = @GNULIB_REWINDDIR@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SCANDIR = @GNULIB_SCANDIR@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_STAT = @GNULIB_STAT@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRERROR_R = @GNULIB_STRERROR_R@ GNULIB_STRNCAT = @GNULIB_STRNCAT@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRPTIME = @GNULIB_STRPTIME@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOD = @GNULIB_STRTOD@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRTOLL = @GNULIB_STRTOLL@ GNULIB_STRTOULL = @GNULIB_STRTOULL@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@ GNULIB_TIMEGM = @GNULIB_TIMEGM@ GNULIB_TIME_R = @GNULIB_TIME_R@ GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@ GNULIB_UNSETENV = @GNULIB_UNSETENV@ GNULIB_USLEEP = @GNULIB_USLEEP@ GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@ GNULIB_WCTOMB = @GNULIB_WCTOMB@ GNULIB_WRITE = @GNULIB_WRITE@ GNULIB__EXIT = @GNULIB__EXIT@ GREP = @GREP@ HAVE_ALPHASORT = @HAVE_ALPHASORT@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ HAVE_CHOWN = @HAVE_CHOWN@ HAVE_CLOSEDIR = @HAVE_CLOSEDIR@ HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@ HAVE_DECL_FDOPENDIR = @HAVE_DECL_FDOPENDIR@ HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ HAVE_DIRENT_H = @HAVE_DIRENT_H@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHDIR = @HAVE_FCHDIR@ HAVE_FCHMODAT = @HAVE_FCHMODAT@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FDATASYNC = @HAVE_FDATASYNC@ HAVE_FDOPENDIR = @HAVE_FDOPENDIR@ HAVE_FFSL = @HAVE_FFSL@ HAVE_FFSLL = @HAVE_FFSLL@ HAVE_FSTATAT = @HAVE_FSTATAT@ HAVE_FSYNC = @HAVE_FSYNC@ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ HAVE_FUTIMENS = @HAVE_FUTIMENS@ HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ HAVE_GETGROUPS = @HAVE_GETGROUPS@ HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ HAVE_GETLOGIN = @HAVE_GETLOGIN@ HAVE_GETOPT_H = @HAVE_GETOPT_H@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GRANTPT = @HAVE_GRANTPT@ HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LCHOWN = @HAVE_LCHOWN@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ HAVE_LSTAT = @HAVE_LSTAT@ HAVE_MBSLEN = @HAVE_MBSLEN@ HAVE_MEMCHR = @HAVE_MEMCHR@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_MKDIRAT = @HAVE_MKDIRAT@ HAVE_MKDTEMP = @HAVE_MKDTEMP@ HAVE_MKFIFO = @HAVE_MKFIFO@ HAVE_MKFIFOAT = @HAVE_MKFIFOAT@ HAVE_MKNOD = @HAVE_MKNOD@ HAVE_MKNODAT = @HAVE_MKNODAT@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMP = @HAVE_MKSTEMP@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ HAVE_NANOSLEEP = @HAVE_NANOSLEEP@ HAVE_OPENDIR = @HAVE_OPENDIR@ HAVE_OS_H = @HAVE_OS_H@ HAVE_PIPE = @HAVE_PIPE@ HAVE_PIPE2 = @HAVE_PIPE2@ HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@ HAVE_PREAD = @HAVE_PREAD@ HAVE_PTSNAME = @HAVE_PTSNAME@ HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ HAVE_PWRITE = @HAVE_PWRITE@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_READDIR = @HAVE_READDIR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ HAVE_REALPATH = @HAVE_REALPATH@ HAVE_REWINDDIR = @HAVE_REWINDDIR@ HAVE_RPMATCH = @HAVE_RPMATCH@ HAVE_SCANDIR = @HAVE_SCANDIR@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@ HAVE_SLEEP = @HAVE_SLEEP@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRPTIME = @HAVE_STRPTIME@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ HAVE_TIMEGM = @HAVE_TIMEGM@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ HAVE_USLEEP = @HAVE_USLEEP@ HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE__BOOL = @HAVE__BOOL@ HAVE__EXIT = @HAVE__EXIT@ HELP2MAN = @HELP2MAN@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBRARY_NAMESPACE = @LIBRARY_NAMESPACE@ LIBRARY_VERSION = @LIBRARY_VERSION@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@ NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ NEXT_DIRENT_H = @NEXT_DIRENT_H@ NEXT_GETOPT_H = @NEXT_GETOPT_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PRAGMA_COLUMNS = @PRAGMA_COLUMNS@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ RANLIB = @RANLIB@ REPLACE_CALLOC = @REPLACE_CALLOC@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ REPLACE_CHOWN = @REPLACE_CHOWN@ REPLACE_CLOSE = @REPLACE_CLOSE@ REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@ REPLACE_DIRFD = @REPLACE_DIRFD@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@ REPLACE_FSTAT = @REPLACE_FSTAT@ REPLACE_FSTATAT = @REPLACE_FSTATAT@ REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_LSTAT = @REPLACE_LSTAT@ REPLACE_MALLOC = @REPLACE_MALLOC@ REPLACE_MBTOWC = @REPLACE_MBTOWC@ REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKDIR = @REPLACE_MKDIR@ REPLACE_MKFIFO = @REPLACE_MKFIFO@ REPLACE_MKNOD = @REPLACE_MKNOD@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OPENDIR = @REPLACE_OPENDIR@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_PWRITE = @REPLACE_PWRITE@ REPLACE_READ = @REPLACE_READ@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_REALLOC = @REPLACE_REALLOC@ REPLACE_REALPATH = @REPLACE_REALPATH@ REPLACE_RMDIR = @REPLACE_RMDIR@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_STAT = @REPLACE_STAT@ REPLACE_STPNCPY = @REPLACE_STPNCPY@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRERROR_R = @REPLACE_STRERROR_R@ REPLACE_STRNCAT = @REPLACE_STRNCAT@ REPLACE_STRNDUP = @REPLACE_STRNDUP@ REPLACE_STRNLEN = @REPLACE_STRNLEN@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ REPLACE_UNLINK = @REPLACE_UNLINK@ REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ REPLACE_UNSETENV = @REPLACE_UNSETENV@ REPLACE_USLEEP = @REPLACE_USLEEP@ REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@ REPLACE_WCTOMB = @REPLACE_WCTOMB@ REPLACE_WRITE = @REPLACE_WRITE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STRIP = @STRIP@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TAR = @TAR@ TEXI2HTML = @TEXI2HTML@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ VALGRIND = @VALGRIND@ VERSION = @VERSION@ YACC = @YACC@ YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bash_completiondir = @bash_completiondir@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ gltests_WITNESS = @gltests_WITNESS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ source_highlightdatadir = @source_highlightdatadir@ source_highlightdocdir = @source_highlightdocdir@ source_highlightlibdocdir = @source_highlightlibdocdir@ source_highlightlibexampledir = @source_highlightlibexampledir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ DIST_SUBDIRS = $(SUBDIRS) EXTRA_DIST = ax_boost_base.m4 ax_boost_regex.m4 all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu m4/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu m4/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ ctags ctags-recursive distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: source-highlight-3.1.6/m4/lt~obsolete.m40000644000175000017500000001375611672675564015102 00000000000000# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004. # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 5 lt~obsolete.m4 # These exist entirely to fool aclocal when bootstrapping libtool. # # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) # which have later been changed to m4_define as they aren't part of the # exported API, or moved to Autoconf or Automake where they belong. # # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us # using a macro with the same name in our local m4/libtool.m4 it'll # pull the old libtool.m4 in (it doesn't see our shiny new m4_define # and doesn't know about Autoconf macros at all.) # # So we provide this file, which has a silly filename so it's always # included after everything else. This provides aclocal with the # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything # because those macros already exist, or will be overwritten later. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. # # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. # Yes, that means every name once taken will need to remain here until # we give up compatibility with versions before 1.7, at which point # we need to keep only those names which we still refer to. # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) source-highlight-3.1.6/m4/Makefile.am0000644000175000017500000000106411672675564014307 00000000000000# Copyright (C) 1999-2009 Lorenzo Bettini # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. DIST_SUBDIRS = $(SUBDIRS) EXTRA_DIST = ax_boost_base.m4 ax_boost_regex.m4 source-highlight-3.1.6/AUTHORS0000644000175000017500000000102411672675560012773 00000000000000Authors of source-highlight. See also the files THANKS and ChangeLog. Lorenzo Bettini designed and implemented source-highlight; source-highlight is based on the merging of java2html and cpp2html, also by Lorenzo Bettini. Alain Barbet wrote the scanner for Perl and Php3. Martin Gebert wrote the scanner for Prolog and Python. John Millaway wrote the scanner for Flex and ChangeLog. Noritsugu Nakamura wrote the scanner for Ruby Jari Korva added CSS output to java2html, and this feature is used in source-highlight as well.source-highlight-3.1.6/tests/0000775000175000017500000000000011676051674013150 500000000000000source-highlight-3.1.6/tests/test.opa0000644000175000017500000000105311672675566014555 00000000000000// single line comment /* /* multi line comment */ */ ident `ident` `ident+[['` function() `FuNcTiOn@`(1,2) //int/float literals 1 1. 2.0 3. 5.6e-5 0x12 0b0111001 0o1234567 -5.6 //directives @opensums @private @publish_async //strings literals "yeay" "with an expr: {"yeay"}" "with an expr: {String.lowercase("yeay")}" // ids
// bypass `+` = %% BslPervasives.int_add %% // bindings x = 1 `poi` = 1 // type binding type Queue.t = ... // bindings in modules Queue = {{ pop() = ... empty = ... }} // bindings in records {~a ~b c=2} source-highlight-3.1.6/tests/wrong_namedgroups.err0000644000175000017500000000023511672675567017351 00000000000000wrong_namedgroups.lang:4: number of marked subexpressions does not match number of elements wrong_namedgroups.lang:4: Caused by: Invalid regular expression. source-highlight-3.1.6/tests/test.lua0000644000175000017500000000664211672675566014570 00000000000000--[=[ first --[[ second ]=] still second ]] first ]=] outside --[[ long comment XXXXXXXXXXXXX [[ long comment [[ long comment [[ long comment write to [[ long comment xxxxxxxxxxxxxx ]] xxxxxxxxxxxxxx ]] xxxxxxxxxxxxxx visit http://www.gnu.org ]] XXXXXXXX ]] XXXXX ]] T = [[ long string comment [[ long comment [[ long comment [[ long comment [[ long comment xxxxxxxxxxxxxx ]] xxxxxxxxxxxxxx ]] xxxxxxxxxxxxxx ]] XXXXXXXX ]] XXXXX ]] -- life.lua -- original by Dave Bollinger posted to lua-l -- modified to use ANSI terminal escape sequences -- modified to use for instead of while. write to visit http://www.gnu.org local write=io.write -- short comments C = "short string" D = 'another short string' --[[ exemple of long comments sdf dfsgsdf g [[ sdf sdf sd f ]] sd fgsd fgs dfg sdf gsd fgs dfg sdfgsdfgsdfg ]] longstring = [[ sdaf sdf sdf d sfg dfg sdf [[ sdfsdf ]] gs dfg sdf s dfgs dfg sdf gsdf gs dfgsdfgsdf ]] ALIVE="¥" DEAD="þ" ALIVE="O" DEAD="-" function delay() -- NOTE: SYSTEM-DEPENDENT, adjust as necessary for i=1,10000 do end -- local i=os.clock()+1 while(os.clock() 0 do local xm1,x,xp1,xi=self.w-1,self.w,1,self.w while xi > 0 do local sum = self[ym1][xm1] + self[ym1][x] + self[ym1][xp1] + self[y][xm1] + self[y][xp1] + self[yp1][xm1] + self[yp1][x] + self[yp1][xp1] next[y][x] = ((sum==2) and self[y][x]) or ((sum==3) and 1) or 0 xm1,x,xp1,xi = x,xp1,xp1+1,xi-1 end ym1,y,yp1,yi = y,yp1,yp1+1,yi-1 end end -- output the array to screen function _CELLS:draw() local out="" -- accumulate to reduce flicker for y=1,self.h do for x=1,self.w do out=out..(((self[y][x]>0) and ALIVE) or DEAD) end out=out.."\n" end write(out) end -- constructor function CELLS(w,h) local c = ARRAY2D(w,h) c.spawn = _CELLS.spawn c.evolve = _CELLS.evolve c.draw = _CELLS.draw return c end -- -- shapes suitable for use with spawn() above -- HEART = { 1,0,1,1,0,1,1,1,1; w=3,h=3 } GLIDER = { 0,0,1,1,0,1,0,1,1; w=3,h=3 } EXPLODE = { 0,1,0,1,1,1,1,0,1,0,1,0; w=3,h=4 } FISH = { 0,1,1,1,1,1,0,0,0,1,0,0,0,0,1,1,0,0,1,0; w=5,h=4 } BUTTERFLY = { 1,0,0,0,1,0,1,1,1,0,1,0,0,0,1,1,0,1,0,1,1,0,0,0,1; w=5,h=5 } -- the main routine function LIFE(w,h) -- create two arrays local thisgen = CELLS(w,h) local nextgen = CELLS(w,h) -- create some life -- about 1000 generations of fun, then a glider steady-state thisgen:spawn(GLIDER,5,4) thisgen:spawn(EXPLODE,25,10) thisgen:spawn(FISH,4,12) -- run until break local gen=1 write("\027[2J") -- ANSI clear screen while 1 do thisgen:evolve(nextgen) thisgen,nextgen = nextgen,thisgen write("\027[H") -- ANSI home cursor thisgen:draw() write("Life - generation ",gen,"\n") gen=gen+1 if gen>2000 then break end --delay() -- no delay end end LIFE(40,20) source-highlight-3.1.6/tests/test.ml0000644000175000017500000000165111672675566014412 00000000000000open Graphics open Types (* #load "graphics.cma" *) (* #load "fixed.cmo" *) let _ = open_graph " 1024x768" let _ = set_color black let plot_car = let size_y = size_y () in fun ({x=x; y=y},_,_) -> Graphics.plot (Fixed.to_coord x) (size_y - Fixed.to_coord y) let plot freq cars = ignore (List.fold_left (fun counter car -> if counter <= 0 then (plot_car car; freq) else pred counter) freq cars) let list_iteri f l = ignore (List.fold_left (fun i elt -> f i elt; i+1) 0 l) let array_for_all f a = let length = Array.length a in let rec loop i = if i = length then true else f a.(i) && loop (i+1) in loop 0 let rec dedoublonne = function |a::b::q -> if a = b then dedoublonne (b::q) else a :: dedoublonne (b::q) |[a] -> [a] |[] -> [] let merge_songs db = function | [] | [_] -> () | id :: id's -> let mysql_ids = List.map ml642int id's in () source-highlight-3.1.6/tests/test.h.docbook0000644000175000017500000001306311672675566015650 00000000000000
listing in docbook 01: /** 02: ** Copyright (C) 1999-2007 Lorenzo Bettini 03: ** 04: http://www.lorenzobettini.it 05: 06: r2 = r2 XOR (1<<10); 07: cout << "hello world" << endl; 08: ** 09: */ 10: 11: // this file also contains the definition of mysum as a #define 12: 13: // textgenerator.h : Text Generator class && 14: 15: #ifndef _TEXTGEN_H 16: #define _TEXTGEN_H 17: 18: #define foo(x) (x + 1) 19: 20: #define mysum myfunbody 21: 22: #include <iostream.h> // for cerr 23: 24: #include "genfun.h" /* for generating functions */ 25: 26: class TextGenerator { 27: public : 28: virtual void generate( const char *s ) const { (*sout) << s ; } 29: virtual void generate( const char *s, int start, int end ) const 30: { 31: for ( int i = start ; i <= end ; ++i ) 32: (*sout) << s[i] ; 33: return a<p->b ? a : 3; 34: } 35: virtual void generateln( const char *s ) const 36: { 37: generate( s ) ; 38: (*sout) << endl ; 39: } 40: virtual void generateEntire( const char *s ) const 41: { 42: startTextGeneration() ; 43: generate(s) ; 44: endTextGeneration() ; 45: } 46: virtual void startTextGeneration() const {} 47: virtual void endTextGeneration() const {} 48: virtual void beginText( const char *s ) const 49: { 50: startTextGeneration() ; 51: if ( s ) 52: generate( s ) ; 53: } 54: virtual void endText( const char *s ) const 55: { 56: if ( s ) 57: generate( s ) ; 58: endTextGeneration() ; 59: } 60: } ; 61: 62: // Decorator 63: class TextDecorator : public TextGenerator { 64: protected : 65: TextGenerator *decorated ; 66: 67: public : 68: TextDecorator( TextGenerator *t ) : decorated( t ) {} 69: 70: virtual void startTextGeneration() const 71: { 72: startDecorate() ; 73: if ( decorated ) 74: decorated->startTextGeneration() ; 75: } 76: virtual void endTextGeneration() const 77: { 78: if ( decorated ) 79: decorated->endTextGeneration() ; 80: endDecorate() ; 81: mysum; 82: } 83: 84: // pure virtual functions 85: virtual void startDecorate() const = 0 ; 86: virtual void endDecorate() const = 0 ; 87: } ; 88: 89: #endif // _TEXTGEN_H 90:
source-highlight-3.1.6/tests/test.lisp.html0000644000175000017500000000714111672675566015714 00000000000000
;;;; Test file for Lisp
;;;; A simple test file

(defpackage :foobar (:use :common-lisp-user :common-lisp))
  
(in-package :foobar)
(export '(new-obj mapobj parent call-if-exists ?call
	  call super super-if-exists ?super slot-val
	  slot-obj mset meth meth-func func-meth
	  this meth-owner meth-name
	  set-original-slot *foo-version*
	  *print-foo-objects-verbosely*))

(defconstant *foobar-version* 3 "Foobar's Version Number")

(defparameter *print-foobar-objects-verbosely* nil)

(defmacro definline (name &rest stuff)
  "Defines a function and declares it to be inlined"  ;; convenient, no?
  `(progn (declaim (inline ,name))
	  (defun ,name ,@stuff)))

(defstruct (foobar-object (:print-object print-foobar-object)) slots parent)

  (defun mapobj (func obj &optional (deeply nil))
    "Maps FUNC over all of the slots in OBJ.  FUNC must take THREE
arguments: (1) the object defining the slot, (2) the slot name.
That is, only one slot
is mapped for a given slot name.  nil is returned."
    (simple-error-check obj

;;; OTHER STUFF INSIDE A METHOD
;;; @  macro
;;;     Forms: @var               Expands to (slot-val 'var this)
;;;            @(meth ... )       Expands to (call 'meth this ... )
;;; @? macro
;;;     Form:  @?(meth ... )      Expands to (?call 'meth this ... )
;;; #@ macro
;;;     Form:  #@meth             Expands to (meth-func 'meth this)

source-highlight-3.1.6/tests/test.url0000644000175000017500000000032111672675567014576 00000000000000_______ foo@bar.it _____ another_address.foo@bar_foo.it _________ Utility Functions fake.url.it http://bar.bar.com/~mynick/index.htm http://www_foo.bar.it Not an email involed@email source-highlight-3.1.6/tests/test_regexrange1.html0000644000175000017500000001202711672675567017236 00000000000000
00032: public class Hello {
00033:     int foo = 1998 ;
00034:     int hex_foo = 0xCAFEBABE;
00035:     boolean b = false;
00036:     Integer i = null ;
00037:     char c = '\'', d = 'n', e = '\\' ;
00038:     String xml = "<tag attr=\"value\">&auml;</tag>", foo2 = "\\" ;
00039: 
00040:     /* mymethod */
00041:     public void mymethod(int i) {
00042:         // just a foo method
00043:     }
00044:     /* mymethod */
00045:    
00046:     /* main */
00047:     public static void main( String args[] ) {
00048:         // just some greetings ;-)  /*
00049:         System.out.println( "Hello from java2html :-)" ) ;
00050:         System.out.println( "\tby Lorenzo Bettini" ) ;
00051:         System.out.println( "\thttp://www.lorenzobettini.it" ) ;
00052:         if (argc > 0)
00053:             String param = argc[0];
00054:         //System.out.println( "bye bye... :-D" ) ; // see you soon
00055:     }
00056:     /* main */
00057: }
source-highlight-3.1.6/tests/wrong_already_defined_css.css0000644000175000017500000000024711672675567020777 00000000000000body { background-color: white; } .keyword { color: blue; font-weight: bold; } .type, .classname { color: darkgreen; } .keyword { color: blue; font-weight: bold; } source-highlight-3.1.6/tests/test.fortran0000644000175000017500000000103511672675566015451 00000000000000doc => parseFile("output.xml", iostat=i) if (i/=0) then print*, "Could not open XML file" ! call goAndDoSomethingElseInstead() print*, "A string with \"" escaped chars" endif c = 1 double precision x x = 1.234e5 ! single x = 1.234d5 ! double x = 1.234q5 ! quad x = b'1001010' ! binary x = o'1271530' ! octal x = z'235A7F0' ! hex (no idea why it's z and not x) ! 15 significant digits and range of (1e-307, 1e307) integer, parameter :: wp = selected_real_kind(15, 307) real(wp) :: x = 1.234e5_wp ! working precision source-highlight-3.1.6/tests/test_string_stop.lang0000644000175000017500000000072611672675567017361 00000000000000keyword = "if|class" type = 'int' comment delim "/*" "*/" # thus this won't catch "/* */ /" as a regexp, # since comment elem definition comes first regexp = '/.*/.*/' # this won't match if ( ) as a function, # since keyword elem definition comes first function = '([[:alpha:]]|_)[[:word:]]*[[:blank:]]*\(*[[:blank:]]*\)' # the following order is conceptually wrong, # since "//" won't be highlighted as a comment, but as two symbols symbol = "/" comment start "//"source-highlight-3.1.6/tests/test.pas.html0000644000175000017500000000225211672675566015526 00000000000000
{
 this is just a test for Pascal
 { I'm afraid I don't remember much of Pascal :-)
  so I'll use simple BEGIN END...
  }
 }
Begin
   (* simple hello world! *)
   WRITELN "Hello World";
End

(* Probably it is not even correct :-) *)

(* the IF and VAR inside MYIFVAR must not be highlighted as keyword *)
IF MYIFVAR THEN
   WRITELN "Hello World";
END
source-highlight-3.1.6/tests/header.html0000644000175000017500000000160711672675565015217 00000000000000 Header and footer test This file has been formatted with
GNU Source-highlight, http://www.gnu.org/software/src-highlite
by Lorenzo Bettini <http://www.lorenzobettini.it>
source-highlight-3.1.6/tests/test.vbs.html0000644000175000017500000001564711672675567015552 00000000000000
' The script can be called via

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>

if AQresponse <> "" then
  response.write(AQresponse)
else
  response.write("ERROR")
end if

%>

' Actual script follows. This could be placed in a separate file, 
' such as the smslib.asp file described above

<%
Dim method, secured, error_on_length, username, password, AQresponse
  ' User Editable Variables
  secured = 0                       ' Set to either 1 for SSL connection 
                                    ' or 0 for normal connection.
  error_on_length = 1               ' Whether to give and error on messages over 160 chracters. 
                                    ' 1 for true, 0 for false.
  username = "testusername"         ' Your aql username, can either be set here 
                                    ' or done on a per call basis from the function.
  password = "testpassword"         ' Your aql password, can either be set here
                                    ' or done on a per call basis from the function.

Dim objXMLHTTP, xml
  message = replace(message," ","+")
  Set xml = Server.CreateObject("Microsoft.XMLHTTP") 
  if secured = null or secured = 0 then
    xml.Open "POST", "http://gw1.aql.com/sms/sms_gw.php", False
    xml.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
    xml.Send "username=" & username & "&password=" & password & "&destination=" & destination & 
             "&message=" & message & "&originator=" & originator & "&flash=" & flash
  else if secured = 1 then
    xml.Open "POST", "https://gw1.aql.com/sms/sms_gw.php", False
    xml.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
    xml.Send "username=" & username & "&password=" & password & "&destination=" & destination & 
             "&message=" & message & "&originator=" & originator & "&flash=" & flash
  else
    call senderror(7)
    end if
   end if

AQresponse = xml.responseText
Set xml = nothing

End Function 


%>
source-highlight-3.1.6/tests/namedgroups.lang0000644000175000017500000000016311672675565016264 00000000000000(keyword,normal,type,symbol) = `(Hello|Ciao)([[:blank:]]*)([mM]ondo|[wW]orld)([[:punct:]]*)` comment = "highlight" source-highlight-3.1.6/tests/wrong_already_defined.err0000644000175000017500000000006411672675567020124 00000000000000wrong_already_defined.style:3: already defined date source-highlight-3.1.6/tests/syslog.style.html0000644000175000017500000000434511672675566016451 00000000000000
date, keyword yellow b ;
time "#9999FF" ;
ip "lightblue" b ;

type cyan b ;
string "brown" b ;
comment teal ;
number red ;
preproc cyan ;
symbol green ;
function "#CC66CC" b ;
cbracket green b ;
twonumbers green b ;
port green b ;
webmethod teal ;

// foo option
foo red b ; // foo entry

source-highlight-3.1.6/tests/test_regexrange4.html0000644000175000017500000000531011672675567017236 00000000000000
00041:     public void mymethod(int i) {
00042:         // just a foo method
00043:     }
00047:     public static void main( String args[] ) {
00048:         // just some greetings ;-)  /*
00049:         System.out.println( "Hello from java2html :-)" ) ;
00050:         System.out.println( "\tby Lorenzo Bettini" ) ;
00051:         System.out.println( "\thttp://www.lorenzobettini.it" ) ;
00052:         if (argc > 0)
00053:             String param = argc[0];
00054:         //System.out.println( "bye bye... :-D" ) ; // see you soon
00055:     }
source-highlight-3.1.6/tests/test.y.html0000644000175000017500000003315411672675567015221 00000000000000
%{
/*
 * Copyright (C) 1999, 2000, 2001 Lorenzo Bettini <http://www.lorenzobettini.it>
 *
 * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
 *
 */

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <iostream>

#include "my_sstream.h"

#include "tags.h"
#include "colors.h"
#include "keys.h"
#include "messages.h"
#include "parsetags.h"
#include "fileutil.h"

using std::cerr;

static int yyparse() ;
static void yyerror( char *s ) ;

int line = 1 ;

static void add_tag(Tags *tags, Tag *t);

extern int opsc_lex() ;
extern FILE *opsc_in ;

%}

%union {
  int tok ; /* command */
  char * string ; /* string : id, ... */
  int flag ;
  Tag *tag ;
  Tags *tags ;
} ;

%token <flag> BOLD ITALICS UNDERLINE
%token <string> KEY COLOR

%type <tag> option
%type <tags> options
%type <flag> values value

%%

globaltags : options { setTags( $1 ) ; }
;

options : options option { add_tag( $1, $2 ) ; }
        | option { $$ = new Tags() ; $$->AddTag( $1 ) ;  }
        ;

option : KEY COLOR
             {
                 printMessage( $1 ) ;
                 printMessage( $2 ) ;
             }
         values ';'
             {
	       $$ = new Tag( $1, $2 ) ;
               $$->SetFlags($4) ;
	     }
       ;

values : values ',' value { $$ = $1 | $3 ; }
       | value
       ;

value : { $$ = 0 ; printMessage( " (no options) " ) ; }
      | BOLD { printMessage( " - bold" ) ; $$ = ISBOLD ; }
      | ITALICS { printMessage( " - italics" ) ; $$ = ISITALIC ; }
      | UNDERLINE { printMessage( " - underline" ) ; $$ = ISUNDERLINE ; }
      ;

%%

char *current_file = 0;

void
parseTags(const string &path, const string &name)
{
  // opens the file for yylex
  opsc_in = open_data_file_stream(path, name);

  printMessage_noln( "Parsing ", cerr ) ;
  printMessage_noln (name, cerr);
  printMessage( " file ...", cerr ) ;
  yyparse() ;
  printMessage( "Parsing done!", cerr ) ;
}

void
yyerror( char *s )
{
  ostringstream str ;
  str << current_file << ":" << line << ": " << s << ", in option declaration";
  printError( str.str().c_str(), cerr ) ;
  exit(EXIT_FAILURE);
}

void
add_tag(Tags *tags, Tag *t)
{
  if (! tags->AddTag(t))
  {
    yyerror("already defined");
  }
}
source-highlight-3.1.6/tests/test.vala.html0000644000175000017500000000324111672675567015666 00000000000000
public interface TestIface : Object
{
	[CCode (cname = "test_preproc")]
	public virtual test_method ()
	{
		stdout.printf ("""multiline \literal string""");
	}
}

public abstract class TestClass : Object, TestIface
{
	#if 0
	public signal void test_signal (size_t size);
	#endif
}
source-highlight-3.1.6/tests/test.clipper.html0000644000175000017500000000426511672675566016407 00000000000000
Function MAIN()
LOCAL number
INPUT "Key in a number: " TO number
IF number % 2 = 0
   ? "You keyed in an even number"
   ? "I can prove it:"
   ? "the result of ",number," % 2 = 0 is ", number % 2 = 0
ELSE
   ? "You keyed in an odd number"
   ? "I can prove it:"
   ? "the result of ",number," % 2 = 0 is ", number % 2 = 0
ENDIF
RETURN

/* Load the table.dbf and table.cdx, on unix,
           you should ensure that file extensions are on
           lowercase.*/
        USE table INDEX table VIA "DBFCDX"
        REINDEX
source-highlight-3.1.6/tests/test.py.html0000644000175000017500000000777411672675566015411 00000000000000
#! /usr/bin/python

import posix
from string import splitfields

def userinfo(filename):
  """
  This function returns the list of users
  and a table containing users and their passwords
  """
  users, table = [], {}
  file = open(filename, 'r')
  for line in file.readlines():
    [name, password] = splitfields(line, ':')[:2]
    users.append(name)
    table[name] = password
  return users, table

def main():
  for filename in ('/etc/passwd', 'etc/passwd.bak'):
    try:
      users, table = userinfo(filename)
      print table.keys()[3:7], table['postgres']
      posix.system('ls -al ' + filename)
    except:
      print 'File "' + filename + '" not found!'

main()

q.execute('''
    select * from
        foo,bar,baz
    where
        foo.blah=bar.blah
        and baz.spam="eggs"
    ''')
source-highlight-3.1.6/tests/test.chlog0000644000175000017500000000240011672675566015067 000000000000002002-08-08 Lorenzo Bettini * src/Makefile.am (source_highlight_SOURCES): correctly include changelog_scanner.ll * this is a comment without a file name 2002-08-02 John Millaway * src/flex_scanner.ll: Added scanner for flex * src/changelog_scanner.ll: Added scanner for ChangeLog * src/Makefile.am: do not use .stamp files anymore, use flex's prefix 2002-07-30 Lorenzo Bettini * acinclude.m4 (LF_PROG_TXTC): fixed a little bug that shows up only now with the new version of autoconf * acconfig.h: removed, no longer needed with autoconf * configure.in: use the new AC_LIBOBJ * doc/Makefile.am: removed an extra EXTRA_DIST 2002-07-21 Lorenzo Bettini * src/python_scanner.ll: fixed a problem with string comments * src/lib/genfun.cc (processFile): correctly set deleteOStream * src/lib/startapp.cc (start): default to stdout also when -i option is used. (start): check whether "STDOUT" was specified as output * src/lib/genfun.cc (print_xtop): always generate the correct header for XHTML (processFile): call LineNumberDecorator::reset so that if many files are processed the current line number is correctly reset 2002-07-10 Lorenzo Bettini source-highlight-3.1.6/tests/test2.sh0000644000175000017500000000070211672675567014473 00000000000000#!/bin/sh #.*$ - comment echo ${variable##*i} # prints "s bob" #.*$ - comment echo ${variable#*n} # prints "ame is bob" echo ${#variable} # prints 17 echo ${#array[*]} # prints 4 echo $# + 1 # prints 0 # Incidentally, all of the $ variables should be variable markup # (i.e. $#, $@, $?, $!, $*, $-, $$, $[0-9] and ${[0-9][0-9]*}) echo $# echo $@ $? $! $* $- $$ $8 ${12} echo "comment" ### this is a comment source-highlight-3.1.6/tests/test_xhtml.html0000644000175000017500000002251511672675567016165 00000000000000
/*
  This is a classical Hello program
  to test source-highlight with Java programs.
  
  to have an html translation type

	source-highlight -s java -f html --input Hello.java --output Hello.html
	source-highlight -s java -f html < Hello.java > Hello.html

  or type source-highlight --help for the list of options

  written by
  Lorenzo Bettini
  http://www.lorenzobettini.it
  http://www.gnu.org/software/src-highlite
*/

package hello;

import java.io.* ;

/**
 * <p>
 * A simple Hello World class, used to demonstrate some
 * features of Java source highlighting.
 * </p>
 * TODO: nothing, just to show an highlighted TODO or FIXME
 *
 * @author Lorenzo Bettini
 * @version 2.0
 */ /// class
public class Hello {
    int foo = 1998 ;
    int hex_foo = 0xCAFEBABE;
    boolean b = false;
    Integer i = null ;
    char c = '\'', d = 'n', e = '\\' ;
    String xml = "<tag attr=\"value\">&auml;</tag>", foo2 = "\\" ;

    /* mymethod */
    public void mymethod(int i) {
	// just a foo method
    }
    /* mymethod */
   
    /* main */
    public static void main( String args[] ) {
	// just some greetings ;-)  /*
	System.out.println( "Hello from java2html :-)" ) ;
	System.out.println( "\tby Lorenzo Bettini" ) ;
	System.out.println( "\thttp://www.lorenzobettini.it" ) ;
        if (argc > 0)
            String param = argc[0];
        //System.out.println( "bye bye... :-D" ) ; // see you soon
    }
    /* main */
}
/// class

// end of file test.java
source-highlight-3.1.6/tests/test.wodefault.html0000644000175000017500000000042011672675567016731 00000000000000
this is a keyword and
test some other key1, key2 and key3 and see what's highlighted
source-highlight-3.1.6/tests/test.opa.html0000644000175000017500000000630311672675566015523 00000000000000
// single line comment
/*
/* multi line comment */
*/

ident `ident` `ident+[['`
function() `FuNcTiOn@`(1,2)

//int/float literals
1 1. 2.0 3. 5.6e-5 0x12 0b0111001 0o1234567 -5.6

//directives
@opensums @private @publish_async

//strings literals
"yeay" "with an expr: {"yeay"}" "with an expr: {String.lowercase("yeay")}"

// ids
<div id=#div/>

// bypass
`+` = %% BslPervasives.int_add %%

// bindings
x = 1
`poi` = 1
// type binding
type Queue.t = ...
// bindings in modules
Queue = {{
  pop() = ...
  empty = ...
}}
// bindings in records
{~a ~b c=2}
source-highlight-3.1.6/tests/test.sl.html0000644000175000017500000006104511672675566015366 00000000000000 S-LANG test
#!/usr/bin/env slsh

require ("curl");

private variable My_Language = "English";

private variable Supported_Translations = 
  ["zh_en", "zt_en", "en_zh", "en_zt", "en_nl", "en_fr", "en_de", "en_el",
   "en_it", "en_ja", "en_ko", "en_pt", "en_ru", "en_es", "nl_en", "nl_fr",
   "fr_en", "fr_de", "fr_el", "fr_it", "fr_pt", "fr_nl", "fr_es", "de_en",
   "de_fr", "el_en", "el_fr", "it_en", "it_fr", "ja_en", "ko_en", "pt_en",
   "pt_fr", "ru_en", "es_en", "es_fr"];

private variable Languages = Assoc_Type[String_Type];
private define add_language (lang, desc)
{
   Languages[strlow(lang)] = strlow (desc);
}
add_language ("zh", "Chinese-simple");
add_language ("zt", "Chinese-traditional");
add_language ("en", "English");
add_language ("nl", "Dutch");
add_language ("fr", "French");
add_language ("de", "German");
add_language ("el", "Greek");
add_language ("it", "Italian");
add_language ("ja", "Japanese");
add_language ("ko", "Korean");
add_language ("pt", "Portugese");
add_language ("ru", "Russian");
add_language ("es", "Spanish");

private define lookup_language (lang)
{
   lang = strlow (lang);
   if (assoc_key_exists (Languages, lang))
     return lang;
   variable vals = assoc_get_values (Languages);
   variable i = where (vals == lang);
   if (length (i) == 0)
     throw NotImplementedError, "Language $lang is unknown or unsupported"$;

   return assoc_get_keys (Languages)[i[0]];
}

private define lookup_translation (from, to)
{
   variable trans = sprintf ("%s_%s", lookup_language (from), lookup_language(to));
   
   if (any (Supported_Translations == trans))
     return trans;
   
   throw NotImplementedError, "Translating from $from to $to is not supported"$;
}

   
private define make_encode_table ()
{
   variable table = array_map (String_Type, &sprintf, ("%%%02X", [0:255]));
   variable ok = [['A':'Z'], ['a':'z'], ['0':'9'], '.', '-', '*', '_', '/', '~'];
   table[ok] = array_map (String_Type, &char, ok);
   table[' '] = "+";
   return table;
}
private variable Encode_Table = make_encode_table ();

private define encode (text)
{
   variable len = strlen (text);
   variable new_text = String_Type[len];
   variable i;
   _for i (0, len-1, 1)
     new_text[i] =  Encode_Table[text[i]];
   return strjoin (new_text, "");
}

private define parse_output (str)
{
   (str,) = strreplace (str, "\n", "\x01", strbytelen (str));
   % Look for TEXT in
   % <td bgcolor=white class=s><div style=padding:10px;>TEXT</div>
   variable start_re = "<td bgcolor=white class=s><div style=padding:10px;>";
   variable end_re = "</div>";
   variable re = strcat (start_re, "\([^<]+\)"R, end_re);
   
   variable n = string_match (str, re, 1);
   if (n == 0)
     return "";
   variable pos, match_len;
   (pos, match_len) = string_match_nth (1);
   str = substrbytes (str, pos+1, match_len);
   (str,) = strreplace (str, "\x01", "\n", strbytelen (str));
   return str;
}

private define write_callback (vp, data)
{
   @vp = strcat (@vp, data);
   return 0;
}

define babelfish (from, to, text)
{
   variable c = curl_new ("http://babelfish.altavista.com/babelfish/tr?il=en");
   variable postdata = 
     strcat ("doit=done&urltext=", text, 
	     "&lp=", lookup_translation (from, to),
	     "&Submit=Translate", "&enc=utf8");

   curl_setopt (c, CURLOPT_POSTFIELDS, postdata);
   curl_setopt (c, CURLOPT_FOLLOWLOCATION);
   curl_setopt (c, CURLOPT_HTTPHEADER, 
		["User-Agent: S-Lang cURL Module",
		 "Content-Type: application/x-www-form-urlencoded",
		 "Accept-Charset: ISO-8859-1,utf-8"
		 ]);
   text = "";
   curl_setopt (c, CURLOPT_WRITEFUNCTION, &write_callback, &text);
   curl_perform (c);
   text = parse_output (text);
   return text;
}

private define usage ()
{
   () = fprintf (stderr, "Usage: %s [--to lang-out] lang-in [phrase|-]\n", __argv[0]);
   exit (1);
}

define slsh_main ()
{
   variable lang_out = My_Language, lang_in = NULL;
   variable i = 1;
   while (i < __argc)
     {
	variable arg = __argv[i];
	i++;
	if (arg == "--to")
	  {
	     if (i == __argc)
	       usage ();
	     lang_out = __argv[i];
	     i++;
	     continue;
	  }
	lang_in = arg;
	break;
     }
   if (lang_in == NULL)
     usage ();

   variable text = "-";
   if (i == __argc)
     {
	if (isatty (stdin))
	  usage ();
     }
   else text = strjoin (__argv[[i:]], " ");
   
   if (text == "-")
     {
	text = "";
	variable line;
	while (-1 != fgets (&line, stdin))
	  text = strcat (text, encode (line));
     }
   message (babelfish (lang_in, lang_out, text));
}

source-highlight-3.1.6/tests/test.cobol.html0000644000175000017500000000632611672675566016047 00000000000000
      $ SET SOURCEFORMAT "FREE"
IDENTIFICATION DIVISION.
PROGRAM-ID.  ShortestProgram.

PROCEDURE DIVISION.
DisplayPrompt.
    DISPLAY "I did it".
    STOP RUN.
* Uses the ACCEPT and DISPLAY verbs to accept a student record 
* from the user and display some of the fields.  Also shows how
* the ACCEPT may be used to get the system date and time.
WORKING-STORAGE SECTION.
01  Num1                                PIC 9  VALUE ZEROS.
01  Num2                                PIC 9  VALUE ZEROS.
01  Result                              PIC 99 VALUE ZEROS.

PROCEDURE DIVISION.
    DISPLAY "Enter first number  (1 digit) : " WITH NO ADVANCING.
    ACCEPT Num1.
    DISPLAY "Enter second number (1 digit) : " WITH NO ADVANCING.
    ACCEPT Num2.
    MULTIPLY Num1 BY Num2 GIVING Result.
    DISPLAY "Result is = ", Result.
    STOP RUN.

source-highlight-3.1.6/tests/test.conf0000644000175000017500000000355311672675566014732 00000000000000# test file for some configuration files, such as # xorg, qmake.conf and generic conf files (based on properties) # xorg.conf (xorg X Window System server configuration file) # # This file was generated by dexconf, the Debian X Configuration tool, using # values from the debconf database. # Section "Files" EndSection Section "InputDevice" Identifier "Synaptics Touchpad" Driver "synaptics" Option "SendCoreEvents" "true" Option "Device" "/dev/psaux" Option "Protocol" "auto-dev" Option "SHMConfig" "on" Option "HorizEdgeScroll" "0" Option "MinSpeed" "0.5" # touchpad speed when moving slowly Option "MaxSpeed" "2.0" # touchpad speed when moving fast Option "AccelFactor" "0.10" Option "CircularScrolling" "on" Option "EdgeMotionMinSpeed" "0.5" EndSection # # qmake configuration for win32-g++ # # Written for MinGW # MAKEFILE_GENERATOR = MINGW TEMPLATE = app CONFIG += qt warn_on release link_prl copy_dir_files debug_and_release debug_and_release_target precompile_header QMAKE_INCDIR = QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS] QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS] QMAKE_RUN_CC = $(CC) -c $(CFLAGS) $(INCPATH) -o $obj $src QMAKE_RUN_CC_IMP = $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $< # settings for source-highlight datadir = "/home/bettini/usr/local/share/source-highlight" # other conf file [PlaylistColumnsLayout] ColumnNames=Filename,Title,Artist,AlbumArtist,Composer,Year,Album,DiscNumber,Track,BPM,Genre,Comment,Directory,Type,Length,Bitrate,SampleRate,Score,Rating,PlayCount,LastPlayed,Mood,Filesize ColumnOrder=0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22 ColumnWidths=0,184,92,0,0,100,92,0,0,0,0,0,73,0,80,0,0,0,0,0,0,0,0 ColumnsVersion=1 SortAscending=true SortColumn=200 source-highlight-3.1.6/tests/wrong_syntax.lang0000644000175000017500000000004511672675567016503 00000000000000symbol = "ok" wrong "foo" type = "ok"source-highlight-3.1.6/tests/lang.map0000644000175000017500000000002011672675565014505 00000000000000foo = foo.lang source-highlight-3.1.6/tests/test2.htm.html0000644000175000017500000000343311672675567015620 00000000000000 html output formatted in html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>Another test for html formatting</title>
  </head>

  <body>
    <h1>Another test for html formatting</h1>

    foo and foobar

    <hr>
    <address><a href="mailto:bettini@lorelap">Lorenzo Bettini</a></address>
<!-- Created: Sun May 21 15:42:54 CEST 2006 -->
<!-- hhmts start -->
Last modified: Sun May 21 15:43:39 CEST 2006
<!-- hhmts end -->
  </body>
</html>
source-highlight-3.1.6/tests/simple.lang0000644000175000017500000000064511672675565015236 00000000000000keyword = "abstract|assert|break|case|catch|class|const", "continue|default|do|else|extends|false|final", "finally|for|goto|if|implements|instanceof|interface" keyword = "native|new|null|private|protected|public|return", "static|strictfp|super|switch|synchronized|throw", "throws|true|this|transient|try|volatile|while" type = "int|byte|boolean|char|long|float|double|short|void" source-highlight-3.1.6/tests/wrong_backref.lang0000644000175000017500000000015511672675567016554 00000000000000keyword = "my(regular)ex.pre$$ion{*}\\1" # ok since escaped keyword = "my(regular)ex.pre$$ion{*}\1" # error! source-highlight-3.1.6/tests/debug.debug0000644000175000017500000000634011672675565015176 00000000000000c_comment.lang:22 expression: "/\*" formatting "/*" as comment entering state: 43 formatting " This is to demonstrate --debug-lang" as default formatting " " as default url.lang:3 expression: "(?:(?:?))" formatting "http://www.lorenzobettini.it" as url c_comment.lang:22 expression: "\*/" formatting "*/" as comment exiting state, level: 1 java.lang:1 expression: "\<(?:import|package)\>" formatting "package" as preproc formatting " hello" as default symbols.lang:1 expression: "(?:~|!|%|\^|\*|\(|\)|-|\+|=|\[|\]|\\|:|;|,|\.|/|\?|&|<|>|\|)" formatting ";" as symbol java.lang:14 expression: "\<(?:native|new|null|private|protected|public|return|static|strictfp|super|switch|synchronized|throw|throws|true|this|transient|try|volatile|while)\>" formatting "public" as keyword formatting " " as default java.lang:9 expression: "(\<(?:class|interface))([[:blank:]]+)([$[:alnum:]_]+)" formatting "class" as keyword formatting " " as normal formatting "Hello" as classname java.lang:9 expression: "(\<(?:class|interface))([[:blank:]]+)([$[:alnum:]_]+)" formatting "class" as keyword formatting " " as normal formatting "Hello" as classname java.lang:9 expression: "(\<(?:class|interface))([[:blank:]]+)([$[:alnum:]_]+)" formatting "class" as keyword formatting " " as normal formatting "Hello" as classname formatting " " as default java.lang:22 expression: "(?:\{|\})" formatting "{" as cbracket formatting " " as default c_comment.lang:11 expression: "//" formatting "//" as comment entering state: 22 formatting " just some greetings ;-) /*" as default c_comment.lang:11 expression: "\z" formatting "" as comment exiting state, level: 1 formatting " " as default java.lang:18 expression: "\<(?:int|byte|boolean|char|long|float|double|short|void)\>" formatting "int" as type formatting " i " as default symbols.lang:1 expression: "(?:~|!|%|\^|\*|\(|\)|-|\+|=|\[|\]|\\|:|;|,|\.|/|\?|&|<|>|\|)" formatting "=" as symbol formatting " " as default number.lang:1 expression: "(?:\<[+-]?(?:(?:0x[[:xdigit:]]+)|(?:(?:[[:digit:]]*\.)?[[:digit:]]+(?:[eE][+-]?[[:digit:]]+)?))u?(?:(?:int(?:8|16|32|64))|L)?\>)" formatting "10" as number symbols.lang:1 expression: "(?:~|!|%|\^|\*|\(|\)|-|\+|=|\[|\]|\\|:|;|,|\.|/|\?|&|<|>|\|)" formatting ";" as symbol formatting " System" as default symbols.lang:1 expression: "(?:~|!|%|\^|\*|\(|\)|-|\+|=|\[|\]|\\|:|;|,|\.|/|\?|&|<|>|\|)" formatting "." as symbol formatting "out" as default symbols.lang:1 expression: "(?:~|!|%|\^|\*|\(|\)|-|\+|=|\[|\]|\\|:|;|,|\.|/|\?|&|<|>|\|)" formatting "." as symbol function.lang:2 expression: "(?:(?:[[:alpha:]]|_)[[:word:]]*(?=[[:blank:]]*\())" formatting "println" as function symbols.lang:1 expression: "(?:~|!|%|\^|\*|\(|\)|-|\+|=|\[|\]|\\|:|;|,|\.|/|\?|&|<|>|\|)" formatting "(" as symbol c_string.lang:3 expression: "\"" formatting """ as string entering state: 44 formatting "Hello World!" as default c_string.lang:3 expression: "\"" formatting """ as string exiting state, level: 1 symbols.lang:1 expression: "(?:~|!|%|\^|\*|\(|\)|-|\+|=|\[|\]|\\|:|;|,|\.|/|\?|&|<|>|\|)" formatting ")" as symbol symbols.lang:1 expression: "(?:~|!|%|\^|\*|\(|\)|-|\+|=|\[|\]|\\|:|;|,|\.|/|\?|&|<|>|\|)" formatting ";" as symbol java.lang:22 expression: "(?:\{|\})" formatting "}" as cbracket source-highlight-3.1.6/tests/test.vbs0000644000175000017500000000365111672675567014577 00000000000000' The script can be called via <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> if AQresponse <> "" then response.write(AQresponse) else response.write("ERROR") end if %> ' Actual script follows. This could be placed in a separate file, ' such as the smslib.asp file described above <% Dim method, secured, error_on_length, username, password, AQresponse ' User Editable Variables secured = 0 ' Set to either 1 for SSL connection ' or 0 for normal connection. error_on_length = 1 ' Whether to give and error on messages over 160 chracters. ' 1 for true, 0 for false. username = "testusername" ' Your aql username, can either be set here ' or done on a per call basis from the function. password = "testpassword" ' Your aql password, can either be set here ' or done on a per call basis from the function. Dim objXMLHTTP, xml message = replace(message," ","+") Set xml = Server.CreateObject("Microsoft.XMLHTTP") if secured = null or secured = 0 then xml.Open "POST", "http://gw1.aql.com/sms/sms_gw.php", False xml.setRequestHeader "Content-Type", "application/x-www-form-urlencoded" xml.Send "username=" & username & "&password=" & password & "&destination=" & destination & "&message=" & message & "&originator=" & originator & "&flash=" & flash else if secured = 1 then xml.Open "POST", "https://gw1.aql.com/sms/sms_gw.php", False xml.setRequestHeader "Content-Type", "application/x-www-form-urlencoded" xml.Send "username=" & username & "&password=" & password & "&destination=" & destination & "&message=" & message & "&originator=" & originator & "&flash=" & flash else call senderror(7) end if end if AQresponse = xml.responseText Set xml = nothing End Function %> source-highlight-3.1.6/tests/test_regexrange2.html0000644000175000017500000000437511672675567017246 00000000000000
00047:     public static void main( String args[] ) {
00048:         // just some greetings ;-)  /*
00049:         System.out.println( "Hello from java2html :-)" ) ;
00050:         System.out.println( "\tby Lorenzo Bettini" ) ;
00051:         System.out.println( "\thttp://www.lorenzobettini.it" ) ;
00052:         if (argc > 0)
00053:             String param = argc[0];
00054:         //System.out.println( "bye bye... :-D" ) ; // see you soon
00055:     }
source-highlight-3.1.6/tests/test.tml0000664000175000017500000000765211672675566014607 00000000000000%META:DATUM{key="value" anotherkey="anothervalue"}% * Set MACRO = value value value morevalue morevalue * Set ONELINER = Value %value% * Set ANOTHERMACRO = value * Set YETANOTHERMACRO = value
underlined text strike-out text strike-out text strike-out text This is NotAutoLinked, so there
markup!
So, *none* of _this_ is =styled=, but %MACROS{still="work" as="normal"}% So, *none* of _this_ is =styled=, and %MACROS{are="disabled"}% Only the outer verbatim does anything; inner are ignored (displayed as normal text) DirectedGraphPlugin 1st paragraph 2nd paragraph *Bold text* _Underlined text_ __Bold italic text__ =monospaced text= ==bold monospaced text== --- * Bullet * Con tinued * Bullet 1. Number 1. Con tinued 1. Number A. Alpha A. Con tinued A. Alpha a. alpha a. Con tinued a. alpha I. Roman I. Con tinued I. Roman i. roman i. Con tinued i. roman $ Term: Definition | *L* | *C* | *R* | | A2 | B2 | C2 | | A3 | B3 | C3 | | multi span ||| | A5-7 | 5 | 5 | |^| six | six | |^| seven | seven | | split\ | over\ | 3 lines | | A9 | B9 | C9 | WikiWord Web.WikiWord Web.SubWeb.WikiWord NotAutoLinked !NotAutoLinked ACRONYM Web.ACRONYM Web.SubWeb.ACRONYM ACRONYMNOTAUTOLINKED !ACRONYMNOTAUTOLINKED #MyAnchor [[topic name]] [[TopicName]] [[Web.My topic name]] ![[not a link]] [[TopicName][link text]] http://example.org/autolinked a@b.com [[mailto:a@b.com]\ [Mail]] [[mailto:?subject=\ Hi][Hi]] NotAutoLinked | Not | A | Table | *Not bolded* [[not linked]] %MACROS{still="work" as="normal"}% #!/bin/bash while [ -n "$(ls . ~/ \ ~/pub* /var/www 2>/dev/null \ | fgrep foswiki )" ] ; do clear printf "\nFoswiki rules!\n" sleep 10 clear printf "\nFoswiki still rules!\n" sleep 10 done; exit 0 %MACROS{not="expanded"}% %TOC% ---+ Heading 1 ---+!! Heading 1 not in TOC ---++ Heading 2 ---++!! Heading 2 not in TOC ---+++ Heading 3 ---+++!! Heading 3 not in TOC ---++++ Heading 4 ---++++!! Heading 4 not in TOC ---+++++ Heading 5 ---+++++!! Heading 5 not in TOC ---++++++ Heading 6 ---++++++!! Heading 6 not in TOC %MACRO{ format=" * $token(Argument) $foo [[/path/%to%/$bar][text]] %WITHIN{ format=" * $token(Argument) $foo [[/path/%to%/$bar][text]] %NESTED{ macro=" * $token(Argument) $foo [[/path/%to%/$bar][text]]" }%" }%" }% %INCLUDE{ "%QUERY{ "'%SYSTEMWEB%.FAQWhatIsWikiWiki'/TopicClassification" }%" section="Summary" }% %MACRO{ format=" * $token(Argument) $foo [[/path/%to%/$bar][text]] $percntWITHIN{ format=\" $token(Argument) $foo [[/path/%to%/$bar][text]] $percntNESTED{ format=\" * $token(Argument) $foo [[/path/%to%/$bar][text]] $percntDELAYED{ macro=\"test\" }$percnt\" }$percnt\" }$percnt" }% %SEARCH{ "info.date >= d2n('2009-01-01') AND info.date <= d2n('2009-12-31')" type="query" limit="2" nonoise="on" format=" * [[$topic]]" }% source-highlight-3.1.6/tests/footer.html0000644000175000017500000000010711672675565015257 00000000000000

This is the footer. source-highlight-3.1.6/tests/c_comment.show0000644000175000017500000003345611672675565015756 00000000000000STATE 1 default: normal rule (comment) "///" (exit level: 0, next: 2) STATE 2 default: comment rule (comment) "\z" (exit level: 1, next: 0) rule (url) "(?:(?:?))" (exit level: 0, next: 0) rule (url) "(?:(?:?))" (exit level: 0, next: 0) rule (keyword) "(?:<(?:(?:[sS][tT][yY][lL][eE])|(?:(?:[nN][oO])?[sS][cC][rR][iI][pP][tT])|(?:[xX][mM][pP])|(?:[iI][fF][rR][aA][mM][eE])|(?:[nN][oO][eE][mM][bB][eE][dD])|(?:[nN][oO][fF][rR][aA][mM][eE][sS])))" (exit level: 0, next: 3) STATE 3 default: normal rule (string) "\"" (exit level: 0, next: 4) STATE 4 default: string rule (string) "\"" (exit level: 1, next: 0) rule (string) "\\." (exit level: 0, next: 0) rule (string) "'" (exit level: 0, next: 5) STATE 5 default: string rule (string) "'" (exit level: 1, next: 0) rule (string) "\\." (exit level: 0, next: 0) rule (string) "/(?:[^/])*/" (exit level: 0, next: 0) rule (type normal symbol normal string) "([^="[:blank:]>]+)([[:blank:]]*)(=)([[:blank:]]*)([^="'>]+)" (exit level: 0, next: 0) rule (type normal symbol) "([^="[:blank:]>]+)([[:blank:]]*)(=)" (exit level: 0, next: 0) rule (type) "(?:[[:alnum:]]+)" (exit level: 0, next: 0) rule (keyword) "(?:>)" (exit level: 0, next: 6) STATE 6 default: normal rule (keyword) "(?:)" (exit level: 2, next: 0) rule (normal) "(?:[^<[:blank:]]+)" (exit level: 0, next: 0) rule (keyword) "<(?:(?:[tT][iI][tT][lL][eE])|(?:[tT][eE][xX][tT][aA][rR][eE][aA]))>" (exit level: 0, next: 7) STATE 7 default: normal rule (keyword) "" (exit level: 1, next: 0) rule (preproc) "(?:&(?:[[:alnum:]]+);)" (exit level: 0, next: 0) rule (normal) "(?:[^<[:blank:]]+)" (exit level: 0, next: 0) rule (keyword) "(?:<[pP][lL][aA][iI][nN][tT][eE][xX][tT]>)" (exit level: 0, next: 8) STATE 8 default: normal rule (normal) "(?:.+)" (exit level: 0, next: 0) rule (preproc) "<\?xml" (exit level: 0, next: 9) STATE 9 default: normal rule (preproc) "\?>" (exit level: 1, next: 0) rule (string) "\"" (exit level: 0, next: 10) STATE 10 default: string rule (string) "\"" (exit level: 1, next: 0) rule (string) "\\." (exit level: 0, next: 0) rule (string) "'" (exit level: 0, next: 11) STATE 11 default: string rule (string) "'" (exit level: 1, next: 0) rule (string) "\\." (exit level: 0, next: 0) rule (string) "/(?:[^/])*/" (exit level: 0, next: 0) rule (type normal symbol normal string) "([^="[:blank:]>]+)([[:blank:]]*)(=)([[:blank:]]*)([^="'>]+)" (exit level: 0, next: 0) rule (type normal symbol) "([^="[:blank:]>]+)([[:blank:]]*)(=)" (exit level: 0, next: 0) rule (type) "(?:[[:alnum:]]+)" (exit level: 0, next: 0) rule (preproc) "" (exit level: 1, next: 0) rule (string) "\"" (exit level: 0, next: 13) STATE 13 default: string rule (string) "\"" (exit level: 1, next: 0) rule (string) "\\." (exit level: 0, next: 0) rule (string) "'" (exit level: 0, next: 14) STATE 14 default: string rule (string) "'" (exit level: 1, next: 0) rule (string) "\\." (exit level: 0, next: 0) rule (string) "/(?:[^/])*/" (exit level: 0, next: 0) rule (type normal symbol normal string) "([^="[:blank:]>]+)([[:blank:]]*)(=)([[:blank:]]*)([^="'>]+)" (exit level: 0, next: 0) rule (type normal symbol) "([^="[:blank:]>]+)([[:blank:]]*)(=)" (exit level: 0, next: 0) rule (type) "(?:[[:alnum:]]+)" (exit level: 0, next: 0) rule (comment) "" (exit level: 1, next: 0) rule (comment) "" (exit level: 1, next: 0) rule (comment) "
--[=[ first --[[ second ]=] still second ]] first ]=] outside

--[[ long comment
	XXXXXXXXXXXXX [[ long comment
		[[ long comment
			[[ long comment write to <foo.bar@bar.foo.it>
				[[ long comment xxxxxxxxxxxxxx ]]
				xxxxxxxxxxxxxx ]]
			xxxxxxxxxxxxxx visit http://www.gnu.org ]]
		XXXXXXXX ]]
	XXXXX ]]


T = [[ long string comment
	[[ long comment
		[[ long comment
			[[ long comment
				[[ long comment xxxxxxxxxxxxxx ]]
				xxxxxxxxxxxxxx ]]
			xxxxxxxxxxxxxx ]]
		XXXXXXXX ]]
	XXXXX ]]

-- life.lua
-- original by Dave Bollinger <DBollinger@compuserve.com> posted to lua-l
-- modified to use ANSI terminal escape sequences
-- modified to use for instead of while. write to <foo.bar@bar.foo.it> visit http://www.gnu.org

local write=io.write

-- short comments

C = "short string"

D = 'another short string'

--[[	exemple of long comments
	sdf dfsgsdf g [[ sdf sdf sd f ]] sd fgsd
	fgs dfg sdf gsd fgs
	dfg sdfgsdfgsdfg ]]

longstring = [[ sdaf sdf sdf d
		sfg	 dfg sdf [[  sdfsdf  ]]  gs dfg sdf
		s dfgs dfg sdf gsdf
		gs dfgsdfgsdf ]]

ALIVE="¥"	DEAD="þ"
ALIVE="O"	DEAD="-"

function delay() -- NOTE: SYSTEM-DEPENDENT, adjust as necessary
  for i=1,10000 do end
  -- local i=os.clock()+1 while(os.clock()<i) do end
end

function ARRAY2D(w,h)
  local t = {w=w,h=h}
  for y=1,h do
    t[y] = {}
    for x=1,w do
      t[y][x]=0
    end
  end
  return t
end

_CELLS = {}

-- give birth to a "shape" within the cell array
function _CELLS:spawn(shape,left,top)
  for y=0,shape.h-1 do
    for x=0,shape.w-1 do
      self[top+y][left+x] = shape[y*shape.w+x+1]
    end
  end
end

-- run the CA and produce the next generation
function _CELLS:evolve(next)
  local ym1,y,yp1,yi=self.h-1,self.h,1,self.h
  while yi > 0 do
    local xm1,x,xp1,xi=self.w-1,self.w,1,self.w
    while xi > 0 do
      local sum = self[ym1][xm1] + self[ym1][x] + self[ym1][xp1] +
                  self[y][xm1] + self[y][xp1] +
                  self[yp1][xm1] + self[yp1][x] + self[yp1][xp1]
      next[y][x] = ((sum==2) and self[y][x]) or ((sum==3) and 1) or 0
      xm1,x,xp1,xi = x,xp1,xp1+1,xi-1
    end
    ym1,y,yp1,yi = y,yp1,yp1+1,yi-1
  end
end

-- output the array to screen
function _CELLS:draw()
  local out="" -- accumulate to reduce flicker
  for y=1,self.h do
   for x=1,self.w do
      out=out..(((self[y][x]>0) and ALIVE) or DEAD)
    end
    out=out.."\n"
  end
  write(out)
end

-- constructor
function CELLS(w,h)
  local c = ARRAY2D(w,h)
  c.spawn = _CELLS.spawn
  c.evolve = _CELLS.evolve
  c.draw = _CELLS.draw
  return c
end

--
-- shapes suitable for use with spawn() above
--
HEART = { 1,0,1,1,0,1,1,1,1; w=3,h=3 }
GLIDER = { 0,0,1,1,0,1,0,1,1; w=3,h=3 }
EXPLODE = { 0,1,0,1,1,1,1,0,1,0,1,0; w=3,h=4 }
FISH = { 0,1,1,1,1,1,0,0,0,1,0,0,0,0,1,1,0,0,1,0; w=5,h=4 }
BUTTERFLY = { 1,0,0,0,1,0,1,1,1,0,1,0,0,0,1,1,0,1,0,1,1,0,0,0,1; w=5,h=5 }

-- the main routine
function LIFE(w,h)
  -- create two arrays
  local thisgen = CELLS(w,h)
  local nextgen = CELLS(w,h)

  -- create some life
  -- about 1000 generations of fun, then a glider steady-state
  thisgen:spawn(GLIDER,5,4)
  thisgen:spawn(EXPLODE,25,10)
  thisgen:spawn(FISH,4,12)

  -- run until break
  local gen=1
  write("\027[2J")	-- ANSI clear screen
  while 1 do
    thisgen:evolve(nextgen)
    thisgen,nextgen = nextgen,thisgen
    write("\027[H")	-- ANSI home cursor
    thisgen:draw()
    write("Life - generation ",gen,"\n")
    gen=gen+1
    if gen>2000 then break end
    --delay()		-- no delay
  end
end

LIFE(40,20)
				
source-highlight-3.1.6/tests/test.chlog_css.html0000644000175000017500000001124411672675566016710 00000000000000 ChangeLog with css
2002-08-08  Lorenzo Bettini  <lb-bl@foo.it>

	* src/Makefile.am (source_highlight_SOURCES): correctly include
	changelog_scanner.ll

        * this is a comment without a file name

2002-08-02  John Millaway  <millaway-bar@foo_bar-com.com>

	* src/flex_scanner.ll: Added scanner for flex

	* src/changelog_scanner.ll: Added scanner for ChangeLog

	* src/Makefile.am: do not use .stamp files anymore, use flex's prefix

2002-07-30  Lorenzo Bettini  <lb@foo>

	* acinclude.m4 (LF_PROG_TXTC): fixed a little bug that shows up
	only now with the new version of autoconf

	* acconfig.h: removed, no longer needed with autoconf

	* configure.in: use the new AC_LIBOBJ

	* doc/Makefile.am: removed an extra EXTRA_DIST

2002-07-21  Lorenzo Bettini  <lb@foo>

	* src/python_scanner.ll: fixed a problem with string comments

	* src/lib/genfun.cc (processFile): correctly set deleteOStream

	* src/lib/startapp.cc (start): default to stdout also when -i
	option is used.
	(start): check whether "STDOUT" was specified as output

	* src/lib/genfun.cc (print_xtop): always generate the correct header
	for XHTML
        (processFile): call LineNumberDecorator::reset so that if many
        files are processed the current line number is correctly reset

2002-07-10  Lorenzo Bettini  <lb@foo>
source-highlight-3.1.6/tests/test.java.txt0000644000175000017500000000660111672675566015541 0000000000000001: /* 02:  This is a classical Hello program 03:  to test source-highlight with Java programs. 04:   05:  to have an html translation type 06: 07:  source-highlight -s java -f html --input Hello.java --output Hello.html 08:  source-highlight -s java -f html < Hello.java > Hello.html 09: 10:  or type source-highlight --help for the list of options 11: 12:  written by 13:  Lorenzo Bettini 14:  http://www.lorenzobettini.it 15:  http://www.gnu.org/software/src-highlite 16: */ 17: 18: package hello; 19: 20: import java.io.* ; 21: 22: /** 23:  * 

 24:  * A simple Hello World class, used to demonstrate some 25:  * features of Java source highlighting. 26:  * 

 27:  * TODO: nothing, just to show an highlighted TODO or FIXME 28:  * 29:  * @author Lorenzo Bettini 30:  * @version 2.0 31:  */ /// class 32: public class Hello { 33: int foo = 1998 ; 34: int hex_foo = 0xCAFEBABE; 35: boolean b = false; 36: Integer i = null ; 37: char c = '\'', d = 'n', e = '\\' ; 38: String xml = "ä", foo2 = "\\" ; 39: 40: /* mymethod */ 41: public void mymethod(int i) { 42: // just a foo method 43: } 44: /* mymethod */ 45: 46: /* main */ 47: public static void main( String args[] ) { 48: // just some greetings ;-) /* 49: System.out.println( "Hello from java2html :-)" ) ; 50: System.out.println( "\tby Lorenzo Bettini" ) ; 51: System.out.println( "\thttp://www.lorenzobettini.it" ) ; 52: if (argc > 0) 53: String param = argc[0]; 54: //System.out.println( "bye bye... :-D" ) ; // see you soon 55: } 56: /* main */ 57: } 58: /// class 59: 60: // end of file test.javasource-highlight-3.1.6/tests/test.m40000644000175000017500000000157111672675566014323 00000000000000dnl @synopsis AC_CTAGS_FLAGS dnl dnl check whether it's the correct version of ctags AC_DEFUN([AC_CTAGS_FLAGS], [AC_CACHE_CHECK(whether ${CTAGS} accept --excmd, ac_ctags_flags, [echo 'void f(){}' > conftest.c if test -z "`${CTAGS} --excmd=n -f conftags conftest.c 2>&1`"; then ac_ctags_flags=yes else ac_ctags_flags=no fi rm -f conftest* rm -f conftags* ])]) AC_DEFUN([adl_NORMALIZE_PATH], [case ":[$]$1:" in # change empty paths to '.' ::) $1='.' ;; # strip trailing slashes :*[[\\/]]:) $1=`echo "[$]$1" | sed 's,[[\\/]]*[$],,'` ;; :*:) ;; esac # squeze repeated slashes case ifelse($2,,"[$]$1",$2) in # if the path contains any backslashes, turn slashes into backslashes *\\*) $1=`echo "[$]$1" | sed 's,\(.\)[[\\/]][[\\/]]*,\1\\\\,g'` ;; # if the path contains slashes, also turn backslashes into slashes *) $1=`echo "[$]$1" | sed 's,\(.\)[[\\/]][[\\/]]*,\1/,g'` ;; esac]) source-highlight-3.1.6/tests/test_no_line_at_the_end.c.html0000644000175000017500000000042111672675567021037 00000000000000
1: #include <stdio.h>
source-highlight-3.1.6/tests/test.scm.html0000644000175000017500000002616311672675566015534 00000000000000
#|
multiline
comment
|#

"string with special \n \t chars"

; comment
(define (fn a)
  (let* ((b (+ a 1)))
    (if (= a 1)
        #t
        #f))) ;; another comment

(define c (lambda (x)
            (let loop ((i 0))
              (unless (= i 10)
                      ;; print some chars
                      (display #\' #\#)
                      (loop (+ i 1))))))

((if (= 0 0) * +) 5 2)

;; numbers
(define pi 3.14159)

(define circle-area
    (lambda (radius)
      (* pi radius radius)))

(define (circle-area radius)
    (* pi radius radius))

(define (blah)
  (define (foo) 55)
  (define (woo) 42)
  (+ (foo) (woo)))

(define (repeat-forever)
  (display "I will not play with Scheme in class.")
  (repeat-forever))

(define (all-atoms-are-numeric? tree)
  (call-with-current-continuation
   (lambda (return)                     ;bind RETURN to the current cont

     (define (walk tree)
       (cond ((null? tree))
             ((pair? tree)              ;pair? is like consp
              (walk (car tree))
              (walk (cdr tree)))
             ((number? tree))
             (else (return #f))))       ;found a non-number -- return false

     (walk tree)
     #t)))                              ;else return true


(cond ((number? x) "A number.")
      ((string? x) "A string.")
      (else "Beats me!"))

(cond ((assoc key a-list) => cdr)
      (else #f))


(letrec ((even? (lambda (n) (if (= n 0) #t (odd? (- n 1)))))
         (odd?  (lambda (n) (if (= n 0) #f (even? (- n 1))))))
  (even? 42))


(let counting ((n 10))
  (cond ((< 0 n)
         (write n)
         (counting (- n 1)))))


(define (list . arguments) arguments)

(define-syntax my-or
  (syntax-rules ()
    ((my-or) #f)
    ((my-or e) e)
    ((my-or e1 e2 ...)
     (let ((temp e1))
       (if temp temp (my-or e2 ...))))))

(define-syntax syntax-rules
  (lambda (x)
    (syntax-case x ()
      ((_ (i ...) ((keyword . pattern) template) ...)
       (syntax (lambda (x)
                 (syntax-case x (i ...)
                   ((dummy . pattern) (syntax template))
                   ...)))))))
source-highlight-3.1.6/tests/test.diff0000644000175000017500000000273211672675566014713 00000000000000diff -ruP source-highlight-2.1.1/source-highlight.spec source-highlight-2.1.2/source-highlight.spec --- source-highlight-2.1.1/source-highlight.spec 2005-08-03 14:54:18.000000000 +0200 +++ source-highlight-2.1.2/source-highlight.spec 2005-08-25 16:11:37.000000000 +0200 @@ -6,8 +6,8 @@ Summary: syntax highlighting for source documents Name: source-highlight -Version: 2.1.1 -Release: 2.1.1 +Version: 2.1.2 +Release: 2.1.2 License: GPL Group: Utilities/Console Source: ftp://ftp.gnu.org/gnu/source-highlight/%{name}-%{version}.tar.gz diff -ruP source-highlight-2.1.1/src/latex.outlang source-highlight-2.1.2/src/latex.outlang --- source-highlight-2.1.1/src/latex.outlang 2005-07-12 22:21:46.000000000 +0200 +++ source-highlight-2.1.2/src/latex.outlang 2005-08-25 16:15:53.000000000 +0200 @@ -34,4 +34,5 @@ "|" "$|$" "--" "-\\/-" "---" "-\\/-\\/-" +"\"" "\"{}" # avoids problems with some inputenc end \ No newline at end of file diff -ruP source-highlight-2.1.1/src/lib/messages.cc source-highlight-2.1.2/src/lib/messages.cc --- source-highlight-2.1.1/src/lib/messages.cc 2005-07-12 12:18:59.000000000 +0200 +++ source-highlight-2.1.2/src/lib/messages.cc 2005-08-25 16:08:44.000000000 +0200 @@ -85,3 +85,9 @@ cerr << PACKAGE << ": " << error << endl; exit(EXIT_FAILURE); } + +void foundBug(const std::string &error, const std::string &file, int line) +{ + cerr << PACKAGE << ": " << error << ", " << file << ":" << line << endl; + exit(EXIT_FAILURE); +} source-highlight-3.1.6/tests/test_html5.htm.html0000644000175000017500000000726611672675567016657 00000000000000 html output formatted in html
<!doctype HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<title>Check HTML features &amp; <br></title>
</head>
<body bgcolor="white">
<body bgcolor='white'>
<body bgcolor=white>
<pre><tt><i><font color="#9A1900">/*</font></i>

<Style foo="bar"> &amp; <br> these must not be highlighted as html </STYle>

<NOSCRIPT foo="bar"> &amp; 
<br> 
these must not be highlighted </noscript>

   <p foo=/bar/>

is syntactically valid and equivalent to

   <p foo="bar">

<textarea>
Here elements such as <b> are not highlighted
while entities such as &amp; are highlighted
</textarea>

</body>
</html>

<!-- this is an
     added HTML comment
     at the end of the file -->

<plaintext>

From then on, everything else won't be highlighted

<textarea>
Here elements such as <b> are not highlighted
while entities such as &amp; are highlighted
</textarea>

</body>
</html>

<!-- this is an
     added HTML comment
     at the end of the file -->
source-highlight-3.1.6/tests/valgrind_suppressions.sh.in0000644000175000017500000000471511672675567020512 00000000000000#! @SHELL@ # --------------------------------------------------------------------- # # # Script to run an example through VALGRIND and generate suppressions # # Michael Hagemann # # modified by Lorenzo Bettini # # --------------------------------------------------------------------- # # Hack to run valgrind with new glibcs. Problem: new TLS (thread # local storage) #VG_ENV="LD_ASSUME_KERNEL=2.2.5" # --num-callers=20 --leak-check=yes --leak-resolution=high --show-reachable=yes --suppressions=./suppressions.supp # --num-callers=20 --leak-resolution=high --suppressions=/home/bettini/work/src2tags/tests/suppressions.supp VG_PRG="@VALGRIND@" VG_ARGS="--tool=memcheck --num-callers=20 --leak-check=yes --leak-resolution=high --show-reachable=yes --suppressions=@srcdir@/suppressions.supp --gen-suppressions=yes" #VG_ARGS="--tool=memcheck --num-callers=20 --leak-check=yes --leak-resolution=high --suppressions=@srcdir@/suppressions.supp" VGRIND="${VG_ENV} ${VG_PRG} ${VG_ARGS}" if test ! -x "${VG_PRG}"; then echo Valgrind not found! Check path. exit 1 fi # --------------------------------------------------------------------- # DATE=`date +"%Y-%m-%d_%H%M"` SUMMARY=valgrind_summary.log TMP_LOG=valgrind_tmp.log ERROR=0 # --------------------------------------------------------------------- # vgrind () { if test ! -x "$1" -o "$1" == `basename $0`; then echo "Skipping $1." return fi echo -n "Running $* ..." tmp_err= if [[ $1 == *.sh ]]; then eval $1 ${VGRIND} else eval ${VGRIND} $* fi; #grep -e "LEAK SUMMARY" ${TMP_LOG} >/dev/null 2>&1 grep -E "(reachable|lost): [1-9][0-9]*" ${TMP_LOG} >/dev/null 2>&1 if test "$?" == "0"; then echo -n " LEAKS!" echo "" >> ${SUMMARY} echo "** $*, LEAKS" >> ${SUMMARY} cat ${TMP_LOG} >> ${SUMMARY} tmp_err=1 fi grep -e "[1-9][0-9]* error" ${TMP_LOG} >/dev/null 2>&1 if test "$?" == "0"; then echo -n " ERRORS!" echo "" >> ${SUMMARY} echo "** $*, ERRORS" >> ${SUMMARY} cat ${TMP_LOG} >> ${SUMMARY} tmp_err=1 fi if test "x${tmp_err}" == "x"; then echo " OK." else ERROR=1 echo "" fi rm -f ${TMP_LOG} } # --------------------------------------------------------------------- # echo "Run at ${DATE}" >${SUMMARY} vgrind $* # --------------------------------------------------------------------- # # cat ${SUMMARY} exit ${ERROR} source-highlight-3.1.6/tests/wrong_namedgroups_subexps2.err0000644000175000017500000000023611672675567021205 00000000000000wrong_namedgroups_subexps2.lang:3: subexpressions of subexpressions are not allowed wrong_namedgroups_subexps2.lang:3: Caused by: Invalid regular expression. source-highlight-3.1.6/tests/test_no_line_at_the_end.java0000644000175000017500000000002111672675567020567 00000000000000import java.io.*;source-highlight-3.1.6/tests/test.texinfo.html0000644000175000017500000001430711672675566016423 00000000000000
(@ref{Generating References}).
\input texinfo @c -*-texinfo-*-
@c This file uses the @command command introduced in Texinfo 4.0.
@c %**start of header
@setfilename source-highlight.info
@include version.texi
@settitle GNU Source-highlight @value{VERSION}
@finalout
@c @setchapternewpage odd
@c %**end of header

@example
my example
@end example

@set myhomepage @uref{http://www.lorenzobettini.it}

field names, etc.) by relying on the program @emph{ctags},
@url{http://ctags.sourceforge.net} 
@xref{My Long
Reference}.

@inforef{Introduction,,source-highlight-info}.

@c All the menus can be updated with the EMACS command
@c texinfo-all-menus-update, which is normally bound to C-c C-u C-a.
@menu
* Introduction::                What's it for?
* Installation::                Download and installation           
* Invoking source-highlight::   How to run @command{source-highlight}.
* Language Definitions::        How to define an input language
* Problems::                    Reporting bugs.
* Mailing Lists::               
* Concept Index::               Index of concepts.
@end menu

This is an escaped @@ at symbol.

This ``is a string''.

@example
@i{/// read the files }FIXME@i{ of a directory }@@param@i{ }@b{<f} foo="bar"@b{>}

@b{#include} <stddef.h>
@b{#include} <stdio.h>
@b{#include} <sys/types.h>
@b{#include} <dirent.h>

int
@b{main} (void)
@{
       DIR *dp;
       @b{struct} dirent *ep;
     
       dp = @b{opendir} ("./");
       @b{if} (dp != NULL)
         @{
           @b{while} (ep = @b{readdir} (dp))
             @b{puts} (ep->d_name);
           (void) @b{closedir} (dp);
         @}
       @b{else}
         @b{perror} ("Couldn't open the directory");
     
       @b{return} 0;
@}

@end example

source-highlight-3.1.6/tests/test.javalog0000644000175000017500000000073611672675566015430 0000000000000008 Aug 2011 8:56:40 AM main main INFO: Test 123. Identifiers like adsf_134 are also shown highlighted. 08 Aug 2011 8:56:40 AM main main WARNING: A warning message. Numbers like 12341341234 should be in blue. 08 Aug 2011 8:56:40 AM main main SEVERE: This is a sever message. As far as I remember the whole message is in red. Exception in thread "main" java.lang.RuntimeException: Here is an exception with a stacktrace. This should be in red as well. at main.main(main.java:13) source-highlight-3.1.6/tests/test.hx.html0000644000175000017500000001316711672675566015371 00000000000000
/*
 * test for haxe
 */
import Math;
class ShuffleBag{
    var data:Array<Int>;
    var cursor:Int;
    //c'tor
    public function new(){
        data=[];
        cursor=-1;

        //pointless preprocessor tests :)
        #if neko //nya :3
            trace("neko");
        #else flash9//no space
            trace("flash9");
        #end //foo
        
        #if flash8
            trace("flash8");
        #end//no space
    }
    //add one or several item(s)
    public function add(item:Int,?quantity:Int){
        if(quantity==null){
            data.push(item);
        }else{
            for(i in 0...quantity)
                data.push(item);
        }
        cursor=data.length-1;
    }
    //returns the next item in the bag
    public function next(){
        if(cursor<1){
            cursor=data.length-1;
            return data[0];
        }
        var grab:Int=Math.floor(Math.random()*(cursor+1));
        var temp:Int=data[grab];
        data[grab]=data[cursor];
        data[cursor]=temp;
        cursor--;
        return temp;
    }
}
source-highlight-3.1.6/tests/test_linerange2.html0000644000175000017500000000525511672675567017061 00000000000000
00009: 
00010:   or type source-highlight --help for the list of options
00011: 
00012:   written by
00013:   Lorenzo Bettini
00014:   http://www.lorenzobettini.it
00015:   http://www.gnu.org/software/src-highlite
00016: */
00017: 
00018: package hello;
00019: 
00020: import java.io.* ;
00021: 
00026:  * </p>
00027:  * TODO: nothing, just to show an highlighted TODO or FIXME
00028:  *
00029:  * @author Lorenzo Bettini
00030:  * @version 2.0
00031:  */ /// class
00032: public class Hello {
00033:     int foo = 1998 ;
00034:     int hex_foo = 0xCAFEBABE;
00035:     boolean b = false;
00036:     Integer i = null ;
00037:     char c = '\'', d = 'n', e = '\\' ;
source-highlight-3.1.6/tests/test.log0000644000175000017500000000264211672675566014564 00000000000000Jul 8 14:50:32 localhost kde3(pam_unix)[3229]: session opened for user bettini by (uid=0) Jul 8 15:01:01 localhost msec: changed mode of /var/log/wtmp from 664 to 640 Jul 8 15:01:01 localhost msec: changed group of /var/log/wtmp from utmp to adm Jul 8 15:01:01 localhost msec: changed mode of /var/log/XFree86.0.log from 644 to 640 Jul 8 15:01:01 localhost msec: changed group of /var/log/XFree86.0.log from root to adm Jul 8 15:01:01 localhost msec: changed mode of /var/log/cups/error_log from 644 to 640 Jul 8 15:01:01 localhost msec: changed mode of /var/log/ksyms.3 from 644 to 640 Jul 8 15:01:01 localhost msec: changed group of /var/log/ksyms.3 from root to adm Jul 8 15:01:01 localhost msec: changed mode of /var/log/ksyms.2 from 644 to 640 Jul 8 15:01:01 localhost msec: changed group of /var/log/ksyms.2 from root to adm Jul 8 15:01:01 localhost msec: changed mode of /var/log/ksyms.1 from 644 to 640 Jul 8 15:01:01 localhost msec: changed group of /var/log/ksyms.1 from root to adm Jul 8 15:01:01 localhost msec: changed mode of /var/log/ksyms.0 from 644 to 640 Jul 8 15:01:01 localhost msec: changed group of /var/log/ksyms.0 from root to adm Jul 8 15:01:01 localhost msec: changed mode of /var/log/XFree86.0.log.old from 644 to 640 Jul 8 15:01:01 localhost msec: changed group of /var/log/XFree86.0.log.old from root to adm Jul 8 15:13:01 localhost su(pam_unix)[10393]: session opened for user root by (uid=501) source-highlight-3.1.6/tests/test.adb0000644000175000017500000000426211672675566014531 00000000000000-- -- This is a classical Hello world example written in Ada -- to test source-highlight with Ada programs. -- -- to perform a html translation type: -- -- source-highlight -s ada -f html --input test.ada --output test.ada.html -- -- or type source-highlight --help for the list of options -- -- -- written by Reto Buerki -- with Ada.Text_IO; procedure Test is Test_Int : Integer := 10; -- This is an example test integer Test_Float : constant Float := 10.2; -- This is an example test float Test_Boolean : Boolean := False; -- This is an example test boolean Test_Char : Character := 'C'; -- This is an example test character Test_String : String := "Some test string"; -- This is an example test string type Test_Person_Type is tagged record Name : String (1 .. 8); -- Name Age : Positive := 18; -- Age end record; -- This is an example type type Test_Profession_Type is (Unknown, Medic, Fireman, Construction_Worker); -- Enumeration test type : All possible professions type Test_Employee_Type is new Test_Person_Type with record Profession : Test_Profession_Type := Unknown; -- Initial profession is not known end record; -- This is an example extension of Test_Person_Type subtype Test_Int_Subtype is Integer range 1 .. 9; -- This is an example subtype task Test_Greeter_Task is entry Run; -- Entry to start example task end Test_Greeter_Task; -- An example task task body Test_Greeter_Task is ------------------ -- Get_Greeting -- ------------------ function Get_Greeting (Num : in Integer) return String is begin return Integer'Image (Num) & " : Hello world from an Ada task"; end Get_Greeting; begin accept Run; for Index in Test_Int_Subtype'Range loop Ada.Text_IO.Put_Line (Get_Greeting (Num => Index)); end loop; end Test_Greeter_Task; use Ada.Text_IO; begin -- Just display some greeting Put_Line ("Hello world in Ada for GNU Source-highlight"); Put_Line ("written by Reto Buerki "); Test_Greeter_Task.Run; end Test; source-highlight-3.1.6/tests/test_ref.xhtml0000644000175000017500000005535011672675567016000 00000000000000 XHTML with refs
01: /**
02: ** Copyright (C) 1999-2007 Lorenzo Bettini
03: **  
04:   http://www.lorenzobettini.it
05:   
06:   r2 = r2 XOR (1<<10);
07:   cout << "hello world" << endl;
08: **  
09: */
10: 
11: // this file also contains the definition of mysum as a #define
12: 
13: // textgenerator.h : Text Generator class &&
14: 
15: #ifndef _TEXTGEN_H
16: #define _TEXTGEN_H
17: 
18: #define foo(x) (x + 1)
19: 
20: #define mysum myfunbody 
21: 
22: #include <iostream.h> // for cerr
23: 
24: #include "genfun.h" /* for generating functions */
25: 
26: class TextGenerator {
27:   public :
28:     virtual void generate( const char *s ) const { (*sout) << s ; }
29:     virtual void generate( const char *s, int start, int end ) const 
30:       {
31:         for ( int i = start ; i <= end ; ++i )
32:           (*sout) << s[i] ;
33:         return a<p->b ? a : 3;
34:       }
35:     virtual void generateln( const char *s ) const
36:         { 
37:             generate( s ) ;
generate -> test.h:28
generate -> test.h:29
38:             (*sout) << endl ; 
39:         }
40:     virtual void generateEntire( const char *s ) const
41:         {
42:             startTextGeneration() ;
startTextGeneration -> test.h:46
startTextGeneration -> test.h:70
43:             generate(s) ;
generate -> test.h:28
generate -> test.h:29
44:             endTextGeneration() ;
endTextGeneration -> test.h:47
endTextGeneration -> test.h:76
45:         }
46:     virtual void startTextGeneration() const {}
47:     virtual void endTextGeneration() const {}
48:     virtual void beginText( const char *s ) const
49:         {
50:             startTextGeneration() ;
startTextGeneration -> test.h:46
startTextGeneration -> test.h:70
51:             if ( s )
52:                 generate( s ) ;
generate -> test.h:28
generate -> test.h:29
53:         }
54:     virtual void endText( const char *s ) const
55:         {
56:             if ( s )
57:                 generate( s ) ;
generate -> test.h:28
generate -> test.h:29
58:             endTextGeneration() ;
endTextGeneration -> test.h:47
endTextGeneration -> test.h:76
59:         }
60: } ;
61: 
62: // Decorator
63: class TextDecorator : public TextGenerator {
64:   protected :
65:     TextGenerator *decorated ;
66:   
67:   public :
68:     TextDecorator( TextGenerator *t ) : decorated( t ) {}
69: 
70:     virtual void startTextGeneration() const 
71:     { 
72:         startDecorate() ;
73:         if ( decorated )
74:            decorated->startTextGeneration() ;
startTextGeneration -> test.h:46
startTextGeneration -> test.h:70
75:     }
76:     virtual void endTextGeneration() const 
77:     { 
78:         if ( decorated )
79:            decorated->endTextGeneration() ;
endTextGeneration -> test.h:47
endTextGeneration -> test.h:76
80:         endDecorate() ;
81:    mysum;
82:     }
83: 
84:     // pure virtual functions
85:     virtual void startDecorate() const = 0 ;
86:     virtual void endDecorate() const = 0 ;
87: } ;
88: 
89: #endif // _TEXTGEN_H
90: 
source-highlight-3.1.6/tests/test.txt0000644000175000017500000000071111672675566014615 00000000000000This is a simple text file; so basically it doesn't need any special highlighting. However it is useful to test the default.lang: this will be basically formatted in the output format, by replacing special chars of the output format. For instance, for html: we have &, < and >. This somehow shows how source-highlight can be used also as a simple formatter, without highlighting, e.g., to transform a text file into an HTML file or Tex file, and so on...source-highlight-3.1.6/tests/test3.diff.html0000644000175000017500000000237511672675567015745 00000000000000
diff -rP source-highlight-2.1.1/source-highlight.spec source-highlight-2.1.2/source-highlight.spec
9,10c9,10
< Version:   2.1.1
< Release:   2.1.1
---
> Version:   2.1.2
> Release:   2.1.2
diff -rP source-highlight-2.1.1/src/latex.outlang source-highlight-2.1.2/src/latex.outlang
36a37
> "\"" "\"{}" # avoids problems with some inputenc
diff -rP source-highlight-2.1.1/src/lib/messages.cc source-highlight-2.1.2/src/lib/messages.cc
87a88,93
> 
> void foundBug(const std::string &error, const std::string &file, int line)
> {
>   cerr << PACKAGE << ": " << error << ", " << file << ":" << line << endl;
>   exit(EXIT_FAILURE);
> }
source-highlight-3.1.6/tests/test.hs.html0000644000175000017500000001313511672675566015357 00000000000000
-- A test snippet based on
-- http://google-code-prettify.googlecode.com/svn/trunk/tests/prettify_test.html
--
-- A comment
These --> are --| not |-- comments
--but this is a comment again

module Foo(bar) where
import Blah
import BlahBlah(blah)
import Monads(Exception(..), FIO(..),unFIO,handle,runFIO,fixFIO,fio,
              write,writeln,HasNext(..),HasOutput(..))

{- nested comments
 - should {- just -}  work -}
instance Thingy Foo where
  a = b

data Foo :: (* -> * -> *) -> * > * -> * where
  Nil :: Foo a b c
  Cons :: a b c -> Foo abc -> Foo a b c

str = "Foo\\Bar"
chars = [ 'x', '\'', '\\', '\"', '\120', '\o100', '\xbeef' ] -- Escapes too
Not.A.Char = 'too long'  -- Don't barf.  Show that 't is a lexical error.

(ident, ident', Fo''o.b'ar)

(0, 12, 0x45, 0xA7, 0o177, 0O377, 0.1, 1.0, 1e3, 0.5E-3, 1.0E+45)

[1,2..10]

(#) = \x y -> s x y
  where s x y = (x+y) `mod` 13

bar (x:_) = putStrLn x

main = do
  let foo x = do { spam $ eggs x }
  foo >>= bar
source-highlight-3.1.6/tests/test.sml0000644000175000017500000000224011672675566014570 00000000000000fun map (f : 'a -> 'b, xs : 'a list) : 'b list = case xs of nil => nil | (y::ys) => (f (y))::(map (f, ys)); fun zip (xs : 'a list, ys : 'b list) : ('a * 'b) list = case (xs, ys) of (nil, _) => nil | (_, nil) => nil | (b::bs, c::cs) => (b, c)::(zip (bs, cs)); fun filter (f : 'a -> bool, xs : 'a list) : 'a list = case xs of nil => nil | (y::ys) => if f (y) then y::(filter (f, ys)) else filter (f, ys); fun foldl (f : 'a * 'b -> 'a, n : 'a, xs : 'b list) : 'a = case xs of nil => n | (y::ys) => foldl (f, f (n, y), ys); fun upto (x : int, y : int) : int list = if x <= y then x::(upto (x + 1, y)) else nil; fun sum (xs : int list) : int = case xs of nil => 0 | (x'::xs') => x' + sum (xs'); fun fold (opr: int*int->int, base: int, xs: int list) : int = case xs of nil => base | (x'::xs') => opr(x', fold(opr, base, xs')); fun add(x,y) = x+y; fun foldsum (xs: int list) = fold (add,0, xs); fun foldr (opr: 'b*'a->'a, base: 'a, xs: 'b list) : 'a = case xs of nil => base | (x'::xs') => opr(x', foldr(opr, base, xs')); source-highlight-3.1.6/tests/test.tcl.html0000644000175000017500000000312011672675566015520 00000000000000
#!/bin/sh
# Emacs like specification -*- Tcl script -*-
# the next line restarts using wish \
exec wish "$0" "$@"

# hello -- example
# Simple Tk script to create a button that prints "Hello, world".
# Click on the button to terminate the program.
#
# The first line below creates the button, and the second line
# asks the packer to shrink-wrap the application's main window
# around the button.

button .hello -text "Hello, world" -command {
    puts stdout "Hello, world"; destroy .
}
pack .hello

$myvar

# Local Variables:
# mode: tcl
# End:
source-highlight-3.1.6/tests/test_notfixed.html0000644000175000017500000001626111672675567016652 00000000000000 /*
  This is a classical Hello program
  to test source-highlight with Java programs.
 
  to have an html translation type

        source-highlight -s java -f html --input Hello.java --output Hello.html
        source-highlight -s java -f html < Hello.java > Hello.html

  or type source-highlight --help for the list of options

  written by
  Lorenzo Bettini
  http://www.lorenzobettini.it
  http://www.gnu.org/software/src-highlite
*/

package hello;

import java.io.* ;

/**
 * <p>
 * A simple Hello World class, used to demonstrate some
 * features of Java source highlighting.
 * </p>
 * TODO: nothing, just to show an highlighted TODO or FIXME
 *
 * @author Lorenzo Bettini
 * @version 2.0
 */ /// class
public class Hello {
    int foo = 1998 ;
    int hex_foo = 0xCAFEBABE;
    boolean b = false;
    Integer i = null ;
    char c = '\'', d = 'n', e = '\\' ;
    String xml = "<tag attr=\"value\">&auml;</tag>", foo2 = "\\" ;

    /* mymethod */
    public void mymethod(int i) {
        // just a foo method
    }
    /* mymethod */
 
    /* main */
    public static void main( String args[] ) {
        // just some greetings ;-)  /*
        System.out.println( "Hello from java2html :-)" ) ;
        System.out.println( "\tby Lorenzo Bettini" ) ;
        System.out.println( "\thttp://www.lorenzobettini.it" ) ;
        if (argc > 0)
            String param = argc[0];
        //System.out.println( "bye bye... :-D" ) ; // see you soon
    }
    /* main */
}
/// class

// end of file test.javasource-highlight-3.1.6/tests/test_comments.py0000644000175000017500000000153311672675567016337 00000000000000#! /usr/bin/python """ This is a test for the handling of comments and string literals in Python """ ''' This is a test for the handling of comments and string literals in Python ''' "And this is a string meant as comment" def test(): # The test routine ''' It does nothing but printing different strings ''' """ It does nothing but printing different strings """ print "This is the first test", print 'and this the second' 'Here start the multi-lined outputs' print ''' Here we have a multi-line string. ''' print """ Here we have a multi-line string. """ print ''' And this is a second one ''' # End of printing pass # A NOP at last """ """ 'And here the fun starts' test() table = { 'S' : ['5'], 'a' : ['4','a','@'], 'b' : ['8','B'], "ps" : ["Pz"], 'ss' : ['5S','S5'], 'es' : ['3Z','3z'], 'ou' : ['00'] } source-highlight-3.1.6/tests/erasedir_inputlang.sed0000644000175000017500000000013311672675565017446 00000000000000# used to delete possible leading path in inputlang s/\(content=\"\).*\(java\.lang\)/\1\2/gsource-highlight-3.1.6/tests/wrong_exp.err0000644000175000017500000000033711672675567015624 00000000000000wrong_exp.lang:2: problem in this expression: keyword (notclosed wrong_exp.lang:2: Caused by: Unmatched marking parenthesis ( or \(. The error occured while parsing the regular expression fragment: 'notclosed)>>>HERE>>>'. source-highlight-3.1.6/tests/erasedir.sed0000644000175000017500000000001211672675565015361 00000000000000s/^.*\///gsource-highlight-3.1.6/tests/test.sh0000644000175000017500000000267611672675566014424 00000000000000#! /bin/sh # this shell script is for test purpose only # so it should not be executed case $revision in 0|[1-9]|[1-9][0-9]|[ 1-9][0-9][0-9]|[1-9][0-9][ 0-9][0-9]|[1-9][0-9][0-9 ][0-9][0-9]) ;; for source in $1; do source-highlight --failsafe -f esc -i $source; done # these are variables $abc, $(abc) and ${abc} ${abc) # and also these are variables ($myvar) {$myvar} {$myvar) eval std_shrext=\"$shrext_cmds\" disable_libs=no if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` else shlib_search_path= fi 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 source-highlight-3.1.6/tests/wrong_outlang_include.err0000644000175000017500000000002411672675567020175 00000000000000nonexistent.outlang source-highlight-3.1.6/tests/wrong_namedgroups_subexps2.lang0000644000175000017500000000016611672675567021340 00000000000000# contains an error since number there nested marked subexpressions (keyboard,symbol,type) = `(foo)(b(a)r)(another)` source-highlight-3.1.6/tests/test.erl0000644000175000017500000000716411672675566014571 00000000000000-module(sudoku). -author(vmiklos@frugalware.org). -vsn('2009-11-10'). -compile(export_all). % Return the value of Fun or an empty list based on the value of If. % @spec fun_or_empty(If::bool(), Fun::fun() -> [any()]) -> Ret::[any()] % Ret = Fun() if If is true, [] otherwise. fun_or_empty(If, Fun) -> case If of true -> Fun(); _ -> [] end. % Return a cell from a field. % @spec field(I::integer(), J::integer(), Table::[any()], M::integer()) -> % Ret::any() % Table is a flatten list of lists, M is the length of a row, % representing a matrix, Ret is the cell in the Ith row and Jth column. field(I, J, Table, M) -> P = (I-1)*M+J, case P > length(Table) of true -> 0; _ -> lists:nth((I-1)*M+J, Table) end. % Return a cell from a field. % @spec field(I::integer(), J::integer(), Table::[[any()]]) -> % Ret::any() % Ret is the cell in the Ith row and Jth column of Table. field(I, J, Table) -> lists:nth(J, lists:nth(I, Table)). % Round up. % @spec ceil(X::float()) -> Ret::integer(). % Ret is the value of X, rounded up to an integer. ceil(X) -> T = trunc(X), case X - T == 0 of true -> T; false -> T + 1 end. % This is the same as lists:seq(), but it returns an empty list if the % second argument is true to make the program work with Erlang-R12, not % just with R13. % @spec seq(N::integer(), M::integer()) -> Ret::[integer()]. seq(_, 0) -> []; seq(N, M) -> lists:seq(N, M). % Finds possible values for a cell. % @spec possible({N::integer(), Rules::[[s | w | integer()]], % M::integer(), K::integer()}, L::[integer()]) -> Ret::[integer()]. % N is the distance of cells required when the s/w info is available. % Rules is a list of lists, containing s/w/integer infos. % M = K*K is the length of a row. % L is a partial solution. % Ret is a list of possible values for the next cell if the list of % already filled ones is L. possible(_P = {N, Rules, M, K}, L) -> X = (length(L) rem M)+1, Y = (length(L) div M)+1, Ok = lists:seq(1, M), R = field(Y, X, Rules), Integers = [I || I <- R, is_integer(I)], % first exclude values based on the s, w and integer info rules % and the values of both the already filled list and the % Rules matrix Swdeny = lists:append([ fun_or_empty(X > 1 andalso lists:member(w, R), fun() -> X1 = field(Y, X-1, L, M), Ok -- [X1+N, X1-N] end), fun_or_empty(X > 1 andalso not lists:member(w, R), fun() -> X1 = field(Y, X-1, L, M), [X1+N, X1-N] end), fun_or_empty(Y > 1 andalso lists:member(s, field(Y-1, X, Rules)), fun() -> Y1 = field(Y-1, X, L, M), Ok -- [Y1+N, Y1-N] end), fun_or_empty(Y > 1 andalso not lists:member(s, field(Y-1, X, Rules)), fun() -> Y1 = field(Y-1, X, L, M), [Y1+N, Y1-N] end), fun_or_empty(length(Integers) > 0, fun() -> Ok -- Integers end) ]), % these exclude values based on row / column rules and the % values of the Rules matrix Rulesdeny = case [I || I <- R, is_integer(I)] =:= [] of true -> lists:append( lists:nth(Y, Rules) ++ % row [lists:nth(X, I) || I <- Rules] ++ % column [field(I, J, Rules) || % subcell J <- lists:seq((ceil(X / K) - 1)* K + 1, (ceil(X / K) - 1)* K + K), I <- lists:seq((ceil(Y / K) - 1)* K + 1, (ceil(Y / K) - 1)* K + K)] ); _ -> [] end, % these exclude values based on row, column and subcell rules, % based on the already filled values Rowdeny = lists:nthtail((length(L) div M)*M, L), Coldeny = [lists:nth(M*(I-1)+X, L) || I <- seq(1, Y-1)], Subdeny = [lists:nth((I-1)*M+J, L) || J <- lists:seq((ceil(X / K) - 1)* K + 1, (ceil(X / K) - 1)* K + K), I <- lists:seq((ceil(Y / K) - 1)* K + 1, (ceil(Y / K) - 1)* K + K), (I-1)*M+J < length(L)+1], Ok -- lists:append([Swdeny, Rulesdeny, Rowdeny, Coldeny, Subdeny]). source-highlight-3.1.6/tests/wrong_backref.err0000644000175000017500000000010111672675567016412 00000000000000wrong_backref.lang:2: backreferences are allowed only inside ` ` source-highlight-3.1.6/tests/test.pas0000644000175000017500000000053611672675566014566 00000000000000{ this is just a test for Pascal { I'm afraid I don't remember much of Pascal :-) so I'll use simple BEGIN END... } } Begin (* simple hello world! *) WRITELN "Hello World"; End (* Probably it is not even correct :-) *) (* the IF and VAR inside MYIFVAR must not be highlighted as keyword *) IF MYIFVAR THEN WRITELN "Hello World"; ENDsource-highlight-3.1.6/tests/wrong_syntax_include.lang0000644000175000017500000000016211672675567020206 00000000000000# the problem is not in this file but in the included one symbol = "ok" include "wrong_syntax.lang" type = "ok"source-highlight-3.1.6/tests/test_nobgcolor.cpp0000644000175000017500000000011411672675567016622 00000000000000// just a test to see the output document where background is not specified source-highlight-3.1.6/tests/test.h.html0000644000175000017500000002413311672675566015174 00000000000000
/**
** Copyright (C) 1999-2007 Lorenzo Bettini
**  
  http://www.lorenzobettini.it
  
  r2 = r2 XOR (1<<10);
  cout << "hello world" << endl;
**  
*/

// this file also contains the definition of mysum as a #define

// textgenerator.h : Text Generator class &&

#ifndef _TEXTGEN_H
#define _TEXTGEN_H

#define foo(x) (x + 1)

#define mysum myfunbody 

#include <iostream.h> // for cerr

#include "genfun.h" /* for generating functions */

class TextGenerator {
  public :
    virtual void generate( const char *s ) const { (*sout) << s ; }
    virtual void generate( const char *s, int start, int end ) const 
      {
        for ( int i = start ; i <= end ; ++i )
          (*sout) << s[i] ;
        return a<p->b ? a : 3;
      }
    virtual void generateln( const char *s ) const
	{ 
	    generate( s ) ;
	    (*sout) << endl ; 
	}
    virtual void generateEntire( const char *s ) const
	{
	    startTextGeneration() ;
	    generate(s) ;
	    endTextGeneration() ;
	}
    virtual void startTextGeneration() const {}
    virtual void endTextGeneration() const {}
    virtual void beginText( const char *s ) const
	{
	    startTextGeneration() ;
	    if ( s )
		generate( s ) ;
	}
    virtual void endText( const char *s ) const
	{
	    if ( s )
		generate( s ) ;
	    endTextGeneration() ;
	}
} ;

// Decorator
class TextDecorator : public TextGenerator {
  protected :
    TextGenerator *decorated ;
  
  public :
    TextDecorator( TextGenerator *t ) : decorated( t ) {}

    virtual void startTextGeneration() const 
    { 
	startDecorate() ;
	if ( decorated )
	    decorated->startTextGeneration() ;
    }
    virtual void endTextGeneration() const 
    { 
	if ( decorated )
	    decorated->endTextGeneration() ;
	endDecorate() ;
	mysum;
    }

    // pure virtual functions
    virtual void startDecorate() const = 0 ;
    virtual void endDecorate() const = 0 ;
} ;

#endif // _TEXTGEN_H
source-highlight-3.1.6/tests/wrong_dyn_backref2.lang0000644000175000017500000000031611672675567017507 00000000000000state string delim `\[(1?)(2?)\[` `]]` + @{1} + `a` + @{2} nested begin keyword = "inside" end # reference to a subexpression which is not present in this scope type delim "foo" "symbol" + @{1} source-highlight-3.1.6/tests/test_java_stop.java0000644000175000017500000000024111672675567016764 00000000000000// just to test the stopOnMatching property boolean b = false; Integer i = null ; main( String args[] ) { System.out.println( "Hello from java2html :-)" ) ; source-highlight-3.1.6/tests/test.h0000644000175000017500000000354611672675566014236 00000000000000/** ** Copyright (C) 1999-2007 Lorenzo Bettini ** http://www.lorenzobettini.it r2 = r2 XOR (1<<10); cout << "hello world" << endl; ** */ // this file also contains the definition of mysum as a #define // textgenerator.h : Text Generator class && #ifndef _TEXTGEN_H #define _TEXTGEN_H #define foo(x) (x + 1) #define mysum myfunbody #include // for cerr #include "genfun.h" /* for generating functions */ class TextGenerator { public : virtual void generate( const char *s ) const { (*sout) << s ; } virtual void generate( const char *s, int start, int end ) const { for ( int i = start ; i <= end ; ++i ) (*sout) << s[i] ; return ab ? a : 3; } virtual void generateln( const char *s ) const { generate( s ) ; (*sout) << endl ; } virtual void generateEntire( const char *s ) const { startTextGeneration() ; generate(s) ; endTextGeneration() ; } virtual void startTextGeneration() const {} virtual void endTextGeneration() const {} virtual void beginText( const char *s ) const { startTextGeneration() ; if ( s ) generate( s ) ; } virtual void endText( const char *s ) const { if ( s ) generate( s ) ; endTextGeneration() ; } } ; // Decorator class TextDecorator : public TextGenerator { protected : TextGenerator *decorated ; public : TextDecorator( TextGenerator *t ) : decorated( t ) {} virtual void startTextGeneration() const { startDecorate() ; if ( decorated ) decorated->startTextGeneration() ; } virtual void endTextGeneration() const { if ( decorated ) decorated->endTextGeneration() ; endDecorate() ; mysum; } // pure virtual functions virtual void startDecorate() const = 0 ; virtual void endDecorate() const = 0 ; } ; #endif // _TEXTGEN_H source-highlight-3.1.6/tests/test_refs.h.html0000644000175000017500000002554511672675567016224 00000000000000 Contains references to tags
01: /*
02: ** Copyright (C) 1999, 2000, 2001 Lorenzo Bettini
03: **  
04: ** This program is free software; you can redistribute it and/or modify
05: ** it under the terms of the GNU General Public License as published by
06: ** the Free Software Foundation; either version 3 of the License, or
07: ** (at your option) any later version.
08: **  
09: ** This program is distributed in the hope that it will be useful,
10: ** but WITHOUT ANY WARRANTY; without even the implied warranty of
11: ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12: ** GNU General Public License for more details.
13: **  
14: ** You should have received a copy of the GNU General Public License
15: ** along with this program; if not, write to the Free Software
16: ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17: **  
18: */
19: 
20: // this file also contains the definition of mysum as a #define
21: 
22: // textgenerator.h : Text Generator class &&
23: 
24: #ifndef _TEXTGEN_H
25: #define _TEXTGEN_H
26: 
27: #define foo(x) (x + 1)
28: 
29: #define mysum myfunbody 
30: 
31: #include <iostream.h> // for cerr
32: 
33: #include "genfun.h" /* for generating functions */
34: 
35: class TextGenerator {
36: public :
37:   virtual void generate( const char *s ) const;
generate -> test_refs.cpp:3
generate -> test_refs.cpp:8
38:   virtual void generate( const char *s, int start, int end ) const;
generate -> test_refs.cpp:3
generate -> test_refs.cpp:8
39:   virtual void generateln( const char *s ) const;
40:   virtual void generateEntire( const char *s ) const;
41:   virtual void startTextGeneration() const {}
42:   virtual void endTextGeneration() const {}
43:   virtual void beginText( const char *s ) const;
44:   virtual void endText( const char *s ) const;
45: } ;
46: 
47: // Decorator
48: class TextDecorator : public TextGenerator {
49: protected :
50:   TextGenerator *decorated ;
51:   
52: public :
53:   TextDecorator( TextGenerator *t );
TextDecorator -> test_refs.cpp:42
TextDecorator -> test_refs.h:48
54: 
55:   virtual void startTextGeneration() const;
startTextGeneration -> test_refs.cpp:46
startTextGeneration -> test_refs.cpp:53
startTextGeneration -> test_refs.h:41
56:   virtual void endTextGeneration() const;
endTextGeneration -> test_refs.cpp:60
endTextGeneration -> test_refs.h:42
57: 
58:   // pure virtual functions
59:   virtual void startDecorate() const = 0 ;
60:   virtual void endDecorate() const = 0 ;
61: } ;
62: 
63: #endif // _TEXTGEN_H
64: 
source-highlight-3.1.6/tests/test.d.html0000644000175000017500000002356511672675566015200 00000000000000
#!/usr/bin/dmd -run
/* sh style script syntax is supported */

/* Hello World in D
   To compile:
     dmd hello.d
   or to optimize:
     dmd -O -inline -release hello.d
*/

/+ 
  a nested /+
  comment
  +/
+/

a = /+ // +/ 1;		// parses as if 'a = 1;'
a = /+ "+/" +/ 1";	// parses as if 'a = " +/ 1";'
a = /+ /* +/ */ 3;	// parses as if 'a = */ 3;'

r"hello"
r"c:\root\foo.exe"
r"ab\n"			// string is 4 characters, 'a', 'b', '\', 'n'

`hello`
`c:\root\foo.exe`
`ab\n`			// string is 4 characters, 'a', 'b', '\', 'n'

x"0A"			// same as "\x0A"
x"00 FBCD 32FD 0A"	// same as "\x00\xFB\xCD\x32\xFD\x0A"

"hello"c          // char[]
"hello"w          // wchar[]
"hello"d          // dchar[]

import std.stdio;

void main(string[] args)
{
    writefln("Hello World, Reloaded");

    // auto type inference and built-in foreach
    foreach (argc, argv; args)
    {
        // Object Oriented Programming
        auto cl = new CmdLin(argc, argv);
        // Improved typesafe printf
        writeln(cl.argnum, cl.suffix, " arg: ", cl.argv);
        // Automatic or explicit memory management
        delete cl;
    }

    // Nested structs and classes
    struct specs
    {
        // all members automatically initialized
        int count, allocated;
    }

    // Nested functions can refer to outer
    // variables like args
    specs argspecs()
    {
        specs* s = new specs;
        // no need for '->'
        s.count = args.length;		   // get length of array with .length
        s.allocated = typeof(args).sizeof; // built-in native type properties
        foreach (argv; args)
            s.allocated += argv.length * typeof(argv[0]).sizeof;
        return *s;
    }

    // built-in string and common string operations
    writefln("argc = %d, " ~ "allocated = %d",
	argspecs().count, argspecs().allocated);
}

class CmdLin
{
    private int _argc;
    private string _argv;

public:
    this(int argc, string argv)	// constructor
    {
        _argc = argc;
        _argv = argv;
    }

    int argnum()
    {
        return _argc + 1;
    }

    string argv()
    {
        return _argv;
    }

    string suffix()
    {
        string suffix = "th";
        switch (_argc)
        {
          case 0:
            suffix = "st";
            break;
          case 1:
            suffix = "nd";
            break;
          case 2:
            suffix = "rd";
            break;
          default:
	    break;
        }
        return suffix;
    }
}
source-highlight-3.1.6/tests/wrong_dyn_backref.lang0000644000175000017500000000026311672675567017426 00000000000000# reference to third subexpression which is not present state string delim `\[(1?)(2?)\[` `]]` + @{1} + `a` + @{3} nested begin keyword = "inside" end type = "symbol" source-highlight-3.1.6/tests/test_css.html0000644000175000017500000002064411672675567015622 00000000000000 source file
/*
  This is a classical Hello program
  to test source-highlight with Java programs.
  
  to have an html translation type

	source-highlight -s java -f html --input Hello.java --output Hello.html
	source-highlight -s java -f html < Hello.java > Hello.html

  or type source-highlight --help for the list of options

  written by
  Lorenzo Bettini
  http://www.lorenzobettini.it
  http://www.gnu.org/software/src-highlite
*/

package hello;

import java.io.* ;

/**
 * <p>
 * A simple Hello World class, used to demonstrate some
 * features of Java source highlighting.
 * </p>
 * TODO: nothing, just to show an highlighted TODO or FIXME
 *
 * @author Lorenzo Bettini
 * @version 2.0
 */ /// class
public class Hello {
    int foo = 1998 ;
    int hex_foo = 0xCAFEBABE;
    boolean b = false;
    Integer i = null ;
    char c = '\'', d = 'n', e = '\\' ;
    String xml = "<tag attr=\"value\">&auml;</tag>", foo2 = "\\" ;

    /* mymethod */
    public void mymethod(int i) {
	// just a foo method
    }
    /* mymethod */
   
    /* main */
    public static void main( String args[] ) {
	// just some greetings ;-)  /*
	System.out.println( "Hello from java2html :-)" ) ;
	System.out.println( "\tby Lorenzo Bettini" ) ;
	System.out.println( "\thttp://www.lorenzobettini.it" ) ;
        if (argc > 0)
            String param = argc[0];
        //System.out.println( "bye bye... :-D" ) ; // see you soon
    }
    /* main */
}
/// class

// end of file test.java
source-highlight-3.1.6/tests/syslog.log0000644000175000017500000003602511672675566015127 00000000000000Jul 8 19:51:34 localhost kernel: EXT3-fs warning: maximal mount count reached, running e2fsck is recommended Jul 8 19:51:34 localhost kernel: EXT3 FS on dm-7, internal journal Jul 8 19:51:34 localhost kernel: EXT3-fs: mounted filesystem with ordered data mode. Jul 8 19:51:34 localhost kernel: Adding 1048568k swap on /dev/vg/swap. Priority:-2 extents:1 Jul 8 19:51:38 localhost kernel: bootsplash 3.1.4-2004/02/19: looking for picture.... found (1280x1024, 27515 bytes, v3). Jul 8 19:51:38 localhost kernel: bootsplash: status on console 0 changed to on Jul 8 19:51:39 localhost kernel: bootsplash 3.1.4-2004/02/19: looking for picture.... found (1280x1024, 27515 bytes, v3). Jul 8 19:51:39 localhost kernel: bootsplash: status on console 1 changed to on Jul 8 19:51:39 localhost kernel: bootsplash 3.1.4-2004/02/19: looking for picture.... found (1280x1024, 27515 bytes, v3). Jul 8 19:51:39 localhost kernel: bootsplash: status on console 2 changed to on Jul 8 19:51:39 localhost kernel: bootsplash 3.1.4-2004/02/19: looking for picture.... found (1280x1024, 27515 bytes, v3). Jul 8 19:51:39 localhost kernel: bootsplash: status on console 3 changed to on Jul 8 19:51:39 localhost kernel: bootsplash 3.1.4-2004/02/19: looking for picture.... found (1280x1024, 27515 bytes, v3). Jul 8 19:51:39 localhost kernel: bootsplash: status on console 4 changed to on Jul 8 19:51:39 localhost kernel: bootsplash 3.1.4-2004/02/19: looking for picture.... found (1280x1024, 27515 bytes, v3). Jul 8 19:51:39 localhost kernel: bootsplash: status on console 5 changed to on Jul 8 19:51:41 localhost xfs: ignoring font path element /usr/share/fonts/Type1 (unreadable) Jul 8 19:51:41 localhost xfs: ignoring font path element /usr/share/fonts/Speedo (unreadable) Jul 8 19:51:41 localhost xfs: ignoring font path element /usr/share/fonts/CID (unreadable) Jul 8 19:51:41 localhost xfs: ignoring font path element /usr/share/fonts/util (unreadable) Jul 8 19:51:41 localhost xfs: ignoring font path element /usr/share/fonts/local (unreadable) Jul 8 19:51:41 localhost xfs: ignoring font path element /usr/share/fonts/Speedo (unreadable) Jul 8 19:51:41 localhost xfs: ignoring font path element /usr/share/fonts/truetype (unreadable) Jul 8 19:51:41 localhost xfs: ignoring font path element /usr/share/fonts/freefont (unreadable) Jul 8 19:51:41 localhost xfs: ignoring font path element /usr/share/fonts/sharefont (unreadable) Jul 8 19:51:41 localhost xfs: ignoring font path element /usr/share/fonts/default/Type1 (unreadable) Jul 8 19:51:41 localhost xfs: ignoring font path element /usr/share/fonts/ttf/decoratives (unreadable) Jul 8 19:51:41 localhost xfs: ignoring font path element /usr/share/fonts/ttf/western (unreadable) Jul 8 19:51:44 localhost kernel: [fglrx] Maximum main memory to use for locked dma buffers: 929 MBytes. Jul 8 19:51:44 localhost kernel: [fglrx] module loaded - fglrx 3.9.0 [May 11 2004] on minor 0 Jul 8 19:51:44 localhost kernel: mtrr: 0xd0000000,0x8000000 overlaps existing 0xd0000000,0x400000 Jul 8 19:51:44 localhost kernel: [fglrx] Maximum main memory to use for locked dma buffers: 929 MBytes. Jul 8 19:51:44 localhost kernel: [fglrx] AGP detected, AgpState = 0x1f000217 (hardware caps of chipset) Jul 8 19:51:44 localhost kernel: agpgart: Found an AGP 2.0 compliant device at 0000:00:00.0. Jul 8 19:51:44 localhost kernel: agpgart: Putting AGP V2 device at 0000:00:00.0 into 4x mode Jul 8 19:51:44 localhost kernel: agpgart: Putting AGP V2 device at 0000:01:00.0 into 4x mode Jul 8 19:51:44 localhost kernel: [fglrx] AGP enabled, AgpCommand = 0x1f000314 (selected caps) Jul 8 19:51:44 localhost kernel: [fglrx] free AGP = 121909248 Jul 8 19:51:44 localhost kernel: [fglrx] max AGP = 121909248 Jul 8 19:51:44 localhost kernel: [fglrx] free LFB = 104349696 Jul 8 19:51:44 localhost kernel: [fglrx] max LFB = 104349696 Jul 8 19:51:44 localhost kernel: [fglrx] free Inv = 0 Jul 8 19:51:44 localhost kernel: [fglrx] max Inv = 0 Jul 8 19:51:44 localhost kernel: [fglrx] total Inv = 0 Jul 8 19:51:44 localhost kernel: [fglrx] total TIM = 0 Jul 8 19:51:44 localhost kernel: [fglrx] total FB = 0 Jul 8 19:51:44 localhost kernel: [fglrx] total AGP = 32768 Jul 8 19:54:12 localhost gconfd (jan-17500): starting (version 2.6.1), pid 17500 user 'jan' Jul 8 19:54:12 localhost gconfd (jan-17500): Resolved address "xml:readonly:/etc/gconf/gconf.xml.mandatory" to a read-only config source at position 0 Jul 8 19:54:12 localhost gconfd (jan-17500): Resolved address "xml:readwrite:/home/jan/.gconf" to a writable config source at position 1 Jul 8 19:54:12 localhost gconfd (jan-17500): Resolved address "xml:readonly:/etc/gconf/gconf.xml.defaults" to a read-only config source at position 2 Jul 8 19:54:14 localhost bonobo-activation-server (jan-17505): iid OAFIID:BrokenNoType:20000808 has a NULL type Jul 8 19:54:14 localhost bonobo-activation-server (jan-17505): invalid character '#' in iid 'OAFIID:This#!!%$iid%^$%_|~!OAFIID_ContainsBadChars' Jul 8 19:54:20 localhost bonobo-activation-server (jan-17505): iid OAFIID:BrokenNoType:20000808 has a NULL type Jul 8 19:54:20 localhost bonobo-activation-server (jan-17505): invalid character '#' in iid 'OAFIID:This#!!%$iid%^$%_|~!OAFIID_ContainsBadChars' Jul 8 19:54:49 localhost sudo: jan : TTY=unknown ; PWD=/home/jan ; USER=root ; COMMAND=/usr/bin/switch_net Jul 8 19:54:58 localhost kernel: ip_tables: (C) 2000-2002 Netfilter core team Jul 8 19:54:58 localhost kernel: bootsplash 3.1.4-2004/02/19: looking for picture.... found (1280x1024, 27515 bytes, v3). Jul 8 19:54:58 localhost kernel: bootsplash: status on console 0 changed to on Jul 8 19:55:02 localhost kernel: bootsplash 3.1.4-2004/02/19: looking for picture.... found (1280x1024, 27515 bytes, v3). Jul 8 19:55:02 localhost kernel: bootsplash: status on console 0 changed to on Jul 8 20:36:12 localhost acpi_hdl[22520]: group battery - action N/A - args BAT0 00000080 00000001 Jul 8 20:36:12 localhost acpi_hdl[22520]: unhandled group Jul 8 20:38:56 localhost kernel: kjournald starting. Commit interval 5 seconds Jul 8 20:38:56 localhost kernel: EXT3 FS on dm-18, internal journal Jul 8 20:38:56 localhost kernel: EXT3-fs: mounted filesystem with ordered data mode. Jul 8 20:39:28 localhost sudo: jan : TTY=unknown ; PWD=/home/jan ; USER=root ; COMMAND=/usr/bin/switch_net Jul 8 20:39:42 localhost kernel: ip_conntrack version 2.1 (8189 buckets, 65512 max) - 296 bytes per conntrack Jul 8 20:39:56 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=0 DF PROTO=ICMP TYPE=8 CODE=0 ID=44099 SEQ=1 Jul 8 20:39:57 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=1 DF PROTO=ICMP TYPE=8 CODE=0 ID=44099 SEQ=2 Jul 8 20:39:58 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=2 DF PROTO=ICMP TYPE=8 CODE=0 ID=44099 SEQ=3 Jul 8 20:39:59 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=3 DF PROTO=ICMP TYPE=8 CODE=0 ID=44099 SEQ=4 Jul 8 20:40:00 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=4 DF PROTO=ICMP TYPE=8 CODE=0 ID=44099 SEQ=5 Jul 8 21:10:21 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=60 TOS=0x00 PREC=0x00 TTL=64 ID=33204 DF PROTO=TCP SPT=32771 DPT=80 WINDOW=5840 RES=0x00 SYN URGP=0 Jul 8 21:10:24 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=60 TOS=0x00 PREC=0x00 TTL=64 ID=33205 DF PROTO=TCP SPT=32771 DPT=80 WINDOW=5840 RES=0x00 SYN URGP=0 Jul 8 21:18:09 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=28 TOS=0x00 PREC=0x00 TTL=43 ID=46587 PROTO=ICMP TYPE=8 CODE=0 ID=43114 SEQ=19025 Jul 8 21:18:09 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=40 TOS=0x00 PREC=0x00 TTL=41 ID=660 PROTO=TCP SPT=58533 DPT=80 WINDOW=2048 RES=0x00 ACK URGP=0 Jul 8 21:18:15 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=28 TOS=0x00 PREC=0x00 TTL=45 ID=11546 PROTO=ICMP TYPE=8 CODE=0 ID=43114 SEQ=19281 Jul 8 21:18:15 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=40 TOS=0x00 PREC=0x00 TTL=48 ID=36003 PROTO=TCP SPT=58534 DPT=80 WINDOW=1024 RES=0x00 ACK URGP=0 Jul 8 21:19:12 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=40 TOS=0x00 PREC=0x00 TTL=46 ID=47257 PROTO=TCP SPT=43468 DPT=397 WINDOW=3072 RES=0x00 FIN URGP=0 Jul 8 21:19:12 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=40 TOS=0x00 PREC=0x00 TTL=41 ID=31952 PROTO=TCP SPT=43468 DPT=518 WINDOW=2048 RES=0x00 FIN URGP=0 Jul 8 21:19:12 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=40 TOS=0x00 PREC=0x00 TTL=57 ID=31495 PROTO=TCP SPT=43468 DPT=578 WINDOW=2048 RES=0x00 FIN URGP=0 Jul 8 21:19:12 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=40 TOS=0x00 PREC=0x00 TTL=38 ID=45362 PROTO=TCP SPT=43468 DPT=289 WINDOW=3072 RES=0x00 FIN URGP=0 Jul 8 21:19:30 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=40 TOS=0x00 PREC=0x00 TTL=48 ID=50669 PROTO=TCP SPT=43469 DPT=1527 WINDOW=1024 RES=0x00 FIN URGP=0 Jul 8 21:19:54 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=40 TOS=0x00 PREC=0x00 TTL=50 ID=3825 PROTO=TCP SPT=43469 DPT=1050 WINDOW=3072 RES=0x00 FIN URGP=0 Jul 8 21:20:12 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=40 TOS=0x00 PREC=0x00 TTL=54 ID=45487 PROTO=TCP SPT=43468 DPT=341 WINDOW=3072 RES=0x00 FIN URGP=0 Jul 8 21:20:30 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=40 TOS=0x00 PREC=0x00 TTL=49 ID=56253 PROTO=TCP SPT=43469 DPT=621 WINDOW=2048 RES=0x00 FIN URGP=0 Jul 8 21:20:54 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=40 TOS=0x00 PREC=0x00 TTL=51 ID=10985 PROTO=TCP SPT=43469 DPT=1361 WINDOW=4096 RES=0x00 FIN URGP=0 Jul 8 21:21:12 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=40 TOS=0x00 PREC=0x00 TTL=48 ID=52746 PROTO=TCP SPT=43468 DPT=5902 WINDOW=1024 RES=0x00 FIN URGP=0 Jul 8 21:21:30 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=40 TOS=0x00 PREC=0x00 TTL=58 ID=9564 PROTO=TCP SPT=43469 DPT=3421 WINDOW=3072 RES=0x00 FIN URGP=0 Jul 8 21:21:54 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=40 TOS=0x00 PREC=0x00 TTL=41 ID=10835 PROTO=TCP SPT=43469 DPT=1473 WINDOW=2048 RES=0x00 FIN URGP=0 Jul 8 21:22:12 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=40 TOS=0x00 PREC=0x00 TTL=43 ID=15162 PROTO=TCP SPT=43468 DPT=1367 WINDOW=4096 RES=0x00 FIN URGP=0 Jul 8 21:22:30 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=40 TOS=0x00 PREC=0x00 TTL=44 ID=65487 PROTO=TCP SPT=43469 DPT=63 WINDOW=1024 RES=0x00 FIN URGP=0 Jul 8 21:22:54 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=40 TOS=0x00 PREC=0x00 TTL=57 ID=33141 PROTO=TCP SPT=43469 DPT=2015 WINDOW=2048 RES=0x00 FIN URGP=0 Jul 8 21:23:12 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=40 TOS=0x00 PREC=0x00 TTL=58 ID=457 PROTO=TCP SPT=43468 DPT=705 WINDOW=3072 RES=0x00 FIN URGP=0 Jul 8 21:23:30 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=40 TOS=0x00 PREC=0x00 TTL=46 ID=42856 PROTO=TCP SPT=43469 DPT=1392 WINDOW=3072 RES=0x00 FIN URGP=0 Jul 8 21:23:54 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=40 TOS=0x00 PREC=0x00 TTL=59 ID=53226 PROTO=TCP SPT=43469 DPT=1 WINDOW=4096 RES=0x00 FIN URGP=0 Jul 8 21:24:13 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=40 TOS=0x00 PREC=0x00 TTL=50 ID=32431 PROTO=TCP SPT=43468 DPT=137 WINDOW=3072 RES=0x00 FIN URGP=0 Jul 8 21:24:31 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=40 TOS=0x00 PREC=0x00 TTL=55 ID=27450 PROTO=TCP SPT=43469 DPT=572 WINDOW=4096 RES=0x00 FIN URGP=0 Jul 8 21:24:55 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=40 TOS=0x00 PREC=0x00 TTL=38 ID=1027 PROTO=TCP SPT=43469 DPT=2000 WINDOW=3072 RES=0x00 FIN URGP=0 Jul 8 21:25:13 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=40 TOS=0x00 PREC=0x00 TTL=43 ID=2049 PROTO=TCP SPT=43468 DPT=903 WINDOW=4096 RES=0x00 FIN URGP=0 Jul 8 21:25:31 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=40 TOS=0x00 PREC=0x00 TTL=57 ID=42167 PROTO=TCP SPT=43469 DPT=1387 WINDOW=2048 RES=0x00 FIN URGP=0 Jul 8 21:25:55 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=40 TOS=0x00 PREC=0x00 TTL=39 ID=33875 PROTO=TCP SPT=43469 DPT=830 WINDOW=4096 RES=0x00 FIN URGP=0 Jul 8 21:26:13 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=40 TOS=0x00 PREC=0x00 TTL=43 ID=50858 PROTO=TCP SPT=43468 DPT=2014 WINDOW=4096 RES=0x00 FIN URGP=0 Jul 8 21:26:31 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=40 TOS=0x00 PREC=0x00 TTL=50 ID=40002 PROTO=TCP SPT=43469 DPT=3264 WINDOW=3072 RES=0x00 FIN URGP=0 Jul 8 21:26:55 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=40 TOS=0x00 PREC=0x00 TTL=51 ID=33356 PROTO=TCP SPT=43469 DPT=61 WINDOW=4096 RES=0x00 FIN URGP=0 Jul 8 21:27:13 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=40 TOS=0x00 PREC=0x00 TTL=38 ID=58755 PROTO=TCP SPT=43468 DPT=801 WINDOW=3072 RES=0x00 FIN URGP=0 source-highlight-3.1.6/tests/test.pc0000644000175000017500000000056311672675566014405 00000000000000prefix=/home/bettini/usr/local exec_prefix=${prefix} libdir=${exec_prefix}/lib includedir=${prefix}/include Name: libsource-highlight Description: GNU Source-highlight library. URL: http://www.gnu.org/software/src-highlite/ Version: 3.0 Libs: -L${libdir} -lsource-highlight -L/usr/lib -lboost_regex-gcc43-1_35 Cflags: -I${includedir} -I${libdir}/include -I/usr/include source-highlight-3.1.6/tests/test_refs.cpp0000644000175000017500000000224611672675567015605 00000000000000#include "test2.h" void TextGenerator::generate( const char *s ) const { (*sout) << s ; } void TextGenerator::generate( const char *s, int start, int end ) const { for ( int i = start ; i <= end ; ++i ) (*sout) << s[i] ; return ab ? a : 3; } void TextGenerator::generateln( const char *s ) const { generate( s ) ; (*sout) << endl ; } void TextGenerator::generateEntire( const char *s ) const { startTextGeneration() ; generate(s) ; endTextGeneration() ; } void TextGenerator::beginText( const char *s ) const { startTextGeneration() ; if ( s ) generate( s ) ; } void TextGenerator::endText( const char *s ) const { if ( s ) generate( s ) ; endTextGeneration() ; } TextDecorator::TextDecorator( TextGenerator *t ) : decorated( t ) { } void TextDecorator::startTextGeneration() const { startDecorate() ; if ( decorated ) decorated->startTextGeneration() ; } void TextDecorator::startTextGeneration() const { startDecorate() ; if ( decorated ) decorated->startTextGeneration() ; } void TextDecorator::endTextGeneration() const { if ( decorated ) decorated->endTextGeneration() ; endDecorate() ; mysum; } source-highlight-3.1.6/tests/test.hs0000644000175000017500000000171311672675566014413 00000000000000-- A test snippet based on -- http://google-code-prettify.googlecode.com/svn/trunk/tests/prettify_test.html -- -- A comment These --> are --| not |-- comments --but this is a comment again module Foo(bar) where import Blah import BlahBlah(blah) import Monads(Exception(..), FIO(..),unFIO,handle,runFIO,fixFIO,fio, write,writeln,HasNext(..),HasOutput(..)) {- nested comments - should {- just -} work -} instance Thingy Foo where a = b data Foo :: (* -> * -> *) -> * > * -> * where Nil :: Foo a b c Cons :: a b c -> Foo abc -> Foo a b c str = "Foo\\Bar" chars = [ 'x', '\'', '\\', '\"', '\120', '\o100', '\xbeef' ] -- Escapes too Not.A.Char = 'too long' -- Don't barf. Show that 't is a lexical error. (ident, ident', Fo''o.b'ar) (0, 12, 0x45, 0xA7, 0o177, 0O377, 0.1, 1.0, 1e3, 0.5E-3, 1.0E+45) [1,2..10] (#) = \x y -> s x y where s x y = (x+y) `mod` 13 bar (x:_) = putStrLn x main = do let foo x = do { spam $ eggs x } foo >>= bar source-highlight-3.1.6/tests/test.erl.html0000644000175000017500000003434311672675566015533 00000000000000
-module(sudoku).
-author(vmiklos@frugalware.org).
-vsn('2009-11-10').
-compile(export_all).

% Return the value of Fun or an empty list based on the value of If.
% @spec fun_or_empty(If::bool(), Fun::fun() -> [any()]) -> Ret::[any()]
% Ret = Fun() if If is true, [] otherwise.
fun_or_empty(If, Fun) ->
	case If of
		true -> Fun();
		_ -> []
	end.

% Return a cell from a field.
% @spec field(I::integer(), J::integer(), Table::[any()], M::integer()) ->
% 	Ret::any()
% Table is a flatten list of lists, M is the length of a row,
% representing a matrix, Ret is the cell in the Ith row and Jth column.
field(I, J, Table, M) ->
	P = (I-1)*M+J,
	case P > length(Table) of
		true -> 0;
		_ -> lists:nth((I-1)*M+J, Table)
	end.

% Return a cell from a field.
% @spec field(I::integer(), J::integer(), Table::[[any()]]) ->
% 	Ret::any()
% Ret is the cell in the Ith row and Jth column of Table.
field(I, J, Table) ->
	lists:nth(J, lists:nth(I, Table)).


% Round up.
% @spec ceil(X::float()) -> Ret::integer().
% Ret is the value of X, rounded up to an integer.
ceil(X) ->
	T = trunc(X),
	case X - T == 0 of
		true -> T;
		false -> T + 1
	end.

% This is the same as lists:seq(), but it returns an empty list if the
% second argument is true to make the program work with Erlang-R12, not
% just with R13.
% @spec seq(N::integer(), M::integer()) -> Ret::[integer()].
seq(_, 0) -> [];
seq(N, M) -> lists:seq(N, M).

% Finds possible values for a cell.
% @spec possible({N::integer(), Rules::[[s | w | integer()]],
% 	M::integer(), K::integer()}, L::[integer()]) -> Ret::[integer()].
% N is the distance of cells required when the s/w info is available.
% Rules is a list of lists, containing s/w/integer infos.
% M = K*K is the length of a row.
% L is a partial solution.
% Ret is a list of possible values for the next cell if the list of
% already filled ones is L.
possible(_P = {N, Rules, M, K}, L) ->
	X = (length(L) rem M)+1,
	Y = (length(L) div M)+1,
	Ok = lists:seq(1, M),
	R = field(Y, X, Rules),
	Integers = [I || I <- R, is_integer(I)],
	% first exclude values based on the s, w and integer info rules
	% and the values of both the already filled list and the
	% Rules matrix
	Swdeny = lists:append([
		fun_or_empty(X > 1 andalso lists:member(w, R),
			fun() -> X1 = field(Y, X-1, L, M), Ok -- [X1+N, X1-N] end),
		fun_or_empty(X > 1 andalso not lists:member(w, R),
			fun() -> X1 = field(Y, X-1, L, M), [X1+N, X1-N] end),
		fun_or_empty(Y > 1 andalso lists:member(s, field(Y-1, X, Rules)),
			fun() -> Y1 = field(Y-1, X, L, M), Ok -- [Y1+N, Y1-N] end),
		fun_or_empty(Y > 1 andalso not lists:member(s, field(Y-1, X, Rules)),
			fun() -> Y1 = field(Y-1, X, L, M), [Y1+N, Y1-N] end),
		fun_or_empty(length(Integers) > 0, fun() -> Ok -- Integers end)
	]),
	% these exclude values based on row / column rules and the
	% values of the Rules matrix
	Rulesdeny = case [I || I <- R, is_integer(I)] =:= [] of
		true -> lists:append(
				lists:nth(Y, Rules) ++ % row
				[lists:nth(X, I) || I <- Rules] ++ % column
				[field(I, J, Rules) || % subcell
					J <- lists:seq((ceil(X / K) - 1)* K + 1, (ceil(X / K) - 1)* K + K),
					I <- lists:seq((ceil(Y / K) - 1)* K + 1, (ceil(Y / K) - 1)* K + K)]
			);
		_ -> []
	end,
	% these exclude values based on row, column and subcell rules,
	% based on the already filled values
	Rowdeny = lists:nthtail((length(L) div M)*M, L),
	Coldeny = [lists:nth(M*(I-1)+X, L) || I <- seq(1, Y-1)],
	Subdeny = [lists:nth((I-1)*M+J, L) ||
		J <- lists:seq((ceil(X / K) - 1)* K + 1, (ceil(X / K) - 1)* K + K),
		I <- lists:seq((ceil(Y / K) - 1)* K + 1, (ceil(Y / K) - 1)* K + K),
		(I-1)*M+J < length(L)+1],
	Ok -- lists:append([Swdeny, Rulesdeny, Rowdeny, Coldeny, Subdeny]).
source-highlight-3.1.6/tests/test.properties0000644000175000017500000000054611672675566016200 00000000000000# a comment ! a comment source.favorites.jar = src/ output.favorites.jar = bin/ bin.includes = plugin.xml,\ META-INF/,\ favorites.jar,\ icons/ foo a = "foo" b = a string with escape sequences \t \n \r \\ \" \' \ (space) \u0123 c = a string with a continuation line \ continuation line d.e.f = another stringsource-highlight-3.1.6/tests/test_comments.cc.html0000644000175000017500000000175311672675567017243 00000000000000
// some tests for comments

/* first /* second */ int i; */ int i;

/*   It is the same for Java and C++
 */

/*
  These are some comments with come nesting
  e.g. /* and
  let's see if it works!
*/

// since their // behaviour is /* almost the same 

*/

/* < & > // */
source-highlight-3.1.6/tests/test.scala.html0000644000175000017500000001207311672675566016030 00000000000000
// Example Scala file for source-highlight.

case class Point(x: Double, y: Double)  

abstract case class Shape { def draw(): Unit = println(this) }  
case class Circle(center: Point, radius: Double) extends Shape  
case class Rectangle(lowerLeft: Point, height: Double, width: Double) extends Shape

import scala.actors._  
import scala.actors.Actor._  

object ShapeDrawer extends Actor {  
    def act() {  
        loop {   
            receive {  
                case s: Shape => s.draw()  
                case "exit"   => { println("exiting..."); exit }  
                case x: Any   => println("Error: Unknown message! " + x)
            }
        }
    }
}

ShapeDrawer.start() 
ShapeDrawer ! Circle(Point(0.0,0.0), 1.0)     
ShapeDrawer ! Rectangle(Point(0.0,0.0), 2, 5) 
ShapeDrawer ! 3.14159  
ShapeDrawer ! "exit"   

// Output:
// => Circle(Point(0.0,0.0),1.0)
// => Rectangle(Point(0.0,0.0),2.0,5.0)
// => Error: Unknown message! 3.14159
// => exiting...

Server.fork;
source-highlight-3.1.6/tests/test.py0000644000175000017500000000144111672675566014427 00000000000000#! /usr/bin/python import posix from string import splitfields def userinfo(filename): """ This function returns the list of users and a table containing users and their passwords """ users, table = [], {} file = open(filename, 'r') for line in file.readlines(): [name, password] = splitfields(line, ':')[:2] users.append(name) table[name] = password return users, table def main(): for filename in ('/etc/passwd', 'etc/passwd.bak'): try: users, table = userinfo(filename) print table.keys()[3:7], table['postgres'] posix.system('ls -al ' + filename) except: print 'File "' + filename + '" not found!' main() q.execute(''' select * from foo,bar,baz where foo.blah=bar.blah and baz.spam="eggs" ''') source-highlight-3.1.6/tests/wrong_syntax_include.err0000644000175000017500000000004211672675567020052 00000000000000wrong_syntax.lang:2: syntax error source-highlight-3.1.6/tests/test_java_stop.java.html0000644000175000017500000000173211672675567017735 00000000000000
// just to test the stopOnMatching property
boolean b = false;
Integer i = null ;
main( String args[] ) {
    System.out.println( "Hello from java2html :-)" ) ;
source-highlight-3.1.6/tests/test.vala0000644000175000017500000000043011672675567014720 00000000000000public interface TestIface : Object { [CCode (cname = "test_preproc")] public virtual test_method () { stdout.printf ("""multiline \literal string"""); } } public abstract class TestClass : Object, TestIface { #if 0 public signal void test_signal (size_t size); #endif }source-highlight-3.1.6/tests/test.cs0000644000175000017500000000047111672675566014406 00000000000000// classic HelloWorld in C# using System; /// /// classic HelloWorld in C# /// class HelloWorld { public double one=1.0d; public double fr4=0.25d; public ulong val1 = 34Ul; /// The main method static void Main() { Console.WriteLine("Hello, World!"); } } source-highlight-3.1.6/tests/debug.java0000644000175000017500000000031311672675565015023 00000000000000/* This is to demonstrate --debug-lang http://www.lorenzobettini.it */ package hello; public class Hello { // just some greetings ;-) /* int i = 10; System.out.println("Hello World!"); } source-highlight-3.1.6/tests/test_comments.java0000644000175000017500000000041711672675567016630 00000000000000// some tests for comments /* first /* second */ int i; */ int i; /* It is the same for Java and C++ */ /* These are some comments with come nesting e.g. /* and let's see if it works! */ // since their // behaviour is /* almost the same */ /* < & > // */ source-highlight-3.1.6/tests/test.upc.html0000644000175000017500000001311311672675567015531 00000000000000
relaxed shared [5] int *shared shared_ptr_to_shared;
strict shared [5] int y[100 * THREADS];
strict shared [5] int z[100 * THREADS];
int x[100];
shared int shared_int;
int local_int = 99;
shared int *ptr_to_shared_int;

int
main ()
{
  int i;
  size_t size;
  upc_lock_t *lock;
  lock = upc_global_lock_alloc ();
  upc_barrier 1;
  upc_forall (i = 0; i < 100 * THREADS; ++i; &z[i])
    {
      int j;
      for (j = 0; j < 100; ++j)
	{
#pragma upc strict
	  if (x[i] < x[j])
	    {
	      upc_lock (lock);
	      z[i][j] = x[i] * y[j];
	      upc_unlock (lock);
	    }
	  else
	    {
	      upc_fence;
	      z[i][j] = -x[i] * y[j];
	      upc_fence;
	    }
	}
      upc_notify 10;
      upc_wait 10;
    }
  size = upc_blocksizeof (z);
  size = upc_localsizeof (z);
  size = upc_elemsizeof (z);
  upc_lock_free (lock);
}
source-highlight-3.1.6/tests/test_string_stop.java0000644000175000017500000000017411672675567017356 00000000000000/* comment */ final / /my/regexp/ if ( ) { class; myfun ( ); } int i; int ( ); // comment? or two symbols? source-highlight-3.1.6/tests/test_newlines.lang0000644000175000017500000000035111672675567016624 00000000000000# test_newlines.lang # test that newlines in expressions are simply discarded keyword = "foo | lang" (keyword,normal,classname) = `(\
// Test for templates (probably won't compile with C++ :-)

#include "map"
#include <vector.h>
#include <algorithm>

int i = j<k && j>d

template <typename First,
          typename Second,
          typename CompareFirst = std::less<First>,
          typename CompareSecond = std::less<Second> >

Foo foo<class Test>
source-highlight-3.1.6/tests/test_header.html0000644000175000017500000002605111672675567016260 00000000000000 Header and footer test This file has been formatted with
GNU Source-highlight, http://www.gnu.org/software/src-highlite
by Lorenzo Bettini <http://www.lorenzobettini.it>
/**
** Copyright (C) 1999-2007 Lorenzo Bettini
**  
  http://www.lorenzobettini.it
  
  r2 = r2 XOR (1<<10);
  cout << "hello world" << endl;
**  
*/

// this file also contains the definition of mysum as a #define

// textgenerator.h : Text Generator class &&

#ifndef _TEXTGEN_H
#define _TEXTGEN_H

#define foo(x) (x + 1)

#define mysum myfunbody 

#include <iostream.h> // for cerr

#include "genfun.h" /* for generating functions */

class TextGenerator {
  public :
    virtual void generate( const char *s ) const { (*sout) << s ; }
    virtual void generate( const char *s, int start, int end ) const 
      {
        for ( int i = start ; i <= end ; ++i )
          (*sout) << s[i] ;
        return a<p->b ? a : 3;
      }
    virtual void generateln( const char *s ) const
	{ 
	    generate( s ) ;
	    (*sout) << endl ; 
	}
    virtual void generateEntire( const char *s ) const
	{
	    startTextGeneration() ;
	    generate(s) ;
	    endTextGeneration() ;
	}
    virtual void startTextGeneration() const {}
    virtual void endTextGeneration() const {}
    virtual void beginText( const char *s ) const
	{
	    startTextGeneration() ;
	    if ( s )
		generate( s ) ;
	}
    virtual void endText( const char *s ) const
	{
	    if ( s )
		generate( s ) ;
	    endTextGeneration() ;
	}
} ;

// Decorator
class TextDecorator : public TextGenerator {
  protected :
    TextGenerator *decorated ;
  
  public :
    TextDecorator( TextGenerator *t ) : decorated( t ) {}

    virtual void startTextGeneration() const 
    { 
	startDecorate() ;
	if ( decorated )
	    decorated->startTextGeneration() ;
    }
    virtual void endTextGeneration() const 
    { 
	if ( decorated )
	    decorated->endTextGeneration() ;
	endDecorate() ;
	mysum;
    }

    // pure virtual functions
    virtual void startDecorate() const = 0 ;
    virtual void endDecorate() const = 0 ;
} ;

#endif // _TEXTGEN_H

This is the footer. source-highlight-3.1.6/tests/missing_extension.err0000644000175000017500000000020211672675565017346 00000000000000source-highlight: missing file extension in simple.outlang source-highlight: this is needed when the output file is not specified source-highlight-3.1.6/tests/test.awk.html0000644000175000017500000003317311672675566015533 00000000000000
$6 !~ /^ack/ && $5 !~ /[SFR]/   {
        # given a tcpdump ftp trace, output one line for each send
        # in the form
        #   <send time> <seq no>
        # where <send time> is the time packet was sent (in seconds with
        # zero at time of first packet) and <seq no> is the tcp sequence
        # number of the packet divided by 1024 (i.e., Kbytes sent).
        #
        # convert time to seconds
        n = split ($1,t,":")
        tim = t[1]*3600 + t[2]*60 + t[3]
        if (! tzero) {
                tzero = tim
                OFS = "\t"
        }
        # get packet sequence number
        i = index($6,":")
        printf "%7.2f\t%g\n", tim-tzero, substr($6,1,i-1)/1024
        }

BEGIN{
  buffer = "";
}

/\015*$/ {
  gsub(/\015*$/, "");
}

/^%%S NL/ {
  print "";
  next;
}

/^%%S/ {
  gsub (/^%%S/, "%%" );
  print;
  next;
}

/^\\Syntax/ {
  printing = 1;
  indentation = 0;
  next;
}

// {
  if (buffer != "") {
    gsub(/^ */, "");
    $0 = buffer $0;
  }
  buffer = "";
}

/\|\|/ {
  gsub(/\|\|/, "-");
}

/^  */{
  gsub(/^  */, indspaces);
}

/\\Something/ {
  $0 = gensub(/\\Something *{([^}]*)}/, "<\\1>", "g");
}

/\\Literal/ {
  $0 = gensub(/\\Literal *{([^}]*)}/, "\\1", "g");
}

/\\Tex/ {
  $0 = gensub(/\\Tex *{([^}]*)}/, "\\1", "g");
}

/\\Optional/ {
  $0 = gensub(/\\Optional *{([^}]*)}/, "[\\1]", "g");
}

/\\Means/ {
  gsub(/\\Means/, "-->");
  indentation = match($0, /-->/);
  indspaces = " ";
  for(i=0; i < indentation; i++)
    indspaces = indspaces " ";
}

/\\Lbrace/ {
  gsub(/\\Lbrace/, "{");
}

/\\Rbrace/ {
  gsub(/\\Rbrace/, "}");
}

/\\Or/ {
  gsub(/\\Or/, "|");
}

/\\Next/ {
  gsub(/\\Next /, "");
}

/\\Whatever/ {
  whatind = 57;
  whatpos = match($0, /\\Whatever/);
  b = substr($0, 0, whatpos - 1)
  c = substr($0, whatpos)
  c = gensub(/\\Whatever *{([^}]*)}/, "(\\1)", "g", c);
  $0 = b;
  for(i = whatpos; i < whatind; i++)
    $0 = $0 " ";
  $0 = $0 c;
}

/^}/ {printing = 0;}

/% *$/ {
  gsub(/% *$/, "");
  buffer = $0;
  next;
}

/^ *$/ {
  $0 = "================= ERROR";
}

/  *$/ {
  gsub(/  *$/, "");
}

{ if (printing) print; }
source-highlight-3.1.6/tests/test_xhtml_doc.html0000644000175000017500000002327411672675567017015 00000000000000 source file
/*
  This is a classical Hello program
  to test source-highlight with Java programs.
  
  to have an html translation type

	source-highlight -s java -f html --input Hello.java --output Hello.html
	source-highlight -s java -f html < Hello.java > Hello.html

  or type source-highlight --help for the list of options

  written by
  Lorenzo Bettini
  http://www.lorenzobettini.it
  http://www.gnu.org/software/src-highlite
*/

package hello;

import java.io.* ;

/**
 * <p>
 * A simple Hello World class, used to demonstrate some
 * features of Java source highlighting.
 * </p>
 * TODO: nothing, just to show an highlighted TODO or FIXME
 *
 * @author Lorenzo Bettini
 * @version 2.0
 */ /// class
public class Hello {
    int foo = 1998 ;
    int hex_foo = 0xCAFEBABE;
    boolean b = false;
    Integer i = null ;
    char c = '\'', d = 'n', e = '\\' ;
    String xml = "<tag attr=\"value\">&auml;</tag>", foo2 = "\\" ;

    /* mymethod */
    public void mymethod(int i) {
	// just a foo method
    }
    /* mymethod */
   
    /* main */
    public static void main( String args[] ) {
	// just some greetings ;-)  /*
	System.out.println( "Hello from java2html :-)" ) ;
	System.out.println( "\tby Lorenzo Bettini" ) ;
	System.out.println( "\thttp://www.lorenzobettini.it" ) ;
        if (argc > 0)
            String param = argc[0];
        //System.out.println( "bye bye... :-D" ) ; // see you soon
    }
    /* main */
}
/// class

// end of file test.java
source-highlight-3.1.6/tests/test_linerange_sep.html0000644000175000017500000000532111672675567017640 00000000000000
<...>
00009: 
00010:   or type source-highlight --help for the list of options
00011: 
00012:   written by
00013:   Lorenzo Bettini
00014:   http://www.lorenzobettini.it
00015:   http://www.gnu.org/software/src-highlite
00016: */
00017: 
00018: package hello;
00019: 
00020: import java.io.* ;
00021: 
<...>
00026:  * </p>
00027:  * TODO: nothing, just to show an highlighted TODO or FIXME
00028:  *
00029:  * @author Lorenzo Bettini
00030:  * @version 2.0
00031:  */ /// class
00032: public class Hello {
00033:     int foo = 1998 ;
00034:     int hex_foo = 0xCAFEBABE;
00035:     boolean b = false;
00036:     Integer i = null ;
00037:     char c = '\'', d = 'n', e = '\\' ;
<...>
source-highlight-3.1.6/tests/test_with_html.php0000644000175000017500000000311711672675567016650 00000000000000 charset(); ?> <?php __('PhpBibliography:'); ?> <?php echo $title_for_layout; ?> meta('icon'); echo $html->css('phpbibliography'); //echo $html->css('cake.generic'); echo $scripts_for_layout; ?>
flash(); ?>
source-highlight-3.1.6/tests/test.scala0000644000175000017500000000173411672675566015067 00000000000000// Example Scala file for source-highlight. case class Point(x: Double, y: Double) abstract case class Shape { def draw(): Unit = println(this) } case class Circle(center: Point, radius: Double) extends Shape case class Rectangle(lowerLeft: Point, height: Double, width: Double) extends Shape import scala.actors._ import scala.actors.Actor._ object ShapeDrawer extends Actor { def act() { loop { receive { case s: Shape => s.draw() case "exit" => { println("exiting..."); exit } case x: Any => println("Error: Unknown message! " + x) } } } } ShapeDrawer.start() ShapeDrawer ! Circle(Point(0.0,0.0), 1.0) ShapeDrawer ! Rectangle(Point(0.0,0.0), 2, 5) ShapeDrawer ! 3.14159 ShapeDrawer ! "exit" // Output: // => Circle(Point(0.0,0.0),1.0) // => Rectangle(Point(0.0,0.0),2.0,5.0) // => Error: Unknown message! 3.14159 // => exiting... Server.fork; source-highlight-3.1.6/tests/test_template.cc0000644000175000017500000000047611672675567016267 00000000000000// Test for templates (probably won't compile with C++ :-) #include "map" #include #include int i = jd template , typename CompareSecond = std::less > Foo foo source-highlight-3.1.6/tests/test.log.html0000644000175000017500000001000411672675566015516 00000000000000
Jul  8 14:50:32 localhost kde3(pam_unix)[3229]: session opened for user bettini by (uid=0)
Jul  8 15:01:01 localhost msec: changed mode of /var/log/wtmp from 664 to 640
Jul  8 15:01:01 localhost msec: changed group of /var/log/wtmp from utmp to adm
Jul  8 15:01:01 localhost msec: changed mode of /var/log/XFree86.0.log from 644 to 640
Jul  8 15:01:01 localhost msec: changed group of /var/log/XFree86.0.log from root to adm
Jul  8 15:01:01 localhost msec: changed mode of /var/log/cups/error_log from 644 to 640
Jul  8 15:01:01 localhost msec: changed mode of /var/log/ksyms.3 from 644 to 640
Jul  8 15:01:01 localhost msec: changed group of /var/log/ksyms.3 from root to adm
Jul  8 15:01:01 localhost msec: changed mode of /var/log/ksyms.2 from 644 to 640
Jul  8 15:01:01 localhost msec: changed group of /var/log/ksyms.2 from root to adm
Jul  8 15:01:01 localhost msec: changed mode of /var/log/ksyms.1 from 644 to 640
Jul  8 15:01:01 localhost msec: changed group of /var/log/ksyms.1 from root to adm
Jul  8 15:01:01 localhost msec: changed mode of /var/log/ksyms.0 from 644 to 640
Jul  8 15:01:01 localhost msec: changed group of /var/log/ksyms.0 from root to adm
Jul  8 15:01:01 localhost msec: changed mode of /var/log/XFree86.0.log.old from 644 to 640
Jul  8 15:01:01 localhost msec: changed group of /var/log/XFree86.0.log.old from root to adm
Jul  8 15:13:01 localhost su(pam_unix)[10393]: session opened for user root by (uid=501)
source-highlight-3.1.6/tests/test_isolate.lang0000644000175000017500000000034211672675567016440 00000000000000# this is just to test if strings in regular expressions # are isolated (or not isolated) correctly keyword = "class" keyword = "first|second" type = 'for' preproc = 'wise|gain' string = `red` regexp = `exp|hi` nonsensitive source-highlight-3.1.6/tests/test.desktop.html0000644000175000017500000001576611672675566016432 00000000000000
[BrowserBar]
Width=295

# a comment

[Filebrowser]
Dir History=
Location=file://$HOME/
Separate Directories=false
Show Preview=false
Show hidden files=false
Sort by=Name
Sort case insensitively=true
Sort directories first=true
Sort reversed=false
View Style=Simple

[General]
HiddenOnExit=false
Timeout=20

[PlaylistColumnsLayout]
ColumnNames=Filename,Title,Artist,AlbumArtist,Composer,Year,Album,DiscNumber,Track,BPM,Genre,Comment,Directory,Type,Length,Bitrate,SampleRate,Score,Rating,PlayCount,LastPlayed,Mood,Filesize
ColumnOrder=0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22
ColumnWidths=0,184,92,0,0,100,92,0,0,0,0,0,73,0,80,0,0,0,0,0,0,0,0
ColumnsVersion=1
SortAscending=true
SortColumn=200

[Desktop Entry]
Encoding=UTF-8
Name=prova
Exec=prova %i %m -caption "%c"
Icon=prova
Type=Application
DocPath=prova/prova.html
Comment=A KDE KPart Application
Comment[fr]=Une application KPart pour KDE.
Comment[pt_BR]=Um Aplicativo KPart do KDE
Comment[it]=Applicazione KPart di KDE

[Desktop Entry]
Comment[fr]=Une application KPart pour KDE.
Comment[pt_BR] = Um Aplicativo KPart do KDE 
source-highlight-3.1.6/tests/test_ref.tex0000644000175000017500000003723411672675567015445 00000000000000% Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite \documentclass{article} \usepackage[usenames,dvipsnames]{color} \title{Contains references to tags} \date{} \begin{document} \maketitle \noindent \mbox{}\texttt{\textcolor{Black}{01:}} \textit{\textcolor{Brown}{/**}} \\ \mbox{}\texttt{\textcolor{Black}{02:}} \textit{\textcolor{Brown}{**\ Copyright\ (C)\ 1999-2007\ Lorenzo\ Bettini}} \\ \mbox{}\texttt{\textcolor{Black}{03:}} \textit{\textcolor{Brown}{**\ \ }} \\ \mbox{}\texttt{\textcolor{Black}{04:}} \textit{\textcolor{Brown}{\ \ }}\underline{\texttt{\textcolor{Blue}{http://www.lorenzobettini.it}}} \\ \mbox{}\texttt{\textcolor{Black}{05:}} \textit{\textcolor{Brown}{\ \ }} \\ \mbox{}\texttt{\textcolor{Black}{06:}} \textit{\textcolor{Brown}{\ \ r2\ =\ r2\ XOR\ (1\textless{}\textless{}10);}} \\ \mbox{}\texttt{\textcolor{Black}{07:}} \textit{\textcolor{Brown}{\ \ cout\ \textless{}\textless{}\ "{}hello\ world"{}\ \textless{}\textless{}\ endl;}} \\ \mbox{}\texttt{\textcolor{Black}{08:}} \textit{\textcolor{Brown}{**\ \ }} \\ \mbox{}\texttt{\textcolor{Black}{09:}} \textit{\textcolor{Brown}{*/}} \\ \mbox{}\texttt{\textcolor{Black}{10:}} \\ \mbox{}\texttt{\textcolor{Black}{11:}} \textit{\textcolor{Brown}{//\ this\ file\ also\ contains\ the\ definition\ of\ mysum\ as\ a\ \#define}} \\ \mbox{}\texttt{\textcolor{Black}{12:}} \\ \mbox{}\texttt{\textcolor{Black}{13:}} \textit{\textcolor{Brown}{//\ textgenerator.h\ :\ Text\ Generator\ class\ \&\&}} \\ \mbox{}\texttt{\textcolor{Black}{14:}} \\ \mbox{}\texttt{\textcolor{Black}{15:}} \textbf{\textcolor{RoyalBlue}{\#ifndef}}\ $\_$TEXTGEN$\_$H \\ \mbox{}{\hfill $\_$TEXTGEN$\_$H $\rightarrow$ test.h:16, page~\pageref{test.h:16}} \\ \mbox{}\texttt{\textcolor{Black}{16:}} \textbf{\textcolor{RoyalBlue}{\#define}}\ \label{test.h:16}$\_$TEXTGEN$\_$H \\ \mbox{}\texttt{\textcolor{Black}{17:}} \\ \mbox{}\texttt{\textcolor{Black}{18:}} \textbf{\textcolor{RoyalBlue}{\#define}}\ \textbf{\textcolor{Black}{\label{test.h:18}foo}}\textcolor{BrickRed}{(}x\textcolor{BrickRed}{)}\ \textcolor{BrickRed}{(}x\ \textcolor{BrickRed}{+}\ \textcolor{Purple}{1}\textcolor{BrickRed}{)} \\ \mbox{}\texttt{\textcolor{Black}{19:}} \\ \mbox{}\texttt{\textcolor{Black}{20:}} \textbf{\textcolor{RoyalBlue}{\#define}}\ \label{test.h:20}mysum\ myfunbody\ \\ \mbox{}\texttt{\textcolor{Black}{21:}} \\ \mbox{}\texttt{\textcolor{Black}{22:}} \textbf{\textcolor{RoyalBlue}{\#include}}\ \texttt{\textcolor{Red}{\textless{}iostream.h\textgreater{}}}\ \textit{\textcolor{Brown}{//\ for\ cerr}} \\ \mbox{}\texttt{\textcolor{Black}{23:}} \\ \mbox{}\texttt{\textcolor{Black}{24:}} \textbf{\textcolor{RoyalBlue}{\#include}}\ \texttt{\textcolor{Red}{"{}genfun.h"{}}}\ \textit{\textcolor{Brown}{/*\ for\ generating\ functions\ */}} \\ \mbox{}\texttt{\textcolor{Black}{25:}} \\ \mbox{}\texttt{\textcolor{Black}{26:}} \textbf{\textcolor{Blue}{class}}\ \textcolor{TealBlue}{\label{test.h:26}TextGenerator}\ \textcolor{Red}{\{} \\ \mbox{}\texttt{\textcolor{Black}{27:}} \ \ \textbf{\textcolor{Blue}{public}}\ \textcolor{BrickRed}{:} \\ \mbox{}\texttt{\textcolor{Black}{28:}} \ \ \ \ \textbf{\textcolor{Blue}{virtual}}\ \textcolor{ForestGreen}{void}\ \textbf{\textcolor{Black}{\label{test.h:28}generate}}\textcolor{BrickRed}{(}\ \textbf{\textcolor{Blue}{const}}\ \textcolor{ForestGreen}{char}\ \textcolor{BrickRed}{*}s\ \textcolor{BrickRed}{)}\ \textbf{\textcolor{Blue}{const}}\ \textcolor{Red}{\{}\ \textcolor{BrickRed}{(*}sout\textcolor{BrickRed}{)}\ \textcolor{BrickRed}{\textless{}\textless{}}\ s\ \textcolor{BrickRed}{;}\ \textcolor{Red}{\}} \\ \mbox{}\texttt{\textcolor{Black}{29:}} \ \ \ \ \textbf{\textcolor{Blue}{virtual}}\ \textcolor{ForestGreen}{void}\ \textbf{\textcolor{Black}{\label{test.h:29}generate}}\textcolor{BrickRed}{(}\ \textbf{\textcolor{Blue}{const}}\ \textcolor{ForestGreen}{char}\ \textcolor{BrickRed}{*}s\textcolor{BrickRed}{,}\ \textcolor{ForestGreen}{int}\ start\textcolor{BrickRed}{,}\ \textcolor{ForestGreen}{int}\ end\ \textcolor{BrickRed}{)}\ \textbf{\textcolor{Blue}{const}}\ \\ \mbox{}\texttt{\textcolor{Black}{30:}} \ \ \ \ \ \ \textcolor{Red}{\{} \\ \mbox{}\texttt{\textcolor{Black}{31:}} \ \ \ \ \ \ \ \ \textbf{\textcolor{Blue}{for}}\ \textcolor{BrickRed}{(}\ \textcolor{ForestGreen}{int}\ i\ \textcolor{BrickRed}{=}\ start\ \textcolor{BrickRed}{;}\ i\ \textcolor{BrickRed}{\textless{}=}\ end\ \textcolor{BrickRed}{;}\ \textcolor{BrickRed}{++}i\ \textcolor{BrickRed}{)} \\ \mbox{}\texttt{\textcolor{Black}{32:}} \ \ \ \ \ \ \ \ \ \ \textcolor{BrickRed}{(*}sout\textcolor{BrickRed}{)}\ \textcolor{BrickRed}{\textless{}\textless{}}\ s\textcolor{BrickRed}{[}i\textcolor{BrickRed}{]}\ \textcolor{BrickRed}{;} \\ \mbox{}\texttt{\textcolor{Black}{33:}} \ \ \ \ \ \ \ \ \textbf{\textcolor{Blue}{return}}\ a\textcolor{BrickRed}{\textless{}}p\textcolor{BrickRed}{-\textgreater{}}b\ \textcolor{BrickRed}{?}\ a\ \textcolor{BrickRed}{:}\ \textcolor{Purple}{3}\textcolor{BrickRed}{;} \\ \mbox{}\texttt{\textcolor{Black}{34:}} \ \ \ \ \ \ \textcolor{Red}{\}} \\ \mbox{}\texttt{\textcolor{Black}{35:}} \ \ \ \ \textbf{\textcolor{Blue}{virtual}}\ \textcolor{ForestGreen}{void}\ \textbf{\textcolor{Black}{\label{test.h:35}generateln}}\textcolor{BrickRed}{(}\ \textbf{\textcolor{Blue}{const}}\ \textcolor{ForestGreen}{char}\ \textcolor{BrickRed}{*}s\ \textcolor{BrickRed}{)}\ \textbf{\textcolor{Blue}{const}} \\ \mbox{}\texttt{\textcolor{Black}{36:}} \ \ \ \ \ \ \ \ \textcolor{Red}{\{}\ \\ \mbox{}\texttt{\textcolor{Black}{37:}} \ \ \ \ \ \ \ \ \ \ \ \ \textbf{\textcolor{Black}{generate}}\textcolor{BrickRed}{(}\ s\ \textcolor{BrickRed}{)}\ \textcolor{BrickRed}{;} \\ \mbox{}{\hfill generate $\rightarrow$ test.h:28, page~\pageref{test.h:28}} \\ \mbox{}{\hfill generate $\rightarrow$ test.h:29, page~\pageref{test.h:29}} \\ \mbox{}\texttt{\textcolor{Black}{38:}} \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{BrickRed}{(*}sout\textcolor{BrickRed}{)}\ \textcolor{BrickRed}{\textless{}\textless{}}\ endl\ \textcolor{BrickRed}{;}\ \\ \mbox{}\texttt{\textcolor{Black}{39:}} \ \ \ \ \ \ \ \ \textcolor{Red}{\}} \\ \mbox{}\texttt{\textcolor{Black}{40:}} \ \ \ \ \textbf{\textcolor{Blue}{virtual}}\ \textcolor{ForestGreen}{void}\ \textbf{\textcolor{Black}{\label{test.h:40}generateEntire}}\textcolor{BrickRed}{(}\ \textbf{\textcolor{Blue}{const}}\ \textcolor{ForestGreen}{char}\ \textcolor{BrickRed}{*}s\ \textcolor{BrickRed}{)}\ \textbf{\textcolor{Blue}{const}} \\ \mbox{}\texttt{\textcolor{Black}{41:}} \ \ \ \ \ \ \ \ \textcolor{Red}{\{} \\ \mbox{}\texttt{\textcolor{Black}{42:}} \ \ \ \ \ \ \ \ \ \ \ \ \textbf{\textcolor{Black}{startTextGeneration}}\textcolor{BrickRed}{()}\ \textcolor{BrickRed}{;} \\ \mbox{}{\hfill startTextGeneration $\rightarrow$ test.h:46, page~\pageref{test.h:46}} \\ \mbox{}{\hfill startTextGeneration $\rightarrow$ test.h:70, page~\pageref{test.h:70}} \\ \mbox{}\texttt{\textcolor{Black}{43:}} \ \ \ \ \ \ \ \ \ \ \ \ \textbf{\textcolor{Black}{generate}}\textcolor{BrickRed}{(}s\textcolor{BrickRed}{)}\ \textcolor{BrickRed}{;} \\ \mbox{}{\hfill generate $\rightarrow$ test.h:28, page~\pageref{test.h:28}} \\ \mbox{}{\hfill generate $\rightarrow$ test.h:29, page~\pageref{test.h:29}} \\ \mbox{}\texttt{\textcolor{Black}{44:}} \ \ \ \ \ \ \ \ \ \ \ \ \textbf{\textcolor{Black}{endTextGeneration}}\textcolor{BrickRed}{()}\ \textcolor{BrickRed}{;} \\ \mbox{}{\hfill endTextGeneration $\rightarrow$ test.h:47, page~\pageref{test.h:47}} \\ \mbox{}{\hfill endTextGeneration $\rightarrow$ test.h:76, page~\pageref{test.h:76}} \\ \mbox{}\texttt{\textcolor{Black}{45:}} \ \ \ \ \ \ \ \ \textcolor{Red}{\}} \\ \mbox{}\texttt{\textcolor{Black}{46:}} \ \ \ \ \textbf{\textcolor{Blue}{virtual}}\ \textcolor{ForestGreen}{void}\ \textbf{\textcolor{Black}{\label{test.h:46}startTextGeneration}}\textcolor{BrickRed}{()}\ \textbf{\textcolor{Blue}{const}}\ \textcolor{Red}{\{\}} \\ \mbox{}\texttt{\textcolor{Black}{47:}} \ \ \ \ \textbf{\textcolor{Blue}{virtual}}\ \textcolor{ForestGreen}{void}\ \textbf{\textcolor{Black}{\label{test.h:47}endTextGeneration}}\textcolor{BrickRed}{()}\ \textbf{\textcolor{Blue}{const}}\ \textcolor{Red}{\{\}} \\ \mbox{}\texttt{\textcolor{Black}{48:}} \ \ \ \ \textbf{\textcolor{Blue}{virtual}}\ \textcolor{ForestGreen}{void}\ \textbf{\textcolor{Black}{\label{test.h:48}beginText}}\textcolor{BrickRed}{(}\ \textbf{\textcolor{Blue}{const}}\ \textcolor{ForestGreen}{char}\ \textcolor{BrickRed}{*}s\ \textcolor{BrickRed}{)}\ \textbf{\textcolor{Blue}{const}} \\ \mbox{}\texttt{\textcolor{Black}{49:}} \ \ \ \ \ \ \ \ \textcolor{Red}{\{} \\ \mbox{}\texttt{\textcolor{Black}{50:}} \ \ \ \ \ \ \ \ \ \ \ \ \textbf{\textcolor{Black}{startTextGeneration}}\textcolor{BrickRed}{()}\ \textcolor{BrickRed}{;} \\ \mbox{}{\hfill startTextGeneration $\rightarrow$ test.h:46, page~\pageref{test.h:46}} \\ \mbox{}{\hfill startTextGeneration $\rightarrow$ test.h:70, page~\pageref{test.h:70}} \\ \mbox{}\texttt{\textcolor{Black}{51:}} \ \ \ \ \ \ \ \ \ \ \ \ \textbf{\textcolor{Blue}{if}}\ \textcolor{BrickRed}{(}\ s\ \textcolor{BrickRed}{)} \\ \mbox{}\texttt{\textcolor{Black}{52:}} \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textbf{\textcolor{Black}{generate}}\textcolor{BrickRed}{(}\ s\ \textcolor{BrickRed}{)}\ \textcolor{BrickRed}{;} \\ \mbox{}{\hfill generate $\rightarrow$ test.h:28, page~\pageref{test.h:28}} \\ \mbox{}{\hfill generate $\rightarrow$ test.h:29, page~\pageref{test.h:29}} \\ \mbox{}\texttt{\textcolor{Black}{53:}} \ \ \ \ \ \ \ \ \textcolor{Red}{\}} \\ \mbox{}\texttt{\textcolor{Black}{54:}} \ \ \ \ \textbf{\textcolor{Blue}{virtual}}\ \textcolor{ForestGreen}{void}\ \textbf{\textcolor{Black}{\label{test.h:54}endText}}\textcolor{BrickRed}{(}\ \textbf{\textcolor{Blue}{const}}\ \textcolor{ForestGreen}{char}\ \textcolor{BrickRed}{*}s\ \textcolor{BrickRed}{)}\ \textbf{\textcolor{Blue}{const}} \\ \mbox{}\texttt{\textcolor{Black}{55:}} \ \ \ \ \ \ \ \ \textcolor{Red}{\{} \\ \mbox{}\texttt{\textcolor{Black}{56:}} \ \ \ \ \ \ \ \ \ \ \ \ \textbf{\textcolor{Blue}{if}}\ \textcolor{BrickRed}{(}\ s\ \textcolor{BrickRed}{)} \\ \mbox{}\texttt{\textcolor{Black}{57:}} \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textbf{\textcolor{Black}{generate}}\textcolor{BrickRed}{(}\ s\ \textcolor{BrickRed}{)}\ \textcolor{BrickRed}{;} \\ \mbox{}{\hfill generate $\rightarrow$ test.h:28, page~\pageref{test.h:28}} \\ \mbox{}{\hfill generate $\rightarrow$ test.h:29, page~\pageref{test.h:29}} \\ \mbox{}\texttt{\textcolor{Black}{58:}} \ \ \ \ \ \ \ \ \ \ \ \ \textbf{\textcolor{Black}{endTextGeneration}}\textcolor{BrickRed}{()}\ \textcolor{BrickRed}{;} \\ \mbox{}{\hfill endTextGeneration $\rightarrow$ test.h:47, page~\pageref{test.h:47}} \\ \mbox{}{\hfill endTextGeneration $\rightarrow$ test.h:76, page~\pageref{test.h:76}} \\ \mbox{}\texttt{\textcolor{Black}{59:}} \ \ \ \ \ \ \ \ \textcolor{Red}{\}} \\ \mbox{}\texttt{\textcolor{Black}{60:}} \textcolor{Red}{\}}\ \textcolor{BrickRed}{;} \\ \mbox{}\texttt{\textcolor{Black}{61:}} \\ \mbox{}\texttt{\textcolor{Black}{62:}} \textit{\textcolor{Brown}{//\ Decorator}} \\ \mbox{}\texttt{\textcolor{Black}{63:}} \textbf{\textcolor{Blue}{class}}\ \textcolor{TealBlue}{\label{test.h:63}TextDecorator}\ \textcolor{BrickRed}{:}\ \textbf{\textcolor{Blue}{public}}\ TextGenerator\ \textcolor{Red}{\{} \\ \mbox{}{\hfill TextGenerator $\rightarrow$ test.h:26, page~\pageref{test.h:26}} \\ \mbox{}\texttt{\textcolor{Black}{64:}} \ \ \textbf{\textcolor{Blue}{protected}}\ \textcolor{BrickRed}{:} \\ \mbox{}\texttt{\textcolor{Black}{65:}} \ \ \ \ \textcolor{TealBlue}{TextGenerator}\ \textcolor{BrickRed}{*}\label{test.h:65}decorated\ \textcolor{BrickRed}{;} \\ \mbox{}{\hfill TextGenerator $\rightarrow$ test.h:26, page~\pageref{test.h:26}} \\ \mbox{}\texttt{\textcolor{Black}{66:}} \ \ \\ \mbox{}\texttt{\textcolor{Black}{67:}} \ \ \textbf{\textcolor{Blue}{public}}\ \textcolor{BrickRed}{:} \\ \mbox{}\texttt{\textcolor{Black}{68:}} \ \ \ \ \textbf{\textcolor{Black}{\label{test.h:68}TextDecorator}}\textcolor{BrickRed}{(}\ \textcolor{TealBlue}{TextGenerator}\ \textcolor{BrickRed}{*}t\ \textcolor{BrickRed}{)}\ \textcolor{BrickRed}{:}\ \textbf{\textcolor{Black}{decorated}}\textcolor{BrickRed}{(}\ t\ \textcolor{BrickRed}{)}\ \textcolor{Red}{\{\}} \\ \mbox{}{\hfill TextGenerator $\rightarrow$ test.h:26, page~\pageref{test.h:26}} \\ \mbox{}{\hfill decorated $\rightarrow$ test.h:65, page~\pageref{test.h:65}} \\ \mbox{}\texttt{\textcolor{Black}{69:}} \\ \mbox{}\texttt{\textcolor{Black}{70:}} \ \ \ \ \textbf{\textcolor{Blue}{virtual}}\ \textcolor{ForestGreen}{void}\ \textbf{\textcolor{Black}{\label{test.h:70}startTextGeneration}}\textcolor{BrickRed}{()}\ \textbf{\textcolor{Blue}{const}}\ \\ \mbox{}\texttt{\textcolor{Black}{71:}} \ \ \ \ \textcolor{Red}{\{}\ \\ \mbox{}\texttt{\textcolor{Black}{72:}} \ \ \ \ \ \ \ \ \textbf{\textcolor{Black}{startDecorate}}\textcolor{BrickRed}{()}\ \textcolor{BrickRed}{;} \\ \mbox{}\texttt{\textcolor{Black}{73:}} \ \ \ \ \ \ \ \ \textbf{\textcolor{Blue}{if}}\ \textcolor{BrickRed}{(}\ decorated\ \textcolor{BrickRed}{)} \\ \mbox{}{\hfill decorated $\rightarrow$ test.h:65, page~\pageref{test.h:65}} \\ \mbox{}\texttt{\textcolor{Black}{74:}} \ \ \ \ \ \ \ \ \ \ \ \ decorated\textcolor{BrickRed}{-\textgreater{}}\textbf{\textcolor{Black}{startTextGeneration}}\textcolor{BrickRed}{()}\ \textcolor{BrickRed}{;} \\ \mbox{}{\hfill decorated $\rightarrow$ test.h:65, page~\pageref{test.h:65}} \\ \mbox{}{\hfill startTextGeneration $\rightarrow$ test.h:46, page~\pageref{test.h:46}} \\ \mbox{}{\hfill startTextGeneration $\rightarrow$ test.h:70, page~\pageref{test.h:70}} \\ \mbox{}\texttt{\textcolor{Black}{75:}} \ \ \ \ \textcolor{Red}{\}} \\ \mbox{}\texttt{\textcolor{Black}{76:}} \ \ \ \ \textbf{\textcolor{Blue}{virtual}}\ \textcolor{ForestGreen}{void}\ \textbf{\textcolor{Black}{\label{test.h:76}endTextGeneration}}\textcolor{BrickRed}{()}\ \textbf{\textcolor{Blue}{const}}\ \\ \mbox{}\texttt{\textcolor{Black}{77:}} \ \ \ \ \textcolor{Red}{\{}\ \\ \mbox{}\texttt{\textcolor{Black}{78:}} \ \ \ \ \ \ \ \ \textbf{\textcolor{Blue}{if}}\ \textcolor{BrickRed}{(}\ decorated\ \textcolor{BrickRed}{)} \\ \mbox{}{\hfill decorated $\rightarrow$ test.h:65, page~\pageref{test.h:65}} \\ \mbox{}\texttt{\textcolor{Black}{79:}} \ \ \ \ \ \ \ \ \ \ \ \ decorated\textcolor{BrickRed}{-\textgreater{}}\textbf{\textcolor{Black}{endTextGeneration}}\textcolor{BrickRed}{()}\ \textcolor{BrickRed}{;} \\ \mbox{}{\hfill decorated $\rightarrow$ test.h:65, page~\pageref{test.h:65}} \\ \mbox{}{\hfill endTextGeneration $\rightarrow$ test.h:47, page~\pageref{test.h:47}} \\ \mbox{}{\hfill endTextGeneration $\rightarrow$ test.h:76, page~\pageref{test.h:76}} \\ \mbox{}\texttt{\textcolor{Black}{80:}} \ \ \ \ \ \ \ \ \textbf{\textcolor{Black}{endDecorate}}\textcolor{BrickRed}{()}\ \textcolor{BrickRed}{;} \\ \mbox{}\texttt{\textcolor{Black}{81:}} \ \ \ \ \ \ \ \ mysum\textcolor{BrickRed}{;} \\ \mbox{}{\hfill mysum $\rightarrow$ test.h:20, page~\pageref{test.h:20}} \\ \mbox{}\texttt{\textcolor{Black}{82:}} \ \ \ \ \textcolor{Red}{\}} \\ \mbox{}\texttt{\textcolor{Black}{83:}} \\ \mbox{}\texttt{\textcolor{Black}{84:}} \ \ \ \ \textit{\textcolor{Brown}{//\ pure\ virtual\ functions}} \\ \mbox{}\texttt{\textcolor{Black}{85:}} \ \ \ \ \textbf{\textcolor{Blue}{virtual}}\ \textcolor{ForestGreen}{void}\ \textbf{\textcolor{Black}{startDecorate}}\textcolor{BrickRed}{()}\ \textbf{\textcolor{Blue}{const}}\ \textcolor{BrickRed}{=}\ \textcolor{Purple}{0}\ \textcolor{BrickRed}{;} \\ \mbox{}\texttt{\textcolor{Black}{86:}} \ \ \ \ \textbf{\textcolor{Blue}{virtual}}\ \textcolor{ForestGreen}{void}\ \textbf{\textcolor{Black}{endDecorate}}\textcolor{BrickRed}{()}\ \textbf{\textcolor{Blue}{const}}\ \textcolor{BrickRed}{=}\ \textcolor{Purple}{0}\ \textcolor{BrickRed}{;} \\ \mbox{}\texttt{\textcolor{Black}{87:}} \textcolor{Red}{\}}\ \textcolor{BrickRed}{;} \\ \mbox{}\texttt{\textcolor{Black}{88:}} \\ \mbox{}\texttt{\textcolor{Black}{89:}} \textbf{\textcolor{RoyalBlue}{\#endif}}\ \textit{\textcolor{Brown}{//\ $\_$TEXTGEN$\_$H}} \\ \mbox{}\texttt{\textcolor{Black}{90:}} \end{document} source-highlight-3.1.6/tests/test.cs.html0000644000175000017500000000362511672675566015355 00000000000000
// classic HelloWorld in C#
using System;

/// <summary> 
/// classic HelloWorld in C#
/// </summary> 
class HelloWorld
{
	public double one=1.0d;
  	public double fr4=0.25d;
	public ulong val1 = 34Ul;

	/// <summary> The main method </summary> 
	static void Main() 
	{
		Console.WriteLine("Hello, World!");
	}
}
source-highlight-3.1.6/tests/test.wdefault0000644000175000017500000000012411672675567015610 00000000000000this is a keyword and test some other key1, key2 and key3 and see what's highlightedsource-highlight-3.1.6/tests/wrong_trans.outlang0000644000175000017500000000006111672675567017032 00000000000000translations "ok" "OK" 'ok' "OK" "ok" 'wrong' endsource-highlight-3.1.6/tests/test.po0000644000175000017500000000651711672675566014426 00000000000000# translation of eu_to_be_translate.po to Basque # Vasco translation of sound-juicer. # Copyright (C) 2004 THE sound-juicer'S COPYRIGHT HOLDER # This file is distributed under the same license as the sound-juicer package. # # Mikel Olasagasti , 2004, 2005. # Iñaki Larrañaga Murgoitio , 2004, 2005, 2006, 2008, 2009, 2010. # Iñaki Larrañaga Murgoitio , 2007. msgid "" msgstr "" "Project-Id-Version: eu_to_be_translate\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2010-10-06 22:54+0200\n" "PO-Revision-Date: 2010-10-06 22:55+0200\n" "Last-Translator: Iñaki Larrañaga Murgoitio \n" "Language-Team: Basque \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: KBabel 1.11.4\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: ../data/sound-juicer.desktop.in.in.h:1 msgid "Audio CD Extractor" msgstr "Audio CD erauzlea" #: ../data/sound-juicer.desktop.in.in.h:2 msgid "Copy music from your CDs" msgstr "Kopiatu musika zure CD-etatik" #: ../data/sound-juicer.schemas.in.h:2 #, no-c-format msgid "" "%at -- album title %aT -- album title (lowercase) %aa -- album artist %aA -- " "album artist (lowercase) %as -- album artist (sortable) %aS -- album artist " "(sortable lowercase) %ay -- album year %tt -- track title %tT -- track title " "(lowercase) %ta -- track artist %tA -- track artist (lowercase) %ts -- track " "artist (sortable) %tS -- track artist (sortable lowercase)" msgstr "" "%at -- albumaren titulua %aT -- albumaren titulua (letra-xehez) %aa -- " "albumaren artista %aA -- albumaren artista (letra-xehez) %as -- albumaren " "artista (ordena daiteke) %aS -- albumaren artista (letra-xehez ordena " "daiteke) %ay -- albumaren urtea %tt -- pistaren titulua %tT -- pistaren " "titulua (letra-xehez) %ta -- pistaren artista %tA -- pistaren artista (letra-" "xehez) %ts -- pistaren artista (ordena daiteke) %tS pistaren artista (letra-" "xehez ordena daiteke)" #: ../data/sound-juicer.schemas.in.h:6 #, no-c-format msgid "" "Do not specify an extension. %at -- album title %aT -- album title " "(lowercase) %aa -- album artist %aA -- album artist (lowercase) %as -- album " "artist (sortable) %aS -- album artist (sortable lowercase) %tn -- track " "number (i.e 8) %tN -- track number, zero padded (i.e 08) %tt -- track title %" "tT -- track title (lowercase) %ta -- track artist %tA -- track artist " "(lowercase) %ts -- track artist (sortable) %tS -- track artist (sortable " "lowercase) %dn -- disc and track number (i.e Disk 2 - 6, or 6) %dN -- disc " "number, zero padded (i.e d02t06, or 06)" msgstr "" "Ez zehaztu luzapenik. %at -- albumaren titulua %aT -- albumaren titulua " "(letra-xehez) %aa -- albumaren artista %aA -- albumaren artista (letra-" "xehez) %as -- albumaren artista (ordena daiteke) %aS -- albumaren artista " "(letra-xehez ordena daiteke) %tn -- pistaren zenbakia (adib. 8) %tN -- " "pistaren zenbakia, zeroz betea (adib. 08) %tt -- pistaren titulua %tT -- " "pistaren titulua (letra-xehez) %ta -- pistaren artista %tA -- pistaren " "artista (letra-xehez) %ts -- pistaren artista (ordena daiteke) %tS pistaren " "artista (letra-xehez ordena daiteke) %dn -- disko eta pistaren zenbakia " "(adib. diskoa 2 - 6, edo 6) %dN -- diskoaren zenbakia, zeroz betea (adib. " "d02t06, edo 06)" source-highlight-3.1.6/tests/test_no_line_at_the_end.java.html0000644000175000017500000000044711672675567021546 00000000000000
1: import java.io.*;
source-highlight-3.1.6/tests/wrong_already_defined_css.err0000644000175000017500000000007111672675567020772 00000000000000wrong_already_defined_css.css:5: already defined keyword source-highlight-3.1.6/tests/test.java.mediawiki0000664000175000017500000002165211676051005016646 00000000000000/*
  This is a classical Hello program
  to test source-highlight with Java programs.
  
  to have an html translation type

  source-highlight -s java -f html --input Hello.java --output Hello.html
  source-highlight -s java -f html < Hello.java > Hello.html

  or type source-highlight --help for the list of options

  written by
  Lorenzo Bettini
  http://www.lorenzobettini.it
  http://www.gnu.org/software/src-highlite
*/

package hello;

import java.io.* ;

/**
 * <p>
 * A simple Hello World class, used to demonstrate some
 * features of Java source highlighting.
 * </p>
 * TODO: nothing, just to show an highlighted TODO or FIXME
 *
 * @author Lorenzo Bettini
 * @version 2.0
 */ /// class
public class Hello {
    int foo = 1998 ;
    int hex_foo = 0xCAFEBABE;
    boolean b = false;
    Integer i = null ;
    char c = '\'', d = 'n', e = '\\' ;
    String xml = "<tag attr=\"value\">&auml;</tag>", foo2 = "\\" ;

    /* mymethod */
    public void mymethod(int i) {
  // just a foo method
    }
    /* mymethod */
   
    /* main */
    public static void main( String args[] ) {
  // just some greetings ;-)  /*
  System.out.println( "Hello from java2html :-)" ) ;
  System.out.println( "\tby Lorenzo Bettini" ) ;
  System.out.println( "\thttp://www.lorenzobettini.it" ) ;
        if (argc > 0)
            String param = argc[0];
        //System.out.println( "bye bye... :-D" ) ; // see you soon
    }
    /* main */
}
/// class

// end of file test.javasource-highlight-3.1.6/tests/test_c.c.html0000644000175000017500000000212011672675567015462 00000000000000
/* this is a test for a C program
   where we use C++ keywords as var names
   of course, these must not be highlighted as keywords */

int this = 0;
char *class = "foo";
struct private { };

begin:

goto end;

end:

goto begin;
source-highlight-3.1.6/tests/test.asm0000644000175000017500000000142611672675566014562 00000000000000; ; screen handling primitives ; .model large .data vseg dw 0b000h vmode db ? x dw 0 y dw 0 color db 07h ofs dw 0 xhite db 8 ; video information block VIOinfo struc level db ? db ? dw ? flags dw ? mode db ? db ? colors dw ? pixcol dw ? pixrow dw ? txtcol dw ? txtrow dw ? VIOinfo ends info VIOinfo <0,0,14,1,0,0,2,0,0,80,25> .code public _VIOopen, _VIOclose, _VIOcolumns, _VIOrows, _VIOmode _VIOheight proc mov al, xhite; xor ah,ah; ret _VIOheight endp odos4: mov ax,440ch mov bx,0 mov cx,037fh mov dx,offset info int 21h jnc l1 pop ds ret cga: mov info.txtrow,25 mov ax,[bp+8] mov bx,[bp+12] _VIOsetCols endp end source-highlight-3.1.6/tests/test.spec.html0000644000175000017500000000610511672675566015676 00000000000000
#
# spec file for package GNU Source Highlight (Version 1.x)
# 
# Author: Christian W. Zuckschwerdt <zany@triq.net>, Jan 2003
#

Summary:   syntax highlighting for source documents
Name:      source-highlight
Version:   3.0
Release:   3.0
License:   GPL
Group:     Utilities/Console
Source:    ftp://ftp.gnu.org/gnu/source-highlight/%{name}-%{version}.tar.gz
URL:       http://www.gnu.org/software/src-highlite/
BuildRoot: %{_tmppath}/%{name}-%{version}-root

%description  
This program, given a source file, produces a document
with syntax highlighting.  Both source languages and output formats
can be specified with a simple syntax and added dynamically.  At the
moment this package can handle many programming languages, such as,
e.g., Java, C/C++, Prolog, Perl, Php3, Python, Flex, ChangeLog, etc.
as source languages, and some output formats such, as, e.g., HTML,
XHTML, LaTeX, etc.

%prep
%setup -q

%build
./configure $MYARCH_FLAGS \
	--prefix=%{_prefix} \
	--mandir=%{_mandir} \
	--datadir=%{_datadir}

make

%install
rm -rf $RPM_BUILD_ROOT

make DESTDIR=$RPM_BUILD_ROOT install

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(644, root, root, 755)
%doc README COPYING ChangeLog TODO.txt AUTHORS THANKS
%doc doc/*.html doc/*.css
%attr(755,root,root) %{_prefix}/bin/*
%{_datadir}/%{name}/*
%{_mandir}/man?/*

source-highlight-3.1.6/tests/test.backref.html0000644000175000017500000000146411672675566016344 00000000000000
[12[ foo ]]a symbol inside ]]1a2
[[ foo ]]a symbol inside ]]1a2
[1[ foo ]]a [1[ symbol inside ]]1a2 ]]1a2
[2[ foo ]]a [1[ symbol inside ]]1a2 ]]a2
symbol
source-highlight-3.1.6/tests/test.ecore0000644000175000017500000000046111672675566015075 00000000000000 source-highlight-3.1.6/tests/test.lgt.html0000644000175000017500000007625011672675566015542 00000000000000

% this is a single-line comment

/*
this is
a block
comment
*/


:- encoding(some_encoding).
:- op(Precedence, Associativity, Operator).


:- object(prototype,
	implements(protocol),
	imports(category),
	extends(parent)).

	:- info([
		version is 1.0,
		author is 'Paulo Moura',
		date is 2008/5/1,
		comment is 'Sample prototype for testing syntax coloring.']).
	:- threaded.
	:- synchronized.
	:- dynamic.
	:- initialization(some_goal(X, Y)).
	:- calls(some_other_protocol).
	:- uses(another_object).

	:- alias(set, member/2, set_member/2).
	:- alias(words, singular//0, peculiar//0).

	:- uses(list, [append/3, member/2]).
	:- uses(queues, [new/1::new_queue/1]).

	:- public(aaa/2).
	:- meta_predicate(aaa(::, *)).
	:- discontiguous(aaa/2).
	:- mode(aaa(+callable, ?integer), zero_or_one).
	:- info(position/2, [
		comment is 'Predicate brief description.',
		arguments is ['Arg1'-'Arg1 description', 'Arg2'-'Arg2 description']]).

	:- protected(bbb/2).
	:- synchronized(bbb/2).
	:- mode(bbb(+integer, -float), one).
	:- info(bbb/2, [
		comment is 'Predicate brief description.',
		argnames is ['Arg1', 'Arg2']]).

	:- private(ccc/2).
	:- dynamic(ccc/2).
	:- mode(ccc(@atom, ?atom), one_or_more).
	:- info(ccc/2, [
		comment is 'Predicate brief description.',
		argnames is ['Arg1', 'Arg2']]).

	enumerating_entities(Object, Protocol, Category) :-
		current_category(Category),
		current_object(Object),
		current_protocol(Protocol).

	enumerating_properties :-
		category_property(Category, Property),
		object_property(Object, Property),
		protocol_property(Protocol, Property).

	creating_entities(Object, Protocol, Category) :-
		create_category(Category, Relations, Directives, Clauses),
		create_object(Object, Relations, Directives, Clauses),
		create_protocol(Protocol, Relations, Directives).

	abolishing_entities(Object, Protocol, Category) :-
		abolish_category(Category),
		abolish_object(Object),
		abolish_protocol(Protocol).

	entity_relations :-
		extends_object(Prototype, Parent, Scope),
		extends_protocol(Protocol1, Protocol2, Scope),
		extends_category(Category1, Category2, Scope),
		implements_protocol(Object, Protocol, Scope),
		imports_category(Object, Category, Scope),
		instantiates_class(Instance, Class, Scope),
		specializes_class(Class, Superclass, Scope),
		complements_object(Category, Object).

	event_handling :-
		abolish_events(Event, Object, Message, Sender, Monitor),
		current_event(Event, Object, Message, Sender, Monitor),
		define_events(Event, Object, Message, Sender, Monitor).

	multi_threading :-
		threaded(Goals),
		threaded_call(Goal),
		threaded_once(Goal),
		threaded_ignore(Goal),
		threaded_exit(Goal),
		threaded_peek(Goal),
		threaded_wait(Goal),
		threaded_notify(Notification).

	compiling_and_loading :-
		logtalk_compile(File, Options),
		logtalk_load(File, Options),
		logtalk_library_path(Library, Path).

	flags :-
		current_logtalk_flag(Flag, Value),
		set_logtalk_flag(Flag, Value).

	execution_context_methods :-
		parameter(N, Parameter),
		self(Self),
		sender(Sender),
		this(This).

	reflection_methods :-
		current_predicate(Predicate),
		predicate_property(Predicate, Property).

	database_methods :-
		abolish(Functor/Arity),
		asserta(Clause),
		assertz(Clause),
		clause(Head, Body),
		retract(Clause),
		retractall(Head).

	meta_call_methods :-
		call(Goal).

	all_solutions_methods :-
		bagof(Term, Goal, List),
		findall(Term, Goal, List),
		forall(Generate, Test),
		setof(Term, Goal, List).

	event_handler_methods :-
		before(Object, Message, Sender),
		after(Object, Message, Sender).

	dcg_rules_parsing_methods :-
		phrase(NonTerminal, Input, Rest).

	term_expansion_methods :-
		expand_term(Term, Expanded),
		term_expansion(Term, Expanded),
		goal_expansion(Goal, Expanded).

	message_sending :-
		Object::Message,
		::Message,
		^^Message.

	calling_external_code :-
		{goal1, goal2, goal3}.

	context_switching_calls :-
		Object<<Goal.

	direct_calls_of_category_predicates :-
		:Goal.

	if_then_else :-
		(	If ->
			Then
		;	Else
		).

	numbers :-
		X is 13,
		Y is 13.13,
		Z is 13.13e-23,
		C1 is 0'A, C2 is 0'', C3 is 0'",
		B is 0b1011101,
		O is 0o1234560,
		H is 0x1234567890abcDEF.

	functions :-
		A is atan(3.14) + sin(0.77) - cos(123.23),
		B is sign(-12) * abs(35/78),
		C is truncate(3.14) + round(-7.8) - ceiling(111.88),
		D is exp(3.8) - log(123.98) / sqrt(33) * 23 ** 4,
		E is rem(3, 2) + mod(5, 3) * 2 rem 2 // 5 mod 3,
		F is float_fractional_part(3.14) + float_integer_part(3.14),
		G is float(33) + floor(99.99).

	bitwise :-
		A is 16 >> 2,
		B is 16 << 2,
		C is 10 /\ 12,
		D is 10 \/ 12,
		E is \ 10.

	term_unification :-
		Term1 = Term2,
		Term1 \= Term2,
		unify_with_occurs_check(Term1, Term2).

	term_testing :-
		atom(Atom),
		atomic(Atomic),
		integer(Integer),
		float(Float),
		compound(Term),
		nonvar(Term),
		var(Term),
		number(Number).

	term_comparison :-
		Term1 == Term2,
		Term1 \== Term2,
		Term1 @< Term2,
		Term1 @=< Term2,
		Term1 @>= Term2,
		Term1 @> Term2.

	term_creation_and_decomposition :-
		functor(Term, Functor, Arity),
		arg(N, Term, Arg),
		Term =.. [Functor| Args],
		copy_term(Term, Copy).

	arithemtic_evaluation :-
		X is Expression.

	arithemtic_comparison :-
		Exp1 =:= Exp2,
		Exp1 =\= Exp2,
		Exp1 < Exp2,
		Exp1 =< Exp2,
		Exp1 > Exp2,
		Exp1 >= Exp2.

	stream_selection_and_control :-
		current_input(Stream),
		current_output(Stream),
		set_input(Stream),
		set_output(Stream),
		open(Source, Mode, Stream, Options),
		close(Stream),
		flush_output(Stream),
		stream_property(Stream, Property),
		at_end_of_stream(Stream),
		set_stream_position(Stream, Position),
		flush_output,
		at_end_of_stream.

	character_input_output :-
		get_char(Char),
		get_code(Code),
		peek_char(Char),
		peek_code(Code),
		put_char(Char),
		put_code(Code),
		nl(Stream),
		nl.

	byte_input_output :-
		get_byte(Byte),
		peek_byte(Byte),
		put_byte(Byte).

	term_input_output :-
		read(Term),
		read_term(Term),
		write(Term),
		write(Term),
		write_canonical(Term),
		write_term(Stream, Term, Options),
		current_op(Precedence, Associativity, Operator),
		op(Precedence, Associativity, Operator),
		current_char_conversion(InChar, OutChar),
		char_conversion(InChar, OutChar).

	logic_and_control :-
		\+ Goal,
		once(Goal),
		repeat,
		!.

	atomic_term_processing :-
		atom_length(Atom, Length),
		atom_chars(Atom, Chars),
		atom_codes(Atom, Codes),
		atom_concat(Atom1, Atom2, Atom),
		sub_atom(Atom, Before, Length, After, SubAtom),
		char_code(Char, Code),
		number_chars(Number, Chars),
		number_codes(Number, Codes).

	implementation_defined_hooks :-
		current_prolog_flag(Flag, Value),
		set_prolog_flag(Flag, Value),
		halt(ExitCode),
		halt.

	number(C) --> "+", number(C).
	number(C) --> "-", number(X), {C is -X}.
	number(X) --> [C], {0'0 =< C, C =< 0'9, X is C - 0'0}.

	escape_sequences :-
		write('Quoted atom with a quote ('') inside.'),
		write('Quoted atom with control escape sequences: \a \b \r \f \t \n \v'),
		write('Quoted atom with an octal escape sequence: \123\.'),
		write('Quoted atom with an hexa-decimal escape sequence: \x123f\.').

:- end_object.



:- object(class,
	implements(protected::protocol),
	imports(private::category),
	instantiates(metaclass),
	specializes(superclass)).


:- end_object.



:- object(parametric(Parameter, "String", 33.78),
	implements(protocol),
	imports(category),
	extends(parent(Parameter))).


:- end_object.



:- category(category,
	implements(protocol),
	extends(other_category)).


:- end_category.



:- protocol(extended,
	extends(minimal)).


:- end_protocol.
source-highlight-3.1.6/tests/test_regexrange3.html0000644000175000017500000000531011672675567017235 00000000000000
00041:     public void mymethod(int i) {
00042:         // just a foo method
00043:     }
00047:     public static void main( String args[] ) {
00048:         // just some greetings ;-)  /*
00049:         System.out.println( "Hello from java2html :-)" ) ;
00050:         System.out.println( "\tby Lorenzo Bettini" ) ;
00051:         System.out.println( "\thttp://www.lorenzobettini.it" ) ;
00052:         if (argc > 0)
00053:             String param = argc[0];
00054:         //System.out.println( "bye bye... :-D" ) ; // see you soon
00055:     }
source-highlight-3.1.6/tests/test.url.html0000644000175000017500000000104311672675567015543 00000000000000
_______ foo@bar.it _____ another_address.foo@bar_foo.it _________
Utility Functions
fake.url.it
http://bar.bar.com/~mynick/index.htm
http://www_foo.bar.it
<involed@email.address.it>
Not an email involed@email
source-highlight-3.1.6/tests/log.lang.html0000644000175000017500000001605511672675565015473 00000000000000
vardef basic_time = '[[:digit:]]{2}:[[:digit:]]{2}:[[:digit:]]{2}'
vardef time = '\<' + $basic_time + '\>'
vardef ip = '[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}\>'
vardef non_empty = '[^[:blank:]]+'

state date start '^[[:alpha:]]{3}[[:blank:]]{1,2}[[:digit:]]{1,2}(?=[[:blank:]]' + $basic_time + ')' begin
  state time start $time begin
    state symbol start $non_empty begin
      normal = ":" exitall
      function = '[^:\(\[]+'
      number delim "[" "]"
      number delim "(" ")"
    end
  end
end

state ip start '^' + $ip begin
  string = '[[:alnum:]]+(?=[[:blank:]]\[[[:digit:]]{2}/[[:alpha:]]{3}/[[:digit:]]{4})'
  date = '[[:digit:]]{2}/[[:alpha:]]{3}/[[:digit:]]{4}(?=:' + $basic_time + ')'
  time = $basic_time + '[[:blank:]][+-][[:digit:]]{4}'
  twonumbers = '[1-5][[:digit:]]{2}[[:blank:]][-0-9]+'
  state webmethod = "OPTIONS|GET|HEAD|POST|PUT|DELETE|TRACE|CONNECT|PROPFIND|MKCOL|COPY|MOVE|LOCK|UNLOCK" begin
    string = $non_empty exit
  end
end

vardef weekday_date = '\[[[:alpha:]]{3}[[:blank:]][[:alpha:]]{3}[[:blank:]]{1,2}[[:digit:]]{1,2}[[:blank:]](?=' + $basic_time + ')'

state date start '^' + $weekday_date begin
  time = $time
  date = '[[:digit:]]{4}\]'
  date = $weekday_date
  string = "[error]"
  comment = "[notice]"
  ip = $ip
end

ip = $ip

string = "root","failure"

(normal,port) = `((?:port|pid)[[:blank:]])([[:digit:]]+)`

state normal start '[[:blank:]](?=(IN|OUT)=)' begin
  state normal = '(IN|OUT|PROTO)=(?=[^[:blank:]]+)' begin
    string = $non_empty exit
  end
  state normal = '(SPT|DPT|TYPE|SEQ)=(?=[^[:blank:]]+)' begin
    cbracket = $non_empty exit
  end
  number = "CWR|ECE|URG|ACK|PSH|RST|SYN|FIN"
  ip = $ip
end
source-highlight-3.1.6/tests/wrong_dircolor.style0000644000175000017500000000004011672675567017204 00000000000000date yellow b ; time #9999FF ; source-highlight-3.1.6/tests/test_perl_lines.html0000644000175000017500000011633611672675567017172 00000000000000
001: # Here an extract of package MIME::Lite::HTML
002: 
003: package MIME::Lite::HTML;
004: 
005: # module MIME::Lite::HTML : Provide routine to transform a HTML page in 
006: # a MIME::Lite mail
007: # Copyright 2001 A.Barbet alian@alianwebserver.com.  All rights reserved.
008: 
009: # Revision 1.1  2002/02/07 15:58:35  bettini
010: # added scanner for perl
011: #
012: # Revision 1.12  2002/01/07 20:18:53  alian
013: # - Add replace links for frame & iframe
014: # - Correct incorrect parsing in include_css for <LINK REL="SHORTCUT ICON">
015: # tag. Tks to doggy@miniasp.com for idea and patch
016: #
017: # Revision 1.11  2001/12/13 22:42:33  alian
018: # - Correct a bug with relative anchor
019: #
020: # Revision 1.10  2001/11/07 10:52:43  alian
021: # - Add feature for get restricted url. Add LoginDetails parameter for that
022: # (tks to Leon.Halford@ing-barings.com for idea)
023: # - Change error in POD doc rfc2257 => rfc2557 (tks to
024: # justin.zaglio@morganstanley.com)
025: # - Correct warning when $url_html is undef
026: 
027: use LWP::UserAgent;
028: use HTML::LinkExtor;
029: use URI::URL;
030: use MIME::Lite;
031: use strict;
032: use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
033: 
034: require Exporter;
035: 
036: @ISA = qw(Exporter);
037: @EXPORT = qw();
038: 
039: my $LOGINDETAILS;
040: 
041: #------------------------------------------------------------------------------
042: # redefine get_basic_credentials
043: #------------------------------------------------------------------------------
044: {
045:     package RequestAgent;
046:     use vars qw(@ISA);
047:     @ISA = qw(LWP::UserAgent);
048: 
049:     sub new
050:     { 
051:         my $self = LWP::UserAgent::new(@_);
052:         $self;
053:     }
054: 
055:     sub get_basic_credentials
056:         {       
057:           my($self, $realm, $uri) = @_;
058:           # Use parameter of MIME-Lite-HTML, key LoginDetails
059:           if (defined $LOGINDETAILS) { return split(':', $LOGINDETAILS, 2); } 
060:           # Ask user on STDIN
061:           elsif (-t) 
062:             {
063:                 my $netloc = $uri->host_port;
064:                 print "Enter username for $realm at $netloc: ";
065:                 my $user = <STDIN>;
066:                 chomp($user);
067:                 # 403 if no user given
068:                 return (undef, undef) unless length $user;
069:                 print "Password: ";
070:                 system("stty -echo");
071:                 my $password = <STDIN>;
072:                 system("stty echo");
073:                 print "\n";  # because we disabled echo
074:                 chomp($password);
075:                 return ($user, $password);
076:             }
077:           # Damm we got 403 with CGI (use param LoginDetails)  ...
078:           else { return (undef, undef) }
079:         }
080:   }
081: 
082: #------------------------------------------------------------------------------
083: # new
084: #------------------------------------------------------------------------------
085: sub new
086:   {
087:     my $class = shift;
088:     my $self = {};
089:     bless $self, $class;
090:     my %param = @_;
091:     # Agent name
092:     $self->{_AGENT} = new RequestAgent;
093:     $self->{_AGENT}->agent("MIME-Lite-HTML $VERSION");
094:     $self->{_AGENT}->from('mime-lite-html@alianwebserver.com' );
095:     # Set debug level
096:     if ($param{'Debug'})
097:       {
098:         $self->{_DEBUG} = 1;
099:         delete $param{'Debug'};
100:       }
101:     # Set Login information
102:     if ($param{'LoginDetails'})
103:       {
104:           $LOGINDETAILS = $param{'LoginDetails'};
105:           delete $param{'LoginDetails'};
106:       }
107:     # Set type of include to do
108:     if ($param{'IncludeType'})
109:       {
110:         die "IncludeType must be in 'extern', 'cid' or 'location'\n" if
111:           ( ($param{'IncludeType'} ne 'extern') and
112:             ($param{'IncludeType'} ne 'cid') and
113:             ($param{'IncludeType'} ne 'location'));     
114:         $self->{_include} = $param{'IncludeType'};
115:         delete $param{'IncludeType'};
116:       }
117:     # Defaut type: use a Content-Location field
118:     else {$self->{_include}='location';}
119: 
120: ## Added by Michalis@linuxmail.org to manipulate non-us mails
121:    if ($param{'TextCharset'}) {
122:      $self->{_textcharset}=$param{'TextCharset'};
123:      delete $param{'TextCharset'};
124:    }
125:    else { $self->{_textcharset}='iso-8859-1'; }
126:    if ($param{'HTMLCharset'}) {
127:      $self->{_htmlcharset}=$param{'HTMLCharset'};
128:      delete $param{'HTMLCharset'};
129:     }
130:    else { $self->{_htmlcharset}='iso-8859-1'; }
131: 
132:    if ($param{'TextEncoding'}) {
133:      $self->{_textencoding}=$param{'TextEncoding'};
134:      delete $param{'TextEncoding'};
135:     }
136:    else { $self->{_textencoding}='7bit'; }
137: 
138:    if ($param{'HTMLEncoding'}) {
139:      $self->{_htmlencoding}=$param{'HTMLEncoding'};
140:      delete $param{'HTMLEncoding'};
141:     }
142:    else { $self->{_htmlencoding}='quoted-printable'; }
143: ## End. Default values remain as they were initially set.
144: ## No need to change existing scripts if you send US-ASCII. 
145: ## If you DON't send us-ascii, you wouldn't be able to use 
146: ## MIME::Lite::HTML anyway :-)
147: 
148:     # Set proxy to use to get file
149:     if ($param{'Proxy'})
150:       {
151:         $self->{_AGENT}->proxy('http',$param{'Proxy'}) ;
152:         print "Set proxy for http : ", $param{'Proxy'},"\n" 
153:           if ($self->{_DEBUG});
154:         delete $param{'Proxy'};
155:       }
156:     # Set hash to use with template
157:     if ($param{'HashTemplate'})
158:       {
159:         $param{'HashTemplate'} = ref($param{'HashTemplate'}) eq "HASH" 
160:           ? $param{'HashTemplate'} : %{$param{'HashTemplate'}};
161:         $self->{_HASH_TEMPLATE}= $param{'HashTemplate'};
162:         delete $param{'HashTemplate'};
163:       }
164:     $self->{_param} = \%param;
165:     # Ok I hope I known what I do ;-)
166:     MIME::Lite->quiet(1);
167:     return $self;
168:   }
169: 
170: #------------------------------------------------------------------------------
171: # POD Documentation
172: #------------------------------------------------------------------------------
173: 
174: =head1 NAME
175: 
176: MIME::Lite::HTML - Provide routine to transform a HTML page in a MIME-Lite mail
177: 
178: =head1 SYNOPSIS
179: 
180:   #!/usr/bin/perl -w 
181:   # A cgi program that do "Mail this page to a friend";
182:   # Call this script like this :
183:   # script.cgi?email=myfriend@isp.com&url=http://www.go.com
184:   use strict;
185:   use CGI qw/:standard/;
186:   use CGI::Carp qw/fatalsToBrowser/;
187:   use MIME::Lite::HTML;
188:   
189:   my $mailHTML = new MIME::Lite::HTML
190:      From     => 'MIME-Lite@alianwebserver.com',
191:      To       => param('email'),
192:      Subject => 'Your url: '.param('url');
193:   
194:   my $MIMEmail = $mailHTML->parse(param('url'));
195:   $MIMEmail->send; # or for win user : $mail->send_by_smtp('smtp.fai.com');
196:   print header,"Mail envoye (", param('url'), " to ", param('email'),")<br>\n";
197: 
198: =head1 DESCRIPTION
199: 
200: This module is a Perl mail client interface for sending message that 
201: support HTML format and build them for you..
202: This module provide routine to transform a HTML page in MIME::Lite mail.
203: So you need this module to use MIME-Lite-HTML possibilities
204: 
205: =head2 What's happen ?
206: 
207: The job done is:
208: 
209: =over
210: 
211: =item *
212: 
213: Get the file (LWP) if needed
214: 
215: =item *
216: 
217: Parse page to find include images (gif, jpg, flash)
218: 
219: =item *
220: 
221: Attach them to mail with adequat header if asked (default)
222: 
223: =item *
224: 
225: Include external CSS,Javascript file
226: 
227: =item *
228: 
229: Replace relative url with absolute one
230: 
231: =item *
232: 
233: Build the final MIME-Lite object with each part found
234: 
235: =back
236: 
237: =cut
238: 
239: ## the next one is just to see if =cut is recognized
240: sub foo
241:   {
242:     my $class = shift;
243:     my $self = {};
244:     bless $self, $class;
245:     $content =~ s/^.*content:.*?\"//i;
246:   }
247: 
248: 
249: $theline =~ s/(<=|=>|=|\-|\+|\*|\/|\*\*|;|:|\\|\'|\"|,|\.|\(|\)|\[|\]|\{|\}|<|>)/\<span class\=\"op\"\>$1\<\/span>/g;
250: 
251: $theline =~ s/(<=|=>|=|\-|\+|\*|\/|\*\*|;|:|\\|\'|\"|,|\.|\(|\)|\[|\]|\{|\}|<|>)/g;
252: 
253: if($#ARGV==2){}
254: 
255: $someString =~ m/anything/gix ;
256: $someString =~  /anything/    ;
257: if($someString =~  /anything/g   ){}
258: if(                /anything/    ){}
259: 
260: if($somestring =~  s/something/something else/gi ){}
261: $somestring =~   /something/something else/   ;
262: $somestring =~ qr/something/something else/   ;
263: 
source-highlight-3.1.6/tests/test.sql0000644000175000017500000000060411672675566014576 00000000000000# Table structure for table `authors` # -- just to test sql highlighting DROP TABLE IF EXISTS `authors`; CREATE TABLE `authors` ( `idauthor` int(11) unsigned NOT NULL auto_increment, `surname` varchar(40) NOT NULL default '', `name` varchar(40) NOT NULL default '', PRIMARY KEY (`idauthor`), key `surname` (`surname`) ) TYPE=InnoDB AUTO_INCREMENT=13 ; /* a C like comment */source-highlight-3.1.6/tests/test2.backref0000644000175000017500000000013411672675567015455 00000000000000|foo| outside #inside# outside !in|si|de! outside |bar| [12[ foo ]]a %symbol% inside ]]1a2 source-highlight-3.1.6/tests/test.java.html0000644000175000017500000001441711672675566015672 00000000000000
/*
  This is a classical Hello program
  to test source-highlight with Java programs.
  
  to have an html translation type

	source-highlight -s java -f html --input Hello.java --output Hello.html
	source-highlight -s java -f html < Hello.java > Hello.html

  or type source-highlight --help for the list of options

  written by
  Lorenzo Bettini
  http://www.lorenzobettini.it
  http://www.gnu.org/software/src-highlite
*/

package hello;

import java.io.* ;

/**
 * <p>
 * A simple Hello World class, used to demonstrate some
 * features of Java source highlighting.
 * </p>
 * TODO: nothing, just to show an highlighted TODO or FIXME
 *
 * @author Lorenzo Bettini
 * @version 2.0
 */ /// class
public class Hello {
    int foo = 1998 ;
    int hex_foo = 0xCAFEBABE;
    boolean b = false;
    Integer i = null ;
    char c = '\'', d = 'n', e = '\\' ;
    String xml = "<tag attr=\"value\">&auml;</tag>", foo2 = "\\" ;

    /* mymethod */
    public void mymethod(int i) {
	// just a foo method
    }
    /* mymethod */
   
    /* main */
    public static void main( String args[] ) {
	// just some greetings ;-)  /*
	System.out.println( "Hello from java2html :-)" ) ;
	System.out.println( "\tby Lorenzo Bettini" ) ;
	System.out.println( "\thttp://www.lorenzobettini.it" ) ;
        if (argc > 0)
            String param = argc[0];
        //System.out.println( "bye bye... :-D" ) ; // see you soon
    }
    /* main */
}
/// class

// end of file test.java
source-highlight-3.1.6/tests/cpp.langelems0000644000175000017500000000017111672675565015547 00000000000000cbracket classname comment function keyword label normal number preproc specialchar string symbol todo type url usertype source-highlight-3.1.6/tests/test_ref_post.tex0000644000175000017500000003404611672675567016510 00000000000000% Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite \documentclass{article} \usepackage[usenames,dvipsnames]{color} \title{Contains references to tags} \date{} \begin{document} \maketitle \noindent \mbox{}\texttt{\textcolor{Black}{01:}} \textit{\textcolor{Brown}{/**}} \\ \mbox{}\texttt{\textcolor{Black}{02:}} \textit{\textcolor{Brown}{**\ Copyright\ (C)\ 1999-2007\ Lorenzo\ Bettini}} \\ \mbox{}\texttt{\textcolor{Black}{03:}} \textit{\textcolor{Brown}{**\ \ }} \\ \mbox{}\texttt{\textcolor{Black}{04:}} \textit{\textcolor{Brown}{\ \ }}\underline{\texttt{\textcolor{Blue}{http://www.lorenzobettini.it}}} \\ \mbox{}\texttt{\textcolor{Black}{05:}} \textit{\textcolor{Brown}{\ \ }} \\ \mbox{}\texttt{\textcolor{Black}{06:}} \textit{\textcolor{Brown}{\ \ r2\ =\ r2\ XOR\ (1\textless{}\textless{}10);}} \\ \mbox{}\texttt{\textcolor{Black}{07:}} \textit{\textcolor{Brown}{\ \ cout\ \textless{}\textless{}\ "{}hello\ world"{}\ \textless{}\textless{}\ endl;}} \\ \mbox{}\texttt{\textcolor{Black}{08:}} \textit{\textcolor{Brown}{**\ \ }} \\ \mbox{}\texttt{\textcolor{Black}{09:}} \textit{\textcolor{Brown}{*/}} \\ \mbox{}\texttt{\textcolor{Black}{10:}} \\ \mbox{}\texttt{\textcolor{Black}{11:}} \textit{\textcolor{Brown}{//\ this\ file\ also\ contains\ the\ definition\ of\ mysum\ as\ a\ \#define}} \\ \mbox{}\texttt{\textcolor{Black}{12:}} \\ \mbox{}\texttt{\textcolor{Black}{13:}} \textit{\textcolor{Brown}{//\ textgenerator.h\ :\ Text\ Generator\ class\ \&\&}} \\ \mbox{}\texttt{\textcolor{Black}{14:}} \\ \mbox{}\texttt{\textcolor{Black}{15:}} \textbf{\textcolor{RoyalBlue}{\#ifndef}}\ $\_$TEXTGEN$\_$H \\ \mbox{}\texttt{\textcolor{Black}{16:}} \textbf{\textcolor{RoyalBlue}{\#define}}\ \label{test.h:16}$\_$TEXTGEN$\_$H \\ \mbox{}\texttt{\textcolor{Black}{17:}} \\ \mbox{}\texttt{\textcolor{Black}{18:}} \textbf{\textcolor{RoyalBlue}{\#define}}\ \textbf{\textcolor{Black}{\label{test.h:18}foo}}\textcolor{BrickRed}{(}x\textcolor{BrickRed}{)}\ \textcolor{BrickRed}{(}x\ \textcolor{BrickRed}{+}\ \textcolor{Purple}{1}\textcolor{BrickRed}{)} \\ \mbox{}\texttt{\textcolor{Black}{19:}} \\ \mbox{}\texttt{\textcolor{Black}{20:}} \textbf{\textcolor{RoyalBlue}{\#define}}\ \label{test.h:20}mysum\ myfunbody\ \\ \mbox{}\texttt{\textcolor{Black}{21:}} \\ \mbox{}\texttt{\textcolor{Black}{22:}} \textbf{\textcolor{RoyalBlue}{\#include}}\ \texttt{\textcolor{Red}{\textless{}iostream.h\textgreater{}}}\ \textit{\textcolor{Brown}{//\ for\ cerr}} \\ \mbox{}\texttt{\textcolor{Black}{23:}} \\ \mbox{}\texttt{\textcolor{Black}{24:}} \textbf{\textcolor{RoyalBlue}{\#include}}\ \texttt{\textcolor{Red}{"{}genfun.h"{}}}\ \textit{\textcolor{Brown}{/*\ for\ generating\ functions\ */}} \\ \mbox{}\texttt{\textcolor{Black}{25:}} \\ \mbox{}\texttt{\textcolor{Black}{26:}} \textbf{\textcolor{Blue}{class}}\ \textcolor{TealBlue}{\label{test.h:26}TextGenerator}\ \textcolor{Red}{\{} \\ \mbox{}\texttt{\textcolor{Black}{27:}} \ \ \textbf{\textcolor{Blue}{public}}\ \textcolor{BrickRed}{:} \\ \mbox{}\texttt{\textcolor{Black}{28:}} \ \ \ \ \textbf{\textcolor{Blue}{virtual}}\ \textcolor{ForestGreen}{void}\ \textbf{\textcolor{Black}{\label{test.h:28}generate}}\textcolor{BrickRed}{(}\ \textbf{\textcolor{Blue}{const}}\ \textcolor{ForestGreen}{char}\ \textcolor{BrickRed}{*}s\ \textcolor{BrickRed}{)}\ \textbf{\textcolor{Blue}{const}}\ \textcolor{Red}{\{}\ \textcolor{BrickRed}{(*}sout\textcolor{BrickRed}{)}\ \textcolor{BrickRed}{\textless{}\textless{}}\ s\ \textcolor{BrickRed}{;}\ \textcolor{Red}{\}} \\ \mbox{}\texttt{\textcolor{Black}{29:}} \ \ \ \ \textbf{\textcolor{Blue}{virtual}}\ \textcolor{ForestGreen}{void}\ \textbf{\textcolor{Black}{\label{test.h:29}generate}}\textcolor{BrickRed}{(}\ \textbf{\textcolor{Blue}{const}}\ \textcolor{ForestGreen}{char}\ \textcolor{BrickRed}{*}s\textcolor{BrickRed}{,}\ \textcolor{ForestGreen}{int}\ start\textcolor{BrickRed}{,}\ \textcolor{ForestGreen}{int}\ end\ \textcolor{BrickRed}{)}\ \textbf{\textcolor{Blue}{const}}\ \\ \mbox{}\texttt{\textcolor{Black}{30:}} \ \ \ \ \ \ \textcolor{Red}{\{} \\ \mbox{}\texttt{\textcolor{Black}{31:}} \ \ \ \ \ \ \ \ \textbf{\textcolor{Blue}{for}}\ \textcolor{BrickRed}{(}\ \textcolor{ForestGreen}{int}\ i\ \textcolor{BrickRed}{=}\ start\ \textcolor{BrickRed}{;}\ i\ \textcolor{BrickRed}{\textless{}=}\ end\ \textcolor{BrickRed}{;}\ \textcolor{BrickRed}{++}i\ \textcolor{BrickRed}{)} \\ \mbox{}\texttt{\textcolor{Black}{32:}} \ \ \ \ \ \ \ \ \ \ \textcolor{BrickRed}{(*}sout\textcolor{BrickRed}{)}\ \textcolor{BrickRed}{\textless{}\textless{}}\ s\textcolor{BrickRed}{[}i\textcolor{BrickRed}{]}\ \textcolor{BrickRed}{;} \\ \mbox{}\texttt{\textcolor{Black}{33:}} \ \ \ \ \ \ \ \ \textbf{\textcolor{Blue}{return}}\ a\textcolor{BrickRed}{\textless{}}p\textcolor{BrickRed}{-\textgreater{}}b\ \textcolor{BrickRed}{?}\ a\ \textcolor{BrickRed}{:}\ \textcolor{Purple}{3}\textcolor{BrickRed}{;} \\ \mbox{}\texttt{\textcolor{Black}{34:}} \ \ \ \ \ \ \textcolor{Red}{\}} \\ \mbox{}\texttt{\textcolor{Black}{35:}} \ \ \ \ \textbf{\textcolor{Blue}{virtual}}\ \textcolor{ForestGreen}{void}\ \textbf{\textcolor{Black}{\label{test.h:35}generateln}}\textcolor{BrickRed}{(}\ \textbf{\textcolor{Blue}{const}}\ \textcolor{ForestGreen}{char}\ \textcolor{BrickRed}{*}s\ \textcolor{BrickRed}{)}\ \textbf{\textcolor{Blue}{const}} \\ \mbox{}\texttt{\textcolor{Black}{36:}} \ \ \ \ \ \ \ \ \textcolor{Red}{\{}\ \\ \mbox{}\texttt{\textcolor{Black}{37:}} \ \ \ \ \ \ \ \ \ \ \ \ \textbf{\textcolor{Black}{generate}}\textcolor{BrickRed}{(}\ s\ \textcolor{BrickRed}{)}\ \textcolor{BrickRed}{;} \\ \mbox{}\texttt{\textcolor{Black}{38:}} \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{BrickRed}{(*}sout\textcolor{BrickRed}{)}\ \textcolor{BrickRed}{\textless{}\textless{}}\ endl\ \textcolor{BrickRed}{;}\ \\ \mbox{}\texttt{\textcolor{Black}{39:}} \ \ \ \ \ \ \ \ \textcolor{Red}{\}} \\ \mbox{}\texttt{\textcolor{Black}{40:}} \ \ \ \ \textbf{\textcolor{Blue}{virtual}}\ \textcolor{ForestGreen}{void}\ \textbf{\textcolor{Black}{\label{test.h:40}generateEntire}}\textcolor{BrickRed}{(}\ \textbf{\textcolor{Blue}{const}}\ \textcolor{ForestGreen}{char}\ \textcolor{BrickRed}{*}s\ \textcolor{BrickRed}{)}\ \textbf{\textcolor{Blue}{const}} \\ \mbox{}\texttt{\textcolor{Black}{41:}} \ \ \ \ \ \ \ \ \textcolor{Red}{\{} \\ \mbox{}\texttt{\textcolor{Black}{42:}} \ \ \ \ \ \ \ \ \ \ \ \ \textbf{\textcolor{Black}{startTextGeneration}}\textcolor{BrickRed}{()}\ \textcolor{BrickRed}{;} \\ \mbox{}\texttt{\textcolor{Black}{43:}} \ \ \ \ \ \ \ \ \ \ \ \ \textbf{\textcolor{Black}{generate}}\textcolor{BrickRed}{(}s\textcolor{BrickRed}{)}\ \textcolor{BrickRed}{;} \\ \mbox{}\texttt{\textcolor{Black}{44:}} \ \ \ \ \ \ \ \ \ \ \ \ \textbf{\textcolor{Black}{endTextGeneration}}\textcolor{BrickRed}{()}\ \textcolor{BrickRed}{;} \\ \mbox{}\texttt{\textcolor{Black}{45:}} \ \ \ \ \ \ \ \ \textcolor{Red}{\}} \\ \mbox{}\texttt{\textcolor{Black}{46:}} \ \ \ \ \textbf{\textcolor{Blue}{virtual}}\ \textcolor{ForestGreen}{void}\ \textbf{\textcolor{Black}{\label{test.h:46}startTextGeneration}}\textcolor{BrickRed}{()}\ \textbf{\textcolor{Blue}{const}}\ \textcolor{Red}{\{\}} \\ \mbox{}\texttt{\textcolor{Black}{47:}} \ \ \ \ \textbf{\textcolor{Blue}{virtual}}\ \textcolor{ForestGreen}{void}\ \textbf{\textcolor{Black}{\label{test.h:47}endTextGeneration}}\textcolor{BrickRed}{()}\ \textbf{\textcolor{Blue}{const}}\ \textcolor{Red}{\{\}} \\ \mbox{}\texttt{\textcolor{Black}{48:}} \ \ \ \ \textbf{\textcolor{Blue}{virtual}}\ \textcolor{ForestGreen}{void}\ \textbf{\textcolor{Black}{\label{test.h:48}beginText}}\textcolor{BrickRed}{(}\ \textbf{\textcolor{Blue}{const}}\ \textcolor{ForestGreen}{char}\ \textcolor{BrickRed}{*}s\ \textcolor{BrickRed}{)}\ \textbf{\textcolor{Blue}{const}} \\ \mbox{}\texttt{\textcolor{Black}{49:}} \ \ \ \ \ \ \ \ \textcolor{Red}{\{} \\ \mbox{}\texttt{\textcolor{Black}{50:}} \ \ \ \ \ \ \ \ \ \ \ \ \textbf{\textcolor{Black}{startTextGeneration}}\textcolor{BrickRed}{()}\ \textcolor{BrickRed}{;} \\ \mbox{}\texttt{\textcolor{Black}{51:}} \ \ \ \ \ \ \ \ \ \ \ \ \textbf{\textcolor{Blue}{if}}\ \textcolor{BrickRed}{(}\ s\ \textcolor{BrickRed}{)} \\ \mbox{}\texttt{\textcolor{Black}{52:}} \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textbf{\textcolor{Black}{generate}}\textcolor{BrickRed}{(}\ s\ \textcolor{BrickRed}{)}\ \textcolor{BrickRed}{;} \\ \mbox{}\texttt{\textcolor{Black}{53:}} \ \ \ \ \ \ \ \ \textcolor{Red}{\}} \\ \mbox{}\texttt{\textcolor{Black}{54:}} \ \ \ \ \textbf{\textcolor{Blue}{virtual}}\ \textcolor{ForestGreen}{void}\ \textbf{\textcolor{Black}{\label{test.h:54}endText}}\textcolor{BrickRed}{(}\ \textbf{\textcolor{Blue}{const}}\ \textcolor{ForestGreen}{char}\ \textcolor{BrickRed}{*}s\ \textcolor{BrickRed}{)}\ \textbf{\textcolor{Blue}{const}} \\ \mbox{}\texttt{\textcolor{Black}{55:}} \ \ \ \ \ \ \ \ \textcolor{Red}{\{} \\ \mbox{}\texttt{\textcolor{Black}{56:}} \ \ \ \ \ \ \ \ \ \ \ \ \textbf{\textcolor{Blue}{if}}\ \textcolor{BrickRed}{(}\ s\ \textcolor{BrickRed}{)} \\ \mbox{}\texttt{\textcolor{Black}{57:}} \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textbf{\textcolor{Black}{generate}}\textcolor{BrickRed}{(}\ s\ \textcolor{BrickRed}{)}\ \textcolor{BrickRed}{;} \\ \mbox{}\texttt{\textcolor{Black}{58:}} \ \ \ \ \ \ \ \ \ \ \ \ \textbf{\textcolor{Black}{endTextGeneration}}\textcolor{BrickRed}{()}\ \textcolor{BrickRed}{;} \\ \mbox{}\texttt{\textcolor{Black}{59:}} \ \ \ \ \ \ \ \ \textcolor{Red}{\}} \\ \mbox{}\texttt{\textcolor{Black}{60:}} \textcolor{Red}{\}}\ \textcolor{BrickRed}{;} \\ \mbox{}\texttt{\textcolor{Black}{61:}} \\ \mbox{}\texttt{\textcolor{Black}{62:}} \textit{\textcolor{Brown}{//\ Decorator}} \\ \mbox{}\texttt{\textcolor{Black}{63:}} \textbf{\textcolor{Blue}{class}}\ \textcolor{TealBlue}{\label{test.h:63}TextDecorator}\ \textcolor{BrickRed}{:}\ \textbf{\textcolor{Blue}{public}}\ TextGenerator\ \textcolor{Red}{\{} \\ \mbox{}\texttt{\textcolor{Black}{64:}} \ \ \textbf{\textcolor{Blue}{protected}}\ \textcolor{BrickRed}{:} \\ \mbox{}\texttt{\textcolor{Black}{65:}} \ \ \ \ \textcolor{TealBlue}{TextGenerator}\ \textcolor{BrickRed}{*}\label{test.h:65}decorated\ \textcolor{BrickRed}{;} \\ \mbox{}\texttt{\textcolor{Black}{66:}} \ \ \\ \mbox{}\texttt{\textcolor{Black}{67:}} \ \ \textbf{\textcolor{Blue}{public}}\ \textcolor{BrickRed}{:} \\ \mbox{}\texttt{\textcolor{Black}{68:}} \ \ \ \ \textbf{\textcolor{Black}{\label{test.h:68}TextDecorator}}\textcolor{BrickRed}{(}\ \textcolor{TealBlue}{TextGenerator}\ \textcolor{BrickRed}{*}t\ \textcolor{BrickRed}{)}\ \textcolor{BrickRed}{:}\ \textbf{\textcolor{Black}{decorated}}\textcolor{BrickRed}{(}\ t\ \textcolor{BrickRed}{)}\ \textcolor{Red}{\{\}} \\ \mbox{}\texttt{\textcolor{Black}{69:}} \\ \mbox{}\texttt{\textcolor{Black}{70:}} \ \ \ \ \textbf{\textcolor{Blue}{virtual}}\ \textcolor{ForestGreen}{void}\ \textbf{\textcolor{Black}{\label{test.h:70}startTextGeneration}}\textcolor{BrickRed}{()}\ \textbf{\textcolor{Blue}{const}}\ \\ \mbox{}\texttt{\textcolor{Black}{71:}} \ \ \ \ \textcolor{Red}{\{}\ \\ \mbox{}\texttt{\textcolor{Black}{72:}} \ \ \ \ \ \ \ \ \textbf{\textcolor{Black}{startDecorate}}\textcolor{BrickRed}{()}\ \textcolor{BrickRed}{;} \\ \mbox{}\texttt{\textcolor{Black}{73:}} \ \ \ \ \ \ \ \ \textbf{\textcolor{Blue}{if}}\ \textcolor{BrickRed}{(}\ decorated\ \textcolor{BrickRed}{)} \\ \mbox{}\texttt{\textcolor{Black}{74:}} \ \ \ \ \ \ \ \ \ \ \ \ decorated\textcolor{BrickRed}{-\textgreater{}}\textbf{\textcolor{Black}{startTextGeneration}}\textcolor{BrickRed}{()}\ \textcolor{BrickRed}{;} \\ \mbox{}\texttt{\textcolor{Black}{75:}} \ \ \ \ \textcolor{Red}{\}} \\ \mbox{}\texttt{\textcolor{Black}{76:}} \ \ \ \ \textbf{\textcolor{Blue}{virtual}}\ \textcolor{ForestGreen}{void}\ \textbf{\textcolor{Black}{\label{test.h:76}endTextGeneration}}\textcolor{BrickRed}{()}\ \textbf{\textcolor{Blue}{const}}\ \\ \mbox{}\texttt{\textcolor{Black}{77:}} \ \ \ \ \textcolor{Red}{\{}\ \\ \mbox{}\texttt{\textcolor{Black}{78:}} \ \ \ \ \ \ \ \ \textbf{\textcolor{Blue}{if}}\ \textcolor{BrickRed}{(}\ decorated\ \textcolor{BrickRed}{)} \\ \mbox{}\texttt{\textcolor{Black}{79:}} \ \ \ \ \ \ \ \ \ \ \ \ decorated\textcolor{BrickRed}{-\textgreater{}}\textbf{\textcolor{Black}{endTextGeneration}}\textcolor{BrickRed}{()}\ \textcolor{BrickRed}{;} \\ \mbox{}\texttt{\textcolor{Black}{80:}} \ \ \ \ \ \ \ \ \textbf{\textcolor{Black}{endDecorate}}\textcolor{BrickRed}{()}\ \textcolor{BrickRed}{;} \\ \mbox{}\texttt{\textcolor{Black}{81:}} \ \ \ \ \ \ \ \ mysum\textcolor{BrickRed}{;} \\ \mbox{}\texttt{\textcolor{Black}{82:}} \ \ \ \ \textcolor{Red}{\}} \\ \mbox{}\texttt{\textcolor{Black}{83:}} \\ \mbox{}\texttt{\textcolor{Black}{84:}} \ \ \ \ \textit{\textcolor{Brown}{//\ pure\ virtual\ functions}} \\ \mbox{}\texttt{\textcolor{Black}{85:}} \ \ \ \ \textbf{\textcolor{Blue}{virtual}}\ \textcolor{ForestGreen}{void}\ \textbf{\textcolor{Black}{startDecorate}}\textcolor{BrickRed}{()}\ \textbf{\textcolor{Blue}{const}}\ \textcolor{BrickRed}{=}\ \textcolor{Purple}{0}\ \textcolor{BrickRed}{;} \\ \mbox{}\texttt{\textcolor{Black}{86:}} \ \ \ \ \textbf{\textcolor{Blue}{virtual}}\ \textcolor{ForestGreen}{void}\ \textbf{\textcolor{Black}{endDecorate}}\textcolor{BrickRed}{()}\ \textbf{\textcolor{Blue}{const}}\ \textcolor{BrickRed}{=}\ \textcolor{Purple}{0}\ \textcolor{BrickRed}{;} \\ \mbox{}\texttt{\textcolor{Black}{87:}} \textcolor{Red}{\}}\ \textcolor{BrickRed}{;} \\ \mbox{}\texttt{\textcolor{Black}{88:}} \\ \mbox{}\texttt{\textcolor{Black}{89:}} \textbf{\textcolor{RoyalBlue}{\#endif}}\ \textit{\textcolor{Brown}{//\ $\_$TEXTGEN$\_$H}} \\ \mbox{}\texttt{\textcolor{Black}{90:}} \mbox{}{\hfill $\_$TEXTGEN$\_$H $\rightarrow$ test.h:16, page~\pageref{test.h:16}} \\ \mbox{}{\hfill TextGenerator $\rightarrow$ test.h:26, page~\pageref{test.h:26}} \\ \mbox{}{\hfill decorated $\rightarrow$ test.h:65, page~\pageref{test.h:65}} \\ \mbox{}{\hfill endTextGeneration $\rightarrow$ test.h:47, page~\pageref{test.h:47}} \\ \mbox{}{\hfill endTextGeneration $\rightarrow$ test.h:76, page~\pageref{test.h:76}} \\ \mbox{}{\hfill generate $\rightarrow$ test.h:28, page~\pageref{test.h:28}} \\ \mbox{}{\hfill generate $\rightarrow$ test.h:29, page~\pageref{test.h:29}} \\ \mbox{}{\hfill mysum $\rightarrow$ test.h:20, page~\pageref{test.h:20}} \\ \mbox{}{\hfill startTextGeneration $\rightarrow$ test.h:46, page~\pageref{test.h:46}} \\ \mbox{}{\hfill startTextGeneration $\rightarrow$ test.h:70, page~\pageref{test.h:70}} \\ \end{document} source-highlight-3.1.6/tests/test.htm.html0000644000175000017500000011460411672675566015540 00000000000000 html output formatted in html
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="GNU source-highlight 
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite">
<title>Java formatted in html</title>
</head>
<body bgcolor="white">
<pre><tt><i><font color="#9A1900">/*</font></i>
<i><font color="#9A1900">  This is a classical Hello program</font></i>
<i><font color="#9A1900">  to test source-highlight with Java programs.</font></i>
<i><font color="#9A1900">  </font></i>
<i><font color="#9A1900">  to have an html translation type</font></i>

<i><font color="#9A1900">	source-highlight -s java -f html --input Hello.java --output Hello.html</font></i>
<i><font color="#9A1900">	source-highlight -s java -f html &lt; Hello.java &gt; Hello.html</font></i>

<i><font color="#9A1900">  or type source-highlight --help for the list of options</font></i>

<i><font color="#9A1900">  written by</font></i>
<i><font color="#9A1900">  Lorenzo Bettini</font></i>
<i><font color="#9A1900">  </font></i><u><font color="#0000FF">http://www.lorenzobettini.it</font></u>
<i><font color="#9A1900">  </font></i><u><font color="#0000FF">http://www.gnu.org/software/src-highlite</font></u>
<i><font color="#9A1900">*/</font></i>

<b><font color="#000080">package</font></b> hello<font color="#990000">;</font>

<b><font color="#000080">import</font></b> java<font color="#990000">.</font>io<font color="#990000">.*</font> <font color="#990000">;</font>

<i><font color="#9A1900">/**</font></i>
<i><font color="#9A1900"> * </font></i><b><font color="#0000FF">&lt;p&gt;</font></b>
<i><font color="#9A1900"> * A simple Hello World class, used to demonstrate some</font></i>
<i><font color="#9A1900"> * features of Java source highlighting.</font></i>
<i><font color="#9A1900"> * </font></i><b><font color="#0000FF">&lt;/p&gt;</font></b>
<i><font color="#9A1900"> * </font></i><b>TODO:</b><i><font color="#9A1900"> nothing, just to show an highlighted </font></i><b>TODO</b><i><font color="#9A1900"> or </font></i><b>FIXME</b>
<i><font color="#9A1900"> *</font></i>
<i><font color="#9A1900"> * </font></i><font color="#009900">@author</font><i><font color="#9A1900"> Lorenzo Bettini</font></i>
<i><font color="#9A1900"> * </font></i><font color="#009900">@version</font><i><font color="#9A1900"> 2.0</font></i>
<i><font color="#9A1900"> */</font></i> <i><font color="#9A1900">/// class</font></i>
<b><font color="#0000FF">public</font></b> <b><font color="#0000FF">class</font></b> <font color="#008080">Hello</font> <font color="#FF0000">{</font>
    <font color="#009900">int</font> foo <font color="#990000">=</font> <font color="#993399">1998</font> <font color="#990000">;</font>
    <font color="#009900">int</font> hex_foo <font color="#990000">=</font> <font color="#993399">0xCAFEBABE</font><font color="#990000">;</font>
    <font color="#009900">boolean</font> b <font color="#990000">=</font> <b><font color="#0000FF">false</font></b><font color="#990000">;</font>
    <font color="#008080">Integer</font> i <font color="#990000">=</font> <b><font color="#0000FF">null</font></b> <font color="#990000">;</font>
    <font color="#009900">char</font> c <font color="#990000">=</font> <font color="#FF0000">'</font><font color="#CC33CC">\'</font><font color="#FF0000">'</font><font color="#990000">,</font> d <font color="#990000">=</font> <font color="#FF0000">'n'</font><font color="#990000">,</font> e <font color="#990000">=</font> <font color="#FF0000">'</font><font color="#CC33CC">\\</font><font color="#FF0000">'</font> <font color="#990000">;</font>
    <font color="#008080">String</font> xml <font color="#990000">=</font> <font color="#FF0000">"&lt;tag attr=</font><font color="#CC33CC">\"</font><font color="#FF0000">value</font><font color="#CC33CC">\"</font><font color="#FF0000">&gt;&amp;auml;&lt;/tag&gt;"</font><font color="#990000">,</font> foo2 <font color="#990000">=</font> <font color="#FF0000">"</font><font color="#CC33CC">\\</font><font color="#FF0000">"</font> <font color="#990000">;</font>

    <i><font color="#9A1900">/* mymethod */</font></i>
    <b><font color="#0000FF">public</font></b> <font color="#009900">void</font> <b><font color="#000000">mymethod</font></b><font color="#990000">(</font><font color="#009900">int</font> i<font color="#990000">)</font> <font color="#FF0000">{</font>
	<i><font color="#9A1900">// just a foo method</font></i>
    <font color="#FF0000">}</font>
    <i><font color="#9A1900">/* mymethod */</font></i>
   
    <i><font color="#9A1900">/* main */</font></i>
    <b><font color="#0000FF">public</font></b> <b><font color="#0000FF">static</font></b> <font color="#009900">void</font> <b><font color="#000000">main</font></b><font color="#990000">(</font> <font color="#008080">String</font> args<font color="#990000">[]</font> <font color="#990000">)</font> <font color="#FF0000">{</font>
	<i><font color="#9A1900">// just some greetings ;-)  /*</font></i>
	System<font color="#990000">.</font>out<font color="#990000">.</font><b><font color="#000000">println</font></b><font color="#990000">(</font> <font color="#FF0000">"Hello from java2html :-)"</font> <font color="#990000">)</font> <font color="#990000">;</font>
	System<font color="#990000">.</font>out<font color="#990000">.</font><b><font color="#000000">println</font></b><font color="#990000">(</font> <font color="#FF0000">"</font><font color="#CC33CC">\t</font><font color="#FF0000">by Lorenzo Bettini"</font> <font color="#990000">)</font> <font color="#990000">;</font>
	System<font color="#990000">.</font>out<font color="#990000">.</font><b><font color="#000000">println</font></b><font color="#990000">(</font> <font color="#FF0000">"</font><font color="#CC33CC">\t</font><font color="#FF0000">http://www.lorenzobettini.it"</font> <font color="#990000">)</font> <font color="#990000">;</font>
        <b><font color="#0000FF">if</font></b> <font color="#990000">(</font>argc <font color="#990000">&gt;</font> <font color="#993399">0</font><font color="#990000">)</font>
            <font color="#008080">String</font> param <font color="#990000">=</font> argc<font color="#990000">[</font><font color="#993399">0</font><font color="#990000">];</font>
        <i><font color="#9A1900">//System.out.println( "bye bye... :-D" ) ; // see you soon</font></i>
    <font color="#FF0000">}</font>
    <i><font color="#9A1900">/* main */</font></i>
<font color="#FF0000">}</font>
<i><font color="#9A1900">/// class</font></i>

<i><font color="#9A1900">// end of file test.java</font></i></tt></pre>
</body>
</html>

<!-- this is an
     added HTML comment
     at the end of the file -->
source-highlight-3.1.6/tests/test_py_comments_lines.html0000644000175000017500000001367711672675567020571 00000000000000
01: #! /usr/bin/python
02: 
03: """
04: This is a test for the handling of
05: comments and string literals in Python
06: """
07: 
08: '''
09: This is a test for the handling of
10: comments and string literals in Python
11: '''
12: 
13: "And this is a string meant as comment"
14: 
15: def test():             # The test routine
16:   '''
17:   It does nothing but printing different strings
18:   '''
19: 
20:   """
21:   It does nothing but printing different strings
22:   """
23: 
24:   print "This is the first test",
25:   print 'and this the second'
26: 
27:   'Here start the multi-lined outputs'
28: 
29:   print '''
30: Here we have
31: a multi-line
32: string.
33: '''
34: 
35:   print """
36: Here we have
37: a multi-line
38: string.
39: """
40:   print '''
41: And this is a
42: second one
43: '''
44:   # End of printing
45:   pass                  # A NOP at last
46: 
47: """
48: """
49: 'And here the fun starts'
50: test()
51: 
52: table = { 'S'  : ['5'],
53:  'a'  : ['4','a','@'],
54:  'b'  : ['8','B'],
55:  "ps" : ["Pz"],
56:  'ss' : ['5S','S5'],
57:  'es' : ['3Z','3z'],
58:  'ou' : ['00'] }
59: 
source-highlight-3.1.6/tests/wrong_dyn_backref.err0000644000175000017500000000021011672675567017265 00000000000000wrong_dyn_backref.lang:2: 3 subexpressions requested, but only 2 found wrong_dyn_backref.lang:2: Caused by: Invalid regular expression. source-highlight-3.1.6/tests/test_extreme_comment2.cpp0000644000175000017500000000057311672675567020124 00000000000000// test special #if 0 treatment int main() { #if 0 // equivalent to a comment int i = 10; printf("this should never be executed\n"); # ifdef FOO printf("foo\n"); # ifndef BAR printf("no bar\n"); # else # endif # else printf("no foo\n"); # endif // FOO return 1; #else printf("Hello world!\n"); return 0; #endif printf("never reach here!\n"); } source-highlight-3.1.6/tests/test.y0000644000175000017500000000543311672675567014255 00000000000000%{ /* * Copyright (C) 1999, 2000, 2001 Lorenzo Bettini * * 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., 675 Mass Ave, Cambridge, MA 02139, USA. * */ #include #include #include #include #include "my_sstream.h" #include "tags.h" #include "colors.h" #include "keys.h" #include "messages.h" #include "parsetags.h" #include "fileutil.h" using std::cerr; static int yyparse() ; static void yyerror( char *s ) ; int line = 1 ; static void add_tag(Tags *tags, Tag *t); extern int opsc_lex() ; extern FILE *opsc_in ; %} %union { int tok ; /* command */ char * string ; /* string : id, ... */ int flag ; Tag *tag ; Tags *tags ; } ; %token BOLD ITALICS UNDERLINE %token KEY COLOR %type option %type options %type values value %% globaltags : options { setTags( $1 ) ; } ; options : options option { add_tag( $1, $2 ) ; } | option { $$ = new Tags() ; $$->AddTag( $1 ) ; } ; option : KEY COLOR { printMessage( $1 ) ; printMessage( $2 ) ; } values ';' { $$ = new Tag( $1, $2 ) ; $$->SetFlags($4) ; } ; values : values ',' value { $$ = $1 | $3 ; } | value ; value : { $$ = 0 ; printMessage( " (no options) " ) ; } | BOLD { printMessage( " - bold" ) ; $$ = ISBOLD ; } | ITALICS { printMessage( " - italics" ) ; $$ = ISITALIC ; } | UNDERLINE { printMessage( " - underline" ) ; $$ = ISUNDERLINE ; } ; %% char *current_file = 0; void parseTags(const string &path, const string &name) { // opens the file for yylex opsc_in = open_data_file_stream(path, name); printMessage_noln( "Parsing ", cerr ) ; printMessage_noln (name, cerr); printMessage( " file ...", cerr ) ; yyparse() ; printMessage( "Parsing done!", cerr ) ; } void yyerror( char *s ) { ostringstream str ; str << current_file << ":" << line << ": " << s << ", in option declaration"; printError( str.str().c_str(), cerr ) ; exit(EXIT_FAILURE); } void add_tag(Tags *tags, Tag *t) { if (! tags->AddTag(t)) { yyerror("already defined"); } } source-highlight-3.1.6/tests/test2.diff0000644000175000017500000000310211672675567014766 00000000000000diff -rc2P source-highlight-2.1.1/source-highlight.spec source-highlight-2.1.2/source-highlight.spec *** source-highlight-2.1.1/source-highlight.spec 2005-08-03 14:54:18.000000000 +0200 --- source-highlight-2.1.2/source-highlight.spec 2005-08-25 16:11:37.000000000 +0200 *************** *** 7,12 **** Summary: syntax highlighting for source documents Name: source-highlight ! Version: 2.1.1 ! Release: 2.1.1 License: GPL Group: Utilities/Console --- 7,12 ---- Summary: syntax highlighting for source documents Name: source-highlight ! Version: 2.1.2 ! Release: 2.1.2 License: GPL Group: Utilities/Console diff -rc2P source-highlight-2.1.1/src/latex.outlang source-highlight-2.1.2/src/latex.outlang *** source-highlight-2.1.1/src/latex.outlang 2005-07-12 22:21:46.000000000 +0200 --- source-highlight-2.1.2/src/latex.outlang 2005-08-25 16:15:53.000000000 +0200 *************** *** 35,37 **** --- 35,38 ---- "--" "-\\/-" "---" "-\\/-\\/-" + "\"" "\"{}" # avoids problems with some inputenc end \ No newline at end of file diff -rc2P source-highlight-2.1.1/src/lib/messages.cc source-highlight-2.1.2/src/lib/messages.cc *** source-highlight-2.1.1/src/lib/messages.cc 2005-07-12 12:18:59.000000000 +0200 --- source-highlight-2.1.2/src/lib/messages.cc 2005-08-25 16:08:44.000000000 +0200 *************** *** 86,87 **** --- 86,93 ---- exit(EXIT_FAILURE); } + + void foundBug(const std::string &error, const std::string &file, int line) + { + cerr << PACKAGE << ": " << error << ", " << file << ":" << line << endl; + exit(EXIT_FAILURE); + } source-highlight-3.1.6/tests/test_refs.h0000644000175000017500000000354011672675567015250 00000000000000/* ** Copyright (C) 1999, 2000, 2001 Lorenzo Bettini ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, or ** (at your option) any later version. ** ** This program is distributed in the hope that it will be useful, ** but WITHOUT ANY WARRANTY; without even the implied warranty of ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ** GNU General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with this program; if not, write to the Free Software ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ** */ // this file also contains the definition of mysum as a #define // textgenerator.h : Text Generator class && #ifndef _TEXTGEN_H #define _TEXTGEN_H #define foo(x) (x + 1) #define mysum myfunbody #include // for cerr #include "genfun.h" /* for generating functions */ class TextGenerator { public : virtual void generate( const char *s ) const; virtual void generate( const char *s, int start, int end ) const; virtual void generateln( const char *s ) const; virtual void generateEntire( const char *s ) const; virtual void startTextGeneration() const {} virtual void endTextGeneration() const {} virtual void beginText( const char *s ) const; virtual void endText( const char *s ) const; } ; // Decorator class TextDecorator : public TextGenerator { protected : TextGenerator *decorated ; public : TextDecorator( TextGenerator *t ); virtual void startTextGeneration() const; virtual void endTextGeneration() const; // pure virtual functions virtual void startDecorate() const = 0 ; virtual void endDecorate() const = 0 ; } ; #endif // _TEXTGEN_H source-highlight-3.1.6/tests/access.log.html0000644000175000017500000012416711672675565016017 00000000000000
127.0.0.1 - jan [30/Jun/2004:22:20:17 +0200] "GET /cgi-bin/trac.cgi/login HTTP/1.1" 302 4370 "http://saturn.solar_system/cgi-bin/trac.cgi" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040620 Galeon/1.3.15"
127.0.0.1 - - [01/Jun/2004:20:57:40 +0200] "GET / HTTP/1.1" 200 1456 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14"
127.0.0.1 - - [01/Jun/2004:20:57:40 +0200] "GET /apache_pb.gif HTTP/1.1" 200 2326 "http://localhost/" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14"
127.0.0.1 - - [01/Jun/2004:20:57:43 +0200] "GET /manual/ HTTP/1.1" 404 65 "http://localhost/" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14"
127.0.0.1 - - [01/Jun/2004:20:57:47 +0200] "GET / HTTP/1.1" 200 1456 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14"
127.0.0.1 - - [01/Jun/2004:21:02:11 +0200] "GET / HTTP/1.1" 200 1456 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14"
127.0.0.1 - - [01/Jun/2004:21:02:11 +0200] "GET /apache_pb.gif HTTP/1.1" 200 2326 "http://localhost/" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14"
127.0.0.1 - - [01/Jun/2004:21:02:13 +0200] "GET /manual/ HTTP/1.1" 404 79 "http://localhost/" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14"
127.0.0.1 - - [01/Jun/2004:21:02:14 +0200] "GET /manual/ HTTP/1.1" 404 79 "http://localhost/" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14"
127.0.0.1 - - [01/Jun/2004:21:02:17 +0200] "GET /manual/ HTTP/1.1" 404 79 "http://localhost/" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14"
127.0.0.1 - - [01/Jun/2004:21:03:19 +0200] "GET / HTTP/1.0" 200 1456 "-" "Links (2.1pre11; Linux 2.6.5-gentoo-r1 i686; 80x24)"
127.0.0.1 - - [01/Jun/2004:21:03:22 +0200] "GET /manual/ HTTP/1.0" 404 79 "-" "Links (2.1pre11; Linux 2.6.5-gentoo-r1 i686; 80x24)"
127.0.0.1 - - [01/Jun/2004:21:04:12 +0200] "GET /manual/ HTTP/1.1" 200 168 "http://localhost/" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14"
127.0.0.1 - - [01/Jun/2004:21:04:20 +0200] "GET / HTTP/1.1" 200 1456 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14"
127.0.0.1 - - [01/Jun/2004:21:04:24 +0200] "GET /manual/ HTTP/1.1" 200 168 "http://localhost/" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14"
127.0.0.1 - - [01/Jun/2004:21:04:27 +0200] "GET /manual/ HTTP/1.1" 200 168 "http://localhost/" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14"
127.0.0.1 - - [01/Jun/2004:21:32:32 +0200] "GET / HTTP/1.1" 200 1456 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14"
127.0.0.1 - - [01/Jun/2004:21:32:36 +0200] "GET /manual/ HTTP/1.1" 200 2117 "http://localhost/" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14"
127.0.0.1 - - [01/Jun/2004:21:32:36 +0200] "GET /manual/style/css/manual.css HTTP/1.1" 200 18056 "http://localhost/manual/" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14"
127.0.0.1 - - [01/Jun/2004:21:32:36 +0200] "GET /manual/style/css/manual-print.css HTTP/1.1" 200 12948 "http://localhost/manual/" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14"
127.0.0.1 - - [01/Jun/2004:21:32:36 +0200] "GET /manual/style/css/manual-loose-100pc.css HTTP/1.1" 200 2882 "http://localhost/manual/" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14"
127.0.0.1 - - [01/Jun/2004:21:32:36 +0200] "GET /manual/images/feather.gif HTTP/1.1" 200 6471 "http://localhost/manual/" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14"
127.0.0.1 - - [01/Jun/2004:21:32:36 +0200] "GET /manual/images/left.gif HTTP/1.1" 200 60 "http://localhost/manual/" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14"
127.0.0.1 - - [01/Jun/2004:21:32:36 +0200] "GET /manual/images/favicon.ico HTTP/1.1" 200 1078 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14"
127.0.0.1 - - [01/Jun/2004:21:32:40 +0200] "GET /manual/vhosts/ HTTP/1.1" 200 2196 "http://localhost/manual/" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14"
127.0.0.1 - - [01/Jun/2004:21:32:40 +0200] "GET /manual/style/css/manual.css HTTP/1.1" 200 18056 "http://localhost/manual/vhosts/" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14"
127.0.0.1 - - [01/Jun/2004:21:32:40 +0200] "GET /manual/style/css/manual-loose-100pc.css HTTP/1.1" 200 2882 "http://localhost/manual/vhosts/" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14"
127.0.0.1 - - [01/Jun/2004:21:32:40 +0200] "GET /manual/style/css/manual-print.css HTTP/1.1" 200 12948 "http://localhost/manual/vhosts/" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14"
127.0.0.1 - - [01/Jun/2004:21:32:40 +0200] "GET /manual/images/favicon.ico HTTP/1.1" 200 1078 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14"
127.0.0.1 - - [01/Jun/2004:21:32:40 +0200] "GET /manual/images/up.gif HTTP/1.1" 200 57 "http://localhost/manual/vhosts/" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14"
127.0.0.1 - - [01/Jun/2004:21:32:40 +0200] "GET /manual/images/down.gif HTTP/1.1" 200 56 "http://localhost/manual/vhosts/" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14"
127.0.0.1 - - [01/Jun/2004:21:32:42 +0200] "GET /manual/ HTTP/1.1" 200 2117 "http://localhost/" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14"
127.0.0.1 - - [01/Jun/2004:21:32:42 +0200] "GET /manual/style/css/manual.css HTTP/1.1" 200 18056 "http://localhost/manual/" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14"
127.0.0.1 - - [01/Jun/2004:21:32:42 +0200] "GET /manual/style/css/manual-print.css HTTP/1.1" 200 12948 "http://localhost/manual/" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14"
127.0.0.1 - - [01/Jun/2004:21:32:42 +0200] "GET /manual/style/css/manual-loose-100pc.css HTTP/1.1" 200 2882 "http://localhost/manual/" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14"
127.0.0.1 - - [01/Jun/2004:21:32:42 +0200] "GET /manual/images/favicon.ico HTTP/1.1" 200 1078 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14"
127.0.0.1 - - [01/Jun/2004:21:33:22 +0200] "GET /svnview HTTP/1.1" 500 656 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14"
127.0.0.1 - - [01/Jun/2004:21:34:35 +0200] "GET /svnview HTTP/1.1" 200 2307 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14"
127.0.0.1 - - [01/Jun/2004:21:34:36 +0200] "GET /default.css HTTP/1.1" 200 15683 "http://localhost/svnview" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14"
127.0.0.1 - - [01/Jun/2004:21:34:55 +0200] "GET /svnview?repos=devel&rev=latest&root=/SVNview HTTP/1.1" 200 6026 "http://localhost/svnview" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14"
127.0.0.1 - - [01/Jun/2004:21:34:55 +0200] "GET /default.css HTTP/1.1" 200 15683 "http://localhost/svnview?repos=devel&rev=latest&root=/SVNview" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14"
127.0.0.1 - - [01/Jun/2004:21:34:57 +0200] "GET /default.css HTTP/1.1" 200 15683 "http://localhost/svnview?repos=devel&rev=latest&root=SVNview/tmpl&list_revs=1" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14"
127.0.0.1 - - [01/Jun/2004:21:34:57 +0200] "GET /svnview?repos=devel&rev=latest&root=SVNview/tmpl&list_revs=1 HTTP/1.1" 200 10448 "http://localhost/svnview?repos=devel&rev=latest&root=/SVNview" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14"
127.0.0.1 - - [01/Jun/2004:21:35:00 +0200] "GET /default.css HTTP/1.1" 200 15683 "http://localhost/svnview?repos=devel&rev=85&root=SVNview/tmpl&show=1" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14"
127.0.0.1 - - [01/Jun/2004:21:35:00 +0200] "GET /svnview?repos=devel&rev=85&root=SVNview/tmpl&show=1 HTTP/1.1" 200 4433 "http://localhost/svnview?repos=devel&rev=latest&root=SVNview/tmpl&list_revs=1" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14"
127.0.0.1 - - [01/Jun/2004:21:35:02 +0200] "GET /default.css HTTP/1.1" 200 15683 "http://localhost/svnview?repos=devel&rev=85&root=SVNview/tmpl/header.tmpl" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14"
127.0.0.1 - - [01/Jun/2004:21:35:02 +0200] "GET /svnview?repos=devel&rev=85&root=SVNview/tmpl/header.tmpl HTTP/1.1" 200 7547 "http://localhost/svnview?repos=devel&rev=85&root=SVNview/tmpl&show=1" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14"
127.0.0.1 - - [01/Jun/2004:21:35:07 +0200] "GET /svnview?repos=devel&rev=85&root=SVNview/tmpl/header.tmpl&show=1 HTTP/1.1" 500 656 "http://localhost/svnview?repos=devel&rev=85&root=SVNview/tmpl/header.tmpl" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14"
127.0.0.1 - - [01/Jun/2004:21:35:11 +0200] "GET /svnview?repos=devel&rev=85&root=SVNview/tmpl/header.tmpl HTTP/1.1" 200 7547 "http://localhost/svnview?repos=devel&rev=85&root=SVNview/tmpl&show=1" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14"
127.0.0.1 - - [01/Jun/2004:21:35:11 +0200] "GET /default.css HTTP/1.1" 200 15683 "http://localhost/svnview?repos=devel&rev=85&root=SVNview/tmpl/header.tmpl" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14"
127.0.0.1 - - [01/Jun/2004:21:35:24 +0200] "GET /svnview?repos=devel&rev=84&root=SVNview/tmpl/header.tmpl&show=1&view=plain HTTP/1.1" 200 400 "http://localhost/svnview?repos=devel&rev=85&root=SVNview/tmpl/header.tmpl" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14"
127.0.0.1 - - [01/Jun/2004:21:35:29 +0200] "GET /svnview?repos=devel&rev=85&root=SVNview/tmpl/header.tmpl HTTP/1.1" 200 7547 "http://localhost/svnview?repos=devel&rev=85&root=SVNview/tmpl&show=1" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14"
127.0.0.1 - - [01/Jun/2004:21:35:29 +0200] "GET /default.css HTTP/1.1" 200 15683 "http://localhost/svnview?repos=devel&rev=85&root=SVNview/tmpl/header.tmpl" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14"
127.0.0.1 - - [01/Jun/2004:21:35:36 +0200] "GET /svnview?repos=devel&rev=85&root=SVNview/tmpl&show=1 HTTP/1.1" 200 4433 "http://localhost/svnview?repos=devel&rev=latest&root=SVNview/tmpl&list_revs=1" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14"
127.0.0.1 - - [01/Jun/2004:21:35:37 +0200] "GET /default.css HTTP/1.1" 200 15683 "http://localhost/svnview?repos=devel&rev=85&root=SVNview/tmpl&show=1" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14"
127.0.0.1 - - [01/Jun/2004:21:35:39 +0200] "GET /svnview?repos=devel&rev=33&root=SVNview/tmpl/contents.tmpl&show=1 HTTP/1.1" 500 656 "http://localhost/svnview?repos=devel&rev=85&root=SVNview/tmpl&show=1" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14"
127.0.0.1 - - [01/Jun/2004:21:35:41 +0200] "GET /svnview?repos=devel&rev=85&root=SVNview/tmpl&show=1 HTTP/1.1" 200 4433 "http://localhost/svnview?repos=devel&rev=latest&root=SVNview/tmpl&list_revs=1" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14"
127.0.0.1 - - [01/Jun/2004:21:35:42 +0200] "GET /default.css HTTP/1.1" 200 15683 "http://localhost/svnview?repos=devel&rev=85&root=SVNview/tmpl&show=1" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14"
127.0.0.1 - - [01/Jun/2004:21:35:45 +0200] "GET /default.css HTTP/1.1" 200 15683 "http://localhost/svnview?repos=devel&rev=85&root=SVNview/tmpl/contents.tmpl" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14"
127.0.0.1 - - [01/Jun/2004:21:35:44 +0200] "GET /svnview?repos=devel&rev=85&root=SVNview/tmpl/contents.tmpl HTTP/1.1" 200 3889 "http://localhost/svnview?repos=devel&rev=85&root=SVNview/tmpl&show=1" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14"
1.1.1.1 - - [19/Jun/2004:19:18:08 +0200] "GET /~jan/WebSVN/filedetails.php?repname=Public&path=/payment_server/vgts_mod/vgts_vt_cc/stable/modules/mod_vt_cc.pl&rev=0&sc=1 HTTP/1.0" 200 386749 "http://localhost/~jan/WebSVN/listing.php?repname=Public&path=/payment_server/vgts_mod/vgts_vt_cc/stable/modules/&rev=0&sc=1" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040618 Firefox/0.9"
1.1.1.1 - - [19/Jun/2004:19:19:01 +0200] "POST /~jan/WebSVN/form.php?path=& HTTP/1.0" 302 169 "http://localhost/~jan/WebSVN/filedetails.php?repname=Public&path=/payment_server/vgts_mod/vgts_vt_cc/stable/modules/mod_vt_cc.pl&rev=0&sc=1" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040618 Firefox/0.9"
1.1.1.1 - - [19/Jun/2004:19:19:01 +0200] "GET /~jan/WebSVN/listing.php?repname=Private&path=/& HTTP/1.0" 200 6002 "http://localhost/~jan/WebSVN/filedetails.php?repname=Public&path=/payment_server/vgts_mod/vgts_vt_cc/stable/modules/mod_vt_cc.pl&rev=0&sc=1" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040618 Firefox/0.9"
1.1.1.1 - - [19/Jun/2004:19:19:05 +0200] "GET /~jan/WebSVN/listing.php?repname=Private&path=/Coding_Rules/&rev=0&sc=0 HTTP/1.0" 200 3938 "http://localhost/~jan/WebSVN/listing.php?repname=Private&path=/&" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040618 Firefox/0.9"
1.1.1.1 - - [19/Jun/2004:19:19:09 +0200] "GET /~jan/WebSVN/filedetails.php?repname=Private&path=/Coding_Rules/Perl+Coding+Rules.pod&rev=0&sc=0 HTTP/1.0" 200 9633 "http://localhost/~jan/WebSVN/listing.php?repname=Private&path=/Coding_Rules/&rev=0&sc=0" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040618 Firefox/0.9"
1.1.1.1 - - [19/Jun/2004:19:19:16 +0200] "GET /~jan/WebSVN/diff.php?repname=Private&path=/Coding_Rules/Perl+Coding+Rules.pod&rev=0&sc=0 HTTP/1.0" 200 32956 "http://localhost/~jan/WebSVN/filedetails.php?repname=Private&path=/Coding_Rules/Perl%20Coding%20Rules.pod&rev=0&sc=0" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040618 Firefox/0.9"
1.1.1.1 - - [19/Jun/2004:19:19:40 +0200] "GET /~jan/WebSVN/listing.php?repname=Private&path=/RFC/&rev=0&sc=0 HTTP/1.0" 200 5633 "http://localhost/~jan/WebSVN/listing.php?repname=Private&path=/&" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040618 Firefox/0.9"
1.1.1.1 - - [19/Jun/2004:19:19:45 +0200] "GET /~jan/WebSVN/log.php?repname=Private&path=/RFC/RFC_0004.pod&rev=0&sc=0&isdir=0 HTTP/1.0" 200 15189 "http://localhost/~jan/WebSVN/listing.php?repname=Private&path=/RFC/&rev=0&sc=0" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040618 Firefox/0.9"
1.1.1.1 - - [19/Jun/2004:19:19:54 +0200] "GET /~jan/WebSVN/filedetails.php?repname=Private&path=/RFC/RFC_0004.pod&rev=3269&sc=0 HTTP/1.0" 200 10750 "http://localhost/~jan/WebSVN/log.php?repname=Private&path=/RFC/RFC_0004.pod&rev=0&sc=0&isdir=0" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040618 Firefox/0.9"
1.1.1.1 - - [19/Jun/2004:19:19:56 +0200] "GET /~jan/WebSVN/diff.php?repname=Private&path=/RFC/RFC_0004.pod&rev=3269&sc=0 HTTP/1.0" 200 11281 "http://localhost/~jan/WebSVN/filedetails.php?repname=Private&path=/RFC/RFC_0004.pod&rev=3269&sc=0" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040618 Firefox/0.9"
1.1.1.1 - - [23/Jun/2004:19:43:42 +0200] "GET /manual HTTP/1.1" 301 284 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040620 Galeon/1.3.15"
1.1.1.1 - - [23/Jun/2004:19:43:42 +0200] "GET /manual/ HTTP/1.1" 200 2117 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040620 Galeon/1.3.15"
1.1.1.1 - - [23/Jun/2004:19:43:42 +0200] "GET /manual/style/css/manual.css HTTP/1.1" 200 18056 "http://localhost/manual/" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040620 Galeon/1.3.15"
1.1.1.1 - - [23/Jun/2004:19:43:42 +0200] "GET /manual/style/css/manual-loose-100pc.css HTTP/1.1" 200 2882 "http://localhost/manual/" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040620 Galeon/1.3.15"
1.1.1.1 - - [23/Jun/2004:19:43:43 +0200] "GET /manual/images/favicon.ico HTTP/1.1" 200 1078 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040620 Galeon/1.3.15"
1.1.1.1 - - [23/Jun/2004:19:43:43 +0200] "GET /manual/style/css/manual-print.css HTTP/1.1" 200 12948 "http://localhost/manual/" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040620 Galeon/1.3.15"
1.1.1.1 - - [23/Jun/2004:19:43:43 +0200] "GET /manual/images/left.gif HTTP/1.1" 200 60 "http://localhost/manual/" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040620 Galeon/1.3.15"
1.1.1.1 - - [23/Jun/2004:19:43:43 +0200] "GET /manual/images/feather.gif HTTP/1.1" 200 6471 "http://localhost/manual/" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040620 Galeon/1.3.15"
1.1.1.1 - - [23/Jun/2004:19:43:47 +0200] "GET /manual/logs.html HTTP/1.1" 200 9247 "http://localhost/manual/" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040620 Galeon/1.3.15"
1.1.1.1 - - [23/Jun/2004:19:43:47 +0200] "GET /manual/images/favicon.ico HTTP/1.1" 200 1078 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040620 Galeon/1.3.15"
1.1.1.1 - - [23/Jun/2004:19:43:47 +0200] "GET /manual/images/down.gif HTTP/1.1" 200 56 "http://localhost/manual/logs.html" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040620 Galeon/1.3.15"
1.1.1.1 - - [26/Jun/2004:21:09:22 +0200] "GET /svn/listing.php?repname=Devel&path=/rpg/tags/&rev=0&sc=1 HTTP/1.1" 200 3364 "http://localhost/svn/listing.php?repname=Devel&path=/rpg/&rev=0&sc=1" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040620 Galeon/1.3.15"
1.1.1.1 - - [26/Jun/2004:21:09:24 +0200] "GET /svn/listing.php?repname=Devel&path=/rpg/tags/M1/&rev=0&sc=1 HTTP/1.1" 200 12907 "http://localhost/svn/listing.php?repname=Devel&path=/rpg/tags/&rev=0&sc=1" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040620 Galeon/1.3.15"
1.1.1.1 - - [26/Jun/2004:21:09:25 +0200] "GET /svn/templates/BlueGrey/file.png HTTP/1.1" 200 954 "http://localhost/svn/listing.php?repname=Devel&path=/rpg/tags/M1/&rev=0&sc=1" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040620 Galeon/1.3.15"
1.1.1.1 - - [26/Jun/2004:21:09:32 +0200] "GET /svn/listing.php?repname=Devel&path=/rpg/tags/&rev=0&sc=1 HTTP/1.1" 200 3364 "http://localhost/svn/listing.php?repname=Devel&path=/rpg/&rev=0&sc=1" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040620 Galeon/1.3.15"
1.1.1.1 - - [26/Jun/2004:21:09:37 +0200] "GET /svn/listing.php?repname=Devel&path=/rpg/devel/&rev=0&sc=1 HTTP/1.1" 200 14529 "http://localhost/svn/listing.php?repname=Devel&path=/rpg/&rev=0&sc=1" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040620 Galeon/1.3.15"
1.1.1.1 - - [26/Jun/2004:21:09:46 +0200] "GET /svn/filedetails.php?repname=Devel&path=/rpg/devel/game.pl&rev=0&sc=1 HTTP/1.1" 200 3487 "http://localhost/svn/listing.php?repname=Devel&path=/rpg/devel/&rev=0&sc=1" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040620 Galeon/1.3.15"
1.1.1.1 - - [30/Jun/2004:22:15:50 +0200] "GET /cgi-bin/trac.cgi HTTP/1.1" 500 971 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040620 Galeon/1.3.15"
1.1.1.1 - - [30/Jun/2004:22:16:44 +0200] "GET /trac/css/trac.css HTTP/1.1" 404 347 "http://localhost/cgi-bin/trac.cgi" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040620 Galeon/1.3.15"
1.1.1.1 - - [30/Jun/2004:22:16:44 +0200] "GET /trac/css/code.css HTTP/1.1" 404 347 "http://localhost/cgi-bin/trac.cgi" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040620 Galeon/1.3.15"
ux i686; en-US; rv:1.7) Gecko/20040620 Galeon/1.3.15"
1.1.1.1 - - [01/Jul/2004:00:08:46 +0200] "GET /trac/css/changeset.css HTTP/1.1" 304 - "http://localhost/cgi-bin/trac.cgi" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040620 Galeon/1.3.15"
1.1.1.1 - - [01/Jul/2004:00:08:46 +0200] "GET /trac/trac.js HTTP/1.1" 304 - "http://localhost/cgi-bin/trac.cgi" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040620 Galeon/1.3.15"
1.1.1.1 - - [01/Jul/2004:00:08:46 +0200] "GET /trac/trac_banner.png HTTP/1.1" 304 - "http://localhost/cgi-bin/trac.cgi" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040620 Galeon/1.3.15"
1.1.1.1 - - [01/Jul/2004:00:08:46 +0200] "GET /trac/topbar_gradient.png HTTP/1.1" 304 - "http://localhost/cgi-bin/trac.cgi" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040620 Galeon/1.3.15"
1.1.1.1 - - [01/Jul/2004:00:08:46 +0200] "GET /trac/topbar_active.png HTTP/1.1" 304 - "http://localhost/cgi-bin/trac.cgi" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040620 Galeon/1.3.15"
1.1.1.1 - - [01/Jul/2004:00:08:46 +0200] "GET /trac/dots.gif HTTP/1.1" 304 - "http://localhost/cgi-bin/trac.cgi" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040620 Galeon/1.3.15"
1.1.1.1 - - [01/Jul/2004:00:08:46 +0200] "GET /trac/trac_logo_mini.png HTTP/1.1" 304 - "http://localhost/cgi-bin/trac.cgi" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040620 Galeon/1.3.15"
1.1.1.1 - - [01/Jul/2004:00:08:46 +0200] "GET /cgi-bin/trac.cgi HTTP/1.1" 200 7358 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040620 Galeon/1.3.15"
1.1.1.1 - - [01/Jul/2004:00:08:52 +0200] "GET /cgi-bin/trac.cgi/browser/ HTTP/1.1" 200 8571 "http://localhost/cgi-bin/trac.cgi" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040620 Galeon/1.3.15"
1.1.1.1 - - [01/Jul/2004:00:09:01 +0200] "GET /trac/css/search.css HTTP/1.1" 304 - "http://localhost/cgi-bin/trac.cgi/search?q=oops&wiki=on&changeset=on&ticket=on" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040620 Galeon/1.3.15"
source-highlight-3.1.6/tests/test.lgt0000644000175000017500000001663411672675566014577 00000000000000 % this is a single-line comment /* this is a block comment */ :- encoding(some_encoding). :- op(Precedence, Associativity, Operator). :- object(prototype, implements(protocol), imports(category), extends(parent)). :- info([ version is 1.0, author is 'Paulo Moura', date is 2008/5/1, comment is 'Sample prototype for testing syntax coloring.']). :- threaded. :- synchronized. :- dynamic. :- initialization(some_goal(X, Y)). :- calls(some_other_protocol). :- uses(another_object). :- alias(set, member/2, set_member/2). :- alias(words, singular//0, peculiar//0). :- uses(list, [append/3, member/2]). :- uses(queues, [new/1::new_queue/1]). :- public(aaa/2). :- meta_predicate(aaa(::, *)). :- discontiguous(aaa/2). :- mode(aaa(+callable, ?integer), zero_or_one). :- info(position/2, [ comment is 'Predicate brief description.', arguments is ['Arg1'-'Arg1 description', 'Arg2'-'Arg2 description']]). :- protected(bbb/2). :- synchronized(bbb/2). :- mode(bbb(+integer, -float), one). :- info(bbb/2, [ comment is 'Predicate brief description.', argnames is ['Arg1', 'Arg2']]). :- private(ccc/2). :- dynamic(ccc/2). :- mode(ccc(@atom, ?atom), one_or_more). :- info(ccc/2, [ comment is 'Predicate brief description.', argnames is ['Arg1', 'Arg2']]). enumerating_entities(Object, Protocol, Category) :- current_category(Category), current_object(Object), current_protocol(Protocol). enumerating_properties :- category_property(Category, Property), object_property(Object, Property), protocol_property(Protocol, Property). creating_entities(Object, Protocol, Category) :- create_category(Category, Relations, Directives, Clauses), create_object(Object, Relations, Directives, Clauses), create_protocol(Protocol, Relations, Directives). abolishing_entities(Object, Protocol, Category) :- abolish_category(Category), abolish_object(Object), abolish_protocol(Protocol). entity_relations :- extends_object(Prototype, Parent, Scope), extends_protocol(Protocol1, Protocol2, Scope), extends_category(Category1, Category2, Scope), implements_protocol(Object, Protocol, Scope), imports_category(Object, Category, Scope), instantiates_class(Instance, Class, Scope), specializes_class(Class, Superclass, Scope), complements_object(Category, Object). event_handling :- abolish_events(Event, Object, Message, Sender, Monitor), current_event(Event, Object, Message, Sender, Monitor), define_events(Event, Object, Message, Sender, Monitor). multi_threading :- threaded(Goals), threaded_call(Goal), threaded_once(Goal), threaded_ignore(Goal), threaded_exit(Goal), threaded_peek(Goal), threaded_wait(Goal), threaded_notify(Notification). compiling_and_loading :- logtalk_compile(File, Options), logtalk_load(File, Options), logtalk_library_path(Library, Path). flags :- current_logtalk_flag(Flag, Value), set_logtalk_flag(Flag, Value). execution_context_methods :- parameter(N, Parameter), self(Self), sender(Sender), this(This). reflection_methods :- current_predicate(Predicate), predicate_property(Predicate, Property). database_methods :- abolish(Functor/Arity), asserta(Clause), assertz(Clause), clause(Head, Body), retract(Clause), retractall(Head). meta_call_methods :- call(Goal). all_solutions_methods :- bagof(Term, Goal, List), findall(Term, Goal, List), forall(Generate, Test), setof(Term, Goal, List). event_handler_methods :- before(Object, Message, Sender), after(Object, Message, Sender). dcg_rules_parsing_methods :- phrase(NonTerminal, Input, Rest). term_expansion_methods :- expand_term(Term, Expanded), term_expansion(Term, Expanded), goal_expansion(Goal, Expanded). message_sending :- Object::Message, ::Message, ^^Message. calling_external_code :- {goal1, goal2, goal3}. context_switching_calls :- Object< Then ; Else ). numbers :- X is 13, Y is 13.13, Z is 13.13e-23, C1 is 0'A, C2 is 0'', C3 is 0'", B is 0b1011101, O is 0o1234560, H is 0x1234567890abcDEF. functions :- A is atan(3.14) + sin(0.77) - cos(123.23), B is sign(-12) * abs(35/78), C is truncate(3.14) + round(-7.8) - ceiling(111.88), D is exp(3.8) - log(123.98) / sqrt(33) * 23 ** 4, E is rem(3, 2) + mod(5, 3) * 2 rem 2 // 5 mod 3, F is float_fractional_part(3.14) + float_integer_part(3.14), G is float(33) + floor(99.99). bitwise :- A is 16 >> 2, B is 16 << 2, C is 10 /\ 12, D is 10 \/ 12, E is \ 10. term_unification :- Term1 = Term2, Term1 \= Term2, unify_with_occurs_check(Term1, Term2). term_testing :- atom(Atom), atomic(Atomic), integer(Integer), float(Float), compound(Term), nonvar(Term), var(Term), number(Number). term_comparison :- Term1 == Term2, Term1 \== Term2, Term1 @< Term2, Term1 @=< Term2, Term1 @>= Term2, Term1 @> Term2. term_creation_and_decomposition :- functor(Term, Functor, Arity), arg(N, Term, Arg), Term =.. [Functor| Args], copy_term(Term, Copy). arithemtic_evaluation :- X is Expression. arithemtic_comparison :- Exp1 =:= Exp2, Exp1 =\= Exp2, Exp1 < Exp2, Exp1 =< Exp2, Exp1 > Exp2, Exp1 >= Exp2. stream_selection_and_control :- current_input(Stream), current_output(Stream), set_input(Stream), set_output(Stream), open(Source, Mode, Stream, Options), close(Stream), flush_output(Stream), stream_property(Stream, Property), at_end_of_stream(Stream), set_stream_position(Stream, Position), flush_output, at_end_of_stream. character_input_output :- get_char(Char), get_code(Code), peek_char(Char), peek_code(Code), put_char(Char), put_code(Code), nl(Stream), nl. byte_input_output :- get_byte(Byte), peek_byte(Byte), put_byte(Byte). term_input_output :- read(Term), read_term(Term), write(Term), write(Term), write_canonical(Term), write_term(Stream, Term, Options), current_op(Precedence, Associativity, Operator), op(Precedence, Associativity, Operator), current_char_conversion(InChar, OutChar), char_conversion(InChar, OutChar). logic_and_control :- \+ Goal, once(Goal), repeat, !. atomic_term_processing :- atom_length(Atom, Length), atom_chars(Atom, Chars), atom_codes(Atom, Codes), atom_concat(Atom1, Atom2, Atom), sub_atom(Atom, Before, Length, After, SubAtom), char_code(Char, Code), number_chars(Number, Chars), number_codes(Number, Codes). implementation_defined_hooks :- current_prolog_flag(Flag, Value), set_prolog_flag(Flag, Value), halt(ExitCode), halt. number(C) --> "+", number(C). number(C) --> "-", number(X), {C is -X}. number(X) --> [C], {0'0 =< C, C =< 0'9, X is C - 0'0}. escape_sequences :- write('Quoted atom with a quote ('') inside.'), write('Quoted atom with control escape sequences: \a \b \r \f \t \n \v'), write('Quoted atom with an octal escape sequence: \123\.'), write('Quoted atom with an hexa-decimal escape sequence: \x123f\.'). :- end_object. :- object(class, implements(protected::protocol), imports(private::category), instantiates(metaclass), specializes(superclass)). :- end_object. :- object(parametric(Parameter, "String", 33.78), implements(protocol), imports(category), extends(parent(Parameter))). :- end_object. :- category(category, implements(protocol), extends(other_category)). :- end_category. :- protocol(extended, extends(minimal)). :- end_protocol. source-highlight-3.1.6/tests/wrong_backref2.lang0000644000175000017500000000013711672675567016636 00000000000000keyword = 'my(regular)ex.pre$\\1' # ok since escaped keyword = 'my(regular)ex.pre$\1' # error! source-highlight-3.1.6/tests/test.proto.html0000644000175000017500000001323511672675566016111 00000000000000
// Created from samples at
// http://code.google.com/apis/protocolbuffers/docs/proto.html
import "google/protobuf/descriptor.proto"

option optimize_for = CODE_SIZE;

package test;

extend google.protobuf.FileOptions {
  optional string my_file_option = 50000;
}
extend google.protobuf.MessageOptions {
  optional int32 my_message_option = 50001;
}
extend google.protobuf.FieldOptions {
  optional float my_field_option = 50002;
}
extend google.protobuf.EnumOptions {
  optional bool my_enum_option = 50003;
}
extend google.protobuf.EnumValueOptions {
  optional uint32 my_enum_value_option = 50004;
}
extend google.protobuf.ServiceOptions {
  optional MyEnum my_service_option = 50005;
}
extend google.protobuf.MethodOptions {
  optional MyMessage my_method_option = 50006;
}

option (my_file_option) = "Hello world!";

message MyMessage {
  option (my_message_option) = 1234;

  optional int32 foo = 1 [(my_field_option) = 4.5];
  optional string bar = 2;
}

enum MyEnum {
  option (my_enum_option) = true;

  FOO = 1 [(my_enum_value_option) = 321];
  BAR = 2;
}

service MyService {
  option (my_service_option) = FOO;

  method MyMethod() {
    // Note:  my_method_option has type MyMessage.  We can set each field
    //   within it using a separate "option" line.
    option (my_method_option).foo = 567;
    option (my_method_option).bar = "Some string";
  }
}
source-highlight-3.1.6/tests/test_css_nodoc.html0000644000175000017500000002014311672675567016776 00000000000000
/*
  This is a classical Hello program
  to test source-highlight with Java programs.
  
  to have an html translation type

	source-highlight -s java -f html --input Hello.java --output Hello.html
	source-highlight -s java -f html < Hello.java > Hello.html

  or type source-highlight --help for the list of options

  written by
  Lorenzo Bettini
  http://www.lorenzobettini.it
  http://www.gnu.org/software/src-highlite
*/

package hello;

import java.io.* ;

/**
 * <p>
 * A simple Hello World class, used to demonstrate some
 * features of Java source highlighting.
 * </p>
 * TODO: nothing, just to show an highlighted TODO or FIXME
 *
 * @author Lorenzo Bettini
 * @version 2.0
 */ /// class
public class Hello {
    int foo = 1998 ;
    int hex_foo = 0xCAFEBABE;
    boolean b = false;
    Integer i = null ;
    char c = '\'', d = 'n', e = '\\' ;
    String xml = "<tag attr=\"value\">&auml;</tag>", foo2 = "\\" ;

    /* mymethod */
    public void mymethod(int i) {
	// just a foo method
    }
    /* mymethod */
   
    /* main */
    public static void main( String args[] ) {
	// just some greetings ;-)  /*
	System.out.println( "Hello from java2html :-)" ) ;
	System.out.println( "\tby Lorenzo Bettini" ) ;
	System.out.println( "\thttp://www.lorenzobettini.it" ) ;
        if (argc > 0)
            String param = argc[0];
        //System.out.println( "bye bye... :-D" ) ; // see you soon
    }
    /* main */
}
/// class

// end of file test.java
source-highlight-3.1.6/tests/test_nonewlines.lang0000644000175000017500000000041511672675567017162 00000000000000# test_nonewlines.lang # test that newlines in expressions are simply discarded # see the corresponding test_newlines.lang keyword = "foo|lang" (keyword,normal,classname) = `(\ Version: 2.1.2 > Release: 2.1.2 diff -rP source-highlight-2.1.1/src/latex.outlang source-highlight-2.1.2/src/latex.outlang 36a37 > "\"" "\"{}" # avoids problems with some inputenc diff -rP source-highlight-2.1.1/src/lib/messages.cc source-highlight-2.1.2/src/lib/messages.cc 87a88,93 > > void foundBug(const std::string &error, const std::string &file, int line) > { > cerr << PACKAGE << ": " << error << ", " << file << ":" << line << endl; > exit(EXIT_FAILURE); > } source-highlight-3.1.6/tests/test.simple.html0000644000175000017500000000026211672675566016233 00000000000000this is just a simple test, to test simple.lang and simple.outlang it should highlight some keywords (e.g., abstract) and some types (e.g., int). nothing more :-) source-highlight-3.1.6/tests/test_tabs.java.html0000644000175000017500000001444411672675567016704 00000000000000
/*
  This is a classical Hello program
  to test source-highlight with Java programs.
  
  to have an html translation type

    source-highlight -s java -f html --input Hello.java --output Hello.html
    source-highlight -s java -f html < Hello.java > Hello.html

  or type source-highlight --help for the list of options

  written by
  Lorenzo Bettini
  http://www.lorenzobettini.it
  http://www.gnu.org/software/src-highlite
*/

package hello;

import java.io.* ;

/**
 * <p>
 * A simple Hello World class, used to demonstrate some
 * features of Java source highlighting.
 * </p>
 * TODO: nothing, just to show an highlighted TODO or FIXME
 *
 * @author Lorenzo Bettini
 * @version 2.0
 */ /// class
public class Hello {
    int foo = 1998 ;
    int hex_foo = 0xCAFEBABE;
    boolean b = false;
    Integer i = null ;
    char c = '\'', d = 'n', e = '\\' ;
    String xml = "<tag attr=\"value\">&auml;</tag>", foo2 = "\\" ;

    /* mymethod */
    public void mymethod(int i) {
    // just a foo method
    }
    /* mymethod */
   
    /* main */
    public static void main( String args[] ) {
    // just some greetings ;-)  /*
    System.out.println( "Hello from java2html :-)" ) ;
    System.out.println( "\tby Lorenzo Bettini" ) ;
    System.out.println( "\thttp://www.lorenzobettini.it" ) ;
        if (argc > 0)
            String param = argc[0];
        //System.out.println( "bye bye... :-D" ) ; // see you soon
    }
    /* main */
}
/// class

// end of file test.java
source-highlight-3.1.6/tests/test.rb.html0000644000175000017500000001521311672675566015347 00000000000000
#!/usr/bin/env ruby
#
# comment

require "English"

#{expression}

#{
  expression
} 

cnf.marked.any? ? cnf.marked.to_a.join!(',') : "nothing"

BEGIN {
  puts "Hello! in \"BEGIN\"" # comment
  puts 'World! in \'BEGIN\'' # comment
}
END {
  puts 'bye! in "END"'
}

p $"
p $'
p $/

puts __LINE__
puts __FILE__

a = [1, 2, 3, 4, "foo", "bar"]
a = %w(1, 2, 3, 4, "foo", "bar")
h = {"foo" => 1, "bar" => 3}
$global = 1

print("with parenthesis\n")
print "without parenthesis\n"
print 12345678, "\n"
print 1.2345678, "\n"
print a[0], a[1], "\n"
print h['foo'], h[1], "\n"
print $global, "\n"
print `date`
print <<EOM
ppp
EOM
print <<"EOM"
ppp
EOM

def foo
  puts "foo"
end

module M
end

class Klass
  include M
  @@foo = "bar"
  def initialize
    @foo = "bar"
  end
  def foo
    puts @@foo
    return [nil, false, self, true]
  end
end

foo
foo()

k = Klass.new
k.foo
k.foo()

p [(1 and 2), (1 or 2), (not nil)]

str = "abc"
p /d/ =~ str
p %r|a| =~ str
p %r!a! =~ str
/"d/ =~ str # problem " in Regexp
/'d/ =~ str # problem ' in Regexp

if %r{foo(\{?\}?[A-Z]\{?\}?bar#{myvar})} =~ 'foo{A}bar'
  puts 'foo'
end

source-highlight-3.1.6/tests/default.style.html0000644000175000017500000001762311672675565016557 00000000000000
bgcolor "white"; // the background color for documents
context gray; // the color for context lines (when specified with line ranges)

keyword blue b ; // for language keywords
type darkgreen ; // for basic types
usertype teal ; // for user defined types
string red f ; // for strings and chars
regexp orange f ; // for strings and chars
specialchar pink f ; // for special chars, e.g., \n, \t, \\
comment brown i, noref; // for comments
number purple ;	// for literal numbers
preproc darkblue b ; // for preproc directives (e.g. #include, import)
symbol darkred ; // for simbols (e.g. <, >, +)
function black b; // for function calls and declarations
cbracket red; // for block brackets (e.g. {, })
todo bg:cyan b;	// for TODO and FIXME
code bg:brightgreen b; // for code snippets

//Predefined variables and functions (for instance glsl)
predef_var darkblue ;
predef_func darkblue b ;

// for OOP
classname teal ; // for class names, e.g., in Java and C++

// line numbers
linenum black f;

// Internet related
url blue u, f;

// other elements for ChangeLog and Log files
date blue b ;
time, file darkblue b ;
ip, name darkgreen ;

// for Prolog, Perl...
variable darkgreen ;

// explicit for Latex
italics darkgreen i;
bold darkgreen b;
underline darkgreen u;
fixed green f;
argument darkgreen;
optionalargument purple;
math orange;
bibtex blue;

// for diffs
oldfile orange;
newfile darkgreen;
difflines blue; 

// for css
selector purple;
property blue;
value darkgreen i;

// for oz
atom orange;
meta i;

// for file system
path orange;

// for C (or other language) labels
label teal b;

// for errors
error purple;
warning darkgreen;
source-highlight-3.1.6/tests/test2.diff.html0000644000175000017500000000504111672675567015735 00000000000000
diff -rc2P source-highlight-2.1.1/source-highlight.spec source-highlight-2.1.2/source-highlight.spec
*** source-highlight-2.1.1/source-highlight.spec	2005-08-03 14:54:18.000000000 +0200
--- source-highlight-2.1.2/source-highlight.spec	2005-08-25 16:11:37.000000000 +0200
***************
*** 7,12 ****
  Summary:   syntax highlighting for source documents
  Name:      source-highlight
! Version:   2.1.1
! Release:   2.1.1
  License:   GPL
  Group:     Utilities/Console
--- 7,12 ----
  Summary:   syntax highlighting for source documents
  Name:      source-highlight
! Version:   2.1.2
! Release:   2.1.2
  License:   GPL
  Group:     Utilities/Console
diff -rc2P source-highlight-2.1.1/src/latex.outlang source-highlight-2.1.2/src/latex.outlang
*** source-highlight-2.1.1/src/latex.outlang	2005-07-12 22:21:46.000000000 +0200
--- source-highlight-2.1.2/src/latex.outlang	2005-08-25 16:15:53.000000000 +0200
***************
*** 35,37 ****
--- 35,38 ----
  "--" "-\\/-"
  "---" "-\\/-\\/-"
+ "\"" "\"{}" # avoids problems with some inputenc
  end
\ No newline at end of file
diff -rc2P source-highlight-2.1.1/src/lib/messages.cc source-highlight-2.1.2/src/lib/messages.cc
*** source-highlight-2.1.1/src/lib/messages.cc	2005-07-12 12:18:59.000000000 +0200
--- source-highlight-2.1.2/src/lib/messages.cc	2005-08-25 16:08:44.000000000 +0200
***************
*** 86,87 ****
--- 86,93 ----
    exit(EXIT_FAILURE);
  }
+ 
+ void foundBug(const std::string &error, const std::string &file, int line)
+ {
+   cerr << PACKAGE << ": " << error << ", " << file << ":" << line << endl;
+   exit(EXIT_FAILURE);
+ }
source-highlight-3.1.6/tests/test2.htm0000644000175000017500000000070711672675567014656 00000000000000 Another test for html formatting

Another test for html formatting

foo and foobar
Lorenzo Bettini
Last modified: Sun May 21 15:43:39 CEST 2006 source-highlight-3.1.6/tests/c.lang.html0000644000175000017500000000705711672675565015136 00000000000000
# definitions for C
include "c_comment.lang"

label = '^[[:blank:]]*[[:alnum:]]+:[[:blank:]]*\z'

(keyword,normal,classname) = 
  `(\<struct)([[:blank:]]+)([[:alnum:]_]+)`

state preproc start '^[[:blank:]]*#(?:[[:blank:]]*include)' begin
        string delim "<" ">" 
        string delim "\"" "\"" escape "\\"
        include "c_comment.lang"
end

preproc = '^[[:blank:]]*#([[:blank:]]*[[:word:]]*)'

include "number.lang"

include "c_string.lang"

keyword = "__asm|__cdecl|__declspec|__export|__far16",
  "__fastcall|__fortran|__import",
  "__pascal|__rtti|__stdcall|_asm|_cdecl",
  "__except|_export|_far16|_fastcall",
  "__finally|_fortran|_import|_pascal|_stdcall|__thread|__try|asm|auto",
  "break|case|catch|cdecl|const|continue|default",
  "do|else|enum|extern|for|goto",
  "if|pascal",
  "register|return|sizeof|static",
  "struct|switch",
  "typedef|union",
  "volatile|while"

type = "bool|char|double|float|int|long",
  "short|signed|unsigned|void|wchar_t"

include "symbols.lang"

cbracket = "{|}"

include "function.lang"

include "clike_vardeclaration.lang"
source-highlight-3.1.6/tests/test.d0000644000175000017500000000463611672675566014233 00000000000000#!/usr/bin/dmd -run /* sh style script syntax is supported */ /* Hello World in D To compile: dmd hello.d or to optimize: dmd -O -inline -release hello.d */ /+ a nested /+ comment +/ +/ a = /+ // +/ 1; // parses as if 'a = 1;' a = /+ "+/" +/ 1"; // parses as if 'a = " +/ 1";' a = /+ /* +/ */ 3; // parses as if 'a = */ 3;' r"hello" r"c:\root\foo.exe" r"ab\n" // string is 4 characters, 'a', 'b', '\', 'n' `hello` `c:\root\foo.exe` `ab\n` // string is 4 characters, 'a', 'b', '\', 'n' x"0A" // same as "\x0A" x"00 FBCD 32FD 0A" // same as "\x00\xFB\xCD\x32\xFD\x0A" "hello"c // char[] "hello"w // wchar[] "hello"d // dchar[] import std.stdio; void main(string[] args) { writefln("Hello World, Reloaded"); // auto type inference and built-in foreach foreach (argc, argv; args) { // Object Oriented Programming auto cl = new CmdLin(argc, argv); // Improved typesafe printf writeln(cl.argnum, cl.suffix, " arg: ", cl.argv); // Automatic or explicit memory management delete cl; } // Nested structs and classes struct specs { // all members automatically initialized int count, allocated; } // Nested functions can refer to outer // variables like args specs argspecs() { specs* s = new specs; // no need for '->' s.count = args.length; // get length of array with .length s.allocated = typeof(args).sizeof; // built-in native type properties foreach (argv; args) s.allocated += argv.length * typeof(argv[0]).sizeof; return *s; } // built-in string and common string operations writefln("argc = %d, " ~ "allocated = %d", argspecs().count, argspecs().allocated); } class CmdLin { private int _argc; private string _argv; public: this(int argc, string argv) // constructor { _argc = argc; _argv = argv; } int argnum() { return _argc + 1; } string argv() { return _argv; } string suffix() { string suffix = "th"; switch (_argc) { case 0: suffix = "st"; break; case 1: suffix = "nd"; break; case 2: suffix = "rd"; break; default: break; } return suffix; } }source-highlight-3.1.6/tests/namedgroups_state.lang0000644000175000017500000000034111672675565017462 00000000000000state (keyword,normal,type,symbol) = `(Hello|Ciao)([[:blank:]]*)([mM]ondo|[wW]orld)([[:punct:]]*)` begin comment = "comment" (keyword,normal,type) = `(end)( )(of line)` exit end comment = "highlight" source-highlight-3.1.6/tests/test_refs.cpp.html0000644000175000017500000003114211672675567016545 00000000000000 Contains references to tags
01: #include "test2.h"
02: 
03: void TextGenerator::generate( const char *s ) const 
04: { 
05:   (*sout) << s ; 
06: }
07: 
08: void TextGenerator::generate( const char *s, int start, int end ) const 
09: {
10:   for ( int i = start ; i <= end ; ++i )
11:     (*sout) << s[i] ;
12:   return a<p->b ? a : 3;
13: }
14: 
15: void TextGenerator::generateln( const char *s ) const
16: { 
17:   generate( s ) ;
generate -> test_refs.cpp:3
generate -> test_refs.cpp:8
18:   (*sout) << endl ; 
19: }
20: 
21: void TextGenerator::generateEntire( const char *s ) const
22: {
23:   startTextGeneration() ;
startTextGeneration -> test_refs.cpp:46
startTextGeneration -> test_refs.cpp:53
startTextGeneration -> test_refs.h:41
24:   generate(s) ;
generate -> test_refs.cpp:3
generate -> test_refs.cpp:8
25:   endTextGeneration() ;
endTextGeneration -> test_refs.cpp:60
endTextGeneration -> test_refs.h:42
26: }
27: 
28: void TextGenerator::beginText( const char *s ) const
29: {
30:   startTextGeneration() ;
startTextGeneration -> test_refs.cpp:46
startTextGeneration -> test_refs.cpp:53
startTextGeneration -> test_refs.h:41
31:   if ( s )
32:     generate( s ) ;
generate -> test_refs.cpp:3
generate -> test_refs.cpp:8
33: }
34: 
35: void TextGenerator::endText( const char *s ) const
36: {
37:   if ( s )
38:     generate( s ) ;
generate -> test_refs.cpp:3
generate -> test_refs.cpp:8
39:   endTextGeneration() ;
endTextGeneration -> test_refs.cpp:60
endTextGeneration -> test_refs.h:42
40: }
41: 
42: TextDecorator::TextDecorator( TextGenerator *t ) : decorated( t ) 
43: {
44: }
45: 
46: void TextDecorator::startTextGeneration() const 
TextDecorator -> test_refs.cpp:42
TextDecorator -> test_refs.h:48
47: { 
48:   startDecorate() ;
49:   if ( decorated )
50:     decorated->startTextGeneration() ;
startTextGeneration -> test_refs.cpp:46
startTextGeneration -> test_refs.cpp:53
startTextGeneration -> test_refs.h:41
51: }
52: 
53: void TextDecorator::startTextGeneration() const 
TextDecorator -> test_refs.cpp:42
TextDecorator -> test_refs.h:48
54: { 
55:   startDecorate() ;
56:   if ( decorated )
57:     decorated->startTextGeneration() ;
startTextGeneration -> test_refs.cpp:46
startTextGeneration -> test_refs.cpp:53
startTextGeneration -> test_refs.h:41
58: }
59: 
60: void TextDecorator::endTextGeneration() const 
TextDecorator -> test_refs.cpp:42
TextDecorator -> test_refs.h:48
61: { 
62:   if ( decorated )
63:     decorated->endTextGeneration() ;
endTextGeneration -> test_refs.cpp:60
endTextGeneration -> test_refs.h:42
64:   endDecorate() ;
65:   mysum;
66: }
67: 
source-highlight-3.1.6/tests/test.wodefault0000644000175000017500000000012411672675567015767 00000000000000this is a keyword and test some other key1, key2 and key3 and see what's highlightedsource-highlight-3.1.6/tests/test_extreme_comment.cpp0000644000175000017500000000035711672675567020042 00000000000000// test special #if 0 treatment int main() { #if 0 // equivalent to a comment int i = 10; printf("this should never be executed\n"); return 1; #else printf("Hello world!\n"); return 0; #endif printf("never reach here!\n"); } source-highlight-3.1.6/tests/test.ps0000644000175000017500000000171711672675566014427 00000000000000%! % a test for highlighting postscript files % proc dotest => . /dotest { dup mark exch stopped not % False if error, true if no error. { (Allowed access: ) print cleartomark == } if clear } def 0 0 moveto % So the show commands don't bomb because of nocurrentpoint. { [1 2] executeonly aload } dotest { (string) executeonly (seek) anchorsearch } dotest { (string) (seek) executeonly anchorsearch } dotest (This is % a string) { [1 2] executeonly aload } (This is a string with \( some escapes \( ) { [1 2] executeonly aload } (Strings may contain newlines and such.) { [1 2] executeonly aload } (Strings may contain special characters *!&}^% and balanced parentheses ( ) (and so on).) { [1 2] executeonly aload } (The following is an empty string.) { [1 2] executeonly aload } () { [1 2] executeonly aload } (It has 0 (zero) length.) { [1 2] executeonly aload } source-highlight-3.1.6/tests/test.ldap0000644000175000017500000000045111672675566014717 00000000000000# comment line dn: cn=Foo Bar,mail=foo@bar.com objectclass: top objectclass: person objectclass: organizationalPerson objectclass: inetOrgPerson objectclass: mozillaAbPersonAlpha givenName: Foo sn: Bar cn: Foo Bar mozillaNickname: albe mail: foo@bar.com modifytimestamp: 0Z my_odifytimestamp: 0Z source-highlight-3.1.6/tests/test.m4.html0000644000175000017500000000344011672675566015263 00000000000000
dnl @synopsis AC_CTAGS_FLAGS
dnl
dnl check whether it's the correct version of ctags

AC_DEFUN([AC_CTAGS_FLAGS],
[AC_CACHE_CHECK(whether ${CTAGS} accept --excmd, ac_ctags_flags,
[echo 'void f(){}' > conftest.c
if test -z "`${CTAGS} --excmd=n -f conftags conftest.c 2>&1`"; then
  ac_ctags_flags=yes
else
  ac_ctags_flags=no
fi
rm -f conftest*
rm -f conftags*
])])

AC_DEFUN([adl_NORMALIZE_PATH],
[case ":[$]$1:" in
# change empty paths to '.'
  ::) $1='.' ;;
# strip trailing slashes
  :*[[\\/]]:) $1=`echo "[$]$1" | sed 's,[[\\/]]*[$],,'` ;;
  :*:) ;;
esac
# squeze repeated slashes
case ifelse($2,,"[$]$1",$2) in
# if the path contains any backslashes, turn slashes into backslashes
 *\\*) $1=`echo "[$]$1" | sed 's,\(.\)[[\\/]][[\\/]]*,\1\\\\,g'` ;;
# if the path contains slashes, also turn backslashes into slashes
 *) $1=`echo "[$]$1" | sed 's,\(.\)[[\\/]][[\\/]]*,\1/,g'` ;;
esac])
source-highlight-3.1.6/tests/test.tml.html0000664000175000017500000003502011672675566015540 00000000000000
%META:DATUM{key="value" anotherkey="anothervalue"}%

<!-- Set statements -->

   * Set MACRO = value value value
   morevalue
   morevalue
   * Set ONELINER = Value %value%
      * Set ANOTHERMACRO = value
         * Set YETANOTHERMACRO = value

<!-- "important" HTML tags -->

<img src="%ATTACHURLPATH%"/>

<br/>

<form action="%SCRIPTURLPATH{"save"}%" method="post">
<input type="hidden" name="topic" value="Web.Topic"/>
<input type="submit"/>
</form>

<u>underlined text</u>
<s>strike-out text</s>
<strike>strike-out text</strike>
<del>strike-out text</del>

<!-- not really HTML -->
<nop> <nop/>
<noautolink>This is NotAutoLinked, so there</noautolink>
<sticky><div class="to be protected by WYSIWYG">markup!</div></sticky>
<literal>So, *none* of _this_ is =styled=, but %MACROS{still="work" as="normal"}%</literal>
<verbatim class="tml">So, *none* of _this_ is =styled=, and %MACROS{are="disabled"}%</verbatim>
<verbatim class="tml">Only the outer verbatim does anything; <verbatim>inner</verbatim> are ignored (displayed as normal text)</verbatim>

<!-- not-really-HTML plugin syntax -->
<dot>DirectedGraphPlugin</dot>

1st
paragraph

2nd
paragraph

*Bold text*

_Underlined text_

__Bold italic text__

=monospaced text=

==bold monospaced text==

<!-- Horizontal rule: -->

---

   * Bullet
      * Con
        tinued
   * Bullet

   1. Number
      1. Con
         tinued
   1. Number

   A. Alpha
      A. Con
         tinued
   A. Alpha

   a. alpha
      a. Con
         tinued
   a. alpha

   I. Roman
      I. Con
         tinued
   I. Roman

   i. roman
      i. Con
         tinued
   i. roman

   $ Term: Definition

<!-- table -->

| *L* | *C* | *R* |
| A2 |  B2  |  C2 |
| A3 |  B3  |  C3 |
| multi span |||
| A5-7 |  5  |  5 |
|^| six | six |
|^| seven | seven |
| split\
| over\
| 3 lines |
| A9 |  B9  |  C9 |

WikiWord

Web.WikiWord

Web.SubWeb.WikiWord

<nop>NotAutoLinked

!NotAutoLinked

ACRONYM

Web.ACRONYM

Web.SubWeb.ACRONYM

<nop>ACRONYMNOTAUTOLINKED

!ACRONYMNOTAUTOLINKED

#MyAnchor

[[topic name]]

[[TopicName]]

[[Web.My topic name]]

![[not a link]]

[[TopicName][link text]]

http://example.org/autolinked

a@b.com

[[mailto:a@b.com]\
[Mail]]

[[mailto:?subject=\
Hi][Hi]]

<noautolink>NotAutoLinked</noautolink>

<literal>
| Not | A | Table |
*Not bolded*
[[not linked]]
%MACROS{still="work" as="normal"}%
</literal>

<verbatim class="bash">
#!/bin/bash
while [ -n "$(ls . ~/ \
~/pub* /var/www 2>/dev/null \
 | fgrep foswiki )" ] ; do
  clear
  printf "\nFoswiki rules!\n"
  sleep 10
  clear
  printf "\nFoswiki still rules!\n"
  sleep 10
  done; exit 0

%MACROS{not="expanded"}%
</verbatim>

<!-- Table Of Contents -->

%TOC%
---+ Heading 1
---+!! Heading 1 not in TOC
---++ Heading 2
---++!! Heading 2 not in TOC
---+++ Heading 3
---+++!! Heading 3 not in TOC
---++++ Heading 4
---++++!! Heading 4 not in TOC
---+++++ Heading 5
---+++++!! Heading 5 not in TOC
---++++++ Heading 6
---++++++!! Heading 6 not in TOC

<!-- Non-trivial %MACRO expressions -->

%MACRO{
  format="   * $token(Argument) $foo [[/path/%to%/$bar][text]]
    %WITHIN{
      format="   * $token(Argument) $foo [[/path/%to%/$bar][text]]
        %NESTED{
          macro="   * $token(Argument) $foo [[/path/%to%/$bar][text]]"
        }%"
    }%"
}%

%INCLUDE{
  "%QUERY{
    "'%SYSTEMWEB%.FAQWhatIsWikiWiki'/TopicClassification"
  }%"
  section="Summary"
}%

%MACRO{
  format="   * $token(Argument) $foo [[/path/%to%/$bar][text]] $percntWITHIN{
    format=\"   $token(Argument) $foo [[/path/%to%/$bar][text]] $percntNESTED{
      format=\"   * $token(Argument) $foo [[/path/%to%/$bar][text]] $percntDELAYED{
        macro=\"test\"
      }$percnt\"
    }$percnt\"
  }$percnt"
}%

%SEARCH{
  "info.date >= d2n('2009-01-01') AND info.date <= d2n('2009-12-31')"
  type="query"
  limit="2"
  nonoise="on"
  format="   * <img src=\"$percentICONURL{
    \"$percentIF{
      \"'$topic'/parent.name='UserDocumentationCategory'\"
      then=\"info\" else=\"gear\"
    }$percent\"
  }$percent\"/> [[$topic]]"
}%
source-highlight-3.1.6/tests/lang4defaults.lang0000644000175000017500000000017211672675565016475 00000000000000# a test lang file for testing a customized .defaults file keyword = "keyword" key2 = "key2" key3 = "key3" key4 = "key4" source-highlight-3.1.6/tests/test.l.html0000644000175000017500000005144411672675566015205 00000000000000
%{
/*
 * Copyright (C) 1999, 2000, 2001  Lorenzo Bettini
 *
 * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
 *
 */

static int lineno = 1 ; /* number of scanned lines */
char linebuf[1024] ; /* current code line in the source */
int tokenpos = 0 ; // current token position in the current line

#include "tags.h"
#include "tokens.h"
#include "colors.h"

#include "genfun.h"

%}
%option prefix="java_scanner_"
%option noyywrap

ws [ ]+
tabs [\t]+

nl \n
cr \r
IDE [a-zA-Z_]([a-zA-Z0-9_])*
wspace [ \t\n\r]

STRING \"[^\"\n]*\"

not_alpha [^a-zA-Z0-9]

%s COMMENT_STATE
%s SINGLELINE_COMMENT
%s STRING_STATE
%s CHAR_STATE

keyword (abstract|assert|break|case|catch|class|const|continue|default|do|else|extends|final|finally|for|goto|if|implements|instanceof|interface|native|new|null|package|private|protected|public|return|static|super|switch|synchronized|throw|throws|this|transient|try|volatile|while)
basetype (int|byte|boolean|char|long|float|double|short|void)
symbol [\~\!\%\^\*\(\)\-\+\=\[\]\|\\\:\;\,\.\/\?\&\<\>]
funccall {IDE}/{wspace}*\(

%%



\r {}

<INITIAL>"/*" { BEGIN COMMENT_STATE ;
 startComment( yytext ) ;      
}
<INITIAL>"/*".*"*/" { generateComment( yytext ) ;  }


<COMMENT_STATE>\n { 
   endComment (""); 
   ++lineno;
   generateNewLine() ;
   if (true) {
      startComment ("");
   } else {
     for (int i = 0; i < 10; ++i) {
       ; // do nothing, just to test the { }
     }
   }
   /* if we encounter another // during a comment we simply
      treat it as a ordinary string */
 }
<COMMENT_STATE>"*/" { endComment(yytext) ;
                      BEGIN INITIAL ; /* end of the comment */ }

<INITIAL>"//" { BEGIN SINGLELINE_COMMENT ; startComment( yytext ) ; }
<SINGLELINE_COMMENT>\n { 
   BEGIN INITIAL ;
   yyless (0); // put the \n back
   endComment( yytext ) ; 
   /* if we encounter another // during a comment we simply
      treat it as a ordinary string */
 }

<INITIAL>\" { BEGIN STRING_STATE ; startString( yytext );  }
<STRING_STATE>\\\\ {  generate_preproc( yytext ) ; }
<STRING_STATE>"\\\"" {  generate_preproc( yytext ) ; }
<STRING_STATE>\n { 
   endString (""); 
   ++lineno;
   generateNewLine() ;
   startString ("");
}
<STRING_STATE>\" { BEGIN INITIAL ; endString( yytext ) ; }

<INITIAL>\' { BEGIN CHAR_STATE ; startString( yytext );  }
<CHAR_STATE>\\\\ {  generate_preproc( yytext ) ; }
<CHAR_STATE>"\\\'" {  generate_preproc( yytext ) ; }
<CHAR_STATE>\' { BEGIN INITIAL ; endString( yytext ) ; }

<INITIAL>{keyword}  { generateKeyWord( yytext ) ; }
<INITIAL>{basetype} { generateBaseType( yytext ) ; }
<INITIAL>{symbol} { generateSymbol( yytext ); }
<INITIAL>[\{\}] { generateCBracket ( yytext ); }

<INITIAL>0[xX][0-9a-fA-F]* { generateNumber( yytext ) ; }
<INITIAL>[0-9][0-9]*(\.[0-9]*[eE]?[-+]?[0-9]*)? { generateNumber( yytext ) ; }

<INITIAL>{keyword}/{wspace}*\( { generateKeyWord( yytext ) ; }
<INITIAL>{basetype}/{wspace}*\( { generateBaseType( yytext ) ; }
<INITIAL>{funccall} { generateFunction ( yytext ); }

<INITIAL>import { generatePreProc( yytext) ; }

<INITIAL>[a-zA-Z_]([a-zA-Z0-9_])* { generate_normal( yytext ) ; }

\t {
        generateTab() ;
}

. { generate_preproc( yytext ) ; /* anything else */ }

\n { 
       ++lineno;
       generateNewLine() ;
}

%%

void yyerror( char *s ) ;

void yyerror( char *s )
{  
  fprintf( stderr, "%d: %s: %s\n%s\n", lineno, s, yytext, linebuf ) ;
  fprintf( stderr, "%*s\n", tokenpos, "^" ) ;
}

void yyerror( const std::string &s )
{  
  yyerror(s.c_str());
}

/* vim:set ft=flex expandtab cindent tabstop=4 softtabstop=4 shiftwidth=4 textwidth=0: */
source-highlight-3.1.6/tests/test.xorg0000644000175000017500000000325011672675567014757 00000000000000# xorg.conf (xorg X Window System server configuration file) # # This file was generated by dexconf, the Debian X Configuration tool, using # values from the debconf database. # Section "Files" EndSection Section "InputDevice" Identifier "Synaptics Touchpad" Driver "synaptics" Option "SendCoreEvents" "true" Option "Device" "/dev/psaux" Option "Protocol" "auto-dev" Option "SHMConfig" "on" Option "HorizEdgeScroll" "0" Option "MinSpeed" "0.5" # touchpad speed when moving slowly Option "MaxSpeed" "2.0" # touchpad speed when moving fast Option "AccelFactor" "0.10" Option "CircularScrolling" "on" Option "EdgeMotionMinSpeed" "0.5" EndSection Section "InputDevice" Driver "wacom" Identifier "stylus" Option "Device" "/dev/input/wacom" Option "Type" "stylus" Option "ForceDevice" "ISDV4" # Tablet PC ONLY EndSection Section "Device" Identifier "Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller" Driver "intel" BusID "PCI:0:2:0" # Option "NoDRI" EndSection Section "Screen" Identifier "Default Screen" Device "Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller" Monitor "Generic Monitor" DefaultDepth 24 SubSection "Display" Modes "1440x900" EndSubSection EndSection Section "ServerLayout" Identifier "Default Layout" Screen "Default Screen" InputDevice "Generic Keyboard" InputDevice "Configured Mouse" # Uncomment if you have a wacom tablet # InputDevice "stylus" "SendCoreEvents" # InputDevice "cursor" "SendCoreEvents" # InputDevice "eraser" "SendCoreEvents" InputDevice "Synaptics Touchpad" EndSection source-highlight-3.1.6/tests/test.upc0000644000175000017500000000146611672675567014576 00000000000000relaxed shared [5] int *shared shared_ptr_to_shared; strict shared [5] int y[100 * THREADS]; strict shared [5] int z[100 * THREADS]; int x[100]; shared int shared_int; int local_int = 99; shared int *ptr_to_shared_int; int main () { int i; size_t size; upc_lock_t *lock; lock = upc_global_lock_alloc (); upc_barrier 1; upc_forall (i = 0; i < 100 * THREADS; ++i; &z[i]) { int j; for (j = 0; j < 100; ++j) { #pragma upc strict if (x[i] < x[j]) { upc_lock (lock); z[i][j] = x[i] * y[j]; upc_unlock (lock); } else { upc_fence; z[i][j] = -x[i] * y[j]; upc_fence; } } upc_notify 10; upc_wait 10; } size = upc_blocksizeof (z); size = upc_localsizeof (z); size = upc_elemsizeof (z); upc_lock_free (lock); } source-highlight-3.1.6/tests/syslog.log.html0000644000175000017500000011442511672675566016073 00000000000000
Jul  8 19:51:34 localhost kernel: EXT3-fs warning: maximal mount count reached, running e2fsck is recommended
Jul  8 19:51:34 localhost kernel: EXT3 FS on dm-7, internal journal
Jul  8 19:51:34 localhost kernel: EXT3-fs: mounted filesystem with ordered data mode.
Jul  8 19:51:34 localhost kernel: Adding 1048568k swap on /dev/vg/swap.  Priority:-2 extents:1
Jul  8 19:51:38 localhost kernel: bootsplash 3.1.4-2004/02/19: looking for picture.... found (1280x1024, 27515 bytes, v3).
Jul  8 19:51:38 localhost kernel: bootsplash: status on console 0 changed to on
Jul  8 19:51:39 localhost kernel: bootsplash 3.1.4-2004/02/19: looking for picture.... found (1280x1024, 27515 bytes, v3).
Jul  8 19:51:39 localhost kernel: bootsplash: status on console 1 changed to on
Jul  8 19:51:39 localhost kernel: bootsplash 3.1.4-2004/02/19: looking for picture.... found (1280x1024, 27515 bytes, v3).
Jul  8 19:51:39 localhost kernel: bootsplash: status on console 2 changed to on
Jul  8 19:51:39 localhost kernel: bootsplash 3.1.4-2004/02/19: looking for picture.... found (1280x1024, 27515 bytes, v3).
Jul  8 19:51:39 localhost kernel: bootsplash: status on console 3 changed to on
Jul  8 19:51:39 localhost kernel: bootsplash 3.1.4-2004/02/19: looking for picture.... found (1280x1024, 27515 bytes, v3).
Jul  8 19:51:39 localhost kernel: bootsplash: status on console 4 changed to on
Jul  8 19:51:39 localhost kernel: bootsplash 3.1.4-2004/02/19: looking for picture.... found (1280x1024, 27515 bytes, v3).
Jul  8 19:51:39 localhost kernel: bootsplash: status on console 5 changed to on
Jul  8 19:51:41 localhost xfs: ignoring font path element /usr/share/fonts/Type1 (unreadable) 
Jul  8 19:51:41 localhost xfs: ignoring font path element /usr/share/fonts/Speedo (unreadable) 
Jul  8 19:51:41 localhost xfs: ignoring font path element /usr/share/fonts/CID (unreadable) 
Jul  8 19:51:41 localhost xfs: ignoring font path element /usr/share/fonts/util (unreadable) 
Jul  8 19:51:41 localhost xfs: ignoring font path element /usr/share/fonts/local (unreadable) 
Jul  8 19:51:41 localhost xfs: ignoring font path element /usr/share/fonts/Speedo (unreadable) 
Jul  8 19:51:41 localhost xfs: ignoring font path element /usr/share/fonts/truetype (unreadable) 
Jul  8 19:51:41 localhost xfs: ignoring font path element /usr/share/fonts/freefont (unreadable) 
Jul  8 19:51:41 localhost xfs: ignoring font path element /usr/share/fonts/sharefont (unreadable) 
Jul  8 19:51:41 localhost xfs: ignoring font path element /usr/share/fonts/default/Type1 (unreadable) 
Jul  8 19:51:41 localhost xfs: ignoring font path element /usr/share/fonts/ttf/decoratives (unreadable) 
Jul  8 19:51:41 localhost xfs: ignoring font path element /usr/share/fonts/ttf/western (unreadable) 
Jul  8 19:51:44 localhost kernel: [fglrx] Maximum main memory to use for locked dma buffers: 929 MBytes.
Jul  8 19:51:44 localhost kernel: [fglrx] module loaded - fglrx 3.9.0 [May 11 2004] on minor 0
Jul  8 19:51:44 localhost kernel: mtrr: 0xd0000000,0x8000000 overlaps existing 0xd0000000,0x400000
Jul  8 19:51:44 localhost kernel: [fglrx] Maximum main memory to use for locked dma buffers: 929 MBytes.
Jul  8 19:51:44 localhost kernel: [fglrx] AGP detected, AgpState   = 0x1f000217 (hardware caps of chipset)
Jul  8 19:51:44 localhost kernel: agpgart: Found an AGP 2.0 compliant device at 0000:00:00.0.
Jul  8 19:51:44 localhost kernel: agpgart: Putting AGP V2 device at 0000:00:00.0 into 4x mode
Jul  8 19:51:44 localhost kernel: agpgart: Putting AGP V2 device at 0000:01:00.0 into 4x mode
Jul  8 19:51:44 localhost kernel: [fglrx] AGP enabled,  AgpCommand = 0x1f000314 (selected caps)
Jul  8 19:51:44 localhost kernel: [fglrx] free  AGP = 121909248
Jul  8 19:51:44 localhost kernel: [fglrx] max   AGP = 121909248
Jul  8 19:51:44 localhost kernel: [fglrx] free  LFB = 104349696
Jul  8 19:51:44 localhost kernel: [fglrx] max   LFB = 104349696
Jul  8 19:51:44 localhost kernel: [fglrx] free  Inv = 0
Jul  8 19:51:44 localhost kernel: [fglrx] max   Inv = 0
Jul  8 19:51:44 localhost kernel: [fglrx] total Inv = 0
Jul  8 19:51:44 localhost kernel: [fglrx] total TIM = 0
Jul  8 19:51:44 localhost kernel: [fglrx] total FB  = 0
Jul  8 19:51:44 localhost kernel: [fglrx] total AGP = 32768
Jul  8 19:54:12 localhost gconfd (jan-17500): starting (version 2.6.1), pid 17500 user 'jan'
Jul  8 19:54:12 localhost gconfd (jan-17500): Resolved address "xml:readonly:/etc/gconf/gconf.xml.mandatory" to a read-only config source at position 0
Jul  8 19:54:12 localhost gconfd (jan-17500): Resolved address "xml:readwrite:/home/jan/.gconf" to a writable config source at position 1
Jul  8 19:54:12 localhost gconfd (jan-17500): Resolved address "xml:readonly:/etc/gconf/gconf.xml.defaults" to a read-only config source at position 2
Jul  8 19:54:14 localhost bonobo-activation-server (jan-17505): iid OAFIID:BrokenNoType:20000808 has a NULL type
Jul  8 19:54:14 localhost bonobo-activation-server (jan-17505): invalid character '#' in iid 'OAFIID:This#!!%$iid%^$%_|~!OAFIID_ContainsBadChars'
Jul  8 19:54:20 localhost bonobo-activation-server (jan-17505): iid OAFIID:BrokenNoType:20000808 has a NULL type
Jul  8 19:54:20 localhost bonobo-activation-server (jan-17505): invalid character '#' in iid 'OAFIID:This#!!%$iid%^$%_|~!OAFIID_ContainsBadChars'
Jul  8 19:54:49 localhost sudo:      jan : TTY=unknown ; PWD=/home/jan ; USER=root ; COMMAND=/usr/bin/switch_net
Jul  8 19:54:58 localhost kernel: ip_tables: (C) 2000-2002 Netfilter core team
Jul  8 19:54:58 localhost kernel: bootsplash 3.1.4-2004/02/19: looking for picture.... found (1280x1024, 27515 bytes, v3).
Jul  8 19:54:58 localhost kernel: bootsplash: status on console 0 changed to on
Jul  8 19:55:02 localhost kernel: bootsplash 3.1.4-2004/02/19: looking for picture.... found (1280x1024, 27515 bytes, v3).
Jul  8 19:55:02 localhost kernel: bootsplash: status on console 0 changed to on
Jul  8 20:36:12 localhost acpi_hdl[22520]: group battery - action N/A - args BAT0 00000080 00000001 
Jul  8 20:36:12 localhost acpi_hdl[22520]: unhandled group 
Jul  8 20:38:56 localhost kernel: kjournald starting.  Commit interval 5 seconds
Jul  8 20:38:56 localhost kernel: EXT3 FS on dm-18, internal journal
Jul  8 20:38:56 localhost kernel: EXT3-fs: mounted filesystem with ordered data mode.
Jul  8 20:39:28 localhost sudo:      jan : TTY=unknown ; PWD=/home/jan ; USER=root ; COMMAND=/usr/bin/switch_net
Jul  8 20:39:42 localhost kernel: ip_conntrack version 2.1 (8189 buckets, 65512 max) - 296 bytes per conntrack
Jul  8 20:39:56 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=0 DF PROTO=ICMP TYPE=8 CODE=0 ID=44099 SEQ=1 
Jul  8 20:39:57 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=1 DF PROTO=ICMP TYPE=8 CODE=0 ID=44099 SEQ=2 
Jul  8 20:39:58 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=2 DF PROTO=ICMP TYPE=8 CODE=0 ID=44099 SEQ=3 
Jul  8 20:39:59 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=3 DF PROTO=ICMP TYPE=8 CODE=0 ID=44099 SEQ=4 
Jul  8 20:40:00 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=4 DF PROTO=ICMP TYPE=8 CODE=0 ID=44099 SEQ=5 
Jul  8 21:10:21 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=60 TOS=0x00 PREC=0x00 TTL=64 ID=33204 DF PROTO=TCP SPT=32771 DPT=80 WINDOW=5840 RES=0x00 SYN URGP=0 
Jul  8 21:10:24 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=60 TOS=0x00 PREC=0x00 TTL=64 ID=33205 DF PROTO=TCP SPT=32771 DPT=80 WINDOW=5840 RES=0x00 SYN URGP=0 
Jul  8 21:18:09 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=28 TOS=0x00 PREC=0x00 TTL=43 ID=46587 PROTO=ICMP TYPE=8 CODE=0 ID=43114 SEQ=19025 
Jul  8 21:18:09 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=40 TOS=0x00 PREC=0x00 TTL=41 ID=660 PROTO=TCP SPT=58533 DPT=80 WINDOW=2048 RES=0x00 ACK URGP=0 
Jul  8 21:18:15 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=28 TOS=0x00 PREC=0x00 TTL=45 ID=11546 PROTO=ICMP TYPE=8 CODE=0 ID=43114 SEQ=19281 
Jul  8 21:18:15 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=40 TOS=0x00 PREC=0x00 TTL=48 ID=36003 PROTO=TCP SPT=58534 DPT=80 WINDOW=1024 RES=0x00 ACK URGP=0 
Jul  8 21:19:12 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=40 TOS=0x00 PREC=0x00 TTL=46 ID=47257 PROTO=TCP SPT=43468 DPT=397 WINDOW=3072 RES=0x00 FIN URGP=0 
Jul  8 21:19:12 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=40 TOS=0x00 PREC=0x00 TTL=41 ID=31952 PROTO=TCP SPT=43468 DPT=518 WINDOW=2048 RES=0x00 FIN URGP=0 
Jul  8 21:19:12 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=40 TOS=0x00 PREC=0x00 TTL=57 ID=31495 PROTO=TCP SPT=43468 DPT=578 WINDOW=2048 RES=0x00 FIN URGP=0 
Jul  8 21:19:12 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=40 TOS=0x00 PREC=0x00 TTL=38 ID=45362 PROTO=TCP SPT=43468 DPT=289 WINDOW=3072 RES=0x00 FIN URGP=0 
Jul  8 21:19:30 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=40 TOS=0x00 PREC=0x00 TTL=48 ID=50669 PROTO=TCP SPT=43469 DPT=1527 WINDOW=1024 RES=0x00 FIN URGP=0 
Jul  8 21:19:54 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=40 TOS=0x00 PREC=0x00 TTL=50 ID=3825 PROTO=TCP SPT=43469 DPT=1050 WINDOW=3072 RES=0x00 FIN URGP=0 
Jul  8 21:20:12 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=40 TOS=0x00 PREC=0x00 TTL=54 ID=45487 PROTO=TCP SPT=43468 DPT=341 WINDOW=3072 RES=0x00 FIN URGP=0 
Jul  8 21:20:30 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=40 TOS=0x00 PREC=0x00 TTL=49 ID=56253 PROTO=TCP SPT=43469 DPT=621 WINDOW=2048 RES=0x00 FIN URGP=0 
Jul  8 21:20:54 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=40 TOS=0x00 PREC=0x00 TTL=51 ID=10985 PROTO=TCP SPT=43469 DPT=1361 WINDOW=4096 RES=0x00 FIN URGP=0 
Jul  8 21:21:12 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=40 TOS=0x00 PREC=0x00 TTL=48 ID=52746 PROTO=TCP SPT=43468 DPT=5902 WINDOW=1024 RES=0x00 FIN URGP=0 
Jul  8 21:21:30 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=40 TOS=0x00 PREC=0x00 TTL=58 ID=9564 PROTO=TCP SPT=43469 DPT=3421 WINDOW=3072 RES=0x00 FIN URGP=0 
Jul  8 21:21:54 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=40 TOS=0x00 PREC=0x00 TTL=41 ID=10835 PROTO=TCP SPT=43469 DPT=1473 WINDOW=2048 RES=0x00 FIN URGP=0 
Jul  8 21:22:12 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=40 TOS=0x00 PREC=0x00 TTL=43 ID=15162 PROTO=TCP SPT=43468 DPT=1367 WINDOW=4096 RES=0x00 FIN URGP=0 
Jul  8 21:22:30 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=40 TOS=0x00 PREC=0x00 TTL=44 ID=65487 PROTO=TCP SPT=43469 DPT=63 WINDOW=1024 RES=0x00 FIN URGP=0 
Jul  8 21:22:54 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=40 TOS=0x00 PREC=0x00 TTL=57 ID=33141 PROTO=TCP SPT=43469 DPT=2015 WINDOW=2048 RES=0x00 FIN URGP=0 
Jul  8 21:23:12 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=40 TOS=0x00 PREC=0x00 TTL=58 ID=457 PROTO=TCP SPT=43468 DPT=705 WINDOW=3072 RES=0x00 FIN URGP=0 
Jul  8 21:23:30 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=40 TOS=0x00 PREC=0x00 TTL=46 ID=42856 PROTO=TCP SPT=43469 DPT=1392 WINDOW=3072 RES=0x00 FIN URGP=0 
Jul  8 21:23:54 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=40 TOS=0x00 PREC=0x00 TTL=59 ID=53226 PROTO=TCP SPT=43469 DPT=1 WINDOW=4096 RES=0x00 FIN URGP=0 
Jul  8 21:24:13 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=40 TOS=0x00 PREC=0x00 TTL=50 ID=32431 PROTO=TCP SPT=43468 DPT=137 WINDOW=3072 RES=0x00 FIN URGP=0 
Jul  8 21:24:31 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=40 TOS=0x00 PREC=0x00 TTL=55 ID=27450 PROTO=TCP SPT=43469 DPT=572 WINDOW=4096 RES=0x00 FIN URGP=0 
Jul  8 21:24:55 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=40 TOS=0x00 PREC=0x00 TTL=38 ID=1027 PROTO=TCP SPT=43469 DPT=2000 WINDOW=3072 RES=0x00 FIN URGP=0 
Jul  8 21:25:13 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=40 TOS=0x00 PREC=0x00 TTL=43 ID=2049 PROTO=TCP SPT=43468 DPT=903 WINDOW=4096 RES=0x00 FIN URGP=0 
Jul  8 21:25:31 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=40 TOS=0x00 PREC=0x00 TTL=57 ID=42167 PROTO=TCP SPT=43469 DPT=1387 WINDOW=2048 RES=0x00 FIN URGP=0 
Jul  8 21:25:55 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=40 TOS=0x00 PREC=0x00 TTL=39 ID=33875 PROTO=TCP SPT=43469 DPT=830 WINDOW=4096 RES=0x00 FIN URGP=0 
Jul  8 21:26:13 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=40 TOS=0x00 PREC=0x00 TTL=43 ID=50858 PROTO=TCP SPT=43468 DPT=2014 WINDOW=4096 RES=0x00 FIN URGP=0 
Jul  8 21:26:31 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=40 TOS=0x00 PREC=0x00 TTL=50 ID=40002 PROTO=TCP SPT=43469 DPT=3264 WINDOW=3072 RES=0x00 FIN URGP=0 
Jul  8 21:26:55 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=40 TOS=0x00 PREC=0x00 TTL=51 ID=33356 PROTO=TCP SPT=43469 DPT=61 WINDOW=4096 RES=0x00 FIN URGP=0 
Jul  8 21:27:13 localhost kernel: IPT-ROUTE IN=wlan0 OUT= MAC=00:04:23:a3:33:6c:00:04:e2:a9:9c:0f:08:00 SRC=1.1.1.1 DST=1.1.1.2 LEN=40 TOS=0x00 PREC=0x00 TTL=38 ID=58755 PROTO=TCP SPT=43468 DPT=801 WINDOW=3072 RES=0x00 FIN URGP=0 
source-highlight-3.1.6/tests/test.cobol0000644000175000017500000000147711672675566015106 00000000000000 $ SET SOURCEFORMAT "FREE" IDENTIFICATION DIVISION. PROGRAM-ID. ShortestProgram. PROCEDURE DIVISION. DisplayPrompt. DISPLAY "I did it". STOP RUN. * Uses the ACCEPT and DISPLAY verbs to accept a student record * from the user and display some of the fields. Also shows how * the ACCEPT may be used to get the system date and time. WORKING-STORAGE SECTION. 01 Num1 PIC 9 VALUE ZEROS. 01 Num2 PIC 9 VALUE ZEROS. 01 Result PIC 99 VALUE ZEROS. PROCEDURE DIVISION. DISPLAY "Enter first number (1 digit) : " WITH NO ADVANCING. ACCEPT Num1. DISPLAY "Enter second number (1 digit) : " WITH NO ADVANCING. ACCEPT Num2. MULTIPLY Num1 BY Num2 GIVING Result. DISPLAY "Result is = ", Result. STOP RUN. source-highlight-3.1.6/tests/test.fortran.html0000644000175000017500000000513111672675566016415 00000000000000
doc => parseFile("output.xml", iostat=i)
if (i/=0) then
  print*, "Could not open XML file"
  ! call goAndDoSomethingElseInstead()
  print*, "A string with \"" escaped chars"
endif
c = 1
double precision x

x = 1.234e5  ! single
x = 1.234d5  ! double
x = 1.234q5  ! quad

    x = b'1001010' ! binary
    x = o'1271530' ! octal
    x = z'235A7F0' ! hex (no idea why it's z and not x)

! 15 significant digits and range of (1e-307, 1e307)
integer, parameter :: wp = selected_real_kind(15, 307)

real(wp) :: x = 1.234e5_wp  ! working precision
source-highlight-3.1.6/tests/wrong_include.lang0000644000175000017500000000007211672675567016600 00000000000000keyword = "foo" include "nonexistent.lang" symbol = "%" source-highlight-3.1.6/tests/test_no_line_at_the_end.c0000644000175000017500000000002211672675567020071 00000000000000#include source-highlight-3.1.6/tests/test_with_html.php.html0000644000175000017500000002130611672675567017613 00000000000000
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<?php echo $html->charset(); ?>
	<title>
		<?php __('PhpBibliography:'); ?>
		<?php echo $title_for_layout; ?>
	</title>
<meta name="GENERATOR" content="PhpBibliography <?php echo $phpbibliography_version;?>, http://phpbibliography.sf.net" />
	<?php
		echo $html->meta('icon');

		echo $html->css('phpbibliography');
		//echo $html->css('cake.generic');
		
		echo $scripts_for_layout;
	?>
</head>
<body>
	<div id="container">
		<div id="header">
			<h1><?php /* echo $html->link(__('CakePHP: the rapid development php framework', true), 'http://cakephp.org'); */ ?></h1>
			<cake:nocache>
			<?php 
			if ($session->check('User')) {
				echo __('Logged in as: ',true);
				echo $html->link($session->read('User.username'), 
					array('controller' => 'admins', 'action' => 'edit', $session->read('User.id'), 'admin' => true));
				if ($session->read('User.superuser')) {
					echo ' '.__('(superuser)', true);
				}
				echo ' - ';
				echo $html->link(__('Logout', true), 
					array('controller' => 'admins', 'action' => 'logout', 'admin' => false));
			} 
			?>
			</cake:nocache>
		</div>
		<div id="content">

			<?php $session->flash(); ?>

			<?php echo $content_for_layout; ?>

		</div>
		<div id="footer">
			<?php echo $html->link(
					'Powered by PhpBibliography',
					'http://phpbibliography.sourceforge.net/',
					array('target'=>'_blank'), null, false
				);
			?>
		</div>
	</div>
	<?php echo $cakeDebug; ?>
</body>
</html>
source-highlight-3.1.6/tests/wrong_var.err0000644000175000017500000000005711672675567015617 00000000000000wrong_var.lang:3: undefined variable UNDEFINED source-highlight-3.1.6/tests/wrong_namedgroups_subexps.err0000644000175000017500000000023711672675567021124 00000000000000wrong_namedgroups_subexps.lang:3: parts outside marked subexpressions are not allowed wrong_namedgroups_subexps.lang:3: Caused by: Invalid regular expression. source-highlight-3.1.6/tests/test.makefile.html0000644000175000017500000001440311672675566016521 00000000000000
# a comment
## another comment
###### another comment

ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
        list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
        unique=`for i in $$list; do \
            if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
          done | \
          $(AWK) '    { files[$$0] = 1; } \
               END { for (i in files) print i; }'`; \
        mkid -fID $$unique

a##b

foo.o foo.z: foo.c

LDADD = @LEXLIB@ $(top_builddir)/gl/libgnu.la

$(source_highlightdata_DATA)

LANGFILES = \
bison.lang      cpp.lang       javascript.lang  perl.lang    ruby.lang \
c_comment.lang  flex.lang      log.lang         php.lang     sml.lang \
caml.lang       function.lang  lua.lang         prolog.lang  symbols.lang \
changelog.lang  java.lang      number.lang      python.lang  url.lang \
pascal.lang fortran.lang html.lang latex.lang logtalk.lang \
diff.lang c_string.lang langdef.lang outlang.lang style.lang \
extreme_comment.lang extreme_comment2.lang extreme_comment3.lang \
postscript.lang csharp.lang xml.lang sh.lang script_comment.lang \
tcl.lang sql.lang bib.lang makefile.lang \
default.lang nohilite.lang

OUTLANGFILES = \
css_common.outlang \
esc.outlang \
html_common.outlang \
html_notfixed.outlang \
htmlcss.outlang \
htmldoc.outlang \
html.outlang \
latexdoc.outlang \
latex.outlang \
latexcolordoc.outlang \
latexcolor.outlang \
xhtml_common.outlang \
xhtmlcss.outlang \
xhtmldoc.outlang \
xhtml.outlang \
texinfo.outlang \
javadoc.outlang \
docbook.outlang

STYLEFILES = texinfo.style esc.style

source_highlightdata_DATA = \
$(LANGFILES) $(OUTLANGFILES) \
$(STYLEFILES) \
default.style style2.style style3.style \
lang.map outlang.map

# files that are built before distribution gets built
#MAINTAINERCLEANFILES = $(BUILT_SOURCES)

check:
	for langfile in $(LANGFILES); do \
	  $(SRCHILITE) --data-dir=$(srcdir) --check-lang $(srcdir)/$$langfile ; \
	done && \
	for outlangfile in $(OUTLANGFILES); do \
	  $(SRCHILITE) --data-dir=$(srcdir) --check-outlang $(srcdir)/$$outlangfile ; \
	done

tags:
	ctags --c-types='defgmstuv' --recurse=yes $(srcdir)/*

.PHONY: tags

noinst_HEADERS = regexpengine.h regexpstate.h asserttest.h regexpenginedebug.h
source-highlight-3.1.6/tests/wrong_line_range.err0000644000175000017500000000005211672675567017125 00000000000000source-highlight: invalid line range: a-b source-highlight-3.1.6/tests/test.glsl0000644000175000017500000000162211672675566014741 00000000000000#version 120 #pragma optimize off #pragma debug on uniform vec4 vSkyParams; varying ivec4 vpos, lpos; varying bvec2 wave0, wave1, wave2; const float lambda = 2.0; void main(void) { // Texture coordinates generation vec2 vTexCoords = gl_Vertex.xz*vSkyParams.z; // Scale texture coordinates to get mix of low/high frequency details wave0 = vTexCoords * lambda + vSkyParams.w * vec2( 0.5, 1.0 ); // Perspective corrected projection gl_Position = ftransform(); vpos = gl_Vertex; lpos = gl_LightSource[0].position; // Compute normal (assumes this is a sphere) vec3 norm = normalize(vpos).xyz; //Compute sun light vec4 sunlight = vec4(pow( max(0.0, dot(light,norm)), 1024.0 )); // Get bump layers vec3 vBumpTexA = texture2D(BumpMap, wave0).xyz; //Add an horizon haze float haze = pow(gl_FragCoord.z*(1.0-norm.y), 10.0); skyColor = mix( grey, skyColor, haze ); gl_FragColor = skyColor + vSkyParams.x*sunlight; }source-highlight-3.1.6/tests/wrong_syntax.err0000644000175000017500000000004211672675567016347 00000000000000wrong_syntax.lang:2: syntax error source-highlight-3.1.6/tests/test.java.texinfo0000644000175000017500000000500711672675566016375 00000000000000@c Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite @example @t{01:} @r{@i{/*}} @t{02:} @r{@i{ This is a classical Hello program}} @t{03:} @r{@i{ to test source-highlight with Java programs.}} @t{04:} @r{@i{ }} @t{05:} @r{@i{ to have an html translation type}} @t{06:} @t{07:} @r{@i{ source-highlight -s java -f html --input Hello.java --output Hello.html}} @t{08:} @r{@i{ source-highlight -s java -f html < Hello.java > Hello.html}} @t{09:} @t{10:} @r{@i{ or type source-highlight --help for the list of options}} @t{11:} @t{12:} @r{@i{ written by}} @t{13:} @r{@i{ Lorenzo Bettini}} @t{14:} @r{@i{ }}@t{http://www.lorenzobettini.it} @t{15:} @r{@i{ }}@t{http://www.gnu.org/software/src-highlite} @t{16:} @r{@i{*/}} @t{17:} @t{18:} @b{package} hello; @t{19:} @t{20:} @b{import} java.io.* ; @t{21:} @t{22:} @r{@i{/**}} @t{23:} @r{@i{ * }}@b{

} @t{24:} @r{@i{ * A simple Hello World class, used to demonstrate some}} @t{25:} @r{@i{ * features of Java source highlighting.}} @t{26:} @r{@i{ * }}@b{

} @t{27:} @r{@i{ * }}TODO:@r{@i{ nothing, just to show an highlighted }}TODO@r{@i{ or }}FIXME @t{28:} @r{@i{ *}} @t{29:} @r{@i{ * }}@b{@@author}@r{@i{ Lorenzo Bettini}} @t{30:} @r{@i{ * }}@b{@@version}@r{@i{ 2.0}} @t{31:} @r{@i{ */}} @r{@i{/// class}} @t{32:} @b{public} @b{class} Hello @{ @t{33:} @b{int} foo = 1998 ; @t{34:} @b{int} hex_foo = 0xCAFEBABE; @t{35:} @b{boolean} b = @b{false}; @t{36:} Integer i = @b{null} ; @t{37:} @b{char} c = @t{'}\'@t{'}, d = @t{'n'}, e = @t{'}\\@t{'} ; @t{38:} String xml = @t{"ä"}, foo2 = @t{"}\\@t{"} ; @t{39:} @t{40:} @r{@i{/* mymethod */}} @t{41:} @b{public} @b{void} mymethod(@b{int} i) @{ @t{42:} @r{@i{// just a foo method}} @t{43:} @} @t{44:} @r{@i{/* mymethod */}} @t{45:} @t{46:} @r{@i{/* main */}} @t{47:} @b{public} @b{static} @b{void} main( String args[] ) @{ @t{48:} @r{@i{// just some greetings ;-) /*}} @t{49:} System.out.println( @t{"Hello from java2html :-)"} ) ; @t{50:} System.out.println( @t{"}\t@t{by Lorenzo Bettini"} ) ; @t{51:} System.out.println( @t{"}\t@t{http://www.lorenzobettini.it"} ) ; @t{52:} @b{if} (argc > 0) @t{53:} String param = argc[0]; @t{54:} @r{@i{//System.out.println( "bye bye... :-D" ) ; // see you soon}} @t{55:} @} @t{56:} @r{@i{/* main */}} @t{57:} @} @t{58:} @r{@i{/// class}} @t{59:} @t{60:} @r{@i{// end of file test.java}} @end examplesource-highlight-3.1.6/tests/wrong_syntax_mode.err0000644000175000017500000000023111672675567017353 00000000000000Please, use one of the two syntaxes for invocation: source-highlight [OPTIONS]... -i input_file -o output_file source-highlight [OPTIONS]... [FILES]... source-highlight-3.1.6/tests/missing_langmap.err0000644000175000017500000000012211672675565016752 00000000000000source-highlight: could not find a language definition for input file test.simple source-highlight-3.1.6/tests/test_with_embed.htm.html0000644000175000017500000002451611672675567017732 00000000000000 html output formatted in html
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="GNU source-highlight 
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite">
<title>Java formatted in html</title>
<style type="text/css">
 body { 
    font-family: Georgia, "Times New Roman", Times, serif; 
    color: purple; background-color: #d8da3d 
 } 
 h1 { 
   font-family: Helvetica, Geneva, Arial, SunSans-Regular, sans-serif 
}
.box {
  border-width: 2px;
  border-color: green;
  border-style: solid;
  font-style: normal;
  font-weight: lighter;
  font-family: verdana, sans-serif;
  font-size: 0.8em;
  margin-right:2em;
  margin-bottom:2em;
  margin-top:2em;
}
</style>

<SCRIPT LANGUAGE="JAVASCRIPT" SRC="mycode.js" TYPE="TEXT/JAVASCRIPT">
<!-- //-->
</SCRIPT>

<SCRIPT LANGUAGE="JavaScript">
if (navigator.userAgent.indexOf("4.0") != -1)
  jsVersion = "1.2";
else if (navigator.userAgent.indexOf("3.0") != -1)
  jsVersion = "1.1";
else
  jsVersion = "1.0";
</SCRIPT>

<script language="JavaScript"> 
/**
 Define a function for later use
 <p>test html <a href="foo">bar</a></p>
 @return nothing
*/
function print_todays_date( ) { 
    var d = new Date( ); // Get today's date and time
    document.write(d.toLocaleString( )); // Insert it into the document
}
</script>

</head>
<body bgcolor="white">

The date and time are:<br>
<script language="JavaScript"> 
// Now call the function we defined above 
print_todays_date( ); 
</script>

<pre><tt><i><font color="#9A1900">/*</font></i>
<i><font color="#9A1900">  This is a classical Hello program</font></i>
<i><font color="#9A1900">  to test source-highlight with Java programs.</font></i>
<i><font color="#9A1900">  </font></i>
<i><font color="#9A1900">  to have an html translation type</font></i>

<i><font color="#9A1900">/// class</font></i>

<i><font color="#9A1900">// end of file test.java</font></i></tt></pre>
</body>
</html>

<!-- this is an
     added HTML comment
     at the end of the file -->
source-highlight-3.1.6/tests/test.l0000644000175000017500000001016511672675566014235 00000000000000%{ /* * Copyright (C) 1999, 2000, 2001 Lorenzo Bettini * * 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., 675 Mass Ave, Cambridge, MA 02139, USA. * */ static int lineno = 1 ; /* number of scanned lines */ char linebuf[1024] ; /* current code line in the source */ int tokenpos = 0 ; // current token position in the current line #include "tags.h" #include "tokens.h" #include "colors.h" #include "genfun.h" %} %option prefix="java_scanner_" %option noyywrap ws [ ]+ tabs [\t]+ nl \n cr \r IDE [a-zA-Z_]([a-zA-Z0-9_])* wspace [ \t\n\r] STRING \"[^\"\n]*\" not_alpha [^a-zA-Z0-9] %s COMMENT_STATE %s SINGLELINE_COMMENT %s STRING_STATE %s CHAR_STATE keyword (abstract|assert|break|case|catch|class|const|continue|default|do|else|extends|final|finally|for|goto|if|implements|instanceof|interface|native|new|null|package|private|protected|public|return|static|super|switch|synchronized|throw|throws|this|transient|try|volatile|while) basetype (int|byte|boolean|char|long|float|double|short|void) symbol [\~\!\%\^\*\(\)\-\+\=\[\]\|\\\:\;\,\.\/\?\&\<\>] funccall {IDE}/{wspace}*\( %% \r {} "/*" { BEGIN COMMENT_STATE ; startComment( yytext ) ; } "/*".*"*/" { generateComment( yytext ) ; } \n { endComment (""); ++lineno; generateNewLine() ; if (true) { startComment (""); } else { for (int i = 0; i < 10; ++i) { ; // do nothing, just to test the { } } } /* if we encounter another // during a comment we simply treat it as a ordinary string */ } "*/" { endComment(yytext) ; BEGIN INITIAL ; /* end of the comment */ } "//" { BEGIN SINGLELINE_COMMENT ; startComment( yytext ) ; } \n { BEGIN INITIAL ; yyless (0); // put the \n back endComment( yytext ) ; /* if we encounter another // during a comment we simply treat it as a ordinary string */ } \" { BEGIN STRING_STATE ; startString( yytext ); } \\\\ { generate_preproc( yytext ) ; } "\\\"" { generate_preproc( yytext ) ; } \n { endString (""); ++lineno; generateNewLine() ; startString (""); } \" { BEGIN INITIAL ; endString( yytext ) ; } \' { BEGIN CHAR_STATE ; startString( yytext ); } \\\\ { generate_preproc( yytext ) ; } "\\\'" { generate_preproc( yytext ) ; } \' { BEGIN INITIAL ; endString( yytext ) ; } {keyword} { generateKeyWord( yytext ) ; } {basetype} { generateBaseType( yytext ) ; } {symbol} { generateSymbol( yytext ); } [\{\}] { generateCBracket ( yytext ); } 0[xX][0-9a-fA-F]* { generateNumber( yytext ) ; } [0-9][0-9]*(\.[0-9]*[eE]?[-+]?[0-9]*)? { generateNumber( yytext ) ; } {keyword}/{wspace}*\( { generateKeyWord( yytext ) ; } {basetype}/{wspace}*\( { generateBaseType( yytext ) ; } {funccall} { generateFunction ( yytext ); } import { generatePreProc( yytext) ; } [a-zA-Z_]([a-zA-Z0-9_])* { generate_normal( yytext ) ; } \t { generateTab() ; } . { generate_preproc( yytext ) ; /* anything else */ } \n { ++lineno; generateNewLine() ; } %% void yyerror( char *s ) ; void yyerror( char *s ) { fprintf( stderr, "%d: %s: %s\n%s\n", lineno, s, yytext, linebuf ) ; fprintf( stderr, "%*s\n", tokenpos, "^" ) ; } void yyerror( const std::string &s ) { yyerror(s.c_str()); } /* vim:set ft=flex expandtab cindent tabstop=4 softtabstop=4 shiftwidth=4 textwidth=0: */ source-highlight-3.1.6/tests/test.pc.html0000644000175000017500000000247611672675566015355 00000000000000
prefix=/home/bettini/usr/local
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: libsource-highlight
Description: GNU Source-highlight library.
URL: http://www.gnu.org/software/src-highlite/
Version: 3.0
Libs: -L${libdir} -lsource-highlight -L/usr/lib -lboost_regex-gcc43-1_35
Cflags: -I${includedir} -I${libdir}/include -I/usr/include

source-highlight-3.1.6/tests/test.js0000644000175000017500000003555711672675566014432 00000000000000/* single line comment */ /myregex/gi // check that division operator is highlighted correctly document.write('
25% = '+(25/100)+'
'); /* unusual, but valid JavaScript */ throw /foo/; /* this is more likely to occur in practice */ function f() { return /foo/; } /* or this */ function g(bar) { return /foo/.test(bar); } /* * Sarissa XML library v 0.9 beta 4 * Author: Manos Batsis, mailto: mbatsis@netsmart.gr * * This source code is distributed under the GNU GPL version 2 (see sarissa_license_gpl.txt) or higher, if * a more recent version has been released. * In case your copy of Sarissa does not include a copy of the license, you may find it online at * http://www.gnu.org/copyleft/gpl.html */ // some basic browser detection var _SARISSA_IS_IE = (navigator.userAgent.toLowerCase().indexOf("msie") > -1)?true:false; var _SARISSA_IS_MOZ = (document.implementation && document.implementation.createDocument)?true:false; var _sarissa_iNsCounter = 0; var _SARISSA_IEPREFIX4XSLPARAM = ""; if (_SARISSA_IS_MOZ) { //============================================ // Section: Factory methods for Moz //============================================ // @param sUri the namespace of the root node (if any) // @param sUri the local name of the root node (if any) // @return a DOM Document Sarissa.getDomDocument = function(sUri, sName) { var oDoc = document.implementation.createDocument(sUri, sName, null); oDoc.addEventListener("load", _sarissa__XMLDocument_onload, false); return oDoc; }; // AFAIK, the object behaves exactly like // IE's IXMLHTTPRequest) // @return a XmlHttpRequst object suitable for Moz Sarissa.getXmlHttpRequest = function() { return new XMLHttpRequest(); }; //============================================ // Section: utility functions for internal use //============================================ // Attached by an event handler to the load event. function _sarissa__XMLDocument_onload() { _sarissa_loadHandler(this); }; // Ensures the document was loaded correctly, otherwise sets the parseError to -1 // to indicate something went wrong. function _sarissa_loadHandler(oDoc) { if (!oDoc.documentElement || oDoc.documentElement.tagName == "parsererror") oDoc.parseError = -1; _sarissa_setReadyState(oDoc, 4); }; // Sets the readyState property function _sarissa_setReadyState(oDoc, iReadyState) { oDoc.readyState = iReadyState; if (oDoc.onreadystatechange != null && typeof oDoc.onreadystatechange == "function") oDoc.onreadystatechange(); }; XMLDocument.prototype._sarissa_clearDOM = function() { while(this.hasChildNodes()) this.removeChild(this.firstChild); } // Replaces the contents of the object with the contents of // the object given as the parameter XMLDocument.prototype._sarissa_copyDOM = function(oDoc) { this._sarissa_clearDOM(); // importNode is not yet needed in Moz due to a bug but it will be // fixed so... var oNodes = oDoc.childNodes; for(i=0;i/g, ">"); }); // Emulate IE's innerText (read). Gives the concatenation of all text nodes under the Element HTMLElement.prototype.__defineGetter__("innerText", function () { return _sarissa_normalizeText(this.innerHTML.replace(/<[^>]+>/g,"")); }); // Emulate IE's onreadystatechange attribute // used as a listener to the onreadystatechange event (also emulated) Document.prototype.onreadystatechange = null; // Emulate IE's parseError attribute Document.prototype.parseError = 0; // Emulates IE's readyState property, which always gives an integer from 0 to 4: // 1 == LOADING // 2 == LOADED // 3 == INTERACTIVE // 4 == COMPLETED XMLDocument.prototype.readyState = 0; // Emulates IE's async property. It controls whether loading of // remote XML files works synchronously or asynchronously. // NOTE: setting async to false will only work with documents // called over HTTP (meaning a server), not the local file system, // unless you are using Moz 1.4. // BTW the try>catch block is for 1.4; I haven't found a way to check if the property is implemented without // causing an error and I dont want to use user agent stuff for that... try{ XMLDocument.prototype.async = true; }catch(e){/*trap*/} // Keeps a handle to the original load() method XMLDocument.prototype._sarissa_load = XMLDocument.prototype.load; /** Extends the load method to provide synchronous loading * using an XMLHttpRequest object (if async is set to false) * @return the DOM Object as it was before the load() call (may be empty) */ XMLDocument.prototype.load = function(sURI) { var oDoc = document.implementation.createDocument("", "", null); oDoc._sarissa_copyDOM(this); this.parseError = 0; _sarissa_setReadyState(this, 1); try { if(this.async == false) { var tmp = new XMLHttpRequest(); tmp.open("GET", sURI, false); tmp.overrideMimeType("text/xml"); tmp.send(null); _sarissa_setReadyState(this, 2); this._sarissa_copyDOM(tmp.responseXML); _sarissa_setReadyState(this, 3); } else this._sarissa_load(sURI); } catch (objException) { this.parseError = -1; } finally { _sarissa_loadHandler(this); } return oDoc; }; // Emulate IE's transformNodeToObject Document.prototype.transformNodeToObject = function(xslDoc, oResult) { var xsltProcessor = null; try { xsltProcessor = new XSLTProcessor(); if(xsltProcessor.reset) { // new nsIXSLTProcessor is available xsltProcessor.importStylesheet(xslDoc); var newFragment = xsltProcessor.transformToFragment(this, oResult); oResult._sarissa_copyDOM(newFragment); } else { // only nsIXSLTProcessorObsolete is available xsltProcessor.transformDocument(this, xslDoc, oResult, null); } } catch(e) { if(xslDoc && oResult) throw "Sarissa_TransformNodeToObjectException: Failed to transform document. (original exception: "+e+")"; else if(!xslDoc) throw "Sarissa_TransformNodeToObjectException: No Stylesheet Document was provided. (original exception: "+e+")"; else if(!oResult) throw "Sarissa_TransformNodeToObjectException: No Result Document was provided. (original exception: "+e+")"; else if(xsltProcessor == null) throw "Sarissa_XSLTProcessorNotAvailableException: Could not instantiate an XSLTProcessor object. (original exception: "+e+")"; else throw e; } }; // Emulate IE's transformNode() method. Gives the result XML serialised to a String Document.prototype.transformNode = function(xslDoc) { var out = document.implementation.createDocument("", "", null); this.transformNodeToObject(xslDoc, out); var str = null; try { var serializer = new XMLSerializer(); str = serializer.serializeToString(out); } catch(e) { throw "Sarissa_TransformNodeException: Failed to serialize result document. (original exception: "+e+")"; } return str; }; // Extend the Array to behave as a NodeList Array.prototype.item = function(i) { return this[i]; }; // add IE's expr property Array.prototype.expr = ""; // dummy, used to accept IE's stuff without throwing errors XMLDocument.prototype.setProperty = function(x,y){}; // Emulate IE's selectNodes XMLDocument.prototype.selectNodes = function(sExpr, contextNode) { var oResult = this.evaluate(sExpr, (contextNode?contextNode:this), this.createNSResolver(this.documentElement), XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); var nodeList = new Array(oResult.snapshotLength); nodeList.expr = sExpr; for(i=0;i 0) return nodeList[0]; else return null; }; Element.prototype.selectSingleNode = function(sExpr) { var doc = this.ownerDocument; if(doc.selectSingleNode) return doc.selectSingleNode(sExpr, this); else throw "SarissaXPathOperationException: Method selectSingleNode is only supported by XML Nodes. (original exception: "+e+")"; }; } else if (_SARISSA_IS_IE) { //============================================ // Section: IE Initialization //============================================ // Add NodeType constants; missing in IE4, 5 and 6 if(!window.Node) { var Node = { ELEMENT_NODE: 1, ATTRIBUTE_NODE: 2, TEXT_NODE: 3, CDATA_SECTION_NODE: 4, ENTITY_REFERENCE_NODE: 5, ENTITY_NODE: 6, PROCESSING_INSTRUCTION_NODE: 7, COMMENT_NODE: 8, DOCUMENT_NODE: 9, DOCUMENT_TYPE_NODE: 10, DOCUMENT_FRAGMENT_NODE: 11, NOTATION_NODE: 12 } } // for XSLT parameter names _SARISSA_IEPREFIX4XSLPARAM = "xsl:"; // used to store the most recent ProgID available out of the above var _SARISSA_DOM_PROGID = ""; var _SARISSA_XMLHTTP_PROGID = ""; // used to pick most recent ProgIDs function pickRecentProgID(idList) { // found progID flag var bFound = false; for (var i=0; i < idList.length && !bFound; i++) { try { var oDoc = new ActiveXObject(idList[i]); o2Store = idList[i]; bFound = true; } catch (objException) { // trap; try next progID } } if (!bFound) throw "Sarissa_Exception: Could not retreive a valid progID of Class: " + idList[idList.length-1]+". (original exception: "+e+")"; idList = null; return o2Store; }; // store proper progIDs _SARISSA_DOM_PROGID = pickRecentProgID(["Msxml2.DOMDocument.4.0", "Msxml2.DOMDocument.3.0", "MSXML2.DOMDocument", "MSXML.DOMDocument", "Microsoft.XmlDom"]); _SARISSA_XMLHTTP_PROGID = pickRecentProgID(["Msxml2.XMLHTTP.4.0", "MSXML2.XMLHTTP.3.0", "MSXML2.XMLHTTP", "Microsoft.XMLHTTP"]); // we dont need this anymore pickRecentProgID = null; //============================================ // Section: Factory methods (IE) //============================================ // Factory method, returns a DOMDocument suitable for IE Sarissa.getDomDocument = function(sUri, sName) { var oDoc = new ActiveXObject(_SARISSA_DOM_PROGID); // if a root tag name was provided, we need to load it in the DOM object if (sName) { // if needed, create an artifical namespace prefix the way Moz does if (sUri) { oDoc.loadXML(""); // don't use the same prefix again ++_sarissa_iNsCounter; } else oDoc.loadXML("<" + sName + "/>"); } return oDoc; }; // Factory method, returns an IXMLHTTPRequest object // AFAIK, the object behaves exactly like // Mozilla's XmlHttpRequest Sarissa.getXmlHttpRequest = function() { return new ActiveXObject(_SARISSA_XMLHTTP_PROGID); }; } // Factory Class function Sarissa(){} // Common factory method, used to set xslt parameters. // TODO: figure out how to implement support for both Mozilla's and IE's // XSL Processor objects to improove performance for reusable stylesheets. // @param oXslDoc the target XSLT DOM Document // @param sParamName the name of the XSLT parameter // @param sParamValue the value of the XSLT parameter // @return whether the parameter was set succefully Sarissa.setXslParameter = function(oXslDoc, sParamQName, sParamValue) { try { var params = oXslDoc.getElementsByTagName(_SARISSA_IEPREFIX4XSLPARAM+"param"); var iLength = params.length; var bFound = false; var param; if(sParamValue) { for(i=0; i < iLength && !bFound;i++) { // match a param name attribute with the name given as argument if(params[i].getAttribute("name") == sParamQName) { param = params[i]; // clean up the parameter while(param.firstChild) param.removeChild(param.firstChild); if(!sParamValue || sParamValue == null) { // do nothing; we've cleaned up the parameter anyway } // if String else if(typeof sParamValue == "string") { param.setAttribute("select", sParamValue); bFound = true; } // if node else if(sParamValue.nodeName) { param.removeAttribute("select"); param.appendChild(sParamValue.cloneNode(true)); bFound = true; } // if NodeList else if (sParamValue.item(0) && sParamValue.item(0).nodeType) { for(j=0;j < sParamValue.length;j++) if(sParamValue.item(j).nodeType) // check if this is a Node param.appendChild(sParamValue.item(j).cloneNode(true)); bFound = true; } // if Array or IE's IXMLDOMNodeList else throw "SarissaTypeMissMatchException in method: Sarissa.setXslParameter. (original exception: "+e+")"; } } } return bFound; } catch(e) { throw e; return false; } } // EOF source-highlight-3.1.6/tests/test_ref.html0000644000175000017500000003007411672675567015604 00000000000000 Contains references to tags
/**
** Copyright (C) 1999-2007 Lorenzo Bettini
**  
  http://www.lorenzobettini.it
  
  r2 = r2 XOR (1<<10);
  cout << "hello world" << endl;
**  
*/

// this file also contains the definition of mysum as a #define

// textgenerator.h : Text Generator class &&

#ifndef _TEXTGEN_H
#define _TEXTGEN_H

#define foo(x) (x + 1)

#define mysum myfunbody 

#include <iostream.h> // for cerr

#include "genfun.h" /* for generating functions */

class TextGenerator {
  public :
    virtual void generate( const char *s ) const { (*sout) << s ; }
    virtual void generate( const char *s, int start, int end ) const 
      {
        for ( int i = start ; i <= end ; ++i )
          (*sout) << s[i] ;
        return a<p->b ? a : 3;
      }
    virtual void generateln( const char *s ) const
	{ 
	    generate( s ) ;
generate -> test.h:28
generate -> test.h:29
	    (*sout) << endl ; 
	}
    virtual void generateEntire( const char *s ) const
	{
	    startTextGeneration() ;
startTextGeneration -> test.h:46
startTextGeneration -> test.h:70
	    generate(s) ;
generate -> test.h:28
generate -> test.h:29
	    endTextGeneration() ;
endTextGeneration -> test.h:47
endTextGeneration -> test.h:76
	}
    virtual void startTextGeneration() const {}
    virtual void endTextGeneration() const {}
    virtual void beginText( const char *s ) const
	{
	    startTextGeneration() ;
startTextGeneration -> test.h:46
startTextGeneration -> test.h:70
	    if ( s )
		generate( s ) ;
generate -> test.h:28
generate -> test.h:29
	}
    virtual void endText( const char *s ) const
	{
	    if ( s )
		generate( s ) ;
generate -> test.h:28
generate -> test.h:29
	    endTextGeneration() ;
endTextGeneration -> test.h:47
endTextGeneration -> test.h:76
	}
} ;

// Decorator
class TextDecorator : public TextGenerator {
  protected :
    TextGenerator *decorated ;
  
  public :
    TextDecorator( TextGenerator *t ) : decorated( t ) {}

    virtual void startTextGeneration() const 
    { 
	startDecorate() ;
	if ( decorated )
	    decorated->startTextGeneration() ;
startTextGeneration -> test.h:46
startTextGeneration -> test.h:70
    }
    virtual void endTextGeneration() const 
    { 
	if ( decorated )
	    decorated->endTextGeneration() ;
endTextGeneration -> test.h:47
endTextGeneration -> test.h:76
	endDecorate() ;
	mysum;
    }

    // pure virtual functions
    virtual void startDecorate() const = 0 ;
    virtual void endDecorate() const = 0 ;
} ;

#endif // _TEXTGEN_H
source-highlight-3.1.6/tests/test.ml.html0000644000175000017500000001255311672675566015360 00000000000000
open Graphics
open Types
(* #load "graphics.cma" *)
(* #load "fixed.cmo" *)

let _ = open_graph " 1024x768"
let _ = set_color black

let plot_car =
  let size_y = size_y () in
  fun ({x=x; y=y},_,_) ->
    Graphics.plot (Fixed.to_coord x) (size_y - Fixed.to_coord y)

let plot freq cars =
  ignore
  (List.fold_left (fun counter car -> if counter <= 0
		   then (plot_car car; freq)
		   else pred counter) freq cars)

let list_iteri f l =
  ignore (List.fold_left (fun i elt -> f i elt; i+1) 0 l)

let array_for_all f a =
  let length = Array.length a in
  let rec loop i =
    if i = length then true else f a.(i) && loop (i+1) in
    loop 0

let rec dedoublonne = function
  |a::b::q -> if a = b then dedoublonne (b::q) else a :: dedoublonne (b::q)
  |[a] -> [a]
  |[] -> []

let merge_songs db = function
  | [] | [_] -> ()
  | id :: id's ->
    let mysql_ids = List.map ml642int id's in
    ()
source-highlight-3.1.6/tests/test.tex.html0000644000175000017500000001035411672675566015545 00000000000000
% this is just to test latex highlighting
% it will not compile with latex though :-)

\runningheads{L.~Bettini, S.~Capecchi and B.~Venneri}
{Double Dispatch in \CC}

This is an higlighted \command.

\lstdefinelanguage{xklaim}%
  {morekeywords={if,else,then,endif,while,do,enddo,begin,end,rec,ref,declare,%
      int,str,loc,process,bool,locname,ts,var,within,in,out,read,eval,newloc,%
      go,true,false,not,and,or,nil,add,rm,newc,extern,%
      inp,readp,forall,const,nodes,endnodes,on,print,logloc,phyloc,%
      login,logout,accept,disconnected,accept,subscribe,unsubscribe,%
      dirconnect,acceptconn,%
      register,unregister,nodecoord,port,start,cons,%
      return,new,object,class,mixin,def,redef,expect,next,this,red,exp,type},%
    keywords=[2]{self},%
    keywordstyle=[2]\ttfamily,%
    alsoother=@,%
    morecomment=[l]\#,%
    sensitive=f,%
    morestring=[b]"%
   }[keywords,strings]

\frame{
\frametitle{Tuples and Pattern Matching}
  \begin{itemize}
  \item Tuples and Templates
    \[
    ("foo", 10+5, !x)
    \]
    \begin{itemize}
    \item Formal Fields
    \item Actual Fields
    \end{itemize}
  \item Pattern Matching:
    \begin{itemize}
    \item Formal fields match any field of the same type
    \item Actual fields
      match if identical
    \end{itemize}
  \end{itemize}
\vspace{0.4cm}
\begin{block}{}
\begin{center}
$("foo", 10+5, true)$ \alert{matches} $(!s, 15, !b)$
\end{center}
\end{block}
}

This is mathematic with \$\$:

$$
i = j
$$

the same but with \[ \]:

\[
i = j
\]

`Private, Protected and Virtual Methods').
This line's body shouldn't have the highlighted '.

These \`e \'e \"e are accents and not a string

L.~Bettini

\paragraph*{Typing rule for multi method invocation.}
source-highlight-3.1.6/tests/test.sql.html0000644000175000017500000000465511672675566015553 00000000000000
# Table structure for table `authors`
#

-- just to test sql highlighting

DROP TABLE IF EXISTS `authors`;
CREATE TABLE `authors` (
  `idauthor` int(11) unsigned NOT NULL auto_increment,
  `surname` varchar(40) NOT NULL default '',
  `name` varchar(40) NOT NULL default '',
  PRIMARY KEY  (`idauthor`),
  key `surname` (`surname`)
) TYPE=InnoDB AUTO_INCREMENT=13 ;

/* a C like comment */
source-highlight-3.1.6/tests/test_ref.docbook0000644000175000017500000001655111672675567016264 00000000000000
listing in docbook 01: /** 02: ** Copyright (C) 1999-2007 Lorenzo Bettini 03: ** 04: http://www.lorenzobettini.it 05: 06: r2 = r2 XOR (1<<10); 07: cout << "hello world" << endl; 08: ** 09: */ 10: 11: // this file also contains the definition of mysum as a #define 12: 13: // textgenerator.h : Text Generator class && 14: 15: #ifndef _TEXTGEN_H _TEXTGEN_H -> 16 16: #define _TEXTGEN_H 17: 18: #define foo(x) (x + 1) 19: 20: #define mysum myfunbody 21: 22: #include <iostream.h> // for cerr 23: 24: #include "genfun.h" /* for generating functions */ 25: 26: class TextGenerator { 27: public : 28: virtual void generate( const char *s ) const { (*sout) << s ; } 29: virtual void generate( const char *s, int start, int end ) const 30: { 31: for ( int i = start ; i <= end ; ++i ) 32: (*sout) << s[i] ; 33: return a<p->b ? a : 3; 34: } 35: virtual void generateln( const char *s ) const 36: { 37: generate( s ) ; generate -> 28 generate -> 29 38: (*sout) << endl ; 39: } 40: virtual void generateEntire( const char *s ) const 41: { 42: startTextGeneration() ; startTextGeneration -> 46 startTextGeneration -> 70 43: generate(s) ; generate -> 28 generate -> 29 44: endTextGeneration() ; endTextGeneration -> 47 endTextGeneration -> 76 45: } 46: virtual void startTextGeneration() const {} 47: virtual void endTextGeneration() const {} 48: virtual void beginText( const char *s ) const 49: { 50: startTextGeneration() ; startTextGeneration -> 46 startTextGeneration -> 70 51: if ( s ) 52: generate( s ) ; generate -> 28 generate -> 29 53: } 54: virtual void endText( const char *s ) const 55: { 56: if ( s ) 57: generate( s ) ; generate -> 28 generate -> 29 58: endTextGeneration() ; endTextGeneration -> 47 endTextGeneration -> 76 59: } 60: } ; 61: 62: // Decorator 63: class TextDecorator : public TextGenerator { TextGenerator -> 26 64: protected : 65: TextGenerator *decorated ; TextGenerator -> 26 66: 67: public : 68: TextDecorator( TextGenerator *t ) : decorated( t ) {} TextGenerator -> 26 decorated -> 65 69: 70: virtual void startTextGeneration() const 71: { 72: startDecorate() ; 73: if ( decorated ) decorated -> 65 74: decorated->startTextGeneration() ; startTextGeneration -> 46 decorated -> 65 startTextGeneration -> 70 75: } 76: virtual void endTextGeneration() const 77: { 78: if ( decorated ) decorated -> 65 79: decorated->endTextGeneration() ; endTextGeneration -> 47 decorated -> 65 endTextGeneration -> 76 80: endDecorate() ; 81: mysum; mysum -> 20 82: } 83: 84: // pure virtual functions 85: virtual void startDecorate() const = 0 ; 86: virtual void endDecorate() const = 0 ; 87: } ; 88: 89: #endif // _TEXTGEN_H 90:
source-highlight-3.1.6/tests/Makefile.in0000664000175000017500000025460111676050503015133 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Copyright (C) 1999-2008 Lorenzo Bettini # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = tests DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/valgrind_suppressions.sh.in \ $(srcdir)/valgrind_test.sh.in $(srcdir)/valgrind_tests.sh.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/gl/m4/00gnulib.m4 \ $(top_srcdir)/gl/m4/ac_prog_doxygen.m4 \ $(top_srcdir)/gl/m4/dirent_h.m4 $(top_srcdir)/gl/m4/dirname.m4 \ $(top_srcdir)/gl/m4/double-slash-root.m4 \ $(top_srcdir)/gl/m4/extensions.m4 \ $(top_srcdir)/gl/m4/getopt.m4 \ $(top_srcdir)/gl/m4/gnulib-common.m4 \ $(top_srcdir)/gl/m4/gnulib-comp.m4 \ $(top_srcdir)/gl/m4/include_next.m4 \ $(top_srcdir)/gl/m4/malloc.m4 $(top_srcdir)/gl/m4/memset.m4 \ $(top_srcdir)/gl/m4/mkdir.m4 $(top_srcdir)/gl/m4/nocrash.m4 \ $(top_srcdir)/gl/m4/ssize_t.m4 $(top_srcdir)/gl/m4/stdbool.m4 \ $(top_srcdir)/gl/m4/stddef_h.m4 \ $(top_srcdir)/gl/m4/stdlib_h.m4 $(top_srcdir)/gl/m4/strdup.m4 \ $(top_srcdir)/gl/m4/string_h.m4 \ $(top_srcdir)/gl/m4/sys_stat_h.m4 \ $(top_srcdir)/gl/m4/time_h.m4 $(top_srcdir)/gl/m4/unistd_h.m4 \ $(top_srcdir)/gl/m4/warn-on-use.m4 \ $(top_srcdir)/gl/m4/wchar_t.m4 \ $(top_srcdir)/m4/ax_boost_base.m4 \ $(top_srcdir)/m4/ax_boost_regex.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = valgrind_tests.sh valgrind_suppressions.sh \ valgrind_test.sh CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(source_highlightdocdir)" DATA = $(source_highlightdoc_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ABSOLUTEDATADIR = @ABSOLUTEDATADIR@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ ARFLAGS = @ARFLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASH_COMPLETION_DIR = @BASH_COMPLETION_DIR@ BASH_SHELL = @BASH_SHELL@ BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ BOOST_LDFLAGS = @BOOST_LDFLAGS@ BOOST_REGEX_LIB = @BOOST_REGEX_LIB@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHROOT_INPUT_DIR = @CHROOT_INPUT_DIR@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOUBLECPP = @DOUBLECPP@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GENGETOPT = @GENGETOPT@ GETOPT_H = @GETOPT_H@ GNULIB_ALPHASORT = @GNULIB_ALPHASORT@ GNULIB_ATOLL = @GNULIB_ATOLL@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ GNULIB_CHDIR = @GNULIB_CHDIR@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@ GNULIB_DIRFD = @GNULIB_DIRFD@ GNULIB_DUP = @GNULIB_DUP@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ GNULIB_FDATASYNC = @GNULIB_FDATASYNC@ GNULIB_FDOPENDIR = @GNULIB_FDOPENDIR@ GNULIB_FFSL = @GNULIB_FFSL@ GNULIB_FFSLL = @GNULIB_FFSLL@ GNULIB_FSTAT = @GNULIB_FSTAT@ GNULIB_FSTATAT = @GNULIB_FSTATAT@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@ GNULIB_GRANTPT = @GNULIB_GRANTPT@ GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@ GNULIB_LCHMOD = @GNULIB_LCHMOD@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MBTOWC = @GNULIB_MBTOWC@ GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_MKDIRAT = @GNULIB_MKDIRAT@ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ GNULIB_MKFIFO = @GNULIB_MKFIFO@ GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@ GNULIB_MKNOD = @GNULIB_MKNOD@ GNULIB_MKNODAT = @GNULIB_MKNODAT@ GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_MKTIME = @GNULIB_MKTIME@ GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@ GNULIB_OPENDIR = @GNULIB_OPENDIR@ GNULIB_PIPE = @GNULIB_PIPE@ GNULIB_PIPE2 = @GNULIB_PIPE2@ GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PTSNAME = @GNULIB_PTSNAME@ GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PWRITE = @GNULIB_PWRITE@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_READ = @GNULIB_READ@ GNULIB_READDIR = @GNULIB_READDIR@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ GNULIB_REWINDDIR = @GNULIB_REWINDDIR@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SCANDIR = @GNULIB_SCANDIR@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_STAT = @GNULIB_STAT@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRERROR_R = @GNULIB_STRERROR_R@ GNULIB_STRNCAT = @GNULIB_STRNCAT@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRPTIME = @GNULIB_STRPTIME@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOD = @GNULIB_STRTOD@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRTOLL = @GNULIB_STRTOLL@ GNULIB_STRTOULL = @GNULIB_STRTOULL@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@ GNULIB_TIMEGM = @GNULIB_TIMEGM@ GNULIB_TIME_R = @GNULIB_TIME_R@ GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@ GNULIB_UNSETENV = @GNULIB_UNSETENV@ GNULIB_USLEEP = @GNULIB_USLEEP@ GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@ GNULIB_WCTOMB = @GNULIB_WCTOMB@ GNULIB_WRITE = @GNULIB_WRITE@ GNULIB__EXIT = @GNULIB__EXIT@ GREP = @GREP@ HAVE_ALPHASORT = @HAVE_ALPHASORT@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ HAVE_CHOWN = @HAVE_CHOWN@ HAVE_CLOSEDIR = @HAVE_CLOSEDIR@ HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@ HAVE_DECL_FDOPENDIR = @HAVE_DECL_FDOPENDIR@ HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ HAVE_DIRENT_H = @HAVE_DIRENT_H@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHDIR = @HAVE_FCHDIR@ HAVE_FCHMODAT = @HAVE_FCHMODAT@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FDATASYNC = @HAVE_FDATASYNC@ HAVE_FDOPENDIR = @HAVE_FDOPENDIR@ HAVE_FFSL = @HAVE_FFSL@ HAVE_FFSLL = @HAVE_FFSLL@ HAVE_FSTATAT = @HAVE_FSTATAT@ HAVE_FSYNC = @HAVE_FSYNC@ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ HAVE_FUTIMENS = @HAVE_FUTIMENS@ HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ HAVE_GETGROUPS = @HAVE_GETGROUPS@ HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ HAVE_GETLOGIN = @HAVE_GETLOGIN@ HAVE_GETOPT_H = @HAVE_GETOPT_H@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GRANTPT = @HAVE_GRANTPT@ HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LCHOWN = @HAVE_LCHOWN@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ HAVE_LSTAT = @HAVE_LSTAT@ HAVE_MBSLEN = @HAVE_MBSLEN@ HAVE_MEMCHR = @HAVE_MEMCHR@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_MKDIRAT = @HAVE_MKDIRAT@ HAVE_MKDTEMP = @HAVE_MKDTEMP@ HAVE_MKFIFO = @HAVE_MKFIFO@ HAVE_MKFIFOAT = @HAVE_MKFIFOAT@ HAVE_MKNOD = @HAVE_MKNOD@ HAVE_MKNODAT = @HAVE_MKNODAT@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMP = @HAVE_MKSTEMP@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ HAVE_NANOSLEEP = @HAVE_NANOSLEEP@ HAVE_OPENDIR = @HAVE_OPENDIR@ HAVE_OS_H = @HAVE_OS_H@ HAVE_PIPE = @HAVE_PIPE@ HAVE_PIPE2 = @HAVE_PIPE2@ HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@ HAVE_PREAD = @HAVE_PREAD@ HAVE_PTSNAME = @HAVE_PTSNAME@ HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ HAVE_PWRITE = @HAVE_PWRITE@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_READDIR = @HAVE_READDIR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ HAVE_REALPATH = @HAVE_REALPATH@ HAVE_REWINDDIR = @HAVE_REWINDDIR@ HAVE_RPMATCH = @HAVE_RPMATCH@ HAVE_SCANDIR = @HAVE_SCANDIR@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@ HAVE_SLEEP = @HAVE_SLEEP@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRPTIME = @HAVE_STRPTIME@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ HAVE_TIMEGM = @HAVE_TIMEGM@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ HAVE_USLEEP = @HAVE_USLEEP@ HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE__BOOL = @HAVE__BOOL@ HAVE__EXIT = @HAVE__EXIT@ HELP2MAN = @HELP2MAN@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBRARY_NAMESPACE = @LIBRARY_NAMESPACE@ LIBRARY_VERSION = @LIBRARY_VERSION@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@ NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ NEXT_DIRENT_H = @NEXT_DIRENT_H@ NEXT_GETOPT_H = @NEXT_GETOPT_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PRAGMA_COLUMNS = @PRAGMA_COLUMNS@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ RANLIB = @RANLIB@ REPLACE_CALLOC = @REPLACE_CALLOC@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ REPLACE_CHOWN = @REPLACE_CHOWN@ REPLACE_CLOSE = @REPLACE_CLOSE@ REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@ REPLACE_DIRFD = @REPLACE_DIRFD@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@ REPLACE_FSTAT = @REPLACE_FSTAT@ REPLACE_FSTATAT = @REPLACE_FSTATAT@ REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_LSTAT = @REPLACE_LSTAT@ REPLACE_MALLOC = @REPLACE_MALLOC@ REPLACE_MBTOWC = @REPLACE_MBTOWC@ REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKDIR = @REPLACE_MKDIR@ REPLACE_MKFIFO = @REPLACE_MKFIFO@ REPLACE_MKNOD = @REPLACE_MKNOD@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OPENDIR = @REPLACE_OPENDIR@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_PWRITE = @REPLACE_PWRITE@ REPLACE_READ = @REPLACE_READ@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_REALLOC = @REPLACE_REALLOC@ REPLACE_REALPATH = @REPLACE_REALPATH@ REPLACE_RMDIR = @REPLACE_RMDIR@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_STAT = @REPLACE_STAT@ REPLACE_STPNCPY = @REPLACE_STPNCPY@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRERROR_R = @REPLACE_STRERROR_R@ REPLACE_STRNCAT = @REPLACE_STRNCAT@ REPLACE_STRNDUP = @REPLACE_STRNDUP@ REPLACE_STRNLEN = @REPLACE_STRNLEN@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ REPLACE_UNLINK = @REPLACE_UNLINK@ REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ REPLACE_UNSETENV = @REPLACE_UNSETENV@ REPLACE_USLEEP = @REPLACE_USLEEP@ REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@ REPLACE_WCTOMB = @REPLACE_WCTOMB@ REPLACE_WRITE = @REPLACE_WRITE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STRIP = @STRIP@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TAR = @TAR@ TEXI2HTML = @TEXI2HTML@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ VALGRIND = @VALGRIND@ VERSION = @VERSION@ YACC = @YACC@ YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bash_completiondir = @bash_completiondir@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ gltests_WITNESS = @gltests_WITNESS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ source_highlightdatadir = @source_highlightdatadir@ source_highlightdocdir = @source_highlightdocdir@ source_highlightlibdocdir = @source_highlightlibdocdir@ source_highlightlibexampledir = @source_highlightlibexampledir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = output_dir SUFFIXES = .lang .err_out .outlang .style .css .css.java.html .nf_css.java.html .css_doc.java.html .css_xhtml.java.html STD_STYLE = --style-file $(top_srcdir)/src/default.style STD_CSS_STYLE = --style-css-file $(top_srcdir)/src/default.css STD_STYLE_HTML = -f html $(STD_STYLE) STD_STYLE_DEFAULTS = --style-defaults $(top_srcdir)/src/style.defaults DATADIROPTION = --data-dir $(top_srcdir)/src/ # use --binary-output so that output test files are always generated # with \n only also on other operating systems. PROGEXE = $(top_builddir)/src/$(PACKAGE)$(EXEEXT) --binary-output # use --strip-trailing-cr since if run on windows, it may # add \r to output files, while the reference files distributed # are built on linux DIFF = diff # we disable the generation of the version of source-highlight # so that the version does not interfere with the diffing PROGNAME = $(PROGEXE) --gen-version $(DATADIROPTION) PROGNAME_CSSSTYLE = $(PROGEXE) --gen-version $(DATADIROPTION) $(STD_CSS_STYLE) PROGNAME_DOCBOOK = $(PROGEXE) --gen-version $(DATADIROPTION) -f docbook --doc --title="listing in docbook" --tab=8 PROGNAME_STD = $(PROGNAME) $(STD_STYLE_HTML) CHECKLANG = $(top_builddir)/src/$(PACKAGE)$(EXEEXT) --check-lang CHECKOUTLANG = $(top_builddir)/src/$(PACKAGE)$(EXEEXT) --check-outlang JAVA2HTML = $(PROGNAME) -s java $(STD_STYLE_HTML) JAVA2HTMLDOC = $(JAVA2HTML) --title="This is the title" JAVA2ODF = $(PROGNAME) -s java -f odf JAVA2ODFDOC = $(JAVA2ODF) --title="This is the title" JAVA2MEDIAWIKI = $(PROGNAME) -s java -f mediawiki JS2HTML = $(PROGNAME) -s javascript $(STD_STYLE_HTML) URL2HTML = $(PROGNAME) --lang-def=url.lang $(STD_STYLE_HTML) JAVA2XHTML = $(PROGNAME) -s java -f xhtml $(STD_STYLE) --lang-def=$(srcdir)/../src/java.lang JAVA2XHTMLDOC = $(JAVA2XHTML) --doc # note that we don't use $(srcdir), since we're only interested in # the output of source-highlight to test it JAVA2XHTMLCSS = $(JAVA2XHTML) --css ../doc/mono.css --no-doc JAVA2XHTMLCSSDOC = $(JAVA2XHTML) --css ../doc/mono.css JAVA2HTMLNOTFIXED = $(PROGNAME) -s java --outlang-def=$(srcdir)/../src/html_notfixed.outlang $(STD_STYLE) --doc --lang-def=$(srcdir)/../src/java.lang JAVA2XHTMLNOTFIXED = $(PROGNAME) -s java --outlang-def=$(srcdir)/../src/xhtml_notfixed.outlang $(STD_STYLE) --doc --lang-def=$(srcdir)/../src/java.lang JAVA2ESC = $(PROGNAME) -s java -f esc --style-file=$(top_srcdir)/src/esc.style --doc --lang-def=$(srcdir)/../src/java.lang JAVA2TEX = $(PROGNAME) --doc -s java -f latexcolor $(STD_STYLE) --title="formatted with source-highlight" CPP2TEX = $(PROGNAME) --doc -s cpp -f latexcolor $(STD_STYLE) JAVA2TEXINFO = $(PROGNAME) -s java -f texinfo --style-file $(top_srcdir)/src/texinfo.style CPP2TEXINFO_WREFS = $(PROGNAME) -s cpp -f texinfo --style-file $(top_srcdir)/src/texinfo.style --gen-references=postline --line-number # this refers to an "absolute" path (../doc/) without using the automake # variables. However this way the generated files will always be the # same so tests won't fail. You may have some problems if you want to # view the generated file, test_css.html, and you are building in a # different directory. However this is not the spirit of the test :-) # the important thing is that the generated file is always the same. JAVA2HTMLCSS = $(PROGNAME) -s java -f html --css ../doc/mono.css --lang-def=$(srcdir)/../src/java.lang JAVA2HTMLCSSNODOC = $(PROGNAME) -s java -f html --css ../doc/mono.css --no-doc --lang-def=$(srcdir)/../src/java.lang CPP2HTML = $(PROGNAME) -s cpp $(STD_STYLE_HTML) --lang-def=$(srcdir)/../src/cpp.lang C2HTML = $(PROGNAME) -s c $(STD_STYLE_HTML) --lang-def=$(srcdir)/../src/c.lang CSHARP2HTML = $(PROGNAME) -s csharp $(STD_STYLE_HTML) --lang-def=$(srcdir)/../src/csharp.lang PROLOG2HTML = $(PROGNAME) -s prolog $(STD_STYLE_HTML) --lang-def=$(srcdir)/../src/prolog.lang PERL2HTML = $(PROGNAME) -s perl $(STD_STYLE_HTML) --lang-def=$(srcdir)/../src/perl.lang PHP2HTML = $(PROGNAME) -s php3 $(STD_STYLE_HTML) --lang-def=$(srcdir)/../src/php.lang PYTHON2HTML = $(PROGNAME) -s python $(STD_STYLE_HTML) --lang-def=$(srcdir)/../src/python.lang FLEX2HTML = $(PROGNAME) -s flex $(STD_STYLE_HTML) --lang-def=$(srcdir)/../src/flex.lang BISON2HTML = $(PROGNAME) -s bison $(STD_STYLE_HTML) --lang-def=$(srcdir)/../src/bison.lang CHANGELOG2HTML = $(PROGNAME) -s changelog $(STD_STYLE_HTML) --lang-def=$(srcdir)/../src/changelog.lang CHANGELOG2HTMLCSS = $(PROGNAME) -s changelog -f html --css ./changelog.css --title="ChangeLog with css" --lang-def=$(srcdir)/../src/changelog.lang RUBY2HTML = $(PROGNAME) -s ruby $(STD_STYLE_HTML) --lang-def=$(srcdir)/../src/ruby.lang LUA2HTML = $(PROGNAME) -s lua $(STD_STYLE_HTML) --lang-def=$(srcdir)/../src/lua.lang CAML2HTML = $(PROGNAME) -s caml $(STD_STYLE_HTML) --lang-def=$(srcdir)/../src/caml.lang SML2HTML = $(PROGNAME) -s sml $(STD_STYLE_HTML) --lang-def=$(srcdir)/../src/sml.lang LOG2HTML = $(PROGNAME) -s log -f html --style-file=$(srcdir)/syslog.style --lang-def=$(srcdir)/../src/log.lang LATEX2HTML = $(PROGNAME) -s latex $(STD_STYLE_HTML) LOGTALK2HTML = $(PROGNAME) -s logtalk $(STD_STYLE_HTML) DIFF2HTML = $(PROGNAME) -s diff $(STD_STYLE_HTML) LANG2HTML = $(PROGNAME) -s langdef $(STD_STYLE_HTML) STYLE2HTML = $(PROGNAME) -s style $(STD_STYLE_HTML) PROPERTIES2HTML = $(PROGNAME) $(STD_STYLE_HTML) DESKTOP2HTML = $(PROGNAME) $(STD_STYLE_HTML) LSM2HTML = $(PROGNAME) $(STD_STYLE_HTML) HAXE2HTML = $(PROGNAME) $(STD_STYLE_HTML) FORTRAN2HTML = $(PROGNAME) $(STD_STYLE_HTML) SPEC2HTML = $(PROGNAME) $(STD_STYLE_HTML) TXT2HTML = $(PROGNAME) -s style $(STD_STYLE_HTML) --lang-def=default.lang FAILSAFE = $(PROGNAME) --failsafe INFER = $(PROGNAME) --infer-lang # language inference is performed implicitly if everything else failed INFERIMPLICIT = $(PROGNAME) SIMPLE = $(PROGEXE) --gen-version --outlang-def=$(srcdir)/simple.outlang --lang-def=$(srcdir)/simple.lang $(STD_STYLE) --style-defaults=$(srcdir)/../src/style.defaults # test with a defaults file TESTWDEFAULTS = $(PROGNAME) --lang-def=$(srcdir)/lang4defaults.lang $(STD_STYLE) --style-defaults=$(srcdir)/test.defaults # test without a defaults file TESTWODEFAULTS = $(PROGNAME) --lang-def=$(srcdir)/lang4defaults.lang $(STD_STYLE) TESTISOLATE = $(PROGNAME) --lang-def=$(srcdir)/test_isolate.lang TESTBACKREF = $(PROGNAME) --lang-def=$(srcdir)/test_backref.lang # for testing named groups NAMEDGROUPS = $(PROGEXE) --gen-version --lang-def=$(srcdir)/namedgroups.lang $(STD_STYLE) $(DATADIROPTION) NAMEDGROUPS_STATE = $(PROGEXE) --gen-version --lang-def=$(srcdir)/namedgroups_state.lang $(STD_STYLE) $(DATADIROPTION) DEBUGLANG = $(PROGNAME) -s java $(STD_STYLE_HTML) --debug-lang=dump WRONGFILES = wrong_exp.lang wrong_var.lang wrong_trans.outlang wrong_syntax_simple.lang wrong_syntax.lang wrong_syntax_include.lang wrong_namedgroups.lang wrong_namedgroups_subexps.lang wrong_namedgroups_subexps2.lang wrong_backref.lang wrong_backref2.lang wrong_dyn_backref.lang wrong_dyn_backref2.lang wrong_include.lang wrong_outlang_include.outlang WRONGFILESOUT = wrong_exp.err wrong_var.err wrong_trans.err missing_langmap.err missing_extension.err wrong_syntax_simple.err wrong_syntax.err wrong_syntax_include.err wrong_namedgroups.err wrong_namedgroups_subexps.err wrong_namedgroups_subexps2.err wrong_backref.err wrong_backref2.err wrong_dyn_backref.err wrong_dyn_backref2.err wrong_include.err wrong_outlang_include.err WRONGSTYLES = wrong_dircolor.style wrong_already_defined.style wrong_already_defined_css.css WRONGSTYLESOUT = wrong_dircolor.err wrong_already_defined.err wrong_already_defined_css.err WRONGCMDLINEPARAMS = wrong_line_range.err wrong_regex_range.err \ wrong_syntax_mode.err # missing_langmap2.err OUTPUTWREFS = test_ref.html test_refs.h.html test_refs.cpp.html test_ref.tex test_ref_post.tex test_ref.texinfo test_ref.docbook test_ref.xhtml TAGFILES = test_ref.tags test_ref_multi.tags EXTRA_DIST = test.java test.java.html test.java.doc.html \ test.js test.js.html test.h test.h.html test_c.c test_c.c.html \ test_no_line_at_the_end.c test_no_line_at_the_end.c.html \ test_line_at_the_end.c test_line_at_the_end.c.html \ test_no_line_at_the_end.java test_no_line_at_the_end.java.html \ test_comments.cc test_comments.cc.html test_comments.java \ test_comments.java.html test_template.cc test_template.cc.html \ test.pl test.pl.html header.html footer.html test_header.html \ test_java_lines.html test_cpp_lines.html test_pl_lines.html \ test.pm test_comments.pm test.pm.html test_comments.pm.html \ test_perl_lines.html \ test.php3 test.php3.html test_php3_lines.html \ test_with_html.php.html test_with_html.php \ test.py test.py.html test_python_lines.html \ test_comments.py test_comments.py.html test_py_comments_lines.html \ test_xhtml.html test_xhtml_notfixed.html test_xhtml_doc.html \ test_xhtml_css.html test_xhtml_css_doc.html \ test_css.html test_css_nodoc.html test_notfixed.html \ test.chlog test.chlog.html test.chlog_css.html \ test.l test.l.html \ test.y test.y.html \ test.rb test_comments.rb test.rb.html test_comments.rb.html \ test.java.txt \ test.java.tex test.java.tex.html \ test.java.fodt test.java.doc.fodt \ test.java.mediawiki \ test.java.texinfo \ test.lua test.lua.html \ test.ml test.ml.html \ test.sml test.sml.html \ test.log test.log.html \ access.log access.log.html \ auth.log auth.log.html \ error.log error.log.html \ syslog.log syslog.log.html \ test.pas test.pas.html \ test.htm test.htm.html \ test_with_embed.htm test_with_embed.htm.html \ test_html5.htm test_html5.htm.html \ test2.htm test2.htm.html \ test.diff test.diff.html \ test2.diff test2.diff.html \ test3.diff test3.diff.html \ test.simple test.simple.html \ test.unknown test.unknown.html \ syslog.style syslog.style.html \ test.tex test.tex.html \ test.lgt test.lgt.html \ $(OUTPUTWREFS) \ test_refs.h test_refs.cpp \ changelog.css \ simple.lang simple.outlang \ test_isolate.lang \ test.isolate test.isolate.html \ test_backref.lang \ test.backref test.backref.html \ test2.backref test2.backref.html \ log.lang.html c.lang.html \ default.style.html \ lang.map \ debug.debug debug.java debug.java.html \ test_extreme_comment.cpp test_extreme_comment2.cpp test_extreme_comment3.cpp \ test.cs test.cs.html \ test.xml test.xml.html \ test.sh test.sh.html \ test2.sh test2.sh.html \ test.url test.url.html \ test.txt test.txt.html \ test2.pl test2.pl.html \ test.tcl test.tcl.html \ test.sql test.sql.html \ test.bib test.bib.html \ test.makefile test.makefile.html \ test.css test.css.html \ test.ps test.ps.html \ $(WRONGFILES) \ $(WRONGFILESOUT) \ $(WRONGSTYLES) $(WRONGSTYLESOUT) \ $(WRONGCMDLINEPARAMS) \ valgrind_tests.sh.in valgrind_suppressions.sh.in \ valgrind_test.sh.in suppressions.supp \ erasedir.sed erasedir2.sed erasedir3.sed \ erasedir_inputlang.sed \ namedgroups.lang namedgroups_state.lang \ test.ngroups test.ngroups.html \ test_state.ngroups test_state.ngroups.html \ c_comment.show namedgroups_state.show \ cpp.langelems \ lang.list outlang.list \ test.h.docbook \ test.sl test.sl.html \ lang4defaults.lang test.defaults test.wdefault test.wodefault \ test.wdefault.html test.wodefault.html \ test.properties test.properties.html \ test.desktop test.desktop.html \ test.lsm test.lsm.html \ test.hx test.hx.html \ test.fortran test.fortran.html test.fixed-fortran.html \ test.spec test.spec.html \ test.ldap test.ldap.html \ test.m4 test.m4.html \ test.glsl test.glsl.html \ test.xorg test.xorg.html \ test.conf test.conf.html \ test.scala test.scala.html \ test.adb test.adb.html \ test.pc test.pc.html \ test_string_stop.java test_string_stop.java.html \ test_java_stop.java test_java_stop.java.html \ test_string_stop.lang \ test_vardecl.java test_vardecl.java.html \ test_vardecl.cc test_vardecl.cc.html \ test_newlines.lang test_nonewlines.lang \ test_linerange1.html test_linerange2.html \ test_linerange_sep.html \ test_regexrange1.html test_regexrange2.html \ test_regexrange3.html test_regexrange4.html \ test_nobgcolor.cpp test_nobgcolor.html \ test_tabs.java.html \ test.texinfo test.texinfo.html \ test.hs test.hs.html \ test.lhs test.lhs.html \ test.ecore test.ecore.html \ test.MF test.MF.html \ test.asm test.asm.html \ test.scpt test.scpt.html \ test.vbs test.vbs.html \ test.awk test.awk.html \ test.bat test.bat.html \ test.clipper test.clipper.html \ test.cobol test.cobol.html \ test.d test.d.html \ test.errors test.errors.html \ test.erl test.erl.html \ test.proto test.proto.html \ test.vala test.vala.html \ test.lisp test.lisp.html \ test.scm test.scm.html \ test.po test.po.html \ test.opa test.opa.html \ test.javalog test.javalog.html \ test.upc test.upc.html \ test.tml test.tml.html LINERANGE1EXE = $(JAVA2HTML) --line-range="12-18","29-34" --line-number LINERANGE2EXE = $(JAVA2HTML) --line-range="12-18","29-34" --line-number --range-context=3 LINERANGESEPEXE = $(JAVA2HTML) --line-range="12-18","29-34" --line-number --range-context=3 --range-separator="<...>" REGEXRANGE1EXE = $(JAVA2HTML) --regex-range="/// [[:alpha:]]+" --line-number REGEXRANGE2EXE = $(JAVA2HTML) --regex-range="/\\* main \\*/" --line-number REGEXRANGE3EXE = $(JAVA2HTML) --regex-range="/\\* main \\*/","/\\* mymethod \\*/" --line-number REGEXRANGE4EXE = $(JAVA2HTML) --regex-range="/\\* [[:alpha:]]+ \\*/" --line-number WRONGLINERANGEEXE = $(PROGEXE) --line-range="a-b" --data-dir=$(top_srcdir)/src < $(srcdir)/test.java > /dev/null WRONGREGEXRANGEEXE = $(PROGEXE) --regex-range="ab","foobar","{wrong" --data-dir=$(top_srcdir)/src < $(srcdir)/test.java > /dev/null WRONGSYNTAXMODEEXE = $(PROGEXE) --data-dir=$(top_srcdir)/src -o /dev/null $(srcdir)/test.java PROG_NOLANGDEF = $(PROGEXE) --outlang-def=$(srcdir)/simple.outlang $(STD_STYLE) --data-dir=$(srcdir)/ $(STD_STYLE_DEFAULTS) PROG_NOOUTLANGDEF = $(PROGEXE) --lang-def=$(srcdir)/simple.lang $(STD_STYLE) $(STD_STYLE_DEFAULTS) --quiet CPP2HTML_WHEADERS = $(CPP2HTML) --header=$(srcdir)/header.html --footer=$(srcdir)/footer.html CTAGS_COMMAND = --ctags="$(CTAGS) --excmd=number --tag-relative=yes -o test_ref.tags" --ctags-file="test_ref.tags" # for more than one file: test.h test.cpp CTAGS_COMMAND_MULTI = --ctags="$(CTAGS) --excmd=number --tag-relative=yes -o test_ref_multi.tags" --ctags-file="test_ref_multi.tags" CTAGS_COMMAND_TEST = --ctags="$(CTAGS) --excmd=number --tag-relative=yes -o my_test_ref_tmp.tags" --ctags-file="my_test_ref_tmp" CPP2HTML_WREFS = $(CPP2HTML) --title="Contains references to tags" --gen-references=inline CPP2LATEX_WREFS = $(CPP2TEX) --title="Contains references to tags" --gen-references=postline --line-number CPP2LATEX_WREFSPOST = $(CPP2TEX) --title="Contains references to tags" --gen-references=postdoc --line-number CPP2DOCBOOK_WREFS = $(PROGNAME_DOCBOOK) --gen-references=postline --line-number CPP2XHTML_WREFS = $(PROGNAME) -s cpp -f xhtml --css ../src/default.css --gen-references=inline --line-number-ref --title="XHTML with refs" CTAGS_CMD = $(CTAGS) --excmd=number --tag-relative=yes TEMP_TAGFILE = temp_test_refs.tags OUTPUTDIR = $(top_builddir)/tests/output_dir OUTPUTTODIR = --output-dir=$(OUTPUTDIR) source_highlightdoc_DATA = test.php3.html test.pl.html test.pm.html \ test.py.html test.rb.html test.js.html test.lua.html test.ml.html \ test.sml.html test.log.html access.log.html auth.log.html error.log.html syslog.log.html test.htm.html test.java.tex.html \ syslog.style.html \ log.lang.html c.lang.html default.style.html \ test_linerange_sep.html \ test.java.html \ test_regexrange4.html \ test_refs.h.html test_refs.cpp.html VALGRINDTESTS = $(top_builddir)/tests/valgrind_tests.sh VALGRINDTEST = $(top_builddir)/tests/valgrind_test.sh CLEANFILES = *.out.html *.out.txt *.out.tex *.err_out *.unknown_out *.out.debug *.out.texinfo *_tmp.* *.out.show myscript* myimplicitxml* myimplicitphp* *.css.java.html *.nf_css.java.html *.css_xhtml.java.html *.css_doc.java.html *.out.docbook *.out.xhtml *.out.langelems *.out.list test_newlines.out test_nonewlines.out temp.output *.out.fodt *.out.doc.fodt *.out.mediawiki DISTCLEANFILES = my_test_ref_tmp.tags $(TEMP_TAGFILE) all: all-recursive .SUFFIXES: .SUFFIXES: .lang .err_out .outlang .style .css .css.java.html .nf_css.java.html .css_doc.java.html .css_xhtml.java.html .java $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): valgrind_tests.sh: $(top_builddir)/config.status $(srcdir)/valgrind_tests.sh.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ valgrind_suppressions.sh: $(top_builddir)/config.status $(srcdir)/valgrind_suppressions.sh.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ valgrind_test.sh: $(top_builddir)/config.status $(srcdir)/valgrind_test.sh.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-source_highlightdocDATA: $(source_highlightdoc_DATA) @$(NORMAL_INSTALL) test -z "$(source_highlightdocdir)" || $(MKDIR_P) "$(DESTDIR)$(source_highlightdocdir)" @list='$(source_highlightdoc_DATA)'; test -n "$(source_highlightdocdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(source_highlightdocdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(source_highlightdocdir)" || exit $$?; \ done uninstall-source_highlightdocDATA: @$(NORMAL_UNINSTALL) @list='$(source_highlightdoc_DATA)'; test -n "$(source_highlightdocdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(source_highlightdocdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(source_highlightdocdir)" && rm -f $$files # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(DATA) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(source_highlightdocdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-source_highlightdocDATA install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-source_highlightdocDATA .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ ctags ctags-recursive distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-source_highlightdocDATA \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags tags-recursive uninstall uninstall-am \ uninstall-source_highlightdocDATA # these are files processed using a css as the style file .java.css.java.html: $(PROGNAME_CSSSTYLE) -i $< -o $@ # these are files processed using a css as the style file .java.css_doc.java.html: $(PROGNAME_CSSSTYLE) -i $< -o $@ --title="This is the title" # these are files processed using a css as the style file and a non fixed html .java.nf_css.java.html: $(PROGNAME_CSSSTYLE) -i $< -o $@ --outlang-def=$(srcdir)/../src/html_notfixed.outlang # these are files processed using a css as the style file .java.css_xhtml.java.html: $(PROGNAME_CSSSTYLE) -i $< -o $@ -f xhtml @MAINTAINER_MODE_TRUE@check: check-produced-output \ @MAINTAINER_MODE_TRUE@check_wrong check_missing \ @MAINTAINER_MODE_TRUE@check_wrong_lineranges \ @MAINTAINER_MODE_TRUE@check_wrong_regexranges \ @MAINTAINER_MODE_TRUE@check_wrong_syntaxmode @MAINTAINER_MODE_FALSE@check: check-produced-output check-produced-output: \ check_java2html check_javascript \ check_java2xhtml check_cpp2html check_csharp2html \ check_prolog2html check_logtalk2html \ check_perl2html \ check_php32html check_python2html check_changelog check_flex check_bison \ check_ruby check_lua check_ml check_sml check_log check_pascal check_html \ check_xml \ check_sh \ check_url \ check_latex \ check_diff \ check_simple \ check_isolate \ check_backref \ check_lang \ check_langelems \ check_list \ check_txt \ check_sql \ check_bib \ check_infer \ check_debug \ check_ref \ check_show \ check_makefile \ check_asm \ check_css \ check_ps \ check_docbook \ check_namedgroups \ check_slang \ check_defaults \ check_properties \ check_desktop \ check_lsm \ check_spec \ check_haxe \ check_fortran \ check_ldap \ check_m4 \ check_glsl \ check_xorg \ check_conf \ check_scala \ check_ada \ check_pkgconfig \ check_texinfo \ check_haskell \ check_manifest \ check_applescript \ check_vbscript \ check_awk \ check_bat \ check_clipper \ check_cobol \ check_d \ check_errors \ check_erlang \ check_proto \ check_vala \ check_lisp \ check_scheme \ check_po \ check_opa \ check_javalog \ check_upc \ check_tml \ check-output-dir \ check_stop \ check_vardecl \ check_newlines \ check_lineranges \ check_regexranges \ check_nobgcolor \ check_tabs \ check_failsafe remove_css_html_files: rm -f *.css.java.html *.nf_css.java.html remove_css_xhtml_files: rm -f *.css_xhtml.java.html remove_css_doc_files: rm -f *.css_doc.java.html check_java2html: remove_css_html_files remove_css_doc_files test.css.java.html test.nf_css.java.html test.css_doc.java.html $(JAVA2HTML) -i $(srcdir)/test.java -o test.java.out.html $(JAVA2HTMLDOC) -i $(srcdir)/test.java -o test.java.doc.out.html $(JAVA2HTMLNOTFIXED) < $(srcdir)/test.java > test_notfixed.out.html tr -d '\r' < test_notfixed.out.html > temp.output && cp -f temp.output test_notfixed.out.html $(JAVA2HTMLCSS) < $(srcdir)/test.java > test_css.out.html tr -d '\r' < test_css.out.html > temp.output && cp -f temp.output test_css.out.html $(JAVA2HTMLCSSNODOC) < $(srcdir)/test.java > test_css_nodoc.out.html tr -d '\r' < test_css_nodoc.out.html > temp.output && cp -f temp.output test_css_nodoc.out.html $(JAVA2HTML) -i $(srcdir)/test_comments.java -o test_comments.java.out.html $(JAVA2HTML) -n --line-number-ref -i $(srcdir)/test.java -o test_java_lines.out.html $(JAVA2HTML) -n -i $(srcdir)/test_no_line_at_the_end.java -o test_no_line_at_the_end.java.out.html $(JAVA2ESC) -n -i $(srcdir)/test.java -o test.java.out.txt $(JAVA2TEX) --line-number=" " -i $(srcdir)/test.java -o test.java.out.tex $(JAVA2TEXINFO) -n -i $(srcdir)/test.java -o test.java.out.texinfo $(JAVA2ODF) --line-number=" " -i $(srcdir)/test.java -o test.java.out.fodt $(JAVA2ODFDOC) --line-number=" " -i $(srcdir)/test.java -o test.java.out.doc.fodt $(JAVA2MEDIAWIKI) -i $(srcdir)/test.java -o test.java.out.mediawiki @echo expect no output from diff $(DIFF) $(srcdir)/test.java.html test.java.out.html $(DIFF) $(srcdir)/test.java.doc.html test.java.doc.out.html $(DIFF) $(srcdir)/test_notfixed.html test_notfixed.out.html $(DIFF) $(srcdir)/test_css.html test_css.out.html $(DIFF) $(srcdir)/test_css_nodoc.html test_css_nodoc.out.html $(DIFF) $(srcdir)/test_comments.java.html test_comments.java.out.html $(DIFF) $(srcdir)/test_java_lines.html test_java_lines.out.html $(DIFF) $(srcdir)/test_no_line_at_the_end.java.html test_no_line_at_the_end.java.out.html $(DIFF) $(srcdir)/test.java.txt test.java.out.txt $(DIFF) $(srcdir)/test.java.tex test.java.out.tex $(DIFF) $(srcdir)/test.java.texinfo test.java.out.texinfo $(DIFF) $(srcdir)/test.java.fodt test.java.out.fodt $(DIFF) $(srcdir)/test.java.doc.fodt test.java.out.doc.fodt $(DIFF) $(srcdir)/test.java.mediawiki test.java.out.mediawiki $(DIFF) $(srcdir)/test.java.html test.css.java.html $(DIFF) $(srcdir)/test_notfixed.html test.nf_css.java.html $(DIFF) $(srcdir)/test.java.doc.html test.css_doc.java.html check_javascript: $(JS2HTML) < $(srcdir)/test.js -o test.js.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.js.html test.js.out.html check_java2xhtml: remove_css_xhtml_files test.css_xhtml.java.html $(JAVA2XHTML) < $(srcdir)/test.java -o test_xhtml.out.html $(JAVA2XHTMLNOTFIXED) < $(srcdir)/test.java -o test_xhtml_notfixed.out.html $(JAVA2XHTMLDOC) < $(srcdir)/test.java -o test_xhtml_doc.out.html sed -itesttmp -f $(srcdir)/erasedir_inputlang.sed test_xhtml_doc.out.html $(JAVA2XHTMLCSS) < $(srcdir)/test.java -o test_xhtml_css.out.html $(JAVA2XHTMLCSSDOC) < $(srcdir)/test.java -o test_xhtml_css_doc.out.html sed -itesttmp -f $(srcdir)/erasedir_inputlang.sed test_xhtml_css_doc.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test_xhtml.html test_xhtml.out.html $(DIFF) $(srcdir)/test_xhtml_notfixed.html test_xhtml_notfixed.out.html $(DIFF) $(srcdir)/test_xhtml_doc.html test_xhtml_doc.out.html $(DIFF) $(srcdir)/test_xhtml_css.html test_xhtml_css.out.html $(DIFF) $(srcdir)/test_xhtml_css_doc.html test_xhtml_css_doc.out.html $(DIFF) $(srcdir)/test_xhtml.html test.css_xhtml.java.html check_cpp2html: $(CPP2HTML) -i $(srcdir)/test.h -o test.h.out.html $(CPP2HTML) -i $(srcdir)/test_comments.cc -o test_comments.cc.out.html $(CPP2HTML) -i $(srcdir)/test_template.cc -o test_template.cc.out.html $(CPP2HTML_WHEADERS) -i $(srcdir)/test.h -o test_header.out.html $(CPP2HTML) -n -i $(srcdir)/test.h -o test_cpp_lines.out.html $(CPP2HTML) -n -i $(srcdir)/test_no_line_at_the_end.c -o test_no_line_at_the_end.c.out.html $(CPP2HTML) -n -i $(srcdir)/test_line_at_the_end.c -o test_line_at_the_end.c.out.html $(C2HTML) -i $(srcdir)/test_c.c -o test_c.c.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.h.html test.h.out.html $(DIFF) $(srcdir)/test_comments.cc.html test_comments.cc.out.html $(DIFF) $(srcdir)/test_template.cc.html test_template.cc.out.html $(DIFF) $(srcdir)/test_header.html test_header.out.html $(DIFF) $(srcdir)/test_cpp_lines.html test_cpp_lines.out.html $(DIFF) $(srcdir)/test_no_line_at_the_end.c.html test_no_line_at_the_end.c.out.html $(DIFF) $(srcdir)/test_line_at_the_end.c.html test_line_at_the_end.c.out.html $(DIFF) $(srcdir)/test_c.c.html test_c.c.out.html check_csharp2html: $(CSHARP2HTML) -i $(srcdir)/test.cs -o test.cs.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.cs.html test.cs.out.html check_prolog2html: $(PROLOG2HTML) < $(srcdir)/test.pl -o test.pl.out.html $(PROLOG2HTML) -n -i $(srcdir)/test.pl -o test_pl_lines.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.pl.html test.pl.out.html $(DIFF) $(srcdir)/test_pl_lines.html test_pl_lines.out.html check_logtalk2html: $(LOGTALK2HTML) < $(srcdir)/test.lgt -o test.lgt.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.lgt.html test.lgt.out.html check_perl2html: $(PERL2HTML) < $(srcdir)/test.pm -o test.pm.out.html $(PERL2HTML) < $(srcdir)/test_comments.pm -o test_comments.pm.out.html $(PERL2HTML) -n -i $(srcdir)/test.pm -o test_perl_lines.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.pm.html test.pm.out.html $(DIFF) $(srcdir)/test_comments.pm.html test_comments.pm.out.html $(DIFF) $(srcdir)/test_perl_lines.html test_perl_lines.out.html check_php32html: $(PHP2HTML) < $(srcdir)/test.php3 -o test.php3.out.html $(PHP2HTML) < $(srcdir)/test_with_html.php -o test_with_html.php.out.html $(PHP2HTML) -n -i $(srcdir)/test.php3 -o test_php3_lines.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.php3.html test.php3.out.html $(DIFF) $(srcdir)/test_with_html.php.html test_with_html.php.out.html $(DIFF) $(srcdir)/test_php3_lines.html test_php3_lines.out.html check_python2html: $(PYTHON2HTML) < $(srcdir)/test.py -o test.py.out.html $(PYTHON2HTML) < $(srcdir)/test_comments.py -o test_comments.py.out.html $(PYTHON2HTML) -n -i $(srcdir)/test.py -o test_python_lines.out.html $(PYTHON2HTML) -n -i $(srcdir)/test_comments.py -o test_py_comments_lines.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.py.html test.py.out.html $(DIFF) $(srcdir)/test_comments.py.html test_comments.py.out.html $(DIFF) $(srcdir)/test_python_lines.html test_python_lines.out.html $(DIFF) $(srcdir)/test_py_comments_lines.html test_py_comments_lines.out.html check_changelog: $(CHANGELOG2HTML) < $(srcdir)/test.chlog -o test.chlog.out.html $(CHANGELOG2HTMLCSS) -i $(srcdir)/test.chlog -o test.chlog_css.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.chlog.html test.chlog.out.html $(DIFF) $(srcdir)/test.chlog_css.html test.chlog_css.out.html check_flex: $(FLEX2HTML) < $(srcdir)/test.l -o test.l.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.l.html test.l.out.html check_bison: $(BISON2HTML) < $(srcdir)/test.y -o test.y.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.y.html test.y.out.html check_ruby: $(RUBY2HTML) < $(srcdir)/test.rb -o test.rb.out.html $(RUBY2HTML) < $(srcdir)/test_comments.rb -o test_comments.rb.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.rb.html test.rb.out.html $(DIFF) $(srcdir)/test_comments.rb.html test_comments.rb.out.html check_lua: $(LUA2HTML) < $(srcdir)/test.lua -o test.lua.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.lua.html test.lua.out.html check_ml: $(CAML2HTML) < $(srcdir)/test.ml -o test.ml.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.ml.html test.ml.out.html check_sml: $(SML2HTML) < $(srcdir)/test.sml -o test.sml.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.sml.html test.sml.out.html check_log: $(LOG2HTML) < $(srcdir)/test.log -o test.log.out.html $(LOG2HTML) < $(srcdir)/access.log -o access.log.out.html $(LOG2HTML) < $(srcdir)/auth.log -o auth.log.out.html $(LOG2HTML) < $(srcdir)/error.log -o error.log.out.html $(LOG2HTML) < $(srcdir)/syslog.log -o syslog.log.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.log.html test.log.out.html $(DIFF) $(srcdir)/access.log.html access.log.out.html $(DIFF) $(srcdir)/auth.log.html auth.log.out.html $(DIFF) $(srcdir)/error.log.html error.log.out.html $(DIFF) $(srcdir)/syslog.log.html syslog.log.out.html check_diff: $(DIFF2HTML) < $(srcdir)/test.diff -o test.diff.out.html $(DIFF2HTML) < $(srcdir)/test2.diff -o test2.diff.out.html $(DIFF2HTML) < $(srcdir)/test3.diff -o test3.diff.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.diff.html test.diff.out.html $(DIFF) $(srcdir)/test2.diff.html test2.diff.out.html $(DIFF) $(srcdir)/test3.diff.html test3.diff.out.html check_pascal: $(PROGNAME) -i $(srcdir)/test.pas -o test.pas.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.pas.html test.pas.out.html check_html: $(PROGNAME) -i $(srcdir)/test.htm --title="html output formatted in html" -o test.htm.out.html $(PROGNAME) -i $(srcdir)/test2.htm --title="html output formatted in html" -o test2.htm.out.html $(PROGNAME) -i $(srcdir)/test_html5.htm --title="html output formatted in html" -o test_html5.htm.out.html $(PROGNAME) -i $(srcdir)/test_with_embed.htm --title="html output formatted in html" -o test_with_embed.htm.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.htm.html test.htm.out.html $(DIFF) $(srcdir)/test2.htm.html test2.htm.out.html $(DIFF) $(srcdir)/test_html5.htm.html test_html5.htm.out.html $(DIFF) $(srcdir)/test_with_embed.htm.html test_with_embed.htm.out.html check_xml: $(PROGNAME) -i $(srcdir)/test.xml --title="xml formatted in html" -o test.xml.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.xml.html test.xml.out.html check_sh: $(PROGNAME) -i $(srcdir)/test.sh -o test.sh.out.html $(PROGNAME) -i $(srcdir)/test2.sh -o test2.sh.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.sh.html test.sh.out.html $(DIFF) $(srcdir)/test2.sh.html test2.sh.out.html check_slang: $(PROGNAME) -i $(srcdir)/test.sl -o test.sl.out.html --title="S-LANG test" @echo expect no output from diff $(DIFF) $(srcdir)/test.sl.html test.sl.out.html check_url: $(URL2HTML) -i $(srcdir)/test.url -o test.url.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.url.html test.url.out.html check_properties: $(PROPERTIES2HTML) -i $(srcdir)/test.properties -o test.properties.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.properties.html test.properties.out.html check_desktop: $(DESKTOP2HTML) -i $(srcdir)/test.desktop -o test.desktop.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.desktop.html test.desktop.out.html check_lsm: $(LSM2HTML) -i $(srcdir)/test.lsm -o test.lsm.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.lsm.html test.lsm.out.html check_haxe: $(HAXE2HTML) -i $(srcdir)/test.hx -o test.hx.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.hx.html test.hx.out.html check_ldap: $(PROGNAME_STD) -i $(srcdir)/test.ldap -o test.ldap.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.ldap.html test.ldap.out.html check_m4: $(PROGNAME_STD) -i $(srcdir)/test.m4 -o test.m4.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.m4.html test.m4.out.html check_glsl: $(PROGNAME_STD) -i $(srcdir)/test.glsl -o test.glsl.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.glsl.html test.glsl.out.html check_xorg: $(PROGNAME_STD) -i $(srcdir)/test.xorg -s xorg -o test.xorg.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.xorg.html test.xorg.out.html check_conf: $(PROGNAME_STD) -i $(srcdir)/test.conf -s conf -o test.conf.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.conf.html test.conf.out.html check_scala: $(PROGNAME_STD) -i $(srcdir)/test.scala -s scala -o test.scala.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.scala.html test.scala.out.html check_ada: $(PROGNAME_STD) -i $(srcdir)/test.adb -s ada -o test.adb.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.adb.html test.adb.out.html check_pkgconfig: $(PROGNAME_STD) -i $(srcdir)/test.pc -s pc -o test.pc.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.pc.html test.pc.out.html check_texinfo: $(PROGNAME_STD) -i $(srcdir)/test.texinfo -o test.texinfo.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.texinfo.html test.texinfo.out.html check_haskell: $(PROGNAME_STD) -i $(srcdir)/test.hs -o test.hs.out.html $(PROGNAME) $(STD_STYLE) -f xhtml -i $(srcdir)/test.lhs -o test.lhs.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.hs.html test.hs.out.html $(DIFF) $(srcdir)/test.lhs.html test.lhs.out.html check_manifest: $(PROGNAME_STD) -i $(srcdir)/test.MF -o test.MF.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.MF.html test.MF.out.html check_asm: $(PROGNAME_STD) -i $(srcdir)/test.asm -o test.asm.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.asm.html test.asm.out.html check_applescript: $(PROGNAME_STD) -i $(srcdir)/test.scpt -o test.scpt.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.scpt.html test.scpt.out.html check_vbscript: $(PROGNAME_STD) -i $(srcdir)/test.vbs -o test.vbs.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.vbs.html test.vbs.out.html check_awk: $(PROGNAME_STD) -i $(srcdir)/test.awk -o test.awk.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.awk.html test.awk.out.html check_bat: $(PROGNAME_STD) -i $(srcdir)/test.bat -o test.bat.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.bat.html test.bat.out.html check_clipper: $(PROGNAME_STD) -i $(srcdir)/test.clipper -o test.clipper.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.clipper.html test.clipper.out.html check_cobol: $(PROGNAME_STD) -i $(srcdir)/test.cobol -o test.cobol.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.cobol.html test.cobol.out.html check_d: $(PROGNAME_STD) -i $(srcdir)/test.d -o test.d.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.d.html test.d.out.html check_errors: $(PROGNAME_STD) -i $(srcdir)/test.errors -o test.errors.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.errors.html test.errors.out.html check_erlang: $(PROGNAME_STD) -i $(srcdir)/test.erl -o test.erl.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.erl.html test.erl.out.html check_fortran: $(FORTRAN2HTML) -i $(srcdir)/test.fortran -o test.fortran.out.html $(FORTRAN2HTML) -i $(srcdir)/test.fortran -s fixed-fortran -o test.fixed-fortran.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.fortran.html test.fortran.out.html $(DIFF) $(srcdir)/test.fixed-fortran.html test.fixed-fortran.out.html check_proto: $(PROGNAME_STD) -i $(srcdir)/test.proto -o test.proto.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.proto.html test.proto.out.html check_vala: $(PROGNAME_STD) -i $(srcdir)/test.vala -o test.vala.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.vala.html test.vala.out.html check_lisp: $(PROGNAME_STD) -i $(srcdir)/test.lisp -o test.lisp.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.lisp.html test.lisp.out.html check_scheme: $(PROGNAME_STD) -i $(srcdir)/test.scm -o test.scm.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.scm.html test.scm.out.html check_po: $(PROGNAME_STD) -i $(srcdir)/test.po -o test.po.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.po.html test.po.out.html check_opa: $(PROGNAME_STD) -i $(srcdir)/test.opa -o test.opa.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.opa.html test.opa.out.html check_javalog: $(PROGNAME) --style-file $(top_srcdir)/src/javalog.style -i $(srcdir)/test.javalog -o test.javalog.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.javalog.html test.javalog.out.html check_upc: $(PROGNAME_STD) -i $(srcdir)/test.upc -o test.upc.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.upc.html test.upc.out.html check_tml: $(PROGNAME_STD) -i $(srcdir)/test.tml -o test.tml.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.tml.html test.tml.out.html check_spec: $(SPEC2HTML) -i $(srcdir)/test.spec -o test.spec.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.spec.html test.spec.out.html check_txt: $(TXT2HTML) -i $(srcdir)/test.txt -o test.txt.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.txt.html test.txt.out.html myscript: test.sh cp $(srcdir)/test.sh $@ myimplicitxml.foo: test.xml cp $(srcdir)/test.xml $@ myimplicitphp.foo: test.php3 cp $(srcdir)/test.php3 $@ check_infer: myscript myimplicitxml.foo myimplicitphp.foo rm -f myscript.html rm -f myimplicitxml.foo.html $(INFER) -i $(srcdir)/test2.pl -o test2.pl.out.html $(INFER) -i $(srcdir)/test.tcl -o test.tcl.out.html $(INFERIMPLICIT) -i myscript -o myscript.html $(INFERIMPLICIT) -i $(srcdir)/test.ecore -o test.ecore.out.html $(INFERIMPLICIT) --title="xml formatted in html" -i myimplicitxml.foo -o myimplicitxml.foo.html $(INFERIMPLICIT) -i myimplicitphp.foo -o myimplicitphp.foo.html @echo expect no output from diff $(DIFF) $(srcdir)/test2.pl.html test2.pl.out.html $(DIFF) $(srcdir)/test.tcl.html test.tcl.out.html $(DIFF) $(srcdir)/test.sh.html myscript.html $(DIFF) $(srcdir)/test.ecore.html test.ecore.out.html $(DIFF) $(srcdir)/test.xml.html myimplicitxml.foo.html $(DIFF) $(srcdir)/test.php3.html myimplicitphp.foo.html check_latex: $(PROGNAME) -i $(srcdir)/test.tex -o test.tex.out.html $(PROGNAME) -i $(srcdir)/test.java.tex -o test.java.tex.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.tex.html test.tex.out.html $(DIFF) $(srcdir)/test.java.tex.html test.java.tex.out.html check_docbook: $(PROGNAME_DOCBOOK) -i $(srcdir)/test.h --line-number -o test.h.out.docbook @echo expect no output from diff $(DIFF) $(srcdir)/test.h.docbook test.h.out.docbook check_sql: $(PROGNAME) -i $(srcdir)/test.sql -o test.sql.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.sql.html test.sql.out.html check_bib: $(PROGNAME) -i $(srcdir)/test.bib -o test.bib.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.bib.html test.bib.out.html check_makefile: $(PROGNAME) -i $(srcdir)/test.makefile -o test.makefile.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.makefile.html test.makefile.out.html check_css: $(PROGNAME) -i $(srcdir)/test.css -o test.css.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.css.html test.css.out.html check_ps: $(PROGNAME) -i $(srcdir)/test.ps -o test.ps.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.ps.html test.ps.out.html check_lang: $(LANG2HTML) -i $(top_srcdir)/src/log.lang -o log.lang.out.html $(LANG2HTML) -i $(top_srcdir)/src/c.lang -o c.lang.out.html $(STYLE2HTML) -i $(top_srcdir)/src/default.style -o default.style.out.html $(STYLE2HTML) -i $(srcdir)/syslog.style -o syslog.style.out.html @echo expect no output from diff $(DIFF) $(srcdir)/log.lang.html log.lang.out.html $(DIFF) $(srcdir)/c.lang.html c.lang.out.html $(DIFF) $(srcdir)/default.style.html default.style.out.html $(DIFF) $(srcdir)/syslog.style.html syslog.style.out.html check_simple: $(SIMPLE) -i $(srcdir)/test.simple -o test.simple.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.simple.html test.simple.out.html check_isolate: $(TESTISOLATE) -i $(srcdir)/test.isolate -o test.isolate.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.isolate.html test.isolate.out.html check_backref: $(TESTBACKREF) -i $(srcdir)/test.backref -o test.backref.out.html $(TESTBACKREF) -i $(srcdir)/test2.backref -o test2.backref.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.backref.html test.backref.out.html $(DIFF) $(srcdir)/test2.backref.html test2.backref.out.html check_namedgroups: $(NAMEDGROUPS) -i $(srcdir)/test.ngroups -o test.ngroups.out.html $(NAMEDGROUPS_STATE) -i $(srcdir)/test_state.ngroups -o test_state.ngroups.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.ngroups.html test.ngroups.out.html $(DIFF) $(srcdir)/test_state.ngroups.html test_state.ngroups.out.html .lang.err_out: $(CHECKLANG) ./$< 2> $@ || true; sed -itesttmp -f $(srcdir)/erasedir.sed $@ && rm -f *testtmp .outlang.err_out: $(CHECKOUTLANG) ./$< 2> $@ || true; sed -itesttmp -f $(srcdir)/erasedir.sed $@ && rm -f *testtmp .style.err_out: $(PROGEXE) --lang-def=$(srcdir)/simple.lang --style-file=./$< --data-dir=$(top_srcdir)/src < $(srcdir)/test.java > /dev/null 2> $@ || true; sed -itesttmp -f $(srcdir)/erasedir.sed $@ && rm -f *testtmp .css.err_out: $(PROGEXE) --lang-def=$(srcdir)/simple.lang --style-css=./$< --data-dir=$(top_srcdir)/src < $(srcdir)/test.java > /dev/null 2> $@ || true; sed -itesttmp -f $(srcdir)/erasedir.sed $@ && rm -f *testtmp check_wrong: rm -f *.err_out $(MAKE) wrong_exp.err_out $(MAKE) wrong_syntax.err_out $(MAKE) wrong_syntax_include.err_out $(MAKE) wrong_var.err_out $(MAKE) wrong_trans.err_out $(MAKE) wrong_dircolor.err_out $(MAKE) wrong_already_defined.err_out $(MAKE) wrong_already_defined_css.err_out $(MAKE) wrong_namedgroups.err_out $(MAKE) wrong_namedgroups_subexps.err_out $(MAKE) wrong_namedgroups_subexps2.err_out $(MAKE) wrong_backref.err_out $(MAKE) wrong_backref2.err_out $(MAKE) wrong_dyn_backref.err_out $(MAKE) wrong_dyn_backref2.err_out $(MAKE) wrong_include.err_out $(MAKE) wrong_outlang_include.err_out @echo expect no output from diff $(DIFF) $(srcdir)/wrong_exp.err wrong_exp.err_out $(DIFF) $(srcdir)/wrong_syntax.err wrong_syntax.err_out $(DIFF) $(srcdir)/wrong_syntax_include.err wrong_syntax_include.err_out $(DIFF) $(srcdir)/wrong_var.err wrong_var.err_out $(DIFF) $(srcdir)/wrong_trans.err wrong_trans.err_out $(DIFF) $(srcdir)/wrong_dircolor.err wrong_dircolor.err_out $(DIFF) $(srcdir)/wrong_already_defined.err wrong_already_defined.err_out $(DIFF) $(srcdir)/wrong_already_defined_css.err wrong_already_defined_css.err_out $(DIFF) $(srcdir)/wrong_namedgroups.err wrong_namedgroups.err_out $(DIFF) $(srcdir)/wrong_namedgroups_subexps.err wrong_namedgroups_subexps.err_out $(DIFF) $(srcdir)/wrong_namedgroups_subexps2.err wrong_namedgroups_subexps2.err_out $(DIFF) $(srcdir)/wrong_backref.err wrong_backref.err_out $(DIFF) $(srcdir)/wrong_backref2.err wrong_backref2.err_out $(DIFF) $(srcdir)/wrong_dyn_backref.err wrong_dyn_backref.err_out $(DIFF) $(srcdir)/wrong_dyn_backref2.err wrong_dyn_backref2.err_out $(DIFF) $(srcdir)/wrong_include.err wrong_include.err_out $(DIFF) $(srcdir)/wrong_outlang_include.err wrong_outlang_include.err_out check_wrong_lineranges: rm -f *.err_out $(WRONGLINERANGEEXE) 2> wrong_line_range.err_out || true @echo expect no output from diff $(DIFF) $(srcdir)/wrong_line_range.err wrong_line_range.err_out check_wrong_regexranges: rm -f *.err_out $(WRONGREGEXRANGEEXE) 2> wrong_regex_range.err_out || true @echo expect no output from diff $(DIFF) $(srcdir)/wrong_regex_range.err wrong_regex_range.err_out check_wrong_syntaxmode: rm -f *.err_out $(WRONGSYNTAXMODEEXE) 2> wrong_syntax_mode.err_out || true @echo expect no output from diff $(DIFF) $(srcdir)/wrong_syntax_mode.err wrong_syntax_mode.err_out check_lineranges: $(LINERANGE1EXE) < $(srcdir)/test.java -o test_linerange1.out.html $(LINERANGE2EXE) < $(srcdir)/test.java -o test_linerange2.out.html $(LINERANGESEPEXE) < $(srcdir)/test.java -o test_linerange_sep.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test_linerange1.html test_linerange1.out.html $(DIFF) $(srcdir)/test_linerange2.html test_linerange2.out.html $(DIFF) $(srcdir)/test_linerange_sep.html test_linerange_sep.out.html check_regexranges: $(REGEXRANGE1EXE) < $(srcdir)/test.java -o test_regexrange1.out.html $(REGEXRANGE2EXE) < $(srcdir)/test.java -o test_regexrange2.out.html $(REGEXRANGE3EXE) < $(srcdir)/test.java -o test_regexrange3.out.html $(REGEXRANGE4EXE) < $(srcdir)/test.java -o test_regexrange4.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test_regexrange1.html test_regexrange1.out.html $(DIFF) $(srcdir)/test_regexrange2.html test_regexrange2.out.html $(DIFF) $(srcdir)/test_regexrange3.html test_regexrange3.out.html $(DIFF) $(srcdir)/test_regexrange4.html test_regexrange4.out.html check_nobgcolor: $(PROGNAME) --style-file=texinfo.style --doc --title="source file" -i $(srcdir)/test_nobgcolor.cpp -o test_nobgcolor.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test_nobgcolor.html test_nobgcolor.out.html check_tabs: $(JAVA2HTML) --tab=4 -i $(srcdir)/test.java -o test_tabs.java.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test_tabs.java.html test_tabs.java.out.html #$(PROG_NOOUTLANGDEF) -i $(srcdir)/test.simple -o test.err_out --data-dir=/tmp 2-o missing_langmap2.err_out || true #sed -r -i -f $(srcdir)/erasedir2.sed missing_langmap2.err_out #diff $(srcdir)/missing_langmap2.err missing_langmap2.err_out check_missing: rm -f *.err_out $(PROG_NOLANGDEF) -i $(srcdir)/test.simple -o test.err_out 2> missing_langmap.err_out || true $(PROG_NOOUTLANGDEF) --outlang-def=$(srcdir)/simple.outlang $(srcdir)/test.simple 2> missing_extension.err_out || true @echo expect no output from diff sed -itesttmp -f $(srcdir)/erasedir2.sed missing_langmap.err_out sed -itesttmp -f $(srcdir)/erasedir2.sed missing_extension.err_out $(DIFF) $(srcdir)/missing_langmap.err missing_langmap.err_out $(DIFF) $(srcdir)/missing_extension.err missing_extension.err_out rm -f *testtmp check_failsafe: $(FAILSAFE) -i $(srcdir)/test.unknown -o test.unknown.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.unknown.html test.unknown.out.html check_debug: rm -f *.out.debug $(DEBUGLANG) -i $(srcdir)/debug.java -o debug.java.out.html > debug.out.debug tr -d '\r' < debug.out.debug > temp.output && cp -f temp.output debug.out.debug @echo expect no output from diff $(DIFF) $(srcdir)/debug.debug debug.out.debug $(DIFF) $(srcdir)/debug.java.html debug.java.out.html check_defaults: $(TESTWDEFAULTS) -i $(srcdir)/test.wdefault -o test.wdefault.out.html $(TESTWODEFAULTS) -i $(srcdir)/test.wodefault -o test.wodefault.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.wdefault.html test.wdefault.out.html $(DIFF) $(srcdir)/test.wodefault.html test.wodefault.out.html # disable reference tests @NO_CTAGS_TRUE@check_ref: @NO_CTAGS_TRUE@ @echo warning: tests with references are disabled @NO_CTAGS_TRUE@ @echo because we could not find a usable ctags program # sed -i -r 's/([.\/[:alnum:]]+)\/(test\.h\:[[:alnum:]\._]+)/\2/g' test_ref.out.html # eliminate leading paths @NO_CTAGS_FALSE@check_ref: @NO_CTAGS_FALSE@ $(CPP2HTML_WREFS) -i $(srcdir)/test.h -o test_ref.out.html $(CTAGS_COMMAND_TMP) @NO_CTAGS_FALSE@ sed -itesttmp -e 's/test\_ref\.out\.html/test\_ref\.html/g' test_ref.out.html @NO_CTAGS_FALSE@ sed -itesttmp -f $(srcdir)/erasedir3.sed test_ref.out.html # eliminate leading paths @NO_CTAGS_FALSE@ rm -f test_refs_tmp.* *testtmp @NO_CTAGS_FALSE@ cp -f $(srcdir)/test_refs.h test_refs_tmp.h @NO_CTAGS_FALSE@ cp -f $(srcdir)/test_refs.cpp test_refs_tmp.cpp @NO_CTAGS_FALSE@ $(CTAGS_CMD) -o $(TEMP_TAGFILE) test_refs_tmp.h test_refs_tmp.cpp @NO_CTAGS_FALSE@ $(CPP2HTML_WREFS) --ctags-file=$(TEMP_TAGFILE) --line-number test_refs_tmp.h test_refs_tmp.cpp --verbose @NO_CTAGS_FALSE@ sed -itesttmp -e 's/\_tmp\.h/\.h/g' test_refs_tmp.h.html test_refs_tmp.cpp.html @NO_CTAGS_FALSE@ sed -itesttmp -e 's/\_tmp\.cpp/\.cpp/g' test_refs_tmp.h.html test_refs_tmp.cpp.html @NO_CTAGS_FALSE@ $(CPP2LATEX_WREFS) -i $(srcdir)/test.h -o test_ref.out.tex $(CTAGS_COMMAND_TMP) @NO_CTAGS_FALSE@ sed -itesttmp -r 's/([.\/[:alnum:]]+)\/(test\.h\:[[:alnum:]\._]+)/\2/g' test_ref.out.tex # eliminate leading paths @NO_CTAGS_FALSE@ $(CPP2LATEX_WREFSPOST) -i $(srcdir)/test.h -o test_ref_post.out.tex $(CTAGS_COMMAND_TMP) @NO_CTAGS_FALSE@ sed -itesttmp -f $(srcdir)/erasedir3.sed test_ref_post.out.tex # eliminate leading paths @NO_CTAGS_FALSE@ $(CPP2TEXINFO_WREFS) -i $(srcdir)/test.h -o test_ref.out.texinfo $(CTAGS_COMMAND_TMP) @NO_CTAGS_FALSE@ sed -itesttmp -f $(srcdir)/erasedir3.sed test_ref.out.texinfo # eliminate leading paths @NO_CTAGS_FALSE@ $(CPP2DOCBOOK_WREFS) -i $(srcdir)/test.h -o test_ref.out.docbook $(CTAGS_COMMAND_TMP) @NO_CTAGS_FALSE@ $(CPP2XHTML_WREFS) -i $(srcdir)/test.h -o test_ref.out.xhtml $(CTAGS_COMMAND_TMP) @NO_CTAGS_FALSE@ sed -itesttmp -e 's/test\_ref\.out\.xhtml/test\_ref\.xhtml/g' test_ref.out.xhtml @NO_CTAGS_FALSE@ sed -itesttmp -f $(srcdir)/erasedir3.sed test_ref.out.xhtml # eliminate leading paths @NO_CTAGS_FALSE@ @echo expect no output from diff @NO_CTAGS_FALSE@ $(DIFF) $(srcdir)/test_ref.html test_ref.out.html @NO_CTAGS_FALSE@ $(DIFF) $(srcdir)/test_refs.h.html test_refs_tmp.h.html @NO_CTAGS_FALSE@ $(DIFF) $(srcdir)/test_refs.cpp.html test_refs_tmp.cpp.html @NO_CTAGS_FALSE@ $(DIFF) $(srcdir)/test_ref.tex test_ref.out.tex @NO_CTAGS_FALSE@ $(DIFF) $(srcdir)/test_ref.texinfo test_ref.out.texinfo @NO_CTAGS_FALSE@ $(DIFF) $(srcdir)/test_ref_post.tex test_ref_post.out.tex @NO_CTAGS_FALSE@ $(DIFF) $(srcdir)/test_ref.docbook test_ref.out.docbook @NO_CTAGS_FALSE@ $(DIFF) $(srcdir)/test_ref.xhtml test_ref.out.xhtml @NO_CTAGS_FALSE@ rm -f test_refs_tmp.* *testtmp $(TEMP_TAGFILE) check_show: $(PROGEXE) --show-regex=$(top_srcdir)/src/c_comment.lang > c_comment.out.show tr -d '\r' < c_comment.out.show > temp.output && cp -f temp.output c_comment.out.show $(PROGEXE) --show-regex=$(srcdir)/namedgroups_state.lang > namedgroups_state.out.show tr -d '\r' < namedgroups_state.out.show > temp.output && cp -f temp.output namedgroups_state.out.show @echo expect no output from diff $(DIFF) $(srcdir)/c_comment.show c_comment.out.show $(DIFF) $(srcdir)/namedgroups_state.show namedgroups_state.out.show check_langelems: $(PROGEXE) $(DATADIROPTION) --show-lang-elements=$(top_srcdir)/src/cpp.lang > cpp.out.langelems tr -d '\r' < cpp.out.langelems > temp.output && cp -f temp.output cpp.out.langelems @echo expect no output from diff $(DIFF) $(srcdir)/cpp.langelems cpp.out.langelems check_list: $(PROGEXE) $(DATADIROPTION) --lang-list > lang.out.list tr -d '\r' < lang.out.list > temp.output && cp -f temp.output lang.out.list $(PROGEXE) $(DATADIROPTION) --outlang-list > outlang.out.list tr -d '\r' < outlang.out.list > temp.output && cp -f temp.output outlang.out.list @echo expect no output from diff $(DIFF) $(srcdir)/lang.list lang.out.list $(DIFF) $(srcdir)/outlang.list outlang.out.list check_stop: $(PROGNAME) --lang-def=$(srcdir)/test_string_stop.lang -i $(srcdir)/test_string_stop.java -o test_string_stop.java.out.html $(JAVA2HTML) -i $(srcdir)/test_java_stop.java -o test_java_stop.java.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test_string_stop.java.html test_string_stop.java.out.html $(DIFF) $(srcdir)/test_java_stop.java.html test_java_stop.java.out.html check_vardecl: $(JAVA2HTML) -i $(srcdir)/test_vardecl.java -o test_vardecl.java.out.html $(CPP2HTML) -i $(srcdir)/test_vardecl.cc -o test_vardecl.cc.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test_vardecl.java.html test_vardecl.java.out.html $(DIFF) $(srcdir)/test_vardecl.cc.html test_vardecl.cc.out.html check_newlines: $(PROGEXE) --show-regex=$(srcdir)/test_newlines.lang > test_newlines.out $(PROGEXE) --show-regex=$(srcdir)/test_nonewlines.lang > test_nonewlines.out @echo expect no output from diff $(DIFF) test_newlines.out test_nonewlines.out clean_ref: rm -f $(OUTPUTWREFS) check-output-dir: rm -f $(OUTPUTDIR)/test.java.html $(OUTPUTDIR)/test.h.html $(PROGEXE) $(DATADIROPTION) $(OUTPUTTODIR) $(srcdir)/test.java $(srcdir)/test.h test -f $(OUTPUTDIR)/test.java.html test -f $(OUTPUTDIR)/test.h.html check-valgrind: $(VALGRINDTEST) $(PROGEXE) --help $(VALGRINDTEST) $(PROGEXE) --version $(VALGRINDTEST) $(JAVA2HTML) -i $(srcdir)/test.java -o test.java.out.html # lua uses @{1} so we want to test it $(VALGRINDTEST) $(LUA2HTML) -i $(srcdir)/test.lua -o test.lua.out.html $(VALGRINDTEST) $(PROGNAME_CSSSTYLE) -i $(srcdir)/test.java -o test.css.java.html $(VALGRINDTEST) $(CPP2HTML) --gen-references=inline -i $(srcdir)/test.h -o test_ref.out.html $(VALGRINDTEST) $(FAILSAFE) -i $(srcdir)/test.unknown -s cpp -o test.unknown_out $(VALGRINDTEST) $(NAMEDGROUPS) -i $(srcdir)/test.ngroups -o test.ngroups.out.html $(VALGRINDTEST) $(FAILSAFE) -i $(srcdir)/test.unknown -o test.unknown_out cp -f $(srcdir)/test_refs.h test_refs_tmp.h cp -f $(srcdir)/test_refs.cpp test_refs_tmp.cpp $(CTAGS_CMD) -o test_refs_tmp.tags test_refs_tmp.h test_refs_tmp.cpp $(VALGRINDTEST) $(CPP2HTML) --gen-references=inline --ctags-file=my_test_ref.tags --line-number test_refs_tmp.h test_refs_tmp.cpp rm -f test_refs_tmp.* clean_html: rm -f *.h.html *.java.html *.cc.html *.pas.html *.pl.html *.pm.html *.php3.html *.py.html *.chlog.html *.chlog_css.html *.l.html test_xhtml*.html test_notfixed.html test_css.html test_css_nodoc.html test_header.html *.rb.html *.js.html *.java.txt *.java.tex *.h.docbook *.java.texinfo *.lua.html *.ml.html *.sml.html test_*_lines.html *.log.html *.y.html *.simple.html *.ngroups.html *.tex.html *.lgt.html *.diff.html *.lang.html *.htm.html *.style.html *.cs.html *.xml.html *.sh.html *.url.html *.txt.html *.unknown.html *.tcl.html *.bib.html *.makefile.html *.css.html *.ps.html *.sl.html *.isolate.html *.backref.html *.c.html *.wdefault.html *.wodefault.html *.properties.html *.desktop.html *.lsm.html *.spec.html *.hx.html *.fortran.html *.fixed-fortran.html *.hx.html *.m4.html *.scala.html *.adb.html *.conf.html *.xorg.html #DISTCLEANFILES=test_ref.xhtml test_ref.tags test_ref.tags tags test_ref.tex test_ref_post.tex test_ref.texinfo syslog.style.html test_ref.docbook # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: source-highlight-3.1.6/tests/test2.pl0000644000175000017500000000606211672675567014501 00000000000000#! /usr/bin/env perl use strict; use warnings; "I'm happy because of $x!" qq~I'm happy because of $x!~ qq{I'm happy because of $x!} qq|I'm happy because of $x!| qq#I'm happy because of $x!# qq!I'm happy because of $x\!! 'The variable is called $var.' q~The variable is called $var.~ q|The variable is called $var.| q{The variable is called $var.} q[The variable is called $var.] q#The variable is called $var.# q!The variable is called $var.! my $port = $ARGV[0]; # prepare freqently used regexes my $trailing_comment = qr#;\s*\#.*#; my $leading_comment = qr|(?:^\|\n)\s*#.*|; my $leading_comment = qr<(?:^\|\n)\s*#.*>; my $leading_comment = qr[(?:^\|\n)\]\s*#.*]; my $connecting_backslash = qr@\s*\\\n\s*@; my $quick_check = qr{:$port}i; my $dependency = qr{depends_(?=[brl])(?:build|run|lib)(?:-(?:append|delete))? .* (?=[plb])(?:port|(?:path|lib|bin):[^:]+):(?i:${port}|$port)(\{\})(?:\s|$)}x; my $dependency = qr{ (?=[plb])(?:port|(?:path|lib|bin):[^:]+) # kind : # separator (?i:${port})(?:\s|$) # name }x; $/ = ".\n"; while (defined(my $portfile = <*/*/Portfile>)) { @ARGV = $portfile; while (<>) { # make a quick and dirty check if the port has a remote chance of # depending on $port if ($_ =~ m\$quick_check|foo(.*)\i) { s#$connecting_backslash|a\#b#\# #g; # merge backslash-connected lines s#$connecting_backslash|a\#b#\# #; # merge backslash-connected lines s#$connecting_backslash|a\###; # merge backslash-connected lines s/$leading_comment|a\/b/a\/b/g; # remove leading comments s{$trailing_comment|\}}{\}}g; # remove trailing comments s($trailing_comment|\))(\))g; # remove trailing comments s<$trailing_comment|\>><\>>g; # remove trailing comments s[$trailing_comment|\]][a\]b]g; # remove trailing comments s|$trailing_comment\||a\|b|g; # remove trailing comments s@$trailing_comment|(a\@b)@(bar\@)@g; # just for test s_$connectingbackslash|a\_b_\_ _g; # merge backslash-connected lines s\$trailing_comment|(a\\b)\(bar\\)\g; # just for test s-[a\-z]{3}-fu- ; # just for test s^\^foo^fu^ ; # just for test s$foo(\w{3})\$$fu\$1$ ; # just for test s!foo(\w{3})\!!fu\$1! ; # just for test s?foo(\w{3})\??fu\$1? ; # just for test s*foo(\w{3})\**fu\$1* ; # just for test # let's some more exotic syntaxes ;-) s?foo(\w{3})\?\$?!fu\!1! ; # just for test s$foo(\w{3})\$$^fu\^\$1^ ; # just for test s$foo(\w{3})\$$ ^fu\^\$1^ ; # just for test s$foo(\w{3})\$$ ^fu\^\$1^g ; # just for test s#foo(\w{3})\## ^fu\^\$1^g ; # just for test s$foo(\w{3})\$$ #fu\#\$1#g ; # just for test if ($_ =~ m{$dependency}) { $portfile =~ s{/Portfile$}{}; # remove trailing '/Portfile' print "$portfile\n"; } } } } source-highlight-3.1.6/tests/test.javalog.html0000644000175000017500000000220611672675566016365 00000000000000
08 Aug 2011 8:56:40 AM main main
INFO: Test 123. Identifiers like adsf_134 are also shown highlighted.
08 Aug 2011 8:56:40 AM main main
WARNING: A warning message. Numbers like 12341341234 should be in blue.
08 Aug 2011 8:56:40 AM main main
SEVERE: This is a sever message. As far as I remember the whole message is in red.
Exception in thread "main" java.lang.RuntimeException: Here is an exception with a stacktrace. This should be in red as well.
	at main.main(main.java:13)
source-highlight-3.1.6/tests/test.java.doc.html0000644000175000017500000001476311672675566016442 00000000000000 This is the title
/*
  This is a classical Hello program
  to test source-highlight with Java programs.
  
  to have an html translation type

	source-highlight -s java -f html --input Hello.java --output Hello.html
	source-highlight -s java -f html < Hello.java > Hello.html

  or type source-highlight --help for the list of options

  written by
  Lorenzo Bettini
  http://www.lorenzobettini.it
  http://www.gnu.org/software/src-highlite
*/

package hello;

import java.io.* ;

/**
 * <p>
 * A simple Hello World class, used to demonstrate some
 * features of Java source highlighting.
 * </p>
 * TODO: nothing, just to show an highlighted TODO or FIXME
 *
 * @author Lorenzo Bettini
 * @version 2.0
 */ /// class
public class Hello {
    int foo = 1998 ;
    int hex_foo = 0xCAFEBABE;
    boolean b = false;
    Integer i = null ;
    char c = '\'', d = 'n', e = '\\' ;
    String xml = "<tag attr=\"value\">&auml;</tag>", foo2 = "\\" ;

    /* mymethod */
    public void mymethod(int i) {
	// just a foo method
    }
    /* mymethod */
   
    /* main */
    public static void main( String args[] ) {
	// just some greetings ;-)  /*
	System.out.println( "Hello from java2html :-)" ) ;
	System.out.println( "\tby Lorenzo Bettini" ) ;
	System.out.println( "\thttp://www.lorenzobettini.it" ) ;
        if (argc > 0)
            String param = argc[0];
        //System.out.println( "bye bye... :-D" ) ; // see you soon
    }
    /* main */
}
/// class

// end of file test.java
source-highlight-3.1.6/tests/test.lsm0000644000175000017500000000101311672675566014565 00000000000000Begin3 Title: sourcehighlightide -- Some description Version: 0.1 Entered-date: Description: Keywords: KDE Qt Author: Lorenzo Bettini Maintained-by: Lorenzo Bettini Home-page: Alternate-site: Primary-site: ftp://ftp.kde.org/pub/kde/unstable/apps/utils xxxxxx sourcehighlightide-0.1.tar.gz xxx sourcehighlightide-0.1.lsm Platform: Linux. Needs KDE Copying-policy: GPL End source-highlight-3.1.6/tests/access.log0000644000175000017500000005302111672675565015042 00000000000000127.0.0.1 - jan [30/Jun/2004:22:20:17 +0200] "GET /cgi-bin/trac.cgi/login HTTP/1.1" 302 4370 "http://saturn.solar_system/cgi-bin/trac.cgi" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040620 Galeon/1.3.15" 127.0.0.1 - - [01/Jun/2004:20:57:40 +0200] "GET / HTTP/1.1" 200 1456 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14" 127.0.0.1 - - [01/Jun/2004:20:57:40 +0200] "GET /apache_pb.gif HTTP/1.1" 200 2326 "http://localhost/" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14" 127.0.0.1 - - [01/Jun/2004:20:57:43 +0200] "GET /manual/ HTTP/1.1" 404 65 "http://localhost/" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14" 127.0.0.1 - - [01/Jun/2004:20:57:47 +0200] "GET / HTTP/1.1" 200 1456 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14" 127.0.0.1 - - [01/Jun/2004:21:02:11 +0200] "GET / HTTP/1.1" 200 1456 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14" 127.0.0.1 - - [01/Jun/2004:21:02:11 +0200] "GET /apache_pb.gif HTTP/1.1" 200 2326 "http://localhost/" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14" 127.0.0.1 - - [01/Jun/2004:21:02:13 +0200] "GET /manual/ HTTP/1.1" 404 79 "http://localhost/" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14" 127.0.0.1 - - [01/Jun/2004:21:02:14 +0200] "GET /manual/ HTTP/1.1" 404 79 "http://localhost/" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14" 127.0.0.1 - - [01/Jun/2004:21:02:17 +0200] "GET /manual/ HTTP/1.1" 404 79 "http://localhost/" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14" 127.0.0.1 - - [01/Jun/2004:21:03:19 +0200] "GET / HTTP/1.0" 200 1456 "-" "Links (2.1pre11; Linux 2.6.5-gentoo-r1 i686; 80x24)" 127.0.0.1 - - [01/Jun/2004:21:03:22 +0200] "GET /manual/ HTTP/1.0" 404 79 "-" "Links (2.1pre11; Linux 2.6.5-gentoo-r1 i686; 80x24)" 127.0.0.1 - - [01/Jun/2004:21:04:12 +0200] "GET /manual/ HTTP/1.1" 200 168 "http://localhost/" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14" 127.0.0.1 - - [01/Jun/2004:21:04:20 +0200] "GET / HTTP/1.1" 200 1456 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14" 127.0.0.1 - - [01/Jun/2004:21:04:24 +0200] "GET /manual/ HTTP/1.1" 200 168 "http://localhost/" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14" 127.0.0.1 - - [01/Jun/2004:21:04:27 +0200] "GET /manual/ HTTP/1.1" 200 168 "http://localhost/" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14" 127.0.0.1 - - [01/Jun/2004:21:32:32 +0200] "GET / HTTP/1.1" 200 1456 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14" 127.0.0.1 - - [01/Jun/2004:21:32:36 +0200] "GET /manual/ HTTP/1.1" 200 2117 "http://localhost/" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14" 127.0.0.1 - - [01/Jun/2004:21:32:36 +0200] "GET /manual/style/css/manual.css HTTP/1.1" 200 18056 "http://localhost/manual/" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14" 127.0.0.1 - - [01/Jun/2004:21:32:36 +0200] "GET /manual/style/css/manual-print.css HTTP/1.1" 200 12948 "http://localhost/manual/" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14" 127.0.0.1 - - [01/Jun/2004:21:32:36 +0200] "GET /manual/style/css/manual-loose-100pc.css HTTP/1.1" 200 2882 "http://localhost/manual/" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14" 127.0.0.1 - - [01/Jun/2004:21:32:36 +0200] "GET /manual/images/feather.gif HTTP/1.1" 200 6471 "http://localhost/manual/" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14" 127.0.0.1 - - [01/Jun/2004:21:32:36 +0200] "GET /manual/images/left.gif HTTP/1.1" 200 60 "http://localhost/manual/" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14" 127.0.0.1 - - [01/Jun/2004:21:32:36 +0200] "GET /manual/images/favicon.ico HTTP/1.1" 200 1078 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14" 127.0.0.1 - - [01/Jun/2004:21:32:40 +0200] "GET /manual/vhosts/ HTTP/1.1" 200 2196 "http://localhost/manual/" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14" 127.0.0.1 - - [01/Jun/2004:21:32:40 +0200] "GET /manual/style/css/manual.css HTTP/1.1" 200 18056 "http://localhost/manual/vhosts/" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14" 127.0.0.1 - - [01/Jun/2004:21:32:40 +0200] "GET /manual/style/css/manual-loose-100pc.css HTTP/1.1" 200 2882 "http://localhost/manual/vhosts/" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14" 127.0.0.1 - - [01/Jun/2004:21:32:40 +0200] "GET /manual/style/css/manual-print.css HTTP/1.1" 200 12948 "http://localhost/manual/vhosts/" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14" 127.0.0.1 - - [01/Jun/2004:21:32:40 +0200] "GET /manual/images/favicon.ico HTTP/1.1" 200 1078 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14" 127.0.0.1 - - [01/Jun/2004:21:32:40 +0200] "GET /manual/images/up.gif HTTP/1.1" 200 57 "http://localhost/manual/vhosts/" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14" 127.0.0.1 - - [01/Jun/2004:21:32:40 +0200] "GET /manual/images/down.gif HTTP/1.1" 200 56 "http://localhost/manual/vhosts/" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14" 127.0.0.1 - - [01/Jun/2004:21:32:42 +0200] "GET /manual/ HTTP/1.1" 200 2117 "http://localhost/" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14" 127.0.0.1 - - [01/Jun/2004:21:32:42 +0200] "GET /manual/style/css/manual.css HTTP/1.1" 200 18056 "http://localhost/manual/" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14" 127.0.0.1 - - [01/Jun/2004:21:32:42 +0200] "GET /manual/style/css/manual-print.css HTTP/1.1" 200 12948 "http://localhost/manual/" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14" 127.0.0.1 - - [01/Jun/2004:21:32:42 +0200] "GET /manual/style/css/manual-loose-100pc.css HTTP/1.1" 200 2882 "http://localhost/manual/" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14" 127.0.0.1 - - [01/Jun/2004:21:32:42 +0200] "GET /manual/images/favicon.ico HTTP/1.1" 200 1078 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14" 127.0.0.1 - - [01/Jun/2004:21:33:22 +0200] "GET /svnview HTTP/1.1" 500 656 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14" 127.0.0.1 - - [01/Jun/2004:21:34:35 +0200] "GET /svnview HTTP/1.1" 200 2307 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14" 127.0.0.1 - - [01/Jun/2004:21:34:36 +0200] "GET /default.css HTTP/1.1" 200 15683 "http://localhost/svnview" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14" 127.0.0.1 - - [01/Jun/2004:21:34:55 +0200] "GET /svnview?repos=devel&rev=latest&root=/SVNview HTTP/1.1" 200 6026 "http://localhost/svnview" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14" 127.0.0.1 - - [01/Jun/2004:21:34:55 +0200] "GET /default.css HTTP/1.1" 200 15683 "http://localhost/svnview?repos=devel&rev=latest&root=/SVNview" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14" 127.0.0.1 - - [01/Jun/2004:21:34:57 +0200] "GET /default.css HTTP/1.1" 200 15683 "http://localhost/svnview?repos=devel&rev=latest&root=SVNview/tmpl&list_revs=1" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14" 127.0.0.1 - - [01/Jun/2004:21:34:57 +0200] "GET /svnview?repos=devel&rev=latest&root=SVNview/tmpl&list_revs=1 HTTP/1.1" 200 10448 "http://localhost/svnview?repos=devel&rev=latest&root=/SVNview" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14" 127.0.0.1 - - [01/Jun/2004:21:35:00 +0200] "GET /default.css HTTP/1.1" 200 15683 "http://localhost/svnview?repos=devel&rev=85&root=SVNview/tmpl&show=1" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14" 127.0.0.1 - - [01/Jun/2004:21:35:00 +0200] "GET /svnview?repos=devel&rev=85&root=SVNview/tmpl&show=1 HTTP/1.1" 200 4433 "http://localhost/svnview?repos=devel&rev=latest&root=SVNview/tmpl&list_revs=1" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14" 127.0.0.1 - - [01/Jun/2004:21:35:02 +0200] "GET /default.css HTTP/1.1" 200 15683 "http://localhost/svnview?repos=devel&rev=85&root=SVNview/tmpl/header.tmpl" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14" 127.0.0.1 - - [01/Jun/2004:21:35:02 +0200] "GET /svnview?repos=devel&rev=85&root=SVNview/tmpl/header.tmpl HTTP/1.1" 200 7547 "http://localhost/svnview?repos=devel&rev=85&root=SVNview/tmpl&show=1" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14" 127.0.0.1 - - [01/Jun/2004:21:35:07 +0200] "GET /svnview?repos=devel&rev=85&root=SVNview/tmpl/header.tmpl&show=1 HTTP/1.1" 500 656 "http://localhost/svnview?repos=devel&rev=85&root=SVNview/tmpl/header.tmpl" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14" 127.0.0.1 - - [01/Jun/2004:21:35:11 +0200] "GET /svnview?repos=devel&rev=85&root=SVNview/tmpl/header.tmpl HTTP/1.1" 200 7547 "http://localhost/svnview?repos=devel&rev=85&root=SVNview/tmpl&show=1" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14" 127.0.0.1 - - [01/Jun/2004:21:35:11 +0200] "GET /default.css HTTP/1.1" 200 15683 "http://localhost/svnview?repos=devel&rev=85&root=SVNview/tmpl/header.tmpl" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14" 127.0.0.1 - - [01/Jun/2004:21:35:24 +0200] "GET /svnview?repos=devel&rev=84&root=SVNview/tmpl/header.tmpl&show=1&view=plain HTTP/1.1" 200 400 "http://localhost/svnview?repos=devel&rev=85&root=SVNview/tmpl/header.tmpl" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14" 127.0.0.1 - - [01/Jun/2004:21:35:29 +0200] "GET /svnview?repos=devel&rev=85&root=SVNview/tmpl/header.tmpl HTTP/1.1" 200 7547 "http://localhost/svnview?repos=devel&rev=85&root=SVNview/tmpl&show=1" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14" 127.0.0.1 - - [01/Jun/2004:21:35:29 +0200] "GET /default.css HTTP/1.1" 200 15683 "http://localhost/svnview?repos=devel&rev=85&root=SVNview/tmpl/header.tmpl" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14" 127.0.0.1 - - [01/Jun/2004:21:35:36 +0200] "GET /svnview?repos=devel&rev=85&root=SVNview/tmpl&show=1 HTTP/1.1" 200 4433 "http://localhost/svnview?repos=devel&rev=latest&root=SVNview/tmpl&list_revs=1" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14" 127.0.0.1 - - [01/Jun/2004:21:35:37 +0200] "GET /default.css HTTP/1.1" 200 15683 "http://localhost/svnview?repos=devel&rev=85&root=SVNview/tmpl&show=1" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14" 127.0.0.1 - - [01/Jun/2004:21:35:39 +0200] "GET /svnview?repos=devel&rev=33&root=SVNview/tmpl/contents.tmpl&show=1 HTTP/1.1" 500 656 "http://localhost/svnview?repos=devel&rev=85&root=SVNview/tmpl&show=1" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14" 127.0.0.1 - - [01/Jun/2004:21:35:41 +0200] "GET /svnview?repos=devel&rev=85&root=SVNview/tmpl&show=1 HTTP/1.1" 200 4433 "http://localhost/svnview?repos=devel&rev=latest&root=SVNview/tmpl&list_revs=1" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14" 127.0.0.1 - - [01/Jun/2004:21:35:42 +0200] "GET /default.css HTTP/1.1" 200 15683 "http://localhost/svnview?repos=devel&rev=85&root=SVNview/tmpl&show=1" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14" 127.0.0.1 - - [01/Jun/2004:21:35:45 +0200] "GET /default.css HTTP/1.1" 200 15683 "http://localhost/svnview?repos=devel&rev=85&root=SVNview/tmpl/contents.tmpl" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14" 127.0.0.1 - - [01/Jun/2004:21:35:44 +0200] "GET /svnview?repos=devel&rev=85&root=SVNview/tmpl/contents.tmpl HTTP/1.1" 200 3889 "http://localhost/svnview?repos=devel&rev=85&root=SVNview/tmpl&show=1" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Galeon/1.3.14" 1.1.1.1 - - [19/Jun/2004:19:18:08 +0200] "GET /~jan/WebSVN/filedetails.php?repname=Public&path=/payment_server/vgts_mod/vgts_vt_cc/stable/modules/mod_vt_cc.pl&rev=0&sc=1 HTTP/1.0" 200 386749 "http://localhost/~jan/WebSVN/listing.php?repname=Public&path=/payment_server/vgts_mod/vgts_vt_cc/stable/modules/&rev=0&sc=1" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040618 Firefox/0.9" 1.1.1.1 - - [19/Jun/2004:19:19:01 +0200] "POST /~jan/WebSVN/form.php?path=& HTTP/1.0" 302 169 "http://localhost/~jan/WebSVN/filedetails.php?repname=Public&path=/payment_server/vgts_mod/vgts_vt_cc/stable/modules/mod_vt_cc.pl&rev=0&sc=1" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040618 Firefox/0.9" 1.1.1.1 - - [19/Jun/2004:19:19:01 +0200] "GET /~jan/WebSVN/listing.php?repname=Private&path=/& HTTP/1.0" 200 6002 "http://localhost/~jan/WebSVN/filedetails.php?repname=Public&path=/payment_server/vgts_mod/vgts_vt_cc/stable/modules/mod_vt_cc.pl&rev=0&sc=1" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040618 Firefox/0.9" 1.1.1.1 - - [19/Jun/2004:19:19:05 +0200] "GET /~jan/WebSVN/listing.php?repname=Private&path=/Coding_Rules/&rev=0&sc=0 HTTP/1.0" 200 3938 "http://localhost/~jan/WebSVN/listing.php?repname=Private&path=/&" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040618 Firefox/0.9" 1.1.1.1 - - [19/Jun/2004:19:19:09 +0200] "GET /~jan/WebSVN/filedetails.php?repname=Private&path=/Coding_Rules/Perl+Coding+Rules.pod&rev=0&sc=0 HTTP/1.0" 200 9633 "http://localhost/~jan/WebSVN/listing.php?repname=Private&path=/Coding_Rules/&rev=0&sc=0" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040618 Firefox/0.9" 1.1.1.1 - - [19/Jun/2004:19:19:16 +0200] "GET /~jan/WebSVN/diff.php?repname=Private&path=/Coding_Rules/Perl+Coding+Rules.pod&rev=0&sc=0 HTTP/1.0" 200 32956 "http://localhost/~jan/WebSVN/filedetails.php?repname=Private&path=/Coding_Rules/Perl%20Coding%20Rules.pod&rev=0&sc=0" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040618 Firefox/0.9" 1.1.1.1 - - [19/Jun/2004:19:19:40 +0200] "GET /~jan/WebSVN/listing.php?repname=Private&path=/RFC/&rev=0&sc=0 HTTP/1.0" 200 5633 "http://localhost/~jan/WebSVN/listing.php?repname=Private&path=/&" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040618 Firefox/0.9" 1.1.1.1 - - [19/Jun/2004:19:19:45 +0200] "GET /~jan/WebSVN/log.php?repname=Private&path=/RFC/RFC_0004.pod&rev=0&sc=0&isdir=0 HTTP/1.0" 200 15189 "http://localhost/~jan/WebSVN/listing.php?repname=Private&path=/RFC/&rev=0&sc=0" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040618 Firefox/0.9" 1.1.1.1 - - [19/Jun/2004:19:19:54 +0200] "GET /~jan/WebSVN/filedetails.php?repname=Private&path=/RFC/RFC_0004.pod&rev=3269&sc=0 HTTP/1.0" 200 10750 "http://localhost/~jan/WebSVN/log.php?repname=Private&path=/RFC/RFC_0004.pod&rev=0&sc=0&isdir=0" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040618 Firefox/0.9" 1.1.1.1 - - [19/Jun/2004:19:19:56 +0200] "GET /~jan/WebSVN/diff.php?repname=Private&path=/RFC/RFC_0004.pod&rev=3269&sc=0 HTTP/1.0" 200 11281 "http://localhost/~jan/WebSVN/filedetails.php?repname=Private&path=/RFC/RFC_0004.pod&rev=3269&sc=0" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040618 Firefox/0.9" 1.1.1.1 - - [23/Jun/2004:19:43:42 +0200] "GET /manual HTTP/1.1" 301 284 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040620 Galeon/1.3.15" 1.1.1.1 - - [23/Jun/2004:19:43:42 +0200] "GET /manual/ HTTP/1.1" 200 2117 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040620 Galeon/1.3.15" 1.1.1.1 - - [23/Jun/2004:19:43:42 +0200] "GET /manual/style/css/manual.css HTTP/1.1" 200 18056 "http://localhost/manual/" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040620 Galeon/1.3.15" 1.1.1.1 - - [23/Jun/2004:19:43:42 +0200] "GET /manual/style/css/manual-loose-100pc.css HTTP/1.1" 200 2882 "http://localhost/manual/" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040620 Galeon/1.3.15" 1.1.1.1 - - [23/Jun/2004:19:43:43 +0200] "GET /manual/images/favicon.ico HTTP/1.1" 200 1078 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040620 Galeon/1.3.15" 1.1.1.1 - - [23/Jun/2004:19:43:43 +0200] "GET /manual/style/css/manual-print.css HTTP/1.1" 200 12948 "http://localhost/manual/" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040620 Galeon/1.3.15" 1.1.1.1 - - [23/Jun/2004:19:43:43 +0200] "GET /manual/images/left.gif HTTP/1.1" 200 60 "http://localhost/manual/" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040620 Galeon/1.3.15" 1.1.1.1 - - [23/Jun/2004:19:43:43 +0200] "GET /manual/images/feather.gif HTTP/1.1" 200 6471 "http://localhost/manual/" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040620 Galeon/1.3.15" 1.1.1.1 - - [23/Jun/2004:19:43:47 +0200] "GET /manual/logs.html HTTP/1.1" 200 9247 "http://localhost/manual/" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040620 Galeon/1.3.15" 1.1.1.1 - - [23/Jun/2004:19:43:47 +0200] "GET /manual/images/favicon.ico HTTP/1.1" 200 1078 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040620 Galeon/1.3.15" 1.1.1.1 - - [23/Jun/2004:19:43:47 +0200] "GET /manual/images/down.gif HTTP/1.1" 200 56 "http://localhost/manual/logs.html" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040620 Galeon/1.3.15" 1.1.1.1 - - [26/Jun/2004:21:09:22 +0200] "GET /svn/listing.php?repname=Devel&path=/rpg/tags/&rev=0&sc=1 HTTP/1.1" 200 3364 "http://localhost/svn/listing.php?repname=Devel&path=/rpg/&rev=0&sc=1" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040620 Galeon/1.3.15" 1.1.1.1 - - [26/Jun/2004:21:09:24 +0200] "GET /svn/listing.php?repname=Devel&path=/rpg/tags/M1/&rev=0&sc=1 HTTP/1.1" 200 12907 "http://localhost/svn/listing.php?repname=Devel&path=/rpg/tags/&rev=0&sc=1" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040620 Galeon/1.3.15" 1.1.1.1 - - [26/Jun/2004:21:09:25 +0200] "GET /svn/templates/BlueGrey/file.png HTTP/1.1" 200 954 "http://localhost/svn/listing.php?repname=Devel&path=/rpg/tags/M1/&rev=0&sc=1" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040620 Galeon/1.3.15" 1.1.1.1 - - [26/Jun/2004:21:09:32 +0200] "GET /svn/listing.php?repname=Devel&path=/rpg/tags/&rev=0&sc=1 HTTP/1.1" 200 3364 "http://localhost/svn/listing.php?repname=Devel&path=/rpg/&rev=0&sc=1" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040620 Galeon/1.3.15" 1.1.1.1 - - [26/Jun/2004:21:09:37 +0200] "GET /svn/listing.php?repname=Devel&path=/rpg/devel/&rev=0&sc=1 HTTP/1.1" 200 14529 "http://localhost/svn/listing.php?repname=Devel&path=/rpg/&rev=0&sc=1" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040620 Galeon/1.3.15" 1.1.1.1 - - [26/Jun/2004:21:09:46 +0200] "GET /svn/filedetails.php?repname=Devel&path=/rpg/devel/game.pl&rev=0&sc=1 HTTP/1.1" 200 3487 "http://localhost/svn/listing.php?repname=Devel&path=/rpg/devel/&rev=0&sc=1" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040620 Galeon/1.3.15" 1.1.1.1 - - [30/Jun/2004:22:15:50 +0200] "GET /cgi-bin/trac.cgi HTTP/1.1" 500 971 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040620 Galeon/1.3.15" 1.1.1.1 - - [30/Jun/2004:22:16:44 +0200] "GET /trac/css/trac.css HTTP/1.1" 404 347 "http://localhost/cgi-bin/trac.cgi" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040620 Galeon/1.3.15" 1.1.1.1 - - [30/Jun/2004:22:16:44 +0200] "GET /trac/css/code.css HTTP/1.1" 404 347 "http://localhost/cgi-bin/trac.cgi" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040620 Galeon/1.3.15" ux i686; en-US; rv:1.7) Gecko/20040620 Galeon/1.3.15" 1.1.1.1 - - [01/Jul/2004:00:08:46 +0200] "GET /trac/css/changeset.css HTTP/1.1" 304 - "http://localhost/cgi-bin/trac.cgi" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040620 Galeon/1.3.15" 1.1.1.1 - - [01/Jul/2004:00:08:46 +0200] "GET /trac/trac.js HTTP/1.1" 304 - "http://localhost/cgi-bin/trac.cgi" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040620 Galeon/1.3.15" 1.1.1.1 - - [01/Jul/2004:00:08:46 +0200] "GET /trac/trac_banner.png HTTP/1.1" 304 - "http://localhost/cgi-bin/trac.cgi" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040620 Galeon/1.3.15" 1.1.1.1 - - [01/Jul/2004:00:08:46 +0200] "GET /trac/topbar_gradient.png HTTP/1.1" 304 - "http://localhost/cgi-bin/trac.cgi" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040620 Galeon/1.3.15" 1.1.1.1 - - [01/Jul/2004:00:08:46 +0200] "GET /trac/topbar_active.png HTTP/1.1" 304 - "http://localhost/cgi-bin/trac.cgi" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040620 Galeon/1.3.15" 1.1.1.1 - - [01/Jul/2004:00:08:46 +0200] "GET /trac/dots.gif HTTP/1.1" 304 - "http://localhost/cgi-bin/trac.cgi" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040620 Galeon/1.3.15" 1.1.1.1 - - [01/Jul/2004:00:08:46 +0200] "GET /trac/trac_logo_mini.png HTTP/1.1" 304 - "http://localhost/cgi-bin/trac.cgi" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040620 Galeon/1.3.15" 1.1.1.1 - - [01/Jul/2004:00:08:46 +0200] "GET /cgi-bin/trac.cgi HTTP/1.1" 200 7358 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040620 Galeon/1.3.15" 1.1.1.1 - - [01/Jul/2004:00:08:52 +0200] "GET /cgi-bin/trac.cgi/browser/ HTTP/1.1" 200 8571 "http://localhost/cgi-bin/trac.cgi" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040620 Galeon/1.3.15" 1.1.1.1 - - [01/Jul/2004:00:09:01 +0200] "GET /trac/css/search.css HTTP/1.1" 304 - "http://localhost/cgi-bin/trac.cgi/search?q=oops&wiki=on&changeset=on&ticket=on" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040620 Galeon/1.3.15" source-highlight-3.1.6/tests/wrong_dyn_backref2.err0000644000175000017500000000021211672675567017351 00000000000000wrong_dyn_backref2.lang:7: 1 subexpressions requested, but only 0 found wrong_dyn_backref2.lang:7: Caused by: Invalid regular expression. source-highlight-3.1.6/tests/test.xml.html0000644000175000017500000000716711672675567015556 00000000000000 xml formatted in html
<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
<?xml version="1.0" encoding="UTF-8"?>

<xs:schema targetNamespace="http://www.cedar.ac.uk/hepml/hepdata/0.1/"
           xmlns="http://www.cedar.ac.uk/hepml/hepdata/0.1/"
           xmlns:xs="http://www.w3.org/2001/XMLSchema"
           elementFormDefault="qualified"
           attributeFormDefault="unqualified">

  <xs:simpleType name="errSourceType">
    <xs:annotation>
      <xs:documentation>Possible error sources</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:enumeration value="stat"/>
      <xs:enumeration value="sys"/>

      <xs:enumeration value="total"/>
      <xs:enumeration value="unknown"/>
    </xs:restriction>
  </xs:simpleType>

<tomcat-user_lore>
 foo
</tomcat-user_lore>

<tomcat-user_lore.bettini name="lorenzo">
 bar
</tomcat-user_lore.bettini>
source-highlight-3.1.6/tests/test_vardecl.java.html0000644000175000017500000000273411672675567017372 00000000000000
Integer i = 10;
Boolean b;
String args[];
final MyType args[];
final My_Type args[];
List<Integer> mylist;
List<List<Integer> > mylist;
java.io.InputStream iStream ;
if (argc > 0) { }
Boolean 0;
_myClass c;
__myClass c;
__my_Class c;
source-highlight-3.1.6/tests/test.scpt0000644000175000017500000000315311672675566014752 00000000000000(* TODO just a comment foo bar *) displayName(choose file with prompt "Select a file:") --if double-clicked return -- not needed, but shows that the script stops here when "run" on open of finderObjects -- "open" handler triggered by drag'n'drop launches repeat with i in (finderObjects) -- in case multiple objects dropped on applet displayName(i) -- show file/folder's info if folder of (info for i) is true then -- process folder's contents too tell application "Finder" to set temp to (entire contents of i) repeat with j in (temp) display dialog j as string -- example of doing something with each item end repeat end if end repeat end open if CurState is 0 then connect configuration "pccard-serial" end if on GetParentPath(myPath) set oldDelimiters to AppleScript's text item delimiters -- always preserve original delimiters set AppleScript's text item delimiters to {":"} set pathItems to text items of (myPath as text) if last item of pathItems is "" then set pathItems to items 1 thru -2 of pathItems -- its a folder set parentPath to ((reverse of the rest of reverse of pathItems) as string) & ":" (* The above line works better than the more obvious set parentPath to ((items 1 thru -2 of pathItems) as string) & ":" because it will not return an error when passed a path for a volume, i.e., "Macintosh HD:", but rather will return ":" indicating the desktop is the root of the given path. Andy Bachorski *) set AppleScript's text item delimiters to oldDelimiters -- always restore original delimiters return parentPath end GetParentPath source-highlight-3.1.6/tests/test.css0000644000175000017500000000363411672675566014575 00000000000000body { font-family: Arial,Helvetica,sans-serif; font-size: small; font-style: normal; background-color : #F9F9F9; } .box { border-width: 2px; border-color: green; border-style: solid; font-style: normal; font-weight: lighter; font-family: verdana, sans-serif; font-size: 0.8em; margin-right:2em; margin-bottom:2em; margin-top:2em; } .maintitle { font-weight:bold; text-align: center; font-size:large; } .domanda { font-weight:bold; } .risposta { font-style: italic; } .title { background-color:lightgreen; font-weight:bold; text-align:center; } .box li { list-style-position:outside; list-style-type:none; } .box ul { padding-left: 5px; } .idimage { padding-left: 5px; padding-right: 20px; padding-top:5px; border: none; } #heading { width: 100%; margin-bottom:5px; /* padding-top:10px; padding-bottom:10px; */ text-align:center; background-color:#75ACCF; font-weight:bolder; font-size:large; } #bottom { width: 100%; top:auto; clear:both; text-align:center; background-color:lightgreen; font-weight:bolder; /* padding-top:10px; padding-bottom:10px; */ } #leftcol { float:left; width:30%; } #altro { background-color: #e0e0e0; } #navbar { border-color: #d0d0d0; } #main { float:right; width: 70%; /* background-image: url(img_rubinetto_photocopy.jpg); background-position: bottom right; background-repeat: no-repeat; */ } #menu2 { display:table; padding:0; margin:0 auto; list-style-type:none; white-space:nowrap; font-size:smaller; } #menu2 li { display:table-cell; } * html #menu2 li { float:left; } #menu2 a { width:auto; display:block; padding:4px 16px; color:#fff; background:#08c; border:1px solid #fff; text-decoration:none; } * html #menu2 a { float:left; } #menu2 a:hover { color:#000; background:#d4d4d4; } .container {clear:both; text-decoration:none;} #info {text-align:center;} #info p {clear:both; text-align:left; margin-left:15px;} source-highlight-3.1.6/tests/test.pl0000644000175000017500000000137611672675566014421 00000000000000% +------------------------------+ % | test for Prolog source | % |______________________________| isinteger(X, L) :- type(X, int, L). % booleans type(true, bool, _). type(false, bool, _). type( and(X,Y), bool, L) :- isboolean(X,L), isboolean(Y,L). type( or(X,Y), bool, L) :- isboolean(X,L), isboolean(Y,L). type( not(X), bool, L) :- isboolean(X,L). type( succ(X), int, L ) :- isinteger(X,L). type( pred(X), int, L ) :- isinteger(X,L). type( iszero(X), bool, L ) :- isinteger(X,L). type( X < Y, bool, L ) :- isinteger(X,L), isinteger(Y,L). % is_member(X,L) check whether X is in the list % by using unification with occur check is_member(_, []) :- fail. is_member(X, [Y | _]) :- unify(X,Y). is_member(X, [_ | List]) :- is_member(X, List). source-highlight-3.1.6/tests/test_comments.java.html0000644000175000017500000000175311672675567017577 00000000000000
// some tests for comments

/* first /* second */ int i; */ int i;

/*   It is the same for Java and C++
 */

/*
  These are some comments with come nesting
  e.g. /* and
  let's see if it works!
*/

// since their // behaviour is /* almost the same 

*/

/* < & > // */
source-highlight-3.1.6/tests/test.js.html0000644000175000017500000017274511672675566015376 00000000000000
/* single line comment */

/myregex/gi

// check that division operator is highlighted correctly
document.write('<table><tr><td>25% = '+(25/100)+'</td></tr></table>'); 

/* unusual, but valid JavaScript */
throw /foo/;

/* this is more likely to occur in practice */
function f() {
  return /foo/;
}

/* or this */
function g(bar) {
  return /foo/.test(bar);
}

/*
* Sarissa XML library v 0.9 beta 4
* Author: Manos Batsis, mailto: mbatsis@netsmart.gr
*
* This source code is distributed under the GNU GPL version 2 (see sarissa_license_gpl.txt) or higher, if 
* a more recent version has been released.
* In case your copy of Sarissa does not include a copy of the license, you may find it online at 
* http://www.gnu.org/copyleft/gpl.html
*/

// some basic browser detection
var _SARISSA_IS_IE = (navigator.userAgent.toLowerCase().indexOf("msie") > -1)?true:false;
var _SARISSA_IS_MOZ = (document.implementation && document.implementation.createDocument)?true:false;
var _sarissa_iNsCounter = 0;
var _SARISSA_IEPREFIX4XSLPARAM = "";
if (_SARISSA_IS_MOZ)
{
	//============================================
	// Section: Factory methods for Moz
	//============================================
	// @param sUri the namespace of the root node (if any)
	// @param sUri the local name of the root node (if any)
	// @return a DOM Document
	Sarissa.getDomDocument = function(sUri, sName)
	{
		var oDoc = document.implementation.createDocument(sUri, sName, null);
		oDoc.addEventListener("load", _sarissa__XMLDocument_onload, false);
		return oDoc;
	};
	// AFAIK, the object behaves exactly like 
	// IE's IXMLHTTPRequest)
	// @return a XmlHttpRequst object suitable for Moz
	Sarissa.getXmlHttpRequest = function()
	{
		return new XMLHttpRequest();
	};
	//============================================
	// Section: utility functions for internal use
	//============================================
	// Attached by an event handler to the load event.
	function _sarissa__XMLDocument_onload()
	{
		_sarissa_loadHandler(this);
	};
	// Ensures the document was loaded correctly, otherwise sets the parseError to -1
	// to indicate something went wrong.
	function _sarissa_loadHandler(oDoc)
	{
		if (!oDoc.documentElement || oDoc.documentElement.tagName == "parsererror")
			oDoc.parseError = -1;
		_sarissa_setReadyState(oDoc, 4);
	};
	// Sets the readyState property
	function _sarissa_setReadyState(oDoc, iReadyState) 
	{
		oDoc.readyState = iReadyState;
		if (oDoc.onreadystatechange != null && typeof oDoc.onreadystatechange == "function")
			oDoc.onreadystatechange();
	};
	
	XMLDocument.prototype._sarissa_clearDOM = function()
	{
		while(this.hasChildNodes())
			this.removeChild(this.firstChild);
	}
	// Replaces the contents of the object with the contents of 
	// the object given as the parameter
	XMLDocument.prototype._sarissa_copyDOM = function(oDoc)
	{
		this._sarissa_clearDOM();
		// importNode is not yet needed in Moz due to a bug but it will be 
		// fixed so...
            var oNodes = oDoc.childNodes;
            for(i=0;i<oNodes.length;i++)
                  this.appendChild(this.importNode(oNodes[i], true));
	};
	var _SARISSA_WSMULT = new RegExp("^\\s*|\\s*$", "g");
	var _SARISSA_WSENDS = new RegExp("\\s\\s+", "g");
	function _sarissa_normalizeText(sIn)
	{
		return sIn.replace(_SARISSA_WSENDS, " ").replace(_SARISSA_WSMULT, " ");
	}
	//============================================
	// Section: Extending Mozilla's DOM implementation 
	// to emulate IE extentions
	//============================================
	// Parses the String given as parameter to build the document content
	// for the object, exactly like IE's loadXML().
	// @return the old contents serialized to String (xml)
	XMLDocument.prototype.loadXML = function(strXML) 
	{
		_sarissa_setReadyState(this, 1);
		var sOldXML = this.xml;
		var oDoc = (new DOMParser()).parseFromString(strXML, "text/xml");
		_sarissa_setReadyState(this, 2);
		this._sarissa_copyDOM(oDoc);
		_sarissa_setReadyState(this, 3);
		_sarissa_loadHandler(this);
		return sOldXML;
	};
	// Emulates IE's xml property. Gives an XML serialization of the DOM Object
    XMLDocument.prototype.__defineGetter__("xml", function ()
	{
		return (new XMLSerializer()).serializeToString(this);
	});
	// Emulates IE's xml property. Gives an XML serialization of the DOM Object
    Node.prototype.__defineGetter__("xml", function ()
	{
		return (new XMLSerializer()).serializeToString(this);
	});
	// Ensures and informs the xml property is read only
	XMLDocument.prototype.__defineSetter__("xml", function ()
	{
		throw "Invalid assignment on read-only property 'xml'. Hint: Use the 'loadXML(String xml)' method instead. (original exception: "+e+")";
	});
	// Emulates IE's innerText (write). Note that this removes all childNodes of 
	// an Element and just replaces it with a textNode
	HTMLElement.prototype.__defineSetter__("innerText", function (sText)
	{
		var s = "" + sText;
		this.innerHTML = s.replace(/\&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
	});
	// Emulate IE's innerText (read). Gives the concatenation of all text nodes under the Element
	HTMLElement.prototype.__defineGetter__("innerText", function ()
	{
		return _sarissa_normalizeText(this.innerHTML.replace(/<[^>]+>/g,""));
	});
	// Emulate IE's onreadystatechange attribute 
	// used as a listener to the onreadystatechange event (also emulated)
    Document.prototype.onreadystatechange = null;
    // Emulate IE's parseError attribute
    Document.prototype.parseError = 0;
	// Emulates IE's readyState property, which always gives an integer from 0 to 4:
	// 1 == LOADING
	// 2 == LOADED
	// 3 == INTERACTIVE
	// 4 == COMPLETED 
    XMLDocument.prototype.readyState = 0;
	// Emulates IE's async property. It controls whether loading of 
	// remote XML files works synchronously or asynchronously.
	// NOTE: setting async to false will only work with documents 
	// called over HTTP (meaning a server), not the local file system,
	// unless you are using Moz 1.4.
	// BTW the try>catch block is for 1.4; I haven't found a way to check if the property is implemented without 
	// causing an error and I dont want to use user agent stuff for that...
	try{
		XMLDocument.prototype.async = true;
	}catch(e){/*trap*/}
	// Keeps a handle to the original load() method
	XMLDocument.prototype._sarissa_load = XMLDocument.prototype.load;
	/** Extends the load method to provide synchronous loading
	* using an XMLHttpRequest object (if async is set to false)
	* @return the DOM Object as it was before the load() call (may be empty)
	*/
    XMLDocument.prototype.load = function(sURI)
	{
		var oDoc = document.implementation.createDocument("", "", null);
		oDoc._sarissa_copyDOM(this);
		this.parseError = 0;
		_sarissa_setReadyState(this, 1);
		try
		{
			if(this.async == false)
			{
				var tmp = new XMLHttpRequest();
				tmp.open("GET", sURI, false);
				tmp.overrideMimeType("text/xml");
				tmp.send(null);
				_sarissa_setReadyState(this, 2);
				this._sarissa_copyDOM(tmp.responseXML);
				_sarissa_setReadyState(this, 3);
			}
			else
				this._sarissa_load(sURI);
		}
		catch (objException)
		{
			this.parseError = -1;
		}
		finally
		{
			_sarissa_loadHandler(this);
		}
		return oDoc;
	}; 
	// Emulate IE's transformNodeToObject
	Document.prototype.transformNodeToObject = function(xslDoc, oResult)
	{
		var xsltProcessor = null;
		try
		{
		    xsltProcessor = new XSLTProcessor();
		    if(xsltProcessor.reset)
		    {
				// new nsIXSLTProcessor is available
				xsltProcessor.importStylesheet(xslDoc);
				var newFragment = xsltProcessor.transformToFragment(this, oResult);
				oResult._sarissa_copyDOM(newFragment);
            }
            else
		    {
				// only nsIXSLTProcessorObsolete is available
				xsltProcessor.transformDocument(this, xslDoc, oResult, null);
            }
		}
		catch(e)
		{
			if(xslDoc && oResult)
				throw "Sarissa_TransformNodeToObjectException: Failed to transform document. (original exception: "+e+")";
			else if(!xslDoc)
				throw "Sarissa_TransformNodeToObjectException: No Stylesheet Document was provided. (original exception: "+e+")";
			else if(!oResult)
				throw "Sarissa_TransformNodeToObjectException: No Result Document was provided. (original exception: "+e+")";
			else if(xsltProcessor == null)
                            throw "Sarissa_XSLTProcessorNotAvailableException: Could not instantiate an XSLTProcessor object. (original exception: "+e+")";
                        else
                            throw e;
		}
	};
	// Emulate IE's transformNode() method. Gives the result XML serialised to a String
	Document.prototype.transformNode = function(xslDoc)
	{
		var out = document.implementation.createDocument("", "", null);
		this.transformNodeToObject(xslDoc, out);
		var str = null;
		try
		{
			var serializer = new XMLSerializer();
			str = serializer.serializeToString(out);
		}
		catch(e)
		{
			throw "Sarissa_TransformNodeException: Failed to serialize result document. (original exception: "+e+")";
		}
		return str;
	};
	// Extend the Array to behave as a NodeList	
	Array.prototype.item = function(i)
	{
		return this[i];
	};
	// add IE's expr property
	Array.prototype.expr = "";
    // dummy, used to accept IE's stuff without throwing errors
	XMLDocument.prototype.setProperty  = function(x,y){};
	// Emulate IE's selectNodes
	XMLDocument.prototype.selectNodes = function(sExpr, contextNode)
	{
		var oResult = this.evaluate(sExpr, (contextNode?contextNode:this), 
							this.createNSResolver(this.documentElement),
							XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
		var nodeList = new Array(oResult.snapshotLength);
		nodeList.expr = sExpr;
		for(i=0;i<nodeList.length;i++)
			nodeList[i] = oResult.snapshotItem(i);
		return nodeList;
	};
	Element.prototype.selectNodes = function(sExpr)
	{
		var doc = this.ownerDocument;
		if(doc.selectNodes)
			return doc.selectNodes(sExpr, this);
		else
			throw "SarissaXPathOperationException: Method selectNodes is only supported by XML Nodes";
	};
	// Emulate IE's selectSingleNode
	XMLDocument.prototype.selectSingleNode = function(sExpr, contextNode)
	{
		var ctx = contextNode?contextNode:null;
		sExpr += "[1]";
		var nodeList = this.selectNodes(sExpr, ctx);
		if(nodeList.length > 0)
			return nodeList[0];
		else 
			return null;
	};
	Element.prototype.selectSingleNode = function(sExpr)
	{
		var doc = this.ownerDocument;
		if(doc.selectSingleNode)
			return doc.selectSingleNode(sExpr, this);
		else
			throw "SarissaXPathOperationException: Method selectSingleNode is only supported by XML Nodes. (original exception: "+e+")";
	};
}
else if (_SARISSA_IS_IE)
{
	//============================================
	// Section: IE Initialization
	//============================================
	// Add NodeType constants; missing in IE4, 5 and 6
	if(!window.Node)
	{
		var Node = {
			ELEMENT_NODE: 1,
			ATTRIBUTE_NODE: 2,
			TEXT_NODE: 3,
			CDATA_SECTION_NODE: 4,
			ENTITY_REFERENCE_NODE: 5,
			ENTITY_NODE: 6,
			PROCESSING_INSTRUCTION_NODE: 7,
			COMMENT_NODE: 8,
			DOCUMENT_NODE: 9,
			DOCUMENT_TYPE_NODE: 10,
			DOCUMENT_FRAGMENT_NODE: 11,
			NOTATION_NODE: 12
		}
	}
	// for XSLT parameter names
	_SARISSA_IEPREFIX4XSLPARAM = "xsl:";
	// used to store the most recent ProgID available out of the above
	var _SARISSA_DOM_PROGID = "";
	var _SARISSA_XMLHTTP_PROGID = "";
	// used to pick most recent ProgIDs
	function pickRecentProgID(idList)
	{
		// found progID flag
		var bFound = false;
		for (var i=0; i < idList.length && !bFound; i++)
		{
			try
			{
				var oDoc = new ActiveXObject(idList[i]);
				o2Store = idList[i];
				bFound = true;
			}
			catch (objException)
			{
				// trap; try next progID
			}
		}
		if (!bFound)
			throw "Sarissa_Exception: Could not retreive a valid progID of Class: " + idList[idList.length-1]+". (original exception: "+e+")";
		idList = null;
		return o2Store;
	};
	// store proper progIDs
	_SARISSA_DOM_PROGID = pickRecentProgID(["Msxml2.DOMDocument.4.0", "Msxml2.DOMDocument.3.0", "MSXML2.DOMDocument", "MSXML.DOMDocument", "Microsoft.XmlDom"]);
	_SARISSA_XMLHTTP_PROGID = pickRecentProgID(["Msxml2.XMLHTTP.4.0", "MSXML2.XMLHTTP.3.0", "MSXML2.XMLHTTP", "Microsoft.XMLHTTP"]);
	// we dont need this anymore
	pickRecentProgID = null;
	//============================================
	// Section: Factory methods (IE)
	//============================================
	// Factory method, returns a DOMDocument suitable for IE
    Sarissa.getDomDocument = function(sUri, sName)
    {
		var oDoc = new ActiveXObject(_SARISSA_DOM_PROGID);
		// if a root tag name was provided, we need to load it in the DOM object
		if (sName)
		{
			// if needed, create an artifical namespace prefix the way Moz does
			if (sUri)
			{
				oDoc.loadXML("<a" + _sarissa_iNsCounter + ":" + sName + " xmlns:a" + _sarissa_iNsCounter + "=\"" + sUri + "\" />");
				// don't use the same prefix again
				++_sarissa_iNsCounter;
			}
			else
				oDoc.loadXML("<" + sName + "/>");
		}
		return oDoc;
    };
	// Factory method, returns an IXMLHTTPRequest object 
	// AFAIK, the object behaves exactly like 
	// Mozilla's XmlHttpRequest
	Sarissa.getXmlHttpRequest = function()
	{
		return new ActiveXObject(_SARISSA_XMLHTTP_PROGID);
	};
}
// Factory Class
function Sarissa(){}
// Common factory method, used to set xslt parameters.
// TODO: figure out how to implement support for both Mozilla's and IE's 
// XSL Processor objects to improove performance for reusable stylesheets.
// @param oXslDoc the target XSLT DOM Document
// @param sParamName the name of the XSLT parameter
// @param sParamValue the value of the XSLT parameter
// @return whether the parameter was set succefully
Sarissa.setXslParameter = function(oXslDoc, sParamQName, sParamValue)
{
	try
	{
		var params = oXslDoc.getElementsByTagName(_SARISSA_IEPREFIX4XSLPARAM+"param");
		var iLength = params.length;
		var bFound = false;
		var param;
		
		if(sParamValue)
		{
			for(i=0; i < iLength && !bFound;i++)
			{
				// match a param name attribute with the name given as argument
				if(params[i].getAttribute("name") == sParamQName)
				{
					param = params[i];
					// clean up the parameter
					while(param.firstChild)
						param.removeChild(param.firstChild);
					if(!sParamValue || sParamValue == null)
					{
						// do nothing; we've cleaned up the parameter anyway
					}
					// if String
					else if(typeof sParamValue == "string")
					{ 
						param.setAttribute("select", sParamValue);
						bFound = true;
					}
					// if node
					else if(sParamValue.nodeName)
					{
						param.removeAttribute("select");
						param.appendChild(sParamValue.cloneNode(true));
						bFound = true;
					}
					// if NodeList
					else if (sParamValue.item(0)
						&& sParamValue.item(0).nodeType)
					{
						for(j=0;j < sParamValue.length;j++)
						if(sParamValue.item(j).nodeType) // check if this is a Node
							param.appendChild(sParamValue.item(j).cloneNode(true));
						bFound = true;
					}
					// if Array or IE's IXMLDOMNodeList
					else
						throw "SarissaTypeMissMatchException in method: Sarissa.setXslParameter. (original exception: "+e+")";
				}
			}
		}
		return bFound;
	}
	catch(e)
	{
		throw e;
		return false;
	}
}
// EOF


source-highlight-3.1.6/tests/test_comments.pm0000644000175000017500000000016711672675567016325 00000000000000# some tests for comments # yep =head1 title1 This is pod Documentation =head2 Here a not pod item: =head3 =cut source-highlight-3.1.6/tests/test.java0000644000175000017500000000266711672675566014733 00000000000000/* This is a classical Hello program to test source-highlight with Java programs. to have an html translation type source-highlight -s java -f html --input Hello.java --output Hello.html source-highlight -s java -f html < Hello.java > Hello.html or type source-highlight --help for the list of options written by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite */ package hello; import java.io.* ; /** *

* A simple Hello World class, used to demonstrate some * features of Java source highlighting. *

* TODO: nothing, just to show an highlighted TODO or FIXME * * @author Lorenzo Bettini * @version 2.0 */ /// class public class Hello { int foo = 1998 ; int hex_foo = 0xCAFEBABE; boolean b = false; Integer i = null ; char c = '\'', d = 'n', e = '\\' ; String xml = "ä", foo2 = "\\" ; /* mymethod */ public void mymethod(int i) { // just a foo method } /* mymethod */ /* main */ public static void main( String args[] ) { // just some greetings ;-) /* System.out.println( "Hello from java2html :-)" ) ; System.out.println( "\tby Lorenzo Bettini" ) ; System.out.println( "\thttp://www.lorenzobettini.it" ) ; if (argc > 0) String param = argc[0]; //System.out.println( "bye bye... :-D" ) ; // see you soon } /* main */ } /// class // end of file test.javasource-highlight-3.1.6/tests/test.awk0000644000175000017500000000407211672675566014564 00000000000000$6 !~ /^ack/ && $5 !~ /[SFR]/ { # given a tcpdump ftp trace, output one line for each send # in the form # # where is the time packet was sent (in seconds with # zero at time of first packet) and is the tcp sequence # number of the packet divided by 1024 (i.e., Kbytes sent). # # convert time to seconds n = split ($1,t,":") tim = t[1]*3600 + t[2]*60 + t[3] if (! tzero) { tzero = tim OFS = "\t" } # get packet sequence number i = index($6,":") printf "%7.2f\t%g\n", tim-tzero, substr($6,1,i-1)/1024 } BEGIN{ buffer = ""; } /\015*$/ { gsub(/\015*$/, ""); } /^%%S NL/ { print ""; next; } /^%%S/ { gsub (/^%%S/, "%%" ); print; next; } /^\\Syntax/ { printing = 1; indentation = 0; next; } // { if (buffer != "") { gsub(/^ */, ""); $0 = buffer $0; } buffer = ""; } /\|\|/ { gsub(/\|\|/, "-"); } /^ */{ gsub(/^ */, indspaces); } /\\Something/ { $0 = gensub(/\\Something *{([^}]*)}/, "<\\1>", "g"); } /\\Literal/ { $0 = gensub(/\\Literal *{([^}]*)}/, "\\1", "g"); } /\\Tex/ { $0 = gensub(/\\Tex *{([^}]*)}/, "\\1", "g"); } /\\Optional/ { $0 = gensub(/\\Optional *{([^}]*)}/, "[\\1]", "g"); } /\\Means/ { gsub(/\\Means/, "-->"); indentation = match($0, /-->/); indspaces = " "; for(i=0; i < indentation; i++) indspaces = indspaces " "; } /\\Lbrace/ { gsub(/\\Lbrace/, "{"); } /\\Rbrace/ { gsub(/\\Rbrace/, "}"); } /\\Or/ { gsub(/\\Or/, "|"); } /\\Next/ { gsub(/\\Next /, ""); } /\\Whatever/ { whatind = 57; whatpos = match($0, /\\Whatever/); b = substr($0, 0, whatpos - 1) c = substr($0, whatpos) c = gensub(/\\Whatever *{([^}]*)}/, "(\\1)", "g", c); $0 = b; for(i = whatpos; i < whatind; i++) $0 = $0 " "; $0 = $0 c; } /^}/ {printing = 0;} /% *$/ { gsub(/% *$/, ""); buffer = $0; next; } /^ *$/ { $0 = "================= ERROR"; } / *$/ { gsub(/ *$/, ""); } { if (printing) print; } source-highlight-3.1.6/tests/valgrind_test.sh.in0000644000175000017500000000511211672675567016704 00000000000000#! @BASH_SHELL@ # --------------------------------------------------------------------- # # # Script to run some examples through VALGRIND. # # Michael Hagemann # # modified by Lorenzo Bettini # # this requires bash extensions # # --------------------------------------------------------------------- # # Hack to run valgrind with new glibcs. Problem: new TLS (thread # local storage) #VG_ENV="LD_ASSUME_KERNEL=2.2.5" # --num-callers=20 --leak-check=yes --leak-resolution=high --show-reachable=yes --suppressions=./suppressions.supp # --num-callers=20 --leak-resolution=high --suppressions=/home/bettini/work/src2tags/tests/suppressions.supp VG_PRG="@VALGRIND@" VG_ARGS="--tool=memcheck --num-callers=20 --leak-check=yes --leak-resolution=high --show-reachable=yes --suppressions=@srcdir@/suppressions.supp" #VG_ARGS="--tool=memcheck --num-callers=20 --leak-check=yes --leak-resolution=high --suppressions=@srcdir@/suppressions.supp" VGRIND="${VG_ENV} ${VG_PRG} ${VG_ARGS}" if test ! -x "${VG_PRG}"; then echo Valgrind not found! Check path. exit 1 fi # --------------------------------------------------------------------- # DATE=`date +"%Y-%m-%d_%H%M"` SUMMARY=valgrind_summary.log TMP_LOG=valgrind_tmp.log ERROR=0 # --------------------------------------------------------------------- # vgrind () { if test ! -x "$1" -o "$1" == `basename $0`; then echo "Skipping $1." return fi echo -n "Running $* ..." tmp_err= if [[ $1 == *.sh ]]; then # echo "$1 ${VGRIND} >${TMP_LOG} 2>&1 ..." eval $1 ${VGRIND} >${TMP_LOG} 2>&1; else # echo "${VGRIND} $* >${TMP_LOG} 2>&1 ..." eval ${VGRIND} $* >${TMP_LOG} 2>&1 fi; #grep -e "LEAK SUMMARY" ${TMP_LOG} >/dev/null 2>&1 grep -E "(reachable|lost): [1-9][0-9]*" ${TMP_LOG} >/dev/null 2>&1 if test "$?" == "0"; then echo -n " LEAKS!" echo "" >> ${SUMMARY} echo "** $*, LEAKS" >> ${SUMMARY} cat ${TMP_LOG} >> ${SUMMARY} tmp_err=1 fi grep -e "[1-9][0-9]* error" ${TMP_LOG} >/dev/null 2>&1 if test "$?" == "0"; then echo -n " ERRORS!" echo "" >> ${SUMMARY} echo "** $*, ERRORS" >> ${SUMMARY} cat ${TMP_LOG} >> ${SUMMARY} tmp_err=1 fi if test "x${tmp_err}" == "x"; then echo " OK." else ERROR=1 echo "" fi rm -f ${TMP_LOG} } # --------------------------------------------------------------------- # echo "Run at ${DATE}" >${SUMMARY} vgrind $* # --------------------------------------------------------------------- # # cat ${SUMMARY} exit ${ERROR} source-highlight-3.1.6/tests/valgrind_tests.sh.in0000644000175000017500000000440111672675567017067 00000000000000#! @BASH_SHELL@ # --------------------------------------------------------------------- # # # Script to run some examples through VALGRIND. # # Michael Hagemann # # modified by Lorenzo Bettini # # --------------------------------------------------------------------- # # Hack to run valgrind with new glibcs. Problem: new TLS (thread # local storage) #VG_ENV="LD_ASSUME_KERNEL=2.2.5" VG_PRG="@VALGRIND@" VG_ARGS="--tool=memcheck --num-callers=15 --leak-check=yes --leak-resolution=high --show-reachable=yes --suppressions=@srcdir@/suppressions.supp" #VG_ARGS="--tool=memcheck --num-callers=15 --leak-check=yes --leak-resolution=high" VGRIND="${VG_ENV} ${VG_PRG} ${VG_ARGS}" if test ! -x "${VG_PRG}"; then echo Valgrind not found! Check path. exit 1 fi # --------------------------------------------------------------------- # DATE=`date +"%Y-%m-%d_%H%M"` SUMMARY=valgrind_summary.log TMP_LOG=valgrind_tmp.log ERROR=0 # --------------------------------------------------------------------- # vgrind () { if test ! -x "$1" -o "$1" == `basename $0`; then echo "Skipping $1." return fi echo -n "Running $* ..." tmp_err= if [[ $1 == *.sh ]]; then eval $1 ${VGRIND} >${TMP_LOG} 2>&1; else eval ${VGRIND} $* >${TMP_LOG} 2>&1 fi; #grep -e "LEAK SUMMARY" ${TMP_LOG} >/dev/null 2>&1 grep -E "(reachable|lost): [1-9][0-9]*" ${TMP_LOG} >/dev/null 2>&1 if test "$?" == "0"; then echo -n " LEAKS!" echo "" >> ${SUMMARY} echo "** $*, LEAKS" >> ${SUMMARY} cat ${TMP_LOG} >> ${SUMMARY} tmp_err=1 fi grep -e "[1-9][0-9]* error" ${TMP_LOG} >/dev/null 2>&1 if test "$?" == "0"; then echo -n " ERRORS!" echo "" >> ${SUMMARY} echo "** $*, ERRORS" >> ${SUMMARY} cat ${TMP_LOG} >> ${SUMMARY} tmp_err=1 fi if test "x${tmp_err}" == "x"; then echo " OK." else ERROR=1 echo "" fi rm -f ${TMP_LOG} } # --------------------------------------------------------------------- # echo "Run at ${DATE}" >${SUMMARY} for PROG in $*; do vgrind @top_builddir@/tests/$PROG; done #vgrind $* # --------------------------------------------------------------------- # # cat ${SUMMARY} exit ${ERROR} source-highlight-3.1.6/tests/test.bib0000644000175000017500000000047611672675566014542 00000000000000@PhdThesis{BetPhd, author = {L.~Bettini}, title = {{Linguistic Constructs for Object-Oriented Mobile Code Programming \& their Implementations}}, school = {Dip.\ di Matematica, Universit\`a di Siena}, year = 2003, note = {Available at \texttt{http://music.dsi.unifi.it}} } source-highlight-3.1.6/tests/test.proto0000644000175000017500000000253011672675566015142 00000000000000// Created from samples at // http://code.google.com/apis/protocolbuffers/docs/proto.html import "google/protobuf/descriptor.proto" option optimize_for = CODE_SIZE; package test; extend google.protobuf.FileOptions { optional string my_file_option = 50000; } extend google.protobuf.MessageOptions { optional int32 my_message_option = 50001; } extend google.protobuf.FieldOptions { optional float my_field_option = 50002; } extend google.protobuf.EnumOptions { optional bool my_enum_option = 50003; } extend google.protobuf.EnumValueOptions { optional uint32 my_enum_value_option = 50004; } extend google.protobuf.ServiceOptions { optional MyEnum my_service_option = 50005; } extend google.protobuf.MethodOptions { optional MyMessage my_method_option = 50006; } option (my_file_option) = "Hello world!"; message MyMessage { option (my_message_option) = 1234; optional int32 foo = 1 [(my_field_option) = 4.5]; optional string bar = 2; } enum MyEnum { option (my_enum_option) = true; FOO = 1 [(my_enum_value_option) = 321]; BAR = 2; } service MyService { option (my_service_option) = FOO; method MyMethod() { // Note: my_method_option has type MyMessage. We can set each field // within it using a separate "option" line. option (my_method_option).foo = 567; option (my_method_option).bar = "Some string"; } } source-highlight-3.1.6/tests/test.errors0000644000175000017500000000074511672675566015321 00000000000000no need to highlight this c:\f\g\Makefile:1346:10: warning: overriding commands for target `styleformatter.h.texinfo' foo /f/g/Makefile:1346:10: warning: overriding commands for target `styleformatter.h.texinfo' foo /foo/bar/Makefile:1337: error: ignoring old commands for target 'styleformatter.h.texinfo' bar \foo\bar\Makefile:1346: warning: overriding commands for target `styleformatter.h.texinfo' Makefile:1337: warning: ignoring old commands for target `styleformatter.h.texinfo'source-highlight-3.1.6/tests/test.isolate0000644000175000017500000000036011672675566015436 00000000000000Hi, this class will be highlighted as keyword Also first and second, but not firstsecond and in insideforfoo for will be highlighted as type in otherwise we expect wise to be highlighted again (and also gain) Inred the color is highlighted!source-highlight-3.1.6/tests/test_with_embed.htm0000644000175000017500000000403511672675567016761 00000000000000 Java formatted in html The date and time are:
/*
  This is a classical Hello program
  to test source-highlight with Java programs.
  
  to have an html translation type

/// class

// end of file test.java
source-highlight-3.1.6/tests/test.sh.html0000644000175000017500000001574711672675566015372 00000000000000
#! /bin/sh

# this shell script is for test purpose only
# so it should not be executed

case $revision in
        0|[1-9]|[1-9][0-9]|[
1-9][0-9][0-9]|[1-9][0-9][
0-9][0-9]|[1-9][0-9][0-9
][0-9][0-9]) ;;


for source in $1; do
        source-highlight --failsafe -f esc -i $source;
done

# these are variables
$abc, $(abc) and ${abc} ${abc)

# and also these are variables
($myvar) {$myvar} {$myvar)

eval std_shrext=\"$shrext_cmds\"

disable_libs=no

    if test -n "$shlibpath_var"; then
      # get the directories listed in $shlibpath_var
      eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
    else
      shlib_search_path=
    fi

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
source-highlight-3.1.6/tests/test.wdefault.html0000644000175000017500000000052111672675567016554 00000000000000
this is a keyword and
test some other key1, key2 and key3 and see what's highlighted
source-highlight-3.1.6/tests/test_line_at_the_end.c.html0000644000175000017500000000046211672675567020350 00000000000000
1: #include <stdio.h>
2: 
source-highlight-3.1.6/tests/test.java.tex0000644000175000017500000002117211672675566015522 00000000000000% Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite \documentclass{article} \usepackage[usenames,dvipsnames]{color} \title{formatted with source-highlight} \date{} \begin{document} \maketitle \noindent \mbox{}\texttt{\textcolor{Black}{ 1:}} \textit{\textcolor{Brown}{/*}} \\ \mbox{}\texttt{\textcolor{Black}{ 2:}} \textit{\textcolor{Brown}{\ \ This\ is\ a\ classical\ Hello\ program}} \\ \mbox{}\texttt{\textcolor{Black}{ 3:}} \textit{\textcolor{Brown}{\ \ to\ test\ source-highlight\ with\ Java\ programs.}} \\ \mbox{}\texttt{\textcolor{Black}{ 4:}} \textit{\textcolor{Brown}{\ \ }} \\ \mbox{}\texttt{\textcolor{Black}{ 5:}} \textit{\textcolor{Brown}{\ \ to\ have\ an\ html\ translation\ type}} \\ \mbox{}\texttt{\textcolor{Black}{ 6:}} \\ \mbox{}\texttt{\textcolor{Black}{ 7:}} \textit{\textcolor{Brown}{\ \ \ \ \ \ \ \ source-highlight\ -s\ java\ -f\ html\ -\/-input\ Hello.java\ -\/-output\ Hello.html}} \\ \mbox{}\texttt{\textcolor{Black}{ 8:}} \textit{\textcolor{Brown}{\ \ \ \ \ \ \ \ source-highlight\ -s\ java\ -f\ html\ \textless{}\ Hello.java\ \textgreater{}\ Hello.html}} \\ \mbox{}\texttt{\textcolor{Black}{ 9:}} \\ \mbox{}\texttt{\textcolor{Black}{10:}} \textit{\textcolor{Brown}{\ \ or\ type\ source-highlight\ -\/-help\ for\ the\ list\ of\ options}} \\ \mbox{}\texttt{\textcolor{Black}{11:}} \\ \mbox{}\texttt{\textcolor{Black}{12:}} \textit{\textcolor{Brown}{\ \ written\ by}} \\ \mbox{}\texttt{\textcolor{Black}{13:}} \textit{\textcolor{Brown}{\ \ Lorenzo\ Bettini}} \\ \mbox{}\texttt{\textcolor{Black}{14:}} \textit{\textcolor{Brown}{\ \ }}\underline{\texttt{\textcolor{Blue}{http://www.lorenzobettini.it}}} \\ \mbox{}\texttt{\textcolor{Black}{15:}} \textit{\textcolor{Brown}{\ \ }}\underline{\texttt{\textcolor{Blue}{http://www.gnu.org/software/src-highlite}}} \\ \mbox{}\texttt{\textcolor{Black}{16:}} \textit{\textcolor{Brown}{*/}} \\ \mbox{}\texttt{\textcolor{Black}{17:}} \\ \mbox{}\texttt{\textcolor{Black}{18:}} \textbf{\textcolor{RoyalBlue}{package}}\ hello\textcolor{BrickRed}{;} \\ \mbox{}\texttt{\textcolor{Black}{19:}} \\ \mbox{}\texttt{\textcolor{Black}{20:}} \textbf{\textcolor{RoyalBlue}{import}}\ java\textcolor{BrickRed}{.}io\textcolor{BrickRed}{.*}\ \textcolor{BrickRed}{;} \\ \mbox{}\texttt{\textcolor{Black}{21:}} \\ \mbox{}\texttt{\textcolor{Black}{22:}} \textit{\textcolor{Brown}{/**}} \\ \mbox{}\texttt{\textcolor{Black}{23:}} \textit{\textcolor{Brown}{\ *\ }}\textbf{\textcolor{Blue}{\textless{}p\textgreater{}}} \\ \mbox{}\texttt{\textcolor{Black}{24:}} \textit{\textcolor{Brown}{\ *\ A\ simple\ Hello\ World\ class,\ used\ to\ demonstrate\ some}} \\ \mbox{}\texttt{\textcolor{Black}{25:}} \textit{\textcolor{Brown}{\ *\ features\ of\ Java\ source\ highlighting.}} \\ \mbox{}\texttt{\textcolor{Black}{26:}} \textit{\textcolor{Brown}{\ *\ }}\textbf{\textcolor{Blue}{\textless{}/p\textgreater{}}} \\ \mbox{}\texttt{\textcolor{Black}{27:}} \textit{\textcolor{Brown}{\ *\ }}\textbf{\colorbox{Cyan}{TODO:}}\textit{\textcolor{Brown}{\ nothing,\ just\ to\ show\ an\ highlighted\ }}\textbf{\colorbox{Cyan}{TODO}}\textit{\textcolor{Brown}{\ or\ }}\textbf{\colorbox{Cyan}{FIXME}} \\ \mbox{}\texttt{\textcolor{Black}{28:}} \textit{\textcolor{Brown}{\ *}} \\ \mbox{}\texttt{\textcolor{Black}{29:}} \textit{\textcolor{Brown}{\ *\ }}\textcolor{ForestGreen}{@author}\textit{\textcolor{Brown}{\ Lorenzo\ Bettini}} \\ \mbox{}\texttt{\textcolor{Black}{30:}} \textit{\textcolor{Brown}{\ *\ }}\textcolor{ForestGreen}{@version}\textit{\textcolor{Brown}{\ 2.0}} \\ \mbox{}\texttt{\textcolor{Black}{31:}} \textit{\textcolor{Brown}{\ */}}\ \textit{\textcolor{Brown}{///\ class}} \\ \mbox{}\texttt{\textcolor{Black}{32:}} \textbf{\textcolor{Blue}{public}}\ \textbf{\textcolor{Blue}{class}}\ \textcolor{TealBlue}{Hello}\ \textcolor{Red}{\{} \\ \mbox{}\texttt{\textcolor{Black}{33:}} \ \ \ \ \textcolor{ForestGreen}{int}\ foo\ \textcolor{BrickRed}{=}\ \textcolor{Purple}{1998}\ \textcolor{BrickRed}{;} \\ \mbox{}\texttt{\textcolor{Black}{34:}} \ \ \ \ \textcolor{ForestGreen}{int}\ hex$\_$foo\ \textcolor{BrickRed}{=}\ \textcolor{Purple}{0xCAFEBABE}\textcolor{BrickRed}{;} \\ \mbox{}\texttt{\textcolor{Black}{35:}} \ \ \ \ \textcolor{ForestGreen}{boolean}\ b\ \textcolor{BrickRed}{=}\ \textbf{\textcolor{Blue}{false}}\textcolor{BrickRed}{;} \\ \mbox{}\texttt{\textcolor{Black}{36:}} \ \ \ \ \textcolor{TealBlue}{Integer}\ i\ \textcolor{BrickRed}{=}\ \textbf{\textcolor{Blue}{null}}\ \textcolor{BrickRed}{;} \\ \mbox{}\texttt{\textcolor{Black}{37:}} \ \ \ \ \textcolor{ForestGreen}{char}\ c\ \textcolor{BrickRed}{=}\ \texttt{\textcolor{Red}{'}}\texttt{\textcolor{CarnationPink}{\textbackslash{}'}}\texttt{\textcolor{Red}{'}}\textcolor{BrickRed}{,}\ d\ \textcolor{BrickRed}{=}\ \texttt{\textcolor{Red}{'n'}}\textcolor{BrickRed}{,}\ e\ \textcolor{BrickRed}{=}\ \texttt{\textcolor{Red}{'}}\texttt{\textcolor{CarnationPink}{\textbackslash{}\textbackslash{}}}\texttt{\textcolor{Red}{'}}\ \textcolor{BrickRed}{;} \\ \mbox{}\texttt{\textcolor{Black}{38:}} \ \ \ \ \textcolor{TealBlue}{String}\ xml\ \textcolor{BrickRed}{=}\ \texttt{\textcolor{Red}{"{}\textless{}tag\ attr=}}\texttt{\textcolor{CarnationPink}{\textbackslash{}"{}}}\texttt{\textcolor{Red}{value}}\texttt{\textcolor{CarnationPink}{\textbackslash{}"{}}}\texttt{\textcolor{Red}{\textgreater{}\ä\textless{}/tag\textgreater{}"{}}}\textcolor{BrickRed}{,}\ foo2\ \textcolor{BrickRed}{=}\ \texttt{\textcolor{Red}{"{}}}\texttt{\textcolor{CarnationPink}{\textbackslash{}\textbackslash{}}}\texttt{\textcolor{Red}{"{}}}\ \textcolor{BrickRed}{;} \\ \mbox{}\texttt{\textcolor{Black}{39:}} \\ \mbox{}\texttt{\textcolor{Black}{40:}} \ \ \ \ \textit{\textcolor{Brown}{/*\ mymethod\ */}} \\ \mbox{}\texttt{\textcolor{Black}{41:}} \ \ \ \ \textbf{\textcolor{Blue}{public}}\ \textcolor{ForestGreen}{void}\ \textbf{\textcolor{Black}{mymethod}}\textcolor{BrickRed}{(}\textcolor{ForestGreen}{int}\ i\textcolor{BrickRed}{)}\ \textcolor{Red}{\{} \\ \mbox{}\texttt{\textcolor{Black}{42:}} \ \ \ \ \ \ \ \ \textit{\textcolor{Brown}{//\ just\ a\ foo\ method}} \\ \mbox{}\texttt{\textcolor{Black}{43:}} \ \ \ \ \textcolor{Red}{\}} \\ \mbox{}\texttt{\textcolor{Black}{44:}} \ \ \ \ \textit{\textcolor{Brown}{/*\ mymethod\ */}} \\ \mbox{}\texttt{\textcolor{Black}{45:}} \ \ \ \\ \mbox{}\texttt{\textcolor{Black}{46:}} \ \ \ \ \textit{\textcolor{Brown}{/*\ main\ */}} \\ \mbox{}\texttt{\textcolor{Black}{47:}} \ \ \ \ \textbf{\textcolor{Blue}{public}}\ \textbf{\textcolor{Blue}{static}}\ \textcolor{ForestGreen}{void}\ \textbf{\textcolor{Black}{main}}\textcolor{BrickRed}{(}\ \textcolor{TealBlue}{String}\ args\textcolor{BrickRed}{[]}\ \textcolor{BrickRed}{)}\ \textcolor{Red}{\{} \\ \mbox{}\texttt{\textcolor{Black}{48:}} \ \ \ \ \ \ \ \ \textit{\textcolor{Brown}{//\ just\ some\ greetings\ ;-)\ \ /*}} \\ \mbox{}\texttt{\textcolor{Black}{49:}} \ \ \ \ \ \ \ \ System\textcolor{BrickRed}{.}out\textcolor{BrickRed}{.}\textbf{\textcolor{Black}{println}}\textcolor{BrickRed}{(}\ \texttt{\textcolor{Red}{"{}Hello\ from\ java2html\ :-)"{}}}\ \textcolor{BrickRed}{)}\ \textcolor{BrickRed}{;} \\ \mbox{}\texttt{\textcolor{Black}{50:}} \ \ \ \ \ \ \ \ System\textcolor{BrickRed}{.}out\textcolor{BrickRed}{.}\textbf{\textcolor{Black}{println}}\textcolor{BrickRed}{(}\ \texttt{\textcolor{Red}{"{}}}\texttt{\textcolor{CarnationPink}{\textbackslash{}t}}\texttt{\textcolor{Red}{by\ Lorenzo\ Bettini"{}}}\ \textcolor{BrickRed}{)}\ \textcolor{BrickRed}{;} \\ \mbox{}\texttt{\textcolor{Black}{51:}} \ \ \ \ \ \ \ \ System\textcolor{BrickRed}{.}out\textcolor{BrickRed}{.}\textbf{\textcolor{Black}{println}}\textcolor{BrickRed}{(}\ \texttt{\textcolor{Red}{"{}}}\texttt{\textcolor{CarnationPink}{\textbackslash{}t}}\texttt{\textcolor{Red}{http://www.lorenzobettini.it"{}}}\ \textcolor{BrickRed}{)}\ \textcolor{BrickRed}{;} \\ \mbox{}\texttt{\textcolor{Black}{52:}} \ \ \ \ \ \ \ \ \textbf{\textcolor{Blue}{if}}\ \textcolor{BrickRed}{(}argc\ \textcolor{BrickRed}{\textgreater{}}\ \textcolor{Purple}{0}\textcolor{BrickRed}{)} \\ \mbox{}\texttt{\textcolor{Black}{53:}} \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{TealBlue}{String}\ param\ \textcolor{BrickRed}{=}\ argc\textcolor{BrickRed}{[}\textcolor{Purple}{0}\textcolor{BrickRed}{];} \\ \mbox{}\texttt{\textcolor{Black}{54:}} \ \ \ \ \ \ \ \ \textit{\textcolor{Brown}{//System.out.println(\ "{}bye\ bye...\ :-D"{}\ )\ ;\ //\ see\ you\ soon}} \\ \mbox{}\texttt{\textcolor{Black}{55:}} \ \ \ \ \textcolor{Red}{\}} \\ \mbox{}\texttt{\textcolor{Black}{56:}} \ \ \ \ \textit{\textcolor{Brown}{/*\ main\ */}} \\ \mbox{}\texttt{\textcolor{Black}{57:}} \textcolor{Red}{\}} \\ \mbox{}\texttt{\textcolor{Black}{58:}} \textit{\textcolor{Brown}{///\ class}} \\ \mbox{}\texttt{\textcolor{Black}{59:}} \\ \mbox{}\texttt{\textcolor{Black}{60:}} \textit{\textcolor{Brown}{//\ end\ of\ file\ test.java}} \end{document} source-highlight-3.1.6/tests/test_extreme_comment3.cpp0000644000175000017500000000044611672675567020124 00000000000000// test special #if 0 treatment int main() { #if 0 // equivalent to a comment int i = 10; printf("this should never be executed\n"); return 1; #else printf("Hello world!\n"); # if 0 // another one return 1; # else return 0; # endif #endif printf("never reach here!\n"); } source-highlight-3.1.6/tests/wrong_var.lang0000644000175000017500000000003011672675567015737 00000000000000 keyword = $UNDEFINED source-highlight-3.1.6/tests/test_comments.cc0000644000175000017500000000041711672675567016274 00000000000000// some tests for comments /* first /* second */ int i; */ int i; /* It is the same for Java and C++ */ /* These are some comments with come nesting e.g. /* and let's see if it works! */ // since their // behaviour is /* almost the same */ /* < & > // */ source-highlight-3.1.6/tests/wrong_namedgroups.lang0000644000175000017500000000021211672675567017475 00000000000000# contains an error since number of marked subexpressions and # number of elements don't match (keyboard,symbol) = `(foo)(bar)(another)` source-highlight-3.1.6/tests/test.conf.html0000644000175000017500000002062311672675566015672 00000000000000
# test file for some configuration files, such as
# xorg, qmake.conf and generic conf files (based on properties)

# xorg.conf (xorg X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#

Section "Files"
EndSection

Section "InputDevice"
	Identifier	"Synaptics Touchpad"
	Driver		"synaptics"
	Option		"SendCoreEvents"	"true"
	Option		"Device"		"/dev/psaux"
	Option		"Protocol"		"auto-dev"
	Option 		"SHMConfig" 		"on"
	Option		"HorizEdgeScroll"	"0"
        Option          "MinSpeed" "0.5"    # touchpad speed when moving slowly
        Option          "MaxSpeed" "2.0"    # touchpad speed when moving fast
        Option          "AccelFactor" "0.10"
        Option          "CircularScrolling" "on"
        Option          "EdgeMotionMinSpeed" "0.5"
EndSection

#
# qmake configuration for win32-g++
#
# Written for MinGW
#

MAKEFILE_GENERATOR      = MINGW
TEMPLATE                = app
CONFIG                  += qt warn_on release link_prl copy_dir_files debug_and_release debug_and_release_target precompile_header

QMAKE_INCDIR            =
QMAKE_INCDIR_QT         = $$[QT_INSTALL_HEADERS]
QMAKE_LIBDIR_QT         = $$[QT_INSTALL_LIBS]

QMAKE_RUN_CC            = $(CC) -c $(CFLAGS) $(INCPATH) -o $obj $src
QMAKE_RUN_CC_IMP        = $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $<


# settings for source-highlight

datadir = "/home/bettini/usr/local/share/source-highlight"

# other conf file
[PlaylistColumnsLayout]
ColumnNames=Filename,Title,Artist,AlbumArtist,Composer,Year,Album,DiscNumber,Track,BPM,Genre,Comment,Directory,Type,Length,Bitrate,SampleRate,Score,Rating,PlayCount,LastPlayed,Mood,Filesize
ColumnOrder=0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22
ColumnWidths=0,184,92,0,0,100,92,0,0,0,0,0,73,0,80,0,0,0,0,0,0,0,0
ColumnsVersion=1
SortAscending=true
SortColumn=200
source-highlight-3.1.6/tests/test.lhs0000644000175000017500000000057311672675566014572 00000000000000This is a test of Haskel literate programming; Bird style > fact :: Integer -> Integer > fact 0 = 1 > fact n = n * fact (n-1) while this is not considered code fact :: Integer -> Integer This is the Latex style \begin{code} tsort [] = [] tsort (x:xs) = tsort [y | y<-xs, y>x] ++ [x] ++ tsort [y | y<-xs, y<=x] \end{code} and the code will be formatted as you requested. source-highlight-3.1.6/tests/wrong_namedgroups_subexps.lang0000644000175000017500000000016611672675567021256 00000000000000# contains an error since number there are non marked subexpressions (keyboard,symbol,type) = `(foo)(bar) (another)` source-highlight-3.1.6/tests/error.log.html0000644000175000017500000007375011672675565015710 00000000000000
[Wed May 19 23:50:20 2004] [notice] Digest: generating secret for digest authentication ...
[Wed May 19 23:50:20 2004] [notice] Digest: done
[Wed May 19 23:50:21 2004] [notice] Apache/2.0.49 (Gentoo/Linux) configured -- resuming normal operations
[Wed May 19 23:50:35 2004] [error] [client 127.0.0.1] client denied by server configuration: /var/www/localhost/validator
[Wed May 19 23:51:44 2004] [notice] caught SIGTERM, shutting down
[Wed May 19 23:51:46 2004] [notice] Digest: generating secret for digest authentication ...
[Wed May 19 23:51:46 2004] [notice] Digest: done
[Wed May 19 23:51:47 2004] [notice] Apache/2.0.49 (Gentoo/Linux) configured -- resuming normal operations
[Wed May 19 23:53:35 2004] [notice] caught SIGTERM, shutting down
[Wed May 19 23:53:37 2004] [notice] Digest: generating secret for digest authentication ...
[Wed May 19 23:53:37 2004] [notice] Digest: done
[Wed May 19 23:53:38 2004] [notice] Apache/2.0.49 (Gentoo/Linux) configured -- resuming normal operations
[Wed May 19 23:56:07 2004] [notice] caught SIGTERM, shutting down
[Wed May 19 23:56:09 2004] [notice] Apache/2.0.49 (Gentoo/Linux) configured -- resuming normal operations
[Wed May 19 23:56:38 2004] [error] [client 127.0.0.1] [Wed May 19 23:56:38 2004] check: Can't locate Config/General.pm in @INC (@INC contains: /etc/perl /usr/lib/perl5/site_perl/5.8.2/i686-linux /usr/lib/perl5/site_perl/5.8.2 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.2/i686-linux /usr/lib/perl5/vendor_perl/5.8.2 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.2/i686-linux /usr/lib/perl5/5.8.2 /usr/local/lib/site_perl) at /var/www/localhost/validator/htdocs/check line 46., referer: http://localhost/validator/
[Wed May 19 23:56:38 2004] [error] [client 127.0.0.1] [Wed May 19 23:56:38 2004] check: BEGIN failed--compilation aborted at /var/www/localhost/validator/htdocs/check line 46., referer: http://localhost/validator/
[Wed May 19 23:57:13 2004] [error] [client 127.0.0.1] [Wed May 19 23:57:13 2004] check: Can't locate Net/IP.pm in @INC (@INC contains: /etc/perl /usr/lib/perl5/site_perl/5.8.2/i686-linux /usr/lib/perl5/site_perl/5.8.2 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.2/i686-linux /usr/lib/perl5/vendor_perl/5.8.2 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.2/i686-linux /usr/lib/perl5/5.8.2 /usr/local/lib/site_perl) at /var/www/localhost/validator/htdocs/check line 53., referer: http://localhost/validator/
[Wed May 19 23:57:13 2004] [error] [client 127.0.0.1] [Wed May 19 23:57:13 2004] check: BEGIN failed--compilation aborted at /var/www/localhost/validator/htdocs/check line 53., referer: http://localhost/validator/
[Wed May 19 23:58:03 2004] [error] [client 127.0.0.1] [Wed May 19 23:58:03 2004] check: Can't locate Set/IntSpan.pm in @INC (@INC contains: /etc/perl /usr/lib/perl5/site_perl/5.8.2/i686-linux /usr/lib/perl5/site_perl/5.8.2 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.2/i686-linux /usr/lib/perl5/vendor_perl/5.8.2 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.2/i686-linux /usr/lib/perl5/5.8.2 /usr/local/lib/site_perl) at /var/www/localhost/validator/htdocs/check line 54., referer: http://localhost/validator/
[Wed May 19 23:58:03 2004] [error] [client 127.0.0.1] [Wed May 19 23:58:03 2004] check: BEGIN failed--compilation aborted at /var/www/localhost/validator/htdocs/check line 54., referer: http://localhost/validator/
[Wed May 19 23:58:41 2004] [error] [client 127.0.0.1] [Wed May 19 23:58:41 2004] check: open(/etc/w3c/validator.conf) returned: No such file or directory, referer: http://localhost/validator/
[Wed May 19 23:58:41 2004] [error] [client 127.0.0.1] [Wed May 19 23:58:41 2004] check: (Did you forget to set $ENV{W3C_VALIDATOR_CFG}, referer: http://localhost/validator/
[Wed May 19 23:58:41 2004] [error] [client 127.0.0.1] [Wed May 19 23:58:41 2004] check:  or to copy validator.conf to /etc/w3c/validator.conf?), referer: http://localhost/validator/
[Wed May 19 23:58:41 2004] [error] [client 127.0.0.1] [Wed May 19 23:58:41 2004] check: BEGIN failed--compilation aborted at /var/www/localhost/validator/htdocs/check line 190., referer: http://localhost/validator/
[Thu May 20 00:03:37 2004] [error] [client 127.0.0.1] [Thu May 20 00:03:37 2004] check: Use of uninitialized value in substitution (s///) at /var/www/localhost/validator/htdocs/check line 2261., referer: http://localhost/validator/check?uri=http%3A%2F%2Flocalhost%2Fvalidator&charset=%28detect+automatically%29&doctype=Inline&outline=1&verbose=1
[Thu May 20 00:03:37 2004] [error] [client 127.0.0.1] [Thu May 20 00:03:37 2004] check: Use of uninitialized value in substitution (s///) at /var/www/localhost/validator/htdocs/check line 2262., referer: http://localhost/validator/check?uri=http%3A%2F%2Flocalhost%2Fvalidator&charset=%28detect+automatically%29&doctype=Inline&outline=1&verbose=1
[Thu May 20 00:03:37 2004] [error] [client 127.0.0.1] [Thu May 20 00:03:37 2004] check: Use of uninitialized value in substitution (s///) at /var/www/localhost/validator/htdocs/check line 2263., referer: http://localhost/validator/check?uri=http%3A%2F%2Flocalhost%2Fvalidator&charset=%28detect+automatically%29&doctype=Inline&outline=1&verbose=1
[Thu May 20 00:03:37 2004] [error] [client 127.0.0.1] [Thu May 20 00:03:37 2004] check: Use of uninitialized value in substitution (s///) at /var/www/localhost/validator/htdocs/check line 2264., referer: http://localhost/validator/check?uri=http%3A%2F%2Flocalhost%2Fvalidator&charset=%28detect+automatically%29&doctype=Inline&outline=1&verbose=1
[Thu May 20 00:03:37 2004] [error] [client 127.0.0.1] [Thu May 20 00:03:37 2004] check: Use of uninitialized value in pattern match (m//) at /var/www/localhost/validator/htdocs/check line 2265., referer: http://localhost/validator/check?uri=http%3A%2F%2Flocalhost%2Fvalidator&charset=%28detect+automatically%29&doctype=Inline&outline=1&verbose=1
[Thu May 20 00:03:37 2004] [error] [client 127.0.0.1] [Thu May 20 00:03:37 2004] check: Use of uninitialized value in pattern match (m//) at /var/www/localhost/validator/htdocs/check line 2267., referer: http://localhost/validator/check?uri=http%3A%2F%2Flocalhost%2Fvalidator&charset=%28detect+automatically%29&doctype=Inline&outline=1&verbose=1
[Thu May 20 00:04:07 2004] [notice] caught SIGTERM, shutting down
[Tue Jun 01 20:56:40 2004] [notice] Digest: generating secret for digest authentication ...
[Tue Jun 01 20:56:40 2004] [notice] Digest: done
[Tue Jun 01 20:56:41 2004] [notice] Apache/2.0.49 (Gentoo/Linux) mod_perl/1.99_11 Perl/v5.8.2 configured -- resuming normal operations
[Tue Jun 01 20:57:43 2004] [error] [client 127.0.0.1] File does not exist: /var/www/localhost/htdocs/manual, referer: http://localhost/
[Sat Jun 19 17:22:46 2004] [notice] Apache/2.0.49 (Gentoo/Linux) mod_perl/1.99_11 Perl/v5.8.2 PHP/4.3.6 configured -- resuming normal operations
[Sat Jun 19 17:23:21 2004] [error] [client 1.1.1.1] File does not exist: /var/www/localhost/htdocs/favicon.ico
[Sat Jun 19 17:25:55 2004] [error] [client 1.1.1.1] client denied by server configuration: /var/www/localhost/WebSVN/index.php, referer: http://localhost/svn/
[Sat Jun 19 17:25:55 2004] [error] [client 1.1.1.1] Negotiation: discovered file(s) matching request: /var/www/localhost/WebSVN/index (None could be negotiated)., referer: http://localhost/svn/
[Sat Jun 19 17:26:15 2004] [error] [client 1.1.1.1] client denied by server configuration: /var/www/localhost/WebSVN/index.php, referer: http://localhost/svn/
[Sat Jun 19 17:26:15 2004] [error] [client 1.1.1.1] Negotiation: discovered file(s) matching request: /var/www/localhost/WebSVN/index (None could be negotiated)., referer: http://localhost/svn/
[Sat Jun 19 17:26:36 2004] [error] [client 1.1.1.1] client denied by server configuration: /var/www/localhost/WebSVN/index.php, referer: http://localhost/svn/
[Sat Jun 19 17:26:36 2004] [error] [client 1.1.1.1] Negotiation: discovered file(s) matching request: /var/www/localhost/WebSVN/index (None could be negotiated)., referer: http://localhost/svn/
[Sat Jun 19 17:41:11 2004] [error] [client 1.1.1.1] File does not exist: /var/www/localhost/htdocs/~jan
[Sat Jun 19 17:41:50 2004] [notice] caught SIGTERM, shutting down
[Sat Jun 19 17:41:53 2004] [notice] Apache/2.0.49 (Gentoo/Linux) mod_perl/1.99_11 Perl/v5.8.2 PHP/4.3.6 configured -- resuming normal operations
[Sat Jun 19 17:42:43 2004] [error] [client 1.1.1.1] (13)Permission denied: access to /~jan/WebSVN denied
[Sat Jun 19 17:43:22 2004] [error] [client 1.1.1.1] (13)Permission denied: access to /~jan/ denied
[Sat Jun 19 18:22:56 2004] [notice] caught SIGTERM, shutting down
[Sat Jun 19 18:22:58 2004] [notice] Apache/2.0.49 (Gentoo/Linux) mod_perl/1.99_11 Perl/v5.8.2 PHP/4.3.6 configured -- resuming normal operations
[Sat Jun 19 18:23:08 2004] [error] [client 1.1.1.1] (13)Permission denied: access to /~jan/ denied
[Sat Jun 19 18:23:11 2004] [error] [client 1.1.1.1] (13)Permission denied: access to /~jan/ denied
[Sat Jun 19 18:29:35 2004] [notice] caught SIGTERM, shutting down
[Sat Jun 19 18:29:37 2004] [notice] Apache/2.0.49 (Gentoo/Linux) mod_perl/1.99_11 Perl/v5.8.2 PHP/4.3.6 configured -- resuming normal operations
[Sat Jun 19 18:29:59 2004] [error] [client 1.1.1.1] (13)Permission denied: access to /~jan/ denied
[Sat Jun 19 18:30:08 2004] [error] [client 1.1.1.1] (13)Permission denied: access to /~jan/index.html denied
[Sat Jun 19 18:39:32 2004] [notice] caught SIGTERM, shutting down
[Sat Jun 19 18:39:34 2004] [notice] Apache/2.0.49 (Gentoo/Linux) mod_perl/1.99_11 Perl/v5.8.2 PHP/4.3.6 configured -- resuming normal operations
[Sat Jun 19 18:39:39 2004] [error] [client 1.1.1.1] (13)Permission denied: access to /~jan/index.html denied
[Sat Jun 19 18:39:43 2004] [error] [client 1.1.1.1] (13)Permission denied: access to /~jan/index.html denied
[Sat Jun 19 18:43:44 2004] [notice] caught SIGTERM, shutting down
[Sat Jun 19 18:43:46 2004] [notice] Apache/2.0.49 (Gentoo/Linux) mod_perl/1.99_11 Perl/v5.8.2 PHP/4.3.6 configured -- resuming normal operations

[Sat Jun 19 18:56:49 2004] [error] [client 1.1.1.1] File does not exist: /var/www/localhost/htdocs/favicon.ico
[Sat Jun 19 19:04:32 2004] [notice] caught SIGTERM, shutting down
[Sat Jun 19 19:04:34 2004] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec2)
[Sat Jun 19 19:04:35 2004] [notice] Apache/2.0.49 (Gentoo/Linux) mod_perl/1.99_11 Perl/v5.8.2 PHP/4.3.6 configured -- resuming normal operations
[Sat Jun 19 23:30:02 2004] [notice] caught SIGTERM, shutting down
[Wed Jun 23 19:43:32 2004] [notice] Apache/2.0.49 (Gentoo/Linux) mod_perl/1.99_11 Perl/v5.8.2 PHP/4.3.6 configured -- resuming normal operations
[Wed Jun 23 23:06:06 2004] [notice] caught SIGTERM, shutting down
[Sat Jun 26 21:05:26 2004] [notice] Apache/2.0.49 (Gentoo/Linux) mod_perl/1.99_11 Perl/v5.8.2 PHP/4.3.6 configured -- resuming normal operations
[Sat Jun 26 21:05:41 2004] [error] [client 1.1.1.1] File does not exist: /var/www/localhost/htdocs/WebSVN
[Sun Jun 27 00:32:47 2004] [notice] caught SIGTERM, shutting down
[Wed Jun 30 22:03:31 2004] [notice] Apache/2.0.49 (Gentoo/Linux) mod_perl/1.99_11 Perl/v5.8.2 PHP/4.3.6 configured -- resuming normal operations
[Wed Jun 30 22:16:44 2004] [error] [client 1.1.1.1] File does not exist: /var/www/localhost/htdocs/trac, referer: http://localhost/cgi-bin/trac.cgi
[Wed Jun 30 22:32:22 2004] [notice] caught SIGTERM, shutting down
[Wed Jun 30 22:32:26 2004] [notice] Apache/2.0.49 (Gentoo/Linux) mod_perl/1.99_11 Perl/v5.8.2 PHP/4.3.6 configured -- resuming normal operations
[Wed Jun 30 22:32:39 2004] [error] [client 1.1.1.1] client denied by server configuration: /usr/share/webapps/trac/0.7.1/htdocs/css/trac.css, referer: http://localhost/cgi-bin/trac.cgi
[Wed Jun 30 22:32:40 2004] [error] [client 1.1.1.1] client denied by server configuration: /usr/share/webapps/trac/0.7.1/htdocs/css/code.css, referer: http://localhost/cgi-bin/trac.cgi
[Wed Jun 30 22:32:40 2004] [error] [client 1.1.1.1] client denied by server configuration: /usr/share/webapps/trac/0.7.1/htdocs/css/changeset.css, referer: http://localhost/cgi-bin/trac.cgi
[Wed Jun 30 22:32:40 2004] [error] [client 1.1.1.1] client denied by server configuration: /usr/share/webapps/trac/0.7.1/htdocs/trac.js, referer: http://localhost/cgi-bin/trac.cgi
[Wed Jun 30 22:32:40 2004] [error] [client 1.1.1.1] client denied by server configuration: /usr/share/webapps/trac/0.7.1/htdocs/trac_banner.png, referer: http://localhost/cgi-bin/trac.cgi
[Wed Jun 30 22:32:40 2004] [error] [client 1.1.1.1] client denied by server configuration: /usr/share/webapps/trac/0.7.1/htdocs/trac_logo_mini.png, referer: http://localhost/cgi-bin/trac.cgi
[Wed Jun 30 22:32:45 2004] [error] [client 1.1.1.1] client denied by server configuration: /usr/share/webapps/trac/0.7.1/htdocs/css/trac.css, referer: http://localhost/cgi-bin/trac.cgi/wiki/TracAdmin
[Wed Jun 30 22:32:45 2004] [error] [client 1.1.1.1] client denied by server configuration: /usr/share/webapps/trac/0.7.1/htdocs/css/code.css, referer: http://localhost/cgi-bin/trac.cgi/wiki/TracAdmin
[Wed Jun 30 22:32:45 2004] [error] [client 1.1.1.1] client denied by server configuration: /usr/share/webapps/trac/0.7.1/htdocs/css/changeset.css, referer: http://localhost/cgi-bin/trac.cgi/wiki/TracAdmin
[Wed Jun 30 22:32:45 2004] [error] [client 1.1.1.1] client denied by server configuration: /usr/share/webapps/trac/0.7.1/htdocs/trac.js, referer: http://localhost/cgi-bin/trac.cgi/wiki/TracAdmin
[Wed Jun 30 22:32:45 2004] [error] [client 1.1.1.1] client denied by server configuration: /usr/share/webapps/trac/0.7.1/htdocs/trac_banner.png, referer: http://localhost/cgi-bin/trac.cgi/wiki/TracAdmin
[Wed Jun 30 22:32:45 2004] [error] [client 1.1.1.1] client denied by server configuration: /usr/share/webapps/trac/0.7.1/htdocs/trac_logo_mini.png, referer: http://localhost/cgi-bin/trac.cgi/wiki/TracAdmin
[Wed Jun 30 22:33:22 2004] [error] [client 1.1.1.1] client denied by server configuration: /usr/share/webapps/trac/0.7.1/htdocs/css/trac.css
[Wed Jun 30 22:34:11 2004] [notice] caught SIGTERM, shutting down
[Wed Jun 30 22:34:16 2004] [notice] Apache/2.0.49 (Gentoo/Linux) mod_perl/1.99_11 Perl/v5.8.2 PHP/4.3.6 configured -- resuming normal operations
[Thu Jul 01 00:05:11 2004] [notice] caught SIGTERM, shutting down
[Thu Jul 01 00:08:05 2004] [notice] Apache/2.0.49 (Gentoo/Linux) mod_perl/1.99_11 Perl/v5.8.2 PHP/4.3.6 configured -- resuming normal operations
[Thu Jul 01 00:20:20 2004] [notice] caught SIGTERM, shutting down
source-highlight-3.1.6/tests/test.pm0000644000175000017500000001607711672675566014426 00000000000000# Here an extract of package MIME::Lite::HTML package MIME::Lite::HTML; # module MIME::Lite::HTML : Provide routine to transform a HTML page in # a MIME::Lite mail # Copyright 2001 A.Barbet alian@alianwebserver.com. All rights reserved. # Revision 1.1 2002/02/07 15:58:35 bettini # added scanner for perl # # Revision 1.12 2002/01/07 20:18:53 alian # - Add replace links for frame & iframe # - Correct incorrect parsing in include_css for # tag. Tks to doggy@miniasp.com for idea and patch # # Revision 1.11 2001/12/13 22:42:33 alian # - Correct a bug with relative anchor # # Revision 1.10 2001/11/07 10:52:43 alian # - Add feature for get restricted url. Add LoginDetails parameter for that # (tks to Leon.Halford@ing-barings.com for idea) # - Change error in POD doc rfc2257 => rfc2557 (tks to # justin.zaglio@morganstanley.com) # - Correct warning when $url_html is undef use LWP::UserAgent; use HTML::LinkExtor; use URI::URL; use MIME::Lite; use strict; use vars qw($VERSION @ISA @EXPORT @EXPORT_OK); require Exporter; @ISA = qw(Exporter); @EXPORT = qw(); my $LOGINDETAILS; #------------------------------------------------------------------------------ # redefine get_basic_credentials #------------------------------------------------------------------------------ { package RequestAgent; use vars qw(@ISA); @ISA = qw(LWP::UserAgent); sub new { my $self = LWP::UserAgent::new(@_); $self; } sub get_basic_credentials { my($self, $realm, $uri) = @_; # Use parameter of MIME-Lite-HTML, key LoginDetails if (defined $LOGINDETAILS) { return split(':', $LOGINDETAILS, 2); } # Ask user on STDIN elsif (-t) { my $netloc = $uri->host_port; print "Enter username for $realm at $netloc: "; my $user = ; chomp($user); # 403 if no user given return (undef, undef) unless length $user; print "Password: "; system("stty -echo"); my $password = ; system("stty echo"); print "\n"; # because we disabled echo chomp($password); return ($user, $password); } # Damm we got 403 with CGI (use param LoginDetails) ... else { return (undef, undef) } } } #------------------------------------------------------------------------------ # new #------------------------------------------------------------------------------ sub new { my $class = shift; my $self = {}; bless $self, $class; my %param = @_; # Agent name $self->{_AGENT} = new RequestAgent; $self->{_AGENT}->agent("MIME-Lite-HTML $VERSION"); $self->{_AGENT}->from('mime-lite-html@alianwebserver.com' ); # Set debug level if ($param{'Debug'}) { $self->{_DEBUG} = 1; delete $param{'Debug'}; } # Set Login information if ($param{'LoginDetails'}) { $LOGINDETAILS = $param{'LoginDetails'}; delete $param{'LoginDetails'}; } # Set type of include to do if ($param{'IncludeType'}) { die "IncludeType must be in 'extern', 'cid' or 'location'\n" if ( ($param{'IncludeType'} ne 'extern') and ($param{'IncludeType'} ne 'cid') and ($param{'IncludeType'} ne 'location')); $self->{_include} = $param{'IncludeType'}; delete $param{'IncludeType'}; } # Defaut type: use a Content-Location field else {$self->{_include}='location';} ## Added by Michalis@linuxmail.org to manipulate non-us mails if ($param{'TextCharset'}) { $self->{_textcharset}=$param{'TextCharset'}; delete $param{'TextCharset'}; } else { $self->{_textcharset}='iso-8859-1'; } if ($param{'HTMLCharset'}) { $self->{_htmlcharset}=$param{'HTMLCharset'}; delete $param{'HTMLCharset'}; } else { $self->{_htmlcharset}='iso-8859-1'; } if ($param{'TextEncoding'}) { $self->{_textencoding}=$param{'TextEncoding'}; delete $param{'TextEncoding'}; } else { $self->{_textencoding}='7bit'; } if ($param{'HTMLEncoding'}) { $self->{_htmlencoding}=$param{'HTMLEncoding'}; delete $param{'HTMLEncoding'}; } else { $self->{_htmlencoding}='quoted-printable'; } ## End. Default values remain as they were initially set. ## No need to change existing scripts if you send US-ASCII. ## If you DON't send us-ascii, you wouldn't be able to use ## MIME::Lite::HTML anyway :-) # Set proxy to use to get file if ($param{'Proxy'}) { $self->{_AGENT}->proxy('http',$param{'Proxy'}) ; print "Set proxy for http : ", $param{'Proxy'},"\n" if ($self->{_DEBUG}); delete $param{'Proxy'}; } # Set hash to use with template if ($param{'HashTemplate'}) { $param{'HashTemplate'} = ref($param{'HashTemplate'}) eq "HASH" ? $param{'HashTemplate'} : %{$param{'HashTemplate'}}; $self->{_HASH_TEMPLATE}= $param{'HashTemplate'}; delete $param{'HashTemplate'}; } $self->{_param} = \%param; # Ok I hope I known what I do ;-) MIME::Lite->quiet(1); return $self; } #------------------------------------------------------------------------------ # POD Documentation #------------------------------------------------------------------------------ =head1 NAME MIME::Lite::HTML - Provide routine to transform a HTML page in a MIME-Lite mail =head1 SYNOPSIS #!/usr/bin/perl -w # A cgi program that do "Mail this page to a friend"; # Call this script like this : # script.cgi?email=myfriend@isp.com&url=http://www.go.com use strict; use CGI qw/:standard/; use CGI::Carp qw/fatalsToBrowser/; use MIME::Lite::HTML; my $mailHTML = new MIME::Lite::HTML From => 'MIME-Lite@alianwebserver.com', To => param('email'), Subject => 'Your url: '.param('url'); my $MIMEmail = $mailHTML->parse(param('url')); $MIMEmail->send; # or for win user : $mail->send_by_smtp('smtp.fai.com'); print header,"Mail envoye (", param('url'), " to ", param('email'),")
\n"; =head1 DESCRIPTION This module is a Perl mail client interface for sending message that support HTML format and build them for you.. This module provide routine to transform a HTML page in MIME::Lite mail. So you need this module to use MIME-Lite-HTML possibilities =head2 What's happen ? The job done is: =over =item * Get the file (LWP) if needed =item * Parse page to find include images (gif, jpg, flash) =item * Attach them to mail with adequat header if asked (default) =item * Include external CSS,Javascript file =item * Replace relative url with absolute one =item * Build the final MIME-Lite object with each part found =back =cut ## the next one is just to see if =cut is recognized sub foo { my $class = shift; my $self = {}; bless $self, $class; $content =~ s/^.*content:.*?\"//i; } $theline =~ s/(<=|=>|=|\-|\+|\*|\/|\*\*|;|:|\\|\'|\"|,|\.|\(|\)|\[|\]|\{|\}|<|>)/\$1\<\/span>/g; $theline =~ s/(<=|=>|=|\-|\+|\*|\/|\*\*|;|:|\\|\'|\"|,|\.|\(|\)|\[|\]|\{|\}|<|>)/g; if($#ARGV==2){} $someString =~ m/anything/gix ; $someString =~ /anything/ ; if($someString =~ /anything/g ){} if( /anything/ ){} if($somestring =~ s/something/something else/gi ){} $somestring =~ /something/something else/ ; $somestring =~ qr/something/something else/ ; source-highlight-3.1.6/tests/test_vardecl.java0000644000175000017500000000035111672675567016420 00000000000000Integer i = 10; Boolean b; String args[]; final MyType args[]; final My_Type args[]; List mylist; List > mylist; java.io.InputStream iStream ; if (argc > 0) { } Boolean 0; _myClass c; __myClass c; __my_Class c;source-highlight-3.1.6/tests/test.java.fodt0000664000175000017500000005461411672675566015667 00000000000000 1: /* 2: ThisisaclassicalHelloprogram 3: totestsource-highlightwithJavaprograms. 4: 5: tohaveanhtmltranslationtype 6: 7: source-highlight-sjava-fhtml--inputHello.java--outputHello.html 8: source-highlight-sjava-fhtml<Hello.java>Hello.html 9: 10: ortypesource-highlight--helpforthelistofoptions11: 12: writtenby13: LorenzoBettini14: http://www.lorenzobettini.it15: http://www.gnu.org/software/src-highlite16: */17: 18: packagehello;19: 20: importjava.io.*;21: 22: /**23: *<p>24: *AsimpleHelloWorldclass,usedtodemonstratesome25: *featuresofJavasourcehighlighting.26: *</p>27: *TODO:nothing,justtoshowanhighlightedTODOorFIXME28: *29: *@authorLorenzoBettini30: *@version2.031: *////class32: publicclassHello{33: intfoo=1998;34: inthex_foo=0xCAFEBABE;35: booleanb=false;36: Integeri=null;37: charc='\'',d='n',e='\\';38: Stringxml="<tagattr=\"value\">&auml;</tag>",foo2="\\";39: 40: /*mymethod*/41: publicvoidmymethod(inti){42: //justafoomethod43: }44: /*mymethod*/45: 46: /*main*/47: publicstaticvoidmain(Stringargs[]){48: //justsomegreetings;-)/*49: System.out.println("Hellofromjava2html:-)");50: System.out.println("\tbyLorenzoBettini");51: System.out.println("\thttp://www.lorenzobettini.it");52: if(argc>0)53: Stringparam=argc[0];54: //System.out.println("byebye...:-D");//seeyousoon55: }56: /*main*/57: }58: ///class59: 60: //endoffiletest.javasource-highlight-3.1.6/tests/wrong_dircolor.err0000644000175000017500000000004511672675567016641 00000000000000wrong_dircolor.style:2: syntax error source-highlight-3.1.6/tests/test.txt.html0000644000175000017500000000115311672675567015562 00000000000000
This is a simple text file;
so basically it doesn't need any special highlighting.

However it is useful to test the default.lang:
this will be basically formatted in the output format,
by replacing special chars of the output format.

For instance, for html: we have &, < and >.

This somehow shows how source-highlight can be used also as
a simple formatter, without highlighting, e.g., to transform
a text file into an HTML file or Tex file, and so on...
source-highlight-3.1.6/tests/test.errors.html0000644000175000017500000000321011672675566016252 00000000000000
no need to highlight this
c:\f\g\Makefile:1346:10: warning: overriding commands for target `styleformatter.h.texinfo' foo
/f/g/Makefile:1346:10: warning: overriding commands for target `styleformatter.h.texinfo' foo
/foo/bar/Makefile:1337: error: ignoring old commands for target 'styleformatter.h.texinfo' bar
\foo\bar\Makefile:1346: warning: overriding commands for target `styleformatter.h.texinfo'
Makefile:1337: warning: ignoring old commands for target `styleformatter.h.texinfo'
source-highlight-3.1.6/tests/test.backref0000644000175000017500000000023211672675566015371 00000000000000[12[ foo ]]a symbol inside ]]1a2 [[ foo ]]a symbol inside ]]1a2 [1[ foo ]]a [1[ symbol inside ]]1a2 ]]1a2 [2[ foo ]]a [1[ symbol inside ]]1a2 ]]a2 symbol source-highlight-3.1.6/tests/test_linerange1.html0000644000175000017500000000344211672675567017054 00000000000000
00012:   written by
00013:   Lorenzo Bettini
00014:   http://www.lorenzobettini.it
00015:   http://www.gnu.org/software/src-highlite
00016: */
00017: 
00018: package hello;
00029:  * @author Lorenzo Bettini
00030:  * @version 2.0
00031:  */ /// class
00032: public class Hello {
00033:     int foo = 1998 ;
00034:     int hex_foo = 0xCAFEBABE;
source-highlight-3.1.6/tests/test_state.ngroups0000644000175000017500000000050011672675567016670 00000000000000This should highlight some Hello World strings, like Hello World!! end of line or Hello world a comment and then end of line or Ciao Mondo? But not this one: hello World! and this highlight is not highlighted 'cos we're still inside the state that's not closed by an "end of line" while this highlight will be let's see.source-highlight-3.1.6/tests/test.ldap.html0000644000175000017500000000274011672675566015665 00000000000000
# comment line

dn: cn=Foo Bar,mail=foo@bar.com
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
objectclass: mozillaAbPersonAlpha
givenName: Foo
sn: Bar
cn: Foo Bar
mozillaNickname: albe
mail: foo@bar.com
modifytimestamp: 0Z
my_odifytimestamp: 0Z
source-highlight-3.1.6/tests/test_c.c0000644000175000017500000000034511672675567014526 00000000000000/* this is a test for a C program where we use C++ keywords as var names of course, these must not be highlighted as keywords */ int this = 0; char *class = "foo"; struct private { }; begin: goto end; end: goto begin; source-highlight-3.1.6/tests/test.tex0000644000175000017500000000330111672675566014574 00000000000000% this is just to test latex highlighting % it will not compile with latex though :-) \runningheads{L.~Bettini, S.~Capecchi and B.~Venneri} {Double Dispatch in \CC} This is an higlighted \command. \lstdefinelanguage{xklaim}% {morekeywords={if,else,then,endif,while,do,enddo,begin,end,rec,ref,declare,% int,str,loc,process,bool,locname,ts,var,within,in,out,read,eval,newloc,% go,true,false,not,and,or,nil,add,rm,newc,extern,% inp,readp,forall,const,nodes,endnodes,on,print,logloc,phyloc,% login,logout,accept,disconnected,accept,subscribe,unsubscribe,% dirconnect,acceptconn,% register,unregister,nodecoord,port,start,cons,% return,new,object,class,mixin,def,redef,expect,next,this,red,exp,type},% keywords=[2]{self},% keywordstyle=[2]\ttfamily,% alsoother=@,% morecomment=[l]\#,% sensitive=f,% morestring=[b]"% }[keywords,strings] \frame{ \frametitle{Tuples and Pattern Matching} \begin{itemize} \item Tuples and Templates \[ ("foo", 10+5, !x) \] \begin{itemize} \item Formal Fields \item Actual Fields \end{itemize} \item Pattern Matching: \begin{itemize} \item Formal fields match any field of the same type \item Actual fields match if identical \end{itemize} \end{itemize} \vspace{0.4cm} \begin{block}{} \begin{center} $("foo", 10+5, true)$ \alert{matches} $(!s, 15, !b)$ \end{center} \end{block} } This is mathematic with \$\$: $$ i = j $$ the same but with \[ \]: \[ i = j \] `Private, Protected and Virtual Methods'). This line's body shouldn't have the highlighted '. These \`e \'e \"e are accents and not a string L.~Bettini \paragraph*{Typing rule for multi method invocation.} source-highlight-3.1.6/tests/changelog.css0000644000175000017500000000060711672675565015541 00000000000000body { color: black; background-color: white; font-family: monospace } .comment { color: gray; font-style: italic; } .date { color: maroon; font-weight: bold; } .time { color: maroon; font-weight: bold; } .url { color: green } .name { color: teal; } .symbol { color: orange; } .file { color: blue; text-decoration: underline; } source-highlight-3.1.6/tests/test.desktop0000644000175000017500000000211311672675566015445 00000000000000[BrowserBar] Width=295 # a comment [Filebrowser] Dir History= Location=file://$HOME/ Separate Directories=false Show Preview=false Show hidden files=false Sort by=Name Sort case insensitively=true Sort directories first=true Sort reversed=false View Style=Simple [General] HiddenOnExit=false Timeout=20 [PlaylistColumnsLayout] ColumnNames=Filename,Title,Artist,AlbumArtist,Composer,Year,Album,DiscNumber,Track,BPM,Genre,Comment,Directory,Type,Length,Bitrate,SampleRate,Score,Rating,PlayCount,LastPlayed,Mood,Filesize ColumnOrder=0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22 ColumnWidths=0,184,92,0,0,100,92,0,0,0,0,0,73,0,80,0,0,0,0,0,0,0,0 ColumnsVersion=1 SortAscending=true SortColumn=200 [Desktop Entry] Encoding=UTF-8 Name=prova Exec=prova %i %m -caption "%c" Icon=prova Type=Application DocPath=prova/prova.html Comment=A KDE KPart Application Comment[fr]=Une application KPart pour KDE. Comment[pt_BR]=Um Aplicativo KPart do KDE Comment[it]=Applicazione KPart di KDE [Desktop Entry] Comment[fr]=Une application KPart pour KDE. Comment[pt_BR] = Um Aplicativo KPart do KDE source-highlight-3.1.6/tests/test.hx0000644000175000017500000000212511672675566014416 00000000000000/* * test for haxe */ import Math; class ShuffleBag{ var data:Array; var cursor:Int; //c'tor public function new(){ data=[]; cursor=-1; //pointless preprocessor tests :) #if neko //nya :3 trace("neko"); #else flash9//no space trace("flash9"); #end //foo #if flash8 trace("flash8"); #end//no space } //add one or several item(s) public function add(item:Int,?quantity:Int){ if(quantity==null){ data.push(item); }else{ for(i in 0...quantity) data.push(item); } cursor=data.length-1; } //returns the next item in the bag public function next(){ if(cursor<1){ cursor=data.length-1; return data[0]; } var grab:Int=Math.floor(Math.random()*(cursor+1)); var temp:Int=data[grab]; data[grab]=data[cursor]; data[cursor]=temp; cursor--; return temp; } }source-highlight-3.1.6/tests/test_python_lines.html0000644000175000017500000001230111672675567017534 00000000000000
01: #! /usr/bin/python
02: 
03: import posix
04: from string import splitfields
05: 
06: def userinfo(filename):
07:   """
08:   This function returns the list of users
09:   and a table containing users and their passwords
10:   """
11:   users, table = [], {}
12:   file = open(filename, 'r')
13:   for line in file.readlines():
14:     [name, password] = splitfields(line, ':')[:2]
15:     users.append(name)
16:     table[name] = password
17:   return users, table
18: 
19: def main():
20:   for filename in ('/etc/passwd', 'etc/passwd.bak'):
21:     try:
22:       users, table = userinfo(filename)
23:       print table.keys()[3:7], table['postgres']
24:       posix.system('ls -al ' + filename)
25:     except:
26:       print 'File "' + filename + '" not found!'
27: 
28: main()
29: 
30: q.execute('''
31:     select * from
32:         foo,bar,baz
33:     where
34:         foo.blah=bar.blah
35:         and baz.spam="eggs"
36:     ''')
37: 
source-highlight-3.1.6/tests/test.makefile0000644000175000017500000000424311672675566015557 00000000000000# a comment ## another comment ###### another comment ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique a##b foo.o foo.z: foo.c LDADD = @LEXLIB@ $(top_builddir)/gl/libgnu.la $(source_highlightdata_DATA) LANGFILES = \ bison.lang cpp.lang javascript.lang perl.lang ruby.lang \ c_comment.lang flex.lang log.lang php.lang sml.lang \ caml.lang function.lang lua.lang prolog.lang symbols.lang \ changelog.lang java.lang number.lang python.lang url.lang \ pascal.lang fortran.lang html.lang latex.lang logtalk.lang \ diff.lang c_string.lang langdef.lang outlang.lang style.lang \ extreme_comment.lang extreme_comment2.lang extreme_comment3.lang \ postscript.lang csharp.lang xml.lang sh.lang script_comment.lang \ tcl.lang sql.lang bib.lang makefile.lang \ default.lang nohilite.lang OUTLANGFILES = \ css_common.outlang \ esc.outlang \ html_common.outlang \ html_notfixed.outlang \ htmlcss.outlang \ htmldoc.outlang \ html.outlang \ latexdoc.outlang \ latex.outlang \ latexcolordoc.outlang \ latexcolor.outlang \ xhtml_common.outlang \ xhtmlcss.outlang \ xhtmldoc.outlang \ xhtml.outlang \ texinfo.outlang \ javadoc.outlang \ docbook.outlang STYLEFILES = texinfo.style esc.style source_highlightdata_DATA = \ $(LANGFILES) $(OUTLANGFILES) \ $(STYLEFILES) \ default.style style2.style style3.style \ lang.map outlang.map # files that are built before distribution gets built #MAINTAINERCLEANFILES = $(BUILT_SOURCES) check: for langfile in $(LANGFILES); do \ $(SRCHILITE) --data-dir=$(srcdir) --check-lang $(srcdir)/$$langfile ; \ done && \ for outlangfile in $(OUTLANGFILES); do \ $(SRCHILITE) --data-dir=$(srcdir) --check-outlang $(srcdir)/$$outlangfile ; \ done tags: ctags --c-types='defgmstuv' --recurse=yes $(srcdir)/* .PHONY: tags noinst_HEADERS = regexpengine.h regexpstate.h asserttest.h regexpenginedebug.h source-highlight-3.1.6/tests/wrong_include.err0000644000175000017500000000002111672675567016441 00000000000000nonexistent.lang source-highlight-3.1.6/tests/syslog.style0000644000175000017500000000044111672675566015477 00000000000000date, keyword yellow b ; time "#9999FF" ; ip "lightblue" b ; type cyan b ; string "brown" b ; comment teal ; number red ; preproc cyan ; symbol green ; function "#CC66CC" b ; cbracket green b ; twonumbers green b ; port green b ; webmethod teal ; // foo option foo red b ; // foo entry source-highlight-3.1.6/tests/test.lsm.html0000644000175000017500000000227711672675566015545 00000000000000
Begin3
Title:          sourcehighlightide -- Some description
Version:        0.1
Entered-date:   
Description:    
Keywords:       KDE Qt
Author:         Lorenzo Bettini <http://www.lorenzobettini.it>
Maintained-by:  Lorenzo Bettini <http://www.lorenzobettini.it>
Home-page:      
Alternate-site: 
Primary-site:   ftp://ftp.kde.org/pub/kde/unstable/apps/utils
                xxxxxx  sourcehighlightide-0.1.tar.gz
                xxx     sourcehighlightide-0.1.lsm
Platform:       Linux. Needs KDE
Copying-policy: GPL
End
source-highlight-3.1.6/tests/erasedir3.sed0000644000175000017500000000002511672675565015450 00000000000000s/[^\ ]*\/test/test/gsource-highlight-3.1.6/tests/test_xhtml_css.html0000644000175000017500000002014311672675567017030 00000000000000
/*
  This is a classical Hello program
  to test source-highlight with Java programs.
  
  to have an html translation type

	source-highlight -s java -f html --input Hello.java --output Hello.html
	source-highlight -s java -f html < Hello.java > Hello.html

  or type source-highlight --help for the list of options

  written by
  Lorenzo Bettini
  http://www.lorenzobettini.it
  http://www.gnu.org/software/src-highlite
*/

package hello;

import java.io.* ;

/**
 * <p>
 * A simple Hello World class, used to demonstrate some
 * features of Java source highlighting.
 * </p>
 * TODO: nothing, just to show an highlighted TODO or FIXME
 *
 * @author Lorenzo Bettini
 * @version 2.0
 */ /// class
public class Hello {
    int foo = 1998 ;
    int hex_foo = 0xCAFEBABE;
    boolean b = false;
    Integer i = null ;
    char c = '\'', d = 'n', e = '\\' ;
    String xml = "<tag attr=\"value\">&auml;</tag>", foo2 = "\\" ;

    /* mymethod */
    public void mymethod(int i) {
	// just a foo method
    }
    /* mymethod */
   
    /* main */
    public static void main( String args[] ) {
	// just some greetings ;-)  /*
	System.out.println( "Hello from java2html :-)" ) ;
	System.out.println( "\tby Lorenzo Bettini" ) ;
	System.out.println( "\thttp://www.lorenzobettini.it" ) ;
        if (argc > 0)
            String param = argc[0];
        //System.out.println( "bye bye... :-D" ) ; // see you soon
    }
    /* main */
}
/// class

// end of file test.java
source-highlight-3.1.6/tests/suppressions.supp0000644000175000017500000001012211672675566016560 00000000000000{ regex lib Memcheck:Leak fun:_Znwj fun:_ZNSt24__default_alloc_templateILb1ELi0EE14_S_chunk_allocEjRi fun:_ZNSt24__default_alloc_templateILb1ELi0EE9_S_refillEj fun:_ZNSt24__default_alloc_templateILb1ELi0EE8allocateEj } { regex Memcheck:Leak fun:_Znwj fun:_ZN104_GLOBAL__N__home_cavok_archive_debian_working_boost_boost_1.32.0_libs_regex_src_c_regex_traits.cppkxwU9a15re_init_collateEv fun:_ZN5boost14c_regex_traitsIcE4initEv obj:/usr/lib/libboost_regex-gcc-mt-1_32.so.1.32.0 } { regex 2 Memcheck:Leak fun:_Znwj fun:_ZN104_GLOBAL__N__home_cavok_archive_debian_working_boost_boost_1.32.0_libs_regex_src_c_regex_traits.cppkxwU9a15re_init_classesEv fun:_ZN5boost14c_regex_traitsIcE4initEv obj:/usr/lib/libboost_regex-gcc-mt-1_32.so.1.32.0 } { regex 3 Memcheck:Leak fun:_Znwj fun:_ZN104_GLOBAL__N__home_cavok_archive_debian_working_boost_boost_1.32.0_libs_regex_src_c_regex_traits.cppkxwU9a15re_message_initEv fun:_ZN5boost14c_regex_traitsIcE4initEv obj:/usr/lib/libboost_regex-gcc-mt-1_32.so.1.32.0 } { regex 4 Memcheck:Leak fun:_Znwj fun:_ZN5boost14c_regex_traitsIcE4initEv obj:/usr/lib/libboost_regex-gcc-mt-1_32.so.1.32.0 obj:/usr/lib/libboost_regex-gcc-mt-1_32.so.1.32.0 } { regex 5 Memcheck:Leak fun:_Znwj fun:_ZN5boost9re_detail15re_init_threadsEv fun:_ZN5boost14c_regex_traitsIcE4initEv obj:/usr/lib/libboost_regex-gcc-mt-1_32.so.1.32.0 } { regex 6 Memcheck:Leak fun:_Znaj fun:_ZN104_GLOBAL__N__home_cavok_archive_debian_working_boost_boost_1.32.0_libs_regex_src_c_regex_traits.cppkxwU9a15re_init_classesEv fun:_ZN5boost14c_regex_traitsIcE4initEv obj:/usr/lib/libboost_regex-gcc-mt-1_32.so.1.32.0 } { ostrstream Memcheck:Leak fun:_Znwj fun:_ZNSt24__default_alloc_templateILb1ELi0EE8allocateEj fun:_ZNSs4_Rep9_S_createEjRKSaIcE fun:_ZNSs4_Rep8_M_cloneERKSaIcEj } { regex 7 Memcheck:Leak fun:_Znwj fun:_ZN104_GLOBAL__N__home_cavok_archive_debian_working_boost_boost_1.32.0_libs_regex_src_c_regex_traits.cpptcwOma15re_init_collateEv fun:_ZN5boost14c_regex_traitsIcE4initEv obj:/usr/lib/libboost_regex-gcc-mt-1_32.so.1.32.0 obj:/usr/lib/libboost_regex-gcc-mt-1_32.so.1.32.0 obj:/usr/lib/libboost_regex-gcc-mt-1_32.so.1.32.0 obj:/usr/lib/libboost_regex-gcc-mt-1_32.so.1.32.0 obj:/lib/ld-2.3.2.so fun:_dl_init obj:/lib/ld-2.3.2.so } { regex 8 Memcheck:Leak fun:_Znwj fun:_ZN104_GLOBAL__N__home_cavok_archive_debian_working_boost_boost_1.32.0_libs_regex_src_c_regex_traits.cpptcwOma15re_init_classesEv fun:_ZN5boost14c_regex_traitsIcE4initEv obj:/usr/lib/libboost_regex-gcc-mt-1_32.so.1.32.0 obj:/usr/lib/libboost_regex-gcc-mt-1_32.so.1.32.0 obj:/usr/lib/libboost_regex-gcc-mt-1_32.so.1.32.0 obj:/usr/lib/libboost_regex-gcc-mt-1_32.so.1.32.0 obj:/lib/ld-2.3.2.so fun:_dl_init obj:/lib/ld-2.3.2.so } { regex 9 Memcheck:Leak fun:_Znwj fun:_ZN104_GLOBAL__N__home_cavok_archive_debian_working_boost_boost_1.32.0_libs_regex_src_c_regex_traits.cpptcwOma15re_message_initEv fun:_ZN5boost14c_regex_traitsIcE4initEv obj:/usr/lib/libboost_regex-gcc-mt-1_32.so.1.32.0 obj:/usr/lib/libboost_regex-gcc-mt-1_32.so.1.32.0 obj:/usr/lib/libboost_regex-gcc-mt-1_32.so.1.32.0 obj:/usr/lib/libboost_regex-gcc-mt-1_32.so.1.32.0 obj:/lib/ld-2.3.2.so fun:_dl_init obj:/lib/ld-2.3.2.so } { regex 10 Memcheck:Leak fun:_Znaj fun:_ZN104_GLOBAL__N__home_cavok_archive_debian_working_boost_boost_1.32.0_libs_regex_src_c_regex_traits.cpptcwOma15re_init_classesEv fun:_ZN5boost14c_regex_traitsIcE4initEv obj:/usr/lib/libboost_regex-gcc-mt-1_32.so.1.32.0 obj:/usr/lib/libboost_regex-gcc-mt-1_32.so.1.32.0 obj:/usr/lib/libboost_regex-gcc-mt-1_32.so.1.32.0 obj:/usr/lib/libboost_regex-gcc-mt-1_32.so.1.32.0 obj:/lib/ld-2.3.2.so fun:_dl_init obj:/lib/ld-2.3.2.so } { libdl Memcheck:Leak fun:calloc obj:/lib/tls/i686/cmov/libdl-2.3.2.so fun:dlsym fun:__errno_location } { ostream Memcheck:Leak fun:malloc fun:__cxa_get_globals fun:_ZSt18uncaught_exceptionv fun:_ZNSo6sentryD1Ev } source-highlight-3.1.6/tests/test_comments.py.html0000644000175000017500000001001211672675567017272 00000000000000
#! /usr/bin/python

"""
This is a test for the handling of
comments and string literals in Python
"""

'''
This is a test for the handling of
comments and string literals in Python
'''

"And this is a string meant as comment"

def test():		# The test routine
  '''
  It does nothing but printing different strings
  '''

  """
  It does nothing but printing different strings
  """

  print "This is the first test",
  print 'and this the second'

  'Here start the multi-lined outputs'

  print '''
Here we have
a multi-line
string.
'''

  print """
Here we have
a multi-line
string.
"""
  print '''
And this is a
second one
'''
  # End of printing
  pass			# A NOP at last

"""
"""
'And here the fun starts'
test()

table = { 'S'  : ['5'],
 'a'  : ['4','a','@'],
 'b'  : ['8','B'],
 "ps" : ["Pz"],
 'ss' : ['5S','S5'],
 'es' : ['3Z','3z'],
 'ou' : ['00'] }
source-highlight-3.1.6/tests/output_dir/0000775000175000017500000000000011676051674015346 500000000000000source-highlight-3.1.6/tests/output_dir/Makefile.in0000664000175000017500000006141611675044677017347 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Copyright (C) 1999-2008 Lorenzo Bettini # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = tests/output_dir DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/gl/m4/00gnulib.m4 \ $(top_srcdir)/gl/m4/ac_prog_doxygen.m4 \ $(top_srcdir)/gl/m4/dirent_h.m4 $(top_srcdir)/gl/m4/dirname.m4 \ $(top_srcdir)/gl/m4/double-slash-root.m4 \ $(top_srcdir)/gl/m4/extensions.m4 \ $(top_srcdir)/gl/m4/getopt.m4 \ $(top_srcdir)/gl/m4/gnulib-common.m4 \ $(top_srcdir)/gl/m4/gnulib-comp.m4 \ $(top_srcdir)/gl/m4/include_next.m4 \ $(top_srcdir)/gl/m4/malloc.m4 $(top_srcdir)/gl/m4/memset.m4 \ $(top_srcdir)/gl/m4/mkdir.m4 $(top_srcdir)/gl/m4/nocrash.m4 \ $(top_srcdir)/gl/m4/ssize_t.m4 $(top_srcdir)/gl/m4/stdbool.m4 \ $(top_srcdir)/gl/m4/stddef_h.m4 \ $(top_srcdir)/gl/m4/stdlib_h.m4 $(top_srcdir)/gl/m4/strdup.m4 \ $(top_srcdir)/gl/m4/string_h.m4 \ $(top_srcdir)/gl/m4/sys_stat_h.m4 \ $(top_srcdir)/gl/m4/time_h.m4 $(top_srcdir)/gl/m4/unistd_h.m4 \ $(top_srcdir)/gl/m4/warn-on-use.m4 \ $(top_srcdir)/gl/m4/wchar_t.m4 \ $(top_srcdir)/m4/ax_boost_base.m4 \ $(top_srcdir)/m4/ax_boost_regex.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ABSOLUTEDATADIR = @ABSOLUTEDATADIR@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ ARFLAGS = @ARFLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASH_COMPLETION_DIR = @BASH_COMPLETION_DIR@ BASH_SHELL = @BASH_SHELL@ BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ BOOST_LDFLAGS = @BOOST_LDFLAGS@ BOOST_REGEX_LIB = @BOOST_REGEX_LIB@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHROOT_INPUT_DIR = @CHROOT_INPUT_DIR@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOUBLECPP = @DOUBLECPP@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GENGETOPT = @GENGETOPT@ GETOPT_H = @GETOPT_H@ GNULIB_ALPHASORT = @GNULIB_ALPHASORT@ GNULIB_ATOLL = @GNULIB_ATOLL@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ GNULIB_CHDIR = @GNULIB_CHDIR@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@ GNULIB_DIRFD = @GNULIB_DIRFD@ GNULIB_DUP = @GNULIB_DUP@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ GNULIB_FDATASYNC = @GNULIB_FDATASYNC@ GNULIB_FDOPENDIR = @GNULIB_FDOPENDIR@ GNULIB_FFSL = @GNULIB_FFSL@ GNULIB_FFSLL = @GNULIB_FFSLL@ GNULIB_FSTAT = @GNULIB_FSTAT@ GNULIB_FSTATAT = @GNULIB_FSTATAT@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@ GNULIB_GRANTPT = @GNULIB_GRANTPT@ GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@ GNULIB_LCHMOD = @GNULIB_LCHMOD@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MBTOWC = @GNULIB_MBTOWC@ GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_MKDIRAT = @GNULIB_MKDIRAT@ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ GNULIB_MKFIFO = @GNULIB_MKFIFO@ GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@ GNULIB_MKNOD = @GNULIB_MKNOD@ GNULIB_MKNODAT = @GNULIB_MKNODAT@ GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_MKTIME = @GNULIB_MKTIME@ GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@ GNULIB_OPENDIR = @GNULIB_OPENDIR@ GNULIB_PIPE = @GNULIB_PIPE@ GNULIB_PIPE2 = @GNULIB_PIPE2@ GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PTSNAME = @GNULIB_PTSNAME@ GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PWRITE = @GNULIB_PWRITE@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_READ = @GNULIB_READ@ GNULIB_READDIR = @GNULIB_READDIR@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ GNULIB_REWINDDIR = @GNULIB_REWINDDIR@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SCANDIR = @GNULIB_SCANDIR@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_STAT = @GNULIB_STAT@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRERROR_R = @GNULIB_STRERROR_R@ GNULIB_STRNCAT = @GNULIB_STRNCAT@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRPTIME = @GNULIB_STRPTIME@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOD = @GNULIB_STRTOD@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRTOLL = @GNULIB_STRTOLL@ GNULIB_STRTOULL = @GNULIB_STRTOULL@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@ GNULIB_TIMEGM = @GNULIB_TIMEGM@ GNULIB_TIME_R = @GNULIB_TIME_R@ GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@ GNULIB_UNSETENV = @GNULIB_UNSETENV@ GNULIB_USLEEP = @GNULIB_USLEEP@ GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@ GNULIB_WCTOMB = @GNULIB_WCTOMB@ GNULIB_WRITE = @GNULIB_WRITE@ GNULIB__EXIT = @GNULIB__EXIT@ GREP = @GREP@ HAVE_ALPHASORT = @HAVE_ALPHASORT@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ HAVE_CHOWN = @HAVE_CHOWN@ HAVE_CLOSEDIR = @HAVE_CLOSEDIR@ HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@ HAVE_DECL_FDOPENDIR = @HAVE_DECL_FDOPENDIR@ HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ HAVE_DIRENT_H = @HAVE_DIRENT_H@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHDIR = @HAVE_FCHDIR@ HAVE_FCHMODAT = @HAVE_FCHMODAT@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FDATASYNC = @HAVE_FDATASYNC@ HAVE_FDOPENDIR = @HAVE_FDOPENDIR@ HAVE_FFSL = @HAVE_FFSL@ HAVE_FFSLL = @HAVE_FFSLL@ HAVE_FSTATAT = @HAVE_FSTATAT@ HAVE_FSYNC = @HAVE_FSYNC@ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ HAVE_FUTIMENS = @HAVE_FUTIMENS@ HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ HAVE_GETGROUPS = @HAVE_GETGROUPS@ HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ HAVE_GETLOGIN = @HAVE_GETLOGIN@ HAVE_GETOPT_H = @HAVE_GETOPT_H@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GRANTPT = @HAVE_GRANTPT@ HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LCHOWN = @HAVE_LCHOWN@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ HAVE_LSTAT = @HAVE_LSTAT@ HAVE_MBSLEN = @HAVE_MBSLEN@ HAVE_MEMCHR = @HAVE_MEMCHR@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_MKDIRAT = @HAVE_MKDIRAT@ HAVE_MKDTEMP = @HAVE_MKDTEMP@ HAVE_MKFIFO = @HAVE_MKFIFO@ HAVE_MKFIFOAT = @HAVE_MKFIFOAT@ HAVE_MKNOD = @HAVE_MKNOD@ HAVE_MKNODAT = @HAVE_MKNODAT@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMP = @HAVE_MKSTEMP@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ HAVE_NANOSLEEP = @HAVE_NANOSLEEP@ HAVE_OPENDIR = @HAVE_OPENDIR@ HAVE_OS_H = @HAVE_OS_H@ HAVE_PIPE = @HAVE_PIPE@ HAVE_PIPE2 = @HAVE_PIPE2@ HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@ HAVE_PREAD = @HAVE_PREAD@ HAVE_PTSNAME = @HAVE_PTSNAME@ HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ HAVE_PWRITE = @HAVE_PWRITE@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_READDIR = @HAVE_READDIR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ HAVE_REALPATH = @HAVE_REALPATH@ HAVE_REWINDDIR = @HAVE_REWINDDIR@ HAVE_RPMATCH = @HAVE_RPMATCH@ HAVE_SCANDIR = @HAVE_SCANDIR@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@ HAVE_SLEEP = @HAVE_SLEEP@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRPTIME = @HAVE_STRPTIME@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ HAVE_TIMEGM = @HAVE_TIMEGM@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ HAVE_USLEEP = @HAVE_USLEEP@ HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE__BOOL = @HAVE__BOOL@ HAVE__EXIT = @HAVE__EXIT@ HELP2MAN = @HELP2MAN@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBRARY_NAMESPACE = @LIBRARY_NAMESPACE@ LIBRARY_VERSION = @LIBRARY_VERSION@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@ NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ NEXT_DIRENT_H = @NEXT_DIRENT_H@ NEXT_GETOPT_H = @NEXT_GETOPT_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PRAGMA_COLUMNS = @PRAGMA_COLUMNS@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ RANLIB = @RANLIB@ REPLACE_CALLOC = @REPLACE_CALLOC@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ REPLACE_CHOWN = @REPLACE_CHOWN@ REPLACE_CLOSE = @REPLACE_CLOSE@ REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@ REPLACE_DIRFD = @REPLACE_DIRFD@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@ REPLACE_FSTAT = @REPLACE_FSTAT@ REPLACE_FSTATAT = @REPLACE_FSTATAT@ REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_LSTAT = @REPLACE_LSTAT@ REPLACE_MALLOC = @REPLACE_MALLOC@ REPLACE_MBTOWC = @REPLACE_MBTOWC@ REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKDIR = @REPLACE_MKDIR@ REPLACE_MKFIFO = @REPLACE_MKFIFO@ REPLACE_MKNOD = @REPLACE_MKNOD@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OPENDIR = @REPLACE_OPENDIR@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_PWRITE = @REPLACE_PWRITE@ REPLACE_READ = @REPLACE_READ@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_REALLOC = @REPLACE_REALLOC@ REPLACE_REALPATH = @REPLACE_REALPATH@ REPLACE_RMDIR = @REPLACE_RMDIR@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_STAT = @REPLACE_STAT@ REPLACE_STPNCPY = @REPLACE_STPNCPY@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRERROR_R = @REPLACE_STRERROR_R@ REPLACE_STRNCAT = @REPLACE_STRNCAT@ REPLACE_STRNDUP = @REPLACE_STRNDUP@ REPLACE_STRNLEN = @REPLACE_STRNLEN@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ REPLACE_UNLINK = @REPLACE_UNLINK@ REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ REPLACE_UNSETENV = @REPLACE_UNSETENV@ REPLACE_USLEEP = @REPLACE_USLEEP@ REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@ REPLACE_WCTOMB = @REPLACE_WCTOMB@ REPLACE_WRITE = @REPLACE_WRITE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STRIP = @STRIP@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TAR = @TAR@ TEXI2HTML = @TEXI2HTML@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ VALGRIND = @VALGRIND@ VERSION = @VERSION@ YACC = @YACC@ YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bash_completiondir = @bash_completiondir@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ gltests_WITNESS = @gltests_WITNESS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ source_highlightdatadir = @source_highlightdatadir@ source_highlightdocdir = @source_highlightdocdir@ source_highlightlibdocdir = @source_highlightlibdocdir@ source_highlightlibexampledir = @source_highlightlibexampledir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ CLEANFILES = test.java.html test.h.html all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/output_dir/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/output_dir/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: source-highlight-3.1.6/tests/output_dir/Makefile.am0000644000175000017500000000102511672675565017325 00000000000000# Copyright (C) 1999-2008 Lorenzo Bettini # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. CLEANFILES = test.java.html test.h.html source-highlight-3.1.6/tests/test.java.tex.html0000644000175000017500000007627211672675566016500 00000000000000
% Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite
\documentclass{article}
\usepackage[usenames,dvipsnames]{color}

\title{formatted with source-highlight}
\date{}
\begin{document}
\maketitle
\noindent
\mbox{}\texttt{\textcolor{Black}{ 1:}} \textit{\textcolor{Brown}{/*}} \\
\mbox{}\texttt{\textcolor{Black}{ 2:}} \textit{\textcolor{Brown}{\ \ This\ is\ a\ classical\ Hello\ program}} \\
\mbox{}\texttt{\textcolor{Black}{ 3:}} \textit{\textcolor{Brown}{\ \ to\ test\ source-highlight\ with\ Java\ programs.}} \\
\mbox{}\texttt{\textcolor{Black}{ 4:}} \textit{\textcolor{Brown}{\ \ }} \\
\mbox{}\texttt{\textcolor{Black}{ 5:}} \textit{\textcolor{Brown}{\ \ to\ have\ an\ html\ translation\ type}} \\
\mbox{}\texttt{\textcolor{Black}{ 6:}}  \\
\mbox{}\texttt{\textcolor{Black}{ 7:}} \textit{\textcolor{Brown}{\ \ \ \ \ \ \ \ source-highlight\ -s\ java\ -f\ html\ -\/-input\ Hello.java\ -\/-output\ Hello.html}} \\
\mbox{}\texttt{\textcolor{Black}{ 8:}} \textit{\textcolor{Brown}{\ \ \ \ \ \ \ \ source-highlight\ -s\ java\ -f\ html\ \textless{}\ Hello.java\ \textgreater{}\ Hello.html}} \\
\mbox{}\texttt{\textcolor{Black}{ 9:}}  \\
\mbox{}\texttt{\textcolor{Black}{10:}} \textit{\textcolor{Brown}{\ \ or\ type\ source-highlight\ -\/-help\ for\ the\ list\ of\ options}} \\
\mbox{}\texttt{\textcolor{Black}{11:}}  \\
\mbox{}\texttt{\textcolor{Black}{12:}} \textit{\textcolor{Brown}{\ \ written\ by}} \\
\mbox{}\texttt{\textcolor{Black}{13:}} \textit{\textcolor{Brown}{\ \ Lorenzo\ Bettini}} \\
\mbox{}\texttt{\textcolor{Black}{14:}} \textit{\textcolor{Brown}{\ \ }}\underline{\texttt{\textcolor{Blue}{http://www.lorenzobettini.it}}} \\
\mbox{}\texttt{\textcolor{Black}{15:}} \textit{\textcolor{Brown}{\ \ }}\underline{\texttt{\textcolor{Blue}{http://www.gnu.org/software/src-highlite}}} \\
\mbox{}\texttt{\textcolor{Black}{16:}} \textit{\textcolor{Brown}{*/}} \\
\mbox{}\texttt{\textcolor{Black}{17:}}  \\
\mbox{}\texttt{\textcolor{Black}{18:}} \textbf{\textcolor{RoyalBlue}{package}}\ hello\textcolor{BrickRed}{;} \\
\mbox{}\texttt{\textcolor{Black}{19:}}  \\
\mbox{}\texttt{\textcolor{Black}{20:}} \textbf{\textcolor{RoyalBlue}{import}}\ java\textcolor{BrickRed}{.}io\textcolor{BrickRed}{.*}\ \textcolor{BrickRed}{;} \\
\mbox{}\texttt{\textcolor{Black}{21:}}  \\
\mbox{}\texttt{\textcolor{Black}{22:}} \textit{\textcolor{Brown}{/**}} \\
\mbox{}\texttt{\textcolor{Black}{23:}} \textit{\textcolor{Brown}{\ *\ }}\textbf{\textcolor{Blue}{\textless{}p\textgreater{}}} \\
\mbox{}\texttt{\textcolor{Black}{24:}} \textit{\textcolor{Brown}{\ *\ A\ simple\ Hello\ World\ class,\ used\ to\ demonstrate\ some}} \\
\mbox{}\texttt{\textcolor{Black}{25:}} \textit{\textcolor{Brown}{\ *\ features\ of\ Java\ source\ highlighting.}} \\
\mbox{}\texttt{\textcolor{Black}{26:}} \textit{\textcolor{Brown}{\ *\ }}\textbf{\textcolor{Blue}{\textless{}/p\textgreater{}}} \\
\mbox{}\texttt{\textcolor{Black}{27:}} \textit{\textcolor{Brown}{\ *\ }}\textbf{\colorbox{Cyan}{TODO:}}\textit{\textcolor{Brown}{\ nothing,\ just\ to\ show\ an\ highlighted\ }}\textbf{\colorbox{Cyan}{TODO}}\textit{\textcolor{Brown}{\ or\ }}\textbf{\colorbox{Cyan}{FIXME}} \\
\mbox{}\texttt{\textcolor{Black}{28:}} \textit{\textcolor{Brown}{\ *}} \\
\mbox{}\texttt{\textcolor{Black}{29:}} \textit{\textcolor{Brown}{\ *\ }}\textcolor{ForestGreen}{@author}\textit{\textcolor{Brown}{\ Lorenzo\ Bettini}} \\
\mbox{}\texttt{\textcolor{Black}{30:}} \textit{\textcolor{Brown}{\ *\ }}\textcolor{ForestGreen}{@version}\textit{\textcolor{Brown}{\ 2.0}} \\
\mbox{}\texttt{\textcolor{Black}{31:}} \textit{\textcolor{Brown}{\ */}}\ \textit{\textcolor{Brown}{///\ class}} \\
\mbox{}\texttt{\textcolor{Black}{32:}} \textbf{\textcolor{Blue}{public}}\ \textbf{\textcolor{Blue}{class}}\ \textcolor{TealBlue}{Hello}\ \textcolor{Red}{\{} \\
\mbox{}\texttt{\textcolor{Black}{33:}} \ \ \ \ \textcolor{ForestGreen}{int}\ foo\ \textcolor{BrickRed}{=}\ \textcolor{Purple}{1998}\ \textcolor{BrickRed}{;} \\
\mbox{}\texttt{\textcolor{Black}{34:}} \ \ \ \ \textcolor{ForestGreen}{int}\ hex$\_$foo\ \textcolor{BrickRed}{=}\ \textcolor{Purple}{0xCAFEBABE}\textcolor{BrickRed}{;} \\
\mbox{}\texttt{\textcolor{Black}{35:}} \ \ \ \ \textcolor{ForestGreen}{boolean}\ b\ \textcolor{BrickRed}{=}\ \textbf{\textcolor{Blue}{false}}\textcolor{BrickRed}{;} \\
\mbox{}\texttt{\textcolor{Black}{36:}} \ \ \ \ \textcolor{TealBlue}{Integer}\ i\ \textcolor{BrickRed}{=}\ \textbf{\textcolor{Blue}{null}}\ \textcolor{BrickRed}{;} \\
\mbox{}\texttt{\textcolor{Black}{37:}} \ \ \ \ \textcolor{ForestGreen}{char}\ c\ \textcolor{BrickRed}{=}\ \texttt{\textcolor{Red}{'}}\texttt{\textcolor{CarnationPink}{\textbackslash{}'}}\texttt{\textcolor{Red}{'}}\textcolor{BrickRed}{,}\ d\ \textcolor{BrickRed}{=}\ \texttt{\textcolor{Red}{'n'}}\textcolor{BrickRed}{,}\ e\ \textcolor{BrickRed}{=}\ \texttt{\textcolor{Red}{'}}\texttt{\textcolor{CarnationPink}{\textbackslash{}\textbackslash{}}}\texttt{\textcolor{Red}{'}}\ \textcolor{BrickRed}{;} \\
\mbox{}\texttt{\textcolor{Black}{38:}} \ \ \ \ \textcolor{TealBlue}{String}\ xml\ \textcolor{BrickRed}{=}\ \texttt{\textcolor{Red}{"{}\textless{}tag\ attr=}}\texttt{\textcolor{CarnationPink}{\textbackslash{}"{}}}\texttt{\textcolor{Red}{value}}\texttt{\textcolor{CarnationPink}{\textbackslash{}"{}}}\texttt{\textcolor{Red}{\textgreater{}\&auml;\textless{}/tag\textgreater{}"{}}}\textcolor{BrickRed}{,}\ foo2\ \textcolor{BrickRed}{=}\ \texttt{\textcolor{Red}{"{}}}\texttt{\textcolor{CarnationPink}{\textbackslash{}\textbackslash{}}}\texttt{\textcolor{Red}{"{}}}\ \textcolor{BrickRed}{;} \\
\mbox{}\texttt{\textcolor{Black}{39:}}  \\
\mbox{}\texttt{\textcolor{Black}{40:}} \ \ \ \ \textit{\textcolor{Brown}{/*\ mymethod\ */}} \\
\mbox{}\texttt{\textcolor{Black}{41:}} \ \ \ \ \textbf{\textcolor{Blue}{public}}\ \textcolor{ForestGreen}{void}\ \textbf{\textcolor{Black}{mymethod}}\textcolor{BrickRed}{(}\textcolor{ForestGreen}{int}\ i\textcolor{BrickRed}{)}\ \textcolor{Red}{\{} \\
\mbox{}\texttt{\textcolor{Black}{42:}} \ \ \ \ \ \ \ \ \textit{\textcolor{Brown}{//\ just\ a\ foo\ method}} \\
\mbox{}\texttt{\textcolor{Black}{43:}} \ \ \ \ \textcolor{Red}{\}} \\
\mbox{}\texttt{\textcolor{Black}{44:}} \ \ \ \ \textit{\textcolor{Brown}{/*\ mymethod\ */}} \\
\mbox{}\texttt{\textcolor{Black}{45:}} \ \ \  \\
\mbox{}\texttt{\textcolor{Black}{46:}} \ \ \ \ \textit{\textcolor{Brown}{/*\ main\ */}} \\
\mbox{}\texttt{\textcolor{Black}{47:}} \ \ \ \ \textbf{\textcolor{Blue}{public}}\ \textbf{\textcolor{Blue}{static}}\ \textcolor{ForestGreen}{void}\ \textbf{\textcolor{Black}{main}}\textcolor{BrickRed}{(}\ \textcolor{TealBlue}{String}\ args\textcolor{BrickRed}{[]}\ \textcolor{BrickRed}{)}\ \textcolor{Red}{\{} \\
\mbox{}\texttt{\textcolor{Black}{48:}} \ \ \ \ \ \ \ \ \textit{\textcolor{Brown}{//\ just\ some\ greetings\ ;-)\ \ /*}} \\
\mbox{}\texttt{\textcolor{Black}{49:}} \ \ \ \ \ \ \ \ System\textcolor{BrickRed}{.}out\textcolor{BrickRed}{.}\textbf{\textcolor{Black}{println}}\textcolor{BrickRed}{(}\ \texttt{\textcolor{Red}{"{}Hello\ from\ java2html\ :-)"{}}}\ \textcolor{BrickRed}{)}\ \textcolor{BrickRed}{;} \\
\mbox{}\texttt{\textcolor{Black}{50:}} \ \ \ \ \ \ \ \ System\textcolor{BrickRed}{.}out\textcolor{BrickRed}{.}\textbf{\textcolor{Black}{println}}\textcolor{BrickRed}{(}\ \texttt{\textcolor{Red}{"{}}}\texttt{\textcolor{CarnationPink}{\textbackslash{}t}}\texttt{\textcolor{Red}{by\ Lorenzo\ Bettini"{}}}\ \textcolor{BrickRed}{)}\ \textcolor{BrickRed}{;} \\
\mbox{}\texttt{\textcolor{Black}{51:}} \ \ \ \ \ \ \ \ System\textcolor{BrickRed}{.}out\textcolor{BrickRed}{.}\textbf{\textcolor{Black}{println}}\textcolor{BrickRed}{(}\ \texttt{\textcolor{Red}{"{}}}\texttt{\textcolor{CarnationPink}{\textbackslash{}t}}\texttt{\textcolor{Red}{http://www.lorenzobettini.it"{}}}\ \textcolor{BrickRed}{)}\ \textcolor{BrickRed}{;} \\
\mbox{}\texttt{\textcolor{Black}{52:}} \ \ \ \ \ \ \ \ \textbf{\textcolor{Blue}{if}}\ \textcolor{BrickRed}{(}argc\ \textcolor{BrickRed}{\textgreater{}}\ \textcolor{Purple}{0}\textcolor{BrickRed}{)} \\
\mbox{}\texttt{\textcolor{Black}{53:}} \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{TealBlue}{String}\ param\ \textcolor{BrickRed}{=}\ argc\textcolor{BrickRed}{[}\textcolor{Purple}{0}\textcolor{BrickRed}{];} \\
\mbox{}\texttt{\textcolor{Black}{54:}} \ \ \ \ \ \ \ \ \textit{\textcolor{Brown}{//System.out.println(\ "{}bye\ bye...\ :-D"{}\ )\ ;\ //\ see\ you\ soon}} \\
\mbox{}\texttt{\textcolor{Black}{55:}} \ \ \ \ \textcolor{Red}{\}} \\
\mbox{}\texttt{\textcolor{Black}{56:}} \ \ \ \ \textit{\textcolor{Brown}{/*\ main\ */}} \\
\mbox{}\texttt{\textcolor{Black}{57:}} \textcolor{Red}{\}} \\
\mbox{}\texttt{\textcolor{Black}{58:}} \textit{\textcolor{Brown}{///\ class}} \\
\mbox{}\texttt{\textcolor{Black}{59:}}  \\
\mbox{}\texttt{\textcolor{Black}{60:}} \textit{\textcolor{Brown}{//\ end\ of\ file\ test.java}}

\end{document}
source-highlight-3.1.6/tests/test.java.doc.fodt0000664000175000017500000006542011672675566016430 00000000000000 This is the title GNU source-highlight by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite source-highlight/3.1.4$GNU source-highlight 1: /* 2: ThisisaclassicalHelloprogram 3: totestsource-highlightwithJavaprograms. 4: 5: tohaveanhtmltranslationtype 6: 7: source-highlight-sjava-fhtml--inputHello.java--outputHello.html 8: source-highlight-sjava-fhtml<Hello.java>Hello.html 9: 10: ortypesource-highlight--helpforthelistofoptions11: 12: writtenby13: LorenzoBettini14: http://www.lorenzobettini.it15: http://www.gnu.org/software/src-highlite16: */17: 18: packagehello;19: 20: importjava.io.*;21: 22: /**23: *<p>24: *AsimpleHelloWorldclass,usedtodemonstratesome25: *featuresofJavasourcehighlighting.26: *</p>27: *TODO:nothing,justtoshowanhighlightedTODOorFIXME28: *29: *@authorLorenzoBettini30: *@version2.031: *////class32: publicclassHello{33: intfoo=1998;34: inthex_foo=0xCAFEBABE;35: booleanb=false;36: Integeri=null;37: charc='\'',d='n',e='\\';38: Stringxml="<tagattr=\"value\">&auml;</tag>",foo2="\\";39: 40: /*mymethod*/41: publicvoidmymethod(inti){42: //justafoomethod43: }44: /*mymethod*/45: 46: /*main*/47: publicstaticvoidmain(Stringargs[]){48: //justsomegreetings;-)/*49: System.out.println("Hellofromjava2html:-)");50: System.out.println("\tbyLorenzoBettini");51: System.out.println("\thttp://www.lorenzobettini.it");52: if(argc>0)53: Stringparam=argc[0];54: //System.out.println("byebye...:-D");//seeyousoon55: }56: /*main*/57: }58: ///class59: 60: //endoffiletest.java source-highlight-3.1.6/tests/test_line_at_the_end.c0000644000175000017500000000002311672675567017376 00000000000000#include source-highlight-3.1.6/tests/test.po.html0000644000175000017500000001345411672675566015367 00000000000000
# translation of eu_to_be_translate.po to Basque
# Vasco translation of sound-juicer.
# Copyright (C) 2004 THE sound-juicer'S COPYRIGHT HOLDER
# This file is distributed under the same license as the sound-juicer package.
#
# Mikel Olasagasti <hey_neken@mundurat.net>, 2004, 2005.
# Iñaki Larrañaga Murgoitio <dooteo@euskalgnu.org>, 2004, 2005, 2006, 2008, 2009, 2010.
# Iñaki Larrañaga Murgoitio <dooteo@zundan.com>, 2007.
msgid ""
msgstr ""
"Project-Id-Version: eu_to_be_translate\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-10-06 22:54+0200\n"
"PO-Revision-Date: 2010-10-06 22:55+0200\n"
"Last-Translator: Iñaki Larrañaga Murgoitio <dooteo@euskalgnu.org>\n"
"Language-Team: Basque <itzulpena@euskalgnu.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 1.11.4\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#: ../data/sound-juicer.desktop.in.in.h:1
msgid "Audio CD Extractor"
msgstr "Audio CD erauzlea"

#: ../data/sound-juicer.desktop.in.in.h:2
msgid "Copy music from your CDs"
msgstr "Kopiatu musika zure CD-etatik"

#: ../data/sound-juicer.schemas.in.h:2
#, no-c-format
msgid ""
"%at -- album title %aT -- album title (lowercase) %aa -- album artist %aA -- "
"album artist (lowercase) %as -- album artist (sortable) %aS -- album artist "
"(sortable lowercase) %ay -- album year %tt -- track title %tT -- track title "
"(lowercase) %ta -- track artist %tA -- track artist (lowercase) %ts -- track "
"artist (sortable) %tS -- track artist (sortable lowercase)"
msgstr ""
"%at -- albumaren titulua %aT -- albumaren titulua (letra-xehez) %aa -- "
"albumaren artista %aA -- albumaren artista (letra-xehez) %as -- albumaren "
"artista (ordena daiteke) %aS -- albumaren artista (letra-xehez ordena "
"daiteke) %ay -- albumaren urtea %tt -- pistaren titulua %tT -- pistaren "
"titulua (letra-xehez) %ta -- pistaren artista %tA -- pistaren artista (letra-"
"xehez) %ts -- pistaren artista (ordena daiteke) %tS pistaren artista (letra-"
"xehez ordena daiteke)"

#: ../data/sound-juicer.schemas.in.h:6
#, no-c-format
msgid ""
"Do not specify an extension. %at -- album title %aT -- album title "
"(lowercase) %aa -- album artist %aA -- album artist (lowercase) %as -- album "
"artist (sortable) %aS -- album artist (sortable lowercase) %tn -- track "
"number (i.e 8) %tN -- track number, zero padded (i.e 08) %tt -- track title %"
"tT -- track title (lowercase) %ta -- track artist %tA -- track artist "
"(lowercase) %ts -- track artist (sortable) %tS -- track artist (sortable "
"lowercase) %dn -- disc and track number (i.e Disk 2 - 6, or 6) %dN -- disc "
"number, zero padded (i.e d02t06, or 06)"
msgstr ""
"Ez zehaztu luzapenik. %at -- albumaren titulua %aT -- albumaren titulua "
"(letra-xehez) %aa -- albumaren artista %aA -- albumaren artista (letra-"
"xehez) %as -- albumaren artista (ordena daiteke)  %aS -- albumaren artista "
"(letra-xehez ordena daiteke) %tn -- pistaren zenbakia (adib. 8) %tN -- "
"pistaren zenbakia, zeroz betea (adib. 08) %tt -- pistaren titulua %tT -- "
"pistaren titulua (letra-xehez) %ta -- pistaren artista %tA -- pistaren "
"artista (letra-xehez) %ts -- pistaren artista (ordena daiteke) %tS pistaren "
"artista (letra-xehez ordena daiteke) %dn -- disko eta pistaren zenbakia "
"(adib. diskoa 2 - 6, edo 6) %dN -- diskoaren zenbakia, zeroz betea (adib. "
"d02t06, edo 06)"

source-highlight-3.1.6/tests/test.ngroups.html0000644000175000017500000000120411672675566016434 00000000000000
This should highlight some Hello World strings,
like
Hello World!!
or
Hello world
or
Ciao Mondo?
But not this one:
hello World!
let's see.
source-highlight-3.1.6/tests/test.clipper0000644000175000017500000000101211672675566015427 00000000000000Function MAIN() LOCAL number INPUT "Key in a number: " TO number IF number % 2 = 0 ? "You keyed in an even number" ? "I can prove it:" ? "the result of ",number," % 2 = 0 is ", number % 2 = 0 ELSE ? "You keyed in an odd number" ? "I can prove it:" ? "the result of ",number," % 2 = 0 is ", number % 2 = 0 ENDIF RETURN /* Load the table.dbf and table.cdx, on unix, you should ensure that file extensions are on lowercase.*/ USE table INDEX table VIA "DBFCDX" REINDEXsource-highlight-3.1.6/tests/erasedir2.sed0000644000175000017500000000001511672675565015446 00000000000000s/[^\ ]*\///gsource-highlight-3.1.6/tests/test.php30000644000175000017500000003040211672675566014650 00000000000000$indiceG - $titre $description
Url: $url Facteur: $facteur Last update: $last_update

\n"' $mot : Séquence des mots recherchés tel que tapé par l'utilisateur first : Indice du premier site affiché dans le résultat $id : Id du site dans lequel effectué la recherche $langue : Restriction par langue (facultatif) $Url : Restriction par url : les url trouvées commenceront par $Url (facultatif) $create : Restriction par date inscription. Format YYYY-MM-JJ HH:MM:SS (facultatif) $update : Restriction par date de mise à jour des pages. Format YYYY-MM-JJ HH:MM:SS (facultatif) $catego : Restriction par categorie (facultatif) Retourne ($resultat,$links,$indice) $resultat : Buffer HTML contenant la liste des sites trouves formaté en fonction de $template et des mots present dans $mots $links : Liens vers les pages suivantes / precedentes $indice : Nombre de sites trouves */ include("foo.php"); include_once("bar.php"); function search($template,$word,$first,$idc,$langue,$Url,$create,$update,$categorie) { $mots = split( " ", strtolower($word)); $i=0; # Recherche des requetes booleenes while( list($key,$valeur) = each ($mots)) { if ($valeur == '+') {$ind_and[]=$i;} # Reperage de la position des mots 'and' else if ($valeur == '-') {$ind_not[]=$i;} # Reperage de la position des mots 'not' else {$mots_tmp[]=$valeur;} $i++; } # Recherche SQL $tab = search_word(join("','",$mots_tmp),$idc,'','','','',''); # On supprime tout ceux qui ne repondent pas aux criteres and si present if (is_array($ind_and)) {while( list($key,$ind) = each($ind_and)) {while( list($url,$tab_url) = each ($tab)) {if (!appartient($mots[$ind+1],$tab_url[5])) {unset($tab[$url]);}}}reset($tab);} # On supprime tout ceux qui ne repondent pas aux criteres not si present if (is_array($ind_not)) {while( list($key,$ind) = each($ind_not)) {while( list($url,$tab_url) = each ($tab)) {if (appartient($mots[$ind+1],$tab_url[5])) {unset($tab[$url]);}}}reset($tab);} $indice=0;$nbResultPerPage=10; $lasto = $first + $nbResultPerPage; # On met en forme le resultat if (is_array($tab)) { while( list($url,$tab_url) = each ($tab)) { $indiceG=$indice+1; list($titre,$description,$facteur,$langue,$last_update,$mot)=$tab_url; if (($indice>=$first)&&($indice<$lasto)) {eval($template);} # Constitution des liens suivants / precedents if (!($indice%$nbResultPerPage)) { $nbPage++; if ($indice==$first) {$links.="$nbPage- ";} else {$links.=''.$nbPage.'- '."\n";} } $indice++; } } if ($indice) {$indice="$indice sites trouves";} else {$indice="

Aucun document trouvé.

";} return array($resultat,$links,$indice); } /* Construction de la requete SQL. Son exploitation est faite par search $tab : Reference du hash où mettre le resultat $word : Mot recherché $id : Id du site dans lequel effectué la recherche $langue : Restriction par langue (facultatif) $Url : Restriction par url $create : Restriction par date inscription $update : Restriction par date de mise à jour des pages $catego : Restriction par categorie Retourne le tableau avec le resultat de la recherche Le hash est constitué comme tel: $tab{$url}[0] : titre $tab{$url}[1] : description $tab{$url}[2] : facteur $tab{$url}[3] : langue $tab{$url}[4] : date de dernière modification @{$$tab{$url}[5]}: liste des mots trouves pour cet url */ function search_word($word,$idc,$langue,$Url,$create,$update,$categorie) { global $prefix; global $database; if ($langue) {$langue=" and langue='$langue' ";} else {$langue= ' ';} if (($Url)&&($Url != 'http://')) {$Url=" and url like '$Url%' ";} else {$Url=' ';} if ($create) {$create="and unix_timestamp('$create')< unix_timestamp(last_check) ";} else {$create=' ';} if ($update) {$update="and unix_timestamp('$update')< unix_timestamp(last_update) ";} else {$update=' ';} if ($categorie) {} else {$categorie=' ';} $requete = " select facteur,url,titre,description,langue,last_update,mot from ".$prefix.$idc."links l,".$prefix.$idc."relation r where r.id_site=l.id and r.mot in ('$word') $langue $Url $create $update $categorie order by facteur desc"; $result = mysql_db_query($database,$requete); if (!$result) {print "$requete";return ;} $RowCount = MySQL_NUMROWS($result); while ($i<$RowCount) { list ($facteur,$url,$titre,$description,$langue,$last_update,$mot)= mysql_fetch_row($result); $tab[$url][0] = $titre; $tab[$url][1]=$description; $tab[$url][2]+=$facteur; $tab[$url][3]=$langue; $tab[$url][4]=$last_update; $tab[$url][5][]=$mot; $i++; } return $tab; } /* Fonction retournant la liste des categories de la categorie $id dans le site $idr $id : Id de la categorie de depart. Si undef, 0 est utilisé (Considéré comme le "Home") $idr : Id du responsable $template : Masque HTML pour le resultat de chaque lien. Si undef, le masque par defaut (defini en haut de ce module) sera utlise Retourne ($resultat,$nom_categorie) : $resultat : Buffer contenant la liste des sites formatées en ft de $template $nom_categorie : Nom court de la categorie */ function categories_in_categorie($id,$idr,$template) { global $database; global $prefix; if (!$idr) {$idr=1;} if (!$id) {$id=0;} $requete = "select id,nom,parent from ".$prefix.$idr."categorie"; $result = mysql_db_query($database,$requete); $RowCount = MySQL_NUMROWS($result); $i=0; while ($i<$RowCount) { list ($idc,$nom,$parent)= mysql_fetch_row($result); $tab[$idc][0]=$nom; $tab[$idc][1]=$parent; $i++; } while( list($key,$val) = each ($tab)) { $nom=$tab[$key][0]; $parent=$tab[$key][1]; $nom_complet="Accueil".getParent($key,$idr,$tab); $links = get_link_categorie($key,$idr); if ($parent==$id) {eval($template);} } if ($i==0) {$resultat="

Plus de catégorie

";} if ($id!=0) {$titre = "Accueil ".getParent($id,$idr,$tab);} else {$titre=" ";} return array($resultat,$titre); } /* Fonction retournant la liste des pages de la categorie $id dans le site $idr $id : Id de la categorie de depart. Si undef, 0 est utilisé (Considéré comme le "Home") $idr : Id du responsable $template : Masque HTML pour le resultat de chaque lien. Si undef, le masque par defaut (defini en haut de ce module) sera utlise Retourne le buffer contenant la liste des sites formatées en ft de $template */ function sites_in_categorie($id,$idr,$template) { global $database; global $prefix; $indiceG=1;$facteur=100; if (!$idr) {$idr=1;} if (!$id) {$id=0;} $i=0; $requete = "select url,titre,description,langue,last_update from ".$prefix.$idr."links where categorie=$id and browse_categorie='1' and parse='1'"; $result = mysql_db_query($database,$requete); $RowCount = MySQL_NUMROWS($result); while ($i<$RowCount) { list ($url,$titre,$description,$langue,$last_update)= mysql_fetch_row($result); eval($template); $indiceG++;$i++; } if ($i==0) {$resultat="

Pas de pages dans cette catégorie

";} return $resultat; } /* Rend la chaine correspondante à la catégorie $id avec ses rubriques parentes */ function getParent($id,$idr,$tab) { if (($tab[$id][1]!=0)&&($tab[$id][0])) {$parent = getParent($tab[$id][1],$idr,$tab);} if (!$tab[$id][0]) {$tab[$id][0]='Home';} $parent.=">'.$tab[$id][0].""; return $parent; } function getWLParent($id,$idr,$tab) { if (($tab[$id][1]!=0)&&($tab[$id][0])) {$parent = getWLParent($tab[$id][1],$idr,$tab);} if (!$tab[$id][0]) {$tab[$id][0]='Home';} $parent.=">".$tab[$id][0]; return $parent; } /* Retourne 1 si $var appartient à $liste, 0 sinon. */ function appartient($var,$liste) { while( list($key,$val) = each ($liste)) {if ($val==$var) {return 1;}} return 0; } /** * Retourne l'URL correspondant à la page no $no_page dans la recherche en cours */ function get_link($no_page,$word,$id) { $buf = getenv('SCRIPT_NAME')."?word=".urlencode($word)."&id=".$id."&first=".$no_page; if ($nbResultPerPage) {$buf.="&nbResultPerPage=".$nbResultPerPage;} return $buf; } /** * Retourne l'URL correspondant à la categorie no $no_categorie */ function get_link_categorie($no_categorie,$id) {return getenv('SCRIPT_NAME')."?categorie=$no_categorie&id=$id";} /** * Retourne le nom du site dans la table responsable correspondant à l'id $id */ function get_name_site($id,$prefix) { #$result = mysql_db_query("circa","select titre from ".$this->{PREFIX_TABLE}."responsable where id=$id"); #$sth->execute() || print "Erreur: $DBI::errstr\n"; #my ($titre)=$sth->fetchrow_array; #$sth->finish; return $titre; } function get_liste_categorie($idr) { global $database; global $prefix; $requete = "select id,nom,parent from ".$prefix.$idr."categorie"; $result = mysql_db_query($database,$requete); $RowCount = MySQL_NUMROWS($result); $i=0; while ($i<$RowCount) { list ($idc,$nom,$parent)= mysql_fetch_row($result); $tab[$idc][0]=$nom; $tab[$idc][1]=$parent; $i++; } while( list($key,$val) = each ($tab)) { $nom=$tab[$key][0]; $parent=$tab[$key][1]; $buf.=""; } return $buf; } function addSite($url,$categorie) { global $database; global $prefix; global $idr; $requete="insert into ".$prefix.$idr."links (url,titre,description,langue,valide,categorie,browse_categorie) values ('$url',' ',' ','fr',0,$categorie,'1')"; $result = mysql_db_query($database,$requete); } ?> source-highlight-3.1.6/tests/wrong_backref2.err0000644000175000017500000000010211672675567016475 00000000000000wrong_backref2.lang:2: backreferences are allowed only inside ` ` source-highlight-3.1.6/tests/test.defaults0000644000175000017500000000003311672675566015602 00000000000000key2 = type key3 = comment source-highlight-3.1.6/tests/test_html5.htm0000644000175000017500000000165111672675567015704 00000000000000 Check HTML features & <br>
/*





   

is syntactically valid and equivalent to

From then on, everything else won't be highlighted <textarea> Here elements such as <b> are not highlighted while entities such as &amp; are highlighted </textarea> </body> </html> <!-- this is an added HTML comment at the end of the file --> ���������������������������������������������������������������������������������������source-highlight-3.1.6/tests/test_string_stop.java.html���������������������������������������������0000644�0001750�0001750�00000001065�11672675567�020321� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<!-- Generator: GNU source-highlight by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite --> <pre><tt><i><font color="#9A1900">/* comment */</font></i> final <font color="#990000">/</font> <font color="#FF6600">/my/regexp/</font> <b><font color="#0000FF">if</font></b> ( ) { <b><font color="#0000FF">class</font></b>; <b><font color="#000000">myfun ( )</font></b>; } <font color="#009900">int</font> i; <font color="#009900">int</font> ( ); <font color="#990000">//</font> comment? or two symbols? </tt></pre> ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/tests/test.chlog.html��������������������������������������������������������0000644�0001750�0001750�00000005634�11672675566�016046� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<!-- Generator: GNU source-highlight by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite --> <pre><tt><b><font color="#0000FF">2002-08-08</font></b> <font color="#009900">Lorenzo</font> <font color="#009900">Bettini</font> <u><font color="#0000FF">&lt;lb-bl@foo.it&gt;</font></u> <font color="#990000">*</font> <b><font color="#000080">src/Makefile.am (source_highlight_SOURCES):</font></b> correctly include changelog_scanner.ll <font color="#990000">*</font> this is a comment without a file name <b><font color="#0000FF">2002-08-02</font></b> <font color="#009900">John</font> <font color="#009900">Millaway</font> <u><font color="#0000FF">&lt;millaway-bar@foo_bar-com.com&gt;</font></u> <font color="#990000">*</font> <b><font color="#000080">src/flex_scanner.ll:</font></b> Added scanner for flex <font color="#990000">*</font> <b><font color="#000080">src/changelog_scanner.ll:</font></b> Added scanner for ChangeLog <font color="#990000">*</font> <b><font color="#000080">src/Makefile.am:</font></b> do not use .stamp files anymore, use flex's prefix <b><font color="#0000FF">2002-07-30</font></b> <font color="#009900">Lorenzo</font> <font color="#009900">Bettini</font> <font color="#009900">&lt;lb@foo&gt;</font> <font color="#990000">*</font> <b><font color="#000080">acinclude.m4 (LF_PROG_TXTC):</font></b> fixed a little bug that shows up only now with the new version of autoconf <font color="#990000">*</font> <b><font color="#000080">acconfig.h:</font></b> removed, no longer needed with autoconf <font color="#990000">*</font> <b><font color="#000080">configure.in:</font></b> use the new AC_LIBOBJ <font color="#990000">*</font> <b><font color="#000080">doc/Makefile.am:</font></b> removed an extra EXTRA_DIST <b><font color="#0000FF">2002-07-21</font></b> <font color="#009900">Lorenzo</font> <font color="#009900">Bettini</font> <font color="#009900">&lt;lb@foo&gt;</font> <font color="#990000">*</font> <b><font color="#000080">src/python_scanner.ll:</font></b> fixed a problem with string comments <font color="#990000">*</font> <b><font color="#000080">src/lib/genfun.cc (processFile):</font></b> correctly set deleteOStream <font color="#990000">*</font> <b><font color="#000080">src/lib/startapp.cc (start):</font></b> default to stdout also when -i option is used. <b><font color="#000080">(start):</font></b> check whether "STDOUT" was specified as output <font color="#990000">*</font> <b><font color="#000080">src/lib/genfun.cc (print_xtop):</font></b> always generate the correct header for XHTML <b><font color="#000080">(processFile):</font></b> call LineNumberDecorator::reset so that if many files are processed the current line number is correctly reset <b><font color="#0000FF">2002-07-10</font></b> <font color="#009900">Lorenzo</font> <font color="#009900">Bettini</font> <font color="#009900">&lt;lb@foo&gt;</font> </tt></pre> ����������������������������������������������������������������������������������������������������source-highlight-3.1.6/tests/test.bat.html����������������������������������������������������������0000644�0001750�0001750�00000010010�11672675566�015500� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<!-- Generator: GNU source-highlight by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite --> <pre><tt>@<b><font color="#000000">ECHO</font></b> OFF <i><font color="#9A1900">REM - LABEL INDICATING THE BEGINNING OF THE DOCUMENT.</font></i> <b><font color="#008080">:BEGIN</font></b> <b><font color="#000000">CLS</font></b> <i><font color="#9A1900">REM - THE BELOW LINE GIVES THE USER 3 CHOICES (DEFINED AFTER /C:)</font></i> <b><font color="#000000">CHOICE</font></b> <font color="#990000">/</font>N <font color="#990000">/</font><font color="#FF6600">C:123</font> PICK A NUMBER <font color="#990000">(</font><font color="#993399">1</font><font color="#990000">,</font> <font color="#993399">2</font><font color="#990000">,</font> or <font color="#993399">3</font><font color="#990000">)</font><font color="#009900">%1</font> <i><font color="#9A1900">REM - THE NEXT THREE LINES ARE DIRECTING USER DEPENDING UPON INPUT</font></i> <b><font color="#0000FF">IF</font></b> <b><font color="#0000FF">ERRORLEVEL</font></b> <font color="#990000">==</font><font color="#993399">3</font> <b><font color="#0000FF">GOTO</font></b> THREE <b><font color="#0000FF">IF</font></b> <b><font color="#0000FF">ERRORLEVEL</font></b> <font color="#990000">==</font><font color="#993399">2</font> <b><font color="#0000FF">GOTO</font></b> TWO <b><font color="#0000FF">IF</font></b> <b><font color="#0000FF">ERRORLEVEL</font></b> <font color="#990000">==</font><font color="#993399">1</font> <b><font color="#0000FF">GOTO</font></b> ONE <b><font color="#0000FF">GOTO</font></b> <b><font color="#0000FF">END</font></b> <b><font color="#008080">:THREE</font></b> <b><font color="#000000">ECHO</font></b> YOU HAVE PRESSED THREE <b><font color="#0000FF">GOTO</font></b> <b><font color="#0000FF">END</font></b> <b><font color="#008080">:TWO</font></b> <b><font color="#000000">ECHO</font></b> YOU HAVE PRESSED TWO <b><font color="#0000FF">GOTO</font></b> <b><font color="#0000FF">END</font></b> <b><font color="#008080">:ONE</font></b> <b><font color="#000000">ECHO</font></b> YOU HAVE PRESSED ONE <b><font color="#008080">:END</font></b> <i><font color="#9A1900">:: Renames a Text File with the Current Date as the Name</font></i> <i><font color="#9A1900">:: The File Extension is Kept</font></i> <i><font color="#9A1900">::</font></i> <font color="#FF6600">C:\BATCH\DOS\XSET</font> <b><font color="#000000">CUR-DATE</font></b> <b><font color="#000000">DATE</font></b> YY<font color="#990000">-</font>MM<font color="#990000">-</font>DD <b><font color="#000000">REN</font></b> <font color="#009900">%1</font><font color="#990000">.*</font> <font color="#990000">%</font><b><font color="#000000">CUR-DATE</font></b><font color="#990000">%.*</font> <b><font color="#0000FF">IF</font></b> <font color="#FF0000">"</font><font color="#CC33CC">%1</font><font color="#FF0000">"</font> <font color="#990000">==</font> <font color="#FF0000">""</font> <b><font color="#000000">XCOPY</font></b> <font color="#FF6600">B:\</font><font color="#990000">*.*</font> <b><font color="#0000FF">IF</font></b> <b><font color="#0000FF">NOT</font></b> <font color="#FF0000">"</font><font color="#CC33CC">%1</font><font color="#FF0000">"</font> <font color="#990000">==</font> <font color="#FF0000">""</font> <b><font color="#000000">XCOPY</font></b> <font color="#FF6600">B:\</font><font color="#009900">%1</font> <b><font color="#000000">ECHO</font></b><font color="#990000">.</font> <font color="#FF6600">C:\BATCH\DR</font> <b><font color="#0000FF">FOR</font></b> <font color="#009900">%%F</font> IN <font color="#990000">(</font><font color="#009900">%1</font> <font color="#009900">%2</font> <font color="#009900">%3</font> <font color="#009900">%4</font> <font color="#009900">%5</font> <font color="#009900">%6</font> <font color="#009900">%7</font> <font color="#009900">%8</font> <font color="#009900">%9</font><font color="#990000">)</font> <b><font color="#0000FF">DO</font></b> <b><font color="#000000">DEL</font></b> <font color="#009900">%%F</font> </tt></pre> ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/tests/wrong_already_defined.style��������������������������������������������0000644�0001750�0001750�00000000055�11672675567�020474� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������date yellow b ; time blue i; date green b ; �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/tests/test.scpt.html���������������������������������������������������������0000644�0001750�0001750�00000015014�11672675566�015714� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<!-- Generator: GNU source-highlight by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite --> <pre><tt><i><font color="#9A1900">(*</font></i> <b>TODO</b><i><font color="#9A1900"> just a comment</font></i> <i><font color="#9A1900">foo bar</font></i> <i><font color="#9A1900">*)</font></i> <b><font color="#000000">displayName</font></b><font color="#990000">(</font><b><font color="#0000FF">choose</font></b> <b><font color="#0000FF">file</font></b> <b><font color="#0000FF">with</font></b> prompt <font color="#FF0000">"Select a file:"</font><font color="#990000">)</font> <i><font color="#9A1900">--if double-clicked</font></i> <b><font color="#0000FF">return</font></b> <i><font color="#9A1900">-- not needed, but shows that the script stops here when "run"</font></i> <b><font color="#0000FF">on</font></b> <b><font color="#0000FF">open</font></b> <b><font color="#0000FF">of</font></b> finderObjects <i><font color="#9A1900">-- "open" handler triggered by drag'n'drop launches</font></i> <b><font color="#0000FF">repeat</font></b> <b><font color="#0000FF">with</font></b> i <b><font color="#0000FF">in</font></b> <font color="#990000">(</font>finderObjects<font color="#990000">)</font> <i><font color="#9A1900">-- in case multiple objects dropped on applet</font></i> <b><font color="#000000">displayName</font></b><font color="#990000">(</font>i<font color="#990000">)</font> <i><font color="#9A1900">-- show file/folder's info</font></i> <b><font color="#0000FF">if</font></b> <b><font color="#0000FF">folder</font></b> <b><font color="#0000FF">of</font></b> <font color="#990000">(</font>info <b><font color="#0000FF">for</font></b> i<font color="#990000">)</font> <b><font color="#0000FF">is</font></b> <b><font color="#0000FF">true</font></b> <b><font color="#0000FF">then</font></b> <i><font color="#9A1900">-- process folder's contents too</font></i> <b><font color="#0000FF">tell</font></b> <b><font color="#0000FF">application</font></b> <font color="#FF0000">"Finder"</font> <b><font color="#0000FF">to</font></b> <b><font color="#0000FF">set</font></b> temp <b><font color="#0000FF">to</font></b> <font color="#990000">(</font>entire <b><font color="#0000FF">contents</font></b> <b><font color="#0000FF">of</font></b> i<font color="#990000">)</font> <b><font color="#0000FF">repeat</font></b> <b><font color="#0000FF">with</font></b> j <b><font color="#0000FF">in</font></b> <font color="#990000">(</font>temp<font color="#990000">)</font> <b><font color="#0000FF">display</font></b> <b><font color="#0000FF">dialog</font></b> j <b><font color="#0000FF">as</font></b> <b><font color="#0000FF">string</font></b> <i><font color="#9A1900">-- example of doing something with each item</font></i> <b><font color="#0000FF">end</font></b> <b><font color="#0000FF">repeat</font></b> <b><font color="#0000FF">end</font></b> <b><font color="#0000FF">if</font></b> <b><font color="#0000FF">end</font></b> <b><font color="#0000FF">repeat</font></b> <b><font color="#0000FF">end</font></b> <b><font color="#0000FF">open</font></b> <b><font color="#0000FF">if</font></b> CurState <b><font color="#0000FF">is</font></b> <font color="#993399">0</font> <b><font color="#0000FF">then</font></b> connect configuration <font color="#FF0000">"pccard-serial"</font> <b><font color="#0000FF">end</font></b> <b><font color="#0000FF">if</font></b> <b><font color="#0000FF">on</font></b> <b><font color="#000000">GetParentPath</font></b><font color="#990000">(</font>myPath<font color="#990000">)</font> <b><font color="#0000FF">set</font></b> oldDelimiters <b><font color="#0000FF">to</font></b> <b><font color="#0000FF">AppleScript</font></b>'s <b><font color="#0000FF">text</font></b> <b><font color="#0000FF">item</font></b> delimiters <i><font color="#9A1900">-- always preserve original delimiters</font></i> <b><font color="#0000FF">set</font></b> <b><font color="#0000FF">AppleScript</font></b>'s <b><font color="#0000FF">text</font></b> <b><font color="#0000FF">item</font></b> delimiters <b><font color="#0000FF">to</font></b> <font color="#FF0000">{</font><font color="#FF0000">":"</font><font color="#FF0000">}</font> <b><font color="#0000FF">set</font></b> pathItems <b><font color="#0000FF">to</font></b> <b><font color="#0000FF">text</font></b> <b><font color="#0000FF">items</font></b> <b><font color="#0000FF">of</font></b> <font color="#990000">(</font>myPath <b><font color="#0000FF">as</font></b> <b><font color="#0000FF">text</font></b><font color="#990000">)</font> <b><font color="#0000FF">if</font></b> <b><font color="#0000FF">last</font></b> <b><font color="#0000FF">item</font></b> <b><font color="#0000FF">of</font></b> pathItems <b><font color="#0000FF">is</font></b> <font color="#FF0000">""</font> <b><font color="#0000FF">then</font></b> <b><font color="#0000FF">set</font></b> pathItems <b><font color="#0000FF">to</font></b> <b><font color="#0000FF">items</font></b> <font color="#993399">1</font> thru <font color="#990000">-</font><font color="#993399">2</font> <b><font color="#0000FF">of</font></b> pathItems <i><font color="#9A1900">-- its a folder</font></i> <b><font color="#0000FF">set</font></b> parentPath <b><font color="#0000FF">to</font></b> <font color="#990000">((</font>reverse <b><font color="#0000FF">of</font></b> <b><font color="#0000FF">the</font></b> rest <b><font color="#0000FF">of</font></b> reverse <b><font color="#0000FF">of</font></b> pathItems<font color="#990000">)</font> <b><font color="#0000FF">as</font></b> <b><font color="#0000FF">string</font></b><font color="#990000">)</font> <font color="#990000">&amp;</font> <font color="#FF0000">":"</font> <i><font color="#9A1900">(* The above line works better than the more obvious set parentPath to ((items 1 thru -2 of pathItems) as string) &amp; ":"</font></i> <i><font color="#9A1900"> because it will not return an error when passed a path for a volume, i.e., "Macintosh HD:", but rather will return ":"</font></i> <i><font color="#9A1900"> indicating the desktop is the root of the given path. Andy Bachorski </font></i><u><font color="#0000FF">&lt;andyb@APPLE.COM&gt;</font></u><i><font color="#9A1900"> *)</font></i> <b><font color="#0000FF">set</font></b> <b><font color="#0000FF">AppleScript</font></b>'s <b><font color="#0000FF">text</font></b> <b><font color="#0000FF">item</font></b> delimiters <b><font color="#0000FF">to</font></b> oldDelimiters <i><font color="#9A1900">-- always restore original delimiters</font></i> <b><font color="#0000FF">return</font></b> parentPath <b><font color="#0000FF">end</font></b> GetParentPath </tt></pre> ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/tests/test_nobgcolor.html����������������������������������������������������0000644�0001750�0001750�00000000704�11672675567�017011� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta name="GENERATOR" content="GNU source-highlight by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite"> <title>source file</title> </head> <body bgcolor=""> <pre><tt><i>// just a test to see the output document where background is not specified</i> </tt></pre> </body> </html> ������������������������������������������������������������source-highlight-3.1.6/tests/test.bib.html����������������������������������������������������������0000644�0001750�0001750�00000001245�11672675566�015500� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<!-- Generator: GNU source-highlight by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite --> <pre><tt><font color="#0000FF">@PhdThesis</font>{<font color="#009900">BetPhd</font>, <font color="#FF0000">author</font> = {L.~Bettini}, <font color="#FF0000">title</font> = {{Linguistic Constructs for Object-Oriented Mobile Code Programming \&amp; their Implementations}}, <font color="#FF0000">school</font> = {Dip.\ di Matematica, Universit\`a di Siena}, <font color="#FF0000">year</font> = 2003, <font color="#FF0000">note</font> = {Available at \texttt{http://music.dsi.unifi.it}} } </tt></pre> �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/tests/test.scm���������������������������������������������������������������0000644�0001750�0001750�00000004051�11672675566�014561� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#| multiline comment |# "string with special \n \t chars" ; comment (define (fn a) (let* ((b (+ a 1))) (if (= a 1) #t #f))) ;; another comment (define c (lambda (x) (let loop ((i 0)) (unless (= i 10) ;; print some chars (display #\' #\#) (loop (+ i 1)))))) ((if (= 0 0) * +) 5 2) ;; numbers (define pi 3.14159) (define circle-area (lambda (radius) (* pi radius radius))) (define (circle-area radius) (* pi radius radius)) (define (blah) (define (foo) 55) (define (woo) 42) (+ (foo) (woo))) (define (repeat-forever) (display "I will not play with Scheme in class.") (repeat-forever)) (define (all-atoms-are-numeric? tree) (call-with-current-continuation (lambda (return) ;bind RETURN to the current cont (define (walk tree) (cond ((null? tree)) ((pair? tree) ;pair? is like consp (walk (car tree)) (walk (cdr tree))) ((number? tree)) (else (return #f)))) ;found a non-number -- return false (walk tree) #t))) ;else return true (cond ((number? x) "A number.") ((string? x) "A string.") (else "Beats me!")) (cond ((assoc key a-list) => cdr) (else #f)) (letrec ((even? (lambda (n) (if (= n 0) #t (odd? (- n 1))))) (odd? (lambda (n) (if (= n 0) #f (even? (- n 1)))))) (even? 42)) (let counting ((n 10)) (cond ((< 0 n) (write n) (counting (- n 1))))) (define (list . arguments) arguments) (define-syntax my-or (syntax-rules () ((my-or) #f) ((my-or e) e) ((my-or e1 e2 ...) (let ((temp e1)) (if temp temp (my-or e2 ...)))))) (define-syntax syntax-rules (lambda (x) (syntax-case x () ((_ (i ...) ((keyword . pattern) template) ...) (syntax (lambda (x) (syntax-case x (i ...) ((dummy . pattern) (syntax template)) ...))))))) ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/tests/test.lisp��������������������������������������������������������������0000644�0001750�0001750�00000002527�11672675566�014754� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������;;;; Test file for Lisp ;;;; A simple test file (defpackage :foobar (:use :common-lisp-user :common-lisp)) (in-package :foobar) (export '(new-obj mapobj parent call-if-exists ?call call super super-if-exists ?super slot-val slot-obj mset meth meth-func func-meth this meth-owner meth-name set-original-slot *foo-version* *print-foo-objects-verbosely*)) (defconstant *foobar-version* 3 "Foobar's Version Number") (defparameter *print-foobar-objects-verbosely* nil) (defmacro definline (name &rest stuff) "Defines a function and declares it to be inlined" ;; convenient, no? `(progn (declaim (inline ,name)) (defun ,name ,@stuff))) (defstruct (foobar-object (:print-object print-foobar-object)) slots parent) (defun mapobj (func obj &optional (deeply nil)) "Maps FUNC over all of the slots in OBJ. FUNC must take THREE arguments: (1) the object defining the slot, (2) the slot name. That is, only one slot is mapped for a given slot name. nil is returned." (simple-error-check obj ;;; OTHER STUFF INSIDE A METHOD ;;; @ macro ;;; Forms: @var Expands to (slot-val 'var this) ;;; @(meth ... ) Expands to (call 'meth this ... ) ;;; @? macro ;;; Form: @?(meth ... ) Expands to (?call 'meth this ... ) ;;; #@ macro ;;; Form: #@meth Expands to (meth-func 'meth this) �������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/tests/test.xml���������������������������������������������������������������0000644�0001750�0001750�00000001530�11672675567�014577� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd"> <?xml version="1.0" encoding="UTF-8"?> <xs:schema targetNamespace="http://www.cedar.ac.uk/hepml/hepdata/0.1/" xmlns="http://www.cedar.ac.uk/hepml/hepdata/0.1/" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified"> <xs:simpleType name="errSourceType"> <xs:annotation> <xs:documentation>Possible error sources</xs:documentation> </xs:annotation> <xs:restriction base="xs:string"> <xs:enumeration value="stat"/> <xs:enumeration value="sys"/> <xs:enumeration value="total"/> <xs:enumeration value="unknown"/> </xs:restriction> </xs:simpleType> <tomcat-user_lore> foo </tomcat-user_lore> <tomcat-user_lore.bettini name="lorenzo"> bar </tomcat-user_lore.bettini>������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/tests/test.unknown�����������������������������������������������������������0000644�0001750�0001750�00000000206�11672675567�015475� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������This is a file just to test the behavior of source-highlight when the input language is not known and the --failsafe option is given ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/tests/test_pl_lines.html�����������������������������������������������������0000644�0001750�0001750�00000017532�11672675567�016641� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<!-- Generator: GNU source-highlight by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite --> <pre><tt><font color="#000000">01:</font> <i><font color="#9A1900">% +------------------------------+</font></i> <font color="#000000">02:</font> <i><font color="#9A1900">% | test for Prolog source |</font></i> <font color="#000000">03:</font> <i><font color="#9A1900">% |______________________________|</font></i> <font color="#000000">04:</font> <font color="#000000">05:</font> <b><font color="#000000">isinteger</font></b><font color="#990000">(</font><font color="#009900">X</font><font color="#990000">,</font> <font color="#009900">L</font><font color="#990000">)</font> <font color="#990000">:-</font> <b><font color="#000000">type</font></b><font color="#990000">(</font><font color="#009900">X</font><font color="#990000">,</font> int<font color="#990000">,</font> <font color="#009900">L</font><font color="#990000">).</font> <font color="#000000">06:</font> <font color="#000000">07:</font> <i><font color="#9A1900">% booleans</font></i> <font color="#000000">08:</font> <b><font color="#000000">type</font></b><font color="#990000">(</font>true<font color="#990000">,</font> bool<font color="#990000">,</font> <font color="#009900">_</font><font color="#990000">).</font> <font color="#000000">09:</font> <b><font color="#000000">type</font></b><font color="#990000">(</font>false<font color="#990000">,</font> bool<font color="#990000">,</font> <font color="#009900">_</font><font color="#990000">).</font> <font color="#000000">10:</font> <font color="#000000">11:</font> <b><font color="#000000">type</font></b><font color="#990000">(</font> <b><font color="#0000FF">and</font></b><font color="#990000">(</font><font color="#009900">X</font><font color="#990000">,</font><font color="#009900">Y</font><font color="#990000">),</font> bool<font color="#990000">,</font> <font color="#009900">L</font><font color="#990000">)</font> <font color="#990000">:-</font> <b><font color="#000000">isboolean</font></b><font color="#990000">(</font><font color="#009900">X</font><font color="#990000">,</font><font color="#009900">L</font><font color="#990000">),</font> <b><font color="#000000">isboolean</font></b><font color="#990000">(</font><font color="#009900">Y</font><font color="#990000">,</font><font color="#009900">L</font><font color="#990000">).</font> <font color="#000000">12:</font> <b><font color="#000000">type</font></b><font color="#990000">(</font> <b><font color="#0000FF">or</font></b><font color="#990000">(</font><font color="#009900">X</font><font color="#990000">,</font><font color="#009900">Y</font><font color="#990000">),</font> bool<font color="#990000">,</font> <font color="#009900">L</font><font color="#990000">)</font> <font color="#990000">:-</font> <b><font color="#000000">isboolean</font></b><font color="#990000">(</font><font color="#009900">X</font><font color="#990000">,</font><font color="#009900">L</font><font color="#990000">),</font> <b><font color="#000000">isboolean</font></b><font color="#990000">(</font><font color="#009900">Y</font><font color="#990000">,</font><font color="#009900">L</font><font color="#990000">).</font> <font color="#000000">13:</font> <b><font color="#000000">type</font></b><font color="#990000">(</font> <b><font color="#0000FF">not</font></b><font color="#990000">(</font><font color="#009900">X</font><font color="#990000">),</font> bool<font color="#990000">,</font> <font color="#009900">L</font><font color="#990000">)</font> <font color="#990000">:-</font> <b><font color="#000000">isboolean</font></b><font color="#990000">(</font><font color="#009900">X</font><font color="#990000">,</font><font color="#009900">L</font><font color="#990000">).</font> <font color="#000000">14:</font> <font color="#000000">15:</font> <b><font color="#000000">type</font></b><font color="#990000">(</font> <b><font color="#000000">succ</font></b><font color="#990000">(</font><font color="#009900">X</font><font color="#990000">),</font> int<font color="#990000">,</font> <font color="#009900">L</font> <font color="#990000">)</font> <font color="#990000">:-</font> <b><font color="#000000">isinteger</font></b><font color="#990000">(</font><font color="#009900">X</font><font color="#990000">,</font><font color="#009900">L</font><font color="#990000">).</font> <font color="#000000">16:</font> <b><font color="#000000">type</font></b><font color="#990000">(</font> <b><font color="#000000">pred</font></b><font color="#990000">(</font><font color="#009900">X</font><font color="#990000">),</font> int<font color="#990000">,</font> <font color="#009900">L</font> <font color="#990000">)</font> <font color="#990000">:-</font> <b><font color="#000000">isinteger</font></b><font color="#990000">(</font><font color="#009900">X</font><font color="#990000">,</font><font color="#009900">L</font><font color="#990000">).</font> <font color="#000000">17:</font> <b><font color="#000000">type</font></b><font color="#990000">(</font> <b><font color="#000000">iszero</font></b><font color="#990000">(</font><font color="#009900">X</font><font color="#990000">),</font> bool<font color="#990000">,</font> <font color="#009900">L</font> <font color="#990000">)</font> <font color="#990000">:-</font> <b><font color="#000000">isinteger</font></b><font color="#990000">(</font><font color="#009900">X</font><font color="#990000">,</font><font color="#009900">L</font><font color="#990000">).</font> <font color="#000000">18:</font> <b><font color="#000000">type</font></b><font color="#990000">(</font> <font color="#009900">X</font> <font color="#990000">&lt;</font> <font color="#009900">Y</font><font color="#990000">,</font> bool<font color="#990000">,</font> <font color="#009900">L</font> <font color="#990000">)</font> <font color="#990000">:-</font> <b><font color="#000000">isinteger</font></b><font color="#990000">(</font><font color="#009900">X</font><font color="#990000">,</font><font color="#009900">L</font><font color="#990000">),</font> <b><font color="#000000">isinteger</font></b><font color="#990000">(</font><font color="#009900">Y</font><font color="#990000">,</font><font color="#009900">L</font><font color="#990000">).</font> <font color="#000000">19:</font> <font color="#000000">20:</font> <i><font color="#9A1900">% is_member(X,L) check whether X is in the list</font></i> <font color="#000000">21:</font> <i><font color="#9A1900">% by using unification with occur check</font></i> <font color="#000000">22:</font> <font color="#000000">23:</font> <b><font color="#000000">is_member</font></b><font color="#990000">(</font><font color="#009900">_</font><font color="#990000">,</font> <font color="#990000">[])</font> <font color="#990000">:-</font> <b><font color="#0000FF">fail</font></b><font color="#990000">.</font> <font color="#000000">24:</font> <b><font color="#000000">is_member</font></b><font color="#990000">(</font><font color="#009900">X</font><font color="#990000">,</font> <font color="#990000">[</font><font color="#009900">Y</font> <font color="#990000">|</font> <font color="#009900">_</font><font color="#990000">])</font> <font color="#990000">:-</font> <b><font color="#000000">unify</font></b><font color="#990000">(</font><font color="#009900">X</font><font color="#990000">,</font><font color="#009900">Y</font><font color="#990000">).</font> <font color="#000000">25:</font> <b><font color="#000000">is_member</font></b><font color="#990000">(</font><font color="#009900">X</font><font color="#990000">,</font> <font color="#990000">[</font><font color="#009900">_</font> <font color="#990000">|</font> <font color="#009900">List</font><font color="#990000">])</font> <font color="#990000">:-</font> <b><font color="#000000">is_member</font></b><font color="#990000">(</font><font color="#009900">X</font><font color="#990000">,</font> <font color="#009900">List</font><font color="#990000">).</font> <font color="#000000">26:</font> </tt></pre> ����������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/tests/test.isolate.html������������������������������������������������������0000644�0001750�0001750�00000001646�11672675566�016411� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<!-- Generator: GNU source-highlight by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite --> <pre><tt><font color="#FF6600">Hi</font>, t<font color="#FF6600">hi</font>s <b><font color="#0000FF">class</font></b> will be <font color="#FF6600">hi</font>ghlighted as keyword Also <b><font color="#0000FF">first</font></b> and <b><font color="#0000FF">second</font></b>, but not firstsecond and in inside<font color="#009900">for</font>foo <font color="#009900">for</font> will be <font color="#FF6600">hi</font>ghlighted as type in other<b><font color="#000080">wise</font></b> we <font color="#FF6600">exp</font>ect <b><font color="#000080">wise</font></b> to be <font color="#FF6600">hi</font>ghlighted a<b><font color="#000080">gain</font></b> (and also <b><font color="#000080">gain</font></b>) In<font color="#FF0000">red</font> the color is <font color="#FF6600">hi</font>ghlighted!</tt></pre> ������������������������������������������������������������������������������������������source-highlight-3.1.6/tests/test_comments.pm.html��������������������������������������������������0000644�0001750�0001750�00000000747�11672675567�017274� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<!-- Generator: GNU source-highlight by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite --> <pre><tt><i><font color="#9A1900"># some tests for comments # yep</font></i> <i><font color="#9A1900">=head1 title1 </font></i> <i><font color="#9A1900">This is pod Documentation</font></i> <i><font color="#9A1900">=head2</font></i> <i><font color="#9A1900"> Here a not pod item: =head3</font></i> <i><font color="#9A1900">=cut</font></i> </tt></pre> �������������������������source-highlight-3.1.6/tests/test.htm���������������������������������������������������������������0000644�0001750�0001750�00000015101�11672675566�014565� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta name="GENERATOR" content="GNU source-highlight by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite"> <title>Java formatted in html</title> </head> <body bgcolor="white"> <pre><tt><i><font color="#9A1900">/*</font></i> <i><font color="#9A1900"> This is a classical Hello program</font></i> <i><font color="#9A1900"> to test source-highlight with Java programs.</font></i> <i><font color="#9A1900"> </font></i> <i><font color="#9A1900"> to have an html translation type</font></i> <i><font color="#9A1900"> source-highlight -s java -f html --input Hello.java --output Hello.html</font></i> <i><font color="#9A1900"> source-highlight -s java -f html &lt; Hello.java &gt; Hello.html</font></i> <i><font color="#9A1900"> or type source-highlight --help for the list of options</font></i> <i><font color="#9A1900"> written by</font></i> <i><font color="#9A1900"> Lorenzo Bettini</font></i> <i><font color="#9A1900"> </font></i><u><font color="#0000FF">http://www.lorenzobettini.it</font></u> <i><font color="#9A1900"> </font></i><u><font color="#0000FF">http://www.gnu.org/software/src-highlite</font></u> <i><font color="#9A1900">*/</font></i> <b><font color="#000080">package</font></b> hello<font color="#990000">;</font> <b><font color="#000080">import</font></b> java<font color="#990000">.</font>io<font color="#990000">.*</font> <font color="#990000">;</font> <i><font color="#9A1900">/**</font></i> <i><font color="#9A1900"> * </font></i><b><font color="#0000FF">&lt;p&gt;</font></b> <i><font color="#9A1900"> * A simple Hello World class, used to demonstrate some</font></i> <i><font color="#9A1900"> * features of Java source highlighting.</font></i> <i><font color="#9A1900"> * </font></i><b><font color="#0000FF">&lt;/p&gt;</font></b> <i><font color="#9A1900"> * </font></i><b>TODO:</b><i><font color="#9A1900"> nothing, just to show an highlighted </font></i><b>TODO</b><i><font color="#9A1900"> or </font></i><b>FIXME</b> <i><font color="#9A1900"> *</font></i> <i><font color="#9A1900"> * </font></i><font color="#009900">@author</font><i><font color="#9A1900"> Lorenzo Bettini</font></i> <i><font color="#9A1900"> * </font></i><font color="#009900">@version</font><i><font color="#9A1900"> 2.0</font></i> <i><font color="#9A1900"> */</font></i> <i><font color="#9A1900">/// class</font></i> <b><font color="#0000FF">public</font></b> <b><font color="#0000FF">class</font></b> <font color="#008080">Hello</font> <font color="#FF0000">{</font> <font color="#009900">int</font> foo <font color="#990000">=</font> <font color="#993399">1998</font> <font color="#990000">;</font> <font color="#009900">int</font> hex_foo <font color="#990000">=</font> <font color="#993399">0xCAFEBABE</font><font color="#990000">;</font> <font color="#009900">boolean</font> b <font color="#990000">=</font> <b><font color="#0000FF">false</font></b><font color="#990000">;</font> <font color="#008080">Integer</font> i <font color="#990000">=</font> <b><font color="#0000FF">null</font></b> <font color="#990000">;</font> <font color="#009900">char</font> c <font color="#990000">=</font> <font color="#FF0000">'</font><font color="#CC33CC">\'</font><font color="#FF0000">'</font><font color="#990000">,</font> d <font color="#990000">=</font> <font color="#FF0000">'n'</font><font color="#990000">,</font> e <font color="#990000">=</font> <font color="#FF0000">'</font><font color="#CC33CC">\\</font><font color="#FF0000">'</font> <font color="#990000">;</font> <font color="#008080">String</font> xml <font color="#990000">=</font> <font color="#FF0000">"&lt;tag attr=</font><font color="#CC33CC">\"</font><font color="#FF0000">value</font><font color="#CC33CC">\"</font><font color="#FF0000">&gt;&amp;auml;&lt;/tag&gt;"</font><font color="#990000">,</font> foo2 <font color="#990000">=</font> <font color="#FF0000">"</font><font color="#CC33CC">\\</font><font color="#FF0000">"</font> <font color="#990000">;</font> <i><font color="#9A1900">/* mymethod */</font></i> <b><font color="#0000FF">public</font></b> <font color="#009900">void</font> <b><font color="#000000">mymethod</font></b><font color="#990000">(</font><font color="#009900">int</font> i<font color="#990000">)</font> <font color="#FF0000">{</font> <i><font color="#9A1900">// just a foo method</font></i> <font color="#FF0000">}</font> <i><font color="#9A1900">/* mymethod */</font></i> <i><font color="#9A1900">/* main */</font></i> <b><font color="#0000FF">public</font></b> <b><font color="#0000FF">static</font></b> <font color="#009900">void</font> <b><font color="#000000">main</font></b><font color="#990000">(</font> <font color="#008080">String</font> args<font color="#990000">[]</font> <font color="#990000">)</font> <font color="#FF0000">{</font> <i><font color="#9A1900">// just some greetings ;-) /*</font></i> System<font color="#990000">.</font>out<font color="#990000">.</font><b><font color="#000000">println</font></b><font color="#990000">(</font> <font color="#FF0000">"Hello from java2html :-)"</font> <font color="#990000">)</font> <font color="#990000">;</font> System<font color="#990000">.</font>out<font color="#990000">.</font><b><font color="#000000">println</font></b><font color="#990000">(</font> <font color="#FF0000">"</font><font color="#CC33CC">\t</font><font color="#FF0000">by Lorenzo Bettini"</font> <font color="#990000">)</font> <font color="#990000">;</font> System<font color="#990000">.</font>out<font color="#990000">.</font><b><font color="#000000">println</font></b><font color="#990000">(</font> <font color="#FF0000">"</font><font color="#CC33CC">\t</font><font color="#FF0000">http://www.lorenzobettini.it"</font> <font color="#990000">)</font> <font color="#990000">;</font> <b><font color="#0000FF">if</font></b> <font color="#990000">(</font>argc <font color="#990000">&gt;</font> <font color="#993399">0</font><font color="#990000">)</font> <font color="#008080">String</font> param <font color="#990000">=</font> argc<font color="#990000">[</font><font color="#993399">0</font><font color="#990000">];</font> <i><font color="#9A1900">//System.out.println( "bye bye... :-D" ) ; // see you soon</font></i> <font color="#FF0000">}</font> <i><font color="#9A1900">/* main */</font></i> <font color="#FF0000">}</font> <i><font color="#9A1900">/// class</font></i> <i><font color="#9A1900">// end of file test.java</font></i></tt></pre> </body> </html> <!-- this is an added HTML comment at the end of the file --> ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/tests/debug.java.html��������������������������������������������������������0000644�0001750�0001750�00000002277�11672675565�016001� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<!-- Generator: GNU source-highlight by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite --> <pre><tt><i><font color="#9A1900">/*</font></i> <i><font color="#9A1900"> This is to demonstrate --debug-lang</font></i> <i><font color="#9A1900"> </font></i><u><font color="#0000FF">http://www.lorenzobettini.it</font></u> <i><font color="#9A1900">*/</font></i> <b><font color="#000080">package</font></b> hello<font color="#990000">;</font> <b><font color="#0000FF">public</font></b> <b><font color="#0000FF">class</font></b> <font color="#008080">Hello</font> <font color="#FF0000">{</font> <i><font color="#9A1900">//</font></i><i><font color="#9A1900"> just some greetings ;-) /*</font></i> <font color="#009900">int</font> i <font color="#990000">=</font> <font color="#993399">10</font><font color="#990000">;</font> System<font color="#990000">.</font>out<font color="#990000">.</font><b><font color="#000000">println</font></b><font color="#990000">(</font><font color="#FF0000">"</font><font color="#FF0000">Hello World!</font><font color="#FF0000">"</font><font color="#990000">)</font><font color="#990000">;</font> <font color="#FF0000">}</font> </tt></pre> ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/tests/test.spec��������������������������������������������������������������0000644�0001750�0001750�00000002446�11672675566�014737� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# # spec file for package GNU Source Highlight (Version 1.x) # # Author: Christian W. Zuckschwerdt <zany@triq.net>, Jan 2003 # Summary: syntax highlighting for source documents Name: source-highlight Version: 3.0 Release: 3.0 License: GPL Group: Utilities/Console Source: ftp://ftp.gnu.org/gnu/source-highlight/%{name}-%{version}.tar.gz URL: http://www.gnu.org/software/src-highlite/ BuildRoot: %{_tmppath}/%{name}-%{version}-root %description This program, given a source file, produces a document with syntax highlighting. Both source languages and output formats can be specified with a simple syntax and added dynamically. At the moment this package can handle many programming languages, such as, e.g., Java, C/C++, Prolog, Perl, Php3, Python, Flex, ChangeLog, etc. as source languages, and some output formats such, as, e.g., HTML, XHTML, LaTeX, etc. %prep %setup -q %build ./configure $MYARCH_FLAGS \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ --datadir=%{_datadir} make %install rm -rf $RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT install %clean rm -rf $RPM_BUILD_ROOT %files %defattr(644, root, root, 755) %doc README COPYING ChangeLog TODO.txt AUTHORS THANKS %doc doc/*.html doc/*.css %attr(755,root,root) %{_prefix}/bin/* %{_datadir}/%{name}/* %{_mandir}/man?/* ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/tests/test2.pl.html����������������������������������������������������������0000644�0001750�0001750�00000027426�11672675567�015453� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<!-- Generator: GNU source-highlight by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite --> <pre><tt><i><font color="#9A1900">#! /usr/bin/env perl</font></i> <b><font color="#0000FF">use</font></b> strict<font color="#990000">;</font> <b><font color="#0000FF">use</font></b> warnings<font color="#990000">;</font> <font color="#FF0000">"I'm happy because of $x!"</font> <b><font color="#0000FF">qq</font></b><font color="#FF0000">~I'm happy because of $x!~</font> <b><font color="#0000FF">qq</font></b><font color="#FF0000">{I'm happy because of $x!}</font> <b><font color="#0000FF">qq</font></b><font color="#FF0000">|I'm happy because of $x!|</font> <b><font color="#0000FF">qq</font></b><font color="#FF0000">#I'm happy because of $x!#</font> <b><font color="#0000FF">qq</font></b><font color="#FF0000">!I'm happy because of $x\!!</font> <font color="#FF0000">'The variable is called $var.'</font> <b><font color="#0000FF">q</font></b><font color="#FF0000">~The variable is called $var.~</font> <b><font color="#0000FF">q</font></b><font color="#FF0000">|The variable is called $var.|</font> <b><font color="#0000FF">q</font></b><font color="#FF0000">{The variable is called $var.}</font> <b><font color="#0000FF">q</font></b><font color="#FF0000">[The variable is called $var.]</font> <b><font color="#0000FF">q</font></b><font color="#FF0000">#The variable is called $var.#</font> <b><font color="#0000FF">q</font></b><font color="#FF0000">!The variable is called $var.!</font> <b><font color="#0000FF">my</font></b> <font color="#009900">$port</font> <font color="#990000">=</font> <font color="#009900">$ARGV</font><font color="#990000">[</font><font color="#993399">0</font><font color="#990000">];</font> <i><font color="#9A1900"># prepare freqently used regexes</font></i> <b><font color="#0000FF">my</font></b> <font color="#009900">$trailing_comment</font> <font color="#990000">=</font> <b><font color="#0000FF">qr</font></b><font color="#FF6600">#;\s*\#.*#</font><font color="#990000">;</font> <b><font color="#0000FF">my</font></b> <font color="#009900">$leading_comment</font> <font color="#990000">=</font> <b><font color="#0000FF">qr</font></b><font color="#FF6600">|(?:^\|\n)\s*#.*|</font><font color="#990000">;</font> <b><font color="#0000FF">my</font></b> <font color="#009900">$leading_comment</font> <font color="#990000">=</font> <b><font color="#0000FF">qr</font></b><font color="#FF6600">&lt;(?:^\|\n)\s*#.*&gt;</font><font color="#990000">;</font> <b><font color="#0000FF">my</font></b> <font color="#009900">$leading_comment</font> <font color="#990000">=</font> <b><font color="#0000FF">qr</font></b><font color="#FF6600">[(?:^\|\n)\]\s*#.*]</font><font color="#990000">;</font> <b><font color="#0000FF">my</font></b> <font color="#009900">$connecting_backslash</font> <font color="#990000">=</font> <b><font color="#0000FF">qr</font></b><font color="#FF6600">@\s*\\\n\s*@</font><font color="#990000">;</font> <b><font color="#0000FF">my</font></b> <font color="#009900">$quick_check</font> <font color="#990000">=</font> <b><font color="#0000FF">qr</font></b><font color="#FF6600">{:</font><font color="#009900">$port</font><font color="#FF6600">}</font><b><font color="#0000FF">i</font></b><font color="#990000">;</font> <b><font color="#0000FF">my</font></b> <font color="#009900">$dependency</font> <font color="#990000">=</font> <b><font color="#0000FF">qr</font></b><font color="#FF6600">{depends_(?=[brl])(?:build|run|lib)(?:-(?:append|delete))?</font> <font color="#FF6600"> .*</font> <font color="#FF6600"> (?=[plb])(?:port|(?:path|lib|bin):[^:]+):(?i:</font><font color="#009900">${port}</font><font color="#FF6600">|</font><font color="#009900">$port</font><font color="#FF6600">)(\{\})(?:\s|$)}</font><b><font color="#0000FF">x</font></b><font color="#990000">;</font> <b><font color="#0000FF">my</font></b> <font color="#009900">$dependency</font> <font color="#990000">=</font> <b><font color="#0000FF">qr</font></b><font color="#FF6600">{</font> <font color="#FF6600"> (?=[plb])(?:port|(?:path|lib|bin):[^:]+)</font><i><font color="#9A1900"> # kind</font></i> <font color="#FF6600"> :</font><i><font color="#9A1900"> # separator</font></i> <font color="#FF6600"> (?i:</font><font color="#009900">${port}</font><font color="#FF6600">)(?:\s|$)</font><i><font color="#9A1900"> # name</font></i> <font color="#FF6600"> }</font><b><font color="#0000FF">x</font></b><font color="#990000">;</font> <font color="#009900">$/</font> <font color="#990000">=</font> <font color="#FF0000">".\n"</font><font color="#990000">;</font> <b><font color="#0000FF">while</font></b> <font color="#990000">(</font><b><font color="#0000FF">defined</font></b><font color="#990000">(</font><b><font color="#0000FF">my</font></b> <font color="#009900">$portfile</font> <font color="#990000">=</font> <font color="#FF0000">&lt;*/*/Portfile&gt;</font><font color="#990000">))</font> <font color="#FF0000">{</font> <font color="#009900">@ARGV</font> <font color="#990000">=</font> <font color="#009900">$portfile</font><font color="#990000">;</font> <b><font color="#0000FF">while</font></b> <font color="#990000">(</font><font color="#FF0000">&lt;&gt;</font><font color="#990000">)</font> <font color="#FF0000">{</font> <i><font color="#9A1900"># make a quick and dirty check if the port has a remote chance of</font></i> <i><font color="#9A1900"># depending on $port</font></i> <b><font color="#0000FF">if</font></b> <font color="#990000">(</font><font color="#009900">$_</font> <font color="#990000">=~</font> <b><font color="#0000FF">m</font></b><font color="#FF6600">\</font><font color="#009900">$quick_check</font><font color="#FF6600">|foo(.*)\</font><b><font color="#0000FF">i</font></b><font color="#990000">)</font> <font color="#FF0000">{</font> <b><font color="#0000FF">s</font></b><font color="#FF6600">#$connecting_backslash|a\#b#\# #</font><b><font color="#0000FF">g</font></b><font color="#990000">;</font> <i><font color="#9A1900"># merge backslash-connected lines</font></i> <b><font color="#0000FF">s</font></b><font color="#FF6600">#$connecting_backslash|a\#b#\# #</font><font color="#990000">;</font> <i><font color="#9A1900"># merge backslash-connected lines</font></i> <b><font color="#0000FF">s</font></b><font color="#FF6600">#$connecting_backslash|a\###</font><font color="#990000">;</font> <i><font color="#9A1900"># merge backslash-connected lines</font></i> <b><font color="#0000FF">s</font></b><font color="#FF6600">/$leading_comment|a\/b/a\/b/</font><b><font color="#0000FF">g</font></b><font color="#990000">;</font> <i><font color="#9A1900"># remove leading comments</font></i> <b><font color="#0000FF">s</font></b><font color="#FF6600">{$trailing_comment|\}}{\}}</font><b><font color="#0000FF">g</font></b><font color="#990000">;</font> <i><font color="#9A1900"># remove trailing comments</font></i> <b><font color="#0000FF">s</font></b><font color="#FF6600">($trailing_comment|\))(\))</font><b><font color="#0000FF">g</font></b><font color="#990000">;</font> <i><font color="#9A1900"># remove trailing comments</font></i> <b><font color="#0000FF">s</font></b><font color="#FF6600">&lt;$trailing_comment|\&gt;&gt;&lt;\&gt;&gt;</font><b><font color="#0000FF">g</font></b><font color="#990000">;</font> <i><font color="#9A1900"># remove trailing comments</font></i> <b><font color="#0000FF">s</font></b><font color="#FF6600">[$trailing_comment|\]][a\]b]</font><b><font color="#0000FF">g</font></b><font color="#990000">;</font> <i><font color="#9A1900"># remove trailing comments</font></i> <b><font color="#0000FF">s</font></b><font color="#FF6600">|$trailing_comment\||a\|b|</font><b><font color="#0000FF">g</font></b><font color="#990000">;</font> <i><font color="#9A1900"># remove trailing comments</font></i> <b><font color="#0000FF">s</font></b><font color="#FF6600">@$trailing_comment|(a\@b)@(bar\@)@</font><b><font color="#0000FF">g</font></b><font color="#990000">;</font> <i><font color="#9A1900"># just for test</font></i> <b><font color="#0000FF">s</font></b><font color="#FF6600">_$connectingbackslash|a\_b_\_ _</font><b><font color="#0000FF">g</font></b><font color="#990000">;</font> <i><font color="#9A1900"># merge backslash-connected lines</font></i> <b><font color="#0000FF">s</font></b><font color="#FF6600">\$trailing_comment|(a\\b)\(bar\\)\</font><b><font color="#0000FF">g</font></b><font color="#990000">;</font> <i><font color="#9A1900"># just for test</font></i> <b><font color="#0000FF">s</font></b><font color="#FF6600">-[a\-z]{3}-fu-</font> <font color="#990000">;</font> <i><font color="#9A1900"># just for test</font></i> <b><font color="#0000FF">s</font></b><font color="#FF6600">^\^foo^fu^</font> <font color="#990000">;</font> <i><font color="#9A1900"># just for test</font></i> <b><font color="#0000FF">s</font></b><font color="#FF6600">$foo(\w{3})\$$fu\$1$</font> <font color="#990000">;</font> <i><font color="#9A1900"># just for test</font></i> <b><font color="#0000FF">s</font></b><font color="#FF6600">!foo(\w{3})\!!fu\$1!</font> <font color="#990000">;</font> <i><font color="#9A1900"># just for test</font></i> <b><font color="#0000FF">s</font></b><font color="#FF6600">?foo(\w{3})\??fu\$1?</font> <font color="#990000">;</font> <i><font color="#9A1900"># just for test</font></i> <b><font color="#0000FF">s</font></b><font color="#FF6600">*foo(\w{3})\**fu\$1*</font> <font color="#990000">;</font> <i><font color="#9A1900"># just for test</font></i> <i><font color="#9A1900"># let's some more exotic syntaxes ;-)</font></i> <b><font color="#0000FF">s</font></b><font color="#FF6600">?foo(\w{3})\?\$?!fu\!1!</font> <font color="#990000">;</font> <i><font color="#9A1900"># just for test</font></i> <b><font color="#0000FF">s</font></b><font color="#FF6600">$foo(\w{3})\$$^fu\^\$1^</font> <font color="#990000">;</font> <i><font color="#9A1900"># just for test</font></i> <b><font color="#0000FF">s</font></b><font color="#FF6600">$foo(\w{3})\$$ ^fu\^\$1^</font> <font color="#990000">;</font> <i><font color="#9A1900"># just for test</font></i> <b><font color="#0000FF">s</font></b><font color="#FF6600">$foo(\w{3})\$$ ^fu\^\$1^</font><b><font color="#0000FF">g</font></b> <font color="#990000">;</font> <i><font color="#9A1900"># just for test</font></i> <b><font color="#0000FF">s</font></b><font color="#FF6600">#foo(\w{3})\## ^fu\^\$1^</font><b><font color="#0000FF">g</font></b> <font color="#990000">;</font> <i><font color="#9A1900"># just for test</font></i> <b><font color="#0000FF">s</font></b><font color="#FF6600">$foo(\w{3})\$$ #fu\#\$1#</font><b><font color="#0000FF">g</font></b> <font color="#990000">;</font> <i><font color="#9A1900"># just for test</font></i> <b><font color="#0000FF">if</font></b> <font color="#990000">(</font><font color="#009900">$_</font> <font color="#990000">=~</font> <b><font color="#0000FF">m</font></b><font color="#FF6600">{</font><font color="#009900">$dependency</font><font color="#FF6600">}</font><font color="#990000">)</font> <font color="#FF0000">{</font> <font color="#009900">$portfile</font> <font color="#990000">=~</font> <b><font color="#0000FF">s</font></b><font color="#FF6600">{/Portfile$}{}</font><font color="#990000">;</font> <i><font color="#9A1900"># remove trailing '/Portfile'</font></i> <b><font color="#0000FF">print</font></b> <font color="#FF0000">"$portfile\n"</font><font color="#990000">;</font> <font color="#FF0000">}</font> <font color="#FF0000">}</font> <font color="#FF0000">}</font> <font color="#FF0000">}</font> </tt></pre> ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/tests/test_xhtml_css_doc.html������������������������������������������������0000644�0001750�0001750�00000020763�11672675567�017665� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <meta name="GENERATOR" content="GNU source-highlight by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite" /> <meta name="INPUTLANG" content="java.lang" /> <title>source file</title> <link rel="stylesheet" href="../doc/mono.css" type="text/css" /> </head> <body> <pre><tt><span class="comment">/*</span> <span class="comment"> This is a classical Hello program</span> <span class="comment"> to test source-highlight with Java programs.</span> <span class="comment"> </span> <span class="comment"> to have an html translation type</span> <span class="comment"> source-highlight -s java -f html --input Hello.java --output Hello.html</span> <span class="comment"> source-highlight -s java -f html &lt; Hello.java &gt; Hello.html</span> <span class="comment"> or type source-highlight --help for the list of options</span> <span class="comment"> written by</span> <span class="comment"> Lorenzo Bettini</span> <span class="comment"> </span><span class="url">http://www.lorenzobettini.it</span> <span class="comment"> </span><span class="url">http://www.gnu.org/software/src-highlite</span> <span class="comment">*/</span> <span class="preproc">package</span><span class="normal"> hello</span><span class="symbol">;</span> <span class="preproc">import</span><span class="normal"> java</span><span class="symbol">.</span><span class="normal">io</span><span class="symbol">.*</span><span class="normal"> </span><span class="symbol">;</span> <span class="comment">/**</span> <span class="comment"> * </span><span class="keyword">&lt;p&gt;</span> <span class="comment"> * A simple Hello World class, used to demonstrate some</span> <span class="comment"> * features of Java source highlighting.</span> <span class="comment"> * </span><span class="keyword">&lt;/p&gt;</span> <span class="comment"> * </span><span class="todo">TODO:</span><span class="comment"> nothing, just to show an highlighted </span><span class="todo">TODO</span><span class="comment"> or </span><span class="todo">FIXME</span> <span class="comment"> *</span> <span class="comment"> * </span><span class="type">@author</span><span class="comment"> Lorenzo Bettini</span> <span class="comment"> * </span><span class="type">@version</span><span class="comment"> 2.0</span> <span class="comment"> */</span><span class="normal"> </span><span class="comment">/// class</span> <span class="keyword">public</span><span class="normal"> </span><span class="keyword">class</span><span class="normal"> </span><span class="classname">Hello</span><span class="normal"> </span><span class="cbracket">{</span> <span class="normal"> </span><span class="type">int</span><span class="normal"> foo </span><span class="symbol">=</span><span class="normal"> </span><span class="number">1998</span><span class="normal"> </span><span class="symbol">;</span> <span class="normal"> </span><span class="type">int</span><span class="normal"> hex_foo </span><span class="symbol">=</span><span class="normal"> </span><span class="number">0xCAFEBABE</span><span class="symbol">;</span> <span class="normal"> </span><span class="type">boolean</span><span class="normal"> b </span><span class="symbol">=</span><span class="normal"> </span><span class="keyword">false</span><span class="symbol">;</span> <span class="normal"> </span><span class="usertype">Integer</span><span class="normal"> i </span><span class="symbol">=</span><span class="normal"> </span><span class="keyword">null</span><span class="normal"> </span><span class="symbol">;</span> <span class="normal"> </span><span class="type">char</span><span class="normal"> c </span><span class="symbol">=</span><span class="normal"> </span><span class="string">'</span><span class="specialchar">\'</span><span class="string">'</span><span class="symbol">,</span><span class="normal"> d </span><span class="symbol">=</span><span class="normal"> </span><span class="string">'n'</span><span class="symbol">,</span><span class="normal"> e </span><span class="symbol">=</span><span class="normal"> </span><span class="string">'</span><span class="specialchar">\\</span><span class="string">'</span><span class="normal"> </span><span class="symbol">;</span> <span class="normal"> </span><span class="usertype">String</span><span class="normal"> xml </span><span class="symbol">=</span><span class="normal"> </span><span class="string">"&lt;tag attr=</span><span class="specialchar">\"</span><span class="string">value</span><span class="specialchar">\"</span><span class="string">&gt;&amp;auml;&lt;/tag&gt;"</span><span class="symbol">,</span><span class="normal"> foo2 </span><span class="symbol">=</span><span class="normal"> </span><span class="string">"</span><span class="specialchar">\\</span><span class="string">"</span><span class="normal"> </span><span class="symbol">;</span> <span class="normal"> </span><span class="comment">/* mymethod */</span> <span class="normal"> </span><span class="keyword">public</span><span class="normal"> </span><span class="type">void</span><span class="normal"> </span><span class="function">mymethod</span><span class="symbol">(</span><span class="type">int</span><span class="normal"> i</span><span class="symbol">)</span><span class="normal"> </span><span class="cbracket">{</span> <span class="normal"> </span><span class="comment">// just a foo method</span> <span class="normal"> </span><span class="cbracket">}</span> <span class="normal"> </span><span class="comment">/* mymethod */</span> <span class="normal"> </span> <span class="normal"> </span><span class="comment">/* main */</span> <span class="normal"> </span><span class="keyword">public</span><span class="normal"> </span><span class="keyword">static</span><span class="normal"> </span><span class="type">void</span><span class="normal"> </span><span class="function">main</span><span class="symbol">(</span><span class="normal"> </span><span class="usertype">String</span><span class="normal"> args</span><span class="symbol">[]</span><span class="normal"> </span><span class="symbol">)</span><span class="normal"> </span><span class="cbracket">{</span> <span class="normal"> </span><span class="comment">// just some greetings ;-) /*</span> <span class="normal"> System</span><span class="symbol">.</span><span class="normal">out</span><span class="symbol">.</span><span class="function">println</span><span class="symbol">(</span><span class="normal"> </span><span class="string">"Hello from java2html :-)"</span><span class="normal"> </span><span class="symbol">)</span><span class="normal"> </span><span class="symbol">;</span> <span class="normal"> System</span><span class="symbol">.</span><span class="normal">out</span><span class="symbol">.</span><span class="function">println</span><span class="symbol">(</span><span class="normal"> </span><span class="string">"</span><span class="specialchar">\t</span><span class="string">by Lorenzo Bettini"</span><span class="normal"> </span><span class="symbol">)</span><span class="normal"> </span><span class="symbol">;</span> <span class="normal"> System</span><span class="symbol">.</span><span class="normal">out</span><span class="symbol">.</span><span class="function">println</span><span class="symbol">(</span><span class="normal"> </span><span class="string">"</span><span class="specialchar">\t</span><span class="string">http://www.lorenzobettini.it"</span><span class="normal"> </span><span class="symbol">)</span><span class="normal"> </span><span class="symbol">;</span> <span class="normal"> </span><span class="keyword">if</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">argc </span><span class="symbol">&gt;</span><span class="normal"> </span><span class="number">0</span><span class="symbol">)</span> <span class="normal"> </span><span class="usertype">String</span><span class="normal"> param </span><span class="symbol">=</span><span class="normal"> argc</span><span class="symbol">[</span><span class="number">0</span><span class="symbol">];</span> <span class="normal"> </span><span class="comment">//System.out.println( "bye bye... :-D" ) ; // see you soon</span> <span class="normal"> </span><span class="cbracket">}</span> <span class="normal"> </span><span class="comment">/* main */</span> <span class="cbracket">}</span> <span class="comment">/// class</span> <span class="comment">// end of file test.java</span></tt></pre> </body> </html> �������������source-highlight-3.1.6/tests/wrong_syntax_simple.err������������������������������������������������0000644�0001750�0001750�00000000051�11672675567�017720� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������wrong_syntax_simple.lang:1: syntax error ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/tests/test_vardecl.cc.html���������������������������������������������������0000644�0001750�0001750�00000003266�11672675567�017037� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<!-- Generator: GNU source-highlight by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite --> <pre><tt><font color="#008080">Integer</font> i <font color="#990000">=</font> <font color="#993399">10</font><font color="#990000">;</font> <font color="#008080">Boolean</font> b<font color="#990000">;</font> <font color="#008080">String</font> args<font color="#990000">[];</font> <b><font color="#0000FF">const</font></b> <font color="#008080">MyType</font> args<font color="#990000">[];</font> <b><font color="#0000FF">const</font></b> <font color="#008080">My_Type</font> args<font color="#990000">[];</font> <font color="#008080">List&lt;Integer&gt;</font> mylist<font color="#990000">;</font> <font color="#008080">List&lt;List&lt;Integer&gt; &gt;</font> mylist<font color="#990000">;</font> myspace<font color="#990000">::</font><font color="#008080">InputStream</font> iStream <font color="#990000">;</font> <font color="#008080">MyType</font> <font color="#990000">*</font>t<font color="#990000">;</font> <font color="#008080">MyType</font> <font color="#990000">**</font>t<font color="#990000">;</font> <b><font color="#0000FF">const</font></b> <font color="#008080">MyType</font> <font color="#990000">&amp;</font>t<font color="#990000">;</font> <b><font color="#0000FF">if</font></b> <font color="#990000">(</font>argc <font color="#990000">&gt;</font> <font color="#993399">0</font><font color="#990000">)</font> <font color="#FF0000">{</font> <font color="#FF0000">}</font> <font color="#008080">__mytype</font> _i<font color="#990000">;</font> <b><font color="#0000FF">typedef</font></b> <font color="#008080">_mytype</font> __i<font color="#990000">;</font> </tt></pre> ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/tests/test.fixed-fortran.html������������������������������������������������0000644�0001750�0001750�00000005103�11672675566�017511� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<!-- Generator: GNU source-highlight by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite --> <pre><tt>doc <font color="#990000">=&gt;</font> <b><font color="#000000">parseFile</font></b><font color="#990000">(</font><font color="#FF0000">"output.xml"</font><font color="#990000">,</font> <b><font color="#0000FF">iostat</font></b><font color="#990000">=</font>i<font color="#990000">)</font> <b><font color="#0000FF">if</font></b> <font color="#990000">(</font>i<font color="#990000">/=</font><font color="#993399">0</font><font color="#990000">)</font> <b><font color="#0000FF">then</font></b> <b><font color="#0000FF">print</font></b><font color="#990000">*,</font> <font color="#FF0000">"Could not open XML file"</font> <i><font color="#9A1900">! call goAndDoSomethingElseInstead()</font></i> <b><font color="#0000FF">print</font></b><font color="#990000">*,</font> <font color="#FF0000">"A string with \"" escaped chars"</font> <b><font color="#0000FF">endif</font></b> <i><font color="#9A1900">c = 1</font></i> <font color="#009900">double</font> <font color="#009900">precision</font> x x <font color="#990000">=</font> <font color="#993399">1.234e5</font> <i><font color="#9A1900">! single</font></i> x <font color="#990000">=</font> <font color="#993399">1.234d5</font> <i><font color="#9A1900">! double</font></i> x <font color="#990000">=</font> <font color="#993399">1.234q5</font> <i><font color="#9A1900">! quad</font></i> x <font color="#990000">=</font> <font color="#993399">b'1001010'</font> <i><font color="#9A1900">! binary</font></i> x <font color="#990000">=</font> <font color="#993399">o'1271530'</font> <i><font color="#9A1900">! octal</font></i> x <font color="#990000">=</font> <font color="#993399">z'235A7F0'</font> <i><font color="#9A1900">! hex (no idea why it's z and not x)</font></i> <i><font color="#9A1900">! 15 significant digits and range of (1e-307, 1e307)</font></i> <font color="#009900">integer</font><font color="#990000">,</font> <b><font color="#0000FF">parameter</font></b> <font color="#990000">::</font> wp <font color="#990000">=</font> <b><font color="#000000">selected_real_kind</font></b><font color="#990000">(</font><font color="#993399">15</font><font color="#990000">,</font> <font color="#993399">307</font><font color="#990000">)</font> <font color="#009900">real</font><font color="#990000">(</font>wp<font color="#990000">)</font> <font color="#990000">::</font> x <font color="#990000">=</font> <font color="#993399">1.234e5_wp</font> <i><font color="#9A1900">! working precision</font></i> </tt></pre> �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/tests/error.log��������������������������������������������������������������0000644�0001750�0001750�00000034176�11672675565�014744� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������[Wed May 19 23:50:20 2004] [notice] Digest: generating secret for digest authentication ... [Wed May 19 23:50:20 2004] [notice] Digest: done [Wed May 19 23:50:21 2004] [notice] Apache/2.0.49 (Gentoo/Linux) configured -- resuming normal operations [Wed May 19 23:50:35 2004] [error] [client 127.0.0.1] client denied by server configuration: /var/www/localhost/validator [Wed May 19 23:51:44 2004] [notice] caught SIGTERM, shutting down [Wed May 19 23:51:46 2004] [notice] Digest: generating secret for digest authentication ... [Wed May 19 23:51:46 2004] [notice] Digest: done [Wed May 19 23:51:47 2004] [notice] Apache/2.0.49 (Gentoo/Linux) configured -- resuming normal operations [Wed May 19 23:53:35 2004] [notice] caught SIGTERM, shutting down [Wed May 19 23:53:37 2004] [notice] Digest: generating secret for digest authentication ... [Wed May 19 23:53:37 2004] [notice] Digest: done [Wed May 19 23:53:38 2004] [notice] Apache/2.0.49 (Gentoo/Linux) configured -- resuming normal operations [Wed May 19 23:56:07 2004] [notice] caught SIGTERM, shutting down [Wed May 19 23:56:09 2004] [notice] Apache/2.0.49 (Gentoo/Linux) configured -- resuming normal operations [Wed May 19 23:56:38 2004] [error] [client 127.0.0.1] [Wed May 19 23:56:38 2004] check: Can't locate Config/General.pm in @INC (@INC contains: /etc/perl /usr/lib/perl5/site_perl/5.8.2/i686-linux /usr/lib/perl5/site_perl/5.8.2 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.2/i686-linux /usr/lib/perl5/vendor_perl/5.8.2 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.2/i686-linux /usr/lib/perl5/5.8.2 /usr/local/lib/site_perl) at /var/www/localhost/validator/htdocs/check line 46., referer: http://localhost/validator/ [Wed May 19 23:56:38 2004] [error] [client 127.0.0.1] [Wed May 19 23:56:38 2004] check: BEGIN failed--compilation aborted at /var/www/localhost/validator/htdocs/check line 46., referer: http://localhost/validator/ [Wed May 19 23:57:13 2004] [error] [client 127.0.0.1] [Wed May 19 23:57:13 2004] check: Can't locate Net/IP.pm in @INC (@INC contains: /etc/perl /usr/lib/perl5/site_perl/5.8.2/i686-linux /usr/lib/perl5/site_perl/5.8.2 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.2/i686-linux /usr/lib/perl5/vendor_perl/5.8.2 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.2/i686-linux /usr/lib/perl5/5.8.2 /usr/local/lib/site_perl) at /var/www/localhost/validator/htdocs/check line 53., referer: http://localhost/validator/ [Wed May 19 23:57:13 2004] [error] [client 127.0.0.1] [Wed May 19 23:57:13 2004] check: BEGIN failed--compilation aborted at /var/www/localhost/validator/htdocs/check line 53., referer: http://localhost/validator/ [Wed May 19 23:58:03 2004] [error] [client 127.0.0.1] [Wed May 19 23:58:03 2004] check: Can't locate Set/IntSpan.pm in @INC (@INC contains: /etc/perl /usr/lib/perl5/site_perl/5.8.2/i686-linux /usr/lib/perl5/site_perl/5.8.2 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.2/i686-linux /usr/lib/perl5/vendor_perl/5.8.2 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.2/i686-linux /usr/lib/perl5/5.8.2 /usr/local/lib/site_perl) at /var/www/localhost/validator/htdocs/check line 54., referer: http://localhost/validator/ [Wed May 19 23:58:03 2004] [error] [client 127.0.0.1] [Wed May 19 23:58:03 2004] check: BEGIN failed--compilation aborted at /var/www/localhost/validator/htdocs/check line 54., referer: http://localhost/validator/ [Wed May 19 23:58:41 2004] [error] [client 127.0.0.1] [Wed May 19 23:58:41 2004] check: open(/etc/w3c/validator.conf) returned: No such file or directory, referer: http://localhost/validator/ [Wed May 19 23:58:41 2004] [error] [client 127.0.0.1] [Wed May 19 23:58:41 2004] check: (Did you forget to set $ENV{W3C_VALIDATOR_CFG}, referer: http://localhost/validator/ [Wed May 19 23:58:41 2004] [error] [client 127.0.0.1] [Wed May 19 23:58:41 2004] check: or to copy validator.conf to /etc/w3c/validator.conf?), referer: http://localhost/validator/ [Wed May 19 23:58:41 2004] [error] [client 127.0.0.1] [Wed May 19 23:58:41 2004] check: BEGIN failed--compilation aborted at /var/www/localhost/validator/htdocs/check line 190., referer: http://localhost/validator/ [Thu May 20 00:03:37 2004] [error] [client 127.0.0.1] [Thu May 20 00:03:37 2004] check: Use of uninitialized value in substitution (s///) at /var/www/localhost/validator/htdocs/check line 2261., referer: http://localhost/validator/check?uri=http%3A%2F%2Flocalhost%2Fvalidator&charset=%28detect+automatically%29&doctype=Inline&outline=1&verbose=1 [Thu May 20 00:03:37 2004] [error] [client 127.0.0.1] [Thu May 20 00:03:37 2004] check: Use of uninitialized value in substitution (s///) at /var/www/localhost/validator/htdocs/check line 2262., referer: http://localhost/validator/check?uri=http%3A%2F%2Flocalhost%2Fvalidator&charset=%28detect+automatically%29&doctype=Inline&outline=1&verbose=1 [Thu May 20 00:03:37 2004] [error] [client 127.0.0.1] [Thu May 20 00:03:37 2004] check: Use of uninitialized value in substitution (s///) at /var/www/localhost/validator/htdocs/check line 2263., referer: http://localhost/validator/check?uri=http%3A%2F%2Flocalhost%2Fvalidator&charset=%28detect+automatically%29&doctype=Inline&outline=1&verbose=1 [Thu May 20 00:03:37 2004] [error] [client 127.0.0.1] [Thu May 20 00:03:37 2004] check: Use of uninitialized value in substitution (s///) at /var/www/localhost/validator/htdocs/check line 2264., referer: http://localhost/validator/check?uri=http%3A%2F%2Flocalhost%2Fvalidator&charset=%28detect+automatically%29&doctype=Inline&outline=1&verbose=1 [Thu May 20 00:03:37 2004] [error] [client 127.0.0.1] [Thu May 20 00:03:37 2004] check: Use of uninitialized value in pattern match (m//) at /var/www/localhost/validator/htdocs/check line 2265., referer: http://localhost/validator/check?uri=http%3A%2F%2Flocalhost%2Fvalidator&charset=%28detect+automatically%29&doctype=Inline&outline=1&verbose=1 [Thu May 20 00:03:37 2004] [error] [client 127.0.0.1] [Thu May 20 00:03:37 2004] check: Use of uninitialized value in pattern match (m//) at /var/www/localhost/validator/htdocs/check line 2267., referer: http://localhost/validator/check?uri=http%3A%2F%2Flocalhost%2Fvalidator&charset=%28detect+automatically%29&doctype=Inline&outline=1&verbose=1 [Thu May 20 00:04:07 2004] [notice] caught SIGTERM, shutting down [Tue Jun 01 20:56:40 2004] [notice] Digest: generating secret for digest authentication ... [Tue Jun 01 20:56:40 2004] [notice] Digest: done [Tue Jun 01 20:56:41 2004] [notice] Apache/2.0.49 (Gentoo/Linux) mod_perl/1.99_11 Perl/v5.8.2 configured -- resuming normal operations [Tue Jun 01 20:57:43 2004] [error] [client 127.0.0.1] File does not exist: /var/www/localhost/htdocs/manual, referer: http://localhost/ [Sat Jun 19 17:22:46 2004] [notice] Apache/2.0.49 (Gentoo/Linux) mod_perl/1.99_11 Perl/v5.8.2 PHP/4.3.6 configured -- resuming normal operations [Sat Jun 19 17:23:21 2004] [error] [client 1.1.1.1] File does not exist: /var/www/localhost/htdocs/favicon.ico [Sat Jun 19 17:25:55 2004] [error] [client 1.1.1.1] client denied by server configuration: /var/www/localhost/WebSVN/index.php, referer: http://localhost/svn/ [Sat Jun 19 17:25:55 2004] [error] [client 1.1.1.1] Negotiation: discovered file(s) matching request: /var/www/localhost/WebSVN/index (None could be negotiated)., referer: http://localhost/svn/ [Sat Jun 19 17:26:15 2004] [error] [client 1.1.1.1] client denied by server configuration: /var/www/localhost/WebSVN/index.php, referer: http://localhost/svn/ [Sat Jun 19 17:26:15 2004] [error] [client 1.1.1.1] Negotiation: discovered file(s) matching request: /var/www/localhost/WebSVN/index (None could be negotiated)., referer: http://localhost/svn/ [Sat Jun 19 17:26:36 2004] [error] [client 1.1.1.1] client denied by server configuration: /var/www/localhost/WebSVN/index.php, referer: http://localhost/svn/ [Sat Jun 19 17:26:36 2004] [error] [client 1.1.1.1] Negotiation: discovered file(s) matching request: /var/www/localhost/WebSVN/index (None could be negotiated)., referer: http://localhost/svn/ [Sat Jun 19 17:41:11 2004] [error] [client 1.1.1.1] File does not exist: /var/www/localhost/htdocs/~jan [Sat Jun 19 17:41:50 2004] [notice] caught SIGTERM, shutting down [Sat Jun 19 17:41:53 2004] [notice] Apache/2.0.49 (Gentoo/Linux) mod_perl/1.99_11 Perl/v5.8.2 PHP/4.3.6 configured -- resuming normal operations [Sat Jun 19 17:42:43 2004] [error] [client 1.1.1.1] (13)Permission denied: access to /~jan/WebSVN denied [Sat Jun 19 17:43:22 2004] [error] [client 1.1.1.1] (13)Permission denied: access to /~jan/ denied [Sat Jun 19 18:22:56 2004] [notice] caught SIGTERM, shutting down [Sat Jun 19 18:22:58 2004] [notice] Apache/2.0.49 (Gentoo/Linux) mod_perl/1.99_11 Perl/v5.8.2 PHP/4.3.6 configured -- resuming normal operations [Sat Jun 19 18:23:08 2004] [error] [client 1.1.1.1] (13)Permission denied: access to /~jan/ denied [Sat Jun 19 18:23:11 2004] [error] [client 1.1.1.1] (13)Permission denied: access to /~jan/ denied [Sat Jun 19 18:29:35 2004] [notice] caught SIGTERM, shutting down [Sat Jun 19 18:29:37 2004] [notice] Apache/2.0.49 (Gentoo/Linux) mod_perl/1.99_11 Perl/v5.8.2 PHP/4.3.6 configured -- resuming normal operations [Sat Jun 19 18:29:59 2004] [error] [client 1.1.1.1] (13)Permission denied: access to /~jan/ denied [Sat Jun 19 18:30:08 2004] [error] [client 1.1.1.1] (13)Permission denied: access to /~jan/index.html denied [Sat Jun 19 18:39:32 2004] [notice] caught SIGTERM, shutting down [Sat Jun 19 18:39:34 2004] [notice] Apache/2.0.49 (Gentoo/Linux) mod_perl/1.99_11 Perl/v5.8.2 PHP/4.3.6 configured -- resuming normal operations [Sat Jun 19 18:39:39 2004] [error] [client 1.1.1.1] (13)Permission denied: access to /~jan/index.html denied [Sat Jun 19 18:39:43 2004] [error] [client 1.1.1.1] (13)Permission denied: access to /~jan/index.html denied [Sat Jun 19 18:43:44 2004] [notice] caught SIGTERM, shutting down [Sat Jun 19 18:43:46 2004] [notice] Apache/2.0.49 (Gentoo/Linux) mod_perl/1.99_11 Perl/v5.8.2 PHP/4.3.6 configured -- resuming normal operations [Sat Jun 19 18:56:49 2004] [error] [client 1.1.1.1] File does not exist: /var/www/localhost/htdocs/favicon.ico [Sat Jun 19 19:04:32 2004] [notice] caught SIGTERM, shutting down [Sat Jun 19 19:04:34 2004] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec2) [Sat Jun 19 19:04:35 2004] [notice] Apache/2.0.49 (Gentoo/Linux) mod_perl/1.99_11 Perl/v5.8.2 PHP/4.3.6 configured -- resuming normal operations [Sat Jun 19 23:30:02 2004] [notice] caught SIGTERM, shutting down [Wed Jun 23 19:43:32 2004] [notice] Apache/2.0.49 (Gentoo/Linux) mod_perl/1.99_11 Perl/v5.8.2 PHP/4.3.6 configured -- resuming normal operations [Wed Jun 23 23:06:06 2004] [notice] caught SIGTERM, shutting down [Sat Jun 26 21:05:26 2004] [notice] Apache/2.0.49 (Gentoo/Linux) mod_perl/1.99_11 Perl/v5.8.2 PHP/4.3.6 configured -- resuming normal operations [Sat Jun 26 21:05:41 2004] [error] [client 1.1.1.1] File does not exist: /var/www/localhost/htdocs/WebSVN [Sun Jun 27 00:32:47 2004] [notice] caught SIGTERM, shutting down [Wed Jun 30 22:03:31 2004] [notice] Apache/2.0.49 (Gentoo/Linux) mod_perl/1.99_11 Perl/v5.8.2 PHP/4.3.6 configured -- resuming normal operations [Wed Jun 30 22:16:44 2004] [error] [client 1.1.1.1] File does not exist: /var/www/localhost/htdocs/trac, referer: http://localhost/cgi-bin/trac.cgi [Wed Jun 30 22:32:22 2004] [notice] caught SIGTERM, shutting down [Wed Jun 30 22:32:26 2004] [notice] Apache/2.0.49 (Gentoo/Linux) mod_perl/1.99_11 Perl/v5.8.2 PHP/4.3.6 configured -- resuming normal operations [Wed Jun 30 22:32:39 2004] [error] [client 1.1.1.1] client denied by server configuration: /usr/share/webapps/trac/0.7.1/htdocs/css/trac.css, referer: http://localhost/cgi-bin/trac.cgi [Wed Jun 30 22:32:40 2004] [error] [client 1.1.1.1] client denied by server configuration: /usr/share/webapps/trac/0.7.1/htdocs/css/code.css, referer: http://localhost/cgi-bin/trac.cgi [Wed Jun 30 22:32:40 2004] [error] [client 1.1.1.1] client denied by server configuration: /usr/share/webapps/trac/0.7.1/htdocs/css/changeset.css, referer: http://localhost/cgi-bin/trac.cgi [Wed Jun 30 22:32:40 2004] [error] [client 1.1.1.1] client denied by server configuration: /usr/share/webapps/trac/0.7.1/htdocs/trac.js, referer: http://localhost/cgi-bin/trac.cgi [Wed Jun 30 22:32:40 2004] [error] [client 1.1.1.1] client denied by server configuration: /usr/share/webapps/trac/0.7.1/htdocs/trac_banner.png, referer: http://localhost/cgi-bin/trac.cgi [Wed Jun 30 22:32:40 2004] [error] [client 1.1.1.1] client denied by server configuration: /usr/share/webapps/trac/0.7.1/htdocs/trac_logo_mini.png, referer: http://localhost/cgi-bin/trac.cgi [Wed Jun 30 22:32:45 2004] [error] [client 1.1.1.1] client denied by server configuration: /usr/share/webapps/trac/0.7.1/htdocs/css/trac.css, referer: http://localhost/cgi-bin/trac.cgi/wiki/TracAdmin [Wed Jun 30 22:32:45 2004] [error] [client 1.1.1.1] client denied by server configuration: /usr/share/webapps/trac/0.7.1/htdocs/css/code.css, referer: http://localhost/cgi-bin/trac.cgi/wiki/TracAdmin [Wed Jun 30 22:32:45 2004] [error] [client 1.1.1.1] client denied by server configuration: /usr/share/webapps/trac/0.7.1/htdocs/css/changeset.css, referer: http://localhost/cgi-bin/trac.cgi/wiki/TracAdmin [Wed Jun 30 22:32:45 2004] [error] [client 1.1.1.1] client denied by server configuration: /usr/share/webapps/trac/0.7.1/htdocs/trac.js, referer: http://localhost/cgi-bin/trac.cgi/wiki/TracAdmin [Wed Jun 30 22:32:45 2004] [error] [client 1.1.1.1] client denied by server configuration: /usr/share/webapps/trac/0.7.1/htdocs/trac_banner.png, referer: http://localhost/cgi-bin/trac.cgi/wiki/TracAdmin [Wed Jun 30 22:32:45 2004] [error] [client 1.1.1.1] client denied by server configuration: /usr/share/webapps/trac/0.7.1/htdocs/trac_logo_mini.png, referer: http://localhost/cgi-bin/trac.cgi/wiki/TracAdmin [Wed Jun 30 22:33:22 2004] [error] [client 1.1.1.1] client denied by server configuration: /usr/share/webapps/trac/0.7.1/htdocs/css/trac.css [Wed Jun 30 22:34:11 2004] [notice] caught SIGTERM, shutting down [Wed Jun 30 22:34:16 2004] [notice] Apache/2.0.49 (Gentoo/Linux) mod_perl/1.99_11 Perl/v5.8.2 PHP/4.3.6 configured -- resuming normal operations [Thu Jul 01 00:05:11 2004] [notice] caught SIGTERM, shutting down [Thu Jul 01 00:08:05 2004] [notice] Apache/2.0.49 (Gentoo/Linux) mod_perl/1.99_11 Perl/v5.8.2 PHP/4.3.6 configured -- resuming normal operations [Thu Jul 01 00:20:20 2004] [notice] caught SIGTERM, shutting down ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/tests/test.ngroups�����������������������������������������������������������0000644�0001750�0001750�00000000212�11672675566�015467� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������This should highlight some Hello World strings, like Hello World!! or Hello world or Ciao Mondo? But not this one: hello World! let's see.��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/tests/test.xorg.html���������������������������������������������������������0000644�0001750�0001750�00000012034�11672675567�015722� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<!-- Generator: GNU source-highlight by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite --> <pre><tt><i><font color="#9A1900"># xorg.conf (xorg X Window System server configuration file)</font></i> <i><font color="#9A1900">#</font></i> <i><font color="#9A1900"># This file was generated by dexconf, the Debian X Configuration tool, using</font></i> <i><font color="#9A1900"># values from the debconf database.</font></i> <i><font color="#9A1900">#</font></i> <b><font color="#0000FF">Section</font></b> <font color="#FF0000">"Files"</font> <b><font color="#0000FF">EndSection</font></b> <b><font color="#0000FF">Section</font></b> <font color="#FF0000">"InputDevice"</font> <font color="#009900">Identifier</font> <font color="#FF0000">"Synaptics Touchpad"</font> <font color="#009900">Driver</font> <font color="#FF0000">"synaptics"</font> <font color="#009900">Option</font> <font color="#FF0000">"SendCoreEvents"</font> <font color="#FF0000">"true"</font> <font color="#009900">Option</font> <font color="#FF0000">"Device"</font> <font color="#FF0000">"/dev/psaux"</font> <font color="#009900">Option</font> <font color="#FF0000">"Protocol"</font> <font color="#FF0000">"auto-dev"</font> <font color="#009900">Option</font> <font color="#FF0000">"SHMConfig"</font> <font color="#FF0000">"on"</font> <font color="#009900">Option</font> <font color="#FF0000">"HorizEdgeScroll"</font> <font color="#FF0000">"0"</font> <font color="#009900">Option</font> <font color="#FF0000">"MinSpeed"</font> <font color="#FF0000">"0.5"</font> <i><font color="#9A1900"># touchpad speed when moving slowly</font></i> <font color="#009900">Option</font> <font color="#FF0000">"MaxSpeed"</font> <font color="#FF0000">"2.0"</font> <i><font color="#9A1900"># touchpad speed when moving fast</font></i> <font color="#009900">Option</font> <font color="#FF0000">"AccelFactor"</font> <font color="#FF0000">"0.10"</font> <font color="#009900">Option</font> <font color="#FF0000">"CircularScrolling"</font> <font color="#FF0000">"on"</font> <font color="#009900">Option</font> <font color="#FF0000">"EdgeMotionMinSpeed"</font> <font color="#FF0000">"0.5"</font> <b><font color="#0000FF">EndSection</font></b> <b><font color="#0000FF">Section</font></b> <font color="#FF0000">"InputDevice"</font> <font color="#009900">Driver</font> <font color="#FF0000">"wacom"</font> <font color="#009900">Identifier</font> <font color="#FF0000">"stylus"</font> <font color="#009900">Option</font> <font color="#FF0000">"Device"</font> <font color="#FF0000">"/dev/input/wacom"</font> <font color="#009900">Option</font> <font color="#FF0000">"Type"</font> <font color="#FF0000">"stylus"</font> <font color="#009900">Option</font> <font color="#FF0000">"ForceDevice"</font> <font color="#FF0000">"ISDV4"</font> <i><font color="#9A1900"># Tablet PC ONLY</font></i> <b><font color="#0000FF">EndSection</font></b> <b><font color="#0000FF">Section</font></b> <font color="#FF0000">"Device"</font> <font color="#009900">Identifier</font> <font color="#FF0000">"Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller"</font> <font color="#009900">Driver</font> <font color="#FF0000">"intel"</font> <font color="#009900">BusID</font> <font color="#FF0000">"PCI:0:2:0"</font> <i><font color="#9A1900"># Option "NoDRI"</font></i> <b><font color="#0000FF">EndSection</font></b> <b><font color="#0000FF">Section</font></b> <font color="#FF0000">"Screen"</font> <font color="#009900">Identifier</font> <font color="#FF0000">"Default Screen"</font> <font color="#009900">Device</font> <font color="#FF0000">"Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller"</font> <font color="#009900">Monitor</font> <font color="#FF0000">"Generic Monitor"</font> <font color="#009900">DefaultDepth</font> <font color="#993399">24</font> <b><font color="#0000FF">SubSection</font></b> <font color="#FF0000">"Display"</font> <font color="#009900">Modes</font> <font color="#FF0000">"1440x900"</font> <b><font color="#0000FF">EndSubSection</font></b> <b><font color="#0000FF">EndSection</font></b> <b><font color="#0000FF">Section</font></b> <font color="#FF0000">"ServerLayout"</font> <font color="#009900">Identifier</font> <font color="#FF0000">"Default Layout"</font> <font color="#009900">Screen</font> <font color="#FF0000">"Default Screen"</font> <font color="#009900">InputDevice</font> <font color="#FF0000">"Generic Keyboard"</font> <font color="#009900">InputDevice</font> <font color="#FF0000">"Configured Mouse"</font> <i><font color="#9A1900"># Uncomment if you have a wacom tablet</font></i> <i><font color="#9A1900"># InputDevice "stylus" "SendCoreEvents"</font></i> <i><font color="#9A1900"># InputDevice "cursor" "SendCoreEvents"</font></i> <i><font color="#9A1900"># InputDevice "eraser" "SendCoreEvents"</font></i> <font color="#009900">InputDevice</font> <font color="#FF0000">"Synaptics Touchpad"</font> <b><font color="#0000FF">EndSection</font></b> </tt></pre> ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/tests/test.asm.html����������������������������������������������������������0000644�0001750�0001750�00000012024�11672675566�015521� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<!-- Generator: GNU source-highlight by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite --> <pre><tt><i><font color="#9A1900">;</font></i> <i><font color="#9A1900">; screen handling primitives</font></i> <i><font color="#9A1900">;</font></i> <b><font color="#000080">.model</font></b> <b><font color="#0000FF">large</font></b> <b><font color="#000080">.data</font></b> vseg <b><font color="#0000FF">dw</font></b> <font color="#993399">0b000h</font> vmode <b><font color="#0000FF">db</font></b> <font color="#990000">?</font> x <b><font color="#0000FF">dw</font></b> <font color="#993399">0</font> y <b><font color="#0000FF">dw</font></b> <font color="#993399">0</font> color <b><font color="#0000FF">db</font></b> <font color="#993399">07h</font> ofs <b><font color="#0000FF">dw</font></b> <font color="#993399">0</font> xhite <b><font color="#0000FF">db</font></b> <font color="#993399">8</font> <i><font color="#9A1900">; video information block</font></i> VIOinfo <b><font color="#0000FF">struc</font></b> level <b><font color="#0000FF">db</font></b> <font color="#990000">?</font> <b><font color="#0000FF">db</font></b> <font color="#990000">?</font> <b><font color="#0000FF">dw</font></b> <font color="#990000">?</font> flags <b><font color="#0000FF">dw</font></b> <font color="#990000">?</font> mode <b><font color="#0000FF">db</font></b> <font color="#990000">?</font> <b><font color="#0000FF">db</font></b> <font color="#990000">?</font> colors <b><font color="#0000FF">dw</font></b> <font color="#990000">?</font> pixcol <b><font color="#0000FF">dw</font></b> <font color="#990000">?</font> pixrow <b><font color="#0000FF">dw</font></b> <font color="#990000">?</font> txtcol <b><font color="#0000FF">dw</font></b> <font color="#990000">?</font> txtrow <b><font color="#0000FF">dw</font></b> <font color="#990000">?</font> VIOinfo <b><font color="#0000FF">ends</font></b> info VIOinfo <font color="#990000">&lt;</font><font color="#993399">0</font><font color="#990000">,</font><font color="#993399">0</font><font color="#990000">,</font><font color="#993399">14</font><font color="#990000">,</font><font color="#993399">1</font><font color="#990000">,</font><font color="#993399">0</font><font color="#990000">,</font><font color="#993399">0</font><font color="#990000">,</font><font color="#993399">2</font><font color="#990000">,</font><font color="#993399">0</font><font color="#990000">,</font><font color="#993399">0</font><font color="#990000">,</font><font color="#993399">80</font><font color="#990000">,</font><font color="#993399">25</font><font color="#990000">&gt;</font> <b><font color="#000080">.code</font></b> <b><font color="#0000FF">public</font></b> _VIOopen<font color="#990000">,</font> _VIOclose<font color="#990000">,</font> _VIOcolumns<font color="#990000">,</font> _VIOrows<font color="#990000">,</font> _VIOmode _VIOheight <b><font color="#0000FF">proc</font></b> <b><font color="#0000FF">mov</font></b> <font color="#009900">al</font><font color="#990000">,</font> xhite<i><font color="#9A1900">;</font></i> <b><font color="#0000FF">xor</font></b> <font color="#009900">ah</font><font color="#990000">,</font><font color="#009900">ah</font><i><font color="#9A1900">;</font></i> <b><font color="#0000FF">ret</font></b> _VIOheight <b><font color="#0000FF">endp</font></b> <b><font color="#000080">odos4:</font></b> <b><font color="#0000FF">mov</font></b> <font color="#009900">ax</font><font color="#990000">,</font><font color="#993399">440</font><font color="#009900">ch</font> <b><font color="#0000FF">mov</font></b> <font color="#009900">bx</font><font color="#990000">,</font><font color="#993399">0</font> <b><font color="#0000FF">mov</font></b> <font color="#009900">cx</font><font color="#990000">,</font><font color="#993399">037fh</font> <b><font color="#0000FF">mov</font></b> <font color="#009900">dx</font><font color="#990000">,</font><b><font color="#0000FF">offset</font></b> info <b><font color="#0000FF">int</font></b> <font color="#993399">21h</font> <b><font color="#0000FF">jnc</font></b> l<font color="#993399">1</font> <b><font color="#0000FF">pop</font></b> <font color="#009900">ds</font> <b><font color="#0000FF">ret</font></b> <b><font color="#000080">cga:</font></b> <b><font color="#0000FF">mov</font></b> info<font color="#990000">.</font>txtrow<font color="#990000">,</font><font color="#993399">25</font> <b><font color="#0000FF">mov</font></b> <font color="#009900">ax</font><font color="#990000">,[</font><font color="#009900">bp</font><font color="#990000">+</font><font color="#993399">8</font><font color="#990000">]</font> <b><font color="#0000FF">mov</font></b> <font color="#009900">bx</font><font color="#990000">,[</font><font color="#009900">bp</font><font color="#990000">+</font><font color="#993399">12</font><font color="#990000">]</font> _VIOsetCols <b><font color="#0000FF">endp</font></b> <b><font color="#0000FF">end</font></b> </tt></pre> ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/tests/outlang.list�����������������������������������������������������������0000644�0001750�0001750�00000000546�11676051102�015423� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������docbook = docbook.outlang esc = esc.outlang html = html.outlang html-css = htmlcss.outlang htmltable = htmltable.outlang javadoc = javadoc.outlang latex = latex.outlang latexcolor = latexcolor.outlang mediawiki = mediawiki.outlang odf = odf.outlang texinfo = texinfo.outlang xhtml = xhtml.outlang xhtml-css = xhtmlcss.outlang xhtmltable = xhtmltable.outlang ����������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/tests/test.sl����������������������������������������������������������������0000644�0001750�0001750�00000010603�11672675566�014415� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env slsh require ("curl"); private variable My_Language = "English"; private variable Supported_Translations = ["zh_en", "zt_en", "en_zh", "en_zt", "en_nl", "en_fr", "en_de", "en_el", "en_it", "en_ja", "en_ko", "en_pt", "en_ru", "en_es", "nl_en", "nl_fr", "fr_en", "fr_de", "fr_el", "fr_it", "fr_pt", "fr_nl", "fr_es", "de_en", "de_fr", "el_en", "el_fr", "it_en", "it_fr", "ja_en", "ko_en", "pt_en", "pt_fr", "ru_en", "es_en", "es_fr"]; private variable Languages = Assoc_Type[String_Type]; private define add_language (lang, desc) { Languages[strlow(lang)] = strlow (desc); } add_language ("zh", "Chinese-simple"); add_language ("zt", "Chinese-traditional"); add_language ("en", "English"); add_language ("nl", "Dutch"); add_language ("fr", "French"); add_language ("de", "German"); add_language ("el", "Greek"); add_language ("it", "Italian"); add_language ("ja", "Japanese"); add_language ("ko", "Korean"); add_language ("pt", "Portugese"); add_language ("ru", "Russian"); add_language ("es", "Spanish"); private define lookup_language (lang) { lang = strlow (lang); if (assoc_key_exists (Languages, lang)) return lang; variable vals = assoc_get_values (Languages); variable i = where (vals == lang); if (length (i) == 0) throw NotImplementedError, "Language $lang is unknown or unsupported"$; return assoc_get_keys (Languages)[i[0]]; } private define lookup_translation (from, to) { variable trans = sprintf ("%s_%s", lookup_language (from), lookup_language(to)); if (any (Supported_Translations == trans)) return trans; throw NotImplementedError, "Translating from $from to $to is not supported"$; } private define make_encode_table () { variable table = array_map (String_Type, &sprintf, ("%%%02X", [0:255])); variable ok = [['A':'Z'], ['a':'z'], ['0':'9'], '.', '-', '*', '_', '/', '~']; table[ok] = array_map (String_Type, &char, ok); table[' '] = "+"; return table; } private variable Encode_Table = make_encode_table (); private define encode (text) { variable len = strlen (text); variable new_text = String_Type[len]; variable i; _for i (0, len-1, 1) new_text[i] = Encode_Table[text[i]]; return strjoin (new_text, ""); } private define parse_output (str) { (str,) = strreplace (str, "\n", "\x01", strbytelen (str)); % Look for TEXT in % <td bgcolor=white class=s><div style=padding:10px;>TEXT</div> variable start_re = "<td bgcolor=white class=s><div style=padding:10px;>"; variable end_re = "</div>"; variable re = strcat (start_re, "\([^<]+\)"R, end_re); variable n = string_match (str, re, 1); if (n == 0) return ""; variable pos, match_len; (pos, match_len) = string_match_nth (1); str = substrbytes (str, pos+1, match_len); (str,) = strreplace (str, "\x01", "\n", strbytelen (str)); return str; } private define write_callback (vp, data) { @vp = strcat (@vp, data); return 0; } define babelfish (from, to, text) { variable c = curl_new ("http://babelfish.altavista.com/babelfish/tr?il=en"); variable postdata = strcat ("doit=done&urltext=", text, "&lp=", lookup_translation (from, to), "&Submit=Translate", "&enc=utf8"); curl_setopt (c, CURLOPT_POSTFIELDS, postdata); curl_setopt (c, CURLOPT_FOLLOWLOCATION); curl_setopt (c, CURLOPT_HTTPHEADER, ["User-Agent: S-Lang cURL Module", "Content-Type: application/x-www-form-urlencoded", "Accept-Charset: ISO-8859-1,utf-8" ]); text = ""; curl_setopt (c, CURLOPT_WRITEFUNCTION, &write_callback, &text); curl_perform (c); text = parse_output (text); return text; } private define usage () { () = fprintf (stderr, "Usage: %s [--to lang-out] lang-in [phrase|-]\n", __argv[0]); exit (1); } define slsh_main () { variable lang_out = My_Language, lang_in = NULL; variable i = 1; while (i < __argc) { variable arg = __argv[i]; i++; if (arg == "--to") { if (i == __argc) usage (); lang_out = __argv[i]; i++; continue; } lang_in = arg; break; } if (lang_in == NULL) usage (); variable text = "-"; if (i == __argc) { if (isatty (stdin)) usage (); } else text = strjoin (__argv[[i:]], " "); if (text == "-") { text = ""; variable line; while (-1 != fgets (&line, stdin)) text = strcat (text, encode (line)); } message (babelfish (lang_in, lang_out, text)); } �����������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/tests/test_java_lines.html���������������������������������������������������0000644�0001750�0001750�00000022737�11672675567�017152� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<!-- Generator: GNU source-highlight by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite --> <pre><tt><a name="line1"><font color="#000000">01:</font></a> <i><font color="#9A1900">/*</font></i> <a name="line2"><font color="#000000">02:</font></a> <i><font color="#9A1900"> This is a classical Hello program</font></i> <a name="line3"><font color="#000000">03:</font></a> <i><font color="#9A1900"> to test source-highlight with Java programs.</font></i> <a name="line4"><font color="#000000">04:</font></a> <i><font color="#9A1900"> </font></i> <a name="line5"><font color="#000000">05:</font></a> <i><font color="#9A1900"> to have an html translation type</font></i> <a name="line6"><font color="#000000">06:</font></a> <a name="line7"><font color="#000000">07:</font></a> <i><font color="#9A1900"> source-highlight -s java -f html --input Hello.java --output Hello.html</font></i> <a name="line8"><font color="#000000">08:</font></a> <i><font color="#9A1900"> source-highlight -s java -f html &lt; Hello.java &gt; Hello.html</font></i> <a name="line9"><font color="#000000">09:</font></a> <a name="line10"><font color="#000000">10:</font></a> <i><font color="#9A1900"> or type source-highlight --help for the list of options</font></i> <a name="line11"><font color="#000000">11:</font></a> <a name="line12"><font color="#000000">12:</font></a> <i><font color="#9A1900"> written by</font></i> <a name="line13"><font color="#000000">13:</font></a> <i><font color="#9A1900"> Lorenzo Bettini</font></i> <a name="line14"><font color="#000000">14:</font></a> <i><font color="#9A1900"> </font></i><u><font color="#0000FF">http://www.lorenzobettini.it</font></u> <a name="line15"><font color="#000000">15:</font></a> <i><font color="#9A1900"> </font></i><u><font color="#0000FF">http://www.gnu.org/software/src-highlite</font></u> <a name="line16"><font color="#000000">16:</font></a> <i><font color="#9A1900">*/</font></i> <a name="line17"><font color="#000000">17:</font></a> <a name="line18"><font color="#000000">18:</font></a> <b><font color="#000080">package</font></b> hello<font color="#990000">;</font> <a name="line19"><font color="#000000">19:</font></a> <a name="line20"><font color="#000000">20:</font></a> <b><font color="#000080">import</font></b> java<font color="#990000">.</font>io<font color="#990000">.*</font> <font color="#990000">;</font> <a name="line21"><font color="#000000">21:</font></a> <a name="line22"><font color="#000000">22:</font></a> <i><font color="#9A1900">/**</font></i> <a name="line23"><font color="#000000">23:</font></a> <i><font color="#9A1900"> * </font></i><b><font color="#0000FF">&lt;p&gt;</font></b> <a name="line24"><font color="#000000">24:</font></a> <i><font color="#9A1900"> * A simple Hello World class, used to demonstrate some</font></i> <a name="line25"><font color="#000000">25:</font></a> <i><font color="#9A1900"> * features of Java source highlighting.</font></i> <a name="line26"><font color="#000000">26:</font></a> <i><font color="#9A1900"> * </font></i><b><font color="#0000FF">&lt;/p&gt;</font></b> <a name="line27"><font color="#000000">27:</font></a> <i><font color="#9A1900"> * </font></i><b>TODO:</b><i><font color="#9A1900"> nothing, just to show an highlighted </font></i><b>TODO</b><i><font color="#9A1900"> or </font></i><b>FIXME</b> <a name="line28"><font color="#000000">28:</font></a> <i><font color="#9A1900"> *</font></i> <a name="line29"><font color="#000000">29:</font></a> <i><font color="#9A1900"> * </font></i><font color="#009900">@author</font><i><font color="#9A1900"> Lorenzo Bettini</font></i> <a name="line30"><font color="#000000">30:</font></a> <i><font color="#9A1900"> * </font></i><font color="#009900">@version</font><i><font color="#9A1900"> 2.0</font></i> <a name="line31"><font color="#000000">31:</font></a> <i><font color="#9A1900"> */</font></i> <i><font color="#9A1900">/// class</font></i> <a name="line32"><font color="#000000">32:</font></a> <b><font color="#0000FF">public</font></b> <b><font color="#0000FF">class</font></b> <font color="#008080">Hello</font> <font color="#FF0000">{</font> <a name="line33"><font color="#000000">33:</font></a> <font color="#009900">int</font> foo <font color="#990000">=</font> <font color="#993399">1998</font> <font color="#990000">;</font> <a name="line34"><font color="#000000">34:</font></a> <font color="#009900">int</font> hex_foo <font color="#990000">=</font> <font color="#993399">0xCAFEBABE</font><font color="#990000">;</font> <a name="line35"><font color="#000000">35:</font></a> <font color="#009900">boolean</font> b <font color="#990000">=</font> <b><font color="#0000FF">false</font></b><font color="#990000">;</font> <a name="line36"><font color="#000000">36:</font></a> <font color="#008080">Integer</font> i <font color="#990000">=</font> <b><font color="#0000FF">null</font></b> <font color="#990000">;</font> <a name="line37"><font color="#000000">37:</font></a> <font color="#009900">char</font> c <font color="#990000">=</font> <font color="#FF0000">'</font><font color="#CC33CC">\'</font><font color="#FF0000">'</font><font color="#990000">,</font> d <font color="#990000">=</font> <font color="#FF0000">'n'</font><font color="#990000">,</font> e <font color="#990000">=</font> <font color="#FF0000">'</font><font color="#CC33CC">\\</font><font color="#FF0000">'</font> <font color="#990000">;</font> <a name="line38"><font color="#000000">38:</font></a> <font color="#008080">String</font> xml <font color="#990000">=</font> <font color="#FF0000">"&lt;tag attr=</font><font color="#CC33CC">\"</font><font color="#FF0000">value</font><font color="#CC33CC">\"</font><font color="#FF0000">&gt;&amp;auml;&lt;/tag&gt;"</font><font color="#990000">,</font> foo2 <font color="#990000">=</font> <font color="#FF0000">"</font><font color="#CC33CC">\\</font><font color="#FF0000">"</font> <font color="#990000">;</font> <a name="line39"><font color="#000000">39:</font></a> <a name="line40"><font color="#000000">40:</font></a> <i><font color="#9A1900">/* mymethod */</font></i> <a name="line41"><font color="#000000">41:</font></a> <b><font color="#0000FF">public</font></b> <font color="#009900">void</font> <b><font color="#000000">mymethod</font></b><font color="#990000">(</font><font color="#009900">int</font> i<font color="#990000">)</font> <font color="#FF0000">{</font> <a name="line42"><font color="#000000">42:</font></a> <i><font color="#9A1900">// just a foo method</font></i> <a name="line43"><font color="#000000">43:</font></a> <font color="#FF0000">}</font> <a name="line44"><font color="#000000">44:</font></a> <i><font color="#9A1900">/* mymethod */</font></i> <a name="line45"><font color="#000000">45:</font></a> <a name="line46"><font color="#000000">46:</font></a> <i><font color="#9A1900">/* main */</font></i> <a name="line47"><font color="#000000">47:</font></a> <b><font color="#0000FF">public</font></b> <b><font color="#0000FF">static</font></b> <font color="#009900">void</font> <b><font color="#000000">main</font></b><font color="#990000">(</font> <font color="#008080">String</font> args<font color="#990000">[]</font> <font color="#990000">)</font> <font color="#FF0000">{</font> <a name="line48"><font color="#000000">48:</font></a> <i><font color="#9A1900">// just some greetings ;-) /*</font></i> <a name="line49"><font color="#000000">49:</font></a> System<font color="#990000">.</font>out<font color="#990000">.</font><b><font color="#000000">println</font></b><font color="#990000">(</font> <font color="#FF0000">"Hello from java2html :-)"</font> <font color="#990000">)</font> <font color="#990000">;</font> <a name="line50"><font color="#000000">50:</font></a> System<font color="#990000">.</font>out<font color="#990000">.</font><b><font color="#000000">println</font></b><font color="#990000">(</font> <font color="#FF0000">"</font><font color="#CC33CC">\t</font><font color="#FF0000">by Lorenzo Bettini"</font> <font color="#990000">)</font> <font color="#990000">;</font> <a name="line51"><font color="#000000">51:</font></a> System<font color="#990000">.</font>out<font color="#990000">.</font><b><font color="#000000">println</font></b><font color="#990000">(</font> <font color="#FF0000">"</font><font color="#CC33CC">\t</font><font color="#FF0000">http://www.lorenzobettini.it"</font> <font color="#990000">)</font> <font color="#990000">;</font> <a name="line52"><font color="#000000">52:</font></a> <b><font color="#0000FF">if</font></b> <font color="#990000">(</font>argc <font color="#990000">&gt;</font> <font color="#993399">0</font><font color="#990000">)</font> <a name="line53"><font color="#000000">53:</font></a> <font color="#008080">String</font> param <font color="#990000">=</font> argc<font color="#990000">[</font><font color="#993399">0</font><font color="#990000">];</font> <a name="line54"><font color="#000000">54:</font></a> <i><font color="#9A1900">//System.out.println( "bye bye... :-D" ) ; // see you soon</font></i> <a name="line55"><font color="#000000">55:</font></a> <font color="#FF0000">}</font> <a name="line56"><font color="#000000">56:</font></a> <i><font color="#9A1900">/* main */</font></i> <a name="line57"><font color="#000000">57:</font></a> <font color="#FF0000">}</font> <a name="line58"><font color="#000000">58:</font></a> <i><font color="#9A1900">/// class</font></i> <a name="line59"><font color="#000000">59:</font></a> <a name="line60"><font color="#000000">60:</font></a> <i><font color="#9A1900">// end of file test.java</font></i></tt></pre> ���������������������������������source-highlight-3.1.6/tests/namedgroups_state.show�������������������������������������������������0000644�0001750�0001750�00000000573�11672675565�017530� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������STATE 1 default: normal rule (keyword normal type symbol) "(Hello|Ciao)([[:blank:]]*)([mM]ondo|[wW]orld)([[:punct:]]*)" (exit level: 0, next: 2) STATE 2 default: normal rule (comment) "\<(?:comment)\>" (exit level: 0, next: 0) rule (keyword normal type) "(end)( )(of line)" (exit level: 1, next: 0) rule (comment) "\<(?:highlight)\>" (exit level: 0, next: 0) �������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/tests/test.ps.html�����������������������������������������������������������0000644�0001750�0001750�00000011253�11672675566�015366� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<!-- Generator: GNU source-highlight by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite --> <pre><tt><i><font color="#9A1900">%!</font></i> <i><font color="#9A1900">% a test for highlighting postscript files</font></i> <i><font color="#9A1900">% proc dotest =&gt; .</font></i> <font color="#009900">/dotest</font> <font color="#990000">{</font> <b><font color="#0000FF">dup</font></b> <b><font color="#0000FF">mark</font></b> <b><font color="#0000FF">exch</font></b> <b><font color="#0000FF">stopped</font></b> <b><font color="#0000FF">not</font></b> <i><font color="#9A1900">% False if error, true if no error.</font></i> <font color="#990000">{</font> <font color="#FF0000">(Allowed access: )</font> <b><font color="#0000FF">print</font></b> <b><font color="#0000FF">cleartomark</font></b> <font color="#990000">==</font> <font color="#990000">}</font> <b><font color="#0000FF">if</font></b> <b><font color="#0000FF">clear</font></b> <font color="#990000">}</font> <b><font color="#0000FF">def</font></b> <font color="#009900">0</font> <font color="#009900">0</font> <b><font color="#0000FF">moveto</font></b> <i><font color="#9A1900">% So the show commands don't bomb because of nocurrentpoint.</font></i> <font color="#990000">{</font> <font color="#990000">[</font><font color="#009900">1</font> <font color="#009900">2</font><font color="#990000">]</font> <b><font color="#0000FF">executeonly</font></b> <b><font color="#0000FF">aload</font></b> <font color="#990000">}</font> <font color="#009900">dotest</font> <font color="#990000">{</font> <font color="#FF0000">(string)</font> <b><font color="#0000FF">executeonly</font></b> <font color="#FF0000">(seek)</font> <b><font color="#0000FF">anchorsearch</font></b> <font color="#990000">}</font> <font color="#009900">dotest</font> <font color="#990000">{</font> <font color="#FF0000">(string)</font> <font color="#FF0000">(seek)</font> <b><font color="#0000FF">executeonly</font></b> <b><font color="#0000FF">anchorsearch</font></b> <font color="#990000">}</font> <font color="#009900">dotest</font> <font color="#FF0000">(This is % a string)</font> <font color="#990000">{</font> <font color="#990000">[</font><font color="#009900">1</font> <font color="#009900">2</font><font color="#990000">]</font> <b><font color="#0000FF">executeonly</font></b> <b><font color="#0000FF">aload</font></b> <font color="#990000">}</font> <font color="#FF0000">(This is a string with </font><font color="#CC33CC">\(</font><font color="#FF0000"> some escapes </font><font color="#CC33CC">\(</font><font color="#FF0000"> )</font> <font color="#990000">{</font> <font color="#990000">[</font><font color="#009900">1</font> <font color="#009900">2</font><font color="#990000">]</font> <b><font color="#0000FF">executeonly</font></b> <b><font color="#0000FF">aload</font></b> <font color="#990000">}</font> <font color="#FF0000">(Strings may contain newlines </font> <font color="#FF0000">and such.)</font> <font color="#990000">{</font> <font color="#990000">[</font><font color="#009900">1</font> <font color="#009900">2</font><font color="#990000">]</font> <b><font color="#0000FF">executeonly</font></b> <b><font color="#0000FF">aload</font></b> <font color="#990000">}</font> <font color="#FF0000">(Strings may contain special characters *!&amp;}^% and</font> <font color="#FF0000">balanced parentheses ( ) (and so on).)</font> <font color="#990000">{</font> <font color="#990000">[</font><font color="#009900">1</font> <font color="#009900">2</font><font color="#990000">]</font> <b><font color="#0000FF">executeonly</font></b> <b><font color="#0000FF">aload</font></b> <font color="#990000">}</font> <font color="#FF0000">(The following is an empty string.)</font> <font color="#990000">{</font> <font color="#990000">[</font><font color="#009900">1</font> <font color="#009900">2</font><font color="#990000">]</font> <b><font color="#0000FF">executeonly</font></b> <b><font color="#0000FF">aload</font></b> <font color="#990000">}</font> <font color="#FF0000">()</font> <font color="#990000">{</font> <font color="#990000">[</font><font color="#009900">1</font> <font color="#009900">2</font><font color="#990000">]</font> <b><font color="#0000FF">executeonly</font></b> <b><font color="#0000FF">aload</font></b> <font color="#990000">}</font> <font color="#FF0000">(It has 0 (zero) length.)</font> <font color="#990000">{</font> <font color="#990000">[</font><font color="#009900">1</font> <font color="#009900">2</font><font color="#990000">]</font> <b><font color="#0000FF">executeonly</font></b> <b><font color="#0000FF">aload</font></b> <font color="#990000">}</font> </tt></pre> �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/tests/test.properties.html���������������������������������������������������0000644�0001750�0001750�00000001734�11672675566�017143� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<!-- Generator: GNU source-highlight by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite --> <pre><tt><i><font color="#9A1900"># a comment</font></i> <i><font color="#9A1900">! a comment</font></i> <font color="#009900">source.favorites.jar </font><font color="#990000">=</font> src/ <font color="#009900">output.favorites.jar </font><font color="#990000">=</font> bin/ <font color="#009900">bin.includes </font><font color="#990000">=</font> plugin.xml,\ META-INF/,\ favorites.jar,\ icons/ foo <font color="#009900">a </font><font color="#990000">=</font> "foo" <font color="#009900">b </font><font color="#990000">=</font> a string with escape sequences \t \n \r \\ \" \' \ (space) \u0123 <font color="#009900">c </font><font color="#990000">=</font> a string with a continuation line \ continuation line <font color="#009900">d.e.f </font><font color="#990000">=</font> another string</tt></pre> ������������������������������������source-highlight-3.1.6/tests/wrong_outlang_include.outlang������������������������������������������0000644�0001750�0001750�00000001732�11672675567�021065� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������doctemplate "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML//EN\"> <html> <head> <meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\"> <meta name=\"GENERATOR\" content=\"$additional\"> <title>$title</title> </head> <body bgcolor=\"$docbgcolor\"> $header<pre><tt>" "</tt></pre> $footer</body> </html> " end nodoctemplate "<!-- Generator: $additional --> $header<pre><tt>" "</tt></pre>$footer " end extension "html" bold "<b>$text</b>" italics "<i>$text</i>" underline "<u>$text</u>" color "<font color=\"$style\">$text</font>" colormap "green" "#33CC00" "red" "#FF0000" "darkred" "#990000" "blue" "#0000FF" "brown" "#9A1900" "pink" "#CC33CC" "yellow" "#FFCC00" "cyan" "#66FFFF" "purple" "#993399" "orange" "#FF6600" "brightorange" "#FF9900" "brightgreen" "#33FF33" "darkgreen" "#009900" "black" "#000000" "teal" "#008080" "gray" "#808080" "darkblue" "#000080" default "#000000" end translations "&" "&amp;" "<" "&lt;" ">" "&gt;" end include "nonexistent.outlang" ��������������������������������������source-highlight-3.1.6/tests/wrong_syntax_simple.lang�����������������������������������������������0000644�0001750�0001750�00000000014�11672675567�020050� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������wrong "foo" ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/tests/wrong_regex_range.err��������������������������������������������������0000644�0001750�0001750�00000000056�11672675567�017314� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight: invalid regex range: {wrong ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/tests/test.texinfo�����������������������������������������������������������0000644�0001750�0001750�00000003303�11672675566�015452� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������(@ref{Generating References}). \input texinfo @c -*-texinfo-*- @c This file uses the @command command introduced in Texinfo 4.0. @c %**start of header @setfilename source-highlight.info @include version.texi @settitle GNU Source-highlight @value{VERSION} @finalout @c @setchapternewpage odd @c %**end of header @example my example @end example @set myhomepage @uref{http://www.lorenzobettini.it} field names, etc.) by relying on the program @emph{ctags}, @url{http://ctags.sourceforge.net} @xref{My Long Reference}. @inforef{Introduction,,source-highlight-info}. @c All the menus can be updated with the EMACS command @c texinfo-all-menus-update, which is normally bound to C-c C-u C-a. @menu * Introduction:: What's it for? * Installation:: Download and installation * Invoking source-highlight:: How to run @command{source-highlight}. * Language Definitions:: How to define an input language * Problems:: Reporting bugs. * Mailing Lists:: * Concept Index:: Index of concepts. @end menu This is an escaped @@ at symbol. This ``is a string''. @example @i{/// read the files }FIXME@i{ of a directory }@@param@i{ }@b{<f} foo="bar"@b{>} @b{#include} <stddef.h> @b{#include} <stdio.h> @b{#include} <sys/types.h> @b{#include} <dirent.h> int @b{main} (void) @{ DIR *dp; @b{struct} dirent *ep; dp = @b{opendir} ("./"); @b{if} (dp != NULL) @{ @b{while} (ep = @b{readdir} (dp)) @b{puts} (ep->d_name); (void) @b{closedir} (dp); @} @b{else} @b{perror} ("Couldn't open the directory"); @b{return} 0; @} @end example �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/tests/test2.backref.html�����������������������������������������������������0000644�0001750�0001750�00000000743�11672675567�016426� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<!-- Generator: GNU source-highlight by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite --> <pre><tt><font color="#FF0000">|foo|</font> outside <font color="#FF0000">#inside#</font> outside <font color="#FF0000">!in|si|de!</font> outside <font color="#FF0000">|bar|</font> <font color="#FF0000">[12[</font> foo ]]a <font color="#FF6600">%symbol%</font> <b><font color="#0000FF">inside</font></b> <font color="#FF0000">]]1a2</font> </tt></pre> �����������������������������source-highlight-3.1.6/tests/test_php3_lines.html���������������������������������������������������0000644�0001750�0001750�00000210611�11672675567�017071� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<!-- Generator: GNU source-highlight by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite --> <pre><tt><font color="#000000">001:</font> <font color="#990000">&lt;?php</font> <font color="#000000">002:</font> <i><font color="#9A1900">/*</font></i> <font color="#000000">003:</font> <i><font color="#9A1900">CircaLib.php3 : provide function to perform search on Circa with PHP</font></i> <font color="#000000">004:</font> <i><font color="#9A1900">Copyright 2000 A.Barbet </font></i><u><font color="#0000FF">alian@alianwebserver.com</font></u><i><font color="#9A1900">. All rights reserved.</font></i> <font color="#000000">005:</font> <font color="#000000">006:</font> <i><font color="#9A1900">Revision 1.1 2000/11/23 22:51:17 Administrateur</font></i> <font color="#000000">007:</font> <i><font color="#9A1900">addSite.php3</font></i> <font color="#000000">008:</font> <font color="#000000">009:</font> <i><font color="#9A1900">Revision 1.2 2000/10/27 16:01:12 Administrateur</font></i> <font color="#000000">010:</font> <i><font color="#9A1900">- Navigation par categorie</font></i> <font color="#000000">011:</font> <i><font color="#9A1900">- Passer le prefixe en variable globale</font></i> <font color="#000000">012:</font> <i><font color="#9A1900">- Passer la database en variable globale</font></i> <font color="#000000">013:</font> <font color="#000000">014:</font> <i><font color="#9A1900">Revision 1.1 2000/10/22 22:43:47 Administrateur</font></i> <font color="#000000">015:</font> <i><font color="#9A1900">Premiere version fonctionnelle. Supporte:</font></i> <font color="#000000">016:</font> <i><font color="#9A1900">- Requetes booleenes</font></i> <font color="#000000">017:</font> <i><font color="#9A1900">- Affichage par pages de 10 liens</font></i> <font color="#000000">018:</font> <font color="#000000">019:</font> <i><font color="#9A1900">*/</font></i> <font color="#000000">020:</font> <font color="#000000">021:</font> <i><font color="#9A1900">/*</font></i> <font color="#000000">022:</font> <font color="#000000">023:</font> <i><font color="#9A1900">Fonction permettant d'effectuer une recherche par mot dans Circa</font></i> <font color="#000000">024:</font> <font color="#000000">025:</font> <i><font color="#9A1900">Paramètres :</font></i> <font color="#000000">026:</font> <font color="#000000">027:</font> <i><font color="#9A1900"> $template : Masque HTML pour le resultat de chaque lien. La liste des variables définies au</font></i> <font color="#000000">028:</font> <i><font color="#9A1900"> moment du eval sont : $indiceG,$titre,$description,$url,$facteur,$last_update,$langue</font></i> <font color="#000000">029:</font> <font color="#000000">030:</font> <i><font color="#9A1900"> Exemple de masque :</font></i> <font color="#000000">031:</font> <font color="#000000">032:</font> <i><font color="#9A1900"> '"&lt;p&gt;$indiceG - &lt;a href=\"$url\"&gt;$titre&lt;/a&gt; $description&lt;br&gt;</font></i> <font color="#000000">033:</font> <i><font color="#9A1900"> &lt;font class=\"small\"&gt;&lt;b&gt;Url:&lt;/b&gt; $url &lt;b&gt;Facteur:&lt;/b&gt; $facteur</font></i> <font color="#000000">034:</font> <i><font color="#9A1900"> &lt;b&gt;Last update:&lt;/b&gt; $last_update &lt;/font&gt;&lt;/p&gt;\n"'</font></i> <font color="#000000">035:</font> <font color="#000000">036:</font> <i><font color="#9A1900"> $mot : Séquence des mots recherchés tel que tapé par l'utilisateur</font></i> <font color="#000000">037:</font> <i><font color="#9A1900"> first : Indice du premier site affiché dans le résultat</font></i> <font color="#000000">038:</font> <i><font color="#9A1900"> $id : Id du site dans lequel effectué la recherche</font></i> <font color="#000000">039:</font> <i><font color="#9A1900"> $langue : Restriction par langue (facultatif)</font></i> <font color="#000000">040:</font> <i><font color="#9A1900"> $Url : Restriction par url : les url trouvées commenceront par $Url (facultatif)</font></i> <font color="#000000">041:</font> <i><font color="#9A1900"> $create : Restriction par date inscription. Format YYYY-MM-JJ HH:MM:SS (facultatif)</font></i> <font color="#000000">042:</font> <i><font color="#9A1900"> $update : Restriction par date de mise à jour des pages. Format YYYY-MM-JJ HH:MM:SS (facultatif)</font></i> <font color="#000000">043:</font> <i><font color="#9A1900"> $catego : Restriction par categorie (facultatif)</font></i> <font color="#000000">044:</font> <font color="#000000">045:</font> <i><font color="#9A1900">Retourne ($resultat,$links,$indice)</font></i> <font color="#000000">046:</font> <font color="#000000">047:</font> <i><font color="#9A1900"> $resultat : Buffer HTML contenant la liste des sites trouves formaté en fonction</font></i> <font color="#000000">048:</font> <i><font color="#9A1900"> de $template et des mots present dans $mots</font></i> <font color="#000000">049:</font> <i><font color="#9A1900"> $links : Liens vers les pages suivantes / precedentes</font></i> <font color="#000000">050:</font> <i><font color="#9A1900"> $indice : Nombre de sites trouves</font></i> <font color="#000000">051:</font> <font color="#000000">052:</font> <i><font color="#9A1900">*/</font></i> <font color="#000000">053:</font> <font color="#000000">054:</font> <b><font color="#000080">include</font></b><font color="#990000">(</font><font color="#FF0000">"foo.php"</font><font color="#990000">);</font> <font color="#000000">055:</font> <b><font color="#000080">include_once</font></b><font color="#990000">(</font><font color="#FF0000">"bar.php"</font><font color="#990000">);</font> <font color="#000000">056:</font> <font color="#000000">057:</font> <b><font color="#0000FF">function</font></b> <b><font color="#000000">search</font></b><font color="#990000">(</font><font color="#009900">$template</font><font color="#990000">,</font><font color="#009900">$word</font><font color="#990000">,</font><font color="#009900">$first</font><font color="#990000">,</font><font color="#009900">$idc</font><font color="#990000">,</font><font color="#009900">$langue</font><font color="#990000">,</font><font color="#009900">$Url</font><font color="#990000">,</font><font color="#009900">$create</font><font color="#990000">,</font><font color="#009900">$update</font><font color="#990000">,</font><font color="#009900">$categorie</font><font color="#990000">)</font> <font color="#000000">058:</font> <font color="#FF0000">{</font> <font color="#000000">059:</font> <font color="#009900">$mots</font> <font color="#990000">=</font> <b><font color="#000000">split</font></b><font color="#990000">(</font> <font color="#FF0000">" "</font><font color="#990000">,</font> <b><font color="#000000">strtolower</font></b><font color="#990000">(</font><font color="#009900">$word</font><font color="#990000">));</font> <font color="#000000">060:</font> <font color="#009900">$i</font><font color="#990000">=</font><font color="#993399">0</font><font color="#990000">;</font> <font color="#000000">061:</font> <i><font color="#9A1900"># Recherche des requetes booleenes</font></i> <font color="#000000">062:</font> <b><font color="#0000FF">while</font></b><font color="#990000">(</font> <b><font color="#0000FF">list</font></b><font color="#990000">(</font><font color="#009900">$key</font><font color="#990000">,</font><font color="#009900">$valeur</font><font color="#990000">)</font> <font color="#990000">=</font> <b><font color="#0000FF">each</font></b> <font color="#990000">(</font><font color="#009900">$mots</font><font color="#990000">))</font> <font color="#000000">063:</font> <font color="#FF0000">{</font> <font color="#000000">064:</font> <b><font color="#0000FF">if</font></b> <font color="#990000">(</font><font color="#009900">$valeur</font> <font color="#990000">==</font> <font color="#FF0000">'+'</font><font color="#990000">)</font> <font color="#FF0000">{</font><font color="#009900">$ind_and</font><font color="#990000">[]=</font><font color="#009900">$i</font><font color="#990000">;</font><font color="#FF0000">}</font> <i><font color="#9A1900"># Reperage de la position des mots 'and'</font></i> <font color="#000000">065:</font> <b><font color="#0000FF">else</font></b> <b><font color="#0000FF">if</font></b> <font color="#990000">(</font><font color="#009900">$valeur</font> <font color="#990000">==</font> <font color="#FF0000">'-'</font><font color="#990000">)</font> <font color="#FF0000">{</font><font color="#009900">$ind_not</font><font color="#990000">[]=</font><font color="#009900">$i</font><font color="#990000">;</font><font color="#FF0000">}</font> <i><font color="#9A1900"># Reperage de la position des mots 'not'</font></i> <font color="#000000">066:</font> <b><font color="#0000FF">else</font></b> <font color="#FF0000">{</font><font color="#009900">$mots_tmp</font><font color="#990000">[]=</font><font color="#009900">$valeur</font><font color="#990000">;</font><font color="#FF0000">}</font> <font color="#000000">067:</font> <font color="#009900">$i</font><font color="#990000">++;</font> <font color="#000000">068:</font> <font color="#FF0000">}</font> <font color="#000000">069:</font> <i><font color="#9A1900"># Recherche SQL</font></i> <font color="#000000">070:</font> <font color="#009900">$tab</font> <font color="#990000">=</font> <b><font color="#000000">search_word</font></b><font color="#990000">(</font><b><font color="#000000">join</font></b><font color="#990000">(</font><font color="#FF0000">"','"</font><font color="#990000">,</font><font color="#009900">$mots_tmp</font><font color="#990000">),</font><font color="#009900">$idc</font><font color="#990000">,</font><font color="#FF0000">''</font><font color="#990000">,</font><font color="#FF0000">''</font><font color="#990000">,</font><font color="#FF0000">''</font><font color="#990000">,</font><font color="#FF0000">''</font><font color="#990000">,</font><font color="#FF0000">''</font><font color="#990000">);</font> <font color="#000000">071:</font> <i><font color="#9A1900"># On supprime tout ceux qui ne repondent pas aux criteres and si present</font></i> <font color="#000000">072:</font> <b><font color="#0000FF">if</font></b> <font color="#990000">(</font><b><font color="#000000">is_array</font></b><font color="#990000">(</font><font color="#009900">$ind_and</font><font color="#990000">))</font> <font color="#000000">073:</font> <font color="#FF0000">{</font><b><font color="#0000FF">while</font></b><font color="#990000">(</font> <b><font color="#0000FF">list</font></b><font color="#990000">(</font><font color="#009900">$key</font><font color="#990000">,</font><font color="#009900">$ind</font><font color="#990000">)</font> <font color="#990000">=</font> <b><font color="#0000FF">each</font></b><font color="#990000">(</font><font color="#009900">$ind_and</font><font color="#990000">))</font> <font color="#FF0000">{</font><b><font color="#0000FF">while</font></b><font color="#990000">(</font> <b><font color="#0000FF">list</font></b><font color="#990000">(</font><font color="#009900">$url</font><font color="#990000">,</font><font color="#009900">$tab_url</font><font color="#990000">)</font> <font color="#990000">=</font> <b><font color="#0000FF">each</font></b> <font color="#990000">(</font><font color="#009900">$tab</font><font color="#990000">))</font> <font color="#000000">074:</font> <font color="#FF0000">{</font><b><font color="#0000FF">if</font></b> <font color="#990000">(!</font><b><font color="#000000">appartient</font></b><font color="#990000">(</font><font color="#009900">$mots</font><font color="#990000">[</font><font color="#009900">$ind</font><font color="#990000">+</font><font color="#993399">1</font><font color="#990000">],</font><font color="#009900">$tab_url</font><font color="#990000">[</font><font color="#993399">5</font><font color="#990000">]))</font> <font color="#FF0000">{</font><b><font color="#0000FF">unset</font></b><font color="#990000">(</font><font color="#009900">$tab</font><font color="#990000">[</font><font color="#009900">$url</font><font color="#990000">]);</font><font color="#FF0000">}}}</font><b><font color="#000000">reset</font></b><font color="#990000">(</font><font color="#009900">$tab</font><font color="#990000">);</font><font color="#FF0000">}</font> <font color="#000000">075:</font> <i><font color="#9A1900"># On supprime tout ceux qui ne repondent pas aux criteres not si present</font></i> <font color="#000000">076:</font> <b><font color="#0000FF">if</font></b> <font color="#990000">(</font><b><font color="#000000">is_array</font></b><font color="#990000">(</font><font color="#009900">$ind_not</font><font color="#990000">))</font> <font color="#000000">077:</font> <font color="#FF0000">{</font><b><font color="#0000FF">while</font></b><font color="#990000">(</font> <b><font color="#0000FF">list</font></b><font color="#990000">(</font><font color="#009900">$key</font><font color="#990000">,</font><font color="#009900">$ind</font><font color="#990000">)</font> <font color="#990000">=</font> <b><font color="#0000FF">each</font></b><font color="#990000">(</font><font color="#009900">$ind_not</font><font color="#990000">))</font> <font color="#FF0000">{</font><b><font color="#0000FF">while</font></b><font color="#990000">(</font> <b><font color="#0000FF">list</font></b><font color="#990000">(</font><font color="#009900">$url</font><font color="#990000">,</font><font color="#009900">$tab_url</font><font color="#990000">)</font> <font color="#990000">=</font> <b><font color="#0000FF">each</font></b> <font color="#990000">(</font><font color="#009900">$tab</font><font color="#990000">))</font> <font color="#000000">078:</font> <font color="#FF0000">{</font><b><font color="#0000FF">if</font></b> <font color="#990000">(</font><b><font color="#000000">appartient</font></b><font color="#990000">(</font><font color="#009900">$mots</font><font color="#990000">[</font><font color="#009900">$ind</font><font color="#990000">+</font><font color="#993399">1</font><font color="#990000">],</font><font color="#009900">$tab_url</font><font color="#990000">[</font><font color="#993399">5</font><font color="#990000">]))</font> <font color="#FF0000">{</font><b><font color="#0000FF">unset</font></b><font color="#990000">(</font><font color="#009900">$tab</font><font color="#990000">[</font><font color="#009900">$url</font><font color="#990000">]);</font><font color="#FF0000">}}}</font><b><font color="#000000">reset</font></b><font color="#990000">(</font><font color="#009900">$tab</font><font color="#990000">);</font><font color="#FF0000">}</font> <font color="#000000">079:</font> <font color="#009900">$indice</font><font color="#990000">=</font><font color="#993399">0</font><font color="#990000">;</font><font color="#009900">$nbResultPerPage</font><font color="#990000">=</font><font color="#993399">10</font><font color="#990000">;</font> <font color="#000000">080:</font> <font color="#009900">$lasto</font> <font color="#990000">=</font> <font color="#009900">$first</font> <font color="#990000">+</font> <font color="#009900">$nbResultPerPage</font><font color="#990000">;</font> <font color="#000000">081:</font> <i><font color="#9A1900"># On met en forme le resultat</font></i> <font color="#000000">082:</font> <b><font color="#0000FF">if</font></b> <font color="#990000">(</font><b><font color="#000000">is_array</font></b><font color="#990000">(</font><font color="#009900">$tab</font><font color="#990000">))</font> <font color="#000000">083:</font> <font color="#FF0000">{</font> <font color="#000000">084:</font> <b><font color="#0000FF">while</font></b><font color="#990000">(</font> <b><font color="#0000FF">list</font></b><font color="#990000">(</font><font color="#009900">$url</font><font color="#990000">,</font><font color="#009900">$tab_url</font><font color="#990000">)</font> <font color="#990000">=</font> <b><font color="#0000FF">each</font></b> <font color="#990000">(</font><font color="#009900">$tab</font><font color="#990000">))</font> <font color="#000000">085:</font> <font color="#FF0000">{</font> <font color="#000000">086:</font> <font color="#009900">$indiceG</font><font color="#990000">=</font><font color="#009900">$indice</font><font color="#990000">+</font><font color="#993399">1</font><font color="#990000">;</font> <font color="#000000">087:</font> <b><font color="#0000FF">list</font></b><font color="#990000">(</font><font color="#009900">$titre</font><font color="#990000">,</font><font color="#009900">$description</font><font color="#990000">,</font><font color="#009900">$facteur</font><font color="#990000">,</font><font color="#009900">$langue</font><font color="#990000">,</font><font color="#009900">$last_update</font><font color="#990000">,</font><font color="#009900">$mot</font><font color="#990000">)=</font><font color="#009900">$tab_url</font><font color="#990000">;</font> <font color="#000000">088:</font> <font color="#000000">089:</font> <b><font color="#0000FF">if</font></b> <font color="#990000">((</font><font color="#009900">$indice</font><font color="#990000">&gt;=</font><font color="#009900">$first</font><font color="#990000">)&amp;&amp;(</font><font color="#009900">$indice</font><font color="#990000">&lt;</font><font color="#009900">$lasto</font><font color="#990000">))</font> <font color="#FF0000">{</font><b><font color="#0000FF">eval</font></b><font color="#990000">(</font><font color="#009900">$template</font><font color="#990000">);</font><font color="#FF0000">}</font> <font color="#000000">090:</font> <i><font color="#9A1900"># Constitution des liens suivants / precedents</font></i> <font color="#000000">091:</font> <b><font color="#0000FF">if</font></b> <font color="#990000">(!(</font><font color="#009900">$indice</font><font color="#990000">%</font><font color="#009900">$nbResultPerPage</font><font color="#990000">))</font> <font color="#000000">092:</font> <font color="#FF0000">{</font> <font color="#000000">093:</font> <font color="#009900">$nbPage</font><font color="#990000">++;</font> <font color="#000000">094:</font> <b><font color="#0000FF">if</font></b> <font color="#990000">(</font><font color="#009900">$indice</font><font color="#990000">==</font><font color="#009900">$first</font><font color="#990000">)</font> <font color="#FF0000">{</font><font color="#009900">$links</font><font color="#990000">.=</font><font color="#FF0000">"$nbPage- "</font><font color="#990000">;</font><font color="#FF0000">}</font> <font color="#000000">095:</font> <b><font color="#0000FF">else</font></b> <font color="#FF0000">{</font><font color="#009900">$links</font><font color="#990000">.=</font><font color="#FF0000">'&lt;a href="'</font><font color="#990000">.</font><b><font color="#000000">get_link</font></b><font color="#990000">(</font><font color="#009900">$indice</font><font color="#990000">,</font><font color="#009900">$word</font><font color="#990000">,</font><font color="#009900">$idc</font><font color="#990000">).</font><font color="#FF0000">'"&gt;'</font><font color="#990000">.</font><font color="#009900">$nbPage</font><font color="#990000">.</font><font color="#FF0000">'&lt;/a&gt;- '</font><font color="#990000">.</font><font color="#FF0000">"\n"</font><font color="#990000">;</font><font color="#FF0000">}</font> <font color="#000000">096:</font> <font color="#FF0000">}</font> <font color="#000000">097:</font> <font color="#009900">$indice</font><font color="#990000">++;</font> <font color="#000000">098:</font> <font color="#FF0000">}</font> <font color="#000000">099:</font> <font color="#FF0000">}</font> <font color="#000000">100:</font> <b><font color="#0000FF">if</font></b> <font color="#990000">(</font><font color="#009900">$indice</font><font color="#990000">)</font> <font color="#FF0000">{</font><font color="#009900">$indice</font><font color="#990000">=</font><font color="#FF0000">"$indice sites trouves"</font><font color="#990000">;</font><font color="#FF0000">}</font> <font color="#000000">101:</font> <b><font color="#0000FF">else</font></b> <font color="#FF0000">{</font><font color="#009900">$indice</font><font color="#990000">=</font><font color="#FF0000">"&lt;p&gt;Aucun document trouvé.&lt;/p&gt;"</font><font color="#990000">;</font><font color="#FF0000">}</font> <font color="#000000">102:</font> <b><font color="#0000FF">return</font></b> <b><font color="#0000FF">array</font></b><font color="#990000">(</font><font color="#009900">$resultat</font><font color="#990000">,</font><font color="#009900">$links</font><font color="#990000">,</font><font color="#009900">$indice</font><font color="#990000">);</font> <font color="#000000">103:</font> <font color="#FF0000">}</font> <font color="#000000">104:</font> <font color="#000000">105:</font> <i><font color="#9A1900">/*</font></i> <font color="#000000">106:</font> <font color="#000000">107:</font> <i><font color="#9A1900">Construction de la requete SQL. Son exploitation est faite par search</font></i> <font color="#000000">108:</font> <font color="#000000">109:</font> <i><font color="#9A1900"> $tab : Reference du hash où mettre le resultat</font></i> <font color="#000000">110:</font> <i><font color="#9A1900"> $word : Mot recherché</font></i> <font color="#000000">111:</font> <i><font color="#9A1900"> $id : Id du site dans lequel effectué la recherche</font></i> <font color="#000000">112:</font> <i><font color="#9A1900"> $langue : Restriction par langue (facultatif)</font></i> <font color="#000000">113:</font> <i><font color="#9A1900"> $Url : Restriction par url</font></i> <font color="#000000">114:</font> <i><font color="#9A1900"> $create : Restriction par date inscription</font></i> <font color="#000000">115:</font> <i><font color="#9A1900"> $update : Restriction par date de mise à jour des pages</font></i> <font color="#000000">116:</font> <i><font color="#9A1900"> $catego : Restriction par categorie</font></i> <font color="#000000">117:</font> <font color="#000000">118:</font> <i><font color="#9A1900">Retourne le tableau avec le resultat de la recherche</font></i> <font color="#000000">119:</font> <i><font color="#9A1900">Le hash est constitué comme tel:</font></i> <font color="#000000">120:</font> <font color="#000000">121:</font> <i><font color="#9A1900"> $tab{$url}[0] : titre</font></i> <font color="#000000">122:</font> <i><font color="#9A1900"> $tab{$url}[1] : description</font></i> <font color="#000000">123:</font> <i><font color="#9A1900"> $tab{$url}[2] : facteur</font></i> <font color="#000000">124:</font> <i><font color="#9A1900"> $tab{$url}[3] : langue</font></i> <font color="#000000">125:</font> <i><font color="#9A1900"> $tab{$url}[4] : date de dernière modification</font></i> <font color="#000000">126:</font> <i><font color="#9A1900"> @{$$tab{$url}[5]}: liste des mots trouves pour cet url</font></i> <font color="#000000">127:</font> <font color="#000000">128:</font> <i><font color="#9A1900">*/</font></i> <font color="#000000">129:</font> <b><font color="#0000FF">function</font></b> <b><font color="#000000">search_word</font></b><font color="#990000">(</font><font color="#009900">$word</font><font color="#990000">,</font><font color="#009900">$idc</font><font color="#990000">,</font><font color="#009900">$langue</font><font color="#990000">,</font><font color="#009900">$Url</font><font color="#990000">,</font><font color="#009900">$create</font><font color="#990000">,</font><font color="#009900">$update</font><font color="#990000">,</font><font color="#009900">$categorie</font><font color="#990000">)</font> <font color="#000000">130:</font> <font color="#FF0000">{</font> <font color="#000000">131:</font> <b><font color="#0000FF">global</font></b> <font color="#009900">$prefix</font><font color="#990000">;</font> <font color="#000000">132:</font> <b><font color="#0000FF">global</font></b> <font color="#009900">$database</font><font color="#990000">;</font> <font color="#000000">133:</font> <b><font color="#0000FF">if</font></b> <font color="#990000">(</font><font color="#009900">$langue</font><font color="#990000">)</font> <font color="#FF0000">{</font><font color="#009900">$langue</font><font color="#990000">=</font><font color="#FF0000">" and langue='$langue' "</font><font color="#990000">;</font><font color="#FF0000">}</font> <b><font color="#0000FF">else</font></b> <font color="#FF0000">{</font><font color="#009900">$langue</font><font color="#990000">=</font> <font color="#FF0000">' '</font><font color="#990000">;</font><font color="#FF0000">}</font> <font color="#000000">134:</font> <b><font color="#0000FF">if</font></b> <font color="#990000">((</font><font color="#009900">$Url</font><font color="#990000">)&amp;&amp;(</font><font color="#009900">$Url</font> <font color="#990000">!=</font> <font color="#FF0000">'http://'</font><font color="#990000">))</font> <font color="#FF0000">{</font><font color="#009900">$Url</font><font color="#990000">=</font><font color="#FF0000">" and url like '$Url%' "</font><font color="#990000">;</font><font color="#FF0000">}</font> <b><font color="#0000FF">else</font></b> <font color="#FF0000">{</font><font color="#009900">$Url</font><font color="#990000">=</font><font color="#FF0000">' '</font><font color="#990000">;</font><font color="#FF0000">}</font> <font color="#000000">135:</font> <b><font color="#0000FF">if</font></b> <font color="#990000">(</font><font color="#009900">$create</font><font color="#990000">)</font> <font color="#FF0000">{</font><font color="#009900">$create</font><font color="#990000">=</font><font color="#FF0000">"and unix_timestamp('$create')&lt; unix_timestamp(last_check) "</font><font color="#990000">;</font><font color="#FF0000">}</font> <b><font color="#0000FF">else</font></b> <font color="#FF0000">{</font><font color="#009900">$create</font><font color="#990000">=</font><font color="#FF0000">' '</font><font color="#990000">;</font><font color="#FF0000">}</font> <font color="#000000">136:</font> <b><font color="#0000FF">if</font></b> <font color="#990000">(</font><font color="#009900">$update</font><font color="#990000">)</font> <font color="#FF0000">{</font><font color="#009900">$update</font><font color="#990000">=</font><font color="#FF0000">"and unix_timestamp('$update')&lt; unix_timestamp(last_update) "</font><font color="#990000">;</font><font color="#FF0000">}</font> <b><font color="#0000FF">else</font></b> <font color="#FF0000">{</font><font color="#009900">$update</font><font color="#990000">=</font><font color="#FF0000">' '</font><font color="#990000">;</font><font color="#FF0000">}</font> <font color="#000000">137:</font> <b><font color="#0000FF">if</font></b> <font color="#990000">(</font><font color="#009900">$categorie</font><font color="#990000">)</font> <font color="#FF0000">{}</font> <font color="#000000">138:</font> <b><font color="#0000FF">else</font></b> <font color="#FF0000">{</font><font color="#009900">$categorie</font><font color="#990000">=</font><font color="#FF0000">' '</font><font color="#990000">;</font><font color="#FF0000">}</font> <font color="#000000">139:</font> <font color="#009900">$requete</font> <font color="#990000">=</font> <font color="#FF0000">"</font> <font color="#000000">140:</font> <font color="#FF0000"> select facteur,url,titre,description,langue,last_update,mot</font> <font color="#000000">141:</font> <font color="#FF0000"> from "</font><font color="#990000">.</font><font color="#009900">$prefix</font><font color="#990000">.</font><font color="#009900">$idc</font><font color="#990000">.</font><font color="#FF0000">"links l,"</font><font color="#990000">.</font><font color="#009900">$prefix</font><font color="#990000">.</font><font color="#009900">$idc</font><font color="#990000">.</font><font color="#FF0000">"relation r</font> <font color="#000000">142:</font> <font color="#FF0000"> where r.id_site=l.id</font> <font color="#000000">143:</font> <font color="#FF0000"> and r.mot in ('$word')</font> <font color="#000000">144:</font> <font color="#FF0000"> $langue $Url $create $update $categorie</font> <font color="#000000">145:</font> <font color="#FF0000"> order by facteur desc"</font><font color="#990000">;</font> <font color="#000000">146:</font> <font color="#009900">$result</font> <font color="#990000">=</font> <b><font color="#000000">mysql_db_query</font></b><font color="#990000">(</font><font color="#009900">$database</font><font color="#990000">,</font><font color="#009900">$requete</font><font color="#990000">);</font> <font color="#000000">147:</font> <b><font color="#0000FF">if</font></b> <font color="#990000">(!</font><font color="#009900">$result</font><font color="#990000">)</font> <font color="#FF0000">{</font><b><font color="#0000FF">print</font></b> <font color="#FF0000">"$requete"</font><font color="#990000">;</font><b><font color="#0000FF">return</font></b> <font color="#990000">;</font><font color="#FF0000">}</font> <font color="#000000">148:</font> <font color="#009900">$RowCount</font> <font color="#990000">=</font> <b><font color="#000000">MySQL_NUMROWS</font></b><font color="#990000">(</font><font color="#009900">$result</font><font color="#990000">);</font> <font color="#000000">149:</font> <b><font color="#0000FF">while</font></b> <font color="#990000">(</font><font color="#009900">$i</font><font color="#990000">&lt;</font><font color="#009900">$RowCount</font><font color="#990000">)</font> <font color="#000000">150:</font> <font color="#FF0000">{</font> <font color="#000000">151:</font> <b><font color="#0000FF">list</font></b> <font color="#990000">(</font><font color="#009900">$facteur</font><font color="#990000">,</font><font color="#009900">$url</font><font color="#990000">,</font><font color="#009900">$titre</font><font color="#990000">,</font><font color="#009900">$description</font><font color="#990000">,</font><font color="#009900">$langue</font><font color="#990000">,</font><font color="#009900">$last_update</font><font color="#990000">,</font><font color="#009900">$mot</font><font color="#990000">)=</font> <b><font color="#000000">mysql_fetch_row</font></b><font color="#990000">(</font><font color="#009900">$result</font><font color="#990000">);</font> <font color="#000000">152:</font> <font color="#009900">$tab</font><font color="#990000">[</font><font color="#009900">$url</font><font color="#990000">][</font><font color="#993399">0</font><font color="#990000">]</font> <font color="#990000">=</font> <font color="#009900">$titre</font><font color="#990000">;</font> <font color="#000000">153:</font> <font color="#009900">$tab</font><font color="#990000">[</font><font color="#009900">$url</font><font color="#990000">][</font><font color="#993399">1</font><font color="#990000">]=</font><font color="#009900">$description</font><font color="#990000">;</font> <font color="#000000">154:</font> <font color="#009900">$tab</font><font color="#990000">[</font><font color="#009900">$url</font><font color="#990000">][</font><font color="#993399">2</font><font color="#990000">]+=</font><font color="#009900">$facteur</font><font color="#990000">;</font> <font color="#000000">155:</font> <font color="#009900">$tab</font><font color="#990000">[</font><font color="#009900">$url</font><font color="#990000">][</font><font color="#993399">3</font><font color="#990000">]=</font><font color="#009900">$langue</font><font color="#990000">;</font> <font color="#000000">156:</font> <font color="#009900">$tab</font><font color="#990000">[</font><font color="#009900">$url</font><font color="#990000">][</font><font color="#993399">4</font><font color="#990000">]=</font><font color="#009900">$last_update</font><font color="#990000">;</font> <font color="#000000">157:</font> <font color="#009900">$tab</font><font color="#990000">[</font><font color="#009900">$url</font><font color="#990000">][</font><font color="#993399">5</font><font color="#990000">][]=</font><font color="#009900">$mot</font><font color="#990000">;</font> <font color="#000000">158:</font> <font color="#009900">$i</font><font color="#990000">++;</font> <font color="#000000">159:</font> <font color="#FF0000">}</font> <font color="#000000">160:</font> <b><font color="#0000FF">return</font></b> <font color="#009900">$tab</font><font color="#990000">;</font> <font color="#000000">161:</font> <font color="#FF0000">}</font> <font color="#000000">162:</font> <font color="#000000">163:</font> <i><font color="#9A1900">/*</font></i> <font color="#000000">164:</font> <font color="#000000">165:</font> <i><font color="#9A1900">Fonction retournant la liste des categories de la categorie $id dans le site $idr</font></i> <font color="#000000">166:</font> <font color="#000000">167:</font> <i><font color="#9A1900"> $id : Id de la categorie de depart. Si undef, 0 est utilisé (Considéré comme le "Home")</font></i> <font color="#000000">168:</font> <i><font color="#9A1900"> $idr : Id du responsable</font></i> <font color="#000000">169:</font> <i><font color="#9A1900"> $template : Masque HTML pour le resultat de chaque lien. Si undef, le masque par defaut</font></i> <font color="#000000">170:</font> <i><font color="#9A1900"> (defini en haut de ce module) sera utlise</font></i> <font color="#000000">171:</font> <font color="#000000">172:</font> <i><font color="#9A1900">Retourne ($resultat,$nom_categorie) :</font></i> <font color="#000000">173:</font> <font color="#000000">174:</font> <i><font color="#9A1900"> $resultat : Buffer contenant la liste des sites formatées en ft de $template</font></i> <font color="#000000">175:</font> <i><font color="#9A1900"> $nom_categorie : Nom court de la categorie</font></i> <font color="#000000">176:</font> <font color="#000000">177:</font> <i><font color="#9A1900">*/</font></i> <font color="#000000">178:</font> <font color="#000000">179:</font> <b><font color="#0000FF">function</font></b> <b><font color="#000000">categories_in_categorie</font></b><font color="#990000">(</font><font color="#009900">$id</font><font color="#990000">,</font><font color="#009900">$idr</font><font color="#990000">,</font><font color="#009900">$template</font><font color="#990000">)</font> <font color="#000000">180:</font> <font color="#FF0000">{</font> <font color="#000000">181:</font> <b><font color="#0000FF">global</font></b> <font color="#009900">$database</font><font color="#990000">;</font> <font color="#000000">182:</font> <b><font color="#0000FF">global</font></b> <font color="#009900">$prefix</font><font color="#990000">;</font> <font color="#000000">183:</font> <b><font color="#0000FF">if</font></b> <font color="#990000">(!</font><font color="#009900">$idr</font><font color="#990000">)</font> <font color="#FF0000">{</font><font color="#009900">$idr</font><font color="#990000">=</font><font color="#993399">1</font><font color="#990000">;</font><font color="#FF0000">}</font> <font color="#000000">184:</font> <b><font color="#0000FF">if</font></b> <font color="#990000">(!</font><font color="#009900">$id</font><font color="#990000">)</font> <font color="#FF0000">{</font><font color="#009900">$id</font><font color="#990000">=</font><font color="#993399">0</font><font color="#990000">;</font><font color="#FF0000">}</font> <font color="#000000">185:</font> <font color="#009900">$requete</font> <font color="#990000">=</font> <font color="#FF0000">"select id,nom,parent from "</font><font color="#990000">.</font><font color="#009900">$prefix</font><font color="#990000">.</font><font color="#009900">$idr</font><font color="#990000">.</font><font color="#FF0000">"categorie"</font><font color="#990000">;</font> <font color="#000000">186:</font> <font color="#009900">$result</font> <font color="#990000">=</font> <b><font color="#000000">mysql_db_query</font></b><font color="#990000">(</font><font color="#009900">$database</font><font color="#990000">,</font><font color="#009900">$requete</font><font color="#990000">);</font> <font color="#000000">187:</font> <font color="#009900">$RowCount</font> <font color="#990000">=</font> <b><font color="#000000">MySQL_NUMROWS</font></b><font color="#990000">(</font><font color="#009900">$result</font><font color="#990000">);</font> <font color="#000000">188:</font> <font color="#009900">$i</font><font color="#990000">=</font><font color="#993399">0</font><font color="#990000">;</font> <font color="#000000">189:</font> <b><font color="#0000FF">while</font></b> <font color="#990000">(</font><font color="#009900">$i</font><font color="#990000">&lt;</font><font color="#009900">$RowCount</font><font color="#990000">)</font> <font color="#000000">190:</font> <font color="#FF0000">{</font> <font color="#000000">191:</font> <b><font color="#0000FF">list</font></b> <font color="#990000">(</font><font color="#009900">$idc</font><font color="#990000">,</font><font color="#009900">$nom</font><font color="#990000">,</font><font color="#009900">$parent</font><font color="#990000">)=</font> <b><font color="#000000">mysql_fetch_row</font></b><font color="#990000">(</font><font color="#009900">$result</font><font color="#990000">);</font> <font color="#000000">192:</font> <font color="#009900">$tab</font><font color="#990000">[</font><font color="#009900">$idc</font><font color="#990000">][</font><font color="#993399">0</font><font color="#990000">]=</font><font color="#009900">$nom</font><font color="#990000">;</font> <font color="#000000">193:</font> <font color="#009900">$tab</font><font color="#990000">[</font><font color="#009900">$idc</font><font color="#990000">][</font><font color="#993399">1</font><font color="#990000">]=</font><font color="#009900">$parent</font><font color="#990000">;</font> <font color="#000000">194:</font> <font color="#009900">$i</font><font color="#990000">++;</font> <font color="#000000">195:</font> <font color="#FF0000">}</font> <font color="#000000">196:</font> <b><font color="#0000FF">while</font></b><font color="#990000">(</font> <b><font color="#0000FF">list</font></b><font color="#990000">(</font><font color="#009900">$key</font><font color="#990000">,</font><font color="#009900">$val</font><font color="#990000">)</font> <font color="#990000">=</font> <b><font color="#0000FF">each</font></b> <font color="#990000">(</font><font color="#009900">$tab</font><font color="#990000">))</font> <font color="#000000">197:</font> <font color="#FF0000">{</font> <font color="#000000">198:</font> <font color="#009900">$nom</font><font color="#990000">=</font><font color="#009900">$tab</font><font color="#990000">[</font><font color="#009900">$key</font><font color="#990000">][</font><font color="#993399">0</font><font color="#990000">];</font> <font color="#000000">199:</font> <font color="#009900">$parent</font><font color="#990000">=</font><font color="#009900">$tab</font><font color="#990000">[</font><font color="#009900">$key</font><font color="#990000">][</font><font color="#993399">1</font><font color="#990000">];</font> <font color="#000000">200:</font> <font color="#009900">$nom_complet</font><font color="#990000">=</font><font color="#FF0000">"&lt;a href=\""</font><font color="#990000">.</font><b><font color="#000000">getenv</font></b><font color="#990000">(</font><font color="#FF0000">'SCRIPT_NAME'</font><font color="#990000">).</font><font color="#FF0000">"?browse=1&amp;id=$idr\"&gt;Accueil&lt;/a&gt;"</font><font color="#990000">.</font><b><font color="#000000">getParent</font></b><font color="#990000">(</font><font color="#009900">$key</font><font color="#990000">,</font><font color="#009900">$idr</font><font color="#990000">,</font><font color="#009900">$tab</font><font color="#990000">);</font> <font color="#000000">201:</font> <font color="#009900">$links</font> <font color="#990000">=</font> <b><font color="#000000">get_link_categorie</font></b><font color="#990000">(</font><font color="#009900">$key</font><font color="#990000">,</font><font color="#009900">$idr</font><font color="#990000">);</font> <font color="#000000">202:</font> <b><font color="#0000FF">if</font></b> <font color="#990000">(</font><font color="#009900">$parent</font><font color="#990000">==</font><font color="#009900">$id</font><font color="#990000">)</font> <font color="#FF0000">{</font><b><font color="#0000FF">eval</font></b><font color="#990000">(</font><font color="#009900">$template</font><font color="#990000">);</font><font color="#FF0000">}</font> <font color="#000000">203:</font> <font color="#FF0000">}</font> <font color="#000000">204:</font> <b><font color="#0000FF">if</font></b> <font color="#990000">(</font><font color="#009900">$i</font><font color="#990000">==</font><font color="#993399">0</font><font color="#990000">)</font> <font color="#FF0000">{</font><font color="#009900">$resultat</font><font color="#990000">=</font><font color="#FF0000">"&lt;p&gt;Plus de catégorie&lt;/p&gt;"</font><font color="#990000">;</font><font color="#FF0000">}</font> <font color="#000000">205:</font> <b><font color="#0000FF">if</font></b> <font color="#990000">(</font><font color="#009900">$id</font><font color="#990000">!=</font><font color="#993399">0</font><font color="#990000">)</font> <font color="#FF0000">{</font><font color="#009900">$titre</font> <font color="#990000">=</font> <font color="#FF0000">"&lt;a href=\""</font><font color="#990000">.</font><b><font color="#000000">getenv</font></b><font color="#990000">(</font><font color="#FF0000">'SCRIPT_NAME'</font><font color="#990000">).</font><font color="#FF0000">"?browse=1&amp;id=$idr\"&gt;Accueil&lt;/a&gt; "</font><font color="#990000">.</font><b><font color="#000000">getParent</font></b><font color="#990000">(</font><font color="#009900">$id</font><font color="#990000">,</font><font color="#009900">$idr</font><font color="#990000">,</font><font color="#009900">$tab</font><font color="#990000">);</font><font color="#FF0000">}</font> <font color="#000000">206:</font> <b><font color="#0000FF">else</font></b> <font color="#FF0000">{</font><font color="#009900">$titre</font><font color="#990000">=</font><font color="#FF0000">" "</font><font color="#990000">;</font><font color="#FF0000">}</font> <font color="#000000">207:</font> <b><font color="#0000FF">return</font></b> <b><font color="#0000FF">array</font></b><font color="#990000">(</font><font color="#009900">$resultat</font><font color="#990000">,</font><font color="#009900">$titre</font><font color="#990000">);</font> <font color="#000000">208:</font> <font color="#FF0000">}</font> <font color="#000000">209:</font> <font color="#000000">210:</font> <i><font color="#9A1900">/*</font></i> <font color="#000000">211:</font> <font color="#000000">212:</font> <i><font color="#9A1900">Fonction retournant la liste des pages de la categorie $id dans le site $idr</font></i> <font color="#000000">213:</font> <font color="#000000">214:</font> <i><font color="#9A1900"> $id : Id de la categorie de depart. Si undef, 0 est utilisé (Considéré comme le "Home")</font></i> <font color="#000000">215:</font> <i><font color="#9A1900"> $idr : Id du responsable</font></i> <font color="#000000">216:</font> <i><font color="#9A1900"> $template : Masque HTML pour le resultat de chaque lien. Si undef, le masque par defaut</font></i> <font color="#000000">217:</font> <i><font color="#9A1900"> (defini en haut de ce module) sera utlise</font></i> <font color="#000000">218:</font> <font color="#000000">219:</font> <i><font color="#9A1900">Retourne le buffer contenant la liste des sites formatées en ft de $template</font></i> <font color="#000000">220:</font> <font color="#000000">221:</font> <i><font color="#9A1900">*/</font></i> <font color="#000000">222:</font> <font color="#000000">223:</font> <b><font color="#0000FF">function</font></b> <b><font color="#000000">sites_in_categorie</font></b><font color="#990000">(</font><font color="#009900">$id</font><font color="#990000">,</font><font color="#009900">$idr</font><font color="#990000">,</font><font color="#009900">$template</font><font color="#990000">)</font> <font color="#000000">224:</font> <font color="#FF0000">{</font> <font color="#000000">225:</font> <b><font color="#0000FF">global</font></b> <font color="#009900">$database</font><font color="#990000">;</font> <font color="#000000">226:</font> <b><font color="#0000FF">global</font></b> <font color="#009900">$prefix</font><font color="#990000">;</font> <font color="#000000">227:</font> <font color="#009900">$indiceG</font><font color="#990000">=</font><font color="#993399">1</font><font color="#990000">;</font><font color="#009900">$facteur</font><font color="#990000">=</font><font color="#993399">100</font><font color="#990000">;</font> <font color="#000000">228:</font> <b><font color="#0000FF">if</font></b> <font color="#990000">(!</font><font color="#009900">$idr</font><font color="#990000">)</font> <font color="#FF0000">{</font><font color="#009900">$idr</font><font color="#990000">=</font><font color="#993399">1</font><font color="#990000">;</font><font color="#FF0000">}</font> <font color="#000000">229:</font> <b><font color="#0000FF">if</font></b> <font color="#990000">(!</font><font color="#009900">$id</font><font color="#990000">)</font> <font color="#FF0000">{</font><font color="#009900">$id</font><font color="#990000">=</font><font color="#993399">0</font><font color="#990000">;</font><font color="#FF0000">}</font> <font color="#000000">230:</font> <font color="#009900">$i</font><font color="#990000">=</font><font color="#993399">0</font><font color="#990000">;</font> <font color="#000000">231:</font> <font color="#009900">$requete</font> <font color="#990000">=</font> <font color="#FF0000">"select url,titre,description,langue,last_update from "</font><font color="#990000">.</font><font color="#009900">$prefix</font><font color="#990000">.</font><font color="#009900">$idr</font><font color="#990000">.</font><font color="#FF0000">"links where categorie=$id and browse_categorie='1' and parse='1'"</font><font color="#990000">;</font> <font color="#000000">232:</font> <font color="#009900">$result</font> <font color="#990000">=</font> <b><font color="#000000">mysql_db_query</font></b><font color="#990000">(</font><font color="#009900">$database</font><font color="#990000">,</font><font color="#009900">$requete</font><font color="#990000">);</font> <font color="#000000">233:</font> <font color="#009900">$RowCount</font> <font color="#990000">=</font> <b><font color="#000000">MySQL_NUMROWS</font></b><font color="#990000">(</font><font color="#009900">$result</font><font color="#990000">);</font> <font color="#000000">234:</font> <b><font color="#0000FF">while</font></b> <font color="#990000">(</font><font color="#009900">$i</font><font color="#990000">&lt;</font><font color="#009900">$RowCount</font><font color="#990000">)</font> <font color="#000000">235:</font> <font color="#FF0000">{</font> <font color="#000000">236:</font> <b><font color="#0000FF">list</font></b> <font color="#990000">(</font><font color="#009900">$url</font><font color="#990000">,</font><font color="#009900">$titre</font><font color="#990000">,</font><font color="#009900">$description</font><font color="#990000">,</font><font color="#009900">$langue</font><font color="#990000">,</font><font color="#009900">$last_update</font><font color="#990000">)=</font> <b><font color="#000000">mysql_fetch_row</font></b><font color="#990000">(</font><font color="#009900">$result</font><font color="#990000">);</font> <font color="#000000">237:</font> <b><font color="#0000FF">eval</font></b><font color="#990000">(</font><font color="#009900">$template</font><font color="#990000">);</font> <font color="#000000">238:</font> <font color="#009900">$indiceG</font><font color="#990000">++;</font><font color="#009900">$i</font><font color="#990000">++;</font> <font color="#000000">239:</font> <font color="#FF0000">}</font> <font color="#000000">240:</font> <b><font color="#0000FF">if</font></b> <font color="#990000">(</font><font color="#009900">$i</font><font color="#990000">==</font><font color="#993399">0</font><font color="#990000">)</font> <font color="#FF0000">{</font><font color="#009900">$resultat</font><font color="#990000">=</font><font color="#FF0000">"&lt;p&gt;Pas de pages dans cette catégorie&lt;/p&gt;"</font><font color="#990000">;</font><font color="#FF0000">}</font> <font color="#000000">241:</font> <b><font color="#0000FF">return</font></b> <font color="#009900">$resultat</font><font color="#990000">;</font> <font color="#000000">242:</font> <font color="#FF0000">}</font> <font color="#000000">243:</font> <font color="#000000">244:</font> <i><font color="#9A1900">/*</font></i> <font color="#000000">245:</font> <font color="#000000">246:</font> <i><font color="#9A1900">Rend la chaine correspondante à la catégorie $id avec ses rubriques parentes</font></i> <font color="#000000">247:</font> <font color="#000000">248:</font> <i><font color="#9A1900">*/</font></i> <font color="#000000">249:</font> <font color="#000000">250:</font> <b><font color="#0000FF">function</font></b> <b><font color="#000000">getParent</font></b><font color="#990000">(</font><font color="#009900">$id</font><font color="#990000">,</font><font color="#009900">$idr</font><font color="#990000">,</font><font color="#009900">$tab</font><font color="#990000">)</font> <font color="#000000">251:</font> <font color="#FF0000">{</font> <font color="#000000">252:</font> <b><font color="#0000FF">if</font></b> <font color="#990000">((</font><font color="#009900">$tab</font><font color="#990000">[</font><font color="#009900">$id</font><font color="#990000">][</font><font color="#993399">1</font><font color="#990000">]!=</font><font color="#993399">0</font><font color="#990000">)&amp;&amp;(</font><font color="#009900">$tab</font><font color="#990000">[</font><font color="#009900">$id</font><font color="#990000">][</font><font color="#993399">0</font><font color="#990000">]))</font> <font color="#FF0000">{</font><font color="#009900">$parent</font> <font color="#990000">=</font> <b><font color="#000000">getParent</font></b><font color="#990000">(</font><font color="#009900">$tab</font><font color="#990000">[</font><font color="#009900">$id</font><font color="#990000">][</font><font color="#993399">1</font><font color="#990000">],</font><font color="#009900">$idr</font><font color="#990000">,</font><font color="#009900">$tab</font><font color="#990000">);</font><font color="#FF0000">}</font> <font color="#000000">253:</font> <b><font color="#0000FF">if</font></b> <font color="#990000">(!</font><font color="#009900">$tab</font><font color="#990000">[</font><font color="#009900">$id</font><font color="#990000">][</font><font color="#993399">0</font><font color="#990000">])</font> <font color="#FF0000">{</font><font color="#009900">$tab</font><font color="#990000">[</font><font color="#009900">$id</font><font color="#990000">][</font><font color="#993399">0</font><font color="#990000">]=</font><font color="#FF0000">'Home'</font><font color="#990000">;</font><font color="#FF0000">}</font> <font color="#000000">254:</font> <font color="#009900">$parent</font><font color="#990000">.=</font><font color="#FF0000">"&amp;gt;&lt;a href=\""</font><font color="#990000">.</font><b><font color="#000000">get_link_categorie</font></b><font color="#990000">(</font><font color="#009900">$id</font><font color="#990000">,</font><font color="#009900">$idr</font><font color="#990000">).</font><font color="#FF0000">'"&gt;'</font><font color="#990000">.</font><font color="#009900">$tab</font><font color="#990000">[</font><font color="#009900">$id</font><font color="#990000">][</font><font color="#993399">0</font><font color="#990000">].</font><font color="#FF0000">"&lt;/a&gt;"</font><font color="#990000">;</font> <font color="#000000">255:</font> <b><font color="#0000FF">return</font></b> <font color="#009900">$parent</font><font color="#990000">;</font> <font color="#000000">256:</font> <font color="#FF0000">}</font> <font color="#000000">257:</font> <b><font color="#0000FF">function</font></b> <b><font color="#000000">getWLParent</font></b><font color="#990000">(</font><font color="#009900">$id</font><font color="#990000">,</font><font color="#009900">$idr</font><font color="#990000">,</font><font color="#009900">$tab</font><font color="#990000">)</font> <font color="#000000">258:</font> <font color="#FF0000">{</font> <font color="#000000">259:</font> <b><font color="#0000FF">if</font></b> <font color="#990000">((</font><font color="#009900">$tab</font><font color="#990000">[</font><font color="#009900">$id</font><font color="#990000">][</font><font color="#993399">1</font><font color="#990000">]!=</font><font color="#993399">0</font><font color="#990000">)&amp;&amp;(</font><font color="#009900">$tab</font><font color="#990000">[</font><font color="#009900">$id</font><font color="#990000">][</font><font color="#993399">0</font><font color="#990000">]))</font> <font color="#FF0000">{</font><font color="#009900">$parent</font> <font color="#990000">=</font> <b><font color="#000000">getWLParent</font></b><font color="#990000">(</font><font color="#009900">$tab</font><font color="#990000">[</font><font color="#009900">$id</font><font color="#990000">][</font><font color="#993399">1</font><font color="#990000">],</font><font color="#009900">$idr</font><font color="#990000">,</font><font color="#009900">$tab</font><font color="#990000">);</font><font color="#FF0000">}</font> <font color="#000000">260:</font> <b><font color="#0000FF">if</font></b> <font color="#990000">(!</font><font color="#009900">$tab</font><font color="#990000">[</font><font color="#009900">$id</font><font color="#990000">][</font><font color="#993399">0</font><font color="#990000">])</font> <font color="#FF0000">{</font><font color="#009900">$tab</font><font color="#990000">[</font><font color="#009900">$id</font><font color="#990000">][</font><font color="#993399">0</font><font color="#990000">]=</font><font color="#FF0000">'Home'</font><font color="#990000">;</font><font color="#FF0000">}</font> <font color="#000000">261:</font> <font color="#009900">$parent</font><font color="#990000">.=</font><font color="#FF0000">"&amp;gt;"</font><font color="#990000">.</font><font color="#009900">$tab</font><font color="#990000">[</font><font color="#009900">$id</font><font color="#990000">][</font><font color="#993399">0</font><font color="#990000">];</font> <font color="#000000">262:</font> <b><font color="#0000FF">return</font></b> <font color="#009900">$parent</font><font color="#990000">;</font> <font color="#000000">263:</font> <font color="#FF0000">}</font> <font color="#000000">264:</font> <i><font color="#9A1900">/*</font></i> <font color="#000000">265:</font> <font color="#000000">266:</font> <i><font color="#9A1900">Retourne 1 si $var appartient à $liste, 0 sinon.</font></i> <font color="#000000">267:</font> <font color="#000000">268:</font> <i><font color="#9A1900">*/</font></i> <font color="#000000">269:</font> <b><font color="#0000FF">function</font></b> <b><font color="#000000">appartient</font></b><font color="#990000">(</font><font color="#009900">$var</font><font color="#990000">,</font><font color="#009900">$liste</font><font color="#990000">)</font> <font color="#000000">270:</font> <font color="#FF0000">{</font> <font color="#000000">271:</font> <b><font color="#0000FF">while</font></b><font color="#990000">(</font> <b><font color="#0000FF">list</font></b><font color="#990000">(</font><font color="#009900">$key</font><font color="#990000">,</font><font color="#009900">$val</font><font color="#990000">)</font> <font color="#990000">=</font> <b><font color="#0000FF">each</font></b> <font color="#990000">(</font><font color="#009900">$liste</font><font color="#990000">))</font> <font color="#FF0000">{</font><b><font color="#0000FF">if</font></b> <font color="#990000">(</font><font color="#009900">$val</font><font color="#990000">==</font><font color="#009900">$var</font><font color="#990000">)</font> <font color="#FF0000">{</font><b><font color="#0000FF">return</font></b> <font color="#993399">1</font><font color="#990000">;</font><font color="#FF0000">}}</font> <font color="#000000">272:</font> <b><font color="#0000FF">return</font></b> <font color="#993399">0</font><font color="#990000">;</font> <font color="#000000">273:</font> <font color="#FF0000">}</font> <font color="#000000">274:</font> <i><font color="#9A1900">/**</font></i> <font color="#000000">275:</font> <i><font color="#9A1900"> * Retourne l'URL correspondant à la page no $no_page dans la recherche en cours</font></i> <font color="#000000">276:</font> <i><font color="#9A1900"> */</font></i> <font color="#000000">277:</font> <b><font color="#0000FF">function</font></b> <b><font color="#000000">get_link</font></b><font color="#990000">(</font><font color="#009900">$no_page</font><font color="#990000">,</font><font color="#009900">$word</font><font color="#990000">,</font><font color="#009900">$id</font><font color="#990000">)</font> <font color="#000000">278:</font> <font color="#FF0000">{</font> <font color="#000000">279:</font> <font color="#009900">$buf</font> <font color="#990000">=</font> <b><font color="#000000">getenv</font></b><font color="#990000">(</font><font color="#FF0000">'SCRIPT_NAME'</font><font color="#990000">).</font><font color="#FF0000">"?word="</font><font color="#990000">.</font><b><font color="#000000">urlencode</font></b><font color="#990000">(</font><font color="#009900">$word</font><font color="#990000">).</font><font color="#FF0000">"&amp;id="</font><font color="#990000">.</font><font color="#009900">$id</font><font color="#990000">.</font><font color="#FF0000">"&amp;first="</font><font color="#990000">.</font><font color="#009900">$no_page</font><font color="#990000">;</font> <font color="#000000">280:</font> <b><font color="#0000FF">if</font></b> <font color="#990000">(</font><font color="#009900">$nbResultPerPage</font><font color="#990000">)</font> <font color="#FF0000">{</font><font color="#009900">$buf</font><font color="#990000">.=</font><font color="#FF0000">"&amp;nbResultPerPage="</font><font color="#990000">.</font><font color="#009900">$nbResultPerPage</font><font color="#990000">;</font><font color="#FF0000">}</font> <font color="#000000">281:</font> <b><font color="#0000FF">return</font></b> <font color="#009900">$buf</font><font color="#990000">;</font> <font color="#000000">282:</font> <font color="#FF0000">}</font> <font color="#000000">283:</font> <i><font color="#9A1900">/**</font></i> <font color="#000000">284:</font> <i><font color="#9A1900"> * Retourne l'URL correspondant à la categorie no $no_categorie</font></i> <font color="#000000">285:</font> <i><font color="#9A1900"> */</font></i> <font color="#000000">286:</font> <b><font color="#0000FF">function</font></b> <b><font color="#000000">get_link_categorie</font></b><font color="#990000">(</font><font color="#009900">$no_categorie</font><font color="#990000">,</font><font color="#009900">$id</font><font color="#990000">)</font> <font color="#FF0000">{</font><b><font color="#0000FF">return</font></b> <b><font color="#000000">getenv</font></b><font color="#990000">(</font><font color="#FF0000">'SCRIPT_NAME'</font><font color="#990000">).</font><font color="#FF0000">"?categorie=$no_categorie&amp;id=$id"</font><font color="#990000">;</font><font color="#FF0000">}</font> <font color="#000000">287:</font> <font color="#000000">288:</font> <i><font color="#9A1900">/**</font></i> <font color="#000000">289:</font> <i><font color="#9A1900"> * Retourne le nom du site dans la table responsable correspondant à l'id $id</font></i> <font color="#000000">290:</font> <i><font color="#9A1900"> */</font></i> <font color="#000000">291:</font> <font color="#000000">292:</font> <b><font color="#0000FF">function</font></b> <b><font color="#000000">get_name_site</font></b><font color="#990000">(</font><font color="#009900">$id</font><font color="#990000">,</font><font color="#009900">$prefix</font><font color="#990000">)</font> <font color="#000000">293:</font> <font color="#FF0000">{</font> <font color="#000000">294:</font> <i><font color="#9A1900">#$result = mysql_db_query("circa","select titre from ".$this-&gt;{PREFIX_TABLE}."responsable where id=$id");</font></i> <font color="#000000">295:</font> <i><font color="#9A1900">#$sth-&gt;execute() || print "Erreur: $DBI::errstr\n";</font></i> <font color="#000000">296:</font> <i><font color="#9A1900">#my ($titre)=$sth-&gt;fetchrow_array;</font></i> <font color="#000000">297:</font> <i><font color="#9A1900">#$sth-&gt;finish;</font></i> <font color="#000000">298:</font> <b><font color="#0000FF">return</font></b> <font color="#009900">$titre</font><font color="#990000">;</font> <font color="#000000">299:</font> <font color="#FF0000">}</font> <font color="#000000">300:</font> <font color="#000000">301:</font> <b><font color="#0000FF">function</font></b> <b><font color="#000000">get_liste_categorie</font></b><font color="#990000">(</font><font color="#009900">$idr</font><font color="#990000">)</font> <font color="#000000">302:</font> <font color="#FF0000">{</font> <font color="#000000">303:</font> <b><font color="#0000FF">global</font></b> <font color="#009900">$database</font><font color="#990000">;</font> <font color="#000000">304:</font> <b><font color="#0000FF">global</font></b> <font color="#009900">$prefix</font><font color="#990000">;</font> <font color="#000000">305:</font> <font color="#009900">$requete</font> <font color="#990000">=</font> <font color="#FF0000">"select id,nom,parent from "</font><font color="#990000">.</font><font color="#009900">$prefix</font><font color="#990000">.</font><font color="#009900">$idr</font><font color="#990000">.</font><font color="#FF0000">"categorie"</font><font color="#990000">;</font> <font color="#000000">306:</font> <font color="#009900">$result</font> <font color="#990000">=</font> <b><font color="#000000">mysql_db_query</font></b><font color="#990000">(</font><font color="#009900">$database</font><font color="#990000">,</font><font color="#009900">$requete</font><font color="#990000">);</font> <font color="#000000">307:</font> <font color="#009900">$RowCount</font> <font color="#990000">=</font> <b><font color="#000000">MySQL_NUMROWS</font></b><font color="#990000">(</font><font color="#009900">$result</font><font color="#990000">);</font> <font color="#000000">308:</font> <font color="#009900">$i</font><font color="#990000">=</font><font color="#993399">0</font><font color="#990000">;</font> <font color="#000000">309:</font> <b><font color="#0000FF">while</font></b> <font color="#990000">(</font><font color="#009900">$i</font><font color="#990000">&lt;</font><font color="#009900">$RowCount</font><font color="#990000">)</font> <font color="#000000">310:</font> <font color="#FF0000">{</font> <font color="#000000">311:</font> <b><font color="#0000FF">list</font></b> <font color="#990000">(</font><font color="#009900">$idc</font><font color="#990000">,</font><font color="#009900">$nom</font><font color="#990000">,</font><font color="#009900">$parent</font><font color="#990000">)=</font> <b><font color="#000000">mysql_fetch_row</font></b><font color="#990000">(</font><font color="#009900">$result</font><font color="#990000">);</font> <font color="#000000">312:</font> <font color="#009900">$tab</font><font color="#990000">[</font><font color="#009900">$idc</font><font color="#990000">][</font><font color="#993399">0</font><font color="#990000">]=</font><font color="#009900">$nom</font><font color="#990000">;</font> <font color="#000000">313:</font> <font color="#009900">$tab</font><font color="#990000">[</font><font color="#009900">$idc</font><font color="#990000">][</font><font color="#993399">1</font><font color="#990000">]=</font><font color="#009900">$parent</font><font color="#990000">;</font> <font color="#000000">314:</font> <font color="#009900">$i</font><font color="#990000">++;</font> <font color="#000000">315:</font> <font color="#FF0000">}</font> <font color="#000000">316:</font> <b><font color="#0000FF">while</font></b><font color="#990000">(</font> <b><font color="#0000FF">list</font></b><font color="#990000">(</font><font color="#009900">$key</font><font color="#990000">,</font><font color="#009900">$val</font><font color="#990000">)</font> <font color="#990000">=</font> <b><font color="#0000FF">each</font></b> <font color="#990000">(</font><font color="#009900">$tab</font><font color="#990000">))</font> <font color="#000000">317:</font> <font color="#FF0000">{</font> <font color="#000000">318:</font> <font color="#009900">$nom</font><font color="#990000">=</font><font color="#009900">$tab</font><font color="#990000">[</font><font color="#009900">$key</font><font color="#990000">][</font><font color="#993399">0</font><font color="#990000">];</font> <font color="#000000">319:</font> <font color="#009900">$parent</font><font color="#990000">=</font><font color="#009900">$tab</font><font color="#990000">[</font><font color="#009900">$key</font><font color="#990000">][</font><font color="#993399">1</font><font color="#990000">];</font> <font color="#000000">320:</font> <font color="#009900">$buf</font><font color="#990000">.=</font><font color="#FF0000">"&lt;option value=\"$key\"&gt;"</font><font color="#990000">.</font><b><font color="#000000">getWLParent</font></b><font color="#990000">(</font><font color="#009900">$key</font><font color="#990000">,</font><font color="#009900">$idr</font><font color="#990000">,</font><font color="#009900">$tab</font><font color="#990000">).</font><font color="#FF0000">"&lt;/option&gt;"</font><font color="#990000">;</font> <font color="#000000">321:</font> <font color="#FF0000">}</font> <font color="#000000">322:</font> <b><font color="#0000FF">return</font></b> <font color="#009900">$buf</font><font color="#990000">;</font> <font color="#000000">323:</font> <font color="#FF0000">}</font> <font color="#000000">324:</font> <font color="#000000">325:</font> <b><font color="#0000FF">function</font></b> <b><font color="#000000">addSite</font></b><font color="#990000">(</font><font color="#009900">$url</font><font color="#990000">,</font><font color="#009900">$categorie</font><font color="#990000">)</font> <font color="#000000">326:</font> <font color="#FF0000">{</font> <font color="#000000">327:</font> <b><font color="#0000FF">global</font></b> <font color="#009900">$database</font><font color="#990000">;</font> <font color="#000000">328:</font> <b><font color="#0000FF">global</font></b> <font color="#009900">$prefix</font><font color="#990000">;</font> <font color="#000000">329:</font> <b><font color="#0000FF">global</font></b> <font color="#009900">$idr</font><font color="#990000">;</font> <font color="#000000">330:</font> <font color="#009900">$requete</font><font color="#990000">=</font><font color="#FF0000">"insert into "</font><font color="#990000">.</font><font color="#009900">$prefix</font><font color="#990000">.</font><font color="#009900">$idr</font><font color="#990000">.</font><font color="#FF0000">"links (url,titre,description,langue,valide,categorie,browse_categorie)</font> <font color="#000000">331:</font> <font color="#FF0000"> values ('$url',' ',' ','fr',0,$categorie,'1')"</font><font color="#990000">;</font> <font color="#000000">332:</font> <font color="#009900">$result</font> <font color="#990000">=</font> <b><font color="#000000">mysql_db_query</font></b><font color="#990000">(</font><font color="#009900">$database</font><font color="#990000">,</font><font color="#009900">$requete</font><font color="#990000">);</font> <font color="#000000">333:</font> <font color="#FF0000">}</font> <font color="#000000">334:</font> <font color="#990000">?&gt;</font> <font color="#000000">335:</font> </tt></pre> �����������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/tests/lang.list��������������������������������������������������������������0000644�0001750�0001750�00000005231�11672675565�014714� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������C = cpp.lang H = cpp.lang ac = m4.lang ada = ada.lang adb = ada.lang am = makefile.lang applescript = applescript.lang asm = asm.lang autoconf = m4.lang awk = awk.lang bash = sh.lang bat = bat.lang batch = bat.lang bib = bib.lang bison = bison.lang c = c.lang caml = caml.lang cbl = cobol.lang cc = cpp.lang changelog = changelog.lang clipper = clipper.lang cls = latex.lang cobol = cobol.lang conf = conf.lang cpp = cpp.lang cs = csharp.lang csh = sh.lang csharp = csharp.lang css = css.lang ctp = php.lang d = d.lang desktop = desktop.lang diff = diff.lang dmd = d.lang docbook = xml.lang dtx = latex.lang el = lisp.lang eps = postscript.lang erl = erlang.lang erlang = erlang.lang errors = errors.lang fixed-fortran = fixed-fortran.lang flex = flex.lang fortran = fortran.lang free-fortran = fortran.lang glsl = glsl.lang h = cpp.lang haskell = haskell.lang haxe = haxe.lang hh = cpp.lang hpp = cpp.lang hs = haskell.lang htm = html.lang html = html.lang hx = haxe.lang in = makefile.lang ini = desktop.lang java = java.lang javalog = javalog.lang javascript = javascript.lang js = javascript.lang kcfg = xml.lang kdevelop = xml.lang kidl = xml.lang ksh = sh.lang l = flex.lang lang = langdef.lang langdef = langdef.lang latex = latex.lang ldap = ldap.lang ldif = ldap.lang lex = flex.lang lgt = logtalk.lang lhs = haskell_literate.lang lisp = lisp.lang ll = flex.lang log = log.lang logtalk = logtalk.lang lsm = lsm.lang lua = lua.lang m4 = m4.lang makefile = makefile.lang manifest = manifest.lang mf = manifest.lang ml = caml.lang mli = caml.lang moc = cpp.lang opa = opa.lang outlang = outlang.lang oz = oz.lang pas = pascal.lang pascal = pascal.lang patch = diff.lang pc = pc.lang perl = perl.lang php = php.lang php3 = php.lang php4 = php.lang php5 = php.lang pkgconfig = pc.lang pl = prolog.lang pm = perl.lang po = po.lang postscript = postscript.lang pot = po.lang prg = clipper.lang prolog = prolog.lang properties = properties.lang proto = proto.lang protobuf = proto.lang ps = postscript.lang py = python.lang python = python.lang rb = ruby.lang rc = xml.lang ruby = ruby.lang s = asm.lang scala = scala.lang scheme = scheme.lang scm = scheme.lang scpt = applescript.lang sh = sh.lang shell = sh.lang sig = sml.lang sl = slang.lang slang = slang.lang slsh = slang.lang sml = sml.lang spec = spec.lang sql = sql.lang sty = latex.lang style = style.lang syslog = log.lang tcl = tcl.lang tcsh = sh.lang tex = latex.lang texi = texinfo.lang texinfo = texinfo.lang tk = tcl.lang tml = tml.lang txt = nohilite.lang ui = xml.lang upc = upc.lang vala = vala.lang vbs = vbscript.lang vbscript = vbscript.lang xhtml = xml.lang xml = xml.lang xorg = xorg.lang y = bison.lang yacc = bison.lang yy = bison.lang �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/tests/test.rb����������������������������������������������������������������0000644�0001750�0001750�00000002125�11672675566�014402� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env ruby # # comment require "English" #{expression} #{ expression } cnf.marked.any? ? cnf.marked.to_a.join!(',') : "nothing" BEGIN { puts "Hello! in \"BEGIN\"" # comment puts 'World! in \'BEGIN\'' # comment } END { puts 'bye! in "END"' } p $" p $' p $/ puts __LINE__ puts __FILE__ a = [1, 2, 3, 4, "foo", "bar"] a = %w(1, 2, 3, 4, "foo", "bar") h = {"foo" => 1, "bar" => 3} $global = 1 print("with parenthesis\n") print "without parenthesis\n" print 12345678, "\n" print 1.2345678, "\n" print a[0], a[1], "\n" print h['foo'], h[1], "\n" print $global, "\n" print `date` print <<EOM ppp EOM print <<"EOM" ppp EOM def foo puts "foo" end module M end class Klass include M @@foo = "bar" def initialize @foo = "bar" end def foo puts @@foo return [nil, false, self, true] end end foo foo() k = Klass.new k.foo k.foo() p [(1 and 2), (1 or 2), (not nil)] str = "abc" p /d/ =~ str p %r|a| =~ str p %r!a! =~ str /"d/ =~ str # problem " in Regexp /'d/ =~ str # problem ' in Regexp if %r{foo(\{?\}?[A-Z]\{?\}?bar#{myvar})} =~ 'foo{A}bar' puts 'foo' end �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/tests/wrong_exp.lang���������������������������������������������������������0000644�0001750�0001750�00000000044�11672675567�015750� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������symbol = "ok" keyword = '(notclosed'��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/tests/test.unknown.html������������������������������������������������������0000644�0001750�0001750�00000000436�11672675567�016445� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<!-- Generator: GNU source-highlight by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite --> <pre><tt>This is a file just to test the behavior of source-highlight when the input language is not known and the --failsafe option is given </tt></pre> ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/tests/test_comments.rb�������������������������������������������������������0000644�0001750�0001750�00000000161�11672675567�016306� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# some tests for comments # yep =begin This is rd Documentation # foo =end print "Outside of the comment\n" ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/tests/test.php3.html���������������������������������������������������������0000644�0001750�0001750�00000162413�11672675566�015623� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<!-- Generator: GNU source-highlight by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite --> <pre><tt><font color="#990000">&lt;?php</font> <i><font color="#9A1900">/*</font></i> <i><font color="#9A1900">CircaLib.php3 : provide function to perform search on Circa with PHP</font></i> <i><font color="#9A1900">Copyright 2000 A.Barbet </font></i><u><font color="#0000FF">alian@alianwebserver.com</font></u><i><font color="#9A1900">. All rights reserved.</font></i> <i><font color="#9A1900">Revision 1.1 2000/11/23 22:51:17 Administrateur</font></i> <i><font color="#9A1900">addSite.php3</font></i> <i><font color="#9A1900">Revision 1.2 2000/10/27 16:01:12 Administrateur</font></i> <i><font color="#9A1900">- Navigation par categorie</font></i> <i><font color="#9A1900">- Passer le prefixe en variable globale</font></i> <i><font color="#9A1900">- Passer la database en variable globale</font></i> <i><font color="#9A1900">Revision 1.1 2000/10/22 22:43:47 Administrateur</font></i> <i><font color="#9A1900">Premiere version fonctionnelle. Supporte:</font></i> <i><font color="#9A1900">- Requetes booleenes</font></i> <i><font color="#9A1900">- Affichage par pages de 10 liens</font></i> <i><font color="#9A1900">*/</font></i> <i><font color="#9A1900">/*</font></i> <i><font color="#9A1900">Fonction permettant d'effectuer une recherche par mot dans Circa</font></i> <i><font color="#9A1900">Paramètres :</font></i> <i><font color="#9A1900"> $template : Masque HTML pour le resultat de chaque lien. La liste des variables définies au</font></i> <i><font color="#9A1900"> moment du eval sont : $indiceG,$titre,$description,$url,$facteur,$last_update,$langue</font></i> <i><font color="#9A1900"> Exemple de masque :</font></i> <i><font color="#9A1900"> '"&lt;p&gt;$indiceG - &lt;a href=\"$url\"&gt;$titre&lt;/a&gt; $description&lt;br&gt;</font></i> <i><font color="#9A1900"> &lt;font class=\"small\"&gt;&lt;b&gt;Url:&lt;/b&gt; $url &lt;b&gt;Facteur:&lt;/b&gt; $facteur</font></i> <i><font color="#9A1900"> &lt;b&gt;Last update:&lt;/b&gt; $last_update &lt;/font&gt;&lt;/p&gt;\n"'</font></i> <i><font color="#9A1900"> $mot : Séquence des mots recherchés tel que tapé par l'utilisateur</font></i> <i><font color="#9A1900"> first : Indice du premier site affiché dans le résultat</font></i> <i><font color="#9A1900"> $id : Id du site dans lequel effectué la recherche</font></i> <i><font color="#9A1900"> $langue : Restriction par langue (facultatif)</font></i> <i><font color="#9A1900"> $Url : Restriction par url : les url trouvées commenceront par $Url (facultatif)</font></i> <i><font color="#9A1900"> $create : Restriction par date inscription. Format YYYY-MM-JJ HH:MM:SS (facultatif)</font></i> <i><font color="#9A1900"> $update : Restriction par date de mise à jour des pages. Format YYYY-MM-JJ HH:MM:SS (facultatif)</font></i> <i><font color="#9A1900"> $catego : Restriction par categorie (facultatif)</font></i> <i><font color="#9A1900">Retourne ($resultat,$links,$indice)</font></i> <i><font color="#9A1900"> $resultat : Buffer HTML contenant la liste des sites trouves formaté en fonction</font></i> <i><font color="#9A1900"> de $template et des mots present dans $mots</font></i> <i><font color="#9A1900"> $links : Liens vers les pages suivantes / precedentes</font></i> <i><font color="#9A1900"> $indice : Nombre de sites trouves</font></i> <i><font color="#9A1900">*/</font></i> <b><font color="#000080">include</font></b><font color="#990000">(</font><font color="#FF0000">"foo.php"</font><font color="#990000">);</font> <b><font color="#000080">include_once</font></b><font color="#990000">(</font><font color="#FF0000">"bar.php"</font><font color="#990000">);</font> <b><font color="#0000FF">function</font></b> <b><font color="#000000">search</font></b><font color="#990000">(</font><font color="#009900">$template</font><font color="#990000">,</font><font color="#009900">$word</font><font color="#990000">,</font><font color="#009900">$first</font><font color="#990000">,</font><font color="#009900">$idc</font><font color="#990000">,</font><font color="#009900">$langue</font><font color="#990000">,</font><font color="#009900">$Url</font><font color="#990000">,</font><font color="#009900">$create</font><font color="#990000">,</font><font color="#009900">$update</font><font color="#990000">,</font><font color="#009900">$categorie</font><font color="#990000">)</font> <font color="#FF0000">{</font> <font color="#009900">$mots</font> <font color="#990000">=</font> <b><font color="#000000">split</font></b><font color="#990000">(</font> <font color="#FF0000">" "</font><font color="#990000">,</font> <b><font color="#000000">strtolower</font></b><font color="#990000">(</font><font color="#009900">$word</font><font color="#990000">));</font> <font color="#009900">$i</font><font color="#990000">=</font><font color="#993399">0</font><font color="#990000">;</font> <i><font color="#9A1900"># Recherche des requetes booleenes</font></i> <b><font color="#0000FF">while</font></b><font color="#990000">(</font> <b><font color="#0000FF">list</font></b><font color="#990000">(</font><font color="#009900">$key</font><font color="#990000">,</font><font color="#009900">$valeur</font><font color="#990000">)</font> <font color="#990000">=</font> <b><font color="#0000FF">each</font></b> <font color="#990000">(</font><font color="#009900">$mots</font><font color="#990000">))</font> <font color="#FF0000">{</font> <b><font color="#0000FF">if</font></b> <font color="#990000">(</font><font color="#009900">$valeur</font> <font color="#990000">==</font> <font color="#FF0000">'+'</font><font color="#990000">)</font> <font color="#FF0000">{</font><font color="#009900">$ind_and</font><font color="#990000">[]=</font><font color="#009900">$i</font><font color="#990000">;</font><font color="#FF0000">}</font> <i><font color="#9A1900"># Reperage de la position des mots 'and'</font></i> <b><font color="#0000FF">else</font></b> <b><font color="#0000FF">if</font></b> <font color="#990000">(</font><font color="#009900">$valeur</font> <font color="#990000">==</font> <font color="#FF0000">'-'</font><font color="#990000">)</font> <font color="#FF0000">{</font><font color="#009900">$ind_not</font><font color="#990000">[]=</font><font color="#009900">$i</font><font color="#990000">;</font><font color="#FF0000">}</font> <i><font color="#9A1900"># Reperage de la position des mots 'not'</font></i> <b><font color="#0000FF">else</font></b> <font color="#FF0000">{</font><font color="#009900">$mots_tmp</font><font color="#990000">[]=</font><font color="#009900">$valeur</font><font color="#990000">;</font><font color="#FF0000">}</font> <font color="#009900">$i</font><font color="#990000">++;</font> <font color="#FF0000">}</font> <i><font color="#9A1900"># Recherche SQL</font></i> <font color="#009900">$tab</font> <font color="#990000">=</font> <b><font color="#000000">search_word</font></b><font color="#990000">(</font><b><font color="#000000">join</font></b><font color="#990000">(</font><font color="#FF0000">"','"</font><font color="#990000">,</font><font color="#009900">$mots_tmp</font><font color="#990000">),</font><font color="#009900">$idc</font><font color="#990000">,</font><font color="#FF0000">''</font><font color="#990000">,</font><font color="#FF0000">''</font><font color="#990000">,</font><font color="#FF0000">''</font><font color="#990000">,</font><font color="#FF0000">''</font><font color="#990000">,</font><font color="#FF0000">''</font><font color="#990000">);</font> <i><font color="#9A1900"># On supprime tout ceux qui ne repondent pas aux criteres and si present</font></i> <b><font color="#0000FF">if</font></b> <font color="#990000">(</font><b><font color="#000000">is_array</font></b><font color="#990000">(</font><font color="#009900">$ind_and</font><font color="#990000">))</font> <font color="#FF0000">{</font><b><font color="#0000FF">while</font></b><font color="#990000">(</font> <b><font color="#0000FF">list</font></b><font color="#990000">(</font><font color="#009900">$key</font><font color="#990000">,</font><font color="#009900">$ind</font><font color="#990000">)</font> <font color="#990000">=</font> <b><font color="#0000FF">each</font></b><font color="#990000">(</font><font color="#009900">$ind_and</font><font color="#990000">))</font> <font color="#FF0000">{</font><b><font color="#0000FF">while</font></b><font color="#990000">(</font> <b><font color="#0000FF">list</font></b><font color="#990000">(</font><font color="#009900">$url</font><font color="#990000">,</font><font color="#009900">$tab_url</font><font color="#990000">)</font> <font color="#990000">=</font> <b><font color="#0000FF">each</font></b> <font color="#990000">(</font><font color="#009900">$tab</font><font color="#990000">))</font> <font color="#FF0000">{</font><b><font color="#0000FF">if</font></b> <font color="#990000">(!</font><b><font color="#000000">appartient</font></b><font color="#990000">(</font><font color="#009900">$mots</font><font color="#990000">[</font><font color="#009900">$ind</font><font color="#990000">+</font><font color="#993399">1</font><font color="#990000">],</font><font color="#009900">$tab_url</font><font color="#990000">[</font><font color="#993399">5</font><font color="#990000">]))</font> <font color="#FF0000">{</font><b><font color="#0000FF">unset</font></b><font color="#990000">(</font><font color="#009900">$tab</font><font color="#990000">[</font><font color="#009900">$url</font><font color="#990000">]);</font><font color="#FF0000">}}}</font><b><font color="#000000">reset</font></b><font color="#990000">(</font><font color="#009900">$tab</font><font color="#990000">);</font><font color="#FF0000">}</font> <i><font color="#9A1900"># On supprime tout ceux qui ne repondent pas aux criteres not si present</font></i> <b><font color="#0000FF">if</font></b> <font color="#990000">(</font><b><font color="#000000">is_array</font></b><font color="#990000">(</font><font color="#009900">$ind_not</font><font color="#990000">))</font> <font color="#FF0000">{</font><b><font color="#0000FF">while</font></b><font color="#990000">(</font> <b><font color="#0000FF">list</font></b><font color="#990000">(</font><font color="#009900">$key</font><font color="#990000">,</font><font color="#009900">$ind</font><font color="#990000">)</font> <font color="#990000">=</font> <b><font color="#0000FF">each</font></b><font color="#990000">(</font><font color="#009900">$ind_not</font><font color="#990000">))</font> <font color="#FF0000">{</font><b><font color="#0000FF">while</font></b><font color="#990000">(</font> <b><font color="#0000FF">list</font></b><font color="#990000">(</font><font color="#009900">$url</font><font color="#990000">,</font><font color="#009900">$tab_url</font><font color="#990000">)</font> <font color="#990000">=</font> <b><font color="#0000FF">each</font></b> <font color="#990000">(</font><font color="#009900">$tab</font><font color="#990000">))</font> <font color="#FF0000">{</font><b><font color="#0000FF">if</font></b> <font color="#990000">(</font><b><font color="#000000">appartient</font></b><font color="#990000">(</font><font color="#009900">$mots</font><font color="#990000">[</font><font color="#009900">$ind</font><font color="#990000">+</font><font color="#993399">1</font><font color="#990000">],</font><font color="#009900">$tab_url</font><font color="#990000">[</font><font color="#993399">5</font><font color="#990000">]))</font> <font color="#FF0000">{</font><b><font color="#0000FF">unset</font></b><font color="#990000">(</font><font color="#009900">$tab</font><font color="#990000">[</font><font color="#009900">$url</font><font color="#990000">]);</font><font color="#FF0000">}}}</font><b><font color="#000000">reset</font></b><font color="#990000">(</font><font color="#009900">$tab</font><font color="#990000">);</font><font color="#FF0000">}</font> <font color="#009900">$indice</font><font color="#990000">=</font><font color="#993399">0</font><font color="#990000">;</font><font color="#009900">$nbResultPerPage</font><font color="#990000">=</font><font color="#993399">10</font><font color="#990000">;</font> <font color="#009900">$lasto</font> <font color="#990000">=</font> <font color="#009900">$first</font> <font color="#990000">+</font> <font color="#009900">$nbResultPerPage</font><font color="#990000">;</font> <i><font color="#9A1900"># On met en forme le resultat</font></i> <b><font color="#0000FF">if</font></b> <font color="#990000">(</font><b><font color="#000000">is_array</font></b><font color="#990000">(</font><font color="#009900">$tab</font><font color="#990000">))</font> <font color="#FF0000">{</font> <b><font color="#0000FF">while</font></b><font color="#990000">(</font> <b><font color="#0000FF">list</font></b><font color="#990000">(</font><font color="#009900">$url</font><font color="#990000">,</font><font color="#009900">$tab_url</font><font color="#990000">)</font> <font color="#990000">=</font> <b><font color="#0000FF">each</font></b> <font color="#990000">(</font><font color="#009900">$tab</font><font color="#990000">))</font> <font color="#FF0000">{</font> <font color="#009900">$indiceG</font><font color="#990000">=</font><font color="#009900">$indice</font><font color="#990000">+</font><font color="#993399">1</font><font color="#990000">;</font> <b><font color="#0000FF">list</font></b><font color="#990000">(</font><font color="#009900">$titre</font><font color="#990000">,</font><font color="#009900">$description</font><font color="#990000">,</font><font color="#009900">$facteur</font><font color="#990000">,</font><font color="#009900">$langue</font><font color="#990000">,</font><font color="#009900">$last_update</font><font color="#990000">,</font><font color="#009900">$mot</font><font color="#990000">)=</font><font color="#009900">$tab_url</font><font color="#990000">;</font> <b><font color="#0000FF">if</font></b> <font color="#990000">((</font><font color="#009900">$indice</font><font color="#990000">&gt;=</font><font color="#009900">$first</font><font color="#990000">)&amp;&amp;(</font><font color="#009900">$indice</font><font color="#990000">&lt;</font><font color="#009900">$lasto</font><font color="#990000">))</font> <font color="#FF0000">{</font><b><font color="#0000FF">eval</font></b><font color="#990000">(</font><font color="#009900">$template</font><font color="#990000">);</font><font color="#FF0000">}</font> <i><font color="#9A1900"># Constitution des liens suivants / precedents</font></i> <b><font color="#0000FF">if</font></b> <font color="#990000">(!(</font><font color="#009900">$indice</font><font color="#990000">%</font><font color="#009900">$nbResultPerPage</font><font color="#990000">))</font> <font color="#FF0000">{</font> <font color="#009900">$nbPage</font><font color="#990000">++;</font> <b><font color="#0000FF">if</font></b> <font color="#990000">(</font><font color="#009900">$indice</font><font color="#990000">==</font><font color="#009900">$first</font><font color="#990000">)</font> <font color="#FF0000">{</font><font color="#009900">$links</font><font color="#990000">.=</font><font color="#FF0000">"$nbPage- "</font><font color="#990000">;</font><font color="#FF0000">}</font> <b><font color="#0000FF">else</font></b> <font color="#FF0000">{</font><font color="#009900">$links</font><font color="#990000">.=</font><font color="#FF0000">'&lt;a href="'</font><font color="#990000">.</font><b><font color="#000000">get_link</font></b><font color="#990000">(</font><font color="#009900">$indice</font><font color="#990000">,</font><font color="#009900">$word</font><font color="#990000">,</font><font color="#009900">$idc</font><font color="#990000">).</font><font color="#FF0000">'"&gt;'</font><font color="#990000">.</font><font color="#009900">$nbPage</font><font color="#990000">.</font><font color="#FF0000">'&lt;/a&gt;- '</font><font color="#990000">.</font><font color="#FF0000">"\n"</font><font color="#990000">;</font><font color="#FF0000">}</font> <font color="#FF0000">}</font> <font color="#009900">$indice</font><font color="#990000">++;</font> <font color="#FF0000">}</font> <font color="#FF0000">}</font> <b><font color="#0000FF">if</font></b> <font color="#990000">(</font><font color="#009900">$indice</font><font color="#990000">)</font> <font color="#FF0000">{</font><font color="#009900">$indice</font><font color="#990000">=</font><font color="#FF0000">"$indice sites trouves"</font><font color="#990000">;</font><font color="#FF0000">}</font> <b><font color="#0000FF">else</font></b> <font color="#FF0000">{</font><font color="#009900">$indice</font><font color="#990000">=</font><font color="#FF0000">"&lt;p&gt;Aucun document trouvé.&lt;/p&gt;"</font><font color="#990000">;</font><font color="#FF0000">}</font> <b><font color="#0000FF">return</font></b> <b><font color="#0000FF">array</font></b><font color="#990000">(</font><font color="#009900">$resultat</font><font color="#990000">,</font><font color="#009900">$links</font><font color="#990000">,</font><font color="#009900">$indice</font><font color="#990000">);</font> <font color="#FF0000">}</font> <i><font color="#9A1900">/*</font></i> <i><font color="#9A1900">Construction de la requete SQL. Son exploitation est faite par search</font></i> <i><font color="#9A1900"> $tab : Reference du hash où mettre le resultat</font></i> <i><font color="#9A1900"> $word : Mot recherché</font></i> <i><font color="#9A1900"> $id : Id du site dans lequel effectué la recherche</font></i> <i><font color="#9A1900"> $langue : Restriction par langue (facultatif)</font></i> <i><font color="#9A1900"> $Url : Restriction par url</font></i> <i><font color="#9A1900"> $create : Restriction par date inscription</font></i> <i><font color="#9A1900"> $update : Restriction par date de mise à jour des pages</font></i> <i><font color="#9A1900"> $catego : Restriction par categorie</font></i> <i><font color="#9A1900">Retourne le tableau avec le resultat de la recherche</font></i> <i><font color="#9A1900">Le hash est constitué comme tel:</font></i> <i><font color="#9A1900"> $tab{$url}[0] : titre</font></i> <i><font color="#9A1900"> $tab{$url}[1] : description</font></i> <i><font color="#9A1900"> $tab{$url}[2] : facteur</font></i> <i><font color="#9A1900"> $tab{$url}[3] : langue</font></i> <i><font color="#9A1900"> $tab{$url}[4] : date de dernière modification</font></i> <i><font color="#9A1900"> @{$$tab{$url}[5]}: liste des mots trouves pour cet url</font></i> <i><font color="#9A1900">*/</font></i> <b><font color="#0000FF">function</font></b> <b><font color="#000000">search_word</font></b><font color="#990000">(</font><font color="#009900">$word</font><font color="#990000">,</font><font color="#009900">$idc</font><font color="#990000">,</font><font color="#009900">$langue</font><font color="#990000">,</font><font color="#009900">$Url</font><font color="#990000">,</font><font color="#009900">$create</font><font color="#990000">,</font><font color="#009900">$update</font><font color="#990000">,</font><font color="#009900">$categorie</font><font color="#990000">)</font> <font color="#FF0000">{</font> <b><font color="#0000FF">global</font></b> <font color="#009900">$prefix</font><font color="#990000">;</font> <b><font color="#0000FF">global</font></b> <font color="#009900">$database</font><font color="#990000">;</font> <b><font color="#0000FF">if</font></b> <font color="#990000">(</font><font color="#009900">$langue</font><font color="#990000">)</font> <font color="#FF0000">{</font><font color="#009900">$langue</font><font color="#990000">=</font><font color="#FF0000">" and langue='$langue' "</font><font color="#990000">;</font><font color="#FF0000">}</font> <b><font color="#0000FF">else</font></b> <font color="#FF0000">{</font><font color="#009900">$langue</font><font color="#990000">=</font> <font color="#FF0000">' '</font><font color="#990000">;</font><font color="#FF0000">}</font> <b><font color="#0000FF">if</font></b> <font color="#990000">((</font><font color="#009900">$Url</font><font color="#990000">)&amp;&amp;(</font><font color="#009900">$Url</font> <font color="#990000">!=</font> <font color="#FF0000">'http://'</font><font color="#990000">))</font> <font color="#FF0000">{</font><font color="#009900">$Url</font><font color="#990000">=</font><font color="#FF0000">" and url like '$Url%' "</font><font color="#990000">;</font><font color="#FF0000">}</font> <b><font color="#0000FF">else</font></b> <font color="#FF0000">{</font><font color="#009900">$Url</font><font color="#990000">=</font><font color="#FF0000">' '</font><font color="#990000">;</font><font color="#FF0000">}</font> <b><font color="#0000FF">if</font></b> <font color="#990000">(</font><font color="#009900">$create</font><font color="#990000">)</font> <font color="#FF0000">{</font><font color="#009900">$create</font><font color="#990000">=</font><font color="#FF0000">"and unix_timestamp('$create')&lt; unix_timestamp(last_check) "</font><font color="#990000">;</font><font color="#FF0000">}</font> <b><font color="#0000FF">else</font></b> <font color="#FF0000">{</font><font color="#009900">$create</font><font color="#990000">=</font><font color="#FF0000">' '</font><font color="#990000">;</font><font color="#FF0000">}</font> <b><font color="#0000FF">if</font></b> <font color="#990000">(</font><font color="#009900">$update</font><font color="#990000">)</font> <font color="#FF0000">{</font><font color="#009900">$update</font><font color="#990000">=</font><font color="#FF0000">"and unix_timestamp('$update')&lt; unix_timestamp(last_update) "</font><font color="#990000">;</font><font color="#FF0000">}</font> <b><font color="#0000FF">else</font></b> <font color="#FF0000">{</font><font color="#009900">$update</font><font color="#990000">=</font><font color="#FF0000">' '</font><font color="#990000">;</font><font color="#FF0000">}</font> <b><font color="#0000FF">if</font></b> <font color="#990000">(</font><font color="#009900">$categorie</font><font color="#990000">)</font> <font color="#FF0000">{}</font> <b><font color="#0000FF">else</font></b> <font color="#FF0000">{</font><font color="#009900">$categorie</font><font color="#990000">=</font><font color="#FF0000">' '</font><font color="#990000">;</font><font color="#FF0000">}</font> <font color="#009900">$requete</font> <font color="#990000">=</font> <font color="#FF0000">"</font> <font color="#FF0000"> select facteur,url,titre,description,langue,last_update,mot</font> <font color="#FF0000"> from "</font><font color="#990000">.</font><font color="#009900">$prefix</font><font color="#990000">.</font><font color="#009900">$idc</font><font color="#990000">.</font><font color="#FF0000">"links l,"</font><font color="#990000">.</font><font color="#009900">$prefix</font><font color="#990000">.</font><font color="#009900">$idc</font><font color="#990000">.</font><font color="#FF0000">"relation r</font> <font color="#FF0000"> where r.id_site=l.id</font> <font color="#FF0000"> and r.mot in ('$word')</font> <font color="#FF0000"> $langue $Url $create $update $categorie</font> <font color="#FF0000"> order by facteur desc"</font><font color="#990000">;</font> <font color="#009900">$result</font> <font color="#990000">=</font> <b><font color="#000000">mysql_db_query</font></b><font color="#990000">(</font><font color="#009900">$database</font><font color="#990000">,</font><font color="#009900">$requete</font><font color="#990000">);</font> <b><font color="#0000FF">if</font></b> <font color="#990000">(!</font><font color="#009900">$result</font><font color="#990000">)</font> <font color="#FF0000">{</font><b><font color="#0000FF">print</font></b> <font color="#FF0000">"$requete"</font><font color="#990000">;</font><b><font color="#0000FF">return</font></b> <font color="#990000">;</font><font color="#FF0000">}</font> <font color="#009900">$RowCount</font> <font color="#990000">=</font> <b><font color="#000000">MySQL_NUMROWS</font></b><font color="#990000">(</font><font color="#009900">$result</font><font color="#990000">);</font> <b><font color="#0000FF">while</font></b> <font color="#990000">(</font><font color="#009900">$i</font><font color="#990000">&lt;</font><font color="#009900">$RowCount</font><font color="#990000">)</font> <font color="#FF0000">{</font> <b><font color="#0000FF">list</font></b> <font color="#990000">(</font><font color="#009900">$facteur</font><font color="#990000">,</font><font color="#009900">$url</font><font color="#990000">,</font><font color="#009900">$titre</font><font color="#990000">,</font><font color="#009900">$description</font><font color="#990000">,</font><font color="#009900">$langue</font><font color="#990000">,</font><font color="#009900">$last_update</font><font color="#990000">,</font><font color="#009900">$mot</font><font color="#990000">)=</font> <b><font color="#000000">mysql_fetch_row</font></b><font color="#990000">(</font><font color="#009900">$result</font><font color="#990000">);</font> <font color="#009900">$tab</font><font color="#990000">[</font><font color="#009900">$url</font><font color="#990000">][</font><font color="#993399">0</font><font color="#990000">]</font> <font color="#990000">=</font> <font color="#009900">$titre</font><font color="#990000">;</font> <font color="#009900">$tab</font><font color="#990000">[</font><font color="#009900">$url</font><font color="#990000">][</font><font color="#993399">1</font><font color="#990000">]=</font><font color="#009900">$description</font><font color="#990000">;</font> <font color="#009900">$tab</font><font color="#990000">[</font><font color="#009900">$url</font><font color="#990000">][</font><font color="#993399">2</font><font color="#990000">]+=</font><font color="#009900">$facteur</font><font color="#990000">;</font> <font color="#009900">$tab</font><font color="#990000">[</font><font color="#009900">$url</font><font color="#990000">][</font><font color="#993399">3</font><font color="#990000">]=</font><font color="#009900">$langue</font><font color="#990000">;</font> <font color="#009900">$tab</font><font color="#990000">[</font><font color="#009900">$url</font><font color="#990000">][</font><font color="#993399">4</font><font color="#990000">]=</font><font color="#009900">$last_update</font><font color="#990000">;</font> <font color="#009900">$tab</font><font color="#990000">[</font><font color="#009900">$url</font><font color="#990000">][</font><font color="#993399">5</font><font color="#990000">][]=</font><font color="#009900">$mot</font><font color="#990000">;</font> <font color="#009900">$i</font><font color="#990000">++;</font> <font color="#FF0000">}</font> <b><font color="#0000FF">return</font></b> <font color="#009900">$tab</font><font color="#990000">;</font> <font color="#FF0000">}</font> <i><font color="#9A1900">/*</font></i> <i><font color="#9A1900">Fonction retournant la liste des categories de la categorie $id dans le site $idr</font></i> <i><font color="#9A1900"> $id : Id de la categorie de depart. Si undef, 0 est utilisé (Considéré comme le "Home")</font></i> <i><font color="#9A1900"> $idr : Id du responsable</font></i> <i><font color="#9A1900"> $template : Masque HTML pour le resultat de chaque lien. Si undef, le masque par defaut</font></i> <i><font color="#9A1900"> (defini en haut de ce module) sera utlise</font></i> <i><font color="#9A1900">Retourne ($resultat,$nom_categorie) :</font></i> <i><font color="#9A1900"> $resultat : Buffer contenant la liste des sites formatées en ft de $template</font></i> <i><font color="#9A1900"> $nom_categorie : Nom court de la categorie</font></i> <i><font color="#9A1900">*/</font></i> <b><font color="#0000FF">function</font></b> <b><font color="#000000">categories_in_categorie</font></b><font color="#990000">(</font><font color="#009900">$id</font><font color="#990000">,</font><font color="#009900">$idr</font><font color="#990000">,</font><font color="#009900">$template</font><font color="#990000">)</font> <font color="#FF0000">{</font> <b><font color="#0000FF">global</font></b> <font color="#009900">$database</font><font color="#990000">;</font> <b><font color="#0000FF">global</font></b> <font color="#009900">$prefix</font><font color="#990000">;</font> <b><font color="#0000FF">if</font></b> <font color="#990000">(!</font><font color="#009900">$idr</font><font color="#990000">)</font> <font color="#FF0000">{</font><font color="#009900">$idr</font><font color="#990000">=</font><font color="#993399">1</font><font color="#990000">;</font><font color="#FF0000">}</font> <b><font color="#0000FF">if</font></b> <font color="#990000">(!</font><font color="#009900">$id</font><font color="#990000">)</font> <font color="#FF0000">{</font><font color="#009900">$id</font><font color="#990000">=</font><font color="#993399">0</font><font color="#990000">;</font><font color="#FF0000">}</font> <font color="#009900">$requete</font> <font color="#990000">=</font> <font color="#FF0000">"select id,nom,parent from "</font><font color="#990000">.</font><font color="#009900">$prefix</font><font color="#990000">.</font><font color="#009900">$idr</font><font color="#990000">.</font><font color="#FF0000">"categorie"</font><font color="#990000">;</font> <font color="#009900">$result</font> <font color="#990000">=</font> <b><font color="#000000">mysql_db_query</font></b><font color="#990000">(</font><font color="#009900">$database</font><font color="#990000">,</font><font color="#009900">$requete</font><font color="#990000">);</font> <font color="#009900">$RowCount</font> <font color="#990000">=</font> <b><font color="#000000">MySQL_NUMROWS</font></b><font color="#990000">(</font><font color="#009900">$result</font><font color="#990000">);</font> <font color="#009900">$i</font><font color="#990000">=</font><font color="#993399">0</font><font color="#990000">;</font> <b><font color="#0000FF">while</font></b> <font color="#990000">(</font><font color="#009900">$i</font><font color="#990000">&lt;</font><font color="#009900">$RowCount</font><font color="#990000">)</font> <font color="#FF0000">{</font> <b><font color="#0000FF">list</font></b> <font color="#990000">(</font><font color="#009900">$idc</font><font color="#990000">,</font><font color="#009900">$nom</font><font color="#990000">,</font><font color="#009900">$parent</font><font color="#990000">)=</font> <b><font color="#000000">mysql_fetch_row</font></b><font color="#990000">(</font><font color="#009900">$result</font><font color="#990000">);</font> <font color="#009900">$tab</font><font color="#990000">[</font><font color="#009900">$idc</font><font color="#990000">][</font><font color="#993399">0</font><font color="#990000">]=</font><font color="#009900">$nom</font><font color="#990000">;</font> <font color="#009900">$tab</font><font color="#990000">[</font><font color="#009900">$idc</font><font color="#990000">][</font><font color="#993399">1</font><font color="#990000">]=</font><font color="#009900">$parent</font><font color="#990000">;</font> <font color="#009900">$i</font><font color="#990000">++;</font> <font color="#FF0000">}</font> <b><font color="#0000FF">while</font></b><font color="#990000">(</font> <b><font color="#0000FF">list</font></b><font color="#990000">(</font><font color="#009900">$key</font><font color="#990000">,</font><font color="#009900">$val</font><font color="#990000">)</font> <font color="#990000">=</font> <b><font color="#0000FF">each</font></b> <font color="#990000">(</font><font color="#009900">$tab</font><font color="#990000">))</font> <font color="#FF0000">{</font> <font color="#009900">$nom</font><font color="#990000">=</font><font color="#009900">$tab</font><font color="#990000">[</font><font color="#009900">$key</font><font color="#990000">][</font><font color="#993399">0</font><font color="#990000">];</font> <font color="#009900">$parent</font><font color="#990000">=</font><font color="#009900">$tab</font><font color="#990000">[</font><font color="#009900">$key</font><font color="#990000">][</font><font color="#993399">1</font><font color="#990000">];</font> <font color="#009900">$nom_complet</font><font color="#990000">=</font><font color="#FF0000">"&lt;a href=\""</font><font color="#990000">.</font><b><font color="#000000">getenv</font></b><font color="#990000">(</font><font color="#FF0000">'SCRIPT_NAME'</font><font color="#990000">).</font><font color="#FF0000">"?browse=1&amp;id=$idr\"&gt;Accueil&lt;/a&gt;"</font><font color="#990000">.</font><b><font color="#000000">getParent</font></b><font color="#990000">(</font><font color="#009900">$key</font><font color="#990000">,</font><font color="#009900">$idr</font><font color="#990000">,</font><font color="#009900">$tab</font><font color="#990000">);</font> <font color="#009900">$links</font> <font color="#990000">=</font> <b><font color="#000000">get_link_categorie</font></b><font color="#990000">(</font><font color="#009900">$key</font><font color="#990000">,</font><font color="#009900">$idr</font><font color="#990000">);</font> <b><font color="#0000FF">if</font></b> <font color="#990000">(</font><font color="#009900">$parent</font><font color="#990000">==</font><font color="#009900">$id</font><font color="#990000">)</font> <font color="#FF0000">{</font><b><font color="#0000FF">eval</font></b><font color="#990000">(</font><font color="#009900">$template</font><font color="#990000">);</font><font color="#FF0000">}</font> <font color="#FF0000">}</font> <b><font color="#0000FF">if</font></b> <font color="#990000">(</font><font color="#009900">$i</font><font color="#990000">==</font><font color="#993399">0</font><font color="#990000">)</font> <font color="#FF0000">{</font><font color="#009900">$resultat</font><font color="#990000">=</font><font color="#FF0000">"&lt;p&gt;Plus de catégorie&lt;/p&gt;"</font><font color="#990000">;</font><font color="#FF0000">}</font> <b><font color="#0000FF">if</font></b> <font color="#990000">(</font><font color="#009900">$id</font><font color="#990000">!=</font><font color="#993399">0</font><font color="#990000">)</font> <font color="#FF0000">{</font><font color="#009900">$titre</font> <font color="#990000">=</font> <font color="#FF0000">"&lt;a href=\""</font><font color="#990000">.</font><b><font color="#000000">getenv</font></b><font color="#990000">(</font><font color="#FF0000">'SCRIPT_NAME'</font><font color="#990000">).</font><font color="#FF0000">"?browse=1&amp;id=$idr\"&gt;Accueil&lt;/a&gt; "</font><font color="#990000">.</font><b><font color="#000000">getParent</font></b><font color="#990000">(</font><font color="#009900">$id</font><font color="#990000">,</font><font color="#009900">$idr</font><font color="#990000">,</font><font color="#009900">$tab</font><font color="#990000">);</font><font color="#FF0000">}</font> <b><font color="#0000FF">else</font></b> <font color="#FF0000">{</font><font color="#009900">$titre</font><font color="#990000">=</font><font color="#FF0000">" "</font><font color="#990000">;</font><font color="#FF0000">}</font> <b><font color="#0000FF">return</font></b> <b><font color="#0000FF">array</font></b><font color="#990000">(</font><font color="#009900">$resultat</font><font color="#990000">,</font><font color="#009900">$titre</font><font color="#990000">);</font> <font color="#FF0000">}</font> <i><font color="#9A1900">/*</font></i> <i><font color="#9A1900">Fonction retournant la liste des pages de la categorie $id dans le site $idr</font></i> <i><font color="#9A1900"> $id : Id de la categorie de depart. Si undef, 0 est utilisé (Considéré comme le "Home")</font></i> <i><font color="#9A1900"> $idr : Id du responsable</font></i> <i><font color="#9A1900"> $template : Masque HTML pour le resultat de chaque lien. Si undef, le masque par defaut</font></i> <i><font color="#9A1900"> (defini en haut de ce module) sera utlise</font></i> <i><font color="#9A1900">Retourne le buffer contenant la liste des sites formatées en ft de $template</font></i> <i><font color="#9A1900">*/</font></i> <b><font color="#0000FF">function</font></b> <b><font color="#000000">sites_in_categorie</font></b><font color="#990000">(</font><font color="#009900">$id</font><font color="#990000">,</font><font color="#009900">$idr</font><font color="#990000">,</font><font color="#009900">$template</font><font color="#990000">)</font> <font color="#FF0000">{</font> <b><font color="#0000FF">global</font></b> <font color="#009900">$database</font><font color="#990000">;</font> <b><font color="#0000FF">global</font></b> <font color="#009900">$prefix</font><font color="#990000">;</font> <font color="#009900">$indiceG</font><font color="#990000">=</font><font color="#993399">1</font><font color="#990000">;</font><font color="#009900">$facteur</font><font color="#990000">=</font><font color="#993399">100</font><font color="#990000">;</font> <b><font color="#0000FF">if</font></b> <font color="#990000">(!</font><font color="#009900">$idr</font><font color="#990000">)</font> <font color="#FF0000">{</font><font color="#009900">$idr</font><font color="#990000">=</font><font color="#993399">1</font><font color="#990000">;</font><font color="#FF0000">}</font> <b><font color="#0000FF">if</font></b> <font color="#990000">(!</font><font color="#009900">$id</font><font color="#990000">)</font> <font color="#FF0000">{</font><font color="#009900">$id</font><font color="#990000">=</font><font color="#993399">0</font><font color="#990000">;</font><font color="#FF0000">}</font> <font color="#009900">$i</font><font color="#990000">=</font><font color="#993399">0</font><font color="#990000">;</font> <font color="#009900">$requete</font> <font color="#990000">=</font> <font color="#FF0000">"select url,titre,description,langue,last_update from "</font><font color="#990000">.</font><font color="#009900">$prefix</font><font color="#990000">.</font><font color="#009900">$idr</font><font color="#990000">.</font><font color="#FF0000">"links where categorie=$id and browse_categorie='1' and parse='1'"</font><font color="#990000">;</font> <font color="#009900">$result</font> <font color="#990000">=</font> <b><font color="#000000">mysql_db_query</font></b><font color="#990000">(</font><font color="#009900">$database</font><font color="#990000">,</font><font color="#009900">$requete</font><font color="#990000">);</font> <font color="#009900">$RowCount</font> <font color="#990000">=</font> <b><font color="#000000">MySQL_NUMROWS</font></b><font color="#990000">(</font><font color="#009900">$result</font><font color="#990000">);</font> <b><font color="#0000FF">while</font></b> <font color="#990000">(</font><font color="#009900">$i</font><font color="#990000">&lt;</font><font color="#009900">$RowCount</font><font color="#990000">)</font> <font color="#FF0000">{</font> <b><font color="#0000FF">list</font></b> <font color="#990000">(</font><font color="#009900">$url</font><font color="#990000">,</font><font color="#009900">$titre</font><font color="#990000">,</font><font color="#009900">$description</font><font color="#990000">,</font><font color="#009900">$langue</font><font color="#990000">,</font><font color="#009900">$last_update</font><font color="#990000">)=</font> <b><font color="#000000">mysql_fetch_row</font></b><font color="#990000">(</font><font color="#009900">$result</font><font color="#990000">);</font> <b><font color="#0000FF">eval</font></b><font color="#990000">(</font><font color="#009900">$template</font><font color="#990000">);</font> <font color="#009900">$indiceG</font><font color="#990000">++;</font><font color="#009900">$i</font><font color="#990000">++;</font> <font color="#FF0000">}</font> <b><font color="#0000FF">if</font></b> <font color="#990000">(</font><font color="#009900">$i</font><font color="#990000">==</font><font color="#993399">0</font><font color="#990000">)</font> <font color="#FF0000">{</font><font color="#009900">$resultat</font><font color="#990000">=</font><font color="#FF0000">"&lt;p&gt;Pas de pages dans cette catégorie&lt;/p&gt;"</font><font color="#990000">;</font><font color="#FF0000">}</font> <b><font color="#0000FF">return</font></b> <font color="#009900">$resultat</font><font color="#990000">;</font> <font color="#FF0000">}</font> <i><font color="#9A1900">/*</font></i> <i><font color="#9A1900">Rend la chaine correspondante à la catégorie $id avec ses rubriques parentes</font></i> <i><font color="#9A1900">*/</font></i> <b><font color="#0000FF">function</font></b> <b><font color="#000000">getParent</font></b><font color="#990000">(</font><font color="#009900">$id</font><font color="#990000">,</font><font color="#009900">$idr</font><font color="#990000">,</font><font color="#009900">$tab</font><font color="#990000">)</font> <font color="#FF0000">{</font> <b><font color="#0000FF">if</font></b> <font color="#990000">((</font><font color="#009900">$tab</font><font color="#990000">[</font><font color="#009900">$id</font><font color="#990000">][</font><font color="#993399">1</font><font color="#990000">]!=</font><font color="#993399">0</font><font color="#990000">)&amp;&amp;(</font><font color="#009900">$tab</font><font color="#990000">[</font><font color="#009900">$id</font><font color="#990000">][</font><font color="#993399">0</font><font color="#990000">]))</font> <font color="#FF0000">{</font><font color="#009900">$parent</font> <font color="#990000">=</font> <b><font color="#000000">getParent</font></b><font color="#990000">(</font><font color="#009900">$tab</font><font color="#990000">[</font><font color="#009900">$id</font><font color="#990000">][</font><font color="#993399">1</font><font color="#990000">],</font><font color="#009900">$idr</font><font color="#990000">,</font><font color="#009900">$tab</font><font color="#990000">);</font><font color="#FF0000">}</font> <b><font color="#0000FF">if</font></b> <font color="#990000">(!</font><font color="#009900">$tab</font><font color="#990000">[</font><font color="#009900">$id</font><font color="#990000">][</font><font color="#993399">0</font><font color="#990000">])</font> <font color="#FF0000">{</font><font color="#009900">$tab</font><font color="#990000">[</font><font color="#009900">$id</font><font color="#990000">][</font><font color="#993399">0</font><font color="#990000">]=</font><font color="#FF0000">'Home'</font><font color="#990000">;</font><font color="#FF0000">}</font> <font color="#009900">$parent</font><font color="#990000">.=</font><font color="#FF0000">"&amp;gt;&lt;a href=\""</font><font color="#990000">.</font><b><font color="#000000">get_link_categorie</font></b><font color="#990000">(</font><font color="#009900">$id</font><font color="#990000">,</font><font color="#009900">$idr</font><font color="#990000">).</font><font color="#FF0000">'"&gt;'</font><font color="#990000">.</font><font color="#009900">$tab</font><font color="#990000">[</font><font color="#009900">$id</font><font color="#990000">][</font><font color="#993399">0</font><font color="#990000">].</font><font color="#FF0000">"&lt;/a&gt;"</font><font color="#990000">;</font> <b><font color="#0000FF">return</font></b> <font color="#009900">$parent</font><font color="#990000">;</font> <font color="#FF0000">}</font> <b><font color="#0000FF">function</font></b> <b><font color="#000000">getWLParent</font></b><font color="#990000">(</font><font color="#009900">$id</font><font color="#990000">,</font><font color="#009900">$idr</font><font color="#990000">,</font><font color="#009900">$tab</font><font color="#990000">)</font> <font color="#FF0000">{</font> <b><font color="#0000FF">if</font></b> <font color="#990000">((</font><font color="#009900">$tab</font><font color="#990000">[</font><font color="#009900">$id</font><font color="#990000">][</font><font color="#993399">1</font><font color="#990000">]!=</font><font color="#993399">0</font><font color="#990000">)&amp;&amp;(</font><font color="#009900">$tab</font><font color="#990000">[</font><font color="#009900">$id</font><font color="#990000">][</font><font color="#993399">0</font><font color="#990000">]))</font> <font color="#FF0000">{</font><font color="#009900">$parent</font> <font color="#990000">=</font> <b><font color="#000000">getWLParent</font></b><font color="#990000">(</font><font color="#009900">$tab</font><font color="#990000">[</font><font color="#009900">$id</font><font color="#990000">][</font><font color="#993399">1</font><font color="#990000">],</font><font color="#009900">$idr</font><font color="#990000">,</font><font color="#009900">$tab</font><font color="#990000">);</font><font color="#FF0000">}</font> <b><font color="#0000FF">if</font></b> <font color="#990000">(!</font><font color="#009900">$tab</font><font color="#990000">[</font><font color="#009900">$id</font><font color="#990000">][</font><font color="#993399">0</font><font color="#990000">])</font> <font color="#FF0000">{</font><font color="#009900">$tab</font><font color="#990000">[</font><font color="#009900">$id</font><font color="#990000">][</font><font color="#993399">0</font><font color="#990000">]=</font><font color="#FF0000">'Home'</font><font color="#990000">;</font><font color="#FF0000">}</font> <font color="#009900">$parent</font><font color="#990000">.=</font><font color="#FF0000">"&amp;gt;"</font><font color="#990000">.</font><font color="#009900">$tab</font><font color="#990000">[</font><font color="#009900">$id</font><font color="#990000">][</font><font color="#993399">0</font><font color="#990000">];</font> <b><font color="#0000FF">return</font></b> <font color="#009900">$parent</font><font color="#990000">;</font> <font color="#FF0000">}</font> <i><font color="#9A1900">/*</font></i> <i><font color="#9A1900">Retourne 1 si $var appartient à $liste, 0 sinon.</font></i> <i><font color="#9A1900">*/</font></i> <b><font color="#0000FF">function</font></b> <b><font color="#000000">appartient</font></b><font color="#990000">(</font><font color="#009900">$var</font><font color="#990000">,</font><font color="#009900">$liste</font><font color="#990000">)</font> <font color="#FF0000">{</font> <b><font color="#0000FF">while</font></b><font color="#990000">(</font> <b><font color="#0000FF">list</font></b><font color="#990000">(</font><font color="#009900">$key</font><font color="#990000">,</font><font color="#009900">$val</font><font color="#990000">)</font> <font color="#990000">=</font> <b><font color="#0000FF">each</font></b> <font color="#990000">(</font><font color="#009900">$liste</font><font color="#990000">))</font> <font color="#FF0000">{</font><b><font color="#0000FF">if</font></b> <font color="#990000">(</font><font color="#009900">$val</font><font color="#990000">==</font><font color="#009900">$var</font><font color="#990000">)</font> <font color="#FF0000">{</font><b><font color="#0000FF">return</font></b> <font color="#993399">1</font><font color="#990000">;</font><font color="#FF0000">}}</font> <b><font color="#0000FF">return</font></b> <font color="#993399">0</font><font color="#990000">;</font> <font color="#FF0000">}</font> <i><font color="#9A1900">/**</font></i> <i><font color="#9A1900"> * Retourne l'URL correspondant à la page no $no_page dans la recherche en cours</font></i> <i><font color="#9A1900"> */</font></i> <b><font color="#0000FF">function</font></b> <b><font color="#000000">get_link</font></b><font color="#990000">(</font><font color="#009900">$no_page</font><font color="#990000">,</font><font color="#009900">$word</font><font color="#990000">,</font><font color="#009900">$id</font><font color="#990000">)</font> <font color="#FF0000">{</font> <font color="#009900">$buf</font> <font color="#990000">=</font> <b><font color="#000000">getenv</font></b><font color="#990000">(</font><font color="#FF0000">'SCRIPT_NAME'</font><font color="#990000">).</font><font color="#FF0000">"?word="</font><font color="#990000">.</font><b><font color="#000000">urlencode</font></b><font color="#990000">(</font><font color="#009900">$word</font><font color="#990000">).</font><font color="#FF0000">"&amp;id="</font><font color="#990000">.</font><font color="#009900">$id</font><font color="#990000">.</font><font color="#FF0000">"&amp;first="</font><font color="#990000">.</font><font color="#009900">$no_page</font><font color="#990000">;</font> <b><font color="#0000FF">if</font></b> <font color="#990000">(</font><font color="#009900">$nbResultPerPage</font><font color="#990000">)</font> <font color="#FF0000">{</font><font color="#009900">$buf</font><font color="#990000">.=</font><font color="#FF0000">"&amp;nbResultPerPage="</font><font color="#990000">.</font><font color="#009900">$nbResultPerPage</font><font color="#990000">;</font><font color="#FF0000">}</font> <b><font color="#0000FF">return</font></b> <font color="#009900">$buf</font><font color="#990000">;</font> <font color="#FF0000">}</font> <i><font color="#9A1900">/**</font></i> <i><font color="#9A1900"> * Retourne l'URL correspondant à la categorie no $no_categorie</font></i> <i><font color="#9A1900"> */</font></i> <b><font color="#0000FF">function</font></b> <b><font color="#000000">get_link_categorie</font></b><font color="#990000">(</font><font color="#009900">$no_categorie</font><font color="#990000">,</font><font color="#009900">$id</font><font color="#990000">)</font> <font color="#FF0000">{</font><b><font color="#0000FF">return</font></b> <b><font color="#000000">getenv</font></b><font color="#990000">(</font><font color="#FF0000">'SCRIPT_NAME'</font><font color="#990000">).</font><font color="#FF0000">"?categorie=$no_categorie&amp;id=$id"</font><font color="#990000">;</font><font color="#FF0000">}</font> <i><font color="#9A1900">/**</font></i> <i><font color="#9A1900"> * Retourne le nom du site dans la table responsable correspondant à l'id $id</font></i> <i><font color="#9A1900"> */</font></i> <b><font color="#0000FF">function</font></b> <b><font color="#000000">get_name_site</font></b><font color="#990000">(</font><font color="#009900">$id</font><font color="#990000">,</font><font color="#009900">$prefix</font><font color="#990000">)</font> <font color="#FF0000">{</font> <i><font color="#9A1900">#$result = mysql_db_query("circa","select titre from ".$this-&gt;{PREFIX_TABLE}."responsable where id=$id");</font></i> <i><font color="#9A1900">#$sth-&gt;execute() || print "Erreur: $DBI::errstr\n";</font></i> <i><font color="#9A1900">#my ($titre)=$sth-&gt;fetchrow_array;</font></i> <i><font color="#9A1900">#$sth-&gt;finish;</font></i> <b><font color="#0000FF">return</font></b> <font color="#009900">$titre</font><font color="#990000">;</font> <font color="#FF0000">}</font> <b><font color="#0000FF">function</font></b> <b><font color="#000000">get_liste_categorie</font></b><font color="#990000">(</font><font color="#009900">$idr</font><font color="#990000">)</font> <font color="#FF0000">{</font> <b><font color="#0000FF">global</font></b> <font color="#009900">$database</font><font color="#990000">;</font> <b><font color="#0000FF">global</font></b> <font color="#009900">$prefix</font><font color="#990000">;</font> <font color="#009900">$requete</font> <font color="#990000">=</font> <font color="#FF0000">"select id,nom,parent from "</font><font color="#990000">.</font><font color="#009900">$prefix</font><font color="#990000">.</font><font color="#009900">$idr</font><font color="#990000">.</font><font color="#FF0000">"categorie"</font><font color="#990000">;</font> <font color="#009900">$result</font> <font color="#990000">=</font> <b><font color="#000000">mysql_db_query</font></b><font color="#990000">(</font><font color="#009900">$database</font><font color="#990000">,</font><font color="#009900">$requete</font><font color="#990000">);</font> <font color="#009900">$RowCount</font> <font color="#990000">=</font> <b><font color="#000000">MySQL_NUMROWS</font></b><font color="#990000">(</font><font color="#009900">$result</font><font color="#990000">);</font> <font color="#009900">$i</font><font color="#990000">=</font><font color="#993399">0</font><font color="#990000">;</font> <b><font color="#0000FF">while</font></b> <font color="#990000">(</font><font color="#009900">$i</font><font color="#990000">&lt;</font><font color="#009900">$RowCount</font><font color="#990000">)</font> <font color="#FF0000">{</font> <b><font color="#0000FF">list</font></b> <font color="#990000">(</font><font color="#009900">$idc</font><font color="#990000">,</font><font color="#009900">$nom</font><font color="#990000">,</font><font color="#009900">$parent</font><font color="#990000">)=</font> <b><font color="#000000">mysql_fetch_row</font></b><font color="#990000">(</font><font color="#009900">$result</font><font color="#990000">);</font> <font color="#009900">$tab</font><font color="#990000">[</font><font color="#009900">$idc</font><font color="#990000">][</font><font color="#993399">0</font><font color="#990000">]=</font><font color="#009900">$nom</font><font color="#990000">;</font> <font color="#009900">$tab</font><font color="#990000">[</font><font color="#009900">$idc</font><font color="#990000">][</font><font color="#993399">1</font><font color="#990000">]=</font><font color="#009900">$parent</font><font color="#990000">;</font> <font color="#009900">$i</font><font color="#990000">++;</font> <font color="#FF0000">}</font> <b><font color="#0000FF">while</font></b><font color="#990000">(</font> <b><font color="#0000FF">list</font></b><font color="#990000">(</font><font color="#009900">$key</font><font color="#990000">,</font><font color="#009900">$val</font><font color="#990000">)</font> <font color="#990000">=</font> <b><font color="#0000FF">each</font></b> <font color="#990000">(</font><font color="#009900">$tab</font><font color="#990000">))</font> <font color="#FF0000">{</font> <font color="#009900">$nom</font><font color="#990000">=</font><font color="#009900">$tab</font><font color="#990000">[</font><font color="#009900">$key</font><font color="#990000">][</font><font color="#993399">0</font><font color="#990000">];</font> <font color="#009900">$parent</font><font color="#990000">=</font><font color="#009900">$tab</font><font color="#990000">[</font><font color="#009900">$key</font><font color="#990000">][</font><font color="#993399">1</font><font color="#990000">];</font> <font color="#009900">$buf</font><font color="#990000">.=</font><font color="#FF0000">"&lt;option value=\"$key\"&gt;"</font><font color="#990000">.</font><b><font color="#000000">getWLParent</font></b><font color="#990000">(</font><font color="#009900">$key</font><font color="#990000">,</font><font color="#009900">$idr</font><font color="#990000">,</font><font color="#009900">$tab</font><font color="#990000">).</font><font color="#FF0000">"&lt;/option&gt;"</font><font color="#990000">;</font> <font color="#FF0000">}</font> <b><font color="#0000FF">return</font></b> <font color="#009900">$buf</font><font color="#990000">;</font> <font color="#FF0000">}</font> <b><font color="#0000FF">function</font></b> <b><font color="#000000">addSite</font></b><font color="#990000">(</font><font color="#009900">$url</font><font color="#990000">,</font><font color="#009900">$categorie</font><font color="#990000">)</font> <font color="#FF0000">{</font> <b><font color="#0000FF">global</font></b> <font color="#009900">$database</font><font color="#990000">;</font> <b><font color="#0000FF">global</font></b> <font color="#009900">$prefix</font><font color="#990000">;</font> <b><font color="#0000FF">global</font></b> <font color="#009900">$idr</font><font color="#990000">;</font> <font color="#009900">$requete</font><font color="#990000">=</font><font color="#FF0000">"insert into "</font><font color="#990000">.</font><font color="#009900">$prefix</font><font color="#990000">.</font><font color="#009900">$idr</font><font color="#990000">.</font><font color="#FF0000">"links (url,titre,description,langue,valide,categorie,browse_categorie)</font> <font color="#FF0000"> values ('$url',' ',' ','fr',0,$categorie,'1')"</font><font color="#990000">;</font> <font color="#009900">$result</font> <font color="#990000">=</font> <b><font color="#000000">mysql_db_query</font></b><font color="#990000">(</font><font color="#009900">$database</font><font color="#990000">,</font><font color="#009900">$requete</font><font color="#990000">);</font> <font color="#FF0000">}</font> <font color="#990000">?&gt;</font> </tt></pre> �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/tests/test.pl.html�����������������������������������������������������������0000644�0001750�0001750�00000016000�11672675566�015352� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<!-- Generator: GNU source-highlight by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite --> <pre><tt><i><font color="#9A1900">% +------------------------------+</font></i> <i><font color="#9A1900">% | test for Prolog source |</font></i> <i><font color="#9A1900">% |______________________________|</font></i> <b><font color="#000000">isinteger</font></b><font color="#990000">(</font><font color="#009900">X</font><font color="#990000">,</font> <font color="#009900">L</font><font color="#990000">)</font> <font color="#990000">:-</font> <b><font color="#000000">type</font></b><font color="#990000">(</font><font color="#009900">X</font><font color="#990000">,</font> int<font color="#990000">,</font> <font color="#009900">L</font><font color="#990000">).</font> <i><font color="#9A1900">% booleans</font></i> <b><font color="#000000">type</font></b><font color="#990000">(</font>true<font color="#990000">,</font> bool<font color="#990000">,</font> <font color="#009900">_</font><font color="#990000">).</font> <b><font color="#000000">type</font></b><font color="#990000">(</font>false<font color="#990000">,</font> bool<font color="#990000">,</font> <font color="#009900">_</font><font color="#990000">).</font> <b><font color="#000000">type</font></b><font color="#990000">(</font> <b><font color="#0000FF">and</font></b><font color="#990000">(</font><font color="#009900">X</font><font color="#990000">,</font><font color="#009900">Y</font><font color="#990000">),</font> bool<font color="#990000">,</font> <font color="#009900">L</font><font color="#990000">)</font> <font color="#990000">:-</font> <b><font color="#000000">isboolean</font></b><font color="#990000">(</font><font color="#009900">X</font><font color="#990000">,</font><font color="#009900">L</font><font color="#990000">),</font> <b><font color="#000000">isboolean</font></b><font color="#990000">(</font><font color="#009900">Y</font><font color="#990000">,</font><font color="#009900">L</font><font color="#990000">).</font> <b><font color="#000000">type</font></b><font color="#990000">(</font> <b><font color="#0000FF">or</font></b><font color="#990000">(</font><font color="#009900">X</font><font color="#990000">,</font><font color="#009900">Y</font><font color="#990000">),</font> bool<font color="#990000">,</font> <font color="#009900">L</font><font color="#990000">)</font> <font color="#990000">:-</font> <b><font color="#000000">isboolean</font></b><font color="#990000">(</font><font color="#009900">X</font><font color="#990000">,</font><font color="#009900">L</font><font color="#990000">),</font> <b><font color="#000000">isboolean</font></b><font color="#990000">(</font><font color="#009900">Y</font><font color="#990000">,</font><font color="#009900">L</font><font color="#990000">).</font> <b><font color="#000000">type</font></b><font color="#990000">(</font> <b><font color="#0000FF">not</font></b><font color="#990000">(</font><font color="#009900">X</font><font color="#990000">),</font> bool<font color="#990000">,</font> <font color="#009900">L</font><font color="#990000">)</font> <font color="#990000">:-</font> <b><font color="#000000">isboolean</font></b><font color="#990000">(</font><font color="#009900">X</font><font color="#990000">,</font><font color="#009900">L</font><font color="#990000">).</font> <b><font color="#000000">type</font></b><font color="#990000">(</font> <b><font color="#000000">succ</font></b><font color="#990000">(</font><font color="#009900">X</font><font color="#990000">),</font> int<font color="#990000">,</font> <font color="#009900">L</font> <font color="#990000">)</font> <font color="#990000">:-</font> <b><font color="#000000">isinteger</font></b><font color="#990000">(</font><font color="#009900">X</font><font color="#990000">,</font><font color="#009900">L</font><font color="#990000">).</font> <b><font color="#000000">type</font></b><font color="#990000">(</font> <b><font color="#000000">pred</font></b><font color="#990000">(</font><font color="#009900">X</font><font color="#990000">),</font> int<font color="#990000">,</font> <font color="#009900">L</font> <font color="#990000">)</font> <font color="#990000">:-</font> <b><font color="#000000">isinteger</font></b><font color="#990000">(</font><font color="#009900">X</font><font color="#990000">,</font><font color="#009900">L</font><font color="#990000">).</font> <b><font color="#000000">type</font></b><font color="#990000">(</font> <b><font color="#000000">iszero</font></b><font color="#990000">(</font><font color="#009900">X</font><font color="#990000">),</font> bool<font color="#990000">,</font> <font color="#009900">L</font> <font color="#990000">)</font> <font color="#990000">:-</font> <b><font color="#000000">isinteger</font></b><font color="#990000">(</font><font color="#009900">X</font><font color="#990000">,</font><font color="#009900">L</font><font color="#990000">).</font> <b><font color="#000000">type</font></b><font color="#990000">(</font> <font color="#009900">X</font> <font color="#990000">&lt;</font> <font color="#009900">Y</font><font color="#990000">,</font> bool<font color="#990000">,</font> <font color="#009900">L</font> <font color="#990000">)</font> <font color="#990000">:-</font> <b><font color="#000000">isinteger</font></b><font color="#990000">(</font><font color="#009900">X</font><font color="#990000">,</font><font color="#009900">L</font><font color="#990000">),</font> <b><font color="#000000">isinteger</font></b><font color="#990000">(</font><font color="#009900">Y</font><font color="#990000">,</font><font color="#009900">L</font><font color="#990000">).</font> <i><font color="#9A1900">% is_member(X,L) check whether X is in the list</font></i> <i><font color="#9A1900">% by using unification with occur check</font></i> <b><font color="#000000">is_member</font></b><font color="#990000">(</font><font color="#009900">_</font><font color="#990000">,</font> <font color="#990000">[])</font> <font color="#990000">:-</font> <b><font color="#0000FF">fail</font></b><font color="#990000">.</font> <b><font color="#000000">is_member</font></b><font color="#990000">(</font><font color="#009900">X</font><font color="#990000">,</font> <font color="#990000">[</font><font color="#009900">Y</font> <font color="#990000">|</font> <font color="#009900">_</font><font color="#990000">])</font> <font color="#990000">:-</font> <b><font color="#000000">unify</font></b><font color="#990000">(</font><font color="#009900">X</font><font color="#990000">,</font><font color="#009900">Y</font><font color="#990000">).</font> <b><font color="#000000">is_member</font></b><font color="#990000">(</font><font color="#009900">X</font><font color="#990000">,</font> <font color="#990000">[</font><font color="#009900">_</font> <font color="#990000">|</font> <font color="#009900">List</font><font color="#990000">])</font> <font color="#990000">:-</font> <b><font color="#000000">is_member</font></b><font color="#990000">(</font><font color="#009900">X</font><font color="#990000">,</font> <font color="#009900">List</font><font color="#990000">).</font> </tt></pre> source-highlight-3.1.6/tests/test.pm.html�����������������������������������������������������������0000644�0001750�0001750�00000074127�11672675566�015371� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<!-- Generator: GNU source-highlight by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite --> <pre><tt><i><font color="#9A1900"># Here an extract of package MIME::Lite::HTML</font></i> <b><font color="#0000FF">package</font></b> MIME<font color="#990000">::</font>Lite<font color="#990000">::</font>HTML<font color="#990000">;</font> <i><font color="#9A1900"># module MIME::Lite::HTML : Provide routine to transform a HTML page in </font></i> <i><font color="#9A1900"># a MIME::Lite mail</font></i> <i><font color="#9A1900"># Copyright 2001 A.Barbet alian@alianwebserver.com. All rights reserved.</font></i> <i><font color="#9A1900"># Revision 1.1 2002/02/07 15:58:35 bettini</font></i> <i><font color="#9A1900"># added scanner for perl</font></i> <i><font color="#9A1900">#</font></i> <i><font color="#9A1900"># Revision 1.12 2002/01/07 20:18:53 alian</font></i> <i><font color="#9A1900"># - Add replace links for frame &amp; iframe</font></i> <i><font color="#9A1900"># - Correct incorrect parsing in include_css for &lt;LINK REL="SHORTCUT ICON"&gt;</font></i> <i><font color="#9A1900"># tag. Tks to doggy@miniasp.com for idea and patch</font></i> <i><font color="#9A1900">#</font></i> <i><font color="#9A1900"># Revision 1.11 2001/12/13 22:42:33 alian</font></i> <i><font color="#9A1900"># - Correct a bug with relative anchor</font></i> <i><font color="#9A1900">#</font></i> <i><font color="#9A1900"># Revision 1.10 2001/11/07 10:52:43 alian</font></i> <i><font color="#9A1900"># - Add feature for get restricted url. Add LoginDetails parameter for that</font></i> <i><font color="#9A1900"># (tks to Leon.Halford@ing-barings.com for idea)</font></i> <i><font color="#9A1900"># - Change error in POD doc rfc2257 =&gt; rfc2557 (tks to</font></i> <i><font color="#9A1900"># justin.zaglio@morganstanley.com)</font></i> <i><font color="#9A1900"># - Correct warning when $url_html is undef</font></i> <b><font color="#0000FF">use</font></b> LWP<font color="#990000">::</font>UserAgent<font color="#990000">;</font> <b><font color="#0000FF">use</font></b> HTML<font color="#990000">::</font>LinkExtor<font color="#990000">;</font> <b><font color="#0000FF">use</font></b> URI<font color="#990000">::</font>URL<font color="#990000">;</font> <b><font color="#0000FF">use</font></b> MIME<font color="#990000">::</font>Lite<font color="#990000">;</font> <b><font color="#0000FF">use</font></b> strict<font color="#990000">;</font> <b><font color="#0000FF">use</font></b> vars <b><font color="#0000FF">qw</font></b><font color="#990000">(</font><font color="#009900">$VERSION</font> <font color="#009900">@ISA</font> <font color="#009900">@EXPORT</font> <font color="#009900">@EXPORT_OK</font><font color="#990000">);</font> <b><font color="#0000FF">require</font></b> Exporter<font color="#990000">;</font> <font color="#009900">@ISA</font> <font color="#990000">=</font> <b><font color="#0000FF">qw</font></b><font color="#990000">(</font>Exporter<font color="#990000">);</font> <font color="#009900">@EXPORT</font> <font color="#990000">=</font> <b><font color="#0000FF">qw</font></b><font color="#990000">();</font> <b><font color="#0000FF">my</font></b> <font color="#009900">$LOGINDETAILS</font><font color="#990000">;</font> <i><font color="#9A1900">#------------------------------------------------------------------------------</font></i> <i><font color="#9A1900"># redefine get_basic_credentials</font></i> <i><font color="#9A1900">#------------------------------------------------------------------------------</font></i> <font color="#FF0000">{</font> <b><font color="#0000FF">package</font></b> RequestAgent<font color="#990000">;</font> <b><font color="#0000FF">use</font></b> vars <b><font color="#0000FF">qw</font></b><font color="#990000">(</font><font color="#009900">@ISA</font><font color="#990000">);</font> <font color="#009900">@ISA</font> <font color="#990000">=</font> <b><font color="#0000FF">qw</font></b><font color="#990000">(</font>LWP<font color="#990000">::</font>UserAgent<font color="#990000">);</font> <b><font color="#0000FF">sub</font></b> new <font color="#FF0000">{</font> <b><font color="#0000FF">my</font></b> <font color="#009900">$self</font> <font color="#990000">=</font> LWP<font color="#990000">::</font>UserAgent<font color="#990000">::</font><b><font color="#000000">new</font></b><font color="#990000">(</font><font color="#009900">@_</font><font color="#990000">);</font> <font color="#009900">$self</font><font color="#990000">;</font> <font color="#FF0000">}</font> <b><font color="#0000FF">sub</font></b> get_basic_credentials <font color="#FF0000">{</font> <b><font color="#0000FF">my</font></b><font color="#990000">(</font><font color="#009900">$self</font><font color="#990000">,</font> <font color="#009900">$realm</font><font color="#990000">,</font> <font color="#009900">$uri</font><font color="#990000">)</font> <font color="#990000">=</font> <font color="#009900">@_</font><font color="#990000">;</font> <i><font color="#9A1900"># Use parameter of MIME-Lite-HTML, key LoginDetails</font></i> <b><font color="#0000FF">if</font></b> <font color="#990000">(</font><b><font color="#0000FF">defined</font></b> <font color="#009900">$LOGINDETAILS</font><font color="#990000">)</font> <font color="#FF0000">{</font> <b><font color="#0000FF">return</font></b> <b><font color="#0000FF">split</font></b><font color="#990000">(</font><font color="#FF0000">':'</font><font color="#990000">,</font> <font color="#009900">$LOGINDETAILS</font><font color="#990000">,</font> <font color="#993399">2</font><font color="#990000">);</font> <font color="#FF0000">}</font> <i><font color="#9A1900"># Ask user on STDIN</font></i> <b><font color="#0000FF">elsif</font></b> <font color="#990000">(-</font>t<font color="#990000">)</font> <font color="#FF0000">{</font> <b><font color="#0000FF">my</font></b> <font color="#009900">$netloc</font> <font color="#990000">=</font> <font color="#009900">$uri</font><font color="#990000">-&gt;</font>host_port<font color="#990000">;</font> <b><font color="#0000FF">print</font></b> <font color="#FF0000">"Enter username for $realm at $netloc: "</font><font color="#990000">;</font> <b><font color="#0000FF">my</font></b> <font color="#009900">$user</font> <font color="#990000">=</font> <font color="#FF0000">&lt;STDIN&gt;</font><font color="#990000">;</font> <b><font color="#0000FF">chomp</font></b><font color="#990000">(</font><font color="#009900">$user</font><font color="#990000">);</font> <i><font color="#9A1900"># 403 if no user given</font></i> <b><font color="#0000FF">return</font></b> <font color="#990000">(</font><b><font color="#0000FF">undef</font></b><font color="#990000">,</font> <b><font color="#0000FF">undef</font></b><font color="#990000">)</font> <b><font color="#0000FF">unless</font></b> <b><font color="#0000FF">length</font></b> <font color="#009900">$user</font><font color="#990000">;</font> <b><font color="#0000FF">print</font></b> <font color="#FF0000">"Password: "</font><font color="#990000">;</font> <b><font color="#0000FF">system</font></b><font color="#990000">(</font><font color="#FF0000">"stty -echo"</font><font color="#990000">);</font> <b><font color="#0000FF">my</font></b> <font color="#009900">$password</font> <font color="#990000">=</font> <font color="#FF0000">&lt;STDIN&gt;</font><font color="#990000">;</font> <b><font color="#0000FF">system</font></b><font color="#990000">(</font><font color="#FF0000">"stty echo"</font><font color="#990000">);</font> <b><font color="#0000FF">print</font></b> <font color="#FF0000">"\n"</font><font color="#990000">;</font> <i><font color="#9A1900"># because we disabled echo</font></i> <b><font color="#0000FF">chomp</font></b><font color="#990000">(</font><font color="#009900">$password</font><font color="#990000">);</font> <b><font color="#0000FF">return</font></b> <font color="#990000">(</font><font color="#009900">$user</font><font color="#990000">,</font> <font color="#009900">$password</font><font color="#990000">);</font> <font color="#FF0000">}</font> <i><font color="#9A1900"># Damm we got 403 with CGI (use param LoginDetails) ...</font></i> <b><font color="#0000FF">else</font></b> <font color="#FF0000">{</font> <b><font color="#0000FF">return</font></b> <font color="#990000">(</font><b><font color="#0000FF">undef</font></b><font color="#990000">,</font> <b><font color="#0000FF">undef</font></b><font color="#990000">)</font> <font color="#FF0000">}</font> <font color="#FF0000">}</font> <font color="#FF0000">}</font> <i><font color="#9A1900">#------------------------------------------------------------------------------</font></i> <i><font color="#9A1900"># new</font></i> <i><font color="#9A1900">#------------------------------------------------------------------------------</font></i> <b><font color="#0000FF">sub</font></b> new <font color="#FF0000">{</font> <b><font color="#0000FF">my</font></b> <font color="#009900">$class</font> <font color="#990000">=</font> <b><font color="#0000FF">shift</font></b><font color="#990000">;</font> <b><font color="#0000FF">my</font></b> <font color="#009900">$self</font> <font color="#990000">=</font> <font color="#FF0000">{}</font><font color="#990000">;</font> <b><font color="#0000FF">bless</font></b> <font color="#009900">$self</font><font color="#990000">,</font> <font color="#009900">$class</font><font color="#990000">;</font> <b><font color="#0000FF">my</font></b> <font color="#009900">%param</font> <font color="#990000">=</font> <font color="#009900">@_</font><font color="#990000">;</font> <i><font color="#9A1900"># Agent name</font></i> <font color="#009900">$self</font><font color="#990000">-&gt;</font><font color="#FF0000">{</font>_AGENT<font color="#FF0000">}</font> <font color="#990000">=</font> new RequestAgent<font color="#990000">;</font> <font color="#009900">$self</font><font color="#990000">-&gt;</font><font color="#FF0000">{</font>_AGENT<font color="#FF0000">}</font><font color="#990000">-&gt;</font><b><font color="#000000">agent</font></b><font color="#990000">(</font><font color="#FF0000">"MIME-Lite-HTML $VERSION"</font><font color="#990000">);</font> <font color="#009900">$self</font><font color="#990000">-&gt;</font><font color="#FF0000">{</font>_AGENT<font color="#FF0000">}</font><font color="#990000">-&gt;</font><b><font color="#000000">from</font></b><font color="#990000">(</font><font color="#FF0000">'mime-lite-html@alianwebserver.com'</font> <font color="#990000">);</font> <i><font color="#9A1900"># Set debug level</font></i> <b><font color="#0000FF">if</font></b> <font color="#990000">(</font><font color="#009900">$param</font><font color="#FF0000">{</font><font color="#FF0000">'Debug'</font><font color="#FF0000">}</font><font color="#990000">)</font> <font color="#FF0000">{</font> <font color="#009900">$self</font><font color="#990000">-&gt;</font><font color="#FF0000">{</font>_DEBUG<font color="#FF0000">}</font> <font color="#990000">=</font> <font color="#993399">1</font><font color="#990000">;</font> <b><font color="#0000FF">delete</font></b> <font color="#009900">$param</font><font color="#FF0000">{</font><font color="#FF0000">'Debug'</font><font color="#FF0000">}</font><font color="#990000">;</font> <font color="#FF0000">}</font> <i><font color="#9A1900"># Set Login information</font></i> <b><font color="#0000FF">if</font></b> <font color="#990000">(</font><font color="#009900">$param</font><font color="#FF0000">{</font><font color="#FF0000">'LoginDetails'</font><font color="#FF0000">}</font><font color="#990000">)</font> <font color="#FF0000">{</font> <font color="#009900">$LOGINDETAILS</font> <font color="#990000">=</font> <font color="#009900">$param</font><font color="#FF0000">{</font><font color="#FF0000">'LoginDetails'</font><font color="#FF0000">}</font><font color="#990000">;</font> <b><font color="#0000FF">delete</font></b> <font color="#009900">$param</font><font color="#FF0000">{</font><font color="#FF0000">'LoginDetails'</font><font color="#FF0000">}</font><font color="#990000">;</font> <font color="#FF0000">}</font> <i><font color="#9A1900"># Set type of include to do</font></i> <b><font color="#0000FF">if</font></b> <font color="#990000">(</font><font color="#009900">$param</font><font color="#FF0000">{</font><font color="#FF0000">'IncludeType'</font><font color="#FF0000">}</font><font color="#990000">)</font> <font color="#FF0000">{</font> <b><font color="#0000FF">die</font></b> <font color="#FF0000">"IncludeType must be in 'extern', 'cid' or 'location'\n"</font> <b><font color="#0000FF">if</font></b> <font color="#990000">(</font> <font color="#990000">(</font><font color="#009900">$param</font><font color="#FF0000">{</font><font color="#FF0000">'IncludeType'</font><font color="#FF0000">}</font> ne <font color="#FF0000">'extern'</font><font color="#990000">)</font> <b><font color="#0000FF">and</font></b> <font color="#990000">(</font><font color="#009900">$param</font><font color="#FF0000">{</font><font color="#FF0000">'IncludeType'</font><font color="#FF0000">}</font> ne <font color="#FF0000">'cid'</font><font color="#990000">)</font> <b><font color="#0000FF">and</font></b> <font color="#990000">(</font><font color="#009900">$param</font><font color="#FF0000">{</font><font color="#FF0000">'IncludeType'</font><font color="#FF0000">}</font> ne <font color="#FF0000">'location'</font><font color="#990000">));</font> <font color="#009900">$self</font><font color="#990000">-&gt;</font><font color="#FF0000">{</font>_include<font color="#FF0000">}</font> <font color="#990000">=</font> <font color="#009900">$param</font><font color="#FF0000">{</font><font color="#FF0000">'IncludeType'</font><font color="#FF0000">}</font><font color="#990000">;</font> <b><font color="#0000FF">delete</font></b> <font color="#009900">$param</font><font color="#FF0000">{</font><font color="#FF0000">'IncludeType'</font><font color="#FF0000">}</font><font color="#990000">;</font> <font color="#FF0000">}</font> <i><font color="#9A1900"># Defaut type: use a Content-Location field</font></i> <b><font color="#0000FF">else</font></b> <font color="#FF0000">{</font><font color="#009900">$self</font><font color="#990000">-&gt;</font><font color="#FF0000">{</font>_include<font color="#FF0000">}</font><font color="#990000">=</font><font color="#FF0000">'location'</font><font color="#990000">;</font><font color="#FF0000">}</font> <i><font color="#9A1900">## Added by Michalis@linuxmail.org to manipulate non-us mails</font></i> <b><font color="#0000FF">if</font></b> <font color="#990000">(</font><font color="#009900">$param</font><font color="#FF0000">{</font><font color="#FF0000">'TextCharset'</font><font color="#FF0000">}</font><font color="#990000">)</font> <font color="#FF0000">{</font> <font color="#009900">$self</font><font color="#990000">-&gt;</font><font color="#FF0000">{</font>_textcharset<font color="#FF0000">}</font><font color="#990000">=</font><font color="#009900">$param</font><font color="#FF0000">{</font><font color="#FF0000">'TextCharset'</font><font color="#FF0000">}</font><font color="#990000">;</font> <b><font color="#0000FF">delete</font></b> <font color="#009900">$param</font><font color="#FF0000">{</font><font color="#FF0000">'TextCharset'</font><font color="#FF0000">}</font><font color="#990000">;</font> <font color="#FF0000">}</font> <b><font color="#0000FF">else</font></b> <font color="#FF0000">{</font> <font color="#009900">$self</font><font color="#990000">-&gt;</font><font color="#FF0000">{</font>_textcharset<font color="#FF0000">}</font><font color="#990000">=</font><font color="#FF0000">'iso-8859-1'</font><font color="#990000">;</font> <font color="#FF0000">}</font> <b><font color="#0000FF">if</font></b> <font color="#990000">(</font><font color="#009900">$param</font><font color="#FF0000">{</font><font color="#FF0000">'HTMLCharset'</font><font color="#FF0000">}</font><font color="#990000">)</font> <font color="#FF0000">{</font> <font color="#009900">$self</font><font color="#990000">-&gt;</font><font color="#FF0000">{</font>_htmlcharset<font color="#FF0000">}</font><font color="#990000">=</font><font color="#009900">$param</font><font color="#FF0000">{</font><font color="#FF0000">'HTMLCharset'</font><font color="#FF0000">}</font><font color="#990000">;</font> <b><font color="#0000FF">delete</font></b> <font color="#009900">$param</font><font color="#FF0000">{</font><font color="#FF0000">'HTMLCharset'</font><font color="#FF0000">}</font><font color="#990000">;</font> <font color="#FF0000">}</font> <b><font color="#0000FF">else</font></b> <font color="#FF0000">{</font> <font color="#009900">$self</font><font color="#990000">-&gt;</font><font color="#FF0000">{</font>_htmlcharset<font color="#FF0000">}</font><font color="#990000">=</font><font color="#FF0000">'iso-8859-1'</font><font color="#990000">;</font> <font color="#FF0000">}</font> <b><font color="#0000FF">if</font></b> <font color="#990000">(</font><font color="#009900">$param</font><font color="#FF0000">{</font><font color="#FF0000">'TextEncoding'</font><font color="#FF0000">}</font><font color="#990000">)</font> <font color="#FF0000">{</font> <font color="#009900">$self</font><font color="#990000">-&gt;</font><font color="#FF0000">{</font>_textencoding<font color="#FF0000">}</font><font color="#990000">=</font><font color="#009900">$param</font><font color="#FF0000">{</font><font color="#FF0000">'TextEncoding'</font><font color="#FF0000">}</font><font color="#990000">;</font> <b><font color="#0000FF">delete</font></b> <font color="#009900">$param</font><font color="#FF0000">{</font><font color="#FF0000">'TextEncoding'</font><font color="#FF0000">}</font><font color="#990000">;</font> <font color="#FF0000">}</font> <b><font color="#0000FF">else</font></b> <font color="#FF0000">{</font> <font color="#009900">$self</font><font color="#990000">-&gt;</font><font color="#FF0000">{</font>_textencoding<font color="#FF0000">}</font><font color="#990000">=</font><font color="#FF0000">'7bit'</font><font color="#990000">;</font> <font color="#FF0000">}</font> <b><font color="#0000FF">if</font></b> <font color="#990000">(</font><font color="#009900">$param</font><font color="#FF0000">{</font><font color="#FF0000">'HTMLEncoding'</font><font color="#FF0000">}</font><font color="#990000">)</font> <font color="#FF0000">{</font> <font color="#009900">$self</font><font color="#990000">-&gt;</font><font color="#FF0000">{</font>_htmlencoding<font color="#FF0000">}</font><font color="#990000">=</font><font color="#009900">$param</font><font color="#FF0000">{</font><font color="#FF0000">'HTMLEncoding'</font><font color="#FF0000">}</font><font color="#990000">;</font> <b><font color="#0000FF">delete</font></b> <font color="#009900">$param</font><font color="#FF0000">{</font><font color="#FF0000">'HTMLEncoding'</font><font color="#FF0000">}</font><font color="#990000">;</font> <font color="#FF0000">}</font> <b><font color="#0000FF">else</font></b> <font color="#FF0000">{</font> <font color="#009900">$self</font><font color="#990000">-&gt;</font><font color="#FF0000">{</font>_htmlencoding<font color="#FF0000">}</font><font color="#990000">=</font><font color="#FF0000">'quoted-printable'</font><font color="#990000">;</font> <font color="#FF0000">}</font> <i><font color="#9A1900">## End. Default values remain as they were initially set.</font></i> <i><font color="#9A1900">## No need to change existing scripts if you send US-ASCII. </font></i> <i><font color="#9A1900">## If you DON't send us-ascii, you wouldn't be able to use </font></i> <i><font color="#9A1900">## MIME::Lite::HTML anyway :-)</font></i> <i><font color="#9A1900"># Set proxy to use to get file</font></i> <b><font color="#0000FF">if</font></b> <font color="#990000">(</font><font color="#009900">$param</font><font color="#FF0000">{</font><font color="#FF0000">'Proxy'</font><font color="#FF0000">}</font><font color="#990000">)</font> <font color="#FF0000">{</font> <font color="#009900">$self</font><font color="#990000">-&gt;</font><font color="#FF0000">{</font>_AGENT<font color="#FF0000">}</font><font color="#990000">-&gt;</font><b><font color="#000000">proxy</font></b><font color="#990000">(</font><font color="#FF0000">'http'</font><font color="#990000">,</font><font color="#009900">$param</font><font color="#FF0000">{</font><font color="#FF0000">'Proxy'</font><font color="#FF0000">}</font><font color="#990000">)</font> <font color="#990000">;</font> <b><font color="#0000FF">print</font></b> <font color="#FF0000">"Set proxy for http : "</font><font color="#990000">,</font> <font color="#009900">$param</font><font color="#FF0000">{</font><font color="#FF0000">'Proxy'</font><font color="#FF0000">}</font><font color="#990000">,</font><font color="#FF0000">"\n"</font> <b><font color="#0000FF">if</font></b> <font color="#990000">(</font><font color="#009900">$self</font><font color="#990000">-&gt;</font><font color="#FF0000">{</font>_DEBUG<font color="#FF0000">}</font><font color="#990000">);</font> <b><font color="#0000FF">delete</font></b> <font color="#009900">$param</font><font color="#FF0000">{</font><font color="#FF0000">'Proxy'</font><font color="#FF0000">}</font><font color="#990000">;</font> <font color="#FF0000">}</font> <i><font color="#9A1900"># Set hash to use with template</font></i> <b><font color="#0000FF">if</font></b> <font color="#990000">(</font><font color="#009900">$param</font><font color="#FF0000">{</font><font color="#FF0000">'HashTemplate'</font><font color="#FF0000">}</font><font color="#990000">)</font> <font color="#FF0000">{</font> <font color="#009900">$param</font><font color="#FF0000">{</font><font color="#FF0000">'HashTemplate'</font><font color="#FF0000">}</font> <font color="#990000">=</font> <b><font color="#0000FF">ref</font></b><font color="#990000">(</font><font color="#009900">$param</font><font color="#FF0000">{</font><font color="#FF0000">'HashTemplate'</font><font color="#FF0000">}</font><font color="#990000">)</font> <b><font color="#0000FF">eq</font></b> <font color="#FF0000">"HASH"</font> <font color="#990000">?</font> <font color="#009900">$param</font><font color="#FF0000">{</font><font color="#FF0000">'HashTemplate'</font><font color="#FF0000">}</font> <font color="#990000">:</font> <font color="#990000">%</font><font color="#FF0000">{</font><font color="#009900">$param</font><font color="#FF0000">{</font><font color="#FF0000">'HashTemplate'</font><font color="#FF0000">}}</font><font color="#990000">;</font> <font color="#009900">$self</font><font color="#990000">-&gt;</font><font color="#FF0000">{</font>_HASH_TEMPLATE<font color="#FF0000">}</font><font color="#990000">=</font> <font color="#009900">$param</font><font color="#FF0000">{</font><font color="#FF0000">'HashTemplate'</font><font color="#FF0000">}</font><font color="#990000">;</font> <b><font color="#0000FF">delete</font></b> <font color="#009900">$param</font><font color="#FF0000">{</font><font color="#FF0000">'HashTemplate'</font><font color="#FF0000">}</font><font color="#990000">;</font> <font color="#FF0000">}</font> <font color="#009900">$self</font><font color="#990000">-&gt;</font><font color="#FF0000">{</font>_param<font color="#FF0000">}</font> <font color="#990000">=</font> <font color="#990000">\</font><font color="#009900">%param</font><font color="#990000">;</font> <i><font color="#9A1900"># Ok I hope I known what I do ;-)</font></i> MIME<font color="#990000">::</font>Lite<font color="#990000">-&gt;</font><b><font color="#000000">quiet</font></b><font color="#990000">(</font><font color="#993399">1</font><font color="#990000">);</font> <b><font color="#0000FF">return</font></b> <font color="#009900">$self</font><font color="#990000">;</font> <font color="#FF0000">}</font> <i><font color="#9A1900">#------------------------------------------------------------------------------</font></i> <i><font color="#9A1900"># POD Documentation</font></i> <i><font color="#9A1900">#------------------------------------------------------------------------------</font></i> <i><font color="#9A1900">=head1 NAME</font></i> <i><font color="#9A1900">MIME::Lite::HTML - Provide routine to transform a HTML page in a MIME-Lite mail</font></i> <i><font color="#9A1900">=head1 SYNOPSIS</font></i> <i><font color="#9A1900"> #!/usr/bin/perl -w </font></i> <i><font color="#9A1900"> # A cgi program that do "Mail this page to a friend";</font></i> <i><font color="#9A1900"> # Call this script like this :</font></i> <i><font color="#9A1900"> # script.cgi?email=myfriend@isp.com&amp;url=http://www.go.com</font></i> <i><font color="#9A1900"> use strict;</font></i> <i><font color="#9A1900"> use CGI qw/:standard/;</font></i> <i><font color="#9A1900"> use CGI::Carp qw/fatalsToBrowser/;</font></i> <i><font color="#9A1900"> use MIME::Lite::HTML;</font></i> <i><font color="#9A1900"> </font></i> <i><font color="#9A1900"> my $mailHTML = new MIME::Lite::HTML</font></i> <i><font color="#9A1900"> From =&gt; 'MIME-Lite@alianwebserver.com',</font></i> <i><font color="#9A1900"> To =&gt; param('email'),</font></i> <i><font color="#9A1900"> Subject =&gt; 'Your url: '.param('url');</font></i> <i><font color="#9A1900"> </font></i> <i><font color="#9A1900"> my $MIMEmail = $mailHTML-&gt;parse(param('url'));</font></i> <i><font color="#9A1900"> $MIMEmail-&gt;send; # or for win user : $mail-&gt;send_by_smtp('smtp.fai.com');</font></i> <i><font color="#9A1900"> print header,"Mail envoye (", param('url'), " to ", param('email'),")&lt;br&gt;\n";</font></i> <i><font color="#9A1900">=head1 DESCRIPTION</font></i> <i><font color="#9A1900">This module is a Perl mail client interface for sending message that </font></i> <i><font color="#9A1900">support HTML format and build them for you..</font></i> <i><font color="#9A1900">This module provide routine to transform a HTML page in MIME::Lite mail.</font></i> <i><font color="#9A1900">So you need this module to use MIME-Lite-HTML possibilities</font></i> <i><font color="#9A1900">=head2 What's happen ?</font></i> <i><font color="#9A1900">The job done is:</font></i> <i><font color="#9A1900">=over</font></i> <i><font color="#9A1900">=item *</font></i> <i><font color="#9A1900">Get the file (LWP) if needed</font></i> <i><font color="#9A1900">=item *</font></i> <i><font color="#9A1900">Parse page to find include images (gif, jpg, flash)</font></i> <i><font color="#9A1900">=item *</font></i> <i><font color="#9A1900">Attach them to mail with adequat header if asked (default)</font></i> <i><font color="#9A1900">=item *</font></i> <i><font color="#9A1900">Include external CSS,Javascript file</font></i> <i><font color="#9A1900">=item *</font></i> <i><font color="#9A1900">Replace relative url with absolute one</font></i> <i><font color="#9A1900">=item *</font></i> <i><font color="#9A1900">Build the final MIME-Lite object with each part found</font></i> <i><font color="#9A1900">=back</font></i> <i><font color="#9A1900">=cut</font></i> <i><font color="#9A1900">## the next one is just to see if =cut is recognized</font></i> <b><font color="#0000FF">sub</font></b> foo <font color="#FF0000">{</font> <b><font color="#0000FF">my</font></b> <font color="#009900">$class</font> <font color="#990000">=</font> <b><font color="#0000FF">shift</font></b><font color="#990000">;</font> <b><font color="#0000FF">my</font></b> <font color="#009900">$self</font> <font color="#990000">=</font> <font color="#FF0000">{}</font><font color="#990000">;</font> <b><font color="#0000FF">bless</font></b> <font color="#009900">$self</font><font color="#990000">,</font> <font color="#009900">$class</font><font color="#990000">;</font> <font color="#009900">$content</font> <font color="#990000">=~</font> <b><font color="#0000FF">s</font></b><font color="#FF6600">/^.*content:.*?\"//</font><b><font color="#0000FF">i</font></b><font color="#990000">;</font> <font color="#FF0000">}</font> <font color="#009900">$theline</font> <font color="#990000">=~</font> <b><font color="#0000FF">s</font></b><font color="#FF6600">/(&lt;=|=&gt;|=|\-|\+|\*|\/|\*\*|;|:|\\|\'|\"|,|\.|\(|\)|\[|\]|\{|\}|&lt;|&gt;)/\&lt;span class\=\"op\"\&gt;$1\&lt;\/span&gt;/</font><b><font color="#0000FF">g</font></b><font color="#990000">;</font> <font color="#009900">$theline</font> <font color="#990000">=~</font> <b><font color="#0000FF">s</font></b><font color="#FF6600">/(&lt;=|=&gt;|=|\-|\+|\*|\/|\*\*|;|:|\\|\'|\"|,|\.|\(|\)|\[|\]|\{|\}|&lt;|&gt;)/</font><b><font color="#0000FF">g</font></b><font color="#990000">;</font> <b><font color="#0000FF">if</font></b><font color="#990000">(</font><font color="#009900">$#ARGV</font><font color="#990000">==</font><font color="#993399">2</font><font color="#990000">)</font><font color="#FF0000">{}</font> <font color="#009900">$someString</font> <font color="#990000">=~</font> <b><font color="#0000FF">m</font></b><font color="#FF6600">/anything/</font>gix <font color="#990000">;</font> <font color="#009900">$someString</font> <font color="#990000">=~</font> <font color="#FF0000">/anything/</font> <font color="#990000">;</font> <b><font color="#0000FF">if</font></b><font color="#990000">(</font><font color="#009900">$someString</font> <font color="#990000">=~</font> <font color="#FF0000">/anything/</font><b><font color="#0000FF">g</font></b> <font color="#990000">)</font><font color="#FF0000">{}</font> <b><font color="#0000FF">if</font></b><font color="#990000">(</font> <font color="#FF0000">/anything/</font> <font color="#990000">)</font><font color="#FF0000">{}</font> <b><font color="#0000FF">if</font></b><font color="#990000">(</font><font color="#009900">$somestring</font> <font color="#990000">=~</font> <b><font color="#0000FF">s</font></b><font color="#FF6600">/something/something else/</font><b><font color="#0000FF">gi</font></b> <font color="#990000">)</font><font color="#FF0000">{}</font> <font color="#009900">$somestring</font> <font color="#990000">=~</font> <font color="#FF0000">/something/something else/</font> <font color="#990000">;</font> <font color="#009900">$somestring</font> <font color="#990000">=~</font> <b><font color="#0000FF">qr</font></b><font color="#FF6600">/something/</font>something <b><font color="#0000FF">else</font></b><font color="#990000">/</font> <font color="#990000">;</font> </tt></pre> �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/tests/test2.sh.html����������������������������������������������������������0000644�0001750�0001750�00000002723�11672675567�015443� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<!-- Generator: GNU source-highlight by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite --> <pre><tt><i><font color="#9A1900">#!/bin/sh</font></i> <i><font color="#9A1900">#.*$ - comment</font></i> echo <font color="#009900">${variable##*i}</font> <i><font color="#9A1900"># prints "s bob"</font></i> <i><font color="#9A1900">#.*$ - comment</font></i> echo <font color="#009900">${variable#*n}</font> <i><font color="#9A1900"># prints "ame is bob"</font></i> echo <font color="#009900">${#variable}</font> <i><font color="#9A1900"># prints 17</font></i> echo <font color="#009900">${#array[*]}</font> <i><font color="#9A1900"># prints 4</font></i> echo <font color="#009900">$#</font> <font color="#990000">+</font> <font color="#993399">1</font> <i><font color="#9A1900"># prints 0</font></i> <i><font color="#9A1900"># Incidentally, all of the $ variables should be variable markup </font></i> <i><font color="#9A1900"># (i.e. $#, $@, $?, $!, $*, $-, $$, $[0-9] and ${[0-9][0-9]*})</font></i> echo <font color="#009900">$#</font> echo <font color="#009900">$@</font> <font color="#009900">$?</font> <font color="#009900">$!</font> <font color="#009900">$*</font> <font color="#009900">$-</font> <font color="#009900">$$</font> <font color="#009900">$8</font> <font color="#009900">${12}</font> echo <font color="#FF0000">"comment"</font> <i><font color="#9A1900">### this is a comment</font></i> </tt></pre> ���������������������������������������������source-highlight-3.1.6/tests/test_cpp_lines.html����������������������������������������������������0000644�0001750�0001750�00000032271�11672675567�017005� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<!-- Generator: GNU source-highlight by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite --> <pre><tt><font color="#000000">01:</font> <i><font color="#9A1900">/**</font></i> <font color="#000000">02:</font> <i><font color="#9A1900">** Copyright (C) 1999-2007 Lorenzo Bettini</font></i> <font color="#000000">03:</font> <i><font color="#9A1900">** </font></i> <font color="#000000">04:</font> <i><font color="#9A1900"> </font></i><u><font color="#0000FF">http://www.lorenzobettini.it</font></u> <font color="#000000">05:</font> <i><font color="#9A1900"> </font></i> <font color="#000000">06:</font> <i><font color="#9A1900"> r2 = r2 XOR (1&lt;&lt;10);</font></i> <font color="#000000">07:</font> <i><font color="#9A1900"> cout &lt;&lt; "hello world" &lt;&lt; endl;</font></i> <font color="#000000">08:</font> <i><font color="#9A1900">** </font></i> <font color="#000000">09:</font> <i><font color="#9A1900">*/</font></i> <font color="#000000">10:</font> <font color="#000000">11:</font> <i><font color="#9A1900">// this file also contains the definition of mysum as a #define</font></i> <font color="#000000">12:</font> <font color="#000000">13:</font> <i><font color="#9A1900">// textgenerator.h : Text Generator class &amp;&amp;</font></i> <font color="#000000">14:</font> <font color="#000000">15:</font> <b><font color="#000080">#ifndef</font></b> _TEXTGEN_H <font color="#000000">16:</font> <b><font color="#000080">#define</font></b> _TEXTGEN_H <font color="#000000">17:</font> <font color="#000000">18:</font> <b><font color="#000080">#define</font></b> <b><font color="#000000">foo</font></b><font color="#990000">(</font>x<font color="#990000">)</font> <font color="#990000">(</font>x <font color="#990000">+</font> <font color="#993399">1</font><font color="#990000">)</font> <font color="#000000">19:</font> <font color="#000000">20:</font> <b><font color="#000080">#define</font></b> mysum myfunbody <font color="#000000">21:</font> <font color="#000000">22:</font> <b><font color="#000080">#include</font></b> <font color="#FF0000">&lt;iostream.h&gt;</font> <i><font color="#9A1900">// for cerr</font></i> <font color="#000000">23:</font> <font color="#000000">24:</font> <b><font color="#000080">#include</font></b> <font color="#FF0000">"genfun.h"</font> <i><font color="#9A1900">/* for generating functions */</font></i> <font color="#000000">25:</font> <font color="#000000">26:</font> <b><font color="#0000FF">class</font></b> <font color="#008080">TextGenerator</font> <font color="#FF0000">{</font> <font color="#000000">27:</font> <b><font color="#0000FF">public</font></b> <font color="#990000">:</font> <font color="#000000">28:</font> <b><font color="#0000FF">virtual</font></b> <font color="#009900">void</font> <b><font color="#000000">generate</font></b><font color="#990000">(</font> <b><font color="#0000FF">const</font></b> <font color="#009900">char</font> <font color="#990000">*</font>s <font color="#990000">)</font> <b><font color="#0000FF">const</font></b> <font color="#FF0000">{</font> <font color="#990000">(*</font>sout<font color="#990000">)</font> <font color="#990000">&lt;&lt;</font> s <font color="#990000">;</font> <font color="#FF0000">}</font> <font color="#000000">29:</font> <b><font color="#0000FF">virtual</font></b> <font color="#009900">void</font> <b><font color="#000000">generate</font></b><font color="#990000">(</font> <b><font color="#0000FF">const</font></b> <font color="#009900">char</font> <font color="#990000">*</font>s<font color="#990000">,</font> <font color="#009900">int</font> start<font color="#990000">,</font> <font color="#009900">int</font> end <font color="#990000">)</font> <b><font color="#0000FF">const</font></b> <font color="#000000">30:</font> <font color="#FF0000">{</font> <font color="#000000">31:</font> <b><font color="#0000FF">for</font></b> <font color="#990000">(</font> <font color="#009900">int</font> i <font color="#990000">=</font> start <font color="#990000">;</font> i <font color="#990000">&lt;=</font> end <font color="#990000">;</font> <font color="#990000">++</font>i <font color="#990000">)</font> <font color="#000000">32:</font> <font color="#990000">(*</font>sout<font color="#990000">)</font> <font color="#990000">&lt;&lt;</font> s<font color="#990000">[</font>i<font color="#990000">]</font> <font color="#990000">;</font> <font color="#000000">33:</font> <b><font color="#0000FF">return</font></b> a<font color="#990000">&lt;</font>p<font color="#990000">-&gt;</font>b <font color="#990000">?</font> a <font color="#990000">:</font> <font color="#993399">3</font><font color="#990000">;</font> <font color="#000000">34:</font> <font color="#FF0000">}</font> <font color="#000000">35:</font> <b><font color="#0000FF">virtual</font></b> <font color="#009900">void</font> <b><font color="#000000">generateln</font></b><font color="#990000">(</font> <b><font color="#0000FF">const</font></b> <font color="#009900">char</font> <font color="#990000">*</font>s <font color="#990000">)</font> <b><font color="#0000FF">const</font></b> <font color="#000000">36:</font> <font color="#FF0000">{</font> <font color="#000000">37:</font> <b><font color="#000000">generate</font></b><font color="#990000">(</font> s <font color="#990000">)</font> <font color="#990000">;</font> <font color="#000000">38:</font> <font color="#990000">(*</font>sout<font color="#990000">)</font> <font color="#990000">&lt;&lt;</font> endl <font color="#990000">;</font> <font color="#000000">39:</font> <font color="#FF0000">}</font> <font color="#000000">40:</font> <b><font color="#0000FF">virtual</font></b> <font color="#009900">void</font> <b><font color="#000000">generateEntire</font></b><font color="#990000">(</font> <b><font color="#0000FF">const</font></b> <font color="#009900">char</font> <font color="#990000">*</font>s <font color="#990000">)</font> <b><font color="#0000FF">const</font></b> <font color="#000000">41:</font> <font color="#FF0000">{</font> <font color="#000000">42:</font> <b><font color="#000000">startTextGeneration</font></b><font color="#990000">()</font> <font color="#990000">;</font> <font color="#000000">43:</font> <b><font color="#000000">generate</font></b><font color="#990000">(</font>s<font color="#990000">)</font> <font color="#990000">;</font> <font color="#000000">44:</font> <b><font color="#000000">endTextGeneration</font></b><font color="#990000">()</font> <font color="#990000">;</font> <font color="#000000">45:</font> <font color="#FF0000">}</font> <font color="#000000">46:</font> <b><font color="#0000FF">virtual</font></b> <font color="#009900">void</font> <b><font color="#000000">startTextGeneration</font></b><font color="#990000">()</font> <b><font color="#0000FF">const</font></b> <font color="#FF0000">{}</font> <font color="#000000">47:</font> <b><font color="#0000FF">virtual</font></b> <font color="#009900">void</font> <b><font color="#000000">endTextGeneration</font></b><font color="#990000">()</font> <b><font color="#0000FF">const</font></b> <font color="#FF0000">{}</font> <font color="#000000">48:</font> <b><font color="#0000FF">virtual</font></b> <font color="#009900">void</font> <b><font color="#000000">beginText</font></b><font color="#990000">(</font> <b><font color="#0000FF">const</font></b> <font color="#009900">char</font> <font color="#990000">*</font>s <font color="#990000">)</font> <b><font color="#0000FF">const</font></b> <font color="#000000">49:</font> <font color="#FF0000">{</font> <font color="#000000">50:</font> <b><font color="#000000">startTextGeneration</font></b><font color="#990000">()</font> <font color="#990000">;</font> <font color="#000000">51:</font> <b><font color="#0000FF">if</font></b> <font color="#990000">(</font> s <font color="#990000">)</font> <font color="#000000">52:</font> <b><font color="#000000">generate</font></b><font color="#990000">(</font> s <font color="#990000">)</font> <font color="#990000">;</font> <font color="#000000">53:</font> <font color="#FF0000">}</font> <font color="#000000">54:</font> <b><font color="#0000FF">virtual</font></b> <font color="#009900">void</font> <b><font color="#000000">endText</font></b><font color="#990000">(</font> <b><font color="#0000FF">const</font></b> <font color="#009900">char</font> <font color="#990000">*</font>s <font color="#990000">)</font> <b><font color="#0000FF">const</font></b> <font color="#000000">55:</font> <font color="#FF0000">{</font> <font color="#000000">56:</font> <b><font color="#0000FF">if</font></b> <font color="#990000">(</font> s <font color="#990000">)</font> <font color="#000000">57:</font> <b><font color="#000000">generate</font></b><font color="#990000">(</font> s <font color="#990000">)</font> <font color="#990000">;</font> <font color="#000000">58:</font> <b><font color="#000000">endTextGeneration</font></b><font color="#990000">()</font> <font color="#990000">;</font> <font color="#000000">59:</font> <font color="#FF0000">}</font> <font color="#000000">60:</font> <font color="#FF0000">}</font> <font color="#990000">;</font> <font color="#000000">61:</font> <font color="#000000">62:</font> <i><font color="#9A1900">// Decorator</font></i> <font color="#000000">63:</font> <b><font color="#0000FF">class</font></b> <font color="#008080">TextDecorator</font> <font color="#990000">:</font> <b><font color="#0000FF">public</font></b> TextGenerator <font color="#FF0000">{</font> <font color="#000000">64:</font> <b><font color="#0000FF">protected</font></b> <font color="#990000">:</font> <font color="#000000">65:</font> <font color="#008080">TextGenerator</font> <font color="#990000">*</font>decorated <font color="#990000">;</font> <font color="#000000">66:</font> <font color="#000000">67:</font> <b><font color="#0000FF">public</font></b> <font color="#990000">:</font> <font color="#000000">68:</font> <b><font color="#000000">TextDecorator</font></b><font color="#990000">(</font> <font color="#008080">TextGenerator</font> <font color="#990000">*</font>t <font color="#990000">)</font> <font color="#990000">:</font> <b><font color="#000000">decorated</font></b><font color="#990000">(</font> t <font color="#990000">)</font> <font color="#FF0000">{}</font> <font color="#000000">69:</font> <font color="#000000">70:</font> <b><font color="#0000FF">virtual</font></b> <font color="#009900">void</font> <b><font color="#000000">startTextGeneration</font></b><font color="#990000">()</font> <b><font color="#0000FF">const</font></b> <font color="#000000">71:</font> <font color="#FF0000">{</font> <font color="#000000">72:</font> <b><font color="#000000">startDecorate</font></b><font color="#990000">()</font> <font color="#990000">;</font> <font color="#000000">73:</font> <b><font color="#0000FF">if</font></b> <font color="#990000">(</font> decorated <font color="#990000">)</font> <font color="#000000">74:</font> decorated<font color="#990000">-&gt;</font><b><font color="#000000">startTextGeneration</font></b><font color="#990000">()</font> <font color="#990000">;</font> <font color="#000000">75:</font> <font color="#FF0000">}</font> <font color="#000000">76:</font> <b><font color="#0000FF">virtual</font></b> <font color="#009900">void</font> <b><font color="#000000">endTextGeneration</font></b><font color="#990000">()</font> <b><font color="#0000FF">const</font></b> <font color="#000000">77:</font> <font color="#FF0000">{</font> <font color="#000000">78:</font> <b><font color="#0000FF">if</font></b> <font color="#990000">(</font> decorated <font color="#990000">)</font> <font color="#000000">79:</font> decorated<font color="#990000">-&gt;</font><b><font color="#000000">endTextGeneration</font></b><font color="#990000">()</font> <font color="#990000">;</font> <font color="#000000">80:</font> <b><font color="#000000">endDecorate</font></b><font color="#990000">()</font> <font color="#990000">;</font> <font color="#000000">81:</font> mysum<font color="#990000">;</font> <font color="#000000">82:</font> <font color="#FF0000">}</font> <font color="#000000">83:</font> <font color="#000000">84:</font> <i><font color="#9A1900">// pure virtual functions</font></i> <font color="#000000">85:</font> <b><font color="#0000FF">virtual</font></b> <font color="#009900">void</font> <b><font color="#000000">startDecorate</font></b><font color="#990000">()</font> <b><font color="#0000FF">const</font></b> <font color="#990000">=</font> <font color="#993399">0</font> <font color="#990000">;</font> <font color="#000000">86:</font> <b><font color="#0000FF">virtual</font></b> <font color="#009900">void</font> <b><font color="#000000">endDecorate</font></b><font color="#990000">()</font> <b><font color="#0000FF">const</font></b> <font color="#990000">=</font> <font color="#993399">0</font> <font color="#990000">;</font> <font color="#000000">87:</font> <font color="#FF0000">}</font> <font color="#990000">;</font> <font color="#000000">88:</font> <font color="#000000">89:</font> <b><font color="#000080">#endif</font></b> <i><font color="#9A1900">// _TEXTGEN_H</font></i> <font color="#000000">90:</font> </tt></pre> ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/tests/test_state.ngroups.html������������������������������������������������0000644�0001750�0001750�00000001747�11672675567�017651� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<!-- Generator: GNU source-highlight by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite --> <pre><tt>This should <i><font color="#9A1900">highlight</font></i> some <b><font color="#0000FF">Hello</font></b> <font color="#009900">World</font> strings, like Hello World!! <b><font color="#0000FF">end</font></b> <font color="#009900">of line</font> or <b><font color="#0000FF">Hello</font></b> <font color="#009900">world</font> a <i><font color="#9A1900">comment</font></i> and then <b><font color="#0000FF">end</font></b> <font color="#009900">of line</font> or <b><font color="#0000FF">Ciao</font></b> <font color="#009900">Mondo</font><font color="#990000">?</font> But not this one: hello World! and this highlight is not highlighted 'cos we're still inside the state that's not closed by an "<b><font color="#0000FF">end</font></b> <font color="#009900">of line</font>" while this <i><font color="#9A1900">highlight</font></i> will be let's see.</tt></pre> �������������������������source-highlight-3.1.6/tests/test_xhtml_notfixed.html�����������������������������������������������0000644�0001750�0001750�00000026305�11672675567�020066� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<!-- Generator: GNU source-highlight by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite --> <span style="font-style: italic"><span style="color: #9A1900">/*</span></span><br /> <span style="font-style: italic"><span style="color: #9A1900">&nbsp; This is a classical Hello program</span></span><br /> <span style="font-style: italic"><span style="color: #9A1900">&nbsp; to test source-highlight with Java programs.</span></span><br /> <span style="font-style: italic"><span style="color: #9A1900">&nbsp; </span></span><br /> <span style="font-style: italic"><span style="color: #9A1900">&nbsp; to have an html translation type</span></span><br /> <br /> <span style="font-style: italic"><span style="color: #9A1900">&nbsp; &nbsp; &nbsp; &nbsp; source-highlight -s java -f html --input Hello.java --output Hello.html</span></span><br /> <span style="font-style: italic"><span style="color: #9A1900">&nbsp; &nbsp; &nbsp; &nbsp; source-highlight -s java -f html &lt; Hello.java &gt; Hello.html</span></span><br /> <br /> <span style="font-style: italic"><span style="color: #9A1900">&nbsp; or type source-highlight --help for the list of options</span></span><br /> <br /> <span style="font-style: italic"><span style="color: #9A1900">&nbsp; written by</span></span><br /> <span style="font-style: italic"><span style="color: #9A1900">&nbsp; Lorenzo Bettini</span></span><br /> <span style="font-style: italic"><span style="color: #9A1900">&nbsp; </span></span><span style="text-decoration: underline"><span style="font-family: monospace;"><span style="color: #0000FF">http://www.lorenzobettini.it</span></span></span><br /> <span style="font-style: italic"><span style="color: #9A1900">&nbsp; </span></span><span style="text-decoration: underline"><span style="font-family: monospace;"><span style="color: #0000FF">http://www.gnu.org/software/src-highlite</span></span></span><br /> <span style="font-style: italic"><span style="color: #9A1900">*/</span></span><br /> <br /> <span style="font-weight: bold"><span style="color: #000080">package</span></span> hello<span style="color: #990000">;</span><br /> <br /> <span style="font-weight: bold"><span style="color: #000080">import</span></span> java<span style="color: #990000">.</span>io<span style="color: #990000">.*</span> <span style="color: #990000">;</span><br /> <br /> <span style="font-style: italic"><span style="color: #9A1900">/**</span></span><br /> <span style="font-style: italic"><span style="color: #9A1900">&nbsp;* </span></span><span style="font-weight: bold"><span style="color: #0000FF">&lt;p&gt;</span></span><br /> <span style="font-style: italic"><span style="color: #9A1900">&nbsp;* A simple Hello World class, used to demonstrate some</span></span><br /> <span style="font-style: italic"><span style="color: #9A1900">&nbsp;* features of Java source highlighting.</span></span><br /> <span style="font-style: italic"><span style="color: #9A1900">&nbsp;* </span></span><span style="font-weight: bold"><span style="color: #0000FF">&lt;/p&gt;</span></span><br /> <span style="font-style: italic"><span style="color: #9A1900">&nbsp;* </span></span><span style="font-weight: bold"><span style="background-color: #66FFFF">TODO:</span></span><span style="font-style: italic"><span style="color: #9A1900"> nothing, just to show an highlighted </span></span><span style="font-weight: bold"><span style="background-color: #66FFFF">TODO</span></span><span style="font-style: italic"><span style="color: #9A1900"> or </span></span><span style="font-weight: bold"><span style="background-color: #66FFFF">FIXME</span></span><br /> <span style="font-style: italic"><span style="color: #9A1900">&nbsp;*</span></span><br /> <span style="font-style: italic"><span style="color: #9A1900">&nbsp;* </span></span><span style="color: #009900">@author</span><span style="font-style: italic"><span style="color: #9A1900"> Lorenzo Bettini</span></span><br /> <span style="font-style: italic"><span style="color: #9A1900">&nbsp;* </span></span><span style="color: #009900">@version</span><span style="font-style: italic"><span style="color: #9A1900"> 2.0</span></span><br /> <span style="font-style: italic"><span style="color: #9A1900">&nbsp;*/</span></span> <span style="font-style: italic"><span style="color: #9A1900">/// class</span></span><br /> <span style="font-weight: bold"><span style="color: #0000FF">public</span></span> <span style="font-weight: bold"><span style="color: #0000FF">class</span></span> <span style="color: #008080">Hello</span> <span style="color: #FF0000">{</span><br /> &nbsp; &nbsp; <span style="color: #009900">int</span> foo <span style="color: #990000">=</span> <span style="color: #993399">1998</span> <span style="color: #990000">;</span><br /> &nbsp; &nbsp; <span style="color: #009900">int</span> hex_foo <span style="color: #990000">=</span> <span style="color: #993399">0xCAFEBABE</span><span style="color: #990000">;</span><br /> &nbsp; &nbsp; <span style="color: #009900">boolean</span> b <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">false</span></span><span style="color: #990000">;</span><br /> &nbsp; &nbsp; <span style="color: #008080">Integer</span> i <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">null</span></span> <span style="color: #990000">;</span><br /> &nbsp; &nbsp; <span style="color: #009900">char</span> c <span style="color: #990000">=</span> <span style="font-family: monospace;"><span style="color: #FF0000">'</span></span><span style="font-family: monospace;"><span style="color: #CC33CC">\'</span></span><span style="font-family: monospace;"><span style="color: #FF0000">'</span></span><span style="color: #990000">,</span> d <span style="color: #990000">=</span> <span style="font-family: monospace;"><span style="color: #FF0000">'n'</span></span><span style="color: #990000">,</span> e <span style="color: #990000">=</span> <span style="font-family: monospace;"><span style="color: #FF0000">'</span></span><span style="font-family: monospace;"><span style="color: #CC33CC">\\</span></span><span style="font-family: monospace;"><span style="color: #FF0000">'</span></span> <span style="color: #990000">;</span><br /> &nbsp; &nbsp; <span style="color: #008080">String</span> xml <span style="color: #990000">=</span> <span style="font-family: monospace;"><span style="color: #FF0000">"&lt;tag attr=</span></span><span style="font-family: monospace;"><span style="color: #CC33CC">\"</span></span><span style="font-family: monospace;"><span style="color: #FF0000">value</span></span><span style="font-family: monospace;"><span style="color: #CC33CC">\"</span></span><span style="font-family: monospace;"><span style="color: #FF0000">&gt;&amp;auml;&lt;/tag&gt;"</span></span><span style="color: #990000">,</span> foo2 <span style="color: #990000">=</span> <span style="font-family: monospace;"><span style="color: #FF0000">"</span></span><span style="font-family: monospace;"><span style="color: #CC33CC">\\</span></span><span style="font-family: monospace;"><span style="color: #FF0000">"</span></span> <span style="color: #990000">;</span><br /> <br /> &nbsp; &nbsp; <span style="font-style: italic"><span style="color: #9A1900">/* mymethod */</span></span><br /> &nbsp; &nbsp; <span style="font-weight: bold"><span style="color: #0000FF">public</span></span> <span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">mymethod</span></span><span style="color: #990000">(</span><span style="color: #009900">int</span> i<span style="color: #990000">)</span> <span style="color: #FF0000">{</span><br /> &nbsp; &nbsp; &nbsp; &nbsp; <span style="font-style: italic"><span style="color: #9A1900">// just a foo method</span></span><br /> &nbsp; &nbsp; <span style="color: #FF0000">}</span><br /> &nbsp; &nbsp; <span style="font-style: italic"><span style="color: #9A1900">/* mymethod */</span></span><br /> &nbsp; <br /> &nbsp; &nbsp; <span style="font-style: italic"><span style="color: #9A1900">/* main */</span></span><br /> &nbsp; &nbsp; <span style="font-weight: bold"><span style="color: #0000FF">public</span></span> <span style="font-weight: bold"><span style="color: #0000FF">static</span></span> <span style="color: #009900">void</span> <span style="font-weight: bold"><span style="color: #000000">main</span></span><span style="color: #990000">(</span> <span style="color: #008080">String</span> args<span style="color: #990000">[]</span> <span style="color: #990000">)</span> <span style="color: #FF0000">{</span><br /> &nbsp; &nbsp; &nbsp; &nbsp; <span style="font-style: italic"><span style="color: #9A1900">// just some greetings ;-)&nbsp; /*</span></span><br /> &nbsp; &nbsp; &nbsp; &nbsp; System<span style="color: #990000">.</span>out<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">println</span></span><span style="color: #990000">(</span> <span style="font-family: monospace;"><span style="color: #FF0000">"Hello from java2html :-)"</span></span> <span style="color: #990000">)</span> <span style="color: #990000">;</span><br /> &nbsp; &nbsp; &nbsp; &nbsp; System<span style="color: #990000">.</span>out<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">println</span></span><span style="color: #990000">(</span> <span style="font-family: monospace;"><span style="color: #FF0000">"</span></span><span style="font-family: monospace;"><span style="color: #CC33CC">\t</span></span><span style="font-family: monospace;"><span style="color: #FF0000">by Lorenzo Bettini"</span></span> <span style="color: #990000">)</span> <span style="color: #990000">;</span><br /> &nbsp; &nbsp; &nbsp; &nbsp; System<span style="color: #990000">.</span>out<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">println</span></span><span style="color: #990000">(</span> <span style="font-family: monospace;"><span style="color: #FF0000">"</span></span><span style="font-family: monospace;"><span style="color: #CC33CC">\t</span></span><span style="font-family: monospace;"><span style="color: #FF0000">http://www.lorenzobettini.it"</span></span> <span style="color: #990000">)</span> <span style="color: #990000">;</span><br /> &nbsp; &nbsp; &nbsp; &nbsp; <span style="font-weight: bold"><span style="color: #0000FF">if</span></span> <span style="color: #990000">(</span>argc <span style="color: #990000">&gt;</span> <span style="color: #993399">0</span><span style="color: #990000">)</span><br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008080">String</span> param <span style="color: #990000">=</span> argc<span style="color: #990000">[</span><span style="color: #993399">0</span><span style="color: #990000">];</span><br /> &nbsp; &nbsp; &nbsp; &nbsp; <span style="font-style: italic"><span style="color: #9A1900">//System.out.println( "bye bye... :-D" ) ; // see you soon</span></span><br /> &nbsp; &nbsp; <span style="color: #FF0000">}</span><br /> &nbsp; &nbsp; <span style="font-style: italic"><span style="color: #9A1900">/* main */</span></span><br /> <span style="color: #FF0000">}</span><br /> <span style="font-style: italic"><span style="color: #9A1900">/// class</span></span><br /> <br /> <span style="font-style: italic"><span style="color: #9A1900">// end of file test.java</span></span>���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/tests/test.tcl���������������������������������������������������������������0000644�0001750�0001750�00000001043�11672675566�014557� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh # Emacs like specification -*- Tcl script -*- # the next line restarts using wish \ exec wish "$0" "$@" # hello -- example # Simple Tk script to create a button that prints "Hello, world". # Click on the button to terminate the program. # # The first line below creates the button, and the second line # asks the packer to shrink-wrap the application's main window # around the button. button .hello -text "Hello, world" -command { puts stdout "Hello, world"; destroy . } pack .hello $myvar # Local Variables: # mode: tcl # End: ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/tests/test.MF����������������������������������������������������������������0000644�0001750�0001750�00000001677�11672675566�014314� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.eclipse.mindmap.diagram; singleton:=true Bundle-Version: 1.0.0.qualifier Bundle-ClassPath: . Bundle-Activator: org.eclipse.mindmap.diagram.part.MindmapDiagramEditorPlugin Bundle-Vendor: %providerName Bundle-Localization: plugin Export-Package: org.eclipse.mindmap.diagram.edit.parts, org.eclipse.mindmap.diagram.part, org.eclipse.mindmap.diagram.providers Require-Bundle: org.eclipse.core.runtime, org.eclipse.core.resources, org.eclipse.core.expressions, org.eclipse.draw2d;visibility:=reexport, org.eclipse.gmf.runtime.draw2d.ui;visibility:=reexport, org.eclipse.mindmap;visibility:=reexport, org.eclipse.mindmap.edit;visibility:=reexport, org.eclipse.gef;visibility:=reexport, org.eclipse.ocl.ecore;visibility:=reexport, org.eclipse.emf.validation;visibility:=reexport, org.eclipse.emf.validation.ocl;visibility:=reexport Eclipse-LazyStart: true �����������������������������������������������������������������source-highlight-3.1.6/tests/wrong_trans.err��������������������������������������������������������0000644�0001750�0001750�00000000044�11672675567�016152� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������wrong_trans.outlang:4: syntax error ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/tests/test.bat���������������������������������������������������������������0000644�0001750�0001750�00000001433�11672675566�014546� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@ECHO OFF REM - LABEL INDICATING THE BEGINNING OF THE DOCUMENT. :BEGIN CLS REM - THE BELOW LINE GIVES THE USER 3 CHOICES (DEFINED AFTER /C:) CHOICE /N /C:123 PICK A NUMBER (1, 2, or 3)%1 REM - THE NEXT THREE LINES ARE DIRECTING USER DEPENDING UPON INPUT IF ERRORLEVEL ==3 GOTO THREE IF ERRORLEVEL ==2 GOTO TWO IF ERRORLEVEL ==1 GOTO ONE GOTO END :THREE ECHO YOU HAVE PRESSED THREE GOTO END :TWO ECHO YOU HAVE PRESSED TWO GOTO END :ONE ECHO YOU HAVE PRESSED ONE :END :: Renames a Text File with the Current Date as the Name :: The File Extension is Kept :: C:\BATCH\DOS\XSET CUR-DATE DATE YY-MM-DD REN %1.* %CUR-DATE%.* IF "%1" == "" XCOPY B:\*.* IF NOT "%1" == "" XCOPY B:\%1 ECHO. C:\BATCH\DR FOR %%F IN (%1 %2 %3 %4 %5 %6 %7 %8 %9) DO DEL %%F �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/tests/test_vardecl.cc��������������������������������������������������������0000644�0001750�0001750�00000000403�11672675567�016062� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Integer i = 10; Boolean b; String args[]; const MyType args[]; const My_Type args[]; List<Integer> mylist; List<List<Integer> > mylist; myspace::InputStream iStream ; MyType *t; MyType **t; const MyType &t; if (argc > 0) { } __mytype _i; typedef _mytype __i; �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/tests/test_comments.rb.html��������������������������������������������������0000644�0001750�0001750�00000000732�11672675567�017255� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<!-- Generator: GNU source-highlight by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite --> <pre><tt><i><font color="#9A1900"># some tests for comments # yep</font></i> <i><font color="#9A1900">=begin</font></i> <i><font color="#9A1900">This is rd Documentation</font></i> <i><font color="#9A1900"># foo</font></i> <i><font color="#9A1900">=end</font></i> print <font color="#FF0000">"Outside of the comment\n"</font> </tt></pre> ��������������������������������������source-highlight-3.1.6/tests/test.css.html����������������������������������������������������������0000644�0001750�0001750�00000022126�11672675566�015535� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<!-- Generator: GNU source-highlight by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite --> <pre><tt>body <font color="#FF0000">{</font> <font color="#0000FF">font-family:</font> <i><font color="#009900">Arial</font></i>,<i><font color="#009900">Helvetica</font></i>,<i><font color="#009900">sans-serif</font></i>; <font color="#0000FF">font-size:</font> <i><font color="#009900">small</font></i>; <font color="#0000FF">font-style:</font> <i><font color="#009900">normal</font></i>; <font color="#0000FF">background-color :</font> <font color="#FF0000">#F9F9F9</font>; <font color="#FF0000">}</font> <font color="#993399">.box</font> <font color="#FF0000">{</font> <font color="#0000FF">border-width:</font> <i><font color="#009900">2px</font></i>; <font color="#0000FF">border-color:</font> <i><font color="#009900">green</font></i>; <font color="#0000FF">border-style:</font> <i><font color="#009900">solid</font></i>; <font color="#0000FF">font-style:</font> <i><font color="#009900">normal</font></i>; <font color="#0000FF">font-weight:</font> <i><font color="#009900">lighter</font></i>; <font color="#0000FF">font-family:</font> <i><font color="#009900">verdana</font></i>, <i><font color="#009900">sans-serif</font></i>; <font color="#0000FF">font-size:</font> <i><font color="#009900">0.8em</font></i>; <font color="#0000FF">margin-right:</font><i><font color="#009900">2em</font></i>; <font color="#0000FF">margin-bottom:</font><i><font color="#009900">2em</font></i>; <font color="#0000FF">margin-top:</font><i><font color="#009900">2em</font></i>; <font color="#FF0000">}</font> <font color="#993399">.maintitle</font> <font color="#FF0000">{</font> <font color="#0000FF">font-weight:</font><i><font color="#009900">bold</font></i>; <font color="#0000FF">text-align:</font> <i><font color="#009900">center</font></i>; <font color="#0000FF">font-size:</font><i><font color="#009900">large</font></i>; <font color="#FF0000">}</font> <font color="#993399">.domanda</font> <font color="#FF0000">{</font> <font color="#0000FF">font-weight:</font><i><font color="#009900">bold</font></i>; <font color="#FF0000">}</font> <font color="#993399">.risposta</font> <font color="#FF0000">{</font> <font color="#0000FF">font-style:</font> <i><font color="#009900">italic</font></i>; <font color="#FF0000">}</font> <font color="#993399">.title</font> <font color="#FF0000">{</font> <font color="#0000FF">background-color:</font><i><font color="#009900">lightgreen</font></i>; <font color="#0000FF">font-weight:</font><i><font color="#009900">bold</font></i>; <font color="#0000FF">text-align:</font><i><font color="#009900">center</font></i>; <font color="#FF0000">}</font> <font color="#993399">.box</font> li <font color="#FF0000">{</font> <font color="#0000FF">list-style-position:</font><i><font color="#009900">outside</font></i>; <font color="#0000FF">list-style-type:</font><i><font color="#009900">none</font></i>; <font color="#FF0000">}</font> <font color="#993399">.box</font> ul <font color="#FF0000">{</font> <font color="#0000FF">padding-left:</font> <i><font color="#009900">5px</font></i>; <font color="#FF0000">}</font> <font color="#993399">.idimage</font> <font color="#FF0000">{</font> <font color="#0000FF">padding-left:</font> <i><font color="#009900">5px</font></i>; <font color="#0000FF">padding-right:</font> <i><font color="#009900">20px</font></i>; <font color="#0000FF">padding-top:</font><i><font color="#009900">5px</font></i>; <font color="#0000FF">border:</font> <i><font color="#009900">none</font></i>; <font color="#FF0000">}</font> <font color="#993399">#heading</font> <font color="#FF0000">{</font> <font color="#0000FF">width:</font> <i><font color="#009900">100%</font></i>; <font color="#0000FF">margin-bottom:</font><i><font color="#009900">5px</font></i>; <i><font color="#9A1900">/* padding-top:10px; </font></i> <i><font color="#9A1900">padding-bottom:10px; */</font></i> <font color="#0000FF">text-align:</font><i><font color="#009900">center</font></i>; <font color="#0000FF">background-color:</font><font color="#FF0000">#75ACCF</font>; <font color="#0000FF">font-weight:</font><i><font color="#009900">bolder</font></i>; <font color="#0000FF">font-size:</font><i><font color="#009900">large</font></i>; <font color="#FF0000">}</font> <font color="#993399">#bottom</font> <font color="#FF0000">{</font> <font color="#0000FF">width:</font> <i><font color="#009900">100%</font></i>; <font color="#0000FF">top:</font><i><font color="#009900">auto</font></i>; <font color="#0000FF">clear:</font><i><font color="#009900">both</font></i>; <font color="#0000FF">text-align:</font><i><font color="#009900">center</font></i>; <font color="#0000FF">background-color:</font><i><font color="#009900">lightgreen</font></i>; <font color="#0000FF">font-weight:</font><i><font color="#009900">bolder</font></i>; <i><font color="#9A1900">/* padding-top:10px;</font></i> <i><font color="#9A1900">padding-bottom:10px; */</font></i> <font color="#FF0000">}</font> <font color="#993399">#leftcol</font> <font color="#FF0000">{</font> <font color="#0000FF">float:</font><i><font color="#009900">left</font></i>; <font color="#0000FF">width:</font><i><font color="#009900">30%</font></i>; <font color="#FF0000">}</font> <font color="#993399">#altro</font> <font color="#FF0000">{</font> <font color="#0000FF">background-color:</font> <font color="#FF0000">#e0e0e0</font>; <font color="#FF0000">}</font> <font color="#993399">#navbar</font> <font color="#FF0000">{</font> <font color="#0000FF">border-color:</font> <font color="#FF0000">#d0d0d0</font>; <font color="#FF0000">}</font> <font color="#993399">#main</font> <font color="#FF0000">{</font> <font color="#0000FF">float:</font><i><font color="#009900">right</font></i>; <font color="#0000FF">width:</font> <i><font color="#009900">70%</font></i>; <i><font color="#9A1900">/* background-image: url(img_rubinetto_photocopy.jpg); </font></i> <i><font color="#9A1900">background-position: bottom right; </font></i> <i><font color="#9A1900">background-repeat: no-repeat; */</font></i> <font color="#FF0000">}</font> <font color="#993399">#menu2</font> <font color="#FF0000">{</font> <font color="#0000FF">display:</font><i><font color="#009900">table</font></i>; <font color="#0000FF">padding:</font><i><font color="#009900">0</font></i>; <font color="#0000FF">margin:</font><i><font color="#009900">0</font></i> <i><font color="#009900">auto</font></i>; <font color="#0000FF">list-style-type:</font><i><font color="#009900">none</font></i>; <font color="#0000FF">white-space:</font><i><font color="#009900">nowrap</font></i>; <font color="#0000FF">font-size:</font><i><font color="#009900">smaller</font></i>; <font color="#FF0000">}</font> <font color="#993399">#menu2</font> li <font color="#FF0000">{</font> <font color="#0000FF">display:</font><i><font color="#009900">table-cell</font></i>; <font color="#FF0000">}</font> <font color="#990000">*</font> html <font color="#993399">#menu2</font> li <font color="#FF0000">{</font> <font color="#0000FF">float:</font><i><font color="#009900">left</font></i>; <font color="#FF0000">}</font> <font color="#993399">#menu2</font> a <font color="#FF0000">{</font> <font color="#0000FF">width:</font><i><font color="#009900">auto</font></i>; <font color="#0000FF">display:</font><i><font color="#009900">block</font></i>; <font color="#0000FF">padding:</font><i><font color="#009900">4px</font></i> <i><font color="#009900">16px</font></i>; <font color="#0000FF">color:</font><font color="#FF0000">#fff</font>; <font color="#0000FF">background:</font><font color="#FF0000">#08c</font>; <font color="#0000FF">border:</font><i><font color="#009900">1px</font></i> <i><font color="#009900">solid</font></i> <font color="#FF0000">#fff</font>; <font color="#0000FF">text-decoration:</font><i><font color="#009900">none</font></i>; <font color="#FF0000">}</font> <font color="#990000">*</font> html <font color="#993399">#menu2</font> a <font color="#FF0000">{</font> <font color="#0000FF">float:</font><i><font color="#009900">left</font></i>; <font color="#FF0000">}</font> <font color="#993399">#menu2</font> a<font color="#990000">:</font>hover <font color="#FF0000">{</font> <font color="#0000FF">color:</font><font color="#FF0000">#000</font>; <font color="#0000FF">background:</font><font color="#FF0000">#d4d4d4</font>; <font color="#FF0000">}</font> <font color="#993399">.container</font> <font color="#FF0000">{</font><font color="#0000FF">clear:</font><i><font color="#009900">both</font></i>; <font color="#0000FF">text-decoration:</font><i><font color="#009900">none</font></i>;<font color="#FF0000">}</font> <font color="#993399">#info</font> <font color="#FF0000">{</font><font color="#0000FF">text-align:</font><i><font color="#009900">center</font></i>;<font color="#FF0000">}</font> <font color="#993399">#info</font> p <font color="#FF0000">{</font><font color="#0000FF">clear:</font><i><font color="#009900">both</font></i>; <font color="#0000FF">text-align:</font><i><font color="#009900">left</font></i>; <font color="#0000FF">margin-left:</font><i><font color="#009900">15px</font></i>;<font color="#FF0000">}</font> </tt></pre> ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/tests/test.lhs.html����������������������������������������������������������0000644�0001750�0001750�00000004354�11672675566�015536� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<!-- Generator: GNU source-highlight by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite --> <pre><tt>This is a test of Haskel literate programming; Bird style <span style="font-weight: bold"><span style="background-color: #33FF33">&gt;</span></span> fact <span style="color: #990000">::</span> <span style="color: #009900">Integer</span> <span style="color: #990000">-&gt;</span> <span style="color: #009900">Integer</span> <span style="font-weight: bold"><span style="background-color: #33FF33">&gt;</span></span> fact <span style="color: #993399">0</span> <span style="color: #990000">=</span> <span style="color: #993399">1</span> <span style="font-weight: bold"><span style="background-color: #33FF33">&gt;</span></span> fact n <span style="color: #990000">=</span> n <span style="color: #990000">*</span> fact <span style="color: #990000">(</span>n<span style="color: #990000">-</span><span style="color: #993399">1</span><span style="color: #990000">)</span> while this is not considered code fact :: Integer -&gt; Integer This is the Latex style <span style="font-weight: bold"><span style="background-color: #33FF33">\begin{code}</span></span> tsort <span style="color: #990000">[]</span> <span style="color: #990000">=</span> <span style="color: #990000">[]</span> tsort <span style="color: #990000">(</span>x<span style="color: #990000">:</span>xs<span style="color: #990000">)</span> <span style="color: #990000">=</span> tsort <span style="color: #990000">[</span>y <span style="color: #990000">|</span> y<span style="color: #990000">&lt;-</span>xs<span style="color: #990000">,</span> y<span style="color: #990000">&gt;</span>x<span style="color: #990000">]</span> <span style="color: #990000">++</span> <span style="color: #990000">[</span>x<span style="color: #990000">]</span> <span style="color: #990000">++</span> tsort <span style="color: #990000">[</span>y <span style="color: #990000">|</span> y<span style="color: #990000">&lt;-</span>xs<span style="color: #990000">,</span> y<span style="color: #990000">&lt;=</span>x<span style="color: #990000">]</span> <span style="font-weight: bold"><span style="background-color: #33FF33">\end{code}</span></span> and the code will be formatted as you requested. </tt></pre> ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/tests/Makefile.am������������������������������������������������������������0000644�0001750�0001750�00000147113�11676050052�015116� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Copyright (C) 1999-2008 Lorenzo Bettini <http://www.lorenzobettini.it> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. SUBDIRS = output_dir SUFFIXES = .lang .err_out .outlang .style .css .css.java.html .nf_css.java.html .css_doc.java.html .css_xhtml.java.html STD_STYLE = --style-file $(top_srcdir)/src/default.style STD_CSS_STYLE = --style-css-file $(top_srcdir)/src/default.css STD_STYLE_HTML = -f html $(STD_STYLE) STD_STYLE_DEFAULTS = --style-defaults $(top_srcdir)/src/style.defaults DATADIROPTION = --data-dir $(top_srcdir)/src/ # use --binary-output so that output test files are always generated # with \n only also on other operating systems. PROGEXE = $(top_builddir)/src/$(PACKAGE)$(EXEEXT) --binary-output # use --strip-trailing-cr since if run on windows, it may # add \r to output files, while the reference files distributed # are built on linux DIFF = diff # we disable the generation of the version of source-highlight # so that the version does not interfere with the diffing PROGNAME = $(PROGEXE) --gen-version $(DATADIROPTION) PROGNAME_CSSSTYLE = $(PROGEXE) --gen-version $(DATADIROPTION) $(STD_CSS_STYLE) PROGNAME_DOCBOOK = $(PROGEXE) --gen-version $(DATADIROPTION) -f docbook --doc --title="listing in docbook" --tab=8 PROGNAME_STD = $(PROGNAME) $(STD_STYLE_HTML) CHECKLANG = $(top_builddir)/src/$(PACKAGE)$(EXEEXT) --check-lang CHECKOUTLANG = $(top_builddir)/src/$(PACKAGE)$(EXEEXT) --check-outlang JAVA2HTML = $(PROGNAME) -s java $(STD_STYLE_HTML) JAVA2HTMLDOC = $(JAVA2HTML) --title="This is the title" JAVA2ODF = $(PROGNAME) -s java -f odf JAVA2ODFDOC = $(JAVA2ODF) --title="This is the title" JAVA2MEDIAWIKI = $(PROGNAME) -s java -f mediawiki JS2HTML = $(PROGNAME) -s javascript $(STD_STYLE_HTML) URL2HTML = $(PROGNAME) --lang-def=url.lang $(STD_STYLE_HTML) JAVA2XHTML = $(PROGNAME) -s java -f xhtml $(STD_STYLE) --lang-def=$(srcdir)/../src/java.lang JAVA2XHTMLDOC = $(JAVA2XHTML) --doc # note that we don't use $(srcdir), since we're only interested in # the output of source-highlight to test it JAVA2XHTMLCSS = $(JAVA2XHTML) --css ../doc/mono.css --no-doc JAVA2XHTMLCSSDOC = $(JAVA2XHTML) --css ../doc/mono.css JAVA2HTMLNOTFIXED = $(PROGNAME) -s java --outlang-def=$(srcdir)/../src/html_notfixed.outlang $(STD_STYLE) --doc --lang-def=$(srcdir)/../src/java.lang JAVA2XHTMLNOTFIXED = $(PROGNAME) -s java --outlang-def=$(srcdir)/../src/xhtml_notfixed.outlang $(STD_STYLE) --doc --lang-def=$(srcdir)/../src/java.lang JAVA2ESC = $(PROGNAME) -s java -f esc --style-file=$(top_srcdir)/src/esc.style --doc --lang-def=$(srcdir)/../src/java.lang JAVA2TEX = $(PROGNAME) --doc -s java -f latexcolor $(STD_STYLE) --title="formatted with source-highlight" CPP2TEX = $(PROGNAME) --doc -s cpp -f latexcolor $(STD_STYLE) JAVA2TEXINFO = $(PROGNAME) -s java -f texinfo --style-file $(top_srcdir)/src/texinfo.style CPP2TEXINFO_WREFS = $(PROGNAME) -s cpp -f texinfo --style-file $(top_srcdir)/src/texinfo.style --gen-references=postline --line-number # this refers to an "absolute" path (../doc/) without using the automake # variables. However this way the generated files will always be the # same so tests won't fail. You may have some problems if you want to # view the generated file, test_css.html, and you are building in a # different directory. However this is not the spirit of the test :-) # the important thing is that the generated file is always the same. JAVA2HTMLCSS = $(PROGNAME) -s java -f html --css ../doc/mono.css --lang-def=$(srcdir)/../src/java.lang JAVA2HTMLCSSNODOC = $(PROGNAME) -s java -f html --css ../doc/mono.css --no-doc --lang-def=$(srcdir)/../src/java.lang CPP2HTML = $(PROGNAME) -s cpp $(STD_STYLE_HTML) --lang-def=$(srcdir)/../src/cpp.lang C2HTML = $(PROGNAME) -s c $(STD_STYLE_HTML) --lang-def=$(srcdir)/../src/c.lang CSHARP2HTML = $(PROGNAME) -s csharp $(STD_STYLE_HTML) --lang-def=$(srcdir)/../src/csharp.lang PROLOG2HTML = $(PROGNAME) -s prolog $(STD_STYLE_HTML) --lang-def=$(srcdir)/../src/prolog.lang PERL2HTML = $(PROGNAME) -s perl $(STD_STYLE_HTML) --lang-def=$(srcdir)/../src/perl.lang PHP2HTML = $(PROGNAME) -s php3 $(STD_STYLE_HTML) --lang-def=$(srcdir)/../src/php.lang PYTHON2HTML = $(PROGNAME) -s python $(STD_STYLE_HTML) --lang-def=$(srcdir)/../src/python.lang FLEX2HTML = $(PROGNAME) -s flex $(STD_STYLE_HTML) --lang-def=$(srcdir)/../src/flex.lang BISON2HTML = $(PROGNAME) -s bison $(STD_STYLE_HTML) --lang-def=$(srcdir)/../src/bison.lang CHANGELOG2HTML = $(PROGNAME) -s changelog $(STD_STYLE_HTML) --lang-def=$(srcdir)/../src/changelog.lang CHANGELOG2HTMLCSS = $(PROGNAME) -s changelog -f html --css ./changelog.css --title="ChangeLog with css" --lang-def=$(srcdir)/../src/changelog.lang RUBY2HTML = $(PROGNAME) -s ruby $(STD_STYLE_HTML) --lang-def=$(srcdir)/../src/ruby.lang LUA2HTML = $(PROGNAME) -s lua $(STD_STYLE_HTML) --lang-def=$(srcdir)/../src/lua.lang CAML2HTML = $(PROGNAME) -s caml $(STD_STYLE_HTML) --lang-def=$(srcdir)/../src/caml.lang SML2HTML = $(PROGNAME) -s sml $(STD_STYLE_HTML) --lang-def=$(srcdir)/../src/sml.lang LOG2HTML = $(PROGNAME) -s log -f html --style-file=$(srcdir)/syslog.style --lang-def=$(srcdir)/../src/log.lang LATEX2HTML = $(PROGNAME) -s latex $(STD_STYLE_HTML) LOGTALK2HTML = $(PROGNAME) -s logtalk $(STD_STYLE_HTML) DIFF2HTML = $(PROGNAME) -s diff $(STD_STYLE_HTML) LANG2HTML = $(PROGNAME) -s langdef $(STD_STYLE_HTML) STYLE2HTML = $(PROGNAME) -s style $(STD_STYLE_HTML) PROPERTIES2HTML = $(PROGNAME) $(STD_STYLE_HTML) DESKTOP2HTML = $(PROGNAME) $(STD_STYLE_HTML) LSM2HTML = $(PROGNAME) $(STD_STYLE_HTML) HAXE2HTML = $(PROGNAME) $(STD_STYLE_HTML) FORTRAN2HTML = $(PROGNAME) $(STD_STYLE_HTML) SPEC2HTML = $(PROGNAME) $(STD_STYLE_HTML) TXT2HTML = $(PROGNAME) -s style $(STD_STYLE_HTML) --lang-def=default.lang FAILSAFE = $(PROGNAME) --failsafe INFER = $(PROGNAME) --infer-lang # language inference is performed implicitly if everything else failed INFERIMPLICIT = $(PROGNAME) SIMPLE = $(PROGEXE) --gen-version --outlang-def=$(srcdir)/simple.outlang --lang-def=$(srcdir)/simple.lang $(STD_STYLE) --style-defaults=$(srcdir)/../src/style.defaults # test with a defaults file TESTWDEFAULTS = $(PROGNAME) --lang-def=$(srcdir)/lang4defaults.lang $(STD_STYLE) --style-defaults=$(srcdir)/test.defaults # test without a defaults file TESTWODEFAULTS = $(PROGNAME) --lang-def=$(srcdir)/lang4defaults.lang $(STD_STYLE) TESTISOLATE = $(PROGNAME) --lang-def=$(srcdir)/test_isolate.lang TESTBACKREF = $(PROGNAME) --lang-def=$(srcdir)/test_backref.lang # for testing named groups NAMEDGROUPS = $(PROGEXE) --gen-version --lang-def=$(srcdir)/namedgroups.lang $(STD_STYLE) $(DATADIROPTION) NAMEDGROUPS_STATE = $(PROGEXE) --gen-version --lang-def=$(srcdir)/namedgroups_state.lang $(STD_STYLE) $(DATADIROPTION) DEBUGLANG = $(PROGNAME) -s java $(STD_STYLE_HTML) --debug-lang=dump WRONGFILES = wrong_exp.lang wrong_var.lang wrong_trans.outlang wrong_syntax_simple.lang wrong_syntax.lang wrong_syntax_include.lang wrong_namedgroups.lang wrong_namedgroups_subexps.lang wrong_namedgroups_subexps2.lang wrong_backref.lang wrong_backref2.lang wrong_dyn_backref.lang wrong_dyn_backref2.lang wrong_include.lang wrong_outlang_include.outlang WRONGFILESOUT = wrong_exp.err wrong_var.err wrong_trans.err missing_langmap.err missing_extension.err wrong_syntax_simple.err wrong_syntax.err wrong_syntax_include.err wrong_namedgroups.err wrong_namedgroups_subexps.err wrong_namedgroups_subexps2.err wrong_backref.err wrong_backref2.err wrong_dyn_backref.err wrong_dyn_backref2.err wrong_include.err wrong_outlang_include.err WRONGSTYLES = wrong_dircolor.style wrong_already_defined.style wrong_already_defined_css.css WRONGSTYLESOUT = wrong_dircolor.err wrong_already_defined.err wrong_already_defined_css.err WRONGCMDLINEPARAMS = wrong_line_range.err wrong_regex_range.err \ wrong_syntax_mode.err # missing_langmap2.err OUTPUTWREFS=test_ref.html test_refs.h.html test_refs.cpp.html test_ref.tex test_ref_post.tex test_ref.texinfo test_ref.docbook test_ref.xhtml TAGFILES=test_ref.tags test_ref_multi.tags EXTRA_DIST = test.java test.java.html test.java.doc.html \ test.js test.js.html test.h test.h.html test_c.c test_c.c.html \ test_no_line_at_the_end.c test_no_line_at_the_end.c.html \ test_line_at_the_end.c test_line_at_the_end.c.html \ test_no_line_at_the_end.java test_no_line_at_the_end.java.html \ test_comments.cc test_comments.cc.html test_comments.java \ test_comments.java.html test_template.cc test_template.cc.html \ test.pl test.pl.html header.html footer.html test_header.html \ test_java_lines.html test_cpp_lines.html test_pl_lines.html \ test.pm test_comments.pm test.pm.html test_comments.pm.html \ test_perl_lines.html \ test.php3 test.php3.html test_php3_lines.html \ test_with_html.php.html test_with_html.php \ test.py test.py.html test_python_lines.html \ test_comments.py test_comments.py.html test_py_comments_lines.html \ test_xhtml.html test_xhtml_notfixed.html test_xhtml_doc.html \ test_xhtml_css.html test_xhtml_css_doc.html \ test_css.html test_css_nodoc.html test_notfixed.html \ test.chlog test.chlog.html test.chlog_css.html \ test.l test.l.html \ test.y test.y.html \ test.rb test_comments.rb test.rb.html test_comments.rb.html \ test.java.txt \ test.java.tex test.java.tex.html \ test.java.fodt test.java.doc.fodt \ test.java.mediawiki \ test.java.texinfo \ test.lua test.lua.html \ test.ml test.ml.html \ test.sml test.sml.html \ test.log test.log.html \ access.log access.log.html \ auth.log auth.log.html \ error.log error.log.html \ syslog.log syslog.log.html \ test.pas test.pas.html \ test.htm test.htm.html \ test_with_embed.htm test_with_embed.htm.html \ test_html5.htm test_html5.htm.html \ test2.htm test2.htm.html \ test.diff test.diff.html \ test2.diff test2.diff.html \ test3.diff test3.diff.html \ test.simple test.simple.html \ test.unknown test.unknown.html \ syslog.style syslog.style.html \ test.tex test.tex.html \ test.lgt test.lgt.html \ $(OUTPUTWREFS) \ test_refs.h test_refs.cpp \ changelog.css \ simple.lang simple.outlang \ test_isolate.lang \ test.isolate test.isolate.html \ test_backref.lang \ test.backref test.backref.html \ test2.backref test2.backref.html \ log.lang.html c.lang.html \ default.style.html \ lang.map \ debug.debug debug.java debug.java.html \ test_extreme_comment.cpp test_extreme_comment2.cpp test_extreme_comment3.cpp \ test.cs test.cs.html \ test.xml test.xml.html \ test.sh test.sh.html \ test2.sh test2.sh.html \ test.url test.url.html \ test.txt test.txt.html \ test2.pl test2.pl.html \ test.tcl test.tcl.html \ test.sql test.sql.html \ test.bib test.bib.html \ test.makefile test.makefile.html \ test.css test.css.html \ test.ps test.ps.html \ $(WRONGFILES) \ $(WRONGFILESOUT) \ $(WRONGSTYLES) $(WRONGSTYLESOUT) \ $(WRONGCMDLINEPARAMS) \ valgrind_tests.sh.in valgrind_suppressions.sh.in \ valgrind_test.sh.in suppressions.supp \ erasedir.sed erasedir2.sed erasedir3.sed \ erasedir_inputlang.sed \ namedgroups.lang namedgroups_state.lang \ test.ngroups test.ngroups.html \ test_state.ngroups test_state.ngroups.html \ c_comment.show namedgroups_state.show \ cpp.langelems \ lang.list outlang.list \ test.h.docbook \ test.sl test.sl.html \ lang4defaults.lang test.defaults test.wdefault test.wodefault \ test.wdefault.html test.wodefault.html \ test.properties test.properties.html \ test.desktop test.desktop.html \ test.lsm test.lsm.html \ test.hx test.hx.html \ test.fortran test.fortran.html test.fixed-fortran.html \ test.spec test.spec.html \ test.ldap test.ldap.html \ test.m4 test.m4.html \ test.glsl test.glsl.html \ test.xorg test.xorg.html \ test.conf test.conf.html \ test.scala test.scala.html \ test.adb test.adb.html \ test.pc test.pc.html \ test_string_stop.java test_string_stop.java.html \ test_java_stop.java test_java_stop.java.html \ test_string_stop.lang \ test_vardecl.java test_vardecl.java.html \ test_vardecl.cc test_vardecl.cc.html \ test_newlines.lang test_nonewlines.lang \ test_linerange1.html test_linerange2.html \ test_linerange_sep.html \ test_regexrange1.html test_regexrange2.html \ test_regexrange3.html test_regexrange4.html \ test_nobgcolor.cpp test_nobgcolor.html \ test_tabs.java.html \ test.texinfo test.texinfo.html \ test.hs test.hs.html \ test.lhs test.lhs.html \ test.ecore test.ecore.html \ test.MF test.MF.html \ test.asm test.asm.html \ test.scpt test.scpt.html \ test.vbs test.vbs.html \ test.awk test.awk.html \ test.bat test.bat.html \ test.clipper test.clipper.html \ test.cobol test.cobol.html \ test.d test.d.html \ test.errors test.errors.html \ test.erl test.erl.html \ test.proto test.proto.html \ test.vala test.vala.html \ test.lisp test.lisp.html \ test.scm test.scm.html \ test.po test.po.html \ test.opa test.opa.html \ test.javalog test.javalog.html \ test.upc test.upc.html \ test.tml test.tml.html LINERANGE1EXE=$(JAVA2HTML) --line-range="12-18","29-34" --line-number LINERANGE2EXE=$(JAVA2HTML) --line-range="12-18","29-34" --line-number --range-context=3 LINERANGESEPEXE=$(JAVA2HTML) --line-range="12-18","29-34" --line-number --range-context=3 --range-separator="<...>" REGEXRANGE1EXE=$(JAVA2HTML) --regex-range="/// [[:alpha:]]+" --line-number REGEXRANGE2EXE=$(JAVA2HTML) --regex-range="/\\* main \\*/" --line-number REGEXRANGE3EXE=$(JAVA2HTML) --regex-range="/\\* main \\*/","/\\* mymethod \\*/" --line-number REGEXRANGE4EXE=$(JAVA2HTML) --regex-range="/\\* [[:alpha:]]+ \\*/" --line-number WRONGLINERANGEEXE=$(PROGEXE) --line-range="a-b" --data-dir=$(top_srcdir)/src < $(srcdir)/test.java > /dev/null WRONGREGEXRANGEEXE=$(PROGEXE) --regex-range="ab","foobar","{wrong" --data-dir=$(top_srcdir)/src < $(srcdir)/test.java > /dev/null WRONGSYNTAXMODEEXE=$(PROGEXE) --data-dir=$(top_srcdir)/src -o /dev/null $(srcdir)/test.java PROG_NOLANGDEF=$(PROGEXE) --outlang-def=$(srcdir)/simple.outlang $(STD_STYLE) --data-dir=$(srcdir)/ $(STD_STYLE_DEFAULTS) PROG_NOOUTLANGDEF=$(PROGEXE) --lang-def=$(srcdir)/simple.lang $(STD_STYLE) $(STD_STYLE_DEFAULTS) --quiet CPP2HTML_WHEADERS = $(CPP2HTML) --header=$(srcdir)/header.html --footer=$(srcdir)/footer.html CTAGS_COMMAND=--ctags="$(CTAGS) --excmd=number --tag-relative=yes -o test_ref.tags" --ctags-file="test_ref.tags" # for more than one file: test.h test.cpp CTAGS_COMMAND_MULTI=--ctags="$(CTAGS) --excmd=number --tag-relative=yes -o test_ref_multi.tags" --ctags-file="test_ref_multi.tags" CTAGS_COMMAND_TEST=--ctags="$(CTAGS) --excmd=number --tag-relative=yes -o my_test_ref_tmp.tags" --ctags-file="my_test_ref_tmp" CPP2HTML_WREFS = $(CPP2HTML) --title="Contains references to tags" --gen-references=inline CPP2LATEX_WREFS = $(CPP2TEX) --title="Contains references to tags" --gen-references=postline --line-number CPP2LATEX_WREFSPOST = $(CPP2TEX) --title="Contains references to tags" --gen-references=postdoc --line-number CPP2DOCBOOK_WREFS = $(PROGNAME_DOCBOOK) --gen-references=postline --line-number CPP2XHTML_WREFS = $(PROGNAME) -s cpp -f xhtml --css ../src/default.css --gen-references=inline --line-number-ref --title="XHTML with refs" CTAGS_CMD=$(CTAGS) --excmd=number --tag-relative=yes # these are files processed using a css as the style file .java.css.java.html: $(PROGNAME_CSSSTYLE) -i $< -o $@ # these are files processed using a css as the style file .java.css_doc.java.html: $(PROGNAME_CSSSTYLE) -i $< -o $@ --title="This is the title" # these are files processed using a css as the style file and a non fixed html .java.nf_css.java.html: $(PROGNAME_CSSSTYLE) -i $< -o $@ --outlang-def=$(srcdir)/../src/html_notfixed.outlang # these are files processed using a css as the style file .java.css_xhtml.java.html: $(PROGNAME_CSSSTYLE) -i $< -o $@ -f xhtml if MAINTAINER_MODE check: check-produced-output \ check_wrong check_missing \ check_wrong_lineranges \ check_wrong_regexranges \ check_wrong_syntaxmode else check: check-produced-output endif check-produced-output: \ check_java2html check_javascript \ check_java2xhtml check_cpp2html check_csharp2html \ check_prolog2html check_logtalk2html \ check_perl2html \ check_php32html check_python2html check_changelog check_flex check_bison \ check_ruby check_lua check_ml check_sml check_log check_pascal check_html \ check_xml \ check_sh \ check_url \ check_latex \ check_diff \ check_simple \ check_isolate \ check_backref \ check_lang \ check_langelems \ check_list \ check_txt \ check_sql \ check_bib \ check_infer \ check_debug \ check_ref \ check_show \ check_makefile \ check_asm \ check_css \ check_ps \ check_docbook \ check_namedgroups \ check_slang \ check_defaults \ check_properties \ check_desktop \ check_lsm \ check_spec \ check_haxe \ check_fortran \ check_ldap \ check_m4 \ check_glsl \ check_xorg \ check_conf \ check_scala \ check_ada \ check_pkgconfig \ check_texinfo \ check_haskell \ check_manifest \ check_applescript \ check_vbscript \ check_awk \ check_bat \ check_clipper \ check_cobol \ check_d \ check_errors \ check_erlang \ check_proto \ check_vala \ check_lisp \ check_scheme \ check_po \ check_opa \ check_javalog \ check_upc \ check_tml \ check-output-dir \ check_stop \ check_vardecl \ check_newlines \ check_lineranges \ check_regexranges \ check_nobgcolor \ check_tabs \ check_failsafe remove_css_html_files: rm -f *.css.java.html *.nf_css.java.html remove_css_xhtml_files: rm -f *.css_xhtml.java.html remove_css_doc_files: rm -f *.css_doc.java.html check_java2html: remove_css_html_files remove_css_doc_files test.css.java.html test.nf_css.java.html test.css_doc.java.html $(JAVA2HTML) -i $(srcdir)/test.java -o test.java.out.html $(JAVA2HTMLDOC) -i $(srcdir)/test.java -o test.java.doc.out.html $(JAVA2HTMLNOTFIXED) < $(srcdir)/test.java > test_notfixed.out.html tr -d '\r' < test_notfixed.out.html > temp.output && cp -f temp.output test_notfixed.out.html $(JAVA2HTMLCSS) < $(srcdir)/test.java > test_css.out.html tr -d '\r' < test_css.out.html > temp.output && cp -f temp.output test_css.out.html $(JAVA2HTMLCSSNODOC) < $(srcdir)/test.java > test_css_nodoc.out.html tr -d '\r' < test_css_nodoc.out.html > temp.output && cp -f temp.output test_css_nodoc.out.html $(JAVA2HTML) -i $(srcdir)/test_comments.java -o test_comments.java.out.html $(JAVA2HTML) -n --line-number-ref -i $(srcdir)/test.java -o test_java_lines.out.html $(JAVA2HTML) -n -i $(srcdir)/test_no_line_at_the_end.java -o test_no_line_at_the_end.java.out.html $(JAVA2ESC) -n -i $(srcdir)/test.java -o test.java.out.txt $(JAVA2TEX) --line-number=" " -i $(srcdir)/test.java -o test.java.out.tex $(JAVA2TEXINFO) -n -i $(srcdir)/test.java -o test.java.out.texinfo $(JAVA2ODF) --line-number=" " -i $(srcdir)/test.java -o test.java.out.fodt $(JAVA2ODFDOC) --line-number=" " -i $(srcdir)/test.java -o test.java.out.doc.fodt $(JAVA2MEDIAWIKI) -i $(srcdir)/test.java -o test.java.out.mediawiki @echo expect no output from diff $(DIFF) $(srcdir)/test.java.html test.java.out.html $(DIFF) $(srcdir)/test.java.doc.html test.java.doc.out.html $(DIFF) $(srcdir)/test_notfixed.html test_notfixed.out.html $(DIFF) $(srcdir)/test_css.html test_css.out.html $(DIFF) $(srcdir)/test_css_nodoc.html test_css_nodoc.out.html $(DIFF) $(srcdir)/test_comments.java.html test_comments.java.out.html $(DIFF) $(srcdir)/test_java_lines.html test_java_lines.out.html $(DIFF) $(srcdir)/test_no_line_at_the_end.java.html test_no_line_at_the_end.java.out.html $(DIFF) $(srcdir)/test.java.txt test.java.out.txt $(DIFF) $(srcdir)/test.java.tex test.java.out.tex $(DIFF) $(srcdir)/test.java.texinfo test.java.out.texinfo $(DIFF) $(srcdir)/test.java.fodt test.java.out.fodt $(DIFF) $(srcdir)/test.java.doc.fodt test.java.out.doc.fodt $(DIFF) $(srcdir)/test.java.mediawiki test.java.out.mediawiki $(DIFF) $(srcdir)/test.java.html test.css.java.html $(DIFF) $(srcdir)/test_notfixed.html test.nf_css.java.html $(DIFF) $(srcdir)/test.java.doc.html test.css_doc.java.html check_javascript: $(JS2HTML) < $(srcdir)/test.js -o test.js.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.js.html test.js.out.html check_java2xhtml: remove_css_xhtml_files test.css_xhtml.java.html $(JAVA2XHTML) < $(srcdir)/test.java -o test_xhtml.out.html $(JAVA2XHTMLNOTFIXED) < $(srcdir)/test.java -o test_xhtml_notfixed.out.html $(JAVA2XHTMLDOC) < $(srcdir)/test.java -o test_xhtml_doc.out.html sed -itesttmp -f $(srcdir)/erasedir_inputlang.sed test_xhtml_doc.out.html $(JAVA2XHTMLCSS) < $(srcdir)/test.java -o test_xhtml_css.out.html $(JAVA2XHTMLCSSDOC) < $(srcdir)/test.java -o test_xhtml_css_doc.out.html sed -itesttmp -f $(srcdir)/erasedir_inputlang.sed test_xhtml_css_doc.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test_xhtml.html test_xhtml.out.html $(DIFF) $(srcdir)/test_xhtml_notfixed.html test_xhtml_notfixed.out.html $(DIFF) $(srcdir)/test_xhtml_doc.html test_xhtml_doc.out.html $(DIFF) $(srcdir)/test_xhtml_css.html test_xhtml_css.out.html $(DIFF) $(srcdir)/test_xhtml_css_doc.html test_xhtml_css_doc.out.html $(DIFF) $(srcdir)/test_xhtml.html test.css_xhtml.java.html check_cpp2html: $(CPP2HTML) -i $(srcdir)/test.h -o test.h.out.html $(CPP2HTML) -i $(srcdir)/test_comments.cc -o test_comments.cc.out.html $(CPP2HTML) -i $(srcdir)/test_template.cc -o test_template.cc.out.html $(CPP2HTML_WHEADERS) -i $(srcdir)/test.h -o test_header.out.html $(CPP2HTML) -n -i $(srcdir)/test.h -o test_cpp_lines.out.html $(CPP2HTML) -n -i $(srcdir)/test_no_line_at_the_end.c -o test_no_line_at_the_end.c.out.html $(CPP2HTML) -n -i $(srcdir)/test_line_at_the_end.c -o test_line_at_the_end.c.out.html $(C2HTML) -i $(srcdir)/test_c.c -o test_c.c.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.h.html test.h.out.html $(DIFF) $(srcdir)/test_comments.cc.html test_comments.cc.out.html $(DIFF) $(srcdir)/test_template.cc.html test_template.cc.out.html $(DIFF) $(srcdir)/test_header.html test_header.out.html $(DIFF) $(srcdir)/test_cpp_lines.html test_cpp_lines.out.html $(DIFF) $(srcdir)/test_no_line_at_the_end.c.html test_no_line_at_the_end.c.out.html $(DIFF) $(srcdir)/test_line_at_the_end.c.html test_line_at_the_end.c.out.html $(DIFF) $(srcdir)/test_c.c.html test_c.c.out.html check_csharp2html: $(CSHARP2HTML) -i $(srcdir)/test.cs -o test.cs.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.cs.html test.cs.out.html check_prolog2html: $(PROLOG2HTML) < $(srcdir)/test.pl -o test.pl.out.html $(PROLOG2HTML) -n -i $(srcdir)/test.pl -o test_pl_lines.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.pl.html test.pl.out.html $(DIFF) $(srcdir)/test_pl_lines.html test_pl_lines.out.html check_logtalk2html: $(LOGTALK2HTML) < $(srcdir)/test.lgt -o test.lgt.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.lgt.html test.lgt.out.html check_perl2html: $(PERL2HTML) < $(srcdir)/test.pm -o test.pm.out.html $(PERL2HTML) < $(srcdir)/test_comments.pm -o test_comments.pm.out.html $(PERL2HTML) -n -i $(srcdir)/test.pm -o test_perl_lines.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.pm.html test.pm.out.html $(DIFF) $(srcdir)/test_comments.pm.html test_comments.pm.out.html $(DIFF) $(srcdir)/test_perl_lines.html test_perl_lines.out.html check_php32html: $(PHP2HTML) < $(srcdir)/test.php3 -o test.php3.out.html $(PHP2HTML) < $(srcdir)/test_with_html.php -o test_with_html.php.out.html $(PHP2HTML) -n -i $(srcdir)/test.php3 -o test_php3_lines.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.php3.html test.php3.out.html $(DIFF) $(srcdir)/test_with_html.php.html test_with_html.php.out.html $(DIFF) $(srcdir)/test_php3_lines.html test_php3_lines.out.html check_python2html: $(PYTHON2HTML) < $(srcdir)/test.py -o test.py.out.html $(PYTHON2HTML) < $(srcdir)/test_comments.py -o test_comments.py.out.html $(PYTHON2HTML) -n -i $(srcdir)/test.py -o test_python_lines.out.html $(PYTHON2HTML) -n -i $(srcdir)/test_comments.py -o test_py_comments_lines.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.py.html test.py.out.html $(DIFF) $(srcdir)/test_comments.py.html test_comments.py.out.html $(DIFF) $(srcdir)/test_python_lines.html test_python_lines.out.html $(DIFF) $(srcdir)/test_py_comments_lines.html test_py_comments_lines.out.html check_changelog: $(CHANGELOG2HTML) < $(srcdir)/test.chlog -o test.chlog.out.html $(CHANGELOG2HTMLCSS) -i $(srcdir)/test.chlog -o test.chlog_css.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.chlog.html test.chlog.out.html $(DIFF) $(srcdir)/test.chlog_css.html test.chlog_css.out.html check_flex: $(FLEX2HTML) < $(srcdir)/test.l -o test.l.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.l.html test.l.out.html check_bison: $(BISON2HTML) < $(srcdir)/test.y -o test.y.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.y.html test.y.out.html check_ruby: $(RUBY2HTML) < $(srcdir)/test.rb -o test.rb.out.html $(RUBY2HTML) < $(srcdir)/test_comments.rb -o test_comments.rb.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.rb.html test.rb.out.html $(DIFF) $(srcdir)/test_comments.rb.html test_comments.rb.out.html check_lua: $(LUA2HTML) < $(srcdir)/test.lua -o test.lua.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.lua.html test.lua.out.html check_ml: $(CAML2HTML) < $(srcdir)/test.ml -o test.ml.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.ml.html test.ml.out.html check_sml: $(SML2HTML) < $(srcdir)/test.sml -o test.sml.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.sml.html test.sml.out.html check_log: $(LOG2HTML) < $(srcdir)/test.log -o test.log.out.html $(LOG2HTML) < $(srcdir)/access.log -o access.log.out.html $(LOG2HTML) < $(srcdir)/auth.log -o auth.log.out.html $(LOG2HTML) < $(srcdir)/error.log -o error.log.out.html $(LOG2HTML) < $(srcdir)/syslog.log -o syslog.log.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.log.html test.log.out.html $(DIFF) $(srcdir)/access.log.html access.log.out.html $(DIFF) $(srcdir)/auth.log.html auth.log.out.html $(DIFF) $(srcdir)/error.log.html error.log.out.html $(DIFF) $(srcdir)/syslog.log.html syslog.log.out.html check_diff: $(DIFF2HTML) < $(srcdir)/test.diff -o test.diff.out.html $(DIFF2HTML) < $(srcdir)/test2.diff -o test2.diff.out.html $(DIFF2HTML) < $(srcdir)/test3.diff -o test3.diff.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.diff.html test.diff.out.html $(DIFF) $(srcdir)/test2.diff.html test2.diff.out.html $(DIFF) $(srcdir)/test3.diff.html test3.diff.out.html check_pascal: $(PROGNAME) -i $(srcdir)/test.pas -o test.pas.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.pas.html test.pas.out.html check_html: $(PROGNAME) -i $(srcdir)/test.htm --title="html output formatted in html" -o test.htm.out.html $(PROGNAME) -i $(srcdir)/test2.htm --title="html output formatted in html" -o test2.htm.out.html $(PROGNAME) -i $(srcdir)/test_html5.htm --title="html output formatted in html" -o test_html5.htm.out.html $(PROGNAME) -i $(srcdir)/test_with_embed.htm --title="html output formatted in html" -o test_with_embed.htm.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.htm.html test.htm.out.html $(DIFF) $(srcdir)/test2.htm.html test2.htm.out.html $(DIFF) $(srcdir)/test_html5.htm.html test_html5.htm.out.html $(DIFF) $(srcdir)/test_with_embed.htm.html test_with_embed.htm.out.html check_xml: $(PROGNAME) -i $(srcdir)/test.xml --title="xml formatted in html" -o test.xml.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.xml.html test.xml.out.html check_sh: $(PROGNAME) -i $(srcdir)/test.sh -o test.sh.out.html $(PROGNAME) -i $(srcdir)/test2.sh -o test2.sh.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.sh.html test.sh.out.html $(DIFF) $(srcdir)/test2.sh.html test2.sh.out.html check_slang: $(PROGNAME) -i $(srcdir)/test.sl -o test.sl.out.html --title="S-LANG test" @echo expect no output from diff $(DIFF) $(srcdir)/test.sl.html test.sl.out.html check_url: $(URL2HTML) -i $(srcdir)/test.url -o test.url.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.url.html test.url.out.html check_properties: $(PROPERTIES2HTML) -i $(srcdir)/test.properties -o test.properties.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.properties.html test.properties.out.html check_desktop: $(DESKTOP2HTML) -i $(srcdir)/test.desktop -o test.desktop.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.desktop.html test.desktop.out.html check_lsm: $(LSM2HTML) -i $(srcdir)/test.lsm -o test.lsm.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.lsm.html test.lsm.out.html check_haxe: $(HAXE2HTML) -i $(srcdir)/test.hx -o test.hx.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.hx.html test.hx.out.html check_ldap: $(PROGNAME_STD) -i $(srcdir)/test.ldap -o test.ldap.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.ldap.html test.ldap.out.html check_m4: $(PROGNAME_STD) -i $(srcdir)/test.m4 -o test.m4.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.m4.html test.m4.out.html check_glsl: $(PROGNAME_STD) -i $(srcdir)/test.glsl -o test.glsl.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.glsl.html test.glsl.out.html check_xorg: $(PROGNAME_STD) -i $(srcdir)/test.xorg -s xorg -o test.xorg.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.xorg.html test.xorg.out.html check_conf: $(PROGNAME_STD) -i $(srcdir)/test.conf -s conf -o test.conf.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.conf.html test.conf.out.html check_scala: $(PROGNAME_STD) -i $(srcdir)/test.scala -s scala -o test.scala.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.scala.html test.scala.out.html check_ada: $(PROGNAME_STD) -i $(srcdir)/test.adb -s ada -o test.adb.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.adb.html test.adb.out.html check_pkgconfig: $(PROGNAME_STD) -i $(srcdir)/test.pc -s pc -o test.pc.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.pc.html test.pc.out.html check_texinfo: $(PROGNAME_STD) -i $(srcdir)/test.texinfo -o test.texinfo.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.texinfo.html test.texinfo.out.html check_haskell: $(PROGNAME_STD) -i $(srcdir)/test.hs -o test.hs.out.html $(PROGNAME) $(STD_STYLE) -f xhtml -i $(srcdir)/test.lhs -o test.lhs.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.hs.html test.hs.out.html $(DIFF) $(srcdir)/test.lhs.html test.lhs.out.html check_manifest: $(PROGNAME_STD) -i $(srcdir)/test.MF -o test.MF.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.MF.html test.MF.out.html check_asm: $(PROGNAME_STD) -i $(srcdir)/test.asm -o test.asm.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.asm.html test.asm.out.html check_applescript: $(PROGNAME_STD) -i $(srcdir)/test.scpt -o test.scpt.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.scpt.html test.scpt.out.html check_vbscript: $(PROGNAME_STD) -i $(srcdir)/test.vbs -o test.vbs.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.vbs.html test.vbs.out.html check_awk: $(PROGNAME_STD) -i $(srcdir)/test.awk -o test.awk.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.awk.html test.awk.out.html check_bat: $(PROGNAME_STD) -i $(srcdir)/test.bat -o test.bat.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.bat.html test.bat.out.html check_clipper: $(PROGNAME_STD) -i $(srcdir)/test.clipper -o test.clipper.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.clipper.html test.clipper.out.html check_cobol: $(PROGNAME_STD) -i $(srcdir)/test.cobol -o test.cobol.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.cobol.html test.cobol.out.html check_d: $(PROGNAME_STD) -i $(srcdir)/test.d -o test.d.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.d.html test.d.out.html check_errors: $(PROGNAME_STD) -i $(srcdir)/test.errors -o test.errors.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.errors.html test.errors.out.html check_erlang: $(PROGNAME_STD) -i $(srcdir)/test.erl -o test.erl.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.erl.html test.erl.out.html check_fortran: $(FORTRAN2HTML) -i $(srcdir)/test.fortran -o test.fortran.out.html $(FORTRAN2HTML) -i $(srcdir)/test.fortran -s fixed-fortran -o test.fixed-fortran.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.fortran.html test.fortran.out.html $(DIFF) $(srcdir)/test.fixed-fortran.html test.fixed-fortran.out.html check_proto: $(PROGNAME_STD) -i $(srcdir)/test.proto -o test.proto.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.proto.html test.proto.out.html check_vala: $(PROGNAME_STD) -i $(srcdir)/test.vala -o test.vala.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.vala.html test.vala.out.html check_lisp: $(PROGNAME_STD) -i $(srcdir)/test.lisp -o test.lisp.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.lisp.html test.lisp.out.html check_scheme: $(PROGNAME_STD) -i $(srcdir)/test.scm -o test.scm.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.scm.html test.scm.out.html check_po: $(PROGNAME_STD) -i $(srcdir)/test.po -o test.po.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.po.html test.po.out.html check_opa: $(PROGNAME_STD) -i $(srcdir)/test.opa -o test.opa.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.opa.html test.opa.out.html check_javalog: $(PROGNAME) --style-file $(top_srcdir)/src/javalog.style -i $(srcdir)/test.javalog -o test.javalog.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.javalog.html test.javalog.out.html check_upc: $(PROGNAME_STD) -i $(srcdir)/test.upc -o test.upc.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.upc.html test.upc.out.html check_tml: $(PROGNAME_STD) -i $(srcdir)/test.tml -o test.tml.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.tml.html test.tml.out.html check_spec: $(SPEC2HTML) -i $(srcdir)/test.spec -o test.spec.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.spec.html test.spec.out.html check_txt: $(TXT2HTML) -i $(srcdir)/test.txt -o test.txt.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.txt.html test.txt.out.html myscript: test.sh cp $(srcdir)/test.sh $@ myimplicitxml.foo: test.xml cp $(srcdir)/test.xml $@ myimplicitphp.foo: test.php3 cp $(srcdir)/test.php3 $@ check_infer: myscript myimplicitxml.foo myimplicitphp.foo rm -f myscript.html rm -f myimplicitxml.foo.html $(INFER) -i $(srcdir)/test2.pl -o test2.pl.out.html $(INFER) -i $(srcdir)/test.tcl -o test.tcl.out.html $(INFERIMPLICIT) -i myscript -o myscript.html $(INFERIMPLICIT) -i $(srcdir)/test.ecore -o test.ecore.out.html $(INFERIMPLICIT) --title="xml formatted in html" -i myimplicitxml.foo -o myimplicitxml.foo.html $(INFERIMPLICIT) -i myimplicitphp.foo -o myimplicitphp.foo.html @echo expect no output from diff $(DIFF) $(srcdir)/test2.pl.html test2.pl.out.html $(DIFF) $(srcdir)/test.tcl.html test.tcl.out.html $(DIFF) $(srcdir)/test.sh.html myscript.html $(DIFF) $(srcdir)/test.ecore.html test.ecore.out.html $(DIFF) $(srcdir)/test.xml.html myimplicitxml.foo.html $(DIFF) $(srcdir)/test.php3.html myimplicitphp.foo.html check_latex: $(PROGNAME) -i $(srcdir)/test.tex -o test.tex.out.html $(PROGNAME) -i $(srcdir)/test.java.tex -o test.java.tex.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.tex.html test.tex.out.html $(DIFF) $(srcdir)/test.java.tex.html test.java.tex.out.html check_docbook: $(PROGNAME_DOCBOOK) -i $(srcdir)/test.h --line-number -o test.h.out.docbook @echo expect no output from diff $(DIFF) $(srcdir)/test.h.docbook test.h.out.docbook check_sql: $(PROGNAME) -i $(srcdir)/test.sql -o test.sql.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.sql.html test.sql.out.html check_bib: $(PROGNAME) -i $(srcdir)/test.bib -o test.bib.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.bib.html test.bib.out.html check_makefile: $(PROGNAME) -i $(srcdir)/test.makefile -o test.makefile.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.makefile.html test.makefile.out.html check_css: $(PROGNAME) -i $(srcdir)/test.css -o test.css.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.css.html test.css.out.html check_ps: $(PROGNAME) -i $(srcdir)/test.ps -o test.ps.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.ps.html test.ps.out.html check_lang: $(LANG2HTML) -i $(top_srcdir)/src/log.lang -o log.lang.out.html $(LANG2HTML) -i $(top_srcdir)/src/c.lang -o c.lang.out.html $(STYLE2HTML) -i $(top_srcdir)/src/default.style -o default.style.out.html $(STYLE2HTML) -i $(srcdir)/syslog.style -o syslog.style.out.html @echo expect no output from diff $(DIFF) $(srcdir)/log.lang.html log.lang.out.html $(DIFF) $(srcdir)/c.lang.html c.lang.out.html $(DIFF) $(srcdir)/default.style.html default.style.out.html $(DIFF) $(srcdir)/syslog.style.html syslog.style.out.html check_simple: $(SIMPLE) -i $(srcdir)/test.simple -o test.simple.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.simple.html test.simple.out.html check_isolate: $(TESTISOLATE) -i $(srcdir)/test.isolate -o test.isolate.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.isolate.html test.isolate.out.html check_backref: $(TESTBACKREF) -i $(srcdir)/test.backref -o test.backref.out.html $(TESTBACKREF) -i $(srcdir)/test2.backref -o test2.backref.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.backref.html test.backref.out.html $(DIFF) $(srcdir)/test2.backref.html test2.backref.out.html check_namedgroups: $(NAMEDGROUPS) -i $(srcdir)/test.ngroups -o test.ngroups.out.html $(NAMEDGROUPS_STATE) -i $(srcdir)/test_state.ngroups -o test_state.ngroups.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.ngroups.html test.ngroups.out.html $(DIFF) $(srcdir)/test_state.ngroups.html test_state.ngroups.out.html .lang.err_out: $(CHECKLANG) ./$< 2> $@ || true; sed -itesttmp -f $(srcdir)/erasedir.sed $@ && rm -f *testtmp .outlang.err_out: $(CHECKOUTLANG) ./$< 2> $@ || true; sed -itesttmp -f $(srcdir)/erasedir.sed $@ && rm -f *testtmp .style.err_out: $(PROGEXE) --lang-def=$(srcdir)/simple.lang --style-file=./$< --data-dir=$(top_srcdir)/src < $(srcdir)/test.java > /dev/null 2> $@ || true; sed -itesttmp -f $(srcdir)/erasedir.sed $@ && rm -f *testtmp .css.err_out: $(PROGEXE) --lang-def=$(srcdir)/simple.lang --style-css=./$< --data-dir=$(top_srcdir)/src < $(srcdir)/test.java > /dev/null 2> $@ || true; sed -itesttmp -f $(srcdir)/erasedir.sed $@ && rm -f *testtmp check_wrong: rm -f *.err_out $(MAKE) wrong_exp.err_out $(MAKE) wrong_syntax.err_out $(MAKE) wrong_syntax_include.err_out $(MAKE) wrong_var.err_out $(MAKE) wrong_trans.err_out $(MAKE) wrong_dircolor.err_out $(MAKE) wrong_already_defined.err_out $(MAKE) wrong_already_defined_css.err_out $(MAKE) wrong_namedgroups.err_out $(MAKE) wrong_namedgroups_subexps.err_out $(MAKE) wrong_namedgroups_subexps2.err_out $(MAKE) wrong_backref.err_out $(MAKE) wrong_backref2.err_out $(MAKE) wrong_dyn_backref.err_out $(MAKE) wrong_dyn_backref2.err_out $(MAKE) wrong_include.err_out $(MAKE) wrong_outlang_include.err_out @echo expect no output from diff $(DIFF) $(srcdir)/wrong_exp.err wrong_exp.err_out $(DIFF) $(srcdir)/wrong_syntax.err wrong_syntax.err_out $(DIFF) $(srcdir)/wrong_syntax_include.err wrong_syntax_include.err_out $(DIFF) $(srcdir)/wrong_var.err wrong_var.err_out $(DIFF) $(srcdir)/wrong_trans.err wrong_trans.err_out $(DIFF) $(srcdir)/wrong_dircolor.err wrong_dircolor.err_out $(DIFF) $(srcdir)/wrong_already_defined.err wrong_already_defined.err_out $(DIFF) $(srcdir)/wrong_already_defined_css.err wrong_already_defined_css.err_out $(DIFF) $(srcdir)/wrong_namedgroups.err wrong_namedgroups.err_out $(DIFF) $(srcdir)/wrong_namedgroups_subexps.err wrong_namedgroups_subexps.err_out $(DIFF) $(srcdir)/wrong_namedgroups_subexps2.err wrong_namedgroups_subexps2.err_out $(DIFF) $(srcdir)/wrong_backref.err wrong_backref.err_out $(DIFF) $(srcdir)/wrong_backref2.err wrong_backref2.err_out $(DIFF) $(srcdir)/wrong_dyn_backref.err wrong_dyn_backref.err_out $(DIFF) $(srcdir)/wrong_dyn_backref2.err wrong_dyn_backref2.err_out $(DIFF) $(srcdir)/wrong_include.err wrong_include.err_out $(DIFF) $(srcdir)/wrong_outlang_include.err wrong_outlang_include.err_out check_wrong_lineranges: rm -f *.err_out $(WRONGLINERANGEEXE) 2> wrong_line_range.err_out || true @echo expect no output from diff $(DIFF) $(srcdir)/wrong_line_range.err wrong_line_range.err_out check_wrong_regexranges: rm -f *.err_out $(WRONGREGEXRANGEEXE) 2> wrong_regex_range.err_out || true @echo expect no output from diff $(DIFF) $(srcdir)/wrong_regex_range.err wrong_regex_range.err_out check_wrong_syntaxmode: rm -f *.err_out $(WRONGSYNTAXMODEEXE) 2> wrong_syntax_mode.err_out || true @echo expect no output from diff $(DIFF) $(srcdir)/wrong_syntax_mode.err wrong_syntax_mode.err_out check_lineranges: $(LINERANGE1EXE) < $(srcdir)/test.java -o test_linerange1.out.html $(LINERANGE2EXE) < $(srcdir)/test.java -o test_linerange2.out.html $(LINERANGESEPEXE) < $(srcdir)/test.java -o test_linerange_sep.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test_linerange1.html test_linerange1.out.html $(DIFF) $(srcdir)/test_linerange2.html test_linerange2.out.html $(DIFF) $(srcdir)/test_linerange_sep.html test_linerange_sep.out.html check_regexranges: $(REGEXRANGE1EXE) < $(srcdir)/test.java -o test_regexrange1.out.html $(REGEXRANGE2EXE) < $(srcdir)/test.java -o test_regexrange2.out.html $(REGEXRANGE3EXE) < $(srcdir)/test.java -o test_regexrange3.out.html $(REGEXRANGE4EXE) < $(srcdir)/test.java -o test_regexrange4.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test_regexrange1.html test_regexrange1.out.html $(DIFF) $(srcdir)/test_regexrange2.html test_regexrange2.out.html $(DIFF) $(srcdir)/test_regexrange3.html test_regexrange3.out.html $(DIFF) $(srcdir)/test_regexrange4.html test_regexrange4.out.html check_nobgcolor: $(PROGNAME) --style-file=texinfo.style --doc --title="source file" -i $(srcdir)/test_nobgcolor.cpp -o test_nobgcolor.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test_nobgcolor.html test_nobgcolor.out.html check_tabs: $(JAVA2HTML) --tab=4 -i $(srcdir)/test.java -o test_tabs.java.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test_tabs.java.html test_tabs.java.out.html #$(PROG_NOOUTLANGDEF) -i $(srcdir)/test.simple -o test.err_out --data-dir=/tmp 2-o missing_langmap2.err_out || true #sed -r -i -f $(srcdir)/erasedir2.sed missing_langmap2.err_out #diff $(srcdir)/missing_langmap2.err missing_langmap2.err_out check_missing: rm -f *.err_out $(PROG_NOLANGDEF) -i $(srcdir)/test.simple -o test.err_out 2> missing_langmap.err_out || true $(PROG_NOOUTLANGDEF) --outlang-def=$(srcdir)/simple.outlang $(srcdir)/test.simple 2> missing_extension.err_out || true @echo expect no output from diff sed -itesttmp -f $(srcdir)/erasedir2.sed missing_langmap.err_out sed -itesttmp -f $(srcdir)/erasedir2.sed missing_extension.err_out $(DIFF) $(srcdir)/missing_langmap.err missing_langmap.err_out $(DIFF) $(srcdir)/missing_extension.err missing_extension.err_out rm -f *testtmp check_failsafe: $(FAILSAFE) -i $(srcdir)/test.unknown -o test.unknown.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.unknown.html test.unknown.out.html check_debug: rm -f *.out.debug $(DEBUGLANG) -i $(srcdir)/debug.java -o debug.java.out.html > debug.out.debug tr -d '\r' < debug.out.debug > temp.output && cp -f temp.output debug.out.debug @echo expect no output from diff $(DIFF) $(srcdir)/debug.debug debug.out.debug $(DIFF) $(srcdir)/debug.java.html debug.java.out.html check_defaults: $(TESTWDEFAULTS) -i $(srcdir)/test.wdefault -o test.wdefault.out.html $(TESTWODEFAULTS) -i $(srcdir)/test.wodefault -o test.wodefault.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test.wdefault.html test.wdefault.out.html $(DIFF) $(srcdir)/test.wodefault.html test.wodefault.out.html TEMP_TAGFILE=temp_test_refs.tags # disable reference tests if NO_CTAGS check_ref: @echo warning: tests with references are disabled @echo because we could not find a usable ctags program else # sed -i -r 's/([.\/[:alnum:]]+)\/(test\.h\:[[:alnum:]\._]+)/\2/g' test_ref.out.html # eliminate leading paths check_ref: $(CPP2HTML_WREFS) -i $(srcdir)/test.h -o test_ref.out.html $(CTAGS_COMMAND_TMP) sed -itesttmp -e 's/test\_ref\.out\.html/test\_ref\.html/g' test_ref.out.html sed -itesttmp -f $(srcdir)/erasedir3.sed test_ref.out.html # eliminate leading paths rm -f test_refs_tmp.* *testtmp cp -f $(srcdir)/test_refs.h test_refs_tmp.h cp -f $(srcdir)/test_refs.cpp test_refs_tmp.cpp $(CTAGS_CMD) -o $(TEMP_TAGFILE) test_refs_tmp.h test_refs_tmp.cpp $(CPP2HTML_WREFS) --ctags-file=$(TEMP_TAGFILE) --line-number test_refs_tmp.h test_refs_tmp.cpp --verbose sed -itesttmp -e 's/\_tmp\.h/\.h/g' test_refs_tmp.h.html test_refs_tmp.cpp.html sed -itesttmp -e 's/\_tmp\.cpp/\.cpp/g' test_refs_tmp.h.html test_refs_tmp.cpp.html $(CPP2LATEX_WREFS) -i $(srcdir)/test.h -o test_ref.out.tex $(CTAGS_COMMAND_TMP) sed -itesttmp -r 's/([.\/[:alnum:]]+)\/(test\.h\:[[:alnum:]\._]+)/\2/g' test_ref.out.tex # eliminate leading paths $(CPP2LATEX_WREFSPOST) -i $(srcdir)/test.h -o test_ref_post.out.tex $(CTAGS_COMMAND_TMP) sed -itesttmp -f $(srcdir)/erasedir3.sed test_ref_post.out.tex # eliminate leading paths $(CPP2TEXINFO_WREFS) -i $(srcdir)/test.h -o test_ref.out.texinfo $(CTAGS_COMMAND_TMP) sed -itesttmp -f $(srcdir)/erasedir3.sed test_ref.out.texinfo # eliminate leading paths $(CPP2DOCBOOK_WREFS) -i $(srcdir)/test.h -o test_ref.out.docbook $(CTAGS_COMMAND_TMP) $(CPP2XHTML_WREFS) -i $(srcdir)/test.h -o test_ref.out.xhtml $(CTAGS_COMMAND_TMP) sed -itesttmp -e 's/test\_ref\.out\.xhtml/test\_ref\.xhtml/g' test_ref.out.xhtml sed -itesttmp -f $(srcdir)/erasedir3.sed test_ref.out.xhtml # eliminate leading paths @echo expect no output from diff $(DIFF) $(srcdir)/test_ref.html test_ref.out.html $(DIFF) $(srcdir)/test_refs.h.html test_refs_tmp.h.html $(DIFF) $(srcdir)/test_refs.cpp.html test_refs_tmp.cpp.html $(DIFF) $(srcdir)/test_ref.tex test_ref.out.tex $(DIFF) $(srcdir)/test_ref.texinfo test_ref.out.texinfo $(DIFF) $(srcdir)/test_ref_post.tex test_ref_post.out.tex $(DIFF) $(srcdir)/test_ref.docbook test_ref.out.docbook $(DIFF) $(srcdir)/test_ref.xhtml test_ref.out.xhtml rm -f test_refs_tmp.* *testtmp $(TEMP_TAGFILE) endif check_show: $(PROGEXE) --show-regex=$(top_srcdir)/src/c_comment.lang > c_comment.out.show tr -d '\r' < c_comment.out.show > temp.output && cp -f temp.output c_comment.out.show $(PROGEXE) --show-regex=$(srcdir)/namedgroups_state.lang > namedgroups_state.out.show tr -d '\r' < namedgroups_state.out.show > temp.output && cp -f temp.output namedgroups_state.out.show @echo expect no output from diff $(DIFF) $(srcdir)/c_comment.show c_comment.out.show $(DIFF) $(srcdir)/namedgroups_state.show namedgroups_state.out.show check_langelems: $(PROGEXE) $(DATADIROPTION) --show-lang-elements=$(top_srcdir)/src/cpp.lang > cpp.out.langelems tr -d '\r' < cpp.out.langelems > temp.output && cp -f temp.output cpp.out.langelems @echo expect no output from diff $(DIFF) $(srcdir)/cpp.langelems cpp.out.langelems check_list: $(PROGEXE) $(DATADIROPTION) --lang-list > lang.out.list tr -d '\r' < lang.out.list > temp.output && cp -f temp.output lang.out.list $(PROGEXE) $(DATADIROPTION) --outlang-list > outlang.out.list tr -d '\r' < outlang.out.list > temp.output && cp -f temp.output outlang.out.list @echo expect no output from diff $(DIFF) $(srcdir)/lang.list lang.out.list $(DIFF) $(srcdir)/outlang.list outlang.out.list check_stop: $(PROGNAME) --lang-def=$(srcdir)/test_string_stop.lang -i $(srcdir)/test_string_stop.java -o test_string_stop.java.out.html $(JAVA2HTML) -i $(srcdir)/test_java_stop.java -o test_java_stop.java.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test_string_stop.java.html test_string_stop.java.out.html $(DIFF) $(srcdir)/test_java_stop.java.html test_java_stop.java.out.html check_vardecl: $(JAVA2HTML) -i $(srcdir)/test_vardecl.java -o test_vardecl.java.out.html $(CPP2HTML) -i $(srcdir)/test_vardecl.cc -o test_vardecl.cc.out.html @echo expect no output from diff $(DIFF) $(srcdir)/test_vardecl.java.html test_vardecl.java.out.html $(DIFF) $(srcdir)/test_vardecl.cc.html test_vardecl.cc.out.html check_newlines: $(PROGEXE) --show-regex=$(srcdir)/test_newlines.lang > test_newlines.out $(PROGEXE) --show-regex=$(srcdir)/test_nonewlines.lang > test_nonewlines.out @echo expect no output from diff $(DIFF) test_newlines.out test_nonewlines.out clean_ref: rm -f $(OUTPUTWREFS) OUTPUTDIR=$(top_builddir)/tests/output_dir OUTPUTTODIR= --output-dir=$(OUTPUTDIR) check-output-dir: rm -f $(OUTPUTDIR)/test.java.html $(OUTPUTDIR)/test.h.html $(PROGEXE) $(DATADIROPTION) $(OUTPUTTODIR) $(srcdir)/test.java $(srcdir)/test.h test -f $(OUTPUTDIR)/test.java.html test -f $(OUTPUTDIR)/test.h.html source_highlightdoc_DATA = test.php3.html test.pl.html test.pm.html \ test.py.html test.rb.html test.js.html test.lua.html test.ml.html \ test.sml.html test.log.html access.log.html auth.log.html error.log.html syslog.log.html test.htm.html test.java.tex.html \ syslog.style.html \ log.lang.html c.lang.html default.style.html \ test_linerange_sep.html \ test.java.html \ test_regexrange4.html \ test_refs.h.html test_refs.cpp.html VALGRINDTESTS = $(top_builddir)/tests/valgrind_tests.sh VALGRINDTEST = $(top_builddir)/tests/valgrind_test.sh check-valgrind: $(VALGRINDTEST) $(PROGEXE) --help $(VALGRINDTEST) $(PROGEXE) --version $(VALGRINDTEST) $(JAVA2HTML) -i $(srcdir)/test.java -o test.java.out.html # lua uses @{1} so we want to test it $(VALGRINDTEST) $(LUA2HTML) -i $(srcdir)/test.lua -o test.lua.out.html $(VALGRINDTEST) $(PROGNAME_CSSSTYLE) -i $(srcdir)/test.java -o test.css.java.html $(VALGRINDTEST) $(CPP2HTML) --gen-references=inline -i $(srcdir)/test.h -o test_ref.out.html $(VALGRINDTEST) $(FAILSAFE) -i $(srcdir)/test.unknown -s cpp -o test.unknown_out $(VALGRINDTEST) $(NAMEDGROUPS) -i $(srcdir)/test.ngroups -o test.ngroups.out.html $(VALGRINDTEST) $(FAILSAFE) -i $(srcdir)/test.unknown -o test.unknown_out cp -f $(srcdir)/test_refs.h test_refs_tmp.h cp -f $(srcdir)/test_refs.cpp test_refs_tmp.cpp $(CTAGS_CMD) -o test_refs_tmp.tags test_refs_tmp.h test_refs_tmp.cpp $(VALGRINDTEST) $(CPP2HTML) --gen-references=inline --ctags-file=my_test_ref.tags --line-number test_refs_tmp.h test_refs_tmp.cpp rm -f test_refs_tmp.* CLEANFILES = *.out.html *.out.txt *.out.tex *.err_out *.unknown_out *.out.debug *.out.texinfo *_tmp.* *.out.show myscript* myimplicitxml* myimplicitphp* *.css.java.html *.nf_css.java.html *.css_xhtml.java.html *.css_doc.java.html *.out.docbook *.out.xhtml *.out.langelems *.out.list test_newlines.out test_nonewlines.out temp.output *.out.fodt *.out.doc.fodt *.out.mediawiki clean_html: rm -f *.h.html *.java.html *.cc.html *.pas.html *.pl.html *.pm.html *.php3.html *.py.html *.chlog.html *.chlog_css.html *.l.html test_xhtml*.html test_notfixed.html test_css.html test_css_nodoc.html test_header.html *.rb.html *.js.html *.java.txt *.java.tex *.h.docbook *.java.texinfo *.lua.html *.ml.html *.sml.html test_*_lines.html *.log.html *.y.html *.simple.html *.ngroups.html *.tex.html *.lgt.html *.diff.html *.lang.html *.htm.html *.style.html *.cs.html *.xml.html *.sh.html *.url.html *.txt.html *.unknown.html *.tcl.html *.bib.html *.makefile.html *.css.html *.ps.html *.sl.html *.isolate.html *.backref.html *.c.html *.wdefault.html *.wodefault.html *.properties.html *.desktop.html *.lsm.html *.spec.html *.hx.html *.fortran.html *.fixed-fortran.html *.hx.html *.m4.html *.scala.html *.adb.html *.conf.html *.xorg.html DISTCLEANFILES=my_test_ref_tmp.tags $(TEMP_TAGFILE) #DISTCLEANFILES=test_ref.xhtml test_ref.tags test_ref.tags tags test_ref.tex test_ref_post.tex test_ref.texinfo syslog.style.html test_ref.docbook �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/tests/test_backref.lang������������������������������������������������������0000644�0001750�0001750�00000000272�11672675567�016377� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������state string delim `\[(1?)(2?)\[` `]]` + @{1} + `a` + @{2} nested begin keyword = "inside" regexp delim `(\$|\||%)` @{1} end string delim `(\!|\||#)` @{1} type = "symbol" ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/tests/test.sml.html����������������������������������������������������������0000644�0001750�0001750�00000020226�11672675566�015537� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<!-- Generator: GNU source-highlight by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite --> <pre><tt><b><font color="#0000FF">fun</font></b> map <font color="#990000">(</font>f <font color="#990000">:</font> 'a <font color="#990000">-&gt;</font> 'b<font color="#990000">,</font> xs <font color="#990000">:</font> 'a list<font color="#990000">)</font> <font color="#990000">:</font> 'b list <font color="#990000">=</font> <b><font color="#0000FF">case</font></b> xs <b><font color="#0000FF">of</font></b> nil <font color="#990000">=&gt;</font> nil <font color="#990000">|</font> <font color="#990000">(</font>y<font color="#990000">::</font>ys<font color="#990000">)</font> <font color="#990000">=&gt;</font> <font color="#990000">(</font>f <font color="#990000">(</font>y<font color="#990000">))::(</font>map <font color="#990000">(</font>f<font color="#990000">,</font> ys<font color="#990000">));</font> <b><font color="#0000FF">fun</font></b> zip <font color="#990000">(</font>xs <font color="#990000">:</font> 'a list<font color="#990000">,</font> ys <font color="#990000">:</font> 'b list<font color="#990000">)</font> <font color="#990000">:</font> <font color="#990000">(</font>'a <font color="#990000">*</font> 'b<font color="#990000">)</font> list <font color="#990000">=</font> <b><font color="#0000FF">case</font></b> <font color="#990000">(</font>xs<font color="#990000">,</font> ys<font color="#990000">)</font> <b><font color="#0000FF">of</font></b> <font color="#990000">(</font>nil<font color="#990000">,</font> _<font color="#990000">)</font> <font color="#990000">=&gt;</font> nil <font color="#990000">|</font> <font color="#990000">(</font>_<font color="#990000">,</font> nil<font color="#990000">)</font> <font color="#990000">=&gt;</font> nil <font color="#990000">|</font> <font color="#990000">(</font>b<font color="#990000">::</font>bs<font color="#990000">,</font> c<font color="#990000">::</font>cs<font color="#990000">)</font> <font color="#990000">=&gt;</font> <font color="#990000">(</font>b<font color="#990000">,</font> c<font color="#990000">)::(</font>zip <font color="#990000">(</font>bs<font color="#990000">,</font> cs<font color="#990000">));</font> <b><font color="#0000FF">fun</font></b> filter <font color="#990000">(</font>f <font color="#990000">:</font> 'a <font color="#990000">-&gt;</font> bool<font color="#990000">,</font> xs <font color="#990000">:</font> 'a list<font color="#990000">)</font> <font color="#990000">:</font> 'a list <font color="#990000">=</font> <b><font color="#0000FF">case</font></b> xs <b><font color="#0000FF">of</font></b> nil <font color="#990000">=&gt;</font> nil <font color="#990000">|</font> <font color="#990000">(</font>y<font color="#990000">::</font>ys<font color="#990000">)</font> <font color="#990000">=&gt;</font> <b><font color="#0000FF">if</font></b> f <font color="#990000">(</font>y<font color="#990000">)</font> <b><font color="#0000FF">then</font></b> y<font color="#990000">::(</font>filter <font color="#990000">(</font>f<font color="#990000">,</font> ys<font color="#990000">))</font> <b><font color="#0000FF">else</font></b> filter <font color="#990000">(</font>f<font color="#990000">,</font> ys<font color="#990000">);</font> <b><font color="#0000FF">fun</font></b> foldl <font color="#990000">(</font>f <font color="#990000">:</font> 'a <font color="#990000">*</font> 'b <font color="#990000">-&gt;</font> 'a<font color="#990000">,</font> n <font color="#990000">:</font> 'a<font color="#990000">,</font> xs <font color="#990000">:</font> 'b list<font color="#990000">)</font> <font color="#990000">:</font> 'a <font color="#990000">=</font> <b><font color="#0000FF">case</font></b> xs <b><font color="#0000FF">of</font></b> nil <font color="#990000">=&gt;</font> n <font color="#990000">|</font> <font color="#990000">(</font>y<font color="#990000">::</font>ys<font color="#990000">)</font> <font color="#990000">=&gt;</font> foldl <font color="#990000">(</font>f<font color="#990000">,</font> f <font color="#990000">(</font>n<font color="#990000">,</font> y<font color="#990000">),</font> ys<font color="#990000">);</font> <b><font color="#0000FF">fun</font></b> upto <font color="#990000">(</font>x <font color="#990000">:</font> <font color="#009900">int</font><font color="#990000">,</font> y <font color="#990000">:</font> <font color="#009900">int</font><font color="#990000">)</font> <font color="#990000">:</font> <font color="#009900">int</font> list <font color="#990000">=</font> <b><font color="#0000FF">if</font></b> x <font color="#990000">&lt;=</font> y <b><font color="#0000FF">then</font></b> x<font color="#990000">::(</font>upto <font color="#990000">(</font>x <font color="#990000">+</font> <font color="#993399">1</font><font color="#990000">,</font> y<font color="#990000">))</font> <b><font color="#0000FF">else</font></b> nil<font color="#990000">;</font> <b><font color="#0000FF">fun</font></b> sum <font color="#990000">(</font>xs <font color="#990000">:</font> <font color="#009900">int</font> list<font color="#990000">)</font> <font color="#990000">:</font> <font color="#009900">int</font> <font color="#990000">=</font> <b><font color="#0000FF">case</font></b> xs <b><font color="#0000FF">of</font></b> nil <font color="#990000">=&gt;</font> <font color="#993399">0</font> <font color="#990000">|</font> <font color="#990000">(</font>x'<font color="#990000">::</font>xs'<font color="#990000">)</font> <font color="#990000">=&gt;</font> x' <font color="#990000">+</font> sum <font color="#990000">(</font>xs'<font color="#990000">);</font> <b><font color="#0000FF">fun</font></b> fold <font color="#990000">(</font>opr<font color="#990000">:</font> <font color="#009900">int</font><font color="#990000">*</font><font color="#009900">int</font><font color="#990000">-&gt;</font><font color="#009900">int</font><font color="#990000">,</font> base<font color="#990000">:</font> <font color="#009900">int</font><font color="#990000">,</font> xs<font color="#990000">:</font> <font color="#009900">int</font> list<font color="#990000">)</font> <font color="#990000">:</font> <font color="#009900">int</font> <font color="#990000">=</font> <b><font color="#0000FF">case</font></b> xs <b><font color="#0000FF">of</font></b> nil <font color="#990000">=&gt;</font> base <font color="#990000">|</font> <font color="#990000">(</font>x'<font color="#990000">::</font>xs'<font color="#990000">)</font> <font color="#990000">=&gt;</font> opr<font color="#990000">(</font>x'<font color="#990000">,</font> fold<font color="#990000">(</font>opr<font color="#990000">,</font> base<font color="#990000">,</font> xs'<font color="#990000">));</font> <b><font color="#0000FF">fun</font></b> add<font color="#990000">(</font>x<font color="#990000">,</font>y<font color="#990000">)</font> <font color="#990000">=</font> x<font color="#990000">+</font>y<font color="#990000">;</font> <b><font color="#0000FF">fun</font></b> foldsum <font color="#990000">(</font>xs<font color="#990000">:</font> <font color="#009900">int</font> list<font color="#990000">)</font> <font color="#990000">=</font> fold <font color="#990000">(</font>add<font color="#990000">,</font><font color="#993399">0</font><font color="#990000">,</font> xs<font color="#990000">);</font> <b><font color="#0000FF">fun</font></b> foldr <font color="#990000">(</font>opr<font color="#990000">:</font> 'b<font color="#990000">*</font>'a<font color="#990000">-&gt;</font>'a<font color="#990000">,</font> base<font color="#990000">:</font> 'a<font color="#990000">,</font> xs<font color="#990000">:</font> 'b list<font color="#990000">)</font> <font color="#990000">:</font> 'a <font color="#990000">=</font> <b><font color="#0000FF">case</font></b> xs <b><font color="#0000FF">of</font></b> nil <font color="#990000">=&gt;</font> base <font color="#990000">|</font> <font color="#990000">(</font>x'<font color="#990000">::</font>xs'<font color="#990000">)</font> <font color="#990000">=&gt;</font> opr<font color="#990000">(</font>x'<font color="#990000">,</font> foldr<font color="#990000">(</font>opr<font color="#990000">,</font> base<font color="#990000">,</font> xs'<font color="#990000">));</font> </tt></pre> ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/tests/test_ref.texinfo�������������������������������������������������������0000644�0001750�0001750�00000014423�11672675567�016314� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@c Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite @example @t{01:} @r{@i{/**}} @t{02:} @r{@i{** Copyright (C) 1999-2007 Lorenzo Bettini}} @t{03:} @r{@i{** }} @t{04:} @r{@i{ }}@t{http://www.lorenzobettini.it} @t{05:} @r{@i{ }} @t{06:} @r{@i{ r2 = r2 XOR (1<<10);}} @t{07:} @r{@i{ cout << "hello world" << endl;}} @t{08:} @r{@i{** }} @t{09:} @r{@i{*/}} @t{10:} @t{11:} @r{@i{// this file also contains the definition of mysum as a #define}} @t{12:} @t{13:} @r{@i{// textgenerator.h : Text Generator class &&}} @t{14:} @t{15:} @b{#ifndef} _TEXTGEN_H @flushright @r{@i{@xref{test.h:16,_TEXTGEN_H,_TEXTGEN_H test.h:16}.}} @end flushright @t{16:} @b{#define} @anchor{test.h:16}_TEXTGEN_H @t{17:} @t{18:} @b{#define} @anchor{test.h:18}foo(x) (x + 1) @t{19:} @t{20:} @b{#define} @anchor{test.h:20}mysum myfunbody @t{21:} @t{22:} @b{#include} @t{<iostream.h>} @r{@i{// for cerr}} @t{23:} @t{24:} @b{#include} @t{"genfun.h"} @r{@i{/* for generating functions */}} @t{25:} @t{26:} @b{class} @anchor{test.h:26}TextGenerator @{ @t{27:} @b{public} : @t{28:} @b{virtual} @b{void} @anchor{test.h:28}generate( @b{const} @b{char} *s ) @b{const} @{ (*sout) << s ; @} @t{29:} @b{virtual} @b{void} @anchor{test.h:29}generate( @b{const} @b{char} *s, @b{int} start, @b{int} end ) @b{const} @t{30:} @{ @t{31:} @b{for} ( @b{int} i = start ; i <= end ; ++i ) @t{32:} (*sout) << s[i] ; @t{33:} @b{return} a<p->b ? a : 3; @t{34:} @} @t{35:} @b{virtual} @b{void} @anchor{test.h:35}generateln( @b{const} @b{char} *s ) @b{const} @t{36:} @{ @t{37:} generate( s ) ; @flushright @r{@i{@xref{test.h:28,generate,generate test.h:28}.}} @end flushright @flushright @r{@i{@xref{test.h:29,generate,generate test.h:29}.}} @end flushright @t{38:} (*sout) << endl ; @t{39:} @} @t{40:} @b{virtual} @b{void} @anchor{test.h:40}generateEntire( @b{const} @b{char} *s ) @b{const} @t{41:} @{ @t{42:} startTextGeneration() ; @flushright @r{@i{@xref{test.h:46,startTextGeneration,startTextGeneration test.h:46}.}} @end flushright @flushright @r{@i{@xref{test.h:70,startTextGeneration,startTextGeneration test.h:70}.}} @end flushright @t{43:} generate(s) ; @flushright @r{@i{@xref{test.h:28,generate,generate test.h:28}.}} @end flushright @flushright @r{@i{@xref{test.h:29,generate,generate test.h:29}.}} @end flushright @t{44:} endTextGeneration() ; @flushright @r{@i{@xref{test.h:47,endTextGeneration,endTextGeneration test.h:47}.}} @end flushright @flushright @r{@i{@xref{test.h:76,endTextGeneration,endTextGeneration test.h:76}.}} @end flushright @t{45:} @} @t{46:} @b{virtual} @b{void} @anchor{test.h:46}startTextGeneration() @b{const} @{@} @t{47:} @b{virtual} @b{void} @anchor{test.h:47}endTextGeneration() @b{const} @{@} @t{48:} @b{virtual} @b{void} @anchor{test.h:48}beginText( @b{const} @b{char} *s ) @b{const} @t{49:} @{ @t{50:} startTextGeneration() ; @flushright @r{@i{@xref{test.h:46,startTextGeneration,startTextGeneration test.h:46}.}} @end flushright @flushright @r{@i{@xref{test.h:70,startTextGeneration,startTextGeneration test.h:70}.}} @end flushright @t{51:} @b{if} ( s ) @t{52:} generate( s ) ; @flushright @r{@i{@xref{test.h:28,generate,generate test.h:28}.}} @end flushright @flushright @r{@i{@xref{test.h:29,generate,generate test.h:29}.}} @end flushright @t{53:} @} @t{54:} @b{virtual} @b{void} @anchor{test.h:54}endText( @b{const} @b{char} *s ) @b{const} @t{55:} @{ @t{56:} @b{if} ( s ) @t{57:} generate( s ) ; @flushright @r{@i{@xref{test.h:28,generate,generate test.h:28}.}} @end flushright @flushright @r{@i{@xref{test.h:29,generate,generate test.h:29}.}} @end flushright @t{58:} endTextGeneration() ; @flushright @r{@i{@xref{test.h:47,endTextGeneration,endTextGeneration test.h:47}.}} @end flushright @flushright @r{@i{@xref{test.h:76,endTextGeneration,endTextGeneration test.h:76}.}} @end flushright @t{59:} @} @t{60:} @} ; @t{61:} @t{62:} @r{@i{// Decorator}} @t{63:} @b{class} @anchor{test.h:63}TextDecorator : @b{public} TextGenerator @{ @flushright @r{@i{@xref{test.h:26,TextGenerator,TextGenerator test.h:26}.}} @end flushright @t{64:} @b{protected} : @t{65:} TextGenerator *@anchor{test.h:65}decorated ; @flushright @r{@i{@xref{test.h:26,TextGenerator,TextGenerator test.h:26}.}} @end flushright @t{66:} @t{67:} @b{public} : @t{68:} @anchor{test.h:68}TextDecorator( TextGenerator *t ) : decorated( t ) @{@} @flushright @r{@i{@xref{test.h:26,TextGenerator,TextGenerator test.h:26}.}} @end flushright @flushright @r{@i{@xref{test.h:65,decorated,decorated test.h:65}.}} @end flushright @t{69:} @t{70:} @b{virtual} @b{void} @anchor{test.h:70}startTextGeneration() @b{const} @t{71:} @{ @t{72:} startDecorate() ; @t{73:} @b{if} ( decorated ) @flushright @r{@i{@xref{test.h:65,decorated,decorated test.h:65}.}} @end flushright @t{74:} decorated->startTextGeneration() ; @flushright @r{@i{@xref{test.h:46,startTextGeneration,startTextGeneration test.h:46}.}} @end flushright @flushright @r{@i{@xref{test.h:65,decorated,decorated test.h:65}.}} @end flushright @flushright @r{@i{@xref{test.h:70,startTextGeneration,startTextGeneration test.h:70}.}} @end flushright @t{75:} @} @t{76:} @b{virtual} @b{void} @anchor{test.h:76}endTextGeneration() @b{const} @t{77:} @{ @t{78:} @b{if} ( decorated ) @flushright @r{@i{@xref{test.h:65,decorated,decorated test.h:65}.}} @end flushright @t{79:} decorated->endTextGeneration() ; @flushright @r{@i{@xref{test.h:47,endTextGeneration,endTextGeneration test.h:47}.}} @end flushright @flushright @r{@i{@xref{test.h:65,decorated,decorated test.h:65}.}} @end flushright @flushright @r{@i{@xref{test.h:76,endTextGeneration,endTextGeneration test.h:76}.}} @end flushright @t{80:} endDecorate() ; @t{81:} mysum; @flushright @r{@i{@xref{test.h:20,mysum,mysum test.h:20}.}} @end flushright @t{82:} @} @t{83:} @t{84:} @r{@i{// pure virtual functions}} @t{85:} @b{virtual} @b{void} startDecorate() @b{const} = 0 ; @t{86:} @b{virtual} @b{void} endDecorate() @b{const} = 0 ; @t{87:} @} ; @t{88:} @t{89:} @b{#endif} @r{@i{// _TEXTGEN_H}} @t{90:} @end example���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/tests/test.adb.html����������������������������������������������������������0000644�0001750�0001750�00000017417�11672675566�015502� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<!-- Generator: GNU source-highlight by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite --> <pre><tt><i><font color="#9A1900">--</font></i> <i><font color="#9A1900">-- This is a classical Hello world example written in Ada</font></i> <i><font color="#9A1900">-- to test source-highlight with Ada programs.</font></i> <i><font color="#9A1900">--</font></i> <i><font color="#9A1900">-- to perform a html translation type:</font></i> <i><font color="#9A1900">--</font></i> <i><font color="#9A1900">-- source-highlight -s ada -f html --input test.ada --output test.ada.html</font></i> <i><font color="#9A1900">--</font></i> <i><font color="#9A1900">-- or type source-highlight --help for the list of options</font></i> <i><font color="#9A1900">--</font></i> <i><font color="#9A1900">--</font></i> <i><font color="#9A1900">-- written by Reto Buerki &lt;reet@codelabs.ch&gt;</font></i> <i><font color="#9A1900">--</font></i> <b><font color="#000080">with</font></b> Ada<font color="#990000">.</font>Text_IO<font color="#990000">;</font> <b><font color="#0000FF">procedure</font></b> Test <b><font color="#0000FF">is</font></b> Test_Int <font color="#990000">:</font> <font color="#009900">Integer</font> <font color="#990000">:=</font> <font color="#993399">10</font><font color="#990000">;</font> <i><font color="#9A1900">-- This is an example test integer</font></i> Test_Float <font color="#990000">:</font> <b><font color="#0000FF">constant</font></b> <font color="#009900">Float</font> <font color="#990000">:=</font> <font color="#993399">10.2</font><font color="#990000">;</font> <i><font color="#9A1900">-- This is an example test float</font></i> Test_Boolean <font color="#990000">:</font> <font color="#009900">Boolean</font> <font color="#990000">:=</font> False<font color="#990000">;</font> <i><font color="#9A1900">-- This is an example test boolean</font></i> Test_Char <font color="#990000">:</font> <font color="#009900">Character</font> <font color="#990000">:=</font> <font color="#FF0000">'C'</font><font color="#990000">;</font> <i><font color="#9A1900">-- This is an example test character</font></i> Test_String <font color="#990000">:</font> <font color="#009900">String</font> <font color="#990000">:=</font> <font color="#FF0000">"Some test string"</font><font color="#990000">;</font> <i><font color="#9A1900">-- This is an example test string</font></i> <b><font color="#0000FF">type</font></b> Test_Person_Type <b><font color="#0000FF">is</font></b> <b><font color="#0000FF">tagged</font></b> <b><font color="#0000FF">record</font></b> Name <font color="#990000">:</font> <font color="#009900">String</font> <font color="#990000">(</font><font color="#993399">1</font> <font color="#990000">..</font> <font color="#993399">8</font><font color="#990000">);</font> <i><font color="#9A1900">-- Name</font></i> Age <font color="#990000">:</font> Positive <font color="#990000">:=</font> <font color="#993399">18</font><font color="#990000">;</font> <i><font color="#9A1900">-- Age</font></i> <b><font color="#0000FF">end</font></b> <b><font color="#0000FF">record</font></b><font color="#990000">;</font> <i><font color="#9A1900">-- This is an example type</font></i> <b><font color="#0000FF">type</font></b> Test_Profession_Type <b><font color="#0000FF">is</font></b> <font color="#990000">(</font>Unknown<font color="#990000">,</font> Medic<font color="#990000">,</font> Fireman<font color="#990000">,</font> Construction_Worker<font color="#990000">);</font> <i><font color="#9A1900">-- Enumeration test type : All possible professions</font></i> <b><font color="#0000FF">type</font></b> Test_Employee_Type <b><font color="#0000FF">is</font></b> <b><font color="#0000FF">new</font></b> Test_Person_Type <b><font color="#000080">with</font></b> <b><font color="#0000FF">record</font></b> Profession <font color="#990000">:</font> Test_Profession_Type <font color="#990000">:=</font> Unknown<font color="#990000">;</font> <i><font color="#9A1900">-- Initial profession is not known</font></i> <b><font color="#0000FF">end</font></b> <b><font color="#0000FF">record</font></b><font color="#990000">;</font> <i><font color="#9A1900">-- This is an example extension of Test_Person_Type</font></i> <b><font color="#0000FF">subtype</font></b> Test_Int_Subtype <b><font color="#0000FF">is</font></b> <font color="#009900">Integer</font> <b><font color="#0000FF">range</font></b> <font color="#993399">1</font> <font color="#990000">..</font> <font color="#993399">9</font><font color="#990000">;</font> <i><font color="#9A1900">-- This is an example subtype</font></i> <b><font color="#0000FF">task</font></b> Test_Greeter_Task <b><font color="#0000FF">is</font></b> <b><font color="#0000FF">entry</font></b> Run<font color="#990000">;</font> <i><font color="#9A1900">-- Entry to start example task</font></i> <b><font color="#0000FF">end</font></b> Test_Greeter_Task<font color="#990000">;</font> <i><font color="#9A1900">-- An example task</font></i> <b><font color="#0000FF">task</font></b> <b><font color="#0000FF">body</font></b> Test_Greeter_Task <b><font color="#0000FF">is</font></b> <i><font color="#9A1900">------------------</font></i> <i><font color="#9A1900">-- Get_Greeting --</font></i> <i><font color="#9A1900">------------------</font></i> <b><font color="#0000FF">function</font></b> <b><font color="#000000">Get_Greeting</font></b> <font color="#990000">(</font>Num <font color="#990000">:</font> <b><font color="#0000FF">in</font></b> <font color="#009900">Integer</font><font color="#990000">)</font> <b><font color="#0000FF">return</font></b> <font color="#009900">String</font> <b><font color="#0000FF">is</font></b> <b><font color="#0000FF">begin</font></b> <b><font color="#0000FF">return</font></b> <font color="#009900">Integer</font>'<b><font color="#000000">Image</font></b> <font color="#990000">(</font>Num<font color="#990000">)</font> <font color="#990000">&amp;</font> <font color="#FF0000">" : Hello world from an Ada task"</font><font color="#990000">;</font> <b><font color="#0000FF">end</font></b> Get_Greeting<font color="#990000">;</font> <b><font color="#0000FF">begin</font></b> <b><font color="#0000FF">accept</font></b> Run<font color="#990000">;</font> <b><font color="#0000FF">for</font></b> Index <b><font color="#0000FF">in</font></b> Test_Int_Subtype'<b><font color="#0000FF">Range</font></b> <b><font color="#0000FF">loop</font></b> Ada<font color="#990000">.</font>Text_IO<font color="#990000">.</font><b><font color="#000000">Put_Line</font></b> <font color="#990000">(</font><b><font color="#000000">Get_Greeting</font></b> <font color="#990000">(</font>Num <font color="#990000">=&gt;</font> Index<font color="#990000">));</font> <b><font color="#0000FF">end</font></b> <b><font color="#0000FF">loop</font></b><font color="#990000">;</font> <b><font color="#0000FF">end</font></b> Test_Greeter_Task<font color="#990000">;</font> <b><font color="#000080">use</font></b> Ada<font color="#990000">.</font>Text_IO<font color="#990000">;</font> <b><font color="#0000FF">begin</font></b> <i><font color="#9A1900">-- Just display some greeting</font></i> <b><font color="#000000">Put_Line</font></b> <font color="#990000">(</font><font color="#FF0000">"Hello world in Ada for GNU Source-highlight"</font><font color="#990000">);</font> <b><font color="#000000">Put_Line</font></b> <font color="#990000">(</font><font color="#FF0000">"written by Reto Buerki &lt;reet@codelabs.ch&gt;"</font><font color="#990000">);</font> Test_Greeter_Task<font color="#990000">.</font>Run<font color="#990000">;</font> <b><font color="#0000FF">end</font></b> Test<font color="#990000">;</font> </tt></pre> �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/tests/test.MF.html�����������������������������������������������������������0000644�0001750�0001750�00000004707�11672675566�015254� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<!-- Generator: GNU source-highlight by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite --> <pre><tt><font color="#FF0000">Manifest-Version</font><font color="#990000">:</font> <font color="#993399">1.0</font> <font color="#FF0000">Bundle-ManifestVersion</font><font color="#990000">:</font> <font color="#993399">2</font> <font color="#FF0000">Bundle-Name</font><font color="#990000">:</font> <font color="#FF6600">%pluginName</font> <font color="#FF0000">Bundle-SymbolicName</font><font color="#990000">:</font> org.eclipse.mindmap.diagram;<font color="#009900"> singleton</font><font color="#990000">:=</font>true <font color="#FF0000">Bundle-Version</font><font color="#990000">:</font> <font color="#993399">1.0</font>.<font color="#993399">0</font>.qualifier <font color="#FF0000">Bundle-ClassPath</font><font color="#990000">:</font> . <font color="#FF0000">Bundle-Activator</font><font color="#990000">:</font> org.eclipse.mindmap.diagram.part.MindmapDiagramEditorPlugin <font color="#FF0000">Bundle-Vendor</font><font color="#990000">:</font> <font color="#FF6600">%providerName</font> <font color="#FF0000">Bundle-Localization</font><font color="#990000">:</font> plugin <font color="#FF0000">Export-Package</font><font color="#990000">:</font> org.eclipse.mindmap.diagram.edit.parts, org.eclipse.mindmap.diagram.part, org.eclipse.mindmap.diagram.providers <font color="#FF0000">Require-Bundle</font><font color="#990000">:</font> org.eclipse.core.runtime, org.eclipse.core.resources, org.eclipse.core.expressions, org.eclipse.draw2d;<font color="#009900">visibility</font><font color="#990000">:=</font>reexport, org.eclipse.gmf.runtime.draw2d.ui;<font color="#009900">visibility</font><font color="#990000">:=</font>reexport, org.eclipse.mindmap;<font color="#009900">visibility</font><font color="#990000">:=</font>reexport, org.eclipse.mindmap.edit;<font color="#009900">visibility</font><font color="#990000">:=</font>reexport, org.eclipse.gef;<font color="#009900">visibility</font><font color="#990000">:=</font>reexport, org.eclipse.ocl.ecore;<font color="#009900">visibility</font><font color="#990000">:=</font>reexport, org.eclipse.emf.validation;<font color="#009900">visibility</font><font color="#990000">:=</font>reexport, org.eclipse.emf.validation.ocl;<font color="#009900">visibility</font><font color="#990000">:=</font>reexport <font color="#FF0000">Eclipse-LazyStart</font><font color="#990000">:</font> true </tt></pre> ���������������������������������������������������������source-highlight-3.1.6/tests/test.diff.html���������������������������������������������������������0000644�0001750�0001750�00000004406�11672675566�015656� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<!-- Generator: GNU source-highlight by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite --> <pre><tt>diff -ruP source-highlight-2.1.1/source-highlight.spec source-highlight-2.1.2/source-highlight.spec <font color="#FF6600">--- source-highlight-2.1.1/source-highlight.spec 2005-08-03 14:54:18.000000000 +0200</font> <font color="#009900">+++ source-highlight-2.1.2/source-highlight.spec 2005-08-25 16:11:37.000000000 +0200</font> <font color="#0000FF">@@ -6,8 +6,8 @@</font> Summary: syntax highlighting for source documents Name: source-highlight <font color="#FF6600">-Version: 2.1.1</font> <font color="#FF6600">-Release: 2.1.1</font> <font color="#009900">+Version: 2.1.2</font> <font color="#009900">+Release: 2.1.2</font> License: GPL Group: Utilities/Console Source: ftp://ftp.gnu.org/gnu/source-highlight/%{name}-%{version}.tar.gz diff -ruP source-highlight-2.1.1/src/latex.outlang source-highlight-2.1.2/src/latex.outlang <font color="#FF6600">--- source-highlight-2.1.1/src/latex.outlang 2005-07-12 22:21:46.000000000 +0200</font> <font color="#009900">+++ source-highlight-2.1.2/src/latex.outlang 2005-08-25 16:15:53.000000000 +0200</font> <font color="#0000FF">@@ -34,4 +34,5 @@</font> "|" "$|$" "--" "-\\/-" "---" "-\\/-\\/-" <font color="#009900">+"\"" "\"{}" # avoids problems with some inputenc</font> end \ No newline at end of file diff -ruP source-highlight-2.1.1/src/lib/messages.cc source-highlight-2.1.2/src/lib/messages.cc <font color="#FF6600">--- source-highlight-2.1.1/src/lib/messages.cc 2005-07-12 12:18:59.000000000 +0200</font> <font color="#009900">+++ source-highlight-2.1.2/src/lib/messages.cc 2005-08-25 16:08:44.000000000 +0200</font> <font color="#0000FF">@@ -85,3 +85,9 @@</font> cerr &lt;&lt; PACKAGE &lt;&lt; ": " &lt;&lt; error &lt;&lt; endl; exit(EXIT_FAILURE); } <font color="#009900">+</font> <font color="#009900">+void foundBug(const std::string &amp;error, const std::string &amp;file, int line)</font> <font color="#009900">+{</font> <font color="#009900">+ cerr &lt;&lt; PACKAGE &lt;&lt; ": " &lt;&lt; error &lt;&lt; ", " &lt;&lt; file &lt;&lt; ":" &lt;&lt; line &lt;&lt; endl;</font> <font color="#009900">+ exit(EXIT_FAILURE);</font> <font color="#009900">+}</font> </tt></pre> ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/tests/auth.log.html����������������������������������������������������������0000644�0001750�0001750�00000010325�11672675565�015505� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<!-- Generator: GNU source-highlight by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite --> <pre><tt><b><font color="#FFCC00">Jul 7</font></b> <font color="#9999FF">22:58:29</font> <font color="#33CC00">localhost</font><b><font color="#CC66CC"> su</font></b><font color="#FF0000">(pam_unix)[6540]</font>: session closed for user <b><font color="brown">root</font></b> <b><font color="#FFCC00">Jul 7</font></b> <font color="#9999FF">22:58:30</font> <font color="#33CC00">localhost</font><b><font color="#CC66CC"> gdm</font></b><font color="#FF0000">(pam_unix)[16823]</font>: session closed for user jan <b><font color="#FFCC00">Jul 7</font></b> <font color="#9999FF">22:58:44</font> <font color="#33CC00">localhost</font><b><font color="#CC66CC"> sshd</font></b><font color="#FF0000">[19224]</font>: Received signal 15; terminating. <b><font color="#FFCC00">Jul 8</font></b> <font color="#9999FF">19:51:34</font> <font color="#33CC00">localhost</font><b><font color="#CC66CC"> portmap</font></b><font color="#FF0000">[10226]</font>: user rpc not found, reverting to user bin <b><font color="#FFCC00">Jul 8</font></b> <font color="#9999FF">19:54:10</font> <font color="#33CC00">localhost</font><b><font color="#CC66CC"> gdm</font></b><font color="#FF0000">(pam_unix)[17343]</font>: session opened for user jan by (uid=0) <b><font color="#FFCC00">Jul 8</font></b> <font color="#9999FF">19:55:05</font> <font color="#33CC00">localhost</font><b><font color="#CC66CC"> sshd</font></b><font color="#FF0000">[20022]</font>: Server listening on <b><font color="lightblue">0.0.0.0</font></b> port <b><font color="#33CC00">22</font></b>. <b><font color="#FFCC00">Jul 8</font></b> <font color="#9999FF">20:23:13</font> <font color="#33CC00">localhost</font><b><font color="#CC66CC"> su</font></b><font color="#FF0000">(pam_unix)[20443]</font>: session opened for user <b><font color="brown">root</font></b> by jan(uid=1003) <b><font color="#FFCC00">Jul 8</font></b> <font color="#9999FF">20:39:29</font> <font color="#33CC00">localhost</font><b><font color="#CC66CC"> sshd</font></b><font color="#FF0000">[20022]</font>: Received signal 15; terminating. <b><font color="#FFCC00">Jul 8</font></b> <font color="#9999FF">20:39:29</font> <font color="#33CC00">localhost</font><b><font color="#CC66CC"> portmap</font></b><font color="#FF0000">[23153]</font>: user rpc not found, reverting to user bin <b><font color="#FFCC00">Jul 8</font></b> <font color="#9999FF">20:39:43</font> <font color="#33CC00">localhost</font><b><font color="#CC66CC"> sshd</font></b><font color="#FF0000">[25013]</font>: Server listening on <b><font color="lightblue">0.0.0.0</font></b> port <b><font color="#33CC00">22</font></b>. <b><font color="#FFCC00">Jul 8</font></b> <font color="#9999FF">21:41:24</font> <font color="#33CC00">localhost</font><b><font color="#CC66CC"> su</font></b><font color="#FF0000">(pam_unix)[18559]</font>: authentication <b><font color="brown">failure</font></b>; logname=jan uid=1003 euid=0 tty=pts/2 ruser=jan rhost= user=<b><font color="brown">root</font></b> <b><font color="#FFCC00">Jul 8</font></b> <font color="#9999FF">21:41:26</font> <font color="#33CC00">localhost</font><b><font color="#CC66CC"> su</font></b><font color="#FF0000">[18559]</font>: pam_authenticate: Authentication <b><font color="brown">failure</font></b> <b><font color="#FFCC00">Jul 8</font></b> <font color="#9999FF">21:41:29</font> <font color="#33CC00">localhost</font><b><font color="#CC66CC"> su</font></b><font color="#FF0000">(pam_unix)[19276]</font>: authentication <b><font color="brown">failure</font></b>; logname=jan uid=1003 euid=0 tty=pts/2 ruser=jan rhost= user=<b><font color="brown">root</font></b> <b><font color="#FFCC00">Jul 8</font></b> <font color="#9999FF">21:41:31</font> <font color="#33CC00">localhost</font><b><font color="#CC66CC"> su</font></b><font color="#FF0000">[19276]</font>: pam_authenticate: Authentication <b><font color="brown">failure</font></b> <b><font color="#FFCC00">Jul 8</font></b> <font color="#9999FF">21:41:38</font> <font color="#33CC00">localhost</font><b><font color="#CC66CC"> su</font></b><font color="#FF0000">(pam_unix)[21069]</font>: session opened for user <b><font color="brown">root</font></b> by jan(uid=1003) </tt></pre> �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/tests/simple.outlang���������������������������������������������������������0000644�0001750�0001750�00000000024�11672675566�015756� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������bold "<b>$text</b>" ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/tests/test.simple������������������������������������������������������������0000644�0001750�0001750�00000000244�11672675566�015270� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������this is just a simple test, to test simple.lang and simple.outlang it should highlight some keywords (e.g., abstract) and some types (e.g., int). nothing more :-) ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/tests/test.ecore.html��������������������������������������������������������0000644�0001750�0001750�00000002564�11672675566�016046� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<!-- Generator: GNU source-highlight by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite --> <pre><tt><b><font color="#000080">&lt;?xml</font></b> <font color="#009900">version</font><font color="#990000">=</font><font color="#FF0000">"1.0"</font> <font color="#009900">encoding</font><font color="#990000">=</font><font color="#FF0000">"UTF-8"</font><b><font color="#000080">?&gt;</font></b> <b><font color="#0000FF">&lt;ecore:EPackage</font></b> <font color="#009900">xmi:version</font><font color="#990000">=</font><font color="#FF0000">"2.0"</font> <font color="#009900">xmlns:xmi</font><font color="#990000">=</font><font color="#FF0000">"http://www.omg.org/XMI"</font> <font color="#009900">xmlns:xsi</font><font color="#990000">=</font><font color="#FF0000">"http://www.w3.org/2001/XMLSchema-instance"</font> <font color="#009900">xmlns:ecore</font><font color="#990000">=</font><font color="#FF0000">"http://www.eclipse.org/emf/2002/Ecore"</font> <font color="#009900">name</font><font color="#990000">=</font><font color="#FF0000">"mindmap"</font> <font color="#009900">nsURI</font><font color="#990000">=</font><font color="#FF0000">"http://www.eclipse.org/2008/mindmap"</font> <font color="#009900">nsPrefix</font><font color="#990000">=</font><font color="#FF0000">"mindmap"</font><b><font color="#0000FF">&gt;</font></b> </tt></pre> ��������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/tests/test.glsl.html���������������������������������������������������������0000644�0001750�0001750�00000011200�11672675566�015675� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<!-- Generator: GNU source-highlight by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite --> <pre><tt><b><font color="#000080">#version</font></b> <font color="#993399">120</font> <b><font color="#000080">#pragma</font></b> optimize off <b><font color="#000080">#pragma</font></b> debug on <b><font color="#0000FF">uniform</font></b> <font color="#009900">vec4</font> vSkyParams<font color="#990000">;</font> <b><font color="#0000FF">varying</font></b> <font color="#009900">ivec4</font> vpos<font color="#990000">,</font> lpos<font color="#990000">;</font> <b><font color="#0000FF">varying</font></b> <font color="#009900">bvec2</font> wave0<font color="#990000">,</font> wave1<font color="#990000">,</font> wave2<font color="#990000">;</font> <b><font color="#0000FF">const</font></b> <font color="#009900">float</font> lambda <font color="#990000">=</font> <font color="#993399">2.0</font><font color="#990000">;</font> <font color="#009900">void</font> <b><font color="#000000">main</font></b><font color="#990000">(</font><font color="#009900">void</font><font color="#990000">)</font> <font color="#FF0000">{</font> <i><font color="#9A1900">// Texture coordinates generation</font></i> <font color="#009900">vec2</font> vTexCoords <font color="#990000">=</font> <font color="#000080">gl_Vertex.xz</font><font color="#990000">*</font>vSkyParams<font color="#000080">.z</font><font color="#990000">;</font> <i><font color="#9A1900">// Scale texture coordinates to get mix of low/high frequency details</font></i> wave0 <font color="#990000">=</font> vTexCoords <font color="#990000">*</font> lambda <font color="#990000">+</font> vSkyParams<font color="#000080">.w</font> <font color="#990000">*</font> <font color="#009900">vec2</font><font color="#990000">(</font> <font color="#993399">0.5</font><font color="#990000">,</font> <font color="#993399">1.0</font> <font color="#990000">);</font> <i><font color="#9A1900">// Perspective corrected projection</font></i> <font color="#000080">gl_Position</font> <font color="#990000">=</font> <b><font color="#000080">ftransform</font></b><font color="#990000">();</font> vpos <font color="#990000">=</font> <font color="#000080">gl_Vertex</font><font color="#990000">;</font> lpos <font color="#990000">=</font> <font color="#000080">gl_LightSource</font><font color="#990000">[</font><font color="#993399">0</font><font color="#990000">]</font><font color="#000080">.position</font><font color="#990000">;</font> <i><font color="#9A1900">// Compute normal (assumes this is a sphere)</font></i> <font color="#009900">vec3</font> norm <font color="#990000">=</font> <b><font color="#000080">normalize</font></b><font color="#990000">(</font>vpos<font color="#990000">)</font><font color="#000080">.xyz</font><font color="#990000">;</font> <i><font color="#9A1900">//Compute sun light</font></i> <font color="#009900">vec4</font> sunlight <font color="#990000">=</font> <font color="#009900">vec4</font><font color="#990000">(</font><b><font color="#000080">pow</font></b><font color="#990000">(</font> <b><font color="#000080">max</font></b><font color="#990000">(</font><font color="#993399">0.0</font><font color="#990000">,</font> <b><font color="#000080">dot</font></b><font color="#990000">(</font>light<font color="#990000">,</font>norm<font color="#990000">)),</font> <font color="#993399">1024.0</font> <font color="#990000">));</font> <i><font color="#9A1900">// Get bump layers</font></i> <font color="#009900">vec3</font> vBumpTexA <font color="#990000">=</font> <b><font color="#000080">texture2D</font></b><font color="#990000">(</font>BumpMap<font color="#990000">,</font> wave0<font color="#990000">)</font><font color="#000080">.xyz</font><font color="#990000">;</font> <i><font color="#9A1900">//Add an horizon haze</font></i> <font color="#009900">float</font> haze <font color="#990000">=</font> <b><font color="#000080">pow</font></b><font color="#990000">(</font><font color="#000080">gl_FragCoord.z</font><font color="#990000">*(</font><font color="#993399">1.0</font><font color="#990000">-</font>norm<font color="#000080">.y</font><font color="#990000">),</font> <font color="#993399">10.0</font><font color="#990000">);</font> skyColor <font color="#990000">=</font> <b><font color="#000080">mix</font></b><font color="#990000">(</font> grey<font color="#990000">,</font> skyColor<font color="#990000">,</font> haze <font color="#990000">);</font> <font color="#000080">gl_FragColor</font> <font color="#990000">=</font> skyColor <font color="#990000">+</font> vSkyParams<font color="#000080">.x</font><font color="#990000">*</font>sunlight<font color="#990000">;</font> <font color="#FF0000">}</font></tt></pre> ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/README�����������������������������������������������������������������������0000644�0001750�0001750�00000011030�11672675560�012601� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������ GNU Source-highlight by Lorenzo Bettini <http://www.lorenzobettini.it> This program, given a source file, produces a document with syntax highlighting. The home page is http://www.gnu.org/software/src-highlite/ You can download it from GNU's ftp site: ftp://ftp.gnu.org/gnu/src-highlite/ or from one of its mirrors (see http://www.gnu.org/prep/ftp.html). This project's git repository can be checked out through the following clone instruction: git clone git://git.savannah.gnu.org/src-highlite.git Further instructions can be found at the address: http://savannah.gnu.org/projects/src-highlite. Installation Since version 2.0 Source-highlight relies on regular expressions as provided by boost, http://www.boost.org, so you need to install at least the regex library from boost. Most GNU/Linux distributions provide this library already in a compiled form. See the file INSTALL for detailed building and installation instructions; anyway if you're used to compiling Linux software that comes with sources you may simply follow the usual procedure: cd <source code main directory> ./configure make make install Note: unless you specify a different install directory by --prefix option of configure (e.g. ./configure --prefix=/<your home>/), you must be root to 'make install'. It is also possible to specify as following option for configure: --enable-input-chroot to hardcode in the program the path to prefix for input files. Before you run 'make install' you may want to check that the programs have compiled fine, so you can run 'make check'. Files will be installed in the following directories: Executables prefix/bin docs and output examples prefix/share/doc/source-highlight library examples prefix/share/doc/source-highlight/examples library API documentation prefix/share/doc/source-highlight/api conf files prefix/share/source-highlight Default value for prefix is /usr/local but you may change it with --prefix option to configure (see above). You can also build source-highlight using qmake. For further information, please look at the section "Building with qmake" in the manual. Building .rpm Christian W. Zuckschwerdt added support for building an .rpm and an .rpm.src. You can issue the following command rpm -tb source-highlight-1.9rc.tar.gz for building an .rpm with binaries and rpm -ts source-highlight-1.9rc.tar.gz for building an .rpm.src with sources. Patching from a previous version If you downloaded a patch, say source-highlight-1.3-1.3.1-patch.gz(i.e. the patch to go from version 1.3 to version 1.3.1), cd to the directory with sources from the previous version (source-highlight-1.3) and type: gunzip -cd ../source-highlight-1.3-1.3.1.patch.gz | patch -p1 and restart the compilation process (if you had already run configure a simple make will do). Usage and examples See the index.html in the doc directory for many examples. Use source-highlight with less This was suggested by Konstantine Serebriany. The script src-hilite-lesspipe.sh will be installed together with source-highlight. You can use the following environment variables: export LESSOPEN="| /path/to/src-hilite-lesspipe.sh %s" export LESS=' -R ' This way, when you use less to browse a file, if it is a source file handled by source-highlight, it will be automatically highlighted. Credits See CREDITS for detailed contributions and THANKS for a complete list of people that helped me with Source-highlight :-) Feedback Please tell me if you like this software :-) Actually I want to extend it, so if you have some ideas... The most import one will be to make source-highlight more customizable :-) Please send all bug reports by electronic mail to: bug-source-highlight at gnu.org TODO Here's the list of TODO stuff <TODO.txt>, if you'd like to contribute :-) Mailing Lists The following mailing lists are available: * help-source-highlight at gnu.org for generic discussions about the program and for asking for help about it (open mailing list), http://mail.gnu.org/mailman/listinfo/help-source-highlight * info-source-highlight at gnu.org for receiving information about new releases and features (read-only mailing list), http://mail.gnu.org/mailman/listinfo/info-source-highlight if you want to subscribe to a mailing list just go to the URL and follow the instructions, or send me an e-mail and I'll subscribe you. My home page is http://www.lorenzobettini.it source-highlight is free software. See the file COPYING for copying conditions. Anyway I won't get offended if you send me a postcard :-) ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/build-aux/�������������������������������������������������������������������0000775�0001750�0001750�00000000000�11676051670�013674� 5����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/build-aux/mdate-sh�����������������������������������������������������������0000755�0001750�0001750�00000012751�11672675561�015257� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh # Get modification time of a file or directory and pretty-print it. scriptversion=2009-04-28.21; # UTC # Copyright (C) 1995, 1996, 1997, 2003, 2004, 2005, 2007, 2009 Free # Software Foundation, Inc. # written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, June 1995 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to <bug-automake@gnu.org> or send patches to # <automake-patches@gnu.org>. case $1 in '') echo "$0: No file. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: mdate-sh [--help] [--version] FILE Pretty-print the modification time of FILE. Report bugs to <bug-automake@gnu.org>. EOF exit $? ;; -v | --v*) echo "mdate-sh $scriptversion" exit $? ;; esac # Prevent date giving response in another language. LANG=C export LANG LC_ALL=C export LC_ALL LC_TIME=C export LC_TIME # GNU ls changes its time format in response to the TIME_STYLE # variable. Since we cannot assume `unset' works, revert this # variable to its documented default. if test "${TIME_STYLE+set}" = set; then TIME_STYLE=posix-long-iso export TIME_STYLE fi save_arg1=$1 # Find out how to get the extended ls output of a file or directory. if ls -L /dev/null 1>/dev/null 2>&1; then ls_command='ls -L -l -d' else ls_command='ls -l -d' fi # Avoid user/group names that might have spaces, when possible. if ls -n /dev/null 1>/dev/null 2>&1; then ls_command="$ls_command -n" fi # A `ls -l' line looks as follows on OS/2. # drwxrwx--- 0 Aug 11 2001 foo # This differs from Unix, which adds ownership information. # drwxrwx--- 2 root root 4096 Aug 11 2001 foo # # To find the date, we split the line on spaces and iterate on words # until we find a month. This cannot work with files whose owner is a # user named `Jan', or `Feb', etc. However, it's unlikely that `/' # will be owned by a user whose name is a month. So we first look at # the extended ls output of the root directory to decide how many # words should be skipped to get the date. # On HPUX /bin/sh, "set" interprets "-rw-r--r--" as options, so the "x" below. set x`$ls_command /` # Find which argument is the month. month= command= until test $month do shift # Add another shift to the command. command="$command shift;" case $1 in Jan) month=January; nummonth=1;; Feb) month=February; nummonth=2;; Mar) month=March; nummonth=3;; Apr) month=April; nummonth=4;; May) month=May; nummonth=5;; Jun) month=June; nummonth=6;; Jul) month=July; nummonth=7;; Aug) month=August; nummonth=8;; Sep) month=September; nummonth=9;; Oct) month=October; nummonth=10;; Nov) month=November; nummonth=11;; Dec) month=December; nummonth=12;; esac done # Get the extended ls output of the file or directory. set dummy x`eval "$ls_command \"\$save_arg1\""` # Remove all preceding arguments eval $command # Because of the dummy argument above, month is in $2. # # On a POSIX system, we should have # # $# = 5 # $1 = file size # $2 = month # $3 = day # $4 = year or time # $5 = filename # # On Darwin 7.7.0 and 7.6.0, we have # # $# = 4 # $1 = day # $2 = month # $3 = year or time # $4 = filename # Get the month. case $2 in Jan) month=January; nummonth=1;; Feb) month=February; nummonth=2;; Mar) month=March; nummonth=3;; Apr) month=April; nummonth=4;; May) month=May; nummonth=5;; Jun) month=June; nummonth=6;; Jul) month=July; nummonth=7;; Aug) month=August; nummonth=8;; Sep) month=September; nummonth=9;; Oct) month=October; nummonth=10;; Nov) month=November; nummonth=11;; Dec) month=December; nummonth=12;; esac case $3 in ???*) day=$1;; *) day=$3; shift;; esac # Here we have to deal with the problem that the ls output gives either # the time of day or the year. case $3 in *:*) set `date`; eval year=\$$# case $2 in Jan) nummonthtod=1;; Feb) nummonthtod=2;; Mar) nummonthtod=3;; Apr) nummonthtod=4;; May) nummonthtod=5;; Jun) nummonthtod=6;; Jul) nummonthtod=7;; Aug) nummonthtod=8;; Sep) nummonthtod=9;; Oct) nummonthtod=10;; Nov) nummonthtod=11;; Dec) nummonthtod=12;; esac # For the first six month of the year the time notation can also # be used for files modified in the last year. if (expr $nummonth \> $nummonthtod) > /dev/null; then year=`expr $year - 1` fi;; *) year=$3;; esac # The result. echo $day $month $year # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: �����������������������source-highlight-3.1.6/build-aux/install-sh���������������������������������������������������������0000755�0001750�0001750�00000032464�11672675561�015636� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh # install - install a program, script, or datafile scriptversion=2006-12-25.00 # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_glob='?' initialize_posix_glob=' test "$posix_glob" != "?" || { if (set -f) 2>/dev/null; then posix_glob= else posix_glob=: fi } ' posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false no_target_directory= usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) dst_arg=$2 shift;; -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then trap '(exit $?); exit' 1 2 13 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names starting with `-'. case $src in -*) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # Protect names starting with `-'. case $dst in -*) dst=./$dst;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writeable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; -*) prefix='./';; *) prefix='';; esac eval "$initialize_posix_glob" oIFS=$IFS IFS=/ $posix_glob set -f set fnord $dstdir shift $posix_glob set +f IFS=$oIFS prefixes= for d do test -z "$d" && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && eval "$initialize_posix_glob" && $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && $posix_glob set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/build-aux/ltmain.sh����������������������������������������������������������0000755�0001750�0001750�00001050527�11672675561�015456� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������ # libtool (GNU libtool) 2.4 # Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, # 2007, 2008, 2009, 2010 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. # GNU Libtool 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. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, # or obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # Usage: $progname [OPTION]... [MODE-ARG]... # # Provide generalized library-building support services. # # --config show all configuration variables # --debug enable verbose shell tracing # -n, --dry-run display commands without modifying any files # --features display basic configuration information and exit # --mode=MODE use operation mode MODE # --preserve-dup-deps don't remove duplicate dependency libraries # --quiet, --silent don't print informational messages # --no-quiet, --no-silent # print informational messages (default) # --tag=TAG use configuration variables from tag TAG # -v, --verbose print more informational messages than default # --no-verbose don't print the extra informational messages # --version print version information # -h, --help, --help-all print short, long, or detailed help message # # MODE must be one of the following: # # clean remove files from the build directory # compile compile a source file into a libtool object # execute automatically set library path, then run a program # finish complete the installation of libtool libraries # install install libraries or executables # link create a library or an executable # uninstall remove libraries from an installed directory # # MODE-ARGS vary depending on the MODE. When passed as first option, # `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that. # Try `$progname --help --mode=MODE' for a more detailed description of MODE. # # When reporting a bug, please describe a test case to reproduce it and # include the following information: # # host-triplet: $host # shell: $SHELL # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) # $progname: (GNU libtool) 2.4 Debian-2.4-2ubuntu1 # automake: $automake_version # autoconf: $autoconf_version # # Report bugs to <bug-libtool@gnu.org>. # GNU libtool home page: <http://www.gnu.org/software/libtool/>. # General help using GNU software: <http://www.gnu.org/gethelp/>. PROGRAM=libtool PACKAGE=libtool VERSION="2.4 Debian-2.4-2ubuntu1" TIMESTAMP="" package_revision=1.3293 # 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+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } # NLS nuisances: We save the old values to restore during execute mode. lt_user_locale= lt_safe_locale= for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${$lt_var+set}\" = set; then save_$lt_var=\$$lt_var $lt_var=C export $lt_var lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" fi" done LC_ALL=C LANGUAGE=C export LANGUAGE LC_ALL $lt_unset CDPATH # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special # positional parameter $0, within a function call, is the name of the # function. progpath="$0" : ${CP="cp -f"} test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} : ${EGREP="/bin/grep -E"} : ${FGREP="/bin/grep -F"} : ${GREP="/bin/grep"} : ${LN_S="ln -s"} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SED="/bin/sed"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} : ${Xsed="$SED -e 1s/^X//"} # Global variables: EXIT_SUCCESS=0 EXIT_FAILURE=1 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. exit_status=$EXIT_SUCCESS # Make sure IFS has a sensible default lt_nl=' ' IFS=" $lt_nl" dirname="s,/[^/]*$,," basename="s,^.*/,," # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi } # func_dirname may be replaced by extended shell implementation # func_basename file func_basename () { func_basename_result=`$ECHO "${1}" | $SED "$basename"` } # func_basename may be replaced by extended shell implementation # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. func_dirname_and_basename () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` } # func_dirname_and_basename may be replaced by extended shell implementation # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # func_strip_suffix prefix name func_stripname () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname may be replaced by extended shell implementation # These SED scripts presuppose an absolute path with a trailing slash. pathcar='s,^/\([^/]*\).*$,\1,' pathcdr='s,^/[^/]*,,' removedotparts=':dotsl s@/\./@/@g t dotsl s,/\.$,/,' collapseslashes='s@/\{1,\}@/@g' finalslash='s,/*$,/,' # func_normal_abspath PATH # Remove doubled-up and trailing slashes, "." path components, # and cancel out any ".." path components in PATH after making # it an absolute path. # value returned in "$func_normal_abspath_result" func_normal_abspath () { # Start from root dir and reassemble the path. func_normal_abspath_result= func_normal_abspath_tpath=$1 func_normal_abspath_altnamespace= case $func_normal_abspath_tpath in "") # Empty path, that just means $cwd. func_stripname '' '/' "`pwd`" func_normal_abspath_result=$func_stripname_result return ;; # The next three entries are used to spot a run of precisely # two leading slashes without using negated character classes; # we take advantage of case's first-match behaviour. ///*) # Unusual form of absolute path, do nothing. ;; //*) # Not necessarily an ordinary path; POSIX reserves leading '//' # and for example Cygwin uses it to access remote file shares # over CIFS/SMB, so we conserve a leading double slash if found. func_normal_abspath_altnamespace=/ ;; /*) # Absolute path, do nothing. ;; *) # Relative path, prepend $cwd. func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath ;; esac # Cancel out all the simple stuff to save iterations. We also want # the path to end with a slash for ease of parsing, so make sure # there is one (and only one) here. func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"` while :; do # Processed it all yet? if test "$func_normal_abspath_tpath" = / ; then # If we ascended to the root using ".." the result may be empty now. if test -z "$func_normal_abspath_result" ; then func_normal_abspath_result=/ fi break fi func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$pathcar"` func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$pathcdr"` # Figure out what to do with it case $func_normal_abspath_tcomponent in "") # Trailing empty path component, ignore it. ;; ..) # Parent dir; strip last assembled component from result. func_dirname "$func_normal_abspath_result" func_normal_abspath_result=$func_dirname_result ;; *) # Actual path component, append it. func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent ;; esac done # Restore leading double-slash if one was found on entry. func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result } # func_relative_path SRCDIR DSTDIR # generates a relative path from SRCDIR to DSTDIR, with a trailing # slash if non-empty, suitable for immediately appending a filename # without needing to append a separator. # value returned in "$func_relative_path_result" func_relative_path () { func_relative_path_result= func_normal_abspath "$1" func_relative_path_tlibdir=$func_normal_abspath_result func_normal_abspath "$2" func_relative_path_tbindir=$func_normal_abspath_result # Ascend the tree starting from libdir while :; do # check if we have found a prefix of bindir case $func_relative_path_tbindir in $func_relative_path_tlibdir) # found an exact match func_relative_path_tcancelled= break ;; $func_relative_path_tlibdir*) # found a matching prefix func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" func_relative_path_tcancelled=$func_stripname_result if test -z "$func_relative_path_result"; then func_relative_path_result=. fi break ;; *) func_dirname $func_relative_path_tlibdir func_relative_path_tlibdir=${func_dirname_result} if test "x$func_relative_path_tlibdir" = x ; then # Have to descend all the way to the root! func_relative_path_result=../$func_relative_path_result func_relative_path_tcancelled=$func_relative_path_tbindir break fi func_relative_path_result=../$func_relative_path_result ;; esac done # Now calculate path; take care to avoid doubling-up slashes. func_stripname '' '/' "$func_relative_path_result" func_relative_path_result=$func_stripname_result func_stripname '/' '/' "$func_relative_path_tcancelled" if test "x$func_stripname_result" != x ; then func_relative_path_result=${func_relative_path_result}/${func_stripname_result} fi # Normalisation. If bindir is libdir, return empty string, # else relative path ending with a slash; either way, target # file name can be directly appended. if test ! -z "$func_relative_path_result"; then func_stripname './' '' "$func_relative_path_result/" func_relative_path_result=$func_stripname_result fi } # The name of this program: func_dirname_and_basename "$progpath" progname=$func_basename_result # Make sure we have an absolute path for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) progdir=$func_dirname_result progdir=`cd "$progdir" && pwd` progpath="$progdir/$progname" ;; *) save_IFS="$IFS" IFS=: for progdir in $PATH; do IFS="$save_IFS" test -x "$progdir/$progname" && break done IFS="$save_IFS" test -n "$progdir" || progdir=`pwd` progpath="$progdir/$progname" ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed="${SED}"' -e 1s/^X//' sed_quote_subst='s/\([`"$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution that turns a string into a regex matching for the # string literally. sed_make_literal_regex='s,[].[^$\\*\/],\\&,g' # Sed substitution that converts a w32 file name or path # which contains forward slashes, into one that contains # (escaped) backslashes. A very naive implementation. lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' # Re-`\' parameter expansions in output of double_quote_subst that were # `\'-ed in input to the same. If an odd number of `\' preceded a '$' # in input to double_quote_subst, that '$' was protected from expansion. # Since each input `\' is now two `\'s, look for any number of runs of # four `\'s followed by two `\'s and then a '$'. `\' that '$'. bs='\\' bs2='\\\\' bs4='\\\\\\\\' dollar='\$' sed_double_backslash="\ s/$bs4/&\\ /g s/^$bs2$dollar/$bs&/ s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g s/\n//g" # Standard options: opt_dry_run=false opt_help=false opt_quiet=false opt_verbose=false opt_warning=: # func_echo arg... # Echo program name prefixed message, along with the current mode # name if it has been set yet. func_echo () { $ECHO "$progname: ${opt_mode+$opt_mode: }$*" } # func_verbose arg... # Echo program name prefixed message in verbose mode only. func_verbose () { $opt_verbose && func_echo ${1+"$@"} # A bug in bash halts the script if the last line of a function # fails when set -e is in force, so we need another command to # work around that: : } # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } # func_error arg... # Echo program name prefixed message to standard error. func_error () { $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 } # func_warning arg... # Echo program name prefixed warning message to standard error. func_warning () { $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 # bash bug again: : } # func_fatal_error arg... # Echo program name prefixed message to standard error, and exit. func_fatal_error () { func_error ${1+"$@"} exit $EXIT_FAILURE } # func_fatal_help arg... # Echo program name prefixed message to standard error, followed by # a help hint, and exit. func_fatal_help () { func_error ${1+"$@"} func_fatal_error "$help" } help="Try \`$progname --help' for more information." ## default # func_grep expression filename # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { $GREP "$1" "$2" >/dev/null 2>&1 } # func_mkdir_p directory-path # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { my_directory_path="$1" my_dir_list= if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then # Protect directory names starting with `-' case $my_directory_path in -*) my_directory_path="./$my_directory_path" ;; esac # While some portion of DIR does not yet exist... while test ! -d "$my_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. my_dir_list="$my_directory_path:$my_dir_list" # If the last portion added has no slash in it, the list is done case $my_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"` done my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'` save_mkdir_p_IFS="$IFS"; IFS=':' for my_dir in $my_dir_list; do IFS="$save_mkdir_p_IFS" # mkdir can fail with a `File exist' error if two processes # try to create one of the directories concurrently. Don't # stop in that case! $MKDIR "$my_dir" 2>/dev/null || : done IFS="$save_mkdir_p_IFS" # Bail out if we (or some other process) failed to create a directory. test -d "$my_directory_path" || \ func_fatal_error "Failed to create \`$1'" fi } # func_mktempdir [string] # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, STRING is the basename for that directory. func_mktempdir () { my_template="${TMPDIR-/tmp}/${1-$progname}" if test "$opt_dry_run" = ":"; then # Return a directory name, but don't create it in dry-run mode my_tmpdir="${my_template}-$$" else # If mktemp works, use that first and foremost my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` if test ! -d "$my_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race my_tmpdir="${my_template}-${RANDOM-0}$$" save_mktempdir_umask=`umask` umask 0077 $MKDIR "$my_tmpdir" umask $save_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$my_tmpdir" || \ func_fatal_error "cannot create temporary directory \`$my_tmpdir'" fi $ECHO "$my_tmpdir" } # func_quote_for_eval arg # Aesthetically quote ARG to be evaled later. # This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT # is double-quoted, suitable for a subsequent eval, whereas # FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters # which are still active within double quotes backslashified. func_quote_for_eval () { case $1 in *[\\\`\"\$]*) func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;; *) func_quote_for_eval_unquoted_result="$1" ;; esac case $func_quote_for_eval_unquoted_result in # Double-quote args containing shell metacharacters to delay # word splitting, command substitution and and variable # expansion for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" ;; *) func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" esac } # func_quote_for_expand arg # Aesthetically quote ARG to be evaled later; same as above, # but do not quote variable references. func_quote_for_expand () { case $1 in *[\\\`\"]*) my_arg=`$ECHO "$1" | $SED \ -e "$double_quote_subst" -e "$sed_double_backslash"` ;; *) my_arg="$1" ;; esac case $my_arg in # Double-quote args containing shell metacharacters to delay # word splitting and command substitution for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") my_arg="\"$my_arg\"" ;; esac func_quote_for_expand_result="$my_arg" } # func_show_eval cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. func_show_eval () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$my_cmd" my_status=$? if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_show_eval_locale cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. Use the saved locale for evaluation. func_show_eval_locale () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$lt_user_locale $my_cmd" my_status=$? eval "$lt_safe_locale" if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_tr_sh # Turn $1 into a string suitable for a shell variable name. # Result is stored in $func_tr_sh_result. All characters # not in the set a-zA-Z0-9_ are replaced with '_'. Further, # if $1 begins with a digit, a '_' is prepended as well. func_tr_sh () { case $1 in [0-9]* | *[!a-zA-Z0-9_]*) func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'` ;; * ) func_tr_sh_result=$1 ;; esac } # func_version # Echo version message to standard output and exit. func_version () { $opt_debug $SED -n '/(C)/!b go :more /\./!{ N s/\n# / / b more } :go /^# '$PROGRAM' (GNU /,/# warranty; / { s/^# // s/^# *$// s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ p }' < "$progpath" exit $? } # func_usage # Echo short help message to standard output and exit. func_usage () { $opt_debug $SED -n '/^# Usage:/,/^# *.*--help/ { s/^# // s/^# *$// s/\$progname/'$progname'/ p }' < "$progpath" echo $ECHO "run \`$progname --help | more' for full usage" exit $? } # func_help [NOEXIT] # Echo long help message to standard output and exit, # unless 'noexit' is passed as argument. func_help () { $opt_debug $SED -n '/^# Usage:/,/# Report bugs to/ { :print s/^# // s/^# *$// s*\$progname*'$progname'* s*\$host*'"$host"'* s*\$SHELL*'"$SHELL"'* s*\$LTCC*'"$LTCC"'* s*\$LTCFLAGS*'"$LTCFLAGS"'* s*\$LD*'"$LD"'* s/\$with_gnu_ld/'"$with_gnu_ld"'/ s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ p d } /^# .* home page:/b print /^# General help using/b print ' < "$progpath" ret=$? if test -z "$1"; then exit $ret fi } # func_missing_arg argname # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { $opt_debug func_error "missing argument for $1." exit_cmd=exit } # func_split_short_opt shortopt # Set func_split_short_opt_name and func_split_short_opt_arg shell # variables after splitting SHORTOPT after the 2nd character. func_split_short_opt () { my_sed_short_opt='1s/^\(..\).*$/\1/;q' my_sed_short_rest='1s/^..\(.*\)$/\1/;q' func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"` func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"` } # func_split_short_opt may be replaced by extended shell implementation # func_split_long_opt longopt # Set func_split_long_opt_name and func_split_long_opt_arg shell # variables after splitting LONGOPT at the `=' sign. func_split_long_opt () { my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q' my_sed_long_arg='1s/^--[^=]*=//' func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"` func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"` } # func_split_long_opt may be replaced by extended shell implementation exit_cmd=: magic="%%%MAGIC variable%%%" magic_exe="%%%MAGIC EXE variable%%%" # Global variables. nonopt= preserve_args= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" extracted_archives= extracted_serial=0 # If this variable is set in any of the actions, the command in it # will be execed at the end. This prevents here-documents from being # left over by shells. exec_cmd= # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "${1}=\$${1}\${2}" } # func_append may be replaced by extended shell implementation # func_append_quoted var value # Quote VALUE and append to the end of shell variable VAR, separated # by a space. func_append_quoted () { func_quote_for_eval "${2}" eval "${1}=\$${1}\\ \$func_quote_for_eval_result" } # func_append_quoted may be replaced by extended shell implementation # func_arith arithmetic-term... func_arith () { func_arith_result=`expr "${@}"` } # func_arith may be replaced by extended shell implementation # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len` } # func_len may be replaced by extended shell implementation # func_lo2o object func_lo2o () { func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` } # func_lo2o may be replaced by extended shell implementation # func_xform libobj-or-source func_xform () { func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` } # func_xform may be replaced by extended shell implementation # func_fatal_configuration arg... # Echo program name prefixed message to standard error, followed by # a configuration failure hint, and exit. func_fatal_configuration () { func_error ${1+"$@"} func_error "See the $PACKAGE documentation for more information." func_fatal_error "Fatal configuration error." } # func_config # Display the configuration for all the tags in this script. func_config () { re_begincf='^# ### BEGIN LIBTOOL' re_endcf='^# ### END LIBTOOL' # Default configuration. $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" # Now print the configurations for the tags. for tagname in $taglist; do $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" done exit $? } # func_features # Display the features supported by this script. func_features () { echo "host: $host" if test "$build_libtool_libs" = yes; then echo "enable shared libraries" else echo "disable shared libraries" fi if test "$build_old_libs" = yes; then echo "enable static libraries" else echo "disable static libraries" fi exit $? } # func_enable_tag tagname # Verify that TAGNAME is valid, and either flag an error and exit, or # enable the TAGNAME tag. We also add TAGNAME to the global $taglist # variable here. func_enable_tag () { # Global variable: tagname="$1" re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" sed_extractcf="/$re_begincf/,/$re_endcf/p" # Validate tagname. case $tagname in *[!-_A-Za-z0-9,/]*) func_fatal_error "invalid tag name: $tagname" ;; esac # Don't test for the "default" C tag, as we know it's # there but not specially marked. case $tagname in CC) ;; *) if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then taglist="$taglist $tagname" # Evaluate the configuration. Be careful to quote the path # and the sed script, to avoid splitting on whitespace, but # also don't use non-portable quotes within backquotes within # quotes we have to do it in 2 steps: extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` eval "$extractedcf" else func_error "ignoring unknown tag $tagname" fi ;; esac } # func_check_version_match # Ensure that we are using m4 macros, and libtool script from the same # release of libtool. func_check_version_match () { if test "$package_revision" != "$macro_revision"; then if test "$VERSION" != "$macro_version"; then if test -z "$macro_version"; then cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from an older release. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from $PACKAGE $macro_version. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF fi else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, $progname: but the definition of this LT_INIT comes from revision $macro_revision. $progname: You should recreate aclocal.m4 with macros from revision $package_revision $progname: of $PACKAGE $VERSION and run autoconf again. _LT_EOF fi exit $EXIT_MISMATCH fi } # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) shift; set dummy --mode clean ${1+"$@"}; shift ;; compile|compil|compi|comp|com|co|c) shift; set dummy --mode compile ${1+"$@"}; shift ;; execute|execut|execu|exec|exe|ex|e) shift; set dummy --mode execute ${1+"$@"}; shift ;; finish|finis|fini|fin|fi|f) shift; set dummy --mode finish ${1+"$@"}; shift ;; install|instal|insta|inst|ins|in|i) shift; set dummy --mode install ${1+"$@"}; shift ;; link|lin|li|l) shift; set dummy --mode link ${1+"$@"}; shift ;; uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; esac # Option defaults: opt_debug=: opt_dry_run=false opt_config=false opt_preserve_dup_deps=false opt_features=false opt_finish=false opt_help=false opt_help_all=false opt_silent=: opt_verbose=: opt_silent=false opt_verbose=false # Parse options once, thoroughly. This comes as soon as possible in the # script to make things like `--version' happen as quickly as we can. { # this just eases exit handling while test $# -gt 0; do opt="$1" shift case $opt in --debug|-x) opt_debug='set -x' func_echo "enabling shell trace mode" $opt_debug ;; --dry-run|--dryrun|-n) opt_dry_run=: ;; --config) opt_config=: func_config ;; --dlopen|-dlopen) optarg="$1" opt_dlopen="${opt_dlopen+$opt_dlopen }$optarg" shift ;; --preserve-dup-deps) opt_preserve_dup_deps=: ;; --features) opt_features=: func_features ;; --finish) opt_finish=: set dummy --mode finish ${1+"$@"}; shift ;; --help) opt_help=: ;; --help-all) opt_help_all=: opt_help=': help-all' ;; --mode) test $# = 0 && func_missing_arg $opt && break optarg="$1" opt_mode="$optarg" case $optarg in # Valid mode arguments: clean|compile|execute|finish|install|link|relink|uninstall) ;; # Catch anything else as an error *) func_error "invalid argument for $opt" exit_cmd=exit break ;; esac shift ;; --no-silent|--no-quiet) opt_silent=false func_append preserve_args " $opt" ;; --no-verbose) opt_verbose=false func_append preserve_args " $opt" ;; --silent|--quiet) opt_silent=: func_append preserve_args " $opt" opt_verbose=false ;; --verbose|-v) opt_verbose=: func_append preserve_args " $opt" opt_silent=false ;; --tag) test $# = 0 && func_missing_arg $opt && break optarg="$1" opt_tag="$optarg" func_append preserve_args " $opt $optarg" func_enable_tag "$optarg" shift ;; -\?|-h) func_usage ;; --help) func_help ;; --version) func_version ;; # Separate optargs to long options: --*=*) func_split_long_opt "$opt" set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"} shift ;; # Separate non-argument short options: -\?*|-h*|-n*|-v*) func_split_short_opt "$opt" set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"} shift ;; --) break ;; -*) func_fatal_help "unrecognized option \`$opt'" ;; *) set dummy "$opt" ${1+"$@"}; shift; break ;; esac done # Validate options: # save first non-option argument if test "$#" -gt 0; then nonopt="$opt" shift fi # preserve --debug test "$opt_debug" = : || func_append preserve_args " --debug" case $host in *cygwin* | *mingw* | *pw32* | *cegcc*) # don't eliminate duplications in $postdeps and $predeps opt_duplicate_compiler_generated_deps=: ;; *) opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps ;; esac $opt_help || { # Sanity checks first: func_check_version_match if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then func_fatal_configuration "not configured to build any kind of library" fi # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Only execute mode is allowed to have -dlopen flags. if test -n "$opt_dlopen" && test "$opt_mode" != execute; then func_error "unrecognized option \`-dlopen'" $ECHO "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help="$help" help="Try \`$progname --help --mode=$opt_mode' for more information." } # Bail if the options were screwed $exit_cmd $EXIT_FAILURE } ## ----------- ## ## Main. ## ## ----------- ## # func_lalib_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_lalib_p () { test -f "$1" && $SED -e 4q "$1" 2>/dev/null \ | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 } # func_lalib_unsafe_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function implements the same check as func_lalib_p without # resorting to external programs. To this end, it redirects stdin and # closes it afterwards, without saving the original file descriptor. # As a safety measure, use it only where a negative result would be # fatal anyway. Works if `file' does not exist. func_lalib_unsafe_p () { lalib_p=no if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then for lalib_p_l in 1 2 3 4 do read lalib_p_line case "$lalib_p_line" in \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done exec 0<&5 5<&- fi test "$lalib_p" = yes } # func_ltwrapper_script_p file # True iff FILE is a libtool wrapper script # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_script_p () { func_lalib_p "$1" } # func_ltwrapper_executable_p file # True iff FILE is a libtool wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_executable_p () { func_ltwrapper_exec_suffix= case $1 in *.exe) ;; *) func_ltwrapper_exec_suffix=.exe ;; esac $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 } # func_ltwrapper_scriptname file # Assumes file is an ltwrapper_executable # uses $file to determine the appropriate filename for a # temporary ltwrapper_script. func_ltwrapper_scriptname () { func_dirname_and_basename "$1" "" "." func_stripname '' '.exe' "$func_basename_result" func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" } # func_ltwrapper_p file # True iff FILE is a libtool wrapper script or wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_p () { func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" } # func_execute_cmds commands fail_cmd # Execute tilde-delimited COMMANDS. # If FAIL_CMD is given, eval that upon failure. # FAIL_CMD may read-access the current command in variable CMD! func_execute_cmds () { $opt_debug save_ifs=$IFS; IFS='~' for cmd in $1; do IFS=$save_ifs eval cmd=\"$cmd\" func_show_eval "$cmd" "${2-:}" done IFS=$save_ifs } # func_source file # Source FILE, adding directory component if necessary. # Note that it is not necessary on cygwin/mingw to append a dot to # FILE even if both FILE and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # `FILE.' does not work on cygwin managed mounts. func_source () { $opt_debug case $1 in */* | *\\*) . "$1" ;; *) . "./$1" ;; esac } # func_resolve_sysroot PATH # Replace a leading = in PATH with a sysroot. Store the result into # func_resolve_sysroot_result func_resolve_sysroot () { func_resolve_sysroot_result=$1 case $func_resolve_sysroot_result in =*) func_stripname '=' '' "$func_resolve_sysroot_result" func_resolve_sysroot_result=$lt_sysroot$func_stripname_result ;; esac } # func_replace_sysroot PATH # If PATH begins with the sysroot, replace it with = and # store the result into func_replace_sysroot_result. func_replace_sysroot () { case "$lt_sysroot:$1" in ?*:"$lt_sysroot"*) func_stripname "$lt_sysroot" '' "$1" func_replace_sysroot_result="=$func_stripname_result" ;; *) # Including no sysroot. func_replace_sysroot_result=$1 ;; esac } # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' func_infer_tag () { $opt_debug if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case "$@ " in " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then func_echo "unable to infer tagged configuration" func_fatal_error "specify a tag with \`--tag'" # else # func_verbose "using $tagname tagged configuration" fi ;; esac fi } # func_write_libtool_object output_name pic_name nonpic_name # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. func_write_libtool_object () { write_libobj=${1} if test "$build_libtool_libs" = yes; then write_lobj=\'${2}\' else write_lobj=none fi if test "$build_old_libs" = yes; then write_oldobj=\'${3}\' else write_oldobj=none fi $opt_dry_run || { cat >${write_libobj}T <<EOF # $write_libobj - a libtool object file # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # Please DO NOT delete this file! # It is necessary for linking the library. # Name of the PIC object. pic_object=$write_lobj # Name of the non-PIC object non_pic_object=$write_oldobj EOF $MV "${write_libobj}T" "${write_libobj}" } } ################################################## # FILE NAME AND PATH CONVERSION HELPER FUNCTIONS # ################################################## # func_convert_core_file_wine_to_w32 ARG # Helper function used by file name conversion functions when $build is *nix, # and $host is mingw, cygwin, or some other w32 environment. Relies on a # correctly configured wine environment available, with the winepath program # in $build's $PATH. # # ARG is the $build file name to be converted to w32 format. # Result is available in $func_convert_core_file_wine_to_w32_result, and will # be empty on error (or when ARG is empty) func_convert_core_file_wine_to_w32 () { $opt_debug func_convert_core_file_wine_to_w32_result="$1" if test -n "$1"; then # Unfortunately, winepath does not exit with a non-zero error code, so we # are forced to check the contents of stdout. On the other hand, if the # command is not found, the shell will set an exit code of 127 and print # *an error message* to stdout. So we must check for both error code of # zero AND non-empty stdout, which explains the odd construction: func_convert_core_file_wine_to_w32_tmp=`winepath -w "$1" 2>/dev/null` if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | $SED -e "$lt_sed_naive_backslashify"` else func_convert_core_file_wine_to_w32_result= fi fi } # end: func_convert_core_file_wine_to_w32 # func_convert_core_path_wine_to_w32 ARG # Helper function used by path conversion functions when $build is *nix, and # $host is mingw, cygwin, or some other w32 environment. Relies on a correctly # configured wine environment available, with the winepath program in $build's # $PATH. Assumes ARG has no leading or trailing path separator characters. # # ARG is path to be converted from $build format to win32. # Result is available in $func_convert_core_path_wine_to_w32_result. # Unconvertible file (directory) names in ARG are skipped; if no directory names # are convertible, then the result may be empty. func_convert_core_path_wine_to_w32 () { $opt_debug # unfortunately, winepath doesn't convert paths, only file names func_convert_core_path_wine_to_w32_result="" if test -n "$1"; then oldIFS=$IFS IFS=: for func_convert_core_path_wine_to_w32_f in $1; do IFS=$oldIFS func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" if test -n "$func_convert_core_file_wine_to_w32_result" ; then if test -z "$func_convert_core_path_wine_to_w32_result"; then func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result" else func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" fi fi done IFS=$oldIFS fi } # end: func_convert_core_path_wine_to_w32 # func_cygpath ARGS... # Wrapper around calling the cygpath program via LT_CYGPATH. This is used when # when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) # $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or # (2), returns the Cygwin file name or path in func_cygpath_result (input # file name or path is assumed to be in w32 format, as previously converted # from $build's *nix or MSYS format). In case (3), returns the w32 file name # or path in func_cygpath_result (input file name or path is assumed to be in # Cygwin format). Returns an empty string on error. # # ARGS are passed to cygpath, with the last one being the file name or path to # be converted. # # Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH # environment variable; do not put it in $PATH. func_cygpath () { $opt_debug if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` if test "$?" -ne 0; then # on failure, ensure result is empty func_cygpath_result= fi else func_cygpath_result= func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'" fi } #end: func_cygpath # func_convert_core_msys_to_w32 ARG # Convert file name or path ARG from MSYS format to w32 format. Return # result in func_convert_core_msys_to_w32_result. func_convert_core_msys_to_w32 () { $opt_debug # awkward: cmd appends spaces to result func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` } #end: func_convert_core_msys_to_w32 # func_convert_file_check ARG1 ARG2 # Verify that ARG1 (a file name in $build format) was converted to $host # format in ARG2. Otherwise, emit an error message, but continue (resetting # func_to_host_file_result to ARG1). func_convert_file_check () { $opt_debug if test -z "$2" && test -n "$1" ; then func_error "Could not determine host file name corresponding to" func_error " \`$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback: func_to_host_file_result="$1" fi } # end func_convert_file_check # func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH # Verify that FROM_PATH (a path in $build format) was converted to $host # format in TO_PATH. Otherwise, emit an error message, but continue, resetting # func_to_host_file_result to a simplistic fallback value (see below). func_convert_path_check () { $opt_debug if test -z "$4" && test -n "$3"; then func_error "Could not determine the host path corresponding to" func_error " \`$3'" func_error "Continuing, but uninstalled executables may not work." # Fallback. This is a deliberately simplistic "conversion" and # should not be "improved". See libtool.info. if test "x$1" != "x$2"; then lt_replace_pathsep_chars="s|$1|$2|g" func_to_host_path_result=`echo "$3" | $SED -e "$lt_replace_pathsep_chars"` else func_to_host_path_result="$3" fi fi } # end func_convert_path_check # func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG # Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT # and appending REPL if ORIG matches BACKPAT. func_convert_path_front_back_pathsep () { $opt_debug case $4 in $1 ) func_to_host_path_result="$3$func_to_host_path_result" ;; esac case $4 in $2 ) func_append func_to_host_path_result "$3" ;; esac } # end func_convert_path_front_back_pathsep ################################################## # $build to $host FILE NAME CONVERSION FUNCTIONS # ################################################## # invoked via `$to_host_file_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # Result will be available in $func_to_host_file_result. # func_to_host_file ARG # Converts the file name ARG from $build format to $host format. Return result # in func_to_host_file_result. func_to_host_file () { $opt_debug $to_host_file_cmd "$1" } # end func_to_host_file # func_to_tool_file ARG LAZY # converts the file name ARG from $build format to toolchain format. Return # result in func_to_tool_file_result. If the conversion in use is listed # in (the comma separated) LAZY, no conversion takes place. func_to_tool_file () { $opt_debug case ,$2, in *,"$to_tool_file_cmd",*) func_to_tool_file_result=$1 ;; *) $to_tool_file_cmd "$1" func_to_tool_file_result=$func_to_host_file_result ;; esac } # end func_to_tool_file # func_convert_file_noop ARG # Copy ARG to func_to_host_file_result. func_convert_file_noop () { func_to_host_file_result="$1" } # end func_convert_file_noop # func_convert_file_msys_to_w32 ARG # Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_file_result. func_convert_file_msys_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_to_host_file_result="$func_convert_core_msys_to_w32_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_w32 # func_convert_file_cygwin_to_w32 ARG # Convert file name ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_file_cygwin_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then # because $build is cygwin, we call "the" cygpath in $PATH; no need to use # LT_CYGPATH in this case. func_to_host_file_result=`cygpath -m "$1"` fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_cygwin_to_w32 # func_convert_file_nix_to_w32 ARG # Convert file name ARG from *nix to w32 format. Requires a wine environment # and a working winepath. Returns result in func_to_host_file_result. func_convert_file_nix_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_file_wine_to_w32 "$1" func_to_host_file_result="$func_convert_core_file_wine_to_w32_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_w32 # func_convert_file_msys_to_cygwin ARG # Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_file_msys_to_cygwin () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_cygpath -u "$func_convert_core_msys_to_w32_result" func_to_host_file_result="$func_cygpath_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_cygwin # func_convert_file_nix_to_cygwin ARG # Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed # in a wine environment, working winepath, and LT_CYGPATH set. Returns result # in func_to_host_file_result. func_convert_file_nix_to_cygwin () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. func_convert_core_file_wine_to_w32 "$1" func_cygpath -u "$func_convert_core_file_wine_to_w32_result" func_to_host_file_result="$func_cygpath_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_cygwin ############################################# # $build to $host PATH CONVERSION FUNCTIONS # ############################################# # invoked via `$to_host_path_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # The result will be available in $func_to_host_path_result. # # Path separators are also converted from $build format to $host format. If # ARG begins or ends with a path separator character, it is preserved (but # converted to $host format) on output. # # All path conversion functions are named using the following convention: # file name conversion function : func_convert_file_X_to_Y () # path conversion function : func_convert_path_X_to_Y () # where, for any given $build/$host combination the 'X_to_Y' value is the # same. If conversion functions are added for new $build/$host combinations, # the two new functions must follow this pattern, or func_init_to_host_path_cmd # will break. # func_init_to_host_path_cmd # Ensures that function "pointer" variable $to_host_path_cmd is set to the # appropriate value, based on the value of $to_host_file_cmd. to_host_path_cmd= func_init_to_host_path_cmd () { $opt_debug if test -z "$to_host_path_cmd"; then func_stripname 'func_convert_file_' '' "$to_host_file_cmd" to_host_path_cmd="func_convert_path_${func_stripname_result}" fi } # func_to_host_path ARG # Converts the path ARG from $build format to $host format. Return result # in func_to_host_path_result. func_to_host_path () { $opt_debug func_init_to_host_path_cmd $to_host_path_cmd "$1" } # end func_to_host_path # func_convert_path_noop ARG # Copy ARG to func_to_host_path_result. func_convert_path_noop () { func_to_host_path_result="$1" } # end func_convert_path_noop # func_convert_path_msys_to_w32 ARG # Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_path_result. func_convert_path_msys_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # Remove leading and trailing path separator characters from ARG. MSYS # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; # and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result="$func_convert_core_msys_to_w32_result" func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_msys_to_w32 # func_convert_path_cygwin_to_w32 ARG # Convert path ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_path_cygwin_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_cygwin_to_w32 # func_convert_path_nix_to_w32 ARG # Convert path ARG from *nix to w32 format. Requires a wine environment and # a working winepath. Returns result in func_to_host_file_result. func_convert_path_nix_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result="$func_convert_core_path_wine_to_w32_result" func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_nix_to_w32 # func_convert_path_msys_to_cygwin ARG # Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_path_msys_to_cygwin () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_msys_to_w32_result" func_to_host_path_result="$func_cygpath_result" func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_msys_to_cygwin # func_convert_path_nix_to_cygwin ARG # Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a # a wine environment, working winepath, and LT_CYGPATH set. Returns result in # func_to_host_file_result. func_convert_path_nix_to_cygwin () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # Remove leading and trailing path separator characters from # ARG. msys behavior is inconsistent here, cygpath turns them # into '.;' and ';.', and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" func_to_host_path_result="$func_cygpath_result" func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_nix_to_cygwin # func_mode_compile arg... func_mode_compile () { $opt_debug # Get the compilation command and the source file. base_compile= srcfile="$nonopt" # always keep a non-empty value in "srcfile" suppress_opt=yes suppress_output= arg_mode=normal libobj= later= pie_flag= for arg do case $arg_mode in arg ) # do not "continue". Instead, add this to base_compile lastarg="$arg" arg_mode=normal ;; target ) libobj="$arg" arg_mode=normal continue ;; normal ) # Accept any command-line options. case $arg in -o) test -n "$libobj" && \ func_fatal_error "you cannot specify \`-o' more than once" arg_mode=target continue ;; -pie | -fpie | -fPIE) func_append pie_flag " $arg" continue ;; -shared | -static | -prefer-pic | -prefer-non-pic) func_append later " $arg" continue ;; -no-suppress) suppress_opt=no continue ;; -Xcompiler) arg_mode=arg # the next one goes into the "base_compile" arg list continue # The current "srcfile" will either be retained or ;; # replaced later. I would guess that would be a bug. -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result lastarg= save_ifs="$IFS"; IFS=',' for arg in $args; do IFS="$save_ifs" func_append_quoted lastarg "$arg" done IFS="$save_ifs" func_stripname ' ' '' "$lastarg" lastarg=$func_stripname_result # Add the arguments to base_compile. func_append base_compile " $lastarg" continue ;; *) # Accept the current argument as the source file. # The previous "srcfile" becomes the current argument. # lastarg="$srcfile" srcfile="$arg" ;; esac # case $arg ;; esac # case $arg_mode # Aesthetically quote the previous argument. func_append_quoted base_compile "$lastarg" done # for arg case $arg_mode in arg) func_fatal_error "you must specify an argument for -Xcompile" ;; target) func_fatal_error "you must specify a target with \`-o'" ;; *) # Get the name of the library object. test -z "$libobj" && { func_basename "$srcfile" libobj="$func_basename_result" } ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo case $libobj in *.[cCFSifmso] | \ *.ada | *.adb | *.ads | *.asm | \ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ *.[fF][09]? | *.for | *.java | *.obj | *.sx | *.cu | *.cup) func_xform "$libobj" libobj=$func_xform_result ;; esac case $libobj in *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; *) func_fatal_error "cannot determine name of library object from \`$libobj'" ;; esac func_infer_tag $base_compile for arg in $later; do case $arg in -shared) test "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no continue ;; -static) build_libtool_libs=no build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; esac done func_quote_for_eval "$libobj" test "X$libobj" != "X$func_quote_for_eval_result" \ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ && func_warning "libobj name \`$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" objname="$func_basename_result" xdir="$func_dirname_result" lobj=${xdir}$objdir/$objname test -z "$base_compile" && \ func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. if test "$build_old_libs" = yes; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2* | cegcc*) pic_mode=default ;; esac if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test "$need_locks" = yes; then until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done elif test "$need_locks" = warn; then if test -f "$lockfile"; then $ECHO "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi func_append removelist " $output_obj" $ECHO "$srcfile" > "$lockfile" fi $opt_dry_run || $RM $removelist func_append removelist " $lockfile" trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 srcfile=$func_to_tool_file_result func_quote_for_eval "$srcfile" qsrcfile=$func_quote_for_eval_result # Only build a PIC object if we are building libtool libraries. if test "$build_libtool_libs" = yes; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile if test "$pic_mode" != no; then command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code command="$base_compile $qsrcfile" fi func_mkdir_p "$xdir$objdir" if test -z "$output_obj"; then # Place PIC objects in $objdir func_append command " -o $lobj" fi func_show_eval_locale "$command" \ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then func_show_eval '$MV "$output_obj" "$lobj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi # Allow error messages only from the first compilation. if test "$suppress_opt" = yes; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. if test "$build_old_libs" = yes; then if test "$pic_mode" != yes; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi if test "$compiler_c_o" = yes; then func_append command " -o $obj" fi # Suppress compiler output if we already did a PIC compilation. func_append command "$suppress_output" func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then func_show_eval '$MV "$output_obj" "$obj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi fi $opt_dry_run || { func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" # Unlock the critical section if it was locked if test "$need_locks" != no; then removelist=$lockfile $RM "$lockfile" fi } exit $EXIT_SUCCESS } $opt_help || { test "$opt_mode" = compile && func_mode_compile ${1+"$@"} } func_mode_help () { # We need to display help for each of the modes. case $opt_mode in "") # Generic help is extracted from the usage comments # at the start of this file. func_help ;; clean) $ECHO \ "Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $ECHO \ "Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -no-suppress do not suppress compiler output for multiple passes -prefer-pic try to build PIC objects only -prefer-non-pic try to build non-PIC objects only -shared do not build a \`.o' file suitable for static linking -static only build a \`.o' file suitable for static linking -Wc,FLAG pass FLAG directly to the compiler COMPILE-COMMAND is a command to be used in creating a \`standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix \`.c' with the library object suffix, \`.lo'." ;; execute) $ECHO \ "Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to \`-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $ECHO \ "Usage: $progname [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the \`--dry-run' option if you just want to see what would be executed." ;; install) $ECHO \ "Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the \`install' or \`cp' program. The following components of INSTALL-COMMAND are treated specially: -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $ECHO \ "Usage: $progname [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -bindir BINDIR specify path to binaries directory (for systems where libraries must be found in the PATH setting at runtime) -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE Use a list of object files found in FILE to specify objects -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -shared only do dynamic linking of libtool libraries -shrext SUFFIX override the standard shared library file extension -static do not do any dynamic linking of uninstalled libtool libraries -static-libtool-libs do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] -weak LIBNAME declare that the target provides the LIBNAME interface -Wc,FLAG -Xcompiler FLAG pass linker-specific FLAG directly to the compiler -Wl,FLAG -Xlinker FLAG pass linker-specific FLAG directly to the linker -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) All other options (arguments beginning with \`-') are ignored. Every other argument is treated as a filename. Files ending in \`.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only library objects (\`.lo' files) may be specified, and \`-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created using \`ar' and \`ranlib', or on Windows using \`lib'. If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $ECHO \ "Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) func_fatal_help "invalid operation mode \`$opt_mode'" ;; esac echo $ECHO "Try \`$progname --help' for more information about other modes." } # Now that we've collected a possible --mode arg, show help if necessary if $opt_help; then if test "$opt_help" = :; then func_mode_help else { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do func_mode_help done } | sed -n '1p; 2,$s/^Usage:/ or: /p' { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do echo func_mode_help done } | sed '1d /^When reporting/,/^Report/{ H d } $x /information about other modes/d /more detailed .*MODE/d s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' fi exit $? fi # func_mode_execute arg... func_mode_execute () { $opt_debug # The first argument is the command name. cmd="$nonopt" test -z "$cmd" && \ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. for file in $opt_dlopen; do test -f "$file" \ || func_fatal_help "\`$file' is not a file" dir= case $file in *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$lib' is not a valid libtool archive" # Read the libtool library. dlname= library_names= func_source "$file" # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && \ func_warning "\`$file' was not linked with \`-export-dynamic'" continue fi func_dirname "$file" "" "." dir="$func_dirname_result" if test -f "$dir/$objdir/$dlname"; then func_append dir "/$objdir" else if test ! -f "$dir/$dlname"; then func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" fi fi ;; *.lo) # Just add the directory containing the .lo file. func_dirname "$file" "" "." dir="$func_dirname_result" ;; *) func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir="$absdir" # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic="$magic" # Check if any of the arguments is a wrapper script. args= for file do case $file in -* | *.la | *.lo ) ;; *) # Do a test to see if this is really a libtool program. if func_ltwrapper_script_p "$file"; then func_source "$file" # Transform arg to wrapped name. file="$progdir/$program" elif func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" func_source "$func_ltwrapper_scriptname_result" # Transform arg to wrapped name. file="$progdir/$program" fi ;; esac # Quote arguments (to preserve shell metacharacters). func_append_quoted args "$file" done if test "X$opt_dry_run" = Xfalse; then if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${save_$lt_var+set}\" = set; then $lt_var=\$save_$lt_var; export $lt_var else $lt_unset $lt_var fi" done # Now prepare to actually exec the command. exec_cmd="\$cmd$args" else # Display what would be done. if test -n "$shlibpath_var"; then eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" echo "export $shlibpath_var" fi $ECHO "$cmd$args" exit $EXIT_SUCCESS fi } test "$opt_mode" = execute && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $opt_debug libs= libdirs= admincmds= for opt in "$nonopt" ${1+"$@"} do if test -d "$opt"; then func_append libdirs " $opt" elif test -f "$opt"; then if func_lalib_unsafe_p "$opt"; then func_append libs " $opt" else func_warning "\`$opt' is not a valid libtool archive" fi else func_fatal_error "invalid argument \`$opt'" fi done if test -n "$libs"; then if test -n "$lt_sysroot"; then sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" else sysroot_cmd= fi # Remove sysroot references if $opt_dry_run; then for lib in $libs; do echo "removing references to $lt_sysroot and \`=' prefixes from $lib" done else tmpdir=`func_mktempdir` for lib in $libs; do sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ > $tmpdir/tmp-la mv -f $tmpdir/tmp-la $lib done ${RM}r "$tmpdir" fi fi if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. func_execute_cmds "$finish_cmds" 'admincmds="$admincmds '"$cmd"'"' fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $opt_dry_run || eval "$cmds" || func_append admincmds " $cmds" fi done fi # Exit here if they wanted silent mode. $opt_silent && exit $EXIT_SUCCESS if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then echo "----------------------------------------------------------------------" echo "Libraries have been installed in:" for libdir in $libdirs; do $ECHO " $libdir" done echo echo "If you ever happen to want to link against installed libraries" echo "in a given directory, LIBDIR, you must either use libtool, and" echo "specify the full pathname of the library, or use the \`-LLIBDIR'" echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then echo " - add LIBDIR to the \`$shlibpath_var' environment variable" echo " during execution" fi if test -n "$runpath_var"; then echo " - add LIBDIR to the \`$runpath_var' environment variable" echo " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" $ECHO " - use the \`$flag' linker flag" fi if test -n "$admincmds"; then $ECHO " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" fi echo echo "See any operating system documentation about shared libraries for" case $host in solaris2.[6789]|solaris2.1[0-9]) echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" echo "pages." ;; *) echo "more information, such as the ld(1) and ld.so(8) manual pages." ;; esac echo "----------------------------------------------------------------------" fi exit $EXIT_SUCCESS } test "$opt_mode" = finish && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { $opt_debug # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || # Allow the use of GNU shtool's install command. case $nonopt in *shtool*) :;; *) false;; esac; then # Aesthetically quote it. func_quote_for_eval "$nonopt" install_prog="$func_quote_for_eval_result " arg=$1 shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. func_quote_for_eval "$arg" func_append install_prog "$func_quote_for_eval_result" install_shared_prog=$install_prog case " $install_prog " in *[\\\ /]cp\ *) install_cp=: ;; *) install_cp=false ;; esac # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=no stripme= no_mode=: for arg do arg2= if test -n "$dest"; then func_append files " $dest" dest=$arg continue fi case $arg in -d) isdir=yes ;; -f) if $install_cp; then :; else prev=$arg fi ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then if test "x$prev" = x-m && test -n "$install_override_mode"; then arg2=$install_override_mode no_mode=false fi prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. func_quote_for_eval "$arg" func_append install_prog " $func_quote_for_eval_result" if test -n "$arg2"; then func_quote_for_eval "$arg2" fi func_append install_shared_prog " $func_quote_for_eval_result" done test -z "$install_prog" && \ func_fatal_help "you must specify an install program" test -n "$prev" && \ func_fatal_help "the \`$prev' option requires an argument" if test -n "$install_override_mode" && $no_mode; then if $install_cp; then :; else func_quote_for_eval "$install_override_mode" func_append install_shared_prog " -m $func_quote_for_eval_result" fi fi if test -z "$files"; then if test -z "$dest"; then func_fatal_help "no file or destination specified" else func_fatal_help "you must specify a destination" fi fi # Strip any trailing slash from the destination. func_stripname '' '/' "$dest" dest=$func_stripname_result # Check to see that the destination is a directory. test -d "$dest" && isdir=yes if test "$isdir" = yes; then destdir="$dest" destname= else func_dirname_and_basename "$dest" "" "." destdir="$func_dirname_result" destname="$func_basename_result" # Not a directory, so check to see that there is only one file specified. set dummy $files; shift test "$#" -gt 1 && \ func_fatal_help "\`$dest' is not a directory" fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) func_fatal_help "\`$destdir' must be an absolute directory name" ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. func_append staticlibs " $file" ;; *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$file' is not a valid libtool archive" library_names= old_library= relink_command= func_source "$file" # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) func_append current_libdirs " $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) func_append future_libdirs " $libdir" ;; esac fi func_dirname "$file" "/" "" dir="$func_dirname_result" func_append dir "$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. test "$inst_prefix_dir" = "$destdir" && \ func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi func_warning "relinking \`$file'" func_show_eval "$relink_command" \ 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' fi # See the names of the shared library. set dummy $library_names; shift if test -n "$1"; then realname="$1" shift srcname="$realname" test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ 'exit $?' tstripme="$stripme" case $host_os in cygwin* | mingw* | pw32* | cegcc*) case $realname in *.dll.a) tstripme="" ;; esac ;; esac if test -n "$tstripme" && test -n "$striplib"; then func_show_eval "$striplib $destdir/$realname" 'exit $?' fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. # Try `ln -sf' first, because the `ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname do test "$linkname" != "$realname" \ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" done fi # Do each command in the postinstall commands. lib="$destdir/$realname" func_execute_cmds "$postinstall_cmds" 'exit $?' fi # Install the pseudo-library for information purposes. func_basename "$file" name="$func_basename_result" instname="$dir/$name"i func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. test -n "$old_library" && func_append staticlibs " $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) func_lo2o "$destfile" staticdest=$func_lo2o_result ;; *.$objext) staticdest="$destfile" destfile= ;; *) func_fatal_help "cannot copy a libtool object to \`$destfile'" ;; esac # Install the libtool object if requested. test -n "$destfile" && \ func_show_eval "$install_prog $file $destfile" 'exit $?' # Install the old object if enabled. if test "$build_old_libs" = yes; then # Deduce the name of the old-style object file. func_lo2o "$file" staticobj=$func_lo2o_result func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' fi exit $EXIT_SUCCESS ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext="" case $file in *.exe) if test ! -f "$file"; then func_stripname '' '.exe' "$file" file=$func_stripname_result stripped_ext=".exe" fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin* | *mingw*) if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" wrapper=$func_ltwrapper_scriptname_result else func_stripname '' '.exe' "$file" wrapper=$func_stripname_result fi ;; *) wrapper=$file ;; esac if func_ltwrapper_script_p "$wrapper"; then notinst_deplibs= relink_command= func_source "$wrapper" # Check the variables that should have been set. test -z "$generated_by_libtool_version" && \ func_fatal_error "invalid libtool wrapper script \`$wrapper'" finalize=yes for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then func_source "$lib" fi libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then func_warning "\`$lib' has not been installed in \`$libdir'" finalize=no fi done relink_command= func_source "$wrapper" outputname= if test "$fast_install" = no && test -n "$relink_command"; then $opt_dry_run || { if test "$finalize" = yes; then tmpdir=`func_mktempdir` func_basename "$file$stripped_ext" file="$func_basename_result" outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` $opt_silent || { func_quote_for_expand "$relink_command" eval "func_echo $func_quote_for_expand_result" } if eval "$relink_command"; then : else func_error "error: relink \`$file' with the above command before installing it" $opt_dry_run || ${RM}r "$tmpdir" continue fi file="$outputname" else func_warning "cannot relink \`$file'" fi } else # Install the binary that we compiled earlier. file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyway case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) func_stripname '' '.exe' "$destfile" destfile=$func_stripname_result ;; esac ;; esac func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' $opt_dry_run || if test -n "$outputname"; then ${RM}r "$tmpdir" fi ;; esac done for file in $staticlibs; do func_basename "$file" name="$func_basename_result" # Set up the ranlib parameters. oldlib="$destdir/$name" func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then func_show_eval "$old_striplib $oldlib" 'exit $?' fi # Do each command in the postinstall commands. func_execute_cmds "$old_postinstall_cmds" 'exit $?' done test -n "$future_libdirs" && \ func_warning "remember to run \`$progname --finish$future_libdirs'" if test -n "$current_libdirs"; then # Maybe just do a dry run. $opt_dry_run && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi } test "$opt_mode" = install && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p # Extract symbols from dlprefiles and create ${outputname}S.o with # a dlpreopen symbol table. func_generate_dlsyms () { $opt_debug my_outputname="$1" my_originator="$2" my_pic_p="${3-no}" my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then if test -n "$NM" && test -n "$global_symbol_pipe"; then my_dlsyms="${my_outputname}S.c" else func_error "not configured to extract global symbols from dlpreopened files" fi fi if test -n "$my_dlsyms"; then case $my_dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist="$output_objdir/${my_outputname}.nm" func_show_eval "$RM $nlist ${nlist}S ${nlist}T" # Parse the name list into a source file. func_verbose "creating $output_objdir/$my_dlsyms" $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ /* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ /* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ #ifdef __cplusplus extern \"C\" { #endif #if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) #pragma GCC diagnostic ignored \"-Wstrict-prototypes\" #endif /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif /* External symbol declarations for the compiler. */\ " if test "$dlself" = yes; then func_verbose "generating symbol list for \`$output'" $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` for progfile in $progfiles; do func_to_tool_file "$progfile" func_convert_file_msys_to_w32 func_verbose "extracting global C symbols from \`$func_to_tool_file_result'" $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $opt_dry_run || { eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi if test -n "$export_symbols_regex"; then $opt_dry_run || { eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols="$output_objdir/$outputname.exp" $opt_dry_run || { $RM $export_symbols eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac } else $opt_dry_run || { eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac } fi fi for dlprefile in $dlprefiles; do func_verbose "extracting global C symbols from \`$dlprefile'" func_basename "$dlprefile" name="$func_basename_result" case $host in *cygwin* | *mingw* | *cegcc* ) # if an import library, we need to obtain dlname if func_win32_import_lib_p "$dlprefile"; then func_tr_sh "$dlprefile" eval "curr_lafile=\$libfile_$func_tr_sh_result" dlprefile_dlbasename="" if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then # Use subshell, to avoid clobbering current variable values dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` if test -n "$dlprefile_dlname" ; then func_basename "$dlprefile_dlname" dlprefile_dlbasename="$func_basename_result" else # no lafile. user explicitly requested -dlpreopen <import library>. $sharedlib_from_linklib_cmd "$dlprefile" dlprefile_dlbasename=$sharedlib_from_linklib_result fi fi $opt_dry_run || { if test -n "$dlprefile_dlbasename" ; then eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' else func_warning "Could not compute DLL name from $name" eval '$ECHO ": $name " >> "$nlist"' fi func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" } else # not an import lib $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } fi ;; *) $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } ;; esac done $opt_dry_run || { # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $MV "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if $GREP -v "^: " < "$nlist" | if sort -k 3 </dev/null >/dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else $GREP -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' else echo '/* NONE */' >> "$output_objdir/$my_dlsyms" fi echo >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ typedef struct { const char *name; void *address; } lt_dlsymlist; extern LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[]; LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = {\ { \"$my_originator\", (void *) 0 }," case $need_lib_prefix in no) eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; *) eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; esac echo >> "$output_objdir/$my_dlsyms" "\ {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_${my_prefix}_LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " } # !$opt_dry_run pic_flag_for_symtable= case "$compile_command " in *" -static "*) ;; *) case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; *) if test "X$my_pic_p" != Xno; then pic_flag_for_symtable=" $pic_flag" fi ;; esac ;; esac symtab_cflags= for arg in $LTCFLAGS; do case $arg in -pie | -fpie | -fPIE) ;; *) func_append symtab_cflags " $arg" ;; esac done # Now compile the dynamic symbol file. func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' # Clean up the generated files. func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' # Transform the symbol file into the correct name. symfileobj="$output_objdir/${my_outputname}S.$objext" case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` else compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` fi ;; *) compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` ;; esac ;; *) func_fatal_error "unknown suffix for \`$my_dlsyms'" ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` fi } # func_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. # Despite the name, also deal with 64 bit binaries. func_win32_libid () { $opt_debug win32_libid_type="unknown" win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then func_to_tool_file "$1" func_convert_file_msys_to_w32 win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | $SED -n -e ' 1,100{ / I /{ s,.*,import, p q } }'` case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; esac fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $ECHO "$win32_libid_type" } # func_cygming_dll_for_implib ARG # # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib () { $opt_debug sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` } # func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs # # The is the core of a fallback implementation of a # platform-specific function to extract the name of the # DLL associated with the specified import library LIBNAME. # # SECTION_NAME is either .idata$6 or .idata$7, depending # on the platform and compiler that created the implib. # # Echos the name of the DLL associated with the # specified import library. func_cygming_dll_for_implib_fallback_core () { $opt_debug match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` $OBJDUMP -s --section "$1" "$2" 2>/dev/null | $SED '/^Contents of section '"$match_literal"':/{ # Place marker at beginning of archive member dllname section s/.*/====MARK====/ p d } # These lines can sometimes be longer than 43 characters, but # are always uninteresting /:[ ]*file format pe[i]\{,1\}-/d /^In archive [^:]*:/d # Ensure marker is printed /^====MARK====/p # Remove all lines with less than 43 characters /^.\{43\}/!d # From remaining lines, remove first 43 characters s/^.\{43\}//' | $SED -n ' # Join marker and all lines until next marker into a single line /^====MARK====/ b para H $ b para b :para x s/\n//g # Remove the marker s/^====MARK====// # Remove trailing dots and whitespace s/[\. \t]*$// # Print /./p' | # we now have a list, one entry per line, of the stringified # contents of the appropriate section of all members of the # archive which possess that section. Heuristic: eliminate # all those which have a first or second character that is # a '.' (that is, objdump's representation of an unprintable # character.) This should work for all archives with less than # 0x302f exports -- but will fail for DLLs whose name actually # begins with a literal '.' or a single character followed by # a '.'. # # Of those that remain, print the first one. $SED -e '/^\./d;/^.\./d;q' } # func_cygming_gnu_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is a GNU/binutils-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_gnu_implib_p () { $opt_debug func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` test -n "$func_cygming_gnu_implib_tmp" } # func_cygming_ms_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is an MS-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_ms_implib_p () { $opt_debug func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` test -n "$func_cygming_ms_implib_tmp" } # func_cygming_dll_for_implib_fallback ARG # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # # This fallback implementation is for use when $DLLTOOL # does not support the --identify-strict option. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib_fallback () { $opt_debug if func_cygming_gnu_implib_p "$1" ; then # binutils import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` elif func_cygming_ms_implib_p "$1" ; then # ms-generated import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` else # unknown sharedlib_from_linklib_result="" fi } # func_extract_an_archive dir oldlib func_extract_an_archive () { $opt_debug f_ex_an_ar_dir="$1"; shift f_ex_an_ar_oldlib="$1" if test "$lock_old_archive_extraction" = yes; then lockfile=$f_ex_an_ar_oldlib.lock until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done fi func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ 'stat=$?; rm -f "$lockfile"; exit $stat' if test "$lock_old_archive_extraction" = yes; then $opt_dry_run || rm -f "$lockfile" fi if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" fi } # func_extract_archives gentop oldlib ... func_extract_archives () { $opt_debug my_gentop="$1"; shift my_oldlibs=${1+"$@"} my_oldobjs="" my_xlib="" my_xabs="" my_xdir="" for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac func_basename "$my_xlib" my_xlib="$func_basename_result" my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) func_arith $extracted_serial + 1 extracted_serial=$func_arith_result my_xlib_u=lt$extracted_serial-$my_xlib ;; *) break ;; esac done extracted_archives="$extracted_archives $my_xlib_u" my_xdir="$my_gentop/$my_xlib_u" func_mkdir_p "$my_xdir" case $host in *-darwin*) func_verbose "Extracting $my_xabs" # Do not bother doing anything if just a dry run $opt_dry_run || { darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` darwin_base_archive=`basename "$darwin_archive"` darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` if test -n "$darwin_arches"; then darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches ; do func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" func_extract_an_archive "`pwd`" "${darwin_base_archive}" cd "$darwin_curdir" $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" done # $darwin_arches ## Okay now we've a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` $LIPO -create -output "$darwin_file" $darwin_files done # $darwin_filelist $RM -rf unfat-$$ cd "$darwin_orig_dir" else cd $darwin_orig_dir func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches } # !$opt_dry_run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` done func_extract_archives_result="$my_oldobjs" } # func_emit_wrapper [arg=no] # # Emit a libtool wrapper script on stdout. # Don't directly open a file because we may want to # incorporate the script contents within a cygwin/mingw # wrapper executable. Must ONLY be called from within # func_mode_link because it depends on a number of variables # set therein. # # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR # variable will take. If 'yes', then the emitted script # will assume that the directory in which it is stored is # the $objdir directory. This is a cygwin/mingw-specific # behavior. func_emit_wrapper () { func_emit_wrapper_arg1=${1-no} $ECHO "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='$sed_quote_subst' # 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+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variables: generated_by_libtool_version='$macro_version' notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$ECHO are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then file=\"\$0\"" qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` $ECHO "\ # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } ECHO=\"$qECHO\" fi # Very basic option parsing. These options are (a) specific to # the libtool wrapper, (b) are identical between the wrapper # /script/ and the wrapper /executable/ which is used only on # windows platforms, and (c) all begin with the string "--lt-" # (application programs are unlikely to have options which match # this pattern). # # There are only two supported options: --lt-debug and # --lt-dump-script. There is, deliberately, no --lt-help. # # The first argument to this parsing function should be the # script's $0 value, followed by "$@". lt_option_debug= func_parse_lt_options () { lt_script_arg0=\$0 shift for lt_opt do case \"\$lt_opt\" in --lt-debug) lt_option_debug=1 ;; --lt-dump-script) lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` cat \"\$lt_dump_D/\$lt_dump_F\" exit 0 ;; --lt-*) \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 exit 1 ;; esac done # Print the debug banner immediately: if test -n \"\$lt_option_debug\"; then echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2 fi } # Used when --lt-debug. Prints its arguments to stdout # (redirection is the responsibility of the caller) func_lt_dump_args () { lt_dump_args_N=1; for lt_arg do \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\" lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` done } # Core function for launching the target application func_exec_program_core () { " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2* | *-cegcc*) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $ECHO "\ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 exit 1 } # A function to encapsulate launching the target application # Strips options in the --lt-* namespace from \$@ and # launches target application with the remaining arguments. func_exec_program () { for lt_wr_arg do case \$lt_wr_arg in --lt-*) ;; *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; esac shift done func_exec_program_core \${1+\"\$@\"} } # Parse options func_parse_lt_options \"\$0\" \${1+\"\$@\"} # Find the directory that this script lives in. thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` done # Usually 'no', except on cygwin/mingw when embedded into # the cwrapper. WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then # special case for '.' if test \"\$thisdir\" = \".\"; then thisdir=\`pwd\` fi # remove .libs from thisdir case \"\$thisdir\" in *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; $objdir ) thisdir=. ;; esac fi # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test "$fast_install" = yes; then $ECHO "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $MKDIR \"\$progdir\" else $RM \"\$progdir/\$file\" fi" $ECHO "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else $ECHO \"\$relink_command_output\" >&2 $RM \"\$progdir/\$file\" exit 1 fi fi $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $RM \"\$progdir/\$program\"; $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } $RM \"\$progdir/\$file\" fi" else $ECHO "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $ECHO "\ if test -f \"\$progdir/\$program\"; then" # fixup the dll searchpath if we need to. # # Fix the DLL searchpath if we need to. Do this before prepending # to shlibpath, because on Windows, both are PATH and uninstalled # libraries must come first. if test -n "$dllsearchpath"; then $ECHO "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi # Export our shlibpath_var if we have one. if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` export $shlibpath_var " fi $ECHO "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. func_exec_program \${1+\"\$@\"} fi else # The program doesn't exist. \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 exit 1 fi fi\ " } # func_emit_cwrapperexe_src # emit the source code for a wrapper executable on stdout # Must ONLY be called from within func_mode_link because # it depends on a number of variable set therein. func_emit_cwrapperexe_src () { cat <<EOF /* $cwrappersource - temporary wrapper executable for $objdir/$outputname Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION The $output program cannot be directly executed until all the libtool libraries that it depends on are installed. This wrapper executable should never be moved out of the build directory. If it is, it will not operate correctly. */ EOF cat <<"EOF" #ifdef _MSC_VER # define _CRT_SECURE_NO_DEPRECATE 1 #endif #include <stdio.h> #include <stdlib.h> #ifdef _MSC_VER # include <direct.h> # include <process.h> # include <io.h> #else # include <unistd.h> # include <stdint.h> # ifdef __CYGWIN__ # include <io.h> # endif #endif #include <malloc.h> #include <stdarg.h> #include <assert.h> #include <string.h> #include <ctype.h> #include <errno.h> #include <fcntl.h> #include <sys/stat.h> /* declarations of non-ANSI functions */ #if defined(__MINGW32__) # ifdef __STRICT_ANSI__ int _putenv (const char *); # endif #elif defined(__CYGWIN__) # ifdef __STRICT_ANSI__ char *realpath (const char *, char *); int putenv (char *); int setenv (const char *, const char *, int); # endif /* #elif defined (other platforms) ... */ #endif /* portability defines, excluding path handling macros */ #if defined(_MSC_VER) # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv # define S_IXUSR _S_IEXEC # ifndef _INTPTR_T_DEFINED # define _INTPTR_T_DEFINED # define intptr_t int # endif #elif defined(__MINGW32__) # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv #elif defined(__CYGWIN__) # define HAVE_SETENV # define FOPEN_WB "wb" /* #elif defined (other platforms) ... */ #endif #if defined(PATH_MAX) # define LT_PATHMAX PATH_MAX #elif defined(MAXPATHLEN) # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef S_IXOTH # define S_IXOTH 0 #endif #ifndef S_IXGRP # define S_IXGRP 0 #endif /* path handling portability macros */ #ifndef DIR_SEPARATOR # define DIR_SEPARATOR '/' # define PATH_SEPARATOR ':' #endif #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ defined (__OS2__) # define HAVE_DOS_BASED_FILE_SYSTEM # define FOPEN_WB "wb" # ifndef DIR_SEPARATOR_2 # define DIR_SEPARATOR_2 '\\' # endif # ifndef PATH_SEPARATOR_2 # define PATH_SEPARATOR_2 ';' # endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #ifndef PATH_SEPARATOR_2 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) #else /* PATH_SEPARATOR_2 */ # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) #endif /* PATH_SEPARATOR_2 */ #ifndef FOPEN_WB # define FOPEN_WB "w" #endif #ifndef _O_BINARY # define _O_BINARY 0 #endif #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free ((void *) stale); stale = 0; } \ } while (0) #if defined(LT_DEBUGWRAPPER) static int lt_debug = 1; #else static int lt_debug = 0; #endif const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ void *xmalloc (size_t num); char *xstrdup (const char *string); const char *base_name (const char *name); char *find_executable (const char *wrapper); char *chase_symlinks (const char *pathspec); int make_executable (const char *path); int check_executable (const char *path); char *strendzap (char *str, const char *pat); void lt_debugprintf (const char *file, int line, const char *fmt, ...); void lt_fatal (const char *file, int line, const char *message, ...); static const char *nonnull (const char *s); static const char *nonempty (const char *s); void lt_setenv (const char *name, const char *value); char *lt_extend_str (const char *orig_value, const char *add, int to_end); void lt_update_exe_path (const char *name, const char *value); void lt_update_lib_path (const char *name, const char *value); char **prepare_spawn (char **argv); void lt_dump_script (FILE *f); EOF cat <<EOF volatile const char * MAGIC_EXE = "$magic_exe"; const char * LIB_PATH_VARNAME = "$shlibpath_var"; EOF if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then func_to_host_path "$temp_rpath" cat <<EOF const char * LIB_PATH_VALUE = "$func_to_host_path_result"; EOF else cat <<"EOF" const char * LIB_PATH_VALUE = ""; EOF fi if test -n "$dllsearchpath"; then func_to_host_path "$dllsearchpath:" cat <<EOF const char * EXE_PATH_VARNAME = "PATH"; const char * EXE_PATH_VALUE = "$func_to_host_path_result"; EOF else cat <<"EOF" const char * EXE_PATH_VARNAME = ""; const char * EXE_PATH_VALUE = ""; EOF fi if test "$fast_install" = yes; then cat <<EOF const char * TARGET_PROGRAM_NAME = "lt-$outputname"; /* hopefully, no .exe */ EOF else cat <<EOF const char * TARGET_PROGRAM_NAME = "$outputname"; /* hopefully, no .exe */ EOF fi cat <<"EOF" #define LTWRAPPER_OPTION_PREFIX "--lt-" static const char *ltwrapper_option_prefix = LTWRAPPER_OPTION_PREFIX; static const char *dumpscript_opt = LTWRAPPER_OPTION_PREFIX "dump-script"; static const char *debug_opt = LTWRAPPER_OPTION_PREFIX "debug"; int main (int argc, char *argv[]) { char **newargz; int newargc; char *tmp_pathspec; char *actual_cwrapper_path; char *actual_cwrapper_name; char *target_name; char *lt_argv_zero; intptr_t rval = 127; int i; program_name = (char *) xstrdup (base_name (argv[0])); newargz = XMALLOC (char *, argc + 1); /* very simple arg parsing; don't want to rely on getopt * also, copy all non cwrapper options to newargz, except * argz[0], which is handled differently */ newargc=0; for (i = 1; i < argc; i++) { if (strcmp (argv[i], dumpscript_opt) == 0) { EOF case "$host" in *mingw* | *cygwin* ) # make stdout use "unix" line endings echo " setmode(1,_O_BINARY);" ;; esac cat <<"EOF" lt_dump_script (stdout); return 0; } if (strcmp (argv[i], debug_opt) == 0) { lt_debug = 1; continue; } if (strcmp (argv[i], ltwrapper_option_prefix) == 0) { /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX namespace, but it is not one of the ones we know about and have already dealt with, above (inluding dump-script), then report an error. Otherwise, targets might begin to believe they are allowed to use options in the LTWRAPPER_OPTION_PREFIX namespace. The first time any user complains about this, we'll need to make LTWRAPPER_OPTION_PREFIX a configure-time option or a configure.ac-settable value. */ lt_fatal (__FILE__, __LINE__, "unrecognized %s option: '%s'", ltwrapper_option_prefix, argv[i]); } /* otherwise ... */ newargz[++newargc] = xstrdup (argv[i]); } newargz[++newargc] = NULL; EOF cat <<EOF /* The GNU banner must be the first non-error debug message */ lt_debugprintf (__FILE__, __LINE__, "libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\n"); EOF cat <<"EOF" lt_debugprintf (__FILE__, __LINE__, "(main) argv[0]: %s\n", argv[0]); lt_debugprintf (__FILE__, __LINE__, "(main) program_name: %s\n", program_name); tmp_pathspec = find_executable (argv[0]); if (tmp_pathspec == NULL) lt_fatal (__FILE__, __LINE__, "couldn't find %s", argv[0]); lt_debugprintf (__FILE__, __LINE__, "(main) found exe (before symlink chase) at: %s\n", tmp_pathspec); actual_cwrapper_path = chase_symlinks (tmp_pathspec); lt_debugprintf (__FILE__, __LINE__, "(main) found exe (after symlink chase) at: %s\n", actual_cwrapper_path); XFREE (tmp_pathspec); actual_cwrapper_name = xstrdup (base_name (actual_cwrapper_path)); strendzap (actual_cwrapper_path, actual_cwrapper_name); /* wrapper name transforms */ strendzap (actual_cwrapper_name, ".exe"); tmp_pathspec = lt_extend_str (actual_cwrapper_name, ".exe", 1); XFREE (actual_cwrapper_name); actual_cwrapper_name = tmp_pathspec; tmp_pathspec = 0; /* target_name transforms -- use actual target program name; might have lt- prefix */ target_name = xstrdup (base_name (TARGET_PROGRAM_NAME)); strendzap (target_name, ".exe"); tmp_pathspec = lt_extend_str (target_name, ".exe", 1); XFREE (target_name); target_name = tmp_pathspec; tmp_pathspec = 0; lt_debugprintf (__FILE__, __LINE__, "(main) libtool target name: %s\n", target_name); EOF cat <<EOF newargz[0] = XMALLOC (char, (strlen (actual_cwrapper_path) + strlen ("$objdir") + 1 + strlen (actual_cwrapper_name) + 1)); strcpy (newargz[0], actual_cwrapper_path); strcat (newargz[0], "$objdir"); strcat (newargz[0], "/"); EOF cat <<"EOF" /* stop here, and copy so we don't have to do this twice */ tmp_pathspec = xstrdup (newargz[0]); /* do NOT want the lt- prefix here, so use actual_cwrapper_name */ strcat (newargz[0], actual_cwrapper_name); /* DO want the lt- prefix here if it exists, so use target_name */ lt_argv_zero = lt_extend_str (tmp_pathspec, target_name, 1); XFREE (tmp_pathspec); tmp_pathspec = NULL; EOF case $host_os in mingw*) cat <<"EOF" { char* p; while ((p = strchr (newargz[0], '\\')) != NULL) { *p = '/'; } while ((p = strchr (lt_argv_zero, '\\')) != NULL) { *p = '/'; } } EOF ;; esac cat <<"EOF" XFREE (target_name); XFREE (actual_cwrapper_path); XFREE (actual_cwrapper_name); lt_setenv ("BIN_SH", "xpg4"); /* for Tru64 */ lt_setenv ("DUALCASE", "1"); /* for MSK sh */ /* Update the DLL searchpath. EXE_PATH_VALUE ($dllsearchpath) must be prepended before (that is, appear after) LIB_PATH_VALUE ($temp_rpath) because on Windows, both *_VARNAMEs are PATH but uninstalled libraries must come first. */ lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE); lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE); lt_debugprintf (__FILE__, __LINE__, "(main) lt_argv_zero: %s\n", nonnull (lt_argv_zero)); for (i = 0; i < newargc; i++) { lt_debugprintf (__FILE__, __LINE__, "(main) newargz[%d]: %s\n", i, nonnull (newargz[i])); } EOF case $host_os in mingw*) cat <<"EOF" /* execv doesn't actually work on mingw as expected on unix */ newargz = prepare_spawn (newargz); rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz); if (rval == -1) { /* failed to start process */ lt_debugprintf (__FILE__, __LINE__, "(main) failed to launch target \"%s\": %s\n", lt_argv_zero, nonnull (strerror (errno))); return 127; } return rval; EOF ;; *) cat <<"EOF" execv (lt_argv_zero, newargz); return rval; /* =127, but avoids unused variable warning */ EOF ;; esac cat <<"EOF" } void * xmalloc (size_t num) { void *p = (void *) malloc (num); if (!p) lt_fatal (__FILE__, __LINE__, "memory exhausted"); return p; } char * xstrdup (const char *string) { return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL; } const char * base_name (const char *name) { const char *base; #if defined (HAVE_DOS_BASED_FILE_SYSTEM) /* Skip over the disk name in MSDOS pathnames. */ if (isalpha ((unsigned char) name[0]) && name[1] == ':') name += 2; #endif for (base = name; *name; name++) if (IS_DIR_SEPARATOR (*name)) base = name + 1; return base; } int check_executable (const char *path) { struct stat st; lt_debugprintf (__FILE__, __LINE__, "(check_executable): %s\n", nonempty (path)); if ((!path) || (!*path)) return 0; if ((stat (path, &st) >= 0) && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) return 1; else return 0; } int make_executable (const char *path) { int rval = 0; struct stat st; lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", nonempty (path)); if ((!path) || (!*path)) return 0; if (stat (path, &st) >= 0) { rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); } return rval; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise Does not chase symlinks, even on platforms that support them. */ char * find_executable (const char *wrapper) { int has_slash = 0; const char *p; const char *p_next; /* static buffer for getcwd */ char tmp[LT_PATHMAX + 1]; int tmp_len; char *concat_name; lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", nonempty (wrapper)); if ((wrapper == NULL) || (*wrapper == '\0')) return NULL; /* Absolute path? */ #if defined (HAVE_DOS_BASED_FILE_SYSTEM) if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } else { #endif if (IS_DIR_SEPARATOR (wrapper[0])) { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } #if defined (HAVE_DOS_BASED_FILE_SYSTEM) } #endif for (p = wrapper; *p; p++) if (*p == '/') { has_slash = 1; break; } if (!has_slash) { /* no slashes; search PATH */ const char *path = getenv ("PATH"); if (path != NULL) { for (p = path; *p; p = p_next) { const char *q; size_t p_len; for (q = p; *q; q++) if (IS_PATH_SEPARATOR (*q)) break; p_len = q - p; p_next = (*q == '\0' ? q : q + 1); if (p_len == 0) { /* empty path: current directory */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); } else { concat_name = XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, p, p_len); concat_name[p_len] = '/'; strcpy (concat_name + p_len + 1, wrapper); } if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } } /* not found in PATH; assume curdir */ } /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); return NULL; } char * chase_symlinks (const char *pathspec) { #ifndef S_ISLNK return xstrdup (pathspec); #else char buf[LT_PATHMAX]; struct stat s; char *tmp_pathspec = xstrdup (pathspec); char *p; int has_symlinks = 0; while (strlen (tmp_pathspec) && !has_symlinks) { lt_debugprintf (__FILE__, __LINE__, "checking path component for symlinks: %s\n", tmp_pathspec); if (lstat (tmp_pathspec, &s) == 0) { if (S_ISLNK (s.st_mode) != 0) { has_symlinks = 1; break; } /* search backwards for last DIR_SEPARATOR */ p = tmp_pathspec + strlen (tmp_pathspec) - 1; while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) p--; if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) { /* no more DIR_SEPARATORS left */ break; } *p = '\0'; } else { lt_fatal (__FILE__, __LINE__, "error accessing file \"%s\": %s", tmp_pathspec, nonnull (strerror (errno))); } } XFREE (tmp_pathspec); if (!has_symlinks) { return xstrdup (pathspec); } tmp_pathspec = realpath (pathspec, buf); if (tmp_pathspec == 0) { lt_fatal (__FILE__, __LINE__, "could not follow symlinks for %s", pathspec); } return xstrdup (tmp_pathspec); #endif } char * strendzap (char *str, const char *pat) { size_t len, patlen; assert (str != NULL); assert (pat != NULL); len = strlen (str); patlen = strlen (pat); if (patlen <= len) { str += len - patlen; if (strcmp (str, pat) == 0) *str = '\0'; } return str; } void lt_debugprintf (const char *file, int line, const char *fmt, ...) { va_list args; if (lt_debug) { (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); va_start (args, fmt); (void) vfprintf (stderr, fmt, args); va_end (args); } } static void lt_error_core (int exit_status, const char *file, int line, const char *mode, const char *message, va_list ap) { fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *file, int line, const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); va_end (ap); } static const char * nonnull (const char *s) { return s ? s : "(null)"; } static const char * nonempty (const char *s) { return (s && !*s) ? "(empty)" : nonnull (s); } void lt_setenv (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_setenv) setting '%s' to '%s'\n", nonnull (name), nonnull (value)); { #ifdef HAVE_SETENV /* always make a copy, for consistency with !HAVE_SETENV */ char *str = xstrdup (value); setenv (name, str, 1); #else int len = strlen (name) + 1 + strlen (value) + 1; char *str = XMALLOC (char, len); sprintf (str, "%s=%s", name, value); if (putenv (str) != EXIT_SUCCESS) { XFREE (str); } #endif } } char * lt_extend_str (const char *orig_value, const char *add, int to_end) { char *new_value; if (orig_value && *orig_value) { int orig_value_len = strlen (orig_value); int add_len = strlen (add); new_value = XMALLOC (char, add_len + orig_value_len + 1); if (to_end) { strcpy (new_value, orig_value); strcpy (new_value + orig_value_len, add); } else { strcpy (new_value, add); strcpy (new_value + add_len, orig_value); } } else { new_value = xstrdup (add); } return new_value; } void lt_update_exe_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); /* some systems can't cope with a ':'-terminated path #' */ int len = strlen (new_value); while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { new_value[len-1] = '\0'; } lt_setenv (name, new_value); XFREE (new_value); } } void lt_update_lib_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); } } EOF case $host_os in mingw*) cat <<"EOF" /* Prepares an argument vector before calling spawn(). Note that spawn() does not by itself call the command interpreter (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); GetVersionEx(&v); v.dwPlatformId == VER_PLATFORM_WIN32_NT; }) ? "cmd.exe" : "command.com"). Instead it simply concatenates the arguments, separated by ' ', and calls CreateProcess(). We must quote the arguments since Win32 CreateProcess() interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a special way: - Space and tab are interpreted as delimiters. They are not treated as delimiters if they are surrounded by double quotes: "...". - Unescaped double quotes are removed from the input. Their only effect is that within double quotes, space and tab are treated like normal characters. - Backslashes not followed by double quotes are not special. - But 2*n+1 backslashes followed by a double quote become n backslashes followed by a double quote (n >= 0): \" -> " \\\" -> \" \\\\\" -> \\" */ #define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" #define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" char ** prepare_spawn (char **argv) { size_t argc; char **new_argv; size_t i; /* Count number of arguments. */ for (argc = 0; argv[argc] != NULL; argc++) ; /* Allocate new argument vector. */ new_argv = XMALLOC (char *, argc + 1); /* Put quoted arguments into the new argument vector. */ for (i = 0; i < argc; i++) { const char *string = argv[i]; if (string[0] == '\0') new_argv[i] = xstrdup ("\"\""); else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) { int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); size_t length; unsigned int backslashes; const char *s; char *quoted_string; char *p; length = 0; backslashes = 0; if (quote_around) length++; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') length += backslashes + 1; length++; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) length += backslashes + 1; quoted_string = XMALLOC (char, length + 1); p = quoted_string; backslashes = 0; if (quote_around) *p++ = '"'; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') { unsigned int j; for (j = backslashes + 1; j > 0; j--) *p++ = '\\'; } *p++ = c; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) { unsigned int j; for (j = backslashes; j > 0; j--) *p++ = '\\'; *p++ = '"'; } *p = '\0'; new_argv[i] = quoted_string; } else new_argv[i] = (char *) string; } new_argv[argc] = NULL; return new_argv; } EOF ;; esac cat <<"EOF" void lt_dump_script (FILE* f) { EOF func_emit_wrapper yes | $SED -e 's/\([\\"]\)/\\\1/g' \ -e 's/^/ fputs ("/' -e 's/$/\\n", f);/' cat <<"EOF" } EOF } # end: func_emit_cwrapperexe_src # func_win32_import_lib_p ARG # True if ARG is an import lib, as indicated by $file_magic_cmd func_win32_import_lib_p () { $opt_debug case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in *import*) : ;; *) false ;; esac } # func_mode_link arg... func_mode_link () { $opt_debug case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out # which system we are compiling for in order to pass an extra # flag for every libtool invocation. # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying # to make a dll which has undefined symbols, in which case not # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. allow_undefined=yes ;; *) allow_undefined=yes ;; esac libtool_args=$nonopt base_compile="$nonopt $@" compile_command=$nonopt finalize_command=$nonopt compile_rpath= finalize_rpath= compile_shlibpath= finalize_shlibpath= convenience= old_convenience= deplibs= old_deplibs= compiler_flags= linker_flags= dllsearchpath= lib_search_path=`pwd` inst_prefix_dir= new_inherited_linker_flags= avoid_version=no bindir= dlfiles= dlprefiles= dlself=no export_dynamic=no export_symbols= export_symbols_regex= generated= libobjs= ltlibs= module=no no_install=no objs= non_pic_objects= precious_files_regex= prefer_static_libs=no preload=no prev= prevarg= release= rpath= xrpath= perm_rpath= temp_rpath= thread_safe=no vinfo= vinfo_number=no weak_libs= single_module="${wl}-single_module" func_infer_tag $base_compile # We need to know -static, to get the right output filenames. for arg do case $arg in -shared) test "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then func_warning "complete static linking is impossible in this configuration" fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built ;; -static-libtool-libs) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; esac build_libtool_libs=no build_old_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg="$1" shift func_quote_for_eval "$arg" qarg=$func_quote_for_eval_unquoted_result func_append libtool_args " $func_quote_for_eval_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) func_append compile_command " @OUTPUT@" func_append finalize_command " @OUTPUT@" ;; esac case $prev in bindir) bindir="$arg" prev= continue ;; dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" preload=yes fi case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test "$dlself" = no; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test "$prev" = dlprefiles; then dlself=yes elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test "$prev" = dlfiles; then func_append dlfiles " $arg" else func_append dlprefiles " $arg" fi prev= continue ;; esac ;; expsyms) export_symbols="$arg" test -f "$arg" \ || func_fatal_error "symbol file \`$arg' does not exist" prev= continue ;; expsyms_regex) export_symbols_regex="$arg" prev= continue ;; framework) case $host in *-*-darwin*) case "$deplibs " in *" $qarg.ltframework "*) ;; *) func_append deplibs " $qarg.ltframework" # this is fixed later ;; esac ;; esac prev= continue ;; inst_prefix) inst_prefix_dir="$arg" prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat "$save_arg"` do # func_append moreargs " $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi done else func_fatal_error "link input file \`$arg' does not exist" fi arg=$save_arg prev= continue ;; precious_regex) precious_files_regex="$arg" prev= continue ;; release) release="-$arg" prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac if test "$prev" = rpath; then case "$rpath " in *" $arg "*) ;; *) func_append rpath " $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) func_append xrpath " $arg" ;; esac fi prev= continue ;; shrext) shrext_cmds="$arg" prev= continue ;; weak) func_append weak_libs " $arg" prev= continue ;; xcclinker) func_append linker_flags " $qarg" func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xcompiler) func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xlinker) func_append linker_flags " $qarg" func_append compiler_flags " $wl$qarg" prev= func_append compile_command " $wl$qarg" func_append finalize_command " $wl$qarg" continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg="$arg" case $arg in -all-static) if test -n "$link_static_flag"; then # See comment for -static flag below, for more details. func_append compile_command " $link_static_flag" func_append finalize_command " $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. func_fatal_error "\`-allow-undefined' must not be used because it is the default" ;; -avoid-version) avoid_version=yes continue ;; -bindir) prev=bindir continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then func_fatal_error "more than one -exported-symbols argument is not allowed" fi if test "X$arg" = "X-export-symbols"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework) prev=framework continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) func_append compile_command " $arg" func_append finalize_command " $arg" ;; esac continue ;; -L*) func_stripname "-L" '' "$arg" if test -z "$func_stripname_result"; then if test "$#" -gt 0; then func_fatal_error "require no space between \`-L' and \`$1'" else func_fatal_error "need path for \`-L' option" fi fi func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` test -z "$absdir" && \ func_fatal_error "cannot determine absolute directory name of \`$dir'" dir="$absdir" ;; esac case "$deplibs " in *" -L$dir "* | *" $arg "*) # Will only happen for absolute or sysroot arguments ;; *) # Preserve sysroot, but never include relative directories case $dir in [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; *) func_append deplibs " -L$dir" ;; esac func_append lib_search_path " $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; ::) dllsearchpath=$dir;; *) func_append dllsearchpath ":$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac continue ;; -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) # These systems don't actually have a C or math library (as such) continue ;; *-*-os2*) # These systems don't actually have a C library (as such) test "X$arg" = "X-lc" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework func_append deplibs " System.ltframework" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test "X$arg" = "X-lc" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test "X$arg" = "X-lc" && continue ;; esac elif test "X$arg" = "X-lc_r"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi func_append deplibs " $arg" continue ;; -module) module=yes continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. # Darwin uses the -arch flag to determine output architecture. -model|-arch|-isysroot|--sysroot) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case "$new_inherited_linker_flags " in *" $arg "*) ;; * ) func_append new_inherited_linker_flags " $arg" ;; esac continue ;; -multi_module) single_module="${wl}-multi_module" continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. func_warning "\`-no-install' is ignored for $host" func_warning "assuming \`-no-fast-install' instead" fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) func_stripname '-R' '' "$arg" dir=$func_stripname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; =*) func_stripname '=' '' "$dir" dir=$lt_sysroot$func_stripname_result ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac continue ;; -shared) # The effects of -shared are defined in a previous loop. continue ;; -shrext) prev=shrext continue ;; -static | -static-libtool-libs) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -weak) prev=weak continue ;; -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" func_append arg " $func_quote_for_eval_result" func_append compiler_flags " $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Wl,*) func_stripname '-Wl,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" func_append arg " $wl$func_quote_for_eval_result" func_append compiler_flags " $wl$func_quote_for_eval_result" func_append linker_flags " $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # -msg_* for osf cc -msg_*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; # Flags to be passed through unchanged, with rationale: # -64, -mips[0-9] enable 64-bit mode for the SGI compiler # -r[0-9][0-9]* specify processor for the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler # +DA*, +DD* enable 64-bit mode for the HP compiler # -q* compiler args for the IBM compiler # -m*, -t[45]*, -txscale* architecture-specific flags for GCC # -F/path path to uninstalled frameworks, gcc on darwin # -p, -pg, --coverage, -fprofile-* profiling flags for GCC # @file GCC response files # -tp=* Portland pgcc target processor selection # --sysroot=* for sysroot support # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -O*|-flto*|-fwhopr*|-fuse-linker-plugin) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" func_append compile_command " $arg" func_append finalize_command " $arg" func_append compiler_flags " $arg" continue ;; # Some other compiler flag. -* | +*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; *.$objext) # A standard object. func_append objs " $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi ;; *.$libext) # An archive. func_append deplibs " $arg" func_append old_deplibs " $arg" continue ;; *.la) # A libtool-controlled library. func_resolve_sysroot "$arg" if test "$prev" = dlfiles; then # This library was specified with -dlopen. func_append dlfiles " $func_resolve_sysroot_result" prev= elif test "$prev" = dlprefiles; then # The library was specified with -dlpreopen. func_append dlprefiles " $func_resolve_sysroot_result" prev= else func_append deplibs " $func_resolve_sysroot_result" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then func_append compile_command " $arg" func_append finalize_command " $arg" fi done # argument parsing loop test -n "$prev" && \ func_fatal_help "the \`$prevarg' option requires an argument" if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" func_append compile_command " $arg" func_append finalize_command " $arg" fi oldlibs= # calculate the name of the file, without its directory func_basename "$output" outputname="$func_basename_result" libobjs_save="$libobjs" if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" func_dirname "$output" "/" "" output_objdir="$func_dirname_result$objdir" func_to_tool_file "$output_objdir/" tool_output_objdir=$func_to_tool_file_result # Create the object directory. func_mkdir_p "$output_objdir" # Determine the type of output case $output in "") func_fatal_help "you must specify an output file" ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if $opt_preserve_dup_deps ; then case "$libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append libs " $deplib" done if test "$linkmode" = lib; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if $opt_duplicate_compiler_generated_deps; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; esac func_append pre_post_deps " $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv dlpreopen link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=no newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do # The preopen pass in lib mode reverses $deplibs; put it back here # so that -L comes before libs that need it for instance... if test "$linkmode,$pass" = "lib,link"; then ## FIXME: Find the place where the list is rebuilt in the wrong ## order, and fix it there properly tmp_deplibs= for deplib in $deplibs; do tmp_deplibs="$deplib $tmp_deplibs" done deplibs="$tmp_deplibs" fi if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan"; then libs="$deplibs" deplibs= fi if test "$linkmode" = prog; then case $pass in dlopen) libs="$dlfiles" ;; dlpreopen) libs="$dlprefiles" ;; link) libs="$deplibs %DEPLIBS%" test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" ;; esac fi if test "$linkmode,$pass" = "lib,dlpreopen"; then # Collect and forward deplibs of preopened libtool libs for lib in $dlprefiles; do # Ignore non-libtool-libs dependency_libs= func_resolve_sysroot "$lib" case $lib in *.la) func_source "$func_resolve_sysroot_result" ;; esac # Collect preopened libtool deplibs, except any this library # has declared as weak libs for deplib in $dependency_libs; do func_basename "$deplib" deplib_base=$func_basename_result case " $weak_libs " in *" $deplib_base "*) ;; *) func_append deplibs " $deplib" ;; esac done done libs="$dlprefiles" fi if test "$pass" = dlopen; then # Collect dlpreopened libraries save_deplibs="$deplibs" deplibs= fi for deplib in $libs; do lib= found=no case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append compiler_flags " $deplib" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -l*) if test "$linkmode" != lib && test "$linkmode" != prog; then func_warning "\`-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result if test "$linkmode" = lib; then searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" else searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" fi for searchdir in $searchdirs; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib="$searchdir/lib${name}${search_ext}" if test -f "$lib"; then if test "$search_ext" = ".la"; then found=yes else found=no fi break 2 fi done done if test "$found" != yes; then # deplib doesn't seem to be a libtool library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue else # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $deplib "*) if func_lalib_p "$lib"; then library_names= old_library= func_source "$lib" for l in $old_library $library_names; do ll="$l" done if test "X$ll" = "X$old_library" ; then # only static version available found=no func_dirname "$lib" "" "." ladir="$func_dirname_result" lib=$ladir/$old_library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi fi ;; # -l *.ltframework) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; prog) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi if test "$pass" = scan; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; *) func_warning "\`-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) if test "$pass" = link; then func_stripname '-R' '' "$deplib" func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) func_resolve_sysroot "$deplib" lib=$func_resolve_sysroot_result ;; *.$libext) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) # Linking convenience modules into shared libraries is allowed, # but linking other static libraries is non-portable. case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) valid_a_lib=no case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=yes fi ;; pass_all) valid_a_lib=yes ;; esac if test "$valid_a_lib" != yes; then echo $ECHO "*** Warning: Trying to link with static lib archive $deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because the file extensions .$libext of this argument makes me believe" echo "*** that it is just a static archive that I should not use here." else echo $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" fi ;; esac continue ;; prog) if test "$pass" != link; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test "$pass" = conv; then deplibs="$deplib $deplibs" elif test "$linkmode" = prog; then if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlopen support or we're linking statically, # we need to preload. func_append newdlprefiles " $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append newdlfiles " $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=yes continue ;; esac # case $deplib if test "$found" = yes || test -f "$lib"; then : else func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" fi # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$lib" \ || func_fatal_error "\`$lib' is not a valid libtool archive" func_dirname "$lib" "" "." ladir="$func_dirname_result" dlname= dlopen= dlpreopen= libdir= library_names= old_library= inherited_linker_flags= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no avoidtemprpath= # Read the .la file func_source "$lib" # Convert "-framework foo" to "foo.ltframework" if test -n "$inherited_linker_flags"; then tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do case " $new_inherited_linker_flags " in *" $tmp_inherited_linker_flag "*) ;; *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; esac done fi dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test "$linkmode" != prog && test "$linkmode" != lib; }; then test -n "$dlopen" && func_append dlfiles " $dlopen" test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" fi if test "$pass" = conv; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # It is a libtool convenience library, so add in its objects. func_append convenience " $ladir/$objdir/$old_library" func_append old_convenience " $ladir/$objdir/$old_library" tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done elif test "$linkmode" != prog && test "$linkmode" != lib; then func_fatal_error "\`$lib' is not a convenience library" fi continue fi # $pass = conv # Get the name of the library we link against. linklib= if test -n "$old_library" && { test "$prefer_static_libs" = yes || test "$prefer_static_libs,$installed" = "built,no"; }; then linklib=$old_library else for l in $old_library $library_names; do linklib="$l" done fi if test -z "$linklib"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # This library was specified with -dlopen. if test "$pass" = dlopen; then if test -z "$libdir"; then func_fatal_error "cannot -dlopen a convenience library: \`$lib'" fi if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. func_append dlprefiles " $lib $dependency_libs" else func_append newdlfiles " $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then func_warning "cannot determine absolute directory name of \`$ladir'" func_warning "passing it literally to the linker, although it might fail" abs_ladir="$ladir" fi ;; esac func_basename "$lib" laname="$func_basename_result" # Find the relevant object directory and library name. if test "X$installed" = Xyes; then if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then func_warning "library \`$lib' was moved." dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" else dir="$lt_sysroot$libdir" absdir="$lt_sysroot$libdir" fi test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then dir="$ladir" absdir="$abs_ladir" # Remove this search path later func_append notinst_path " $abs_ladir" else dir="$ladir/$objdir" absdir="$abs_ladir/$objdir" # Remove this search path later func_append notinst_path " $abs_ladir" fi fi # $installed = yes func_stripname 'lib' '.la' "$laname" name=$func_stripname_result # This library was specified with -dlpreopen. if test "$pass" = dlpreopen; then if test -z "$libdir" && test "$linkmode" = prog; then func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" fi case "$host" in # special handling for platforms with PE-DLLs. *cygwin* | *mingw* | *cegcc* ) # Linker will automatically link against shared library if both # static and shared are present. Therefore, ensure we extract # symbols from the import library if a shared library is present # (otherwise, the dlopen module name will be incorrect). We do # this by putting the import library name into $newdlprefiles. # We recover the dlopen module name by 'saving' the la file # name in a special purpose variable, and (later) extracting the # dlname from the la file. if test -n "$dlname"; then func_tr_sh "$dir/$linklib" eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" func_append newdlprefiles " $dir/$linklib" else func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" fi ;; * ) # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then func_append newdlprefiles " $dir/$dlname" else func_append newdlprefiles " $dir/$linklib" fi ;; esac fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test "$linkmode" = lib; then deplibs="$dir/$old_library $deplibs" elif test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else deplibs="$lib $deplibs" # used for prog,scan pass fi continue fi if test "$linkmode" = prog && test "$pass" != link; then func_append newlib_search_path " $ladir" deplibs="$lib $deplibs" linkalldeplibs=no if test "$link_all_deplibs" != no || test -z "$library_names" || test "$build_libtool_libs" = no; then linkalldeplibs=yes fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; esac # Need to link against all dependency_libs? if test "$linkalldeplibs" = yes; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done # for deplib continue fi # $linkmode = prog... if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && { { test "$prefer_static_libs" = no || test "$prefer_static_libs,$installed" = "built,yes"; } || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then # Make sure the rpath contains only unique directories. case "$temp_rpath:" in *"$absdir:"*) ;; *) func_append temp_rpath "$absdir:" ;; esac fi # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi # $linkmode,$pass = prog,link... if test "$alldeplibs" = yes && { test "$deplibs_check_method" = pass_all || { test "$build_libtool_libs" = yes && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs if test "$use_static_libs" = built && test "$installed" = yes; then use_static_libs=no fi if test -n "$library_names" && { test "$use_static_libs" = no || test -z "$old_library"; }; then case $host in *cygwin* | *mingw* | *cegcc*) # No point in relinking DLLs because paths are not encoded func_append notinst_deplibs " $lib" need_relink=no ;; *) if test "$installed" = no; then func_append notinst_deplibs " $lib" need_relink=yes fi ;; esac # This is a shared library # Warn about portability, can't link against -module's on some # systems (darwin). Don't bleat about dlopened modules though! dlopenmodule="" for dlpremoduletest in $dlprefiles; do if test "X$dlpremoduletest" = "X$lib"; then dlopenmodule="$dlpremoduletest" break fi done if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then echo if test "$linkmode" = prog; then $ECHO "*** Warning: Linking the executable $output against the loadable module" else $ECHO "*** Warning: Linking the shared library $output against the loadable module" fi $ECHO "*** $linklib is not portable!" fi if test "$linkmode" = lib && test "$hardcode_into_libs" = yes; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names shift realname="$1" shift libname=`eval "\\$ECHO \"$libname_spec\""` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname="$dlname" elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw* | *cegcc*) func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; esac eval soname=\"$soname_spec\" else soname="$realname" fi # Make a new name for the extract_expsyms_cmds to use soroot="$soname" func_basename "$soroot" soname="$func_basename_result" func_stripname 'lib' '.dll' "$soname" newlib=libimp-$func_stripname_result.a # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else func_verbose "extracting exported symbol list from \`$soname'" func_execute_cmds "$extract_expsyms_cmds" 'exit $?' fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else func_verbose "generating import library for \`$soname'" func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" if test "$linkmode" = prog || test "$opt_mode" != relink; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test "$hardcode_direct" = no; then add="$dir/$linklib" case $host in *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; *-*-sysv4*uw2*) add_dir="-L$dir" ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ *-*-unixware7*) add_dir="-L$dir" ;; *-*-darwin* ) # if the lib is a (non-dlopened) module then we can not # link against it, someone is ignoring the earlier warnings if /usr/bin/file -L $add 2> /dev/null | $GREP ": [^:]* bundle" >/dev/null ; then if test "X$dlopenmodule" != "X$lib"; then $ECHO "*** Warning: lib $linklib is a module, not a shared library" if test -z "$old_library" ; then echo echo "*** And there doesn't seem to be a static archive available" echo "*** The link will probably fail, sorry" else add="$dir/$old_library" fi elif test -n "$old_library"; then add="$dir/$old_library" fi fi esac elif test "$hardcode_minus_L" = no; then case $host in *-*-sunos*) add_shlibpath="$dir" ;; esac add_dir="-L$dir" add="-l$name" elif test "$hardcode_shlibpath_var" = no; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; relink) if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$dir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; *) lib_linked=no ;; esac if test "$lib_linked" != yes; then func_fatal_configuration "unsupported hardcode properties" fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) func_append compile_shlibpath "$add_shlibpath:" ;; esac fi if test "$linkmode" = prog; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" if test "$hardcode_direct" != yes && test "$hardcode_minus_L" != yes && test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac fi fi fi if test "$linkmode" = prog || test "$opt_mode" = relink; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$libdir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$libdir" add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac add="-l$name" elif test "$hardcode_automatic" = yes; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then add="$inst_prefix_dir$libdir/$linklib" else add="$libdir/$linklib" fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir="-L$libdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" fi if test "$linkmode" = prog; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test "$linkmode" = prog; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test "$hardcode_direct" != unsupported; then test -n "$old_library" && linklib="$old_library" compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test "$build_libtool_libs" = yes; then # Not a shared library if test "$deplibs_check_method" != pass_all; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. echo $ECHO "*** Warning: This system can not link to static lib archive $lib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have." if test "$module" = yes; then echo "*** But as you try to build a module library, libtool will still create " echo "*** a static module, that should work as long as the dlopening application" echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using \`nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test "$linkmode" = lib; then if test -n "$dependency_libs" && { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || test "$link_static" = yes; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) func_stripname '-R' '' "$libdir" temp_xrpath=$func_stripname_result case " $xrpath " in *" $temp_xrpath "*) ;; *) func_append xrpath " $temp_xrpath";; esac;; *) func_append temp_deplibs " $libdir";; esac done dependency_libs="$temp_deplibs" fi func_append newlib_search_path " $absdir" # Link against this library test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result";; *) func_resolve_sysroot "$deplib" ;; esac if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $func_resolve_sysroot_result "*) func_append specialdeplibs " $func_resolve_sysroot_result" ;; esac fi func_append tmp_libs " $func_resolve_sysroot_result" done if test "$link_all_deplibs" != no; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do path= case $deplib in -L*) path="$deplib" ;; *.la) func_resolve_sysroot "$deplib" deplib=$func_resolve_sysroot_result func_dirname "$deplib" "" "." dir=$func_dirname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then func_warning "cannot determine absolute directory name of \`$dir'" absdir="$dir" fi ;; esac if $GREP "^installed=no" $deplib > /dev/null; then case $host in *-*-darwin*) depdepl= eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names" ; then for tmp in $deplibrary_names ; do depdepl=$tmp done if test -f "$absdir/$objdir/$depdepl" ; then depdepl="$absdir/$objdir/$depdepl" darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` if test -z "$darwin_install_name"; then darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}" path= fi fi ;; *) path="-L$absdir/$objdir" ;; esac else eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" test "$absdir" != "$libdir" && \ func_warning "\`$deplib' seems to be moved" path="-L$absdir" fi ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs if test "$pass" = link; then if test "$linkmode" = "prog"; then compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi dependency_libs="$newdependency_libs" if test "$pass" = dlpreopen; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test "$pass" != dlopen; then if test "$pass" != conv; then # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) func_append lib_search_path " $dir" ;; esac done newlib_search_path= fi if test "$linkmode,$pass" != "prog,link"; then vars="deplibs" else vars="compile_deplibs finalize_deplibs" fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) func_append tmp_libs " $deplib" ;; esac ;; *) func_append tmp_libs " $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= for i in $dependency_libs ; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i="" ;; esac if test -n "$i" ; then func_append tmp_libs " $i" fi done dependency_libs=$tmp_libs done # for pass if test "$linkmode" = prog; then dlfiles="$newdlfiles" fi if test "$linkmode" = prog || test "$linkmode" = lib; then dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for archives" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for archives" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for archives" test -n "$xrpath" && \ func_warning "\`-R' is ignored for archives" test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for archives" test -n "$release" && \ func_warning "\`-release' is ignored for archives" test -n "$export_symbols$export_symbols_regex" && \ func_warning "\`-export-symbols' is ignored for archives" # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" func_append objs "$old_deplibs" ;; lib) # Make sure we only generate libraries of the form `libNAME.la'. case $outputname in lib*) func_stripname 'lib' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) test "$module" = no && \ func_fatal_help "libtool library \`$output' must begin with \`lib'" if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required func_stripname '' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else func_stripname '' '.la' "$outputname" libname=$func_stripname_result fi ;; esac if test -n "$objs"; then if test "$deplibs_check_method" != pass_all; then func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" else echo $ECHO "*** Warning: Linking the shared library $output against the non-libtool" $ECHO "*** objects $objs is not portable!" func_append libobjs " $objs" fi fi test "$dlself" != no && \ func_warning "\`-dlopen self' is ignored for libtool libraries" set dummy $rpath shift test "$#" -gt 1 && \ func_warning "ignoring multiple \`-rpath's for a libtool library" install_libdir="$1" oldlibs= if test -z "$rpath"; then if test "$build_libtool_libs" = yes; then # Building a libtool convenience library. # Some compilers have problems with a `.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for convenience libraries" test -n "$release" && \ func_warning "\`-release' is ignored for convenience libraries" else # Parse the version information argument. save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 shift IFS="$save_ifs" test -n "$7" && \ func_fatal_help "too many parameters to \`-version-info'" # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major="$1" number_minor="$2" number_revision="$3" # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # which has an extra 1 added just for fun # case $version_type in darwin|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_revision" ;; freebsd-aout|freebsd-elf|qnx|sunos) current="$number_major" revision="$number_minor" age="0" ;; irix|nonstopux) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_minor" lt_irix_increment=no ;; *) func_fatal_configuration "$modename: unknown library version type \`$version_type'" ;; esac ;; no) current="$1" revision="$2" age="$3" ;; esac # Check that each of the things are valid numbers. case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "CURRENT \`$current' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "REVISION \`$revision' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "AGE \`$age' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac if test "$age" -gt "$current"; then func_error "AGE \`$age' is greater than the current interface number \`$current'" func_fatal_error "\`$vinfo' is not valid version information" fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... func_arith $current + 1 minor_current=$func_arith_result xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; freebsd-aout) major=".$current" versuffix=".$current.$revision"; ;; freebsd-elf) major=".$current" versuffix=".$current" ;; irix | nonstopux) if test "X$lt_irix_increment" = "Xno"; then func_arith $current - $age else func_arith $current - $age + 1 fi major=$func_arith_result case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring="$verstring_prefix$major.$revision" # Add in all the interfaces that we are compatible with. loop=$revision while test "$loop" -ne 0; do func_arith $revision - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring_prefix$major.$iface:$verstring" done # Before this point, $major must not contain `.'. major=.$major versuffix="$major.$revision" ;; linux) func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" ;; osf) func_arith $current - $age major=.$func_arith_result versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" # Add in all the interfaces that we are compatible with. loop=$age while test "$loop" -ne 0; do func_arith $current - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring:${iface}.0" done # Make executables depend on our current version. func_append verstring ":${current}.0" ;; qnx) major=".$current" versuffix=".$current" ;; sunos) major=".$current" versuffix=".$current.$revision" ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; *) func_fatal_configuration "unknown library version type \`$version_type'" ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring= ;; *) verstring="0.0" ;; esac if test "$need_version" = no; then versuffix= else versuffix=".0.0" fi fi # Remove version info from name if versioning should be avoided if test "$avoid_version" = yes && test "$need_version" = no; then major= versuffix= verstring="" fi # Check to see if the archive will have undefined symbols. if test "$allow_undefined" = yes; then if test "$allow_undefined_flag" = unsupported; then func_warning "undefined symbols not allowed in $host shared libraries" build_libtool_libs=no build_old_libs=yes fi else # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi fi func_generate_dlsyms "$libname" "$libname" "yes" func_append libobjs " $symfileobj" test "X$libobjs" = "X " && libobjs= if test "$opt_mode" != relink; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$ECHO "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext | *.gcno) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) if test "X$precious_files_regex" != "X"; then if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi func_append removelist " $p" ;; *) ;; esac done test -n "$removelist" && \ func_show_eval "${RM}r \$removelist" fi # Now set the variables for building old libraries. if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then func_append oldlibs " $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` #done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do func_replace_sysroot "$libdir" func_append temp_xrpath " -R$func_replace_sysroot_result" case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles="$dlfiles" dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) func_append dlfiles " $lib" ;; esac done # Make sure dlprefiles contains only unique files old_dlprefiles="$dlprefiles" dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; *) func_append dlprefiles " $lib" ;; esac done if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework func_append deplibs " System.ltframework" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work ;; *) # Add libc to deplibs on all other systems if necessary. if test "$build_libtool_need_lc" = "yes"; then func_append deplibs " -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release="" versuffix="" major="" newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behavior. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $opt_dry_run || $RM conftest.c cat > conftest.c <<EOF int main() { return 0; } EOF $opt_dry_run || $RM conftest if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then ldd_output=`ldd conftest` for i in $deplibs; do case $i in -l*) func_stripname -l '' "$i" name=$func_stripname_result if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $i "*) func_append newdeplibs " $i" i="" ;; esac fi if test -n "$i" ; then libname=`eval "\\$ECHO \"$libname_spec\""` deplib_matches=`eval "\\$ECHO \"$library_names_spec\""` set dummy $deplib_matches; shift deplib_match=$1 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then func_append newdeplibs " $i" else droppeddeps=yes echo $ECHO "*** Warning: dynamic linker does not accept needed library $i." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which I believe you do not have" echo "*** because a test_compile did reveal that the linker did not use it for" echo "*** its dynamic dependency list that programs get resolved with at runtime." fi fi ;; *) func_append newdeplibs " $i" ;; esac done else # Error occurred in the first compile. Let's try to salvage # the situation: Compile a separate program for each library. for i in $deplibs; do case $i in -l*) func_stripname -l '' "$i" name=$func_stripname_result $opt_dry_run || $RM conftest if $LTCC $LTCFLAGS -o conftest conftest.c $i; then ldd_output=`ldd conftest` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $i "*) func_append newdeplibs " $i" i="" ;; esac fi if test -n "$i" ; then libname=`eval "\\$ECHO \"$libname_spec\""` deplib_matches=`eval "\\$ECHO \"$library_names_spec\""` set dummy $deplib_matches; shift deplib_match=$1 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then func_append newdeplibs " $i" else droppeddeps=yes echo $ECHO "*** Warning: dynamic linker does not accept needed library $i." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because a test_compile did reveal that the linker did not use this one" echo "*** as a dynamic dependency that programs can get resolved with at runtime." fi fi else droppeddeps=yes echo $ECHO "*** Warning! Library $i is needed by this library but I was not able to" echo "*** make it link in! You will probably need to install it or some" echo "*** library that it depends on before this library will be fully" echo "*** functional. Installing it before continuing would be even better." fi ;; *) func_append newdeplibs " $i" ;; esac done fi ;; file_magic*) set dummy $deplibs_check_method; shift file_magic_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` for a_deplib in $deplibs; do case $a_deplib in -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) func_append newdeplibs " $a_deplib" a_deplib="" ;; esac fi if test -n "$a_deplib" ; then libname=`eval "\\$ECHO \"$libname_spec\""` if test -n "$file_magic_glob"; then libnameglob=`func_echo_all "$libname" | $SED -e $file_magic_glob` else libnameglob=$libname fi test "$want_nocaseglob" = yes && nocaseglob=`shopt -p nocaseglob` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do if test "$want_nocaseglob" = yes; then shopt -s nocaseglob potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` $nocaseglob else potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` fi for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null | $GREP " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib="$potent_lib" while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for file magic test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a file magic. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` for a_deplib in $deplibs; do case $a_deplib in -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) func_append newdeplibs " $a_deplib" a_deplib="" ;; esac fi if test -n "$a_deplib" ; then libname=`eval "\\$ECHO \"$libname_spec\""` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib="$potent_lib" # see symlink-check above in file_magic test if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ $EGREP "$match_pattern_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a regex pattern. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then for i in $predeps $postdeps ; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"` done fi case $tmp_deplibs in *[!\ \ ]*) echo if test "X$deplibs_check_method" = "Xnone"; then echo "*** Warning: inter-library dependencies are not supported in this platform." else echo "*** Warning: inter-library dependencies are not known to be supported." fi echo "*** All declared inter-library dependencies are being dropped." droppeddeps=yes ;; esac ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library with the System framework newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac if test "$droppeddeps" = yes; then if test "$module" = yes; then echo echo "*** Warning: libtool could not satisfy all declared inter-library" $ECHO "*** dependencies of module $libname. Therefore, libtool will create" echo "*** a static module, that should work as long as the dlopening" echo "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using \`nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else echo "*** The inter-library dependencies that have been dropped here will be" echo "*** automatically added whenever a program is linked with this library" echo "*** or is declared to -dlopen it." if test "$allow_undefined" = no; then echo echo "*** Since this library must not contain undefined symbols," echo "*** because either the platform does not support them or" echo "*** it was explicitly requested with -no-undefined," echo "*** libtool will only create a static version of it." if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" case $host in *-*-darwin*) newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done deplibs="$new_libs" # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath="$finalize_rpath" test "$opt_mode" != relink && rpath="$compile_rpath$rpath" for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then func_replace_sysroot "$libdir" libdir=$func_replace_sysroot_result if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append dep_rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_apped perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" if test -n "$hardcode_libdir_flag_spec_ld"; then eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" else eval dep_rpath=\"$hardcode_libdir_flag_spec\" fi fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath="$finalize_shlibpath" test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath" if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names shift realname="$1" shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname="$realname" fi if test -z "$dlname"; then dlname=$soname fi lib="$output_objdir/$realname" linknames= for link do func_append linknames " $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` test "X$libobjs" = "X " && libobjs= delfiles= if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" export_symbols="$output_objdir/$libname.uexp" func_append delfiles " $export_symbols" fi orig_export_symbols= case $host_os in cygwin* | mingw* | cegcc*) if test -n "$export_symbols" && test -z "$export_symbols_regex"; then # exporting using user supplied symfile if test "x`$SED 1q $export_symbols`" != xEXPORTS; then # and it's NOT already a .def file. Must figure out # which of the given symbols are data symbols and tag # them as such. So, trigger use of export_symbols_cmds. # export_symbols gets reassigned inside the "prepare # the list of exported symbols" if statement, so the # include_expsyms logic still works. orig_export_symbols="$export_symbols" export_symbols= always_export_symbols=yes fi fi ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds save_ifs="$IFS"; IFS='~' for cmd1 in $cmds; do IFS="$save_ifs" # Take the normal branch if the nm_file_list_spec branch # doesn't work or if tool conversion is not needed. case $nm_file_list_spec~$to_tool_file_cmd in *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) try_normal_branch=yes eval cmd=\"$cmd1\" func_len " $cmd" len=$func_len_result ;; *) try_normal_branch=no ;; esac if test "$try_normal_branch" = yes \ && { test "$len" -lt "$max_cmd_len" \ || test "$max_cmd_len" -le -1; } then func_show_eval "$cmd" 'exit $?' skipped_export=false elif test -n "$nm_file_list_spec"; then func_basename "$output" output_la=$func_basename_result save_libobjs=$libobjs save_output=$output output=${output_objdir}/${output_la}.nm func_to_tool_file "$output" libobjs=$nm_file_list_spec$func_to_tool_file_result func_append delfiles " $output" func_verbose "creating $NM input file list: $output" for obj in $save_libobjs; do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > "$output" eval cmd=\"$cmd1\" func_show_eval "$cmd" 'exit $?' output=$save_output libobjs=$save_libobjs skipped_export=false else # The command line is too long to execute in one step. func_verbose "using reloadable object file for export list..." skipped_export=: # Break out early, otherwise skipped_export may be # set to false by a later but shorter cmd. break fi done IFS="$save_ifs" if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) func_append tmp_deplibs " $test_deplib" ;; esac done deplibs="$tmp_deplibs" if test -n "$convenience"; then if test -n "$whole_archive_flag_spec" && test "$compiler_needs_object" = yes && test -z "$libobjs"; then # extract the archives, so we have objects to list. # TODO: could optimize this to just extract one archive. whole_archive_flag_spec= fi if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= else gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $convenience func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi fi if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" func_append linker_flags " $flag" fi # Make a backup of the uninstalled library when relinking if test "$opt_mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds else eval test_cmds=\"$module_cmds\" cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval test_cmds=\"$archive_expsym_cmds\" cmds=$archive_expsym_cmds else eval test_cmds=\"$archive_cmds\" cmds=$archive_cmds fi fi if test "X$skipped_export" != "X:" && func_len " $test_cmds" && len=$func_len_result && test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise # or, if using GNU ld and skipped_export is not :, use a linker # script. # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output func_basename "$output" output_la=$func_basename_result # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= last_robj= k=1 if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then output=${output_objdir}/${output_la}.lnkscript func_verbose "creating GNU ld script: $output" echo 'INPUT (' > $output for obj in $save_libobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done echo ')' >> $output func_append delfiles " $output" func_to_tool_file "$output" output=$func_to_tool_file_result elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then output=${output_objdir}/${output_la}.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= if test "$compiler_needs_object" = yes; then firstobj="$1 " shift fi for obj do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done func_append delfiles " $output" func_to_tool_file "$output" output=$firstobj\"$file_list_spec$func_to_tool_file_result\" else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." output=$output_objdir/$output_la-${k}.$objext eval test_cmds=\"$reload_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 # Loop over the list of objects to be linked. for obj in $save_libobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result if test "X$objlist" = X || test "$len" -lt "$max_cmd_len"; then func_append objlist " $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test "$k" -eq 1 ; then # The first file doesn't have a previous command to add. reload_objs=$objlist eval concat_cmds=\"$reload_cmds\" else # All subsequent reloadable object files will link in # the last one created. reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" fi last_robj=$output_objdir/$output_la-${k}.$objext func_arith $k + 1 k=$func_arith_result output=$output_objdir/$output_la-${k}.$objext objlist=" $obj" func_len " $last_robj" func_arith $len0 + $func_len_result len=$func_arith_result fi done # Handle the remaining objects by creating one last # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ reload_objs="$objlist $last_robj" eval concat_cmds=\"\${concat_cmds}$reload_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" fi func_append delfiles " $output" else output= fi if ${skipped_export-false}; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols libobjs=$output # Append the command to create the export file. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi fi test -n "$save_libobjs" && func_verbose "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. save_ifs="$IFS"; IFS='~' for cmd in $concat_cmds; do IFS="$save_ifs" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$opt_mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" if test -n "$export_symbols_regex" && ${skipped_export-false}; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi if ${skipped_export-false}; then if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi fi libobjs=$output # Restore the value of output. output=$save_output if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi fi if test -n "$delfiles"; then # Append the command to remove temporary files to $cmds. eval cmds=\"\$cmds~\$RM $delfiles\" fi # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$opt_mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" # Restore the uninstalled library and exit if test "$opt_mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? if test -n "$convenience"; then if test -z "$whole_archive_flag_spec"; then func_show_eval '${RM}r "$gentop"' fi fi exit $EXIT_SUCCESS fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' fi done # If -module or -export-dynamic was specified, set the dlname. if test "$module" = yes || test "$export_dynamic" = yes; then # On all known operating systems, these are identical. dlname="$soname" fi fi ;; obj) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for objects" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for objects" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for objects" test -n "$xrpath" && \ func_warning "\`-R' is ignored for objects" test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for objects" test -n "$release" && \ func_warning "\`-release' is ignored for objects" case $output in *.lo) test -n "$objs$old_deplibs" && \ func_fatal_error "cannot build library object \`$output' from non-libtool objects" libobj=$output func_lo2o "$libobj" obj=$func_lo2o_result ;; *) libobj= obj="$output" ;; esac # Delete the old objects. $opt_dry_run || $RM $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of # -Wl from whole_archive_flag_spec and hope we can get by with # turning comma into space.. wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` else gentop="$output_objdir/${obj}x" func_append generated " $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # If we're not building shared, we need to use non_pic_objs test "$build_libtool_libs" != yes && libobjs="$non_pic_objects" # Create the old-style object. reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" func_execute_cmds "$reload_cmds" 'exit $?' # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS fi if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS fi if test -n "$pic_flag" || test "$pic_mode" != default; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output="$libobj" func_execute_cmds "$reload_cmds" 'exit $?' fi if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) func_stripname '' '.exe' "$output" output=$func_stripname_result.exe;; esac test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for programs" test -n "$release" && \ func_warning "\`-release' is ignored for programs" test "$preload" = yes \ && test "$dlopen_support" = unknown \ && test "$dlopen_self" = unknown \ && test "$dlopen_self_static" = unknown && \ func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac case $host in *-*-darwin*) # Don't allow lazy linking, it breaks C++ global constructors # But is supposedly fixed on 10.4 or later (yay!). if test "$tagname" = CXX ; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) func_append compile_command " ${wl}-bind_at_load" func_append finalize_command " ${wl}-bind_at_load" ;; esac fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $compile_deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done compile_deplibs="$new_libs" func_append compile_command " $compile_deplibs" func_append finalize_command " $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; *) func_append dllsearchpath ":$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath="$rpath" rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) func_append finalize_perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath="$rpath" if test -n "$libobjs" && test "$build_old_libs" = yes; then # Transform all the library objects into standard objects. compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` fi func_generate_dlsyms "$outputname" "@PROGRAM@" "no" # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi wrappers_required=yes case $host in *cegcc* | *mingw32ce*) # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. wrappers_required=no ;; *cygwin* | *mingw* ) if test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; *) if test "$need_relink" = no || test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; esac if test "$wrappers_required" = no; then # Replace the output file specification. compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. exit_status=0 func_show_eval "$link_command" 'exit_status=$?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Delete the generated files. if test -f "$output_objdir/${outputname}S.${objext}"; then func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' fi exit $exit_status fi if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do func_append rpath "$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test "$no_install" = yes; then # We don't need to create a wrapper script. link_command="$compile_var$compile_command$compile_rpath" # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $opt_dry_run || $RM $output # Link the executable and exit func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi exit $EXIT_SUCCESS fi if test "$hardcode_action" = relink; then # Fast installation is not supported link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" func_warning "this platform does not like uninstalled shared libraries" func_warning "\`$output' will be relinked during installation" else if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` else # fast_install is set to needless relink_command= fi else link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" fi fi # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output_objdir/$outputname" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Now create the wrapper script. func_verbose "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` fi # Only actually do things if not in dry run mode. $opt_dry_run || { # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) func_stripname '' '.exe' "$output" output=$func_stripname_result ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe func_stripname '' '.exe' "$outputname" outputname=$func_stripname_result ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) func_dirname_and_basename "$output" "" "." output_name=$func_basename_result output_path=$func_dirname_result cwrappersource="$output_path/$objdir/lt-$output_name.c" cwrapper="$output_path/$output_name.exe" $RM $cwrappersource $cwrapper trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 func_emit_cwrapperexe_src > $cwrappersource # The wrapper executable is built using the $host compiler, # because it contains $host paths and files. If cross- # compiling, it, like the target executable, must be # executed on the $host or under an emulation environment. $opt_dry_run || { $LTCC $LTCFLAGS -o $cwrapper $cwrappersource $STRIP $cwrapper } # Now, create the wrapper script for func_source use: func_ltwrapper_scriptname $cwrapper $RM $func_ltwrapper_scriptname_result trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 $opt_dry_run || { # note: this script will not be executed, so do not chmod. if test "x$build" = "x$host" ; then $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result else func_emit_wrapper no > $func_ltwrapper_scriptname_result fi } ;; * ) $RM $output trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 func_emit_wrapper no > $output chmod +x $output ;; esac } exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do if test "$build_libtool_libs" = convenience; then oldobjs="$libobjs_save $symfileobj" addlibs="$convenience" build_libtool_libs=no else if test "$build_libtool_libs" = module; then oldobjs="$libobjs_save" build_libtool_libs=no else oldobjs="$old_deplibs $non_pic_objects" if test "$preload" = yes && test -f "$symfileobj"; then func_append oldobjs " $symfileobj" fi fi addlibs="$old_convenience" fi if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $addlibs func_append oldobjs " $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then cmds=$old_archive_from_new_cmds else # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append oldobjs " $func_extract_archives_result" fi # POSIX demands no paths to be encoded in archives. We have # to avoid creating archives with duplicate basenames if we # might have to extract them afterwards, e.g., when creating a # static archive out of a convenience library, or when linking # the entirety of a libtool archive into another (currently # not supported by libtool). if (for obj in $oldobjs do func_basename "$obj" $ECHO "$func_basename_result" done | sort | sort -uc >/dev/null 2>&1); then : else echo "copying selected object files to avoid basename conflicts..." gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do func_basename "$obj" objbase="$func_basename_result" case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase func_arith $counter + 1 counter=$func_arith_result case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" func_append oldobjs " $gentop/$newobj" ;; *) func_append oldobjs " $obj" ;; esac done fi eval cmds=\"$old_archive_cmds\" func_len " $cmds" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds elif test -n "$archiver_list_spec"; then func_verbose "using command file archive linking..." for obj in $oldobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > $output_objdir/$libname.libcmd func_to_tool_file "$output_objdir/$libname.libcmd" oldobjs=" $archiver_list_spec$func_to_tool_file_result" cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts func_verbose "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs oldobjs= # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done eval test_cmds=\"$old_archive_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 for obj in $save_oldobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result func_append objlist " $obj" if test "$len" -lt "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj" ; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" objlist= len=$len0 fi done RANLIB=$save_RANLIB oldobjs=$objlist if test "X$oldobjs" = "X" ; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi func_execute_cmds "$cmds" 'exit $?' done test -n "$generated" && \ func_show_eval "${RM}r$generated" # Now create the libtool archive. case $output in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" func_verbose "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` if test "$hardcode_automatic" = yes ; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do if test "$installed" = yes; then if test -z "$install_libdir"; then break fi output="$output_objdir/$outputname"i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) func_basename "$deplib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" ;; -L*) func_stripname -L '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -L$func_replace_sysroot_result" ;; -R*) func_stripname -R '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -R$func_replace_sysroot_result" ;; *) func_append newdependency_libs " $deplib" ;; esac done dependency_libs="$newdependency_libs" newdlfiles= for lib in $dlfiles; do case $lib in *.la) func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" ;; *) func_append newdlfiles " $lib" ;; esac done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in *.la) # Only pass preopened files to the pseudo-archive (for # eventual linking with the app. that links it) if we # didn't already link the preopened objects directly into # the library: func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" ;; esac done dlprefiles="$newdlprefiles" else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlfiles " $abs" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlprefiles " $abs" done dlprefiles="$newdlprefiles" fi $RM $output # place dlname in correct position for cygwin # In fact, it would be nice if we could use this code for all target # systems that can't hard-code library paths into their executables # and that have no shared library path variable independent of PATH, # but it turns out we can't easily determine that from inspecting # libtool variables, so we have to hard-code the OSs to which it # applies here; at the moment, that means platforms that use the PE # object format with DLL files. See the long comment at the top of # tests/bindir.at for full details. tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) # If a -bindir argument was supplied, place the dll there. if test "x$bindir" != x ; then func_relative_path "$install_libdir" "$bindir" tdlname=$func_relative_path_result$dlname else # Otherwise fall back on heuristic. tdlname=../bin/$dlname fi ;; esac $ECHO > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Linker flags that can not go in dependency_libs. inherited_linker_flags='$new_inherited_linker_flags' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Names of additional weak libraries provided by this library weak_library_names='$weak_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test "$installed" = no && test "$need_relink" = yes; then $ECHO >> $output "\ relink_command=\"$relink_command\"" fi done } # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' ;; esac exit $EXIT_SUCCESS } { test "$opt_mode" = link || test "$opt_mode" = relink; } && func_mode_link ${1+"$@"} # func_mode_uninstall arg... func_mode_uninstall () { $opt_debug RM="$nonopt" files= rmforce= exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" for arg do case $arg in -f) func_append RM " $arg"; rmforce=yes ;; -*) func_append RM " $arg" ;; *) func_append files " $arg" ;; esac done test -z "$RM" && \ func_fatal_help "you must specify an RM program" rmdirs= for file in $files; do func_dirname "$file" "" "." dir="$func_dirname_result" if test "X$dir" = X.; then odir="$objdir" else odir="$dir/$objdir" fi func_basename "$file" name="$func_basename_result" test "$opt_mode" = uninstall && odir="$dir" # Remember odir for removal later, being careful to avoid duplicates if test "$opt_mode" = clean; then case " $rmdirs " in *" $odir "*) ;; *) func_append rmdirs " $odir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if { test -L "$file"; } >/dev/null 2>&1 || { test -h "$file"; } >/dev/null 2>&1 || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif test "$rmforce" = yes; then continue fi rmfiles="$file" case $name in *.la) # Possibly a libtool archive, so verify it. if func_lalib_p "$file"; then func_source $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do func_append rmfiles " $odir/$n" done test -n "$old_library" && func_append rmfiles " $odir/$old_library" case "$opt_mode" in clean) case " $library_names " in *" $dlname "*) ;; *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; esac test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if func_lalib_p "$file"; then # Read the .lo file func_source $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" && test "$pic_object" != none; then func_append rmfiles " $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" && test "$non_pic_object" != none; then func_append rmfiles " $dir/$non_pic_object" fi fi ;; *) if test "$opt_mode" = clean ; then noexename=$name case $file in *.exe) func_stripname '' '.exe' "$file" file=$func_stripname_result func_stripname '' '.exe' "$name" noexename=$func_stripname_result # $file with .exe has already been added to rmfiles, # add $file without .exe func_append rmfiles " $file" ;; esac # Do a test to see if this is a libtool program. if func_ltwrapper_p "$file"; then if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" relink_command= func_source $func_ltwrapper_scriptname_result func_append rmfiles " $func_ltwrapper_scriptname_result" else relink_command= func_source $dir/$noexename fi # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles func_append rmfiles " $odir/$name $odir/${name}S.${objext}" if test "$fast_install" = yes && test -n "$relink_command"; then func_append rmfiles " $odir/lt-$name" fi if test "X$noexename" != "X$name" ; then func_append rmfiles " $odir/lt-${noexename}.c" fi fi fi ;; esac func_show_eval "$RM $rmfiles" 'exit_status=1' done # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then func_show_eval "rmdir $dir >/dev/null 2>&1" fi done exit $exit_status } { test "$opt_mode" = uninstall || test "$opt_mode" = clean; } && func_mode_uninstall ${1+"$@"} test -z "$opt_mode" && { help="$generic_help" func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ func_fatal_help "invalid operation mode \`$opt_mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" exit $EXIT_FAILURE fi exit $exit_status # The TAGs below are defined such that we never get into a situation # in which we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared build_libtool_libs=no build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: # vi:sw=2 �������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/build-aux/config.guess�������������������������������������������������������0000755�0001750�0001750�00000132264�11672675561�016151� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 # Free Software Foundation, Inc. timestamp='2009-04-27' # 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., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Per Bothner <per@bothner.com>. # Please send patches to <config-patches@gnu.org>. 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 <config-patches@gnu.org>." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep __ELF__ >/dev/null then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm:riscos:*:*|arm:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH="x86_64" fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include <stdio.h> /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include <sys/systemcfg.h> main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[456]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include <stdlib.h> #include <unistd.h> int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep __LP64__ >/dev/null then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include <unistd.h> int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) case ${UNAME_MACHINE} in pc98) echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:[3456]*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; EM64T | authenticamd | genuineintel) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-gnu else echo ${UNAME_MACHINE}-unknown-linux-gnueabi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit ;; crisv32:Linux:*:*) echo crisv32-axis-linux-gnu exit ;; frv:Linux:*:*) echo frv-unknown-linux-gnu exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; mips:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips #undef mipsel #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mipsel #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips #else CPU= #endif #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^CPU/{ s: ::g p }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips64 #undef mips64el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mips64el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips64 #else CPU= #endif #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^CPU/{ s: ::g p }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) echo or32-unknown-linux-gnu exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit ;; padre:Linux:*:*) echo sparc-unknown-linux-gnu exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. # Set LC_ALL=C to ensure ld outputs messages in English. ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g s/.*supported targets: *// s/ .*// p'` case "$ld_supported_targets" in elf32-i386) TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" exit ;; "") # Either a pre-BFD a.out linker (linux-gnuoldld) or # one that does not give us useful --help. echo "${UNAME_MACHINE}-pc-linux-gnuoldld" exit ;; esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include <features.h> #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 LIBC=gnu # else LIBC=gnulibc1 # endif # else LIBC=gnulibc1 # endif #else #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) LIBC=gnu #else LIBC=gnuaout #endif #endif #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^LIBC/{ s: ::g p }'`" test x"${LIBC}" != x && { echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit } test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` echo ${UNAME_MACHINE}-pc-isc$UNAME_REL elif /bin/uname -X 2>/dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says <Richard.M.Bartel@ccMail.Census.GOV> echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes <hewes@openmarket.com>. # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c <<EOF #ifdef _SEQUENT_ # include <sys/types.h> # include <sys/utsname.h> #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 <sys/param.h> printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include <sys/param.h> # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi cat >&2 <<EOF $0: unable to guess system type This script, last modified $timestamp, has failed to recognize the operating system you are using. It is advised that you download the most up to date version of the config scripts from http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD and http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD If the version you run ($0) is already up to date, please send the following data and any information you think might be pertinent to <config-patches@gnu.org> 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: ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/build-aux/texinfo.tex��������������������������������������������������������0000644�0001750�0001750�00001100320�11672675561�016014� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������% texinfo.tex -- TeX macros to handle Texinfo files. % % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % \def\texinfoversion{2009-05-16.16} % % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, % 2007, 2008, 2009 Free Software Foundation, Inc. % % This texinfo.tex file is free software: you can redistribute it and/or % modify it under the terms of the GNU General Public License as % published by the Free Software Foundation, either version 3 of the % License, or (at your option) any later version. % % This texinfo.tex file is distributed in the hope that it will be % useful, but WITHOUT ANY WARRANTY; without even the implied warranty % of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU % General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program. If not, see <http://www.gnu.org/licenses/>. % % As a special exception, when this file is read by TeX when processing % a Texinfo source document, you may use the result without % restriction. (This has been our intent since Texinfo was invented.) % % Please try the latest version of texinfo.tex before submitting bug % reports; you can get the latest version from: % http://www.gnu.org/software/texinfo/ (the Texinfo home page), or % ftp://tug.org/tex/texinfo.tex % (and all CTAN mirrors, see http://www.ctan.org). % The texinfo.tex in any given distribution could well be out % of date, so if that's what you're using, please check. % % Send bug reports to bug-texinfo@gnu.org. Please include including a % complete document in each bug report with which we can reproduce the % problem. Patches are, of course, greatly appreciated. % % To process a Texinfo manual with TeX, it's most reliable to use the % texi2dvi shell script that comes with the distribution. For a simple % manual foo.texi, however, you can get away with this: % tex foo.texi % texindex foo.?? % tex foo.texi % tex foo.texi % dvips foo.dvi -o # or whatever; this makes foo.ps. % The extra TeX runs get the cross-reference information correct. % Sometimes one run after texindex suffices, and sometimes you need more % than two; texi2dvi does it as many times as necessary. % % It is possible to adapt texinfo.tex for other languages, to some % extent. You can get the existing language-specific files from the % full Texinfo distribution. % % The GNU Texinfo home page is http://www.gnu.org/software/texinfo. \message{Loading texinfo [version \texinfoversion]:} % If in a .fmt file, print the version number % and turn on active characters that we couldn't do earlier because % they might have appeared in the input file name. \everyjob{\message{[Texinfo version \texinfoversion]}% \catcode`+=\active \catcode`\_=\active} \chardef\other=12 % We never want plain's \outer definition of \+ in Texinfo. % For @tex, we can use \tabalign. \let\+ = \relax % Save some plain tex macros whose names we will redefine. \let\ptexb=\b \let\ptexbullet=\bullet \let\ptexc=\c \let\ptexcomma=\, \let\ptexdot=\. \let\ptexdots=\dots \let\ptexend=\end \let\ptexequiv=\equiv \let\ptexexclam=\! \let\ptexfootnote=\footnote \let\ptexgtr=> \let\ptexhat=^ \let\ptexi=\i \let\ptexindent=\indent \let\ptexinsert=\insert \let\ptexlbrace=\{ \let\ptexless=< \let\ptexnewwrite\newwrite \let\ptexnoindent=\noindent \let\ptexplus=+ \let\ptexrbrace=\} \let\ptexslash=\/ \let\ptexstar=\* \let\ptext=\t \let\ptextop=\top {\catcode`\'=\active \global\let\ptexquoteright'}% Math-mode def from plain.tex. \let\ptexraggedright=\raggedright % If this character appears in an error message or help string, it % starts a new line in the output. \newlinechar = `^^J % Use TeX 3.0's \inputlineno to get the line number, for better error % messages, but if we're using an old version of TeX, don't do anything. % \ifx\inputlineno\thisisundefined \let\linenumber = \empty % Pre-3.0. \else \def\linenumber{l.\the\inputlineno:\space} \fi % Set up fixed words for English if not already set. \ifx\putwordAppendix\undefined \gdef\putwordAppendix{Appendix}\fi \ifx\putwordChapter\undefined \gdef\putwordChapter{Chapter}\fi \ifx\putwordfile\undefined \gdef\putwordfile{file}\fi \ifx\putwordin\undefined \gdef\putwordin{in}\fi \ifx\putwordIndexIsEmpty\undefined \gdef\putwordIndexIsEmpty{(Index is empty)}\fi \ifx\putwordIndexNonexistent\undefined \gdef\putwordIndexNonexistent{(Index is nonexistent)}\fi \ifx\putwordInfo\undefined \gdef\putwordInfo{Info}\fi \ifx\putwordInstanceVariableof\undefined \gdef\putwordInstanceVariableof{Instance Variable of}\fi \ifx\putwordMethodon\undefined \gdef\putwordMethodon{Method on}\fi \ifx\putwordNoTitle\undefined \gdef\putwordNoTitle{No Title}\fi \ifx\putwordof\undefined \gdef\putwordof{of}\fi \ifx\putwordon\undefined \gdef\putwordon{on}\fi \ifx\putwordpage\undefined \gdef\putwordpage{page}\fi \ifx\putwordsection\undefined \gdef\putwordsection{section}\fi \ifx\putwordSection\undefined \gdef\putwordSection{Section}\fi \ifx\putwordsee\undefined \gdef\putwordsee{see}\fi \ifx\putwordSee\undefined \gdef\putwordSee{See}\fi \ifx\putwordShortTOC\undefined \gdef\putwordShortTOC{Short Contents}\fi \ifx\putwordTOC\undefined \gdef\putwordTOC{Table of Contents}\fi % \ifx\putwordMJan\undefined \gdef\putwordMJan{January}\fi \ifx\putwordMFeb\undefined \gdef\putwordMFeb{February}\fi \ifx\putwordMMar\undefined \gdef\putwordMMar{March}\fi \ifx\putwordMApr\undefined \gdef\putwordMApr{April}\fi \ifx\putwordMMay\undefined \gdef\putwordMMay{May}\fi \ifx\putwordMJun\undefined \gdef\putwordMJun{June}\fi \ifx\putwordMJul\undefined \gdef\putwordMJul{July}\fi \ifx\putwordMAug\undefined \gdef\putwordMAug{August}\fi \ifx\putwordMSep\undefined \gdef\putwordMSep{September}\fi \ifx\putwordMOct\undefined \gdef\putwordMOct{October}\fi \ifx\putwordMNov\undefined \gdef\putwordMNov{November}\fi \ifx\putwordMDec\undefined \gdef\putwordMDec{December}\fi % \ifx\putwordDefmac\undefined \gdef\putwordDefmac{Macro}\fi \ifx\putwordDefspec\undefined \gdef\putwordDefspec{Special Form}\fi \ifx\putwordDefvar\undefined \gdef\putwordDefvar{Variable}\fi \ifx\putwordDefopt\undefined \gdef\putwordDefopt{User Option}\fi \ifx\putwordDeffunc\undefined \gdef\putwordDeffunc{Function}\fi % Since the category of space is not known, we have to be careful. \chardef\spacecat = 10 \def\spaceisspace{\catcode`\ =\spacecat} % sometimes characters are active, so we need control sequences. \chardef\colonChar = `\: \chardef\commaChar = `\, \chardef\dashChar = `\- \chardef\dotChar = `\. \chardef\exclamChar= `\! \chardef\lquoteChar= `\` \chardef\questChar = `\? \chardef\rquoteChar= `\' \chardef\semiChar = `\; \chardef\underChar = `\_ % Ignore a token. % \def\gobble#1{} % The following is used inside several \edef's. \def\makecsname#1{\expandafter\noexpand\csname#1\endcsname} % Hyphenation fixes. \hyphenation{ Flor-i-da Ghost-script Ghost-view Mac-OS Post-Script ap-pen-dix bit-map bit-maps data-base data-bases eshell fall-ing half-way long-est man-u-script man-u-scripts mini-buf-fer mini-buf-fers over-view par-a-digm par-a-digms rath-er rec-tan-gu-lar ro-bot-ics se-vere-ly set-up spa-ces spell-ing spell-ings stand-alone strong-est time-stamp time-stamps which-ever white-space wide-spread wrap-around } % Margin to add to right of even pages, to left of odd pages. \newdimen\bindingoffset \newdimen\normaloffset \newdimen\pagewidth \newdimen\pageheight % For a final copy, take out the rectangles % that mark overfull boxes (in case you have decided % that the text looks ok even though it passes the margin). % \def\finalout{\overfullrule=0pt} % @| inserts a changebar to the left of the current line. It should % surround any changed text. This approach does *not* work if the % change spans more than two lines of output. To handle that, we would % have adopt a much more difficult approach (putting marks into the main % vertical list for the beginning and end of each change). % \def\|{% % \vadjust can only be used in horizontal mode. \leavevmode % % Append this vertical mode material after the current line in the output. \vadjust{% % We want to insert a rule with the height and depth of the current % leading; that is exactly what \strutbox is supposed to record. \vskip-\baselineskip % % \vadjust-items are inserted at the left edge of the type. So % the \llap here moves out into the left-hand margin. \llap{% % % For a thicker or thinner bar, change the `1pt'. \vrule height\baselineskip width1pt % % This is the space between the bar and the text. \hskip 12pt }% }% } % Sometimes it is convenient to have everything in the transcript file % and nothing on the terminal. We don't just call \tracingall here, % since that produces some useless output on the terminal. We also make % some effort to order the tracing commands to reduce output in the log % file; cf. trace.sty in LaTeX. % \def\gloggingall{\begingroup \globaldefs = 1 \loggingall \endgroup}% \def\loggingall{% \tracingstats2 \tracingpages1 \tracinglostchars2 % 2 gives us more in etex \tracingparagraphs1 \tracingoutput1 \tracingmacros2 \tracingrestores1 \showboxbreadth\maxdimen \showboxdepth\maxdimen \ifx\eTeXversion\undefined\else % etex gives us more logging \tracingscantokens1 \tracingifs1 \tracinggroups1 \tracingnesting2 \tracingassigns1 \fi \tracingcommands3 % 3 gives us more in etex \errorcontextlines16 }% % add check for \lastpenalty to plain's definitions. If the last thing % we did was a \nobreak, we don't want to insert more space. % \def\smallbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\smallskipamount \removelastskip\penalty-50\smallskip\fi\fi} \def\medbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\medskipamount \removelastskip\penalty-100\medskip\fi\fi} \def\bigbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\bigskipamount \removelastskip\penalty-200\bigskip\fi\fi} % For @cropmarks command. % Do @cropmarks to get crop marks. % \newif\ifcropmarks \let\cropmarks = \cropmarkstrue % % Dimensions to add cropmarks at corners. % Added by P. A. MacKay, 12 Nov. 1986 % \newdimen\outerhsize \newdimen\outervsize % set by the paper size routines \newdimen\cornerlong \cornerlong=1pc \newdimen\cornerthick \cornerthick=.3pt \newdimen\topandbottommargin \topandbottommargin=.75in % Output a mark which sets \thischapter, \thissection and \thiscolor. % We dump everything together because we only have one kind of mark. % This works because we only use \botmark / \topmark, not \firstmark. % % A mark contains a subexpression of the \ifcase ... \fi construct. % \get*marks macros below extract the needed part using \ifcase. % % Another complication is to let the user choose whether \thischapter % (\thissection) refers to the chapter (section) in effect at the top % of a page, or that at the bottom of a page. The solution is % described on page 260 of The TeXbook. It involves outputting two % marks for the sectioning macros, one before the section break, and % one after. I won't pretend I can describe this better than DEK... \def\domark{% \toks0=\expandafter{\lastchapterdefs}% \toks2=\expandafter{\lastsectiondefs}% \toks4=\expandafter{\prevchapterdefs}% \toks6=\expandafter{\prevsectiondefs}% \toks8=\expandafter{\lastcolordefs}% \mark{% \the\toks0 \the\toks2 \noexpand\or \the\toks4 \the\toks6 \noexpand\else \the\toks8 }% } % \topmark doesn't work for the very first chapter (after the title % page or the contents), so we use \firstmark there -- this gets us % the mark with the chapter defs, unless the user sneaks in, e.g., % @setcolor (or @url, or @link, etc.) between @contents and the very % first @chapter. \def\gettopheadingmarks{% \ifcase0\topmark\fi \ifx\thischapter\empty \ifcase0\firstmark\fi \fi } \def\getbottomheadingmarks{\ifcase1\botmark\fi} \def\getcolormarks{\ifcase2\topmark\fi} % Avoid "undefined control sequence" errors. \def\lastchapterdefs{} \def\lastsectiondefs{} \def\prevchapterdefs{} \def\prevsectiondefs{} \def\lastcolordefs{} % Main output routine. \chardef\PAGE = 255 \output = {\onepageout{\pagecontents\PAGE}} \newbox\headlinebox \newbox\footlinebox % \onepageout takes a vbox as an argument. Note that \pagecontents % does insertions, but you have to call it yourself. \def\onepageout#1{% \ifcropmarks \hoffset=0pt \else \hoffset=\normaloffset \fi % \ifodd\pageno \advance\hoffset by \bindingoffset \else \advance\hoffset by -\bindingoffset\fi % % Do this outside of the \shipout so @code etc. will be expanded in % the headline as they should be, not taken literally (outputting ''code). \ifodd\pageno \getoddheadingmarks \else \getevenheadingmarks \fi \setbox\headlinebox = \vbox{\let\hsize=\pagewidth \makeheadline}% \ifodd\pageno \getoddfootingmarks \else \getevenfootingmarks \fi \setbox\footlinebox = \vbox{\let\hsize=\pagewidth \makefootline}% % {% % Have to do this stuff outside the \shipout because we want it to % take effect in \write's, yet the group defined by the \vbox ends % before the \shipout runs. % \indexdummies % don't expand commands in the output. \normalturnoffactive % \ in index entries must not stay \, e.g., if % the page break happens to be in the middle of an example. % We don't want .vr (or whatever) entries like this: % \entry{{\tt \indexbackslash }acronym}{32}{\code {\acronym}} % "\acronym" won't work when it's read back in; % it needs to be % {\code {{\tt \backslashcurfont }acronym} \shipout\vbox{% % Do this early so pdf references go to the beginning of the page. \ifpdfmakepagedest \pdfdest name{\the\pageno} xyz\fi % \ifcropmarks \vbox to \outervsize\bgroup \hsize = \outerhsize \vskip-\topandbottommargin \vtop to0pt{% \line{\ewtop\hfil\ewtop}% \nointerlineskip \line{% \vbox{\moveleft\cornerthick\nstop}% \hfill \vbox{\moveright\cornerthick\nstop}% }% \vss}% \vskip\topandbottommargin \line\bgroup \hfil % center the page within the outer (page) hsize. \ifodd\pageno\hskip\bindingoffset\fi \vbox\bgroup \fi % \unvbox\headlinebox \pagebody{#1}% \ifdim\ht\footlinebox > 0pt % Only leave this space if the footline is nonempty. % (We lessened \vsize for it in \oddfootingyyy.) % The \baselineskip=24pt in plain's \makefootline has no effect. \vskip 24pt \unvbox\footlinebox \fi % \ifcropmarks \egroup % end of \vbox\bgroup \hfil\egroup % end of (centering) \line\bgroup \vskip\topandbottommargin plus1fill minus1fill \boxmaxdepth = \cornerthick \vbox to0pt{\vss \line{% \vbox{\moveleft\cornerthick\nsbot}% \hfill \vbox{\moveright\cornerthick\nsbot}% }% \nointerlineskip \line{\ewbot\hfil\ewbot}% }% \egroup % \vbox from first cropmarks clause \fi }% end of \shipout\vbox }% end of group with \indexdummies \advancepageno \ifnum\outputpenalty>-20000 \else\dosupereject\fi } \newinsert\margin \dimen\margin=\maxdimen \def\pagebody#1{\vbox to\pageheight{\boxmaxdepth=\maxdepth #1}} {\catcode`\@ =11 \gdef\pagecontents#1{\ifvoid\topins\else\unvbox\topins\fi % marginal hacks, juha@viisa.uucp (Juha Takala) \ifvoid\margin\else % marginal info is present \rlap{\kern\hsize\vbox to\z@{\kern1pt\box\margin \vss}}\fi \dimen@=\dp#1\relax \unvbox#1\relax \ifvoid\footins\else\vskip\skip\footins\footnoterule \unvbox\footins\fi \ifr@ggedbottom \kern-\dimen@ \vfil \fi} } % Here are the rules for the cropmarks. Note that they are % offset so that the space between them is truly \outerhsize or \outervsize % (P. A. MacKay, 12 November, 1986) % \def\ewtop{\vrule height\cornerthick depth0pt width\cornerlong} \def\nstop{\vbox {\hrule height\cornerthick depth\cornerlong width\cornerthick}} \def\ewbot{\vrule height0pt depth\cornerthick width\cornerlong} \def\nsbot{\vbox {\hrule height\cornerlong depth\cornerthick width\cornerthick}} % Parse an argument, then pass it to #1. The argument is the rest of % the input line (except we remove a trailing comment). #1 should be a % macro which expects an ordinary undelimited TeX argument. % \def\parsearg{\parseargusing{}} \def\parseargusing#1#2{% \def\argtorun{#2}% \begingroup \obeylines \spaceisspace #1% \parseargline\empty% Insert the \empty token, see \finishparsearg below. } {\obeylines % \gdef\parseargline#1^^M{% \endgroup % End of the group started in \parsearg. \argremovecomment #1\comment\ArgTerm% }% } % First remove any @comment, then any @c comment. \def\argremovecomment#1\comment#2\ArgTerm{\argremovec #1\c\ArgTerm} \def\argremovec#1\c#2\ArgTerm{\argcheckspaces#1\^^M\ArgTerm} % Each occurrence of `\^^M' or `<space>\^^M' is replaced by a single space. % % \argremovec might leave us with trailing space, e.g., % @end itemize @c foo % This space token undergoes the same procedure and is eventually removed % by \finishparsearg. % \def\argcheckspaces#1\^^M{\argcheckspacesX#1\^^M \^^M} \def\argcheckspacesX#1 \^^M{\argcheckspacesY#1\^^M} \def\argcheckspacesY#1\^^M#2\^^M#3\ArgTerm{% \def\temp{#3}% \ifx\temp\empty % Do not use \next, perhaps the caller of \parsearg uses it; reuse \temp: \let\temp\finishparsearg \else \let\temp\argcheckspaces \fi % Put the space token in: \temp#1 #3\ArgTerm } % If a _delimited_ argument is enclosed in braces, they get stripped; so % to get _exactly_ the rest of the line, we had to prevent such situation. % We prepended an \empty token at the very beginning and we expand it now, % just before passing the control to \argtorun. % (Similarly, we have to think about #3 of \argcheckspacesY above: it is % either the null string, or it ends with \^^M---thus there is no danger % that a pair of braces would be stripped. % % But first, we have to remove the trailing space token. % \def\finishparsearg#1 \ArgTerm{\expandafter\argtorun\expandafter{#1}} % \parseargdef\foo{...} % is roughly equivalent to % \def\foo{\parsearg\Xfoo} % \def\Xfoo#1{...} % % Actually, I use \csname\string\foo\endcsname, ie. \\foo, as it is my % favourite TeX trick. --kasal, 16nov03 \def\parseargdef#1{% \expandafter \doparseargdef \csname\string#1\endcsname #1% } \def\doparseargdef#1#2{% \def#2{\parsearg#1}% \def#1##1% } % Several utility definitions with active space: { \obeyspaces \gdef\obeyedspace{ } % Make each space character in the input produce a normal interword % space in the output. Don't allow a line break at this space, as this % is used only in environments like @example, where each line of input % should produce a line of output anyway. % \gdef\sepspaces{\obeyspaces\let =\tie} % If an index command is used in an @example environment, any spaces % therein should become regular spaces in the raw index file, not the % expansion of \tie (\leavevmode \penalty \@M \ ). \gdef\unsepspaces{\let =\space} } \def\flushcr{\ifx\par\lisppar \def\next##1{}\else \let\next=\relax \fi \next} % Define the framework for environments in texinfo.tex. It's used like this: % % \envdef\foo{...} % \def\Efoo{...} % % It's the responsibility of \envdef to insert \begingroup before the % actual body; @end closes the group after calling \Efoo. \envdef also % defines \thisenv, so the current environment is known; @end checks % whether the environment name matches. The \checkenv macro can also be % used to check whether the current environment is the one expected. % % Non-false conditionals (@iftex, @ifset) don't fit into this, so they % are not treated as environments; they don't open a group. (The % implementation of @end takes care not to call \endgroup in this % special case.) % At run-time, environments start with this: \def\startenvironment#1{\begingroup\def\thisenv{#1}} % initialize \let\thisenv\empty % ... but they get defined via ``\envdef\foo{...}'': \long\def\envdef#1#2{\def#1{\startenvironment#1#2}} \def\envparseargdef#1#2{\parseargdef#1{\startenvironment#1#2}} % Check whether we're in the right environment: \def\checkenv#1{% \def\temp{#1}% \ifx\thisenv\temp \else \badenverr \fi } % Environment mismatch, #1 expected: \def\badenverr{% \errhelp = \EMsimple \errmessage{This command can appear only \inenvironment\temp, not \inenvironment\thisenv}% } \def\inenvironment#1{% \ifx#1\empty out of any environment% \else in environment \expandafter\string#1% \fi } % @end foo executes the definition of \Efoo. % But first, it executes a specialized version of \checkenv % \parseargdef\end{% \if 1\csname iscond.#1\endcsname \else % The general wording of \badenverr may not be ideal, but... --kasal, 06nov03 \expandafter\checkenv\csname#1\endcsname \csname E#1\endcsname \endgroup \fi } \newhelp\EMsimple{Press RETURN to continue.} %% Simple single-character @ commands % @@ prints an @ % Kludge this until the fonts are right (grr). \def\@{{\tt\char64}} % This is turned off because it was never documented % and you can use @w{...} around a quote to suppress ligatures. %% Define @` and @' to be the same as ` and ' %% but suppressing ligatures. %\def\`{{`}} %\def\'{{'}} % Used to generate quoted braces. \def\mylbrace {{\tt\char123}} \def\myrbrace {{\tt\char125}} \let\{=\mylbrace \let\}=\myrbrace \begingroup % Definitions to produce \{ and \} commands for indices, % and @{ and @} for the aux/toc files. \catcode`\{ = \other \catcode`\} = \other \catcode`\[ = 1 \catcode`\] = 2 \catcode`\! = 0 \catcode`\\ = \other !gdef!lbracecmd[\{]% !gdef!rbracecmd[\}]% !gdef!lbraceatcmd[@{]% !gdef!rbraceatcmd[@}]% !endgroup % @comma{} to avoid , parsing problems. \let\comma = , % Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent % Others are defined by plain TeX: @` @' @" @^ @~ @= @u @v @H. \let\, = \c \let\dotaccent = \. \def\ringaccent#1{{\accent23 #1}} \let\tieaccent = \t \let\ubaraccent = \b \let\udotaccent = \d % Other special characters: @questiondown @exclamdown @ordf @ordm % Plain TeX defines: @AA @AE @O @OE @L (plus lowercase versions) @ss. \def\questiondown{?`} \def\exclamdown{!`} \def\ordf{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{a}}} \def\ordm{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{o}}} % Dotless i and dotless j, used for accents. \def\imacro{i} \def\jmacro{j} \def\dotless#1{% \def\temp{#1}% \ifx\temp\imacro \ifmmode\imath \else\ptexi \fi \else\ifx\temp\jmacro \ifmmode\jmath \else\j \fi \else \errmessage{@dotless can be used only with i or j}% \fi\fi } % The \TeX{} logo, as in plain, but resetting the spacing so that a % period following counts as ending a sentence. (Idea found in latex.) % \edef\TeX{\TeX \spacefactor=1000 } % @LaTeX{} logo. Not quite the same results as the definition in % latex.ltx, since we use a different font for the raised A; it's most % convenient for us to use an explicitly smaller font, rather than using % the \scriptstyle font (since we don't reset \scriptstyle and % \scriptscriptstyle). % \def\LaTeX{% L\kern-.36em {\setbox0=\hbox{T}% \vbox to \ht0{\hbox{\selectfonts\lllsize A}\vss}}% \kern-.15em \TeX } % Be sure we're in horizontal mode when doing a tie, since we make space % equivalent to this in @example-like environments. Otherwise, a space % at the beginning of a line will start with \penalty -- and % since \penalty is valid in vertical mode, we'd end up putting the % penalty on the vertical list instead of in the new paragraph. {\catcode`@ = 11 % Avoid using \@M directly, because that causes trouble % if the definition is written into an index file. \global\let\tiepenalty = \@M \gdef\tie{\leavevmode\penalty\tiepenalty\ } } % @: forces normal size whitespace following. \def\:{\spacefactor=1000 } % @* forces a line break. \def\*{\hfil\break\hbox{}\ignorespaces} % @/ allows a line break. \let\/=\allowbreak % @. is an end-of-sentence period. \def\.{.\spacefactor=\endofsentencespacefactor\space} % @! is an end-of-sentence bang. \def\!{!\spacefactor=\endofsentencespacefactor\space} % @? is an end-of-sentence query. \def\?{?\spacefactor=\endofsentencespacefactor\space} % @frenchspacing on|off says whether to put extra space after punctuation. % \def\onword{on} \def\offword{off} % \parseargdef\frenchspacing{% \def\temp{#1}% \ifx\temp\onword \plainfrenchspacing \else\ifx\temp\offword \plainnonfrenchspacing \else \errhelp = \EMsimple \errmessage{Unknown @frenchspacing option `\temp', must be on/off}% \fi\fi } % @w prevents a word break. Without the \leavevmode, @w at the % beginning of a paragraph, when TeX is still in vertical mode, would % produce a whole line of output instead of starting the paragraph. \def\w#1{\leavevmode\hbox{#1}} % @group ... @end group forces ... to be all on one page, by enclosing % it in a TeX vbox. We use \vtop instead of \vbox to construct the box % to keep its height that of a normal line. According to the rules for % \topskip (p.114 of the TeXbook), the glue inserted is % max (\topskip - \ht (first item), 0). If that height is large, % therefore, no glue is inserted, and the space between the headline and % the text is small, which looks bad. % % Another complication is that the group might be very large. This can % cause the glue on the previous page to be unduly stretched, because it % does not have much material. In this case, it's better to add an % explicit \vfill so that the extra space is at the bottom. The % threshold for doing this is if the group is more than \vfilllimit % percent of a page (\vfilllimit can be changed inside of @tex). % \newbox\groupbox \def\vfilllimit{0.7} % \envdef\group{% \ifnum\catcode`\^^M=\active \else \errhelp = \groupinvalidhelp \errmessage{@group invalid in context where filling is enabled}% \fi \startsavinginserts % \setbox\groupbox = \vtop\bgroup % Do @comment since we are called inside an environment such as % @example, where each end-of-line in the input causes an % end-of-line in the output. We don't want the end-of-line after % the `@group' to put extra space in the output. Since @group % should appear on a line by itself (according to the Texinfo % manual), we don't worry about eating any user text. \comment } % % The \vtop produces a box with normal height and large depth; thus, TeX puts % \baselineskip glue before it, and (when the next line of text is done) % \lineskip glue after it. Thus, space below is not quite equal to space % above. But it's pretty close. \def\Egroup{% % To get correct interline space between the last line of the group % and the first line afterwards, we have to propagate \prevdepth. \endgraf % Not \par, as it may have been set to \lisppar. \global\dimen1 = \prevdepth \egroup % End the \vtop. % \dimen0 is the vertical size of the group's box. \dimen0 = \ht\groupbox \advance\dimen0 by \dp\groupbox % \dimen2 is how much space is left on the page (more or less). \dimen2 = \pageheight \advance\dimen2 by -\pagetotal % if the group doesn't fit on the current page, and it's a big big % group, force a page break. \ifdim \dimen0 > \dimen2 \ifdim \pagetotal < \vfilllimit\pageheight \page \fi \fi \box\groupbox \prevdepth = \dimen1 \checkinserts } % % TeX puts in an \escapechar (i.e., `@') at the beginning of the help % message, so this ends up printing `@group can only ...'. % \newhelp\groupinvalidhelp{% group can only be used in environments such as @example,^^J% where each line of input produces a line of output.} % @need space-in-mils % forces a page break if there is not space-in-mils remaining. \newdimen\mil \mil=0.001in % Old definition--didn't work. %\parseargdef\need{\par % %% This method tries to make TeX break the page naturally %% if the depth of the box does not fit. %{\baselineskip=0pt% %\vtop to #1\mil{\vfil}\kern -#1\mil\nobreak %\prevdepth=-1000pt %}} \parseargdef\need{% % Ensure vertical mode, so we don't make a big box in the middle of a % paragraph. \par % % If the @need value is less than one line space, it's useless. \dimen0 = #1\mil \dimen2 = \ht\strutbox \advance\dimen2 by \dp\strutbox \ifdim\dimen0 > \dimen2 % % Do a \strut just to make the height of this box be normal, so the % normal leading is inserted relative to the preceding line. % And a page break here is fine. \vtop to #1\mil{\strut\vfil}% % % TeX does not even consider page breaks if a penalty added to the % main vertical list is 10000 or more. But in order to see if the % empty box we just added fits on the page, we must make it consider % page breaks. On the other hand, we don't want to actually break the % page after the empty box. So we use a penalty of 9999. % % There is an extremely small chance that TeX will actually break the % page at this \penalty, if there are no other feasible breakpoints in % sight. (If the user is using lots of big @group commands, which % almost-but-not-quite fill up a page, TeX will have a hard time doing % good page breaking, for example.) However, I could not construct an % example where a page broke at this \penalty; if it happens in a real % document, then we can reconsider our strategy. \penalty9999 % % Back up by the size of the box, whether we did a page break or not. \kern -#1\mil % % Do not allow a page break right after this kern. \nobreak \fi } % @br forces paragraph break (and is undocumented). \let\br = \par % @page forces the start of a new page. % \def\page{\par\vfill\supereject} % @exdent text.... % outputs text on separate line in roman font, starting at standard page margin % This records the amount of indent in the innermost environment. % That's how much \exdent should take out. \newskip\exdentamount % This defn is used inside fill environments such as @defun. \parseargdef\exdent{\hfil\break\hbox{\kern -\exdentamount{\rm#1}}\hfil\break} % This defn is used inside nofill environments such as @example. \parseargdef\nofillexdent{{\advance \leftskip by -\exdentamount \leftline{\hskip\leftskip{\rm#1}}}} % @inmargin{WHICH}{TEXT} puts TEXT in the WHICH margin next to the current % paragraph. For more general purposes, use the \margin insertion % class. WHICH is `l' or `r'. % \newskip\inmarginspacing \inmarginspacing=1cm \def\strutdepth{\dp\strutbox} % \def\doinmargin#1#2{\strut\vadjust{% \nobreak \kern-\strutdepth \vtop to \strutdepth{% \baselineskip=\strutdepth \vss % if you have multiple lines of stuff to put here, you'll need to % make the vbox yourself of the appropriate size. \ifx#1l% \llap{\ignorespaces #2\hskip\inmarginspacing}% \else \rlap{\hskip\hsize \hskip\inmarginspacing \ignorespaces #2}% \fi \null }% }} \def\inleftmargin{\doinmargin l} \def\inrightmargin{\doinmargin r} % % @inmargin{TEXT [, RIGHT-TEXT]} % (if RIGHT-TEXT is given, use TEXT for left page, RIGHT-TEXT for right; % else use TEXT for both). % \def\inmargin#1{\parseinmargin #1,,\finish} \def\parseinmargin#1,#2,#3\finish{% not perfect, but better than nothing. \setbox0 = \hbox{\ignorespaces #2}% \ifdim\wd0 > 0pt \def\lefttext{#1}% have both texts \def\righttext{#2}% \else \def\lefttext{#1}% have only one text \def\righttext{#1}% \fi % \ifodd\pageno \def\temp{\inrightmargin\righttext}% odd page -> outside is right margin \else \def\temp{\inleftmargin\lefttext}% \fi \temp } % @include FILE -- \input text of FILE. % \def\include{\parseargusing\filenamecatcodes\includezzz} \def\includezzz#1{% \pushthisfilestack \def\thisfile{#1}% {% \makevalueexpandable % we want to expand any @value in FILE. \turnoffactive % and allow special characters in the expansion \indexnofonts % Allow `@@' and other weird things in file names. \edef\temp{\noexpand\input #1 }% % % This trickery is to read FILE outside of a group, in case it makes % definitions, etc. \expandafter }\temp \popthisfilestack } \def\filenamecatcodes{% \catcode`\\=\other \catcode`~=\other \catcode`^=\other \catcode`_=\other \catcode`|=\other \catcode`<=\other \catcode`>=\other \catcode`+=\other \catcode`-=\other \catcode`\`=\other \catcode`\'=\other } \def\pushthisfilestack{% \expandafter\pushthisfilestackX\popthisfilestack\StackTerm } \def\pushthisfilestackX{% \expandafter\pushthisfilestackY\thisfile\StackTerm } \def\pushthisfilestackY #1\StackTerm #2\StackTerm {% \gdef\popthisfilestack{\gdef\thisfile{#1}\gdef\popthisfilestack{#2}}% } \def\popthisfilestack{\errthisfilestackempty} \def\errthisfilestackempty{\errmessage{Internal error: the stack of filenames is empty.}} \def\thisfile{} % @center line % outputs that line, centered. % \parseargdef\center{% \ifhmode \let\next\centerH \else \let\next\centerV \fi \next{\hfil \ignorespaces#1\unskip \hfil}% } \def\centerH#1{% {% \hfil\break \advance\hsize by -\leftskip \advance\hsize by -\rightskip \line{#1}% \break }% } \def\centerV#1{\line{\kern\leftskip #1\kern\rightskip}} % @sp n outputs n lines of vertical space \parseargdef\sp{\vskip #1\baselineskip} % @comment ...line which is ignored... % @c is the same as @comment % @ignore ... @end ignore is another way to write a comment \def\comment{\begingroup \catcode`\^^M=\other% \catcode`\@=\other \catcode`\{=\other \catcode`\}=\other% \commentxxx} {\catcode`\^^M=\other \gdef\commentxxx#1^^M{\endgroup}} \let\c=\comment % @paragraphindent NCHARS % We'll use ems for NCHARS, close enough. % NCHARS can also be the word `asis' or `none'. % We cannot feasibly implement @paragraphindent asis, though. % \def\asisword{asis} % no translation, these are keywords \def\noneword{none} % \parseargdef\paragraphindent{% \def\temp{#1}% \ifx\temp\asisword \else \ifx\temp\noneword \defaultparindent = 0pt \else \defaultparindent = #1em \fi \fi \parindent = \defaultparindent } % @exampleindent NCHARS % We'll use ems for NCHARS like @paragraphindent. % It seems @exampleindent asis isn't necessary, but % I preserve it to make it similar to @paragraphindent. \parseargdef\exampleindent{% \def\temp{#1}% \ifx\temp\asisword \else \ifx\temp\noneword \lispnarrowing = 0pt \else \lispnarrowing = #1em \fi \fi } % @firstparagraphindent WORD % If WORD is `none', then suppress indentation of the first paragraph % after a section heading. If WORD is `insert', then do indent at such % paragraphs. % % The paragraph indentation is suppressed or not by calling % \suppressfirstparagraphindent, which the sectioning commands do. % We switch the definition of this back and forth according to WORD. % By default, we suppress indentation. % \def\suppressfirstparagraphindent{\dosuppressfirstparagraphindent} \def\insertword{insert} % \parseargdef\firstparagraphindent{% \def\temp{#1}% \ifx\temp\noneword \let\suppressfirstparagraphindent = \dosuppressfirstparagraphindent \else\ifx\temp\insertword \let\suppressfirstparagraphindent = \relax \else \errhelp = \EMsimple \errmessage{Unknown @firstparagraphindent option `\temp'}% \fi\fi } % Here is how we actually suppress indentation. Redefine \everypar to % \kern backwards by \parindent, and then reset itself to empty. % % We also make \indent itself not actually do anything until the next % paragraph. % \gdef\dosuppressfirstparagraphindent{% \gdef\indent{% \restorefirstparagraphindent \indent }% \gdef\noindent{% \restorefirstparagraphindent \noindent }% \global\everypar = {% \kern -\parindent \restorefirstparagraphindent }% } \gdef\restorefirstparagraphindent{% \global \let \indent = \ptexindent \global \let \noindent = \ptexnoindent \global \everypar = {}% } % @asis just yields its argument. Used with @table, for example. % \def\asis#1{#1} % @math outputs its argument in math mode. % % One complication: _ usually means subscripts, but it could also mean % an actual _ character, as in @math{@var{some_variable} + 1}. So make % _ active, and distinguish by seeing if the current family is \slfam, % which is what @var uses. { \catcode`\_ = \active \gdef\mathunderscore{% \catcode`\_=\active \def_{\ifnum\fam=\slfam \_\else\sb\fi}% } } % Another complication: we want \\ (and @\) to output a \ character. % FYI, plain.tex uses \\ as a temporary control sequence (why?), but % this is not advertised and we don't care. Texinfo does not % otherwise define @\. % % The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\. \def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi} % \def\math{% \tex \mathunderscore \let\\ = \mathbackslash \mathactive % make the texinfo accent commands work in math mode \let\"=\ddot \let\'=\acute \let\==\bar \let\^=\hat \let\`=\grave \let\u=\breve \let\v=\check \let\~=\tilde \let\dotaccent=\dot $\finishmath } \def\finishmath#1{#1$\endgroup} % Close the group opened by \tex. % Some active characters (such as <) are spaced differently in math. % We have to reset their definitions in case the @math was an argument % to a command which sets the catcodes (such as @item or @section). % { \catcode`^ = \active \catcode`< = \active \catcode`> = \active \catcode`+ = \active \catcode`' = \active \gdef\mathactive{% \let^ = \ptexhat \let< = \ptexless \let> = \ptexgtr \let+ = \ptexplus \let' = \ptexquoteright } } % Some math mode symbols. \def\bullet{$\ptexbullet$} \def\geq{\ifmmode \ge\else $\ge$\fi} \def\leq{\ifmmode \le\else $\le$\fi} \def\minus{\ifmmode -\else $-$\fi} % @dots{} outputs an ellipsis using the current font. % We do .5em per period so that it has the same spacing in the cm % typewriter fonts as three actual period characters; on the other hand, % in other typewriter fonts three periods are wider than 1.5em. So do % whichever is larger. % \def\dots{% \leavevmode \setbox0=\hbox{...}% get width of three periods \ifdim\wd0 > 1.5em \dimen0 = \wd0 \else \dimen0 = 1.5em \fi \hbox to \dimen0{% \hskip 0pt plus.25fil .\hskip 0pt plus1fil .\hskip 0pt plus1fil .\hskip 0pt plus.5fil }% } % @enddots{} is an end-of-sentence ellipsis. % \def\enddots{% \dots \spacefactor=\endofsentencespacefactor } % @comma{} is so commas can be inserted into text without messing up % Texinfo's parsing. % \let\comma = , % @refill is a no-op. \let\refill=\relax % If working on a large document in chapters, it is convenient to % be able to disable indexing, cross-referencing, and contents, for test runs. % This is done with @novalidate (before @setfilename). % \newif\iflinks \linkstrue % by default we want the aux files. \let\novalidate = \linksfalse % @setfilename is done at the beginning of every texinfo file. % So open here the files we need to have open while reading the input. % This makes it possible to make a .fmt file for texinfo. \def\setfilename{% \fixbackslash % Turn off hack to swallow `\input texinfo'. \iflinks \tryauxfile % Open the new aux file. TeX will close it automatically at exit. \immediate\openout\auxfile=\jobname.aux \fi % \openindices needs to do some work in any case. \openindices \let\setfilename=\comment % Ignore extra @setfilename cmds. % % If texinfo.cnf is present on the system, read it. % Useful for site-wide @afourpaper, etc. \openin 1 texinfo.cnf \ifeof 1 \else \input texinfo.cnf \fi \closein 1 % \comment % Ignore the actual filename. } % Called from \setfilename. % \def\openindices{% \newindex{cp}% \newcodeindex{fn}% \newcodeindex{vr}% \newcodeindex{tp}% \newcodeindex{ky}% \newcodeindex{pg}% } % @bye. \outer\def\bye{\pagealignmacro\tracingstats=1\ptexend} \message{pdf,} % adobe `portable' document format \newcount\tempnum \newcount\lnkcount \newtoks\filename \newcount\filenamelength \newcount\pgn \newtoks\toksA \newtoks\toksB \newtoks\toksC \newtoks\toksD \newbox\boxA \newcount\countA \newif\ifpdf \newif\ifpdfmakepagedest % when pdftex is run in dvi mode, \pdfoutput is defined (so \pdfoutput=1 % can be set). So we test for \relax and 0 as well as \undefined, % borrowed from ifpdf.sty. \ifx\pdfoutput\undefined \else \ifx\pdfoutput\relax \else \ifcase\pdfoutput \else \pdftrue \fi \fi \fi % PDF uses PostScript string constants for the names of xref targets, % for display in the outlines, and in other places. Thus, we have to % double any backslashes. Otherwise, a name like "\node" will be % interpreted as a newline (\n), followed by o, d, e. Not good. % http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html % (and related messages, the final outcome is that it is up to the TeX % user to double the backslashes and otherwise make the string valid, so % that's what we do). % double active backslashes. % {\catcode`\@=0 \catcode`\\=\active @gdef@activebackslashdouble{% @catcode`@\=@active @let\=@doublebackslash} } % To handle parens, we must adopt a different approach, since parens are % not active characters. hyperref.dtx (which has the same problem as % us) handles it with this amazing macro to replace tokens, with minor % changes for Texinfo. It is included here under the GPL by permission % from the author, Heiko Oberdiek. % % #1 is the tokens to replace. % #2 is the replacement. % #3 is the control sequence with the string. % \def\HyPsdSubst#1#2#3{% \def\HyPsdReplace##1#1##2\END{% ##1% \ifx\\##2\\% \else #2% \HyReturnAfterFi{% \HyPsdReplace##2\END }% \fi }% \xdef#3{\expandafter\HyPsdReplace#3#1\END}% } \long\def\HyReturnAfterFi#1\fi{\fi#1} % #1 is a control sequence in which to do the replacements. \def\backslashparens#1{% \xdef#1{#1}% redefine it as its expansion; the definition is simply % \lastnode when called from \setref -> \pdfmkdest. \HyPsdSubst{(}{\realbackslash(}{#1}% \HyPsdSubst{)}{\realbackslash)}{#1}% } \newhelp\nopdfimagehelp{Texinfo supports .png, .jpg, .jpeg, and .pdf images with PDF output, and none of those formats could be found. (.eps cannot be supported due to the design of the PDF format; use regular TeX (DVI output) for that.)} \ifpdf % % Color manipulation macros based on pdfcolor.tex. \def\cmykDarkRed{0.28 1 1 0.35} \def\cmykBlack{0 0 0 1} % % k sets the color for filling (usual text, etc.); % K sets the color for stroking (thin rules, e.g., normal _'s). \def\pdfsetcolor#1{\pdfliteral{#1 k #1 K}} % % Set color, and create a mark which defines \thiscolor accordingly, % so that \makeheadline knows which color to restore. \def\setcolor#1{% \xdef\lastcolordefs{\gdef\noexpand\thiscolor{#1}}% \domark \pdfsetcolor{#1}% } % \def\maincolor{\cmykBlack} \pdfsetcolor{\maincolor} \edef\thiscolor{\maincolor} \def\lastcolordefs{} % \def\makefootline{% \baselineskip24pt \line{\pdfsetcolor{\maincolor}\the\footline}% } % \def\makeheadline{% \vbox to 0pt{% \vskip-22.5pt \line{% \vbox to8.5pt{}% % Extract \thiscolor definition from the marks. \getcolormarks % Typeset the headline with \maincolor, then restore the color. \pdfsetcolor{\maincolor}\the\headline\pdfsetcolor{\thiscolor}% }% \vss }% \nointerlineskip } % % \pdfcatalog{/PageMode /UseOutlines} % % #1 is image name, #2 width (might be empty/whitespace), #3 height (ditto). \def\dopdfimage#1#2#3{% \def\imagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}% \def\imageheight{#3}\setbox2 = \hbox{\ignorespaces #3}% % % pdftex (and the PDF format) support .png, .jpg, .pdf (among % others). Let's try in that order. \let\pdfimgext=\empty \begingroup \openin 1 #1.png \ifeof 1 \openin 1 #1.jpg \ifeof 1 \openin 1 #1.jpeg \ifeof 1 \openin 1 #1.JPG \ifeof 1 \openin 1 #1.pdf \ifeof 1 \openin 1 #1.PDF \ifeof 1 \errhelp = \nopdfimagehelp \errmessage{Could not find image file #1 for pdf}% \else \gdef\pdfimgext{PDF}% \fi \else \gdef\pdfimgext{pdf}% \fi \else \gdef\pdfimgext{JPG}% \fi \else \gdef\pdfimgext{jpeg}% \fi \else \gdef\pdfimgext{jpg}% \fi \else \gdef\pdfimgext{png}% \fi \closein 1 \endgroup % % without \immediate, ancient pdftex seg faults when the same image is % included twice. (Version 3.14159-pre-1.0-unofficial-20010704.) \ifnum\pdftexversion < 14 \immediate\pdfimage \else \immediate\pdfximage \fi \ifdim \wd0 >0pt width \imagewidth \fi \ifdim \wd2 >0pt height \imageheight \fi \ifnum\pdftexversion<13 #1.\pdfimgext \else {#1.\pdfimgext}% \fi \ifnum\pdftexversion < 14 \else \pdfrefximage \pdflastximage \fi} % \def\pdfmkdest#1{{% % We have to set dummies so commands such as @code, and characters % such as \, aren't expanded when present in a section title. \indexnofonts \turnoffactive \activebackslashdouble \makevalueexpandable \def\pdfdestname{#1}% \backslashparens\pdfdestname \safewhatsit{\pdfdest name{\pdfdestname} xyz}% }} % % used to mark target names; must be expandable. \def\pdfmkpgn#1{#1} % % by default, use a color that is dark enough to print on paper as % nearly black, but still distinguishable for online viewing. \def\urlcolor{\cmykDarkRed} \def\linkcolor{\cmykDarkRed} \def\endlink{\setcolor{\maincolor}\pdfendlink} % % Adding outlines to PDF; macros for calculating structure of outlines % come from Petr Olsak \def\expnumber#1{\expandafter\ifx\csname#1\endcsname\relax 0% \else \csname#1\endcsname \fi} \def\advancenumber#1{\tempnum=\expnumber{#1}\relax \advance\tempnum by 1 \expandafter\xdef\csname#1\endcsname{\the\tempnum}} % % #1 is the section text, which is what will be displayed in the % outline by the pdf viewer. #2 is the pdf expression for the number % of subentries (or empty, for subsubsections). #3 is the node text, % which might be empty if this toc entry had no corresponding node. % #4 is the page number % \def\dopdfoutline#1#2#3#4{% % Generate a link to the node text if that exists; else, use the % page number. We could generate a destination for the section % text in the case where a section has no node, but it doesn't % seem worth the trouble, since most documents are normally structured. \def\pdfoutlinedest{#3}% \ifx\pdfoutlinedest\empty \def\pdfoutlinedest{#4}% \else % Doubled backslashes in the name. {\activebackslashdouble \xdef\pdfoutlinedest{#3}% \backslashparens\pdfoutlinedest}% \fi % % Also double the backslashes in the display string. {\activebackslashdouble \xdef\pdfoutlinetext{#1}% \backslashparens\pdfoutlinetext}% % \pdfoutline goto name{\pdfmkpgn{\pdfoutlinedest}}#2{\pdfoutlinetext}% } % \def\pdfmakeoutlines{% \begingroup % Thanh's hack / proper braces in bookmarks \edef\mylbrace{\iftrue \string{\else}\fi}\let\{=\mylbrace \edef\myrbrace{\iffalse{\else\string}\fi}\let\}=\myrbrace % % Read toc silently, to get counts of subentries for \pdfoutline. \def\numchapentry##1##2##3##4{% \def\thischapnum{##2}% \def\thissecnum{0}% \def\thissubsecnum{0}% }% \def\numsecentry##1##2##3##4{% \advancenumber{chap\thischapnum}% \def\thissecnum{##2}% \def\thissubsecnum{0}% }% \def\numsubsecentry##1##2##3##4{% \advancenumber{sec\thissecnum}% \def\thissubsecnum{##2}% }% \def\numsubsubsecentry##1##2##3##4{% \advancenumber{subsec\thissubsecnum}% }% \def\thischapnum{0}% \def\thissecnum{0}% \def\thissubsecnum{0}% % % use \def rather than \let here because we redefine \chapentry et % al. a second time, below. \def\appentry{\numchapentry}% \def\appsecentry{\numsecentry}% \def\appsubsecentry{\numsubsecentry}% \def\appsubsubsecentry{\numsubsubsecentry}% \def\unnchapentry{\numchapentry}% \def\unnsecentry{\numsecentry}% \def\unnsubsecentry{\numsubsecentry}% \def\unnsubsubsecentry{\numsubsubsecentry}% \readdatafile{toc}% % % Read toc second time, this time actually producing the outlines. % The `-' means take the \expnumber as the absolute number of % subentries, which we calculated on our first read of the .toc above. % % We use the node names as the destinations. \def\numchapentry##1##2##3##4{% \dopdfoutline{##1}{count-\expnumber{chap##2}}{##3}{##4}}% \def\numsecentry##1##2##3##4{% \dopdfoutline{##1}{count-\expnumber{sec##2}}{##3}{##4}}% \def\numsubsecentry##1##2##3##4{% \dopdfoutline{##1}{count-\expnumber{subsec##2}}{##3}{##4}}% \def\numsubsubsecentry##1##2##3##4{% count is always zero \dopdfoutline{##1}{}{##3}{##4}}% % % PDF outlines are displayed using system fonts, instead of % document fonts. Therefore we cannot use special characters, % since the encoding is unknown. For example, the eogonek from % Latin 2 (0xea) gets translated to a | character. Info from % Staszek Wawrykiewicz, 19 Jan 2004 04:09:24 +0100. % % xx to do this right, we have to translate 8-bit characters to % their "best" equivalent, based on the @documentencoding. Right % now, I guess we'll just let the pdf reader have its way. \indexnofonts \setupdatafile \catcode`\\=\active \otherbackslash \input \tocreadfilename \endgroup } % \def\skipspaces#1{\def\PP{#1}\def\D{|}% \ifx\PP\D\let\nextsp\relax \else\let\nextsp\skipspaces \ifx\p\space\else\addtokens{\filename}{\PP}% \advance\filenamelength by 1 \fi \fi \nextsp} \def\getfilename#1{\filenamelength=0\expandafter\skipspaces#1|\relax} \ifnum\pdftexversion < 14 \let \startlink \pdfannotlink \else \let \startlink \pdfstartlink \fi % make a live url in pdf output. \def\pdfurl#1{% \begingroup % it seems we really need yet another set of dummies; have not % tried to figure out what each command should do in the context % of @url. for now, just make @/ a no-op, that's the only one % people have actually reported a problem with. % \normalturnoffactive \def\@{@}% \let\/=\empty \makevalueexpandable % do we want to go so far as to use \indexnofonts instead of just % special-casing \var here? \def\var##1{##1}% % \leavevmode\setcolor{\urlcolor}% \startlink attr{/Border [0 0 0]}% user{/Subtype /Link /A << /S /URI /URI (#1) >>}% \endgroup} \def\pdfgettoks#1.{\setbox\boxA=\hbox{\toksA={#1.}\toksB={}\maketoks}} \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks} \def\adn#1{\addtokens{\toksC}{#1}\global\countA=1\let\next=\maketoks} \def\poptoks#1#2|ENDTOKS|{\let\first=#1\toksD={#1}\toksA={#2}} \def\maketoks{% \expandafter\poptoks\the\toksA|ENDTOKS|\relax \ifx\first0\adn0 \else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3 \else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6 \else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9 \else \ifnum0=\countA\else\makelink\fi \ifx\first.\let\next=\done\else \let\next=\maketoks \addtokens{\toksB}{\the\toksD} \ifx\first,\addtokens{\toksB}{\space}\fi \fi \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi \next} \def\makelink{\addtokens{\toksB}% {\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0} \def\pdflink#1{% \startlink attr{/Border [0 0 0]} goto name{\pdfmkpgn{#1}} \setcolor{\linkcolor}#1\endlink} \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st} \else % non-pdf mode \let\pdfmkdest = \gobble \let\pdfurl = \gobble \let\endlink = \relax \let\setcolor = \gobble \let\pdfsetcolor = \gobble \let\pdfmakeoutlines = \relax \fi % \ifx\pdfoutput \message{fonts,} % Change the current font style to #1, remembering it in \curfontstyle. % For now, we do not accumulate font styles: @b{@i{foo}} prints foo in % italics, not bold italics. % \def\setfontstyle#1{% \def\curfontstyle{#1}% not as a control sequence, because we are \edef'd. \csname ten#1\endcsname % change the current font } % Select #1 fonts with the current style. % \def\selectfonts#1{\csname #1fonts\endcsname \csname\curfontstyle\endcsname} \def\rm{\fam=0 \setfontstyle{rm}} \def\it{\fam=\itfam \setfontstyle{it}} \def\sl{\fam=\slfam \setfontstyle{sl}} \def\bf{\fam=\bffam \setfontstyle{bf}}\def\bfstylename{bf} \def\tt{\fam=\ttfam \setfontstyle{tt}} % Unfortunately, we have to override this for titles and the like, since % in those cases "rm" is bold. Sigh. \def\rmisbold{\rm\def\curfontstyle{bf}} % Texinfo sort of supports the sans serif font style, which plain TeX does not. % So we set up a \sf. \newfam\sffam \def\sf{\fam=\sffam \setfontstyle{sf}} \let\li = \sf % Sometimes we call it \li, not \sf. % We don't need math for this font style. \def\ttsl{\setfontstyle{ttsl}} % Default leading. \newdimen\textleading \textleading = 13.2pt % Set the baselineskip to #1, and the lineskip and strut size % correspondingly. There is no deep meaning behind these magic numbers % used as factors; they just match (closely enough) what Knuth defined. % \def\lineskipfactor{.08333} \def\strutheightpercent{.70833} \def\strutdepthpercent {.29167} % % can get a sort of poor man's double spacing by redefining this. \def\baselinefactor{1} % \def\setleading#1{% \dimen0 = #1\relax \normalbaselineskip = \baselinefactor\dimen0 \normallineskip = \lineskipfactor\normalbaselineskip \normalbaselines \setbox\strutbox =\hbox{% \vrule width0pt height\strutheightpercent\baselineskip depth \strutdepthpercent \baselineskip }% } % PDF CMaps. See also LaTeX's t1.cmap. % % do nothing with this by default. \expandafter\let\csname cmapOT1\endcsname\gobble \expandafter\let\csname cmapOT1IT\endcsname\gobble \expandafter\let\csname cmapOT1TT\endcsname\gobble % if we are producing pdf, and we have \pdffontattr, then define cmaps. % (\pdffontattr was introduced many years ago, but people still run % older pdftex's; it's easy to conditionalize, so we do.) \ifpdf \ifx\pdffontattr\undefined \else \begingroup \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap %%DocumentNeededResources: ProcSet (CIDInit) %%IncludeResource: ProcSet (CIDInit) %%BeginResource: CMap (TeX-OT1-0) %%Title: (TeX-OT1-0 TeX OT1 0) %%Version: 1.000 %%EndComments /CIDInit /ProcSet findresource begin 12 dict begin begincmap /CIDSystemInfo << /Registry (TeX) /Ordering (OT1) /Supplement 0 >> def /CMapName /TeX-OT1-0 def /CMapType 2 def 1 begincodespacerange <00> <7F> endcodespacerange 8 beginbfrange <00> <01> <0393> <09> <0A> <03A8> <23> <26> <0023> <28> <3B> <0028> <3F> <5B> <003F> <5D> <5E> <005D> <61> <7A> <0061> <7B> <7C> <2013> endbfrange 40 beginbfchar <02> <0398> <03> <039B> <04> <039E> <05> <03A0> <06> <03A3> <07> <03D2> <08> <03A6> <0B> <00660066> <0C> <00660069> <0D> <0066006C> <0E> <006600660069> <0F> <00660066006C> <10> <0131> <11> <0237> <12> <0060> <13> <00B4> <14> <02C7> <15> <02D8> <16> <00AF> <17> <02DA> <18> <00B8> <19> <00DF> <1A> <00E6> <1B> <0153> <1C> <00F8> <1D> <00C6> <1E> <0152> <1F> <00D8> <21> <0021> <22> <201D> <27> <2019> <3C> <00A1> <3D> <003D> <3E> <00BF> <5C> <201C> <5F> <02D9> <60> <2018> <7D> <02DD> <7E> <007E> <7F> <00A8> endbfchar endcmap CMapName currentdict /CMap defineresource pop end end %%EndResource %%EOF }\endgroup \expandafter\edef\csname cmapOT1\endcsname#1{% \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% }% % % \cmapOT1IT \begingroup \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap %%DocumentNeededResources: ProcSet (CIDInit) %%IncludeResource: ProcSet (CIDInit) %%BeginResource: CMap (TeX-OT1IT-0) %%Title: (TeX-OT1IT-0 TeX OT1IT 0) %%Version: 1.000 %%EndComments /CIDInit /ProcSet findresource begin 12 dict begin begincmap /CIDSystemInfo << /Registry (TeX) /Ordering (OT1IT) /Supplement 0 >> def /CMapName /TeX-OT1IT-0 def /CMapType 2 def 1 begincodespacerange <00> <7F> endcodespacerange 8 beginbfrange <00> <01> <0393> <09> <0A> <03A8> <25> <26> <0025> <28> <3B> <0028> <3F> <5B> <003F> <5D> <5E> <005D> <61> <7A> <0061> <7B> <7C> <2013> endbfrange 42 beginbfchar <02> <0398> <03> <039B> <04> <039E> <05> <03A0> <06> <03A3> <07> <03D2> <08> <03A6> <0B> <00660066> <0C> <00660069> <0D> <0066006C> <0E> <006600660069> <0F> <00660066006C> <10> <0131> <11> <0237> <12> <0060> <13> <00B4> <14> <02C7> <15> <02D8> <16> <00AF> <17> <02DA> <18> <00B8> <19> <00DF> <1A> <00E6> <1B> <0153> <1C> <00F8> <1D> <00C6> <1E> <0152> <1F> <00D8> <21> <0021> <22> <201D> <23> <0023> <24> <00A3> <27> <2019> <3C> <00A1> <3D> <003D> <3E> <00BF> <5C> <201C> <5F> <02D9> <60> <2018> <7D> <02DD> <7E> <007E> <7F> <00A8> endbfchar endcmap CMapName currentdict /CMap defineresource pop end end %%EndResource %%EOF }\endgroup \expandafter\edef\csname cmapOT1IT\endcsname#1{% \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% }% % % \cmapOT1TT \begingroup \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap %%DocumentNeededResources: ProcSet (CIDInit) %%IncludeResource: ProcSet (CIDInit) %%BeginResource: CMap (TeX-OT1TT-0) %%Title: (TeX-OT1TT-0 TeX OT1TT 0) %%Version: 1.000 %%EndComments /CIDInit /ProcSet findresource begin 12 dict begin begincmap /CIDSystemInfo << /Registry (TeX) /Ordering (OT1TT) /Supplement 0 >> def /CMapName /TeX-OT1TT-0 def /CMapType 2 def 1 begincodespacerange <00> <7F> endcodespacerange 5 beginbfrange <00> <01> <0393> <09> <0A> <03A8> <21> <26> <0021> <28> <5F> <0028> <61> <7E> <0061> endbfrange 32 beginbfchar <02> <0398> <03> <039B> <04> <039E> <05> <03A0> <06> <03A3> <07> <03D2> <08> <03A6> <0B> <2191> <0C> <2193> <0D> <0027> <0E> <00A1> <0F> <00BF> <10> <0131> <11> <0237> <12> <0060> <13> <00B4> <14> <02C7> <15> <02D8> <16> <00AF> <17> <02DA> <18> <00B8> <19> <00DF> <1A> <00E6> <1B> <0153> <1C> <00F8> <1D> <00C6> <1E> <0152> <1F> <00D8> <20> <2423> <27> <2019> <60> <2018> <7F> <00A8> endbfchar endcmap CMapName currentdict /CMap defineresource pop end end %%EndResource %%EOF }\endgroup \expandafter\edef\csname cmapOT1TT\endcsname#1{% \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% }% \fi\fi % Set the font macro #1 to the font named #2, adding on the % specified font prefix (normally `cm'). % #3 is the font's design size, #4 is a scale factor, #5 is the CMap % encoding (currently only OT1, OT1IT and OT1TT are allowed, pass % empty to omit). \def\setfont#1#2#3#4#5{% \font#1=\fontprefix#2#3 scaled #4 \csname cmap#5\endcsname#1% } % This is what gets called when #5 of \setfont is empty. \let\cmap\gobble % emacs-page end of cmaps % Use cm as the default font prefix. % To specify the font prefix, you must define \fontprefix % before you read in texinfo.tex. \ifx\fontprefix\undefined \def\fontprefix{cm} \fi % Support font families that don't use the same naming scheme as CM. \def\rmshape{r} \def\rmbshape{bx} %where the normal face is bold \def\bfshape{b} \def\bxshape{bx} \def\ttshape{tt} \def\ttbshape{tt} \def\ttslshape{sltt} \def\itshape{ti} \def\itbshape{bxti} \def\slshape{sl} \def\slbshape{bxsl} \def\sfshape{ss} \def\sfbshape{ss} \def\scshape{csc} \def\scbshape{csc} % Definitions for a main text size of 11pt. This is the default in % Texinfo. % \def\definetextfontsizexi{% % Text fonts (11.2pt, magstep1). \def\textnominalsize{11pt} \edef\mainmagstep{\magstephalf} \setfont\textrm\rmshape{10}{\mainmagstep}{OT1} \setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT} \setfont\textbf\bfshape{10}{\mainmagstep}{OT1} \setfont\textit\itshape{10}{\mainmagstep}{OT1IT} \setfont\textsl\slshape{10}{\mainmagstep}{OT1} \setfont\textsf\sfshape{10}{\mainmagstep}{OT1} \setfont\textsc\scshape{10}{\mainmagstep}{OT1} \setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT} \font\texti=cmmi10 scaled \mainmagstep \font\textsy=cmsy10 scaled \mainmagstep \def\textecsize{1095} % A few fonts for @defun names and args. \setfont\defbf\bfshape{10}{\magstep1}{OT1} \setfont\deftt\ttshape{10}{\magstep1}{OT1TT} \setfont\defttsl\ttslshape{10}{\magstep1}{OT1TT} \def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf} % Fonts for indices, footnotes, small examples (9pt). \def\smallnominalsize{9pt} \setfont\smallrm\rmshape{9}{1000}{OT1} \setfont\smalltt\ttshape{9}{1000}{OT1TT} \setfont\smallbf\bfshape{10}{900}{OT1} \setfont\smallit\itshape{9}{1000}{OT1IT} \setfont\smallsl\slshape{9}{1000}{OT1} \setfont\smallsf\sfshape{9}{1000}{OT1} \setfont\smallsc\scshape{10}{900}{OT1} \setfont\smallttsl\ttslshape{10}{900}{OT1TT} \font\smalli=cmmi9 \font\smallsy=cmsy9 \def\smallecsize{0900} % Fonts for small examples (8pt). \def\smallernominalsize{8pt} \setfont\smallerrm\rmshape{8}{1000}{OT1} \setfont\smallertt\ttshape{8}{1000}{OT1TT} \setfont\smallerbf\bfshape{10}{800}{OT1} \setfont\smallerit\itshape{8}{1000}{OT1IT} \setfont\smallersl\slshape{8}{1000}{OT1} \setfont\smallersf\sfshape{8}{1000}{OT1} \setfont\smallersc\scshape{10}{800}{OT1} \setfont\smallerttsl\ttslshape{10}{800}{OT1TT} \font\smalleri=cmmi8 \font\smallersy=cmsy8 \def\smallerecsize{0800} % Fonts for title page (20.4pt): \def\titlenominalsize{20pt} \setfont\titlerm\rmbshape{12}{\magstep3}{OT1} \setfont\titleit\itbshape{10}{\magstep4}{OT1IT} \setfont\titlesl\slbshape{10}{\magstep4}{OT1} \setfont\titlett\ttbshape{12}{\magstep3}{OT1TT} \setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT} \setfont\titlesf\sfbshape{17}{\magstep1}{OT1} \let\titlebf=\titlerm \setfont\titlesc\scbshape{10}{\magstep4}{OT1} \font\titlei=cmmi12 scaled \magstep3 \font\titlesy=cmsy10 scaled \magstep4 \def\titleecsize{2074} % Chapter (and unnumbered) fonts (17.28pt). \def\chapnominalsize{17pt} \setfont\chaprm\rmbshape{12}{\magstep2}{OT1} \setfont\chapit\itbshape{10}{\magstep3}{OT1IT} \setfont\chapsl\slbshape{10}{\magstep3}{OT1} \setfont\chaptt\ttbshape{12}{\magstep2}{OT1TT} \setfont\chapttsl\ttslshape{10}{\magstep3}{OT1TT} \setfont\chapsf\sfbshape{17}{1000}{OT1} \let\chapbf=\chaprm \setfont\chapsc\scbshape{10}{\magstep3}{OT1} \font\chapi=cmmi12 scaled \magstep2 \font\chapsy=cmsy10 scaled \magstep3 \def\chapecsize{1728} % Section fonts (14.4pt). \def\secnominalsize{14pt} \setfont\secrm\rmbshape{12}{\magstep1}{OT1} \setfont\secit\itbshape{10}{\magstep2}{OT1IT} \setfont\secsl\slbshape{10}{\magstep2}{OT1} \setfont\sectt\ttbshape{12}{\magstep1}{OT1TT} \setfont\secttsl\ttslshape{10}{\magstep2}{OT1TT} \setfont\secsf\sfbshape{12}{\magstep1}{OT1} \let\secbf\secrm \setfont\secsc\scbshape{10}{\magstep2}{OT1} \font\seci=cmmi12 scaled \magstep1 \font\secsy=cmsy10 scaled \magstep2 \def\sececsize{1440} % Subsection fonts (13.15pt). \def\ssecnominalsize{13pt} \setfont\ssecrm\rmbshape{12}{\magstephalf}{OT1} \setfont\ssecit\itbshape{10}{1315}{OT1IT} \setfont\ssecsl\slbshape{10}{1315}{OT1} \setfont\ssectt\ttbshape{12}{\magstephalf}{OT1TT} \setfont\ssecttsl\ttslshape{10}{1315}{OT1TT} \setfont\ssecsf\sfbshape{12}{\magstephalf}{OT1} \let\ssecbf\ssecrm \setfont\ssecsc\scbshape{10}{1315}{OT1} \font\sseci=cmmi12 scaled \magstephalf \font\ssecsy=cmsy10 scaled 1315 \def\ssececsize{1200} % Reduced fonts for @acro in text (10pt). \def\reducednominalsize{10pt} \setfont\reducedrm\rmshape{10}{1000}{OT1} \setfont\reducedtt\ttshape{10}{1000}{OT1TT} \setfont\reducedbf\bfshape{10}{1000}{OT1} \setfont\reducedit\itshape{10}{1000}{OT1IT} \setfont\reducedsl\slshape{10}{1000}{OT1} \setfont\reducedsf\sfshape{10}{1000}{OT1} \setfont\reducedsc\scshape{10}{1000}{OT1} \setfont\reducedttsl\ttslshape{10}{1000}{OT1TT} \font\reducedi=cmmi10 \font\reducedsy=cmsy10 \def\reducedecsize{1000} % reset the current fonts \textfonts \rm } % end of 11pt text font size definitions % Definitions to make the main text be 10pt Computer Modern, with % section, chapter, etc., sizes following suit. This is for the GNU % Press printing of the Emacs 22 manual. Maybe other manuals in the % future. Used with @smallbook, which sets the leading to 12pt. % \def\definetextfontsizex{% % Text fonts (10pt). \def\textnominalsize{10pt} \edef\mainmagstep{1000} \setfont\textrm\rmshape{10}{\mainmagstep}{OT1} \setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT} \setfont\textbf\bfshape{10}{\mainmagstep}{OT1} \setfont\textit\itshape{10}{\mainmagstep}{OT1IT} \setfont\textsl\slshape{10}{\mainmagstep}{OT1} \setfont\textsf\sfshape{10}{\mainmagstep}{OT1} \setfont\textsc\scshape{10}{\mainmagstep}{OT1} \setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT} \font\texti=cmmi10 scaled \mainmagstep \font\textsy=cmsy10 scaled \mainmagstep \def\textecsize{1000} % A few fonts for @defun names and args. \setfont\defbf\bfshape{10}{\magstephalf}{OT1} \setfont\deftt\ttshape{10}{\magstephalf}{OT1TT} \setfont\defttsl\ttslshape{10}{\magstephalf}{OT1TT} \def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf} % Fonts for indices, footnotes, small examples (9pt). \def\smallnominalsize{9pt} \setfont\smallrm\rmshape{9}{1000}{OT1} \setfont\smalltt\ttshape{9}{1000}{OT1TT} \setfont\smallbf\bfshape{10}{900}{OT1} \setfont\smallit\itshape{9}{1000}{OT1IT} \setfont\smallsl\slshape{9}{1000}{OT1} \setfont\smallsf\sfshape{9}{1000}{OT1} \setfont\smallsc\scshape{10}{900}{OT1} \setfont\smallttsl\ttslshape{10}{900}{OT1TT} \font\smalli=cmmi9 \font\smallsy=cmsy9 \def\smallecsize{0900} % Fonts for small examples (8pt). \def\smallernominalsize{8pt} \setfont\smallerrm\rmshape{8}{1000}{OT1} \setfont\smallertt\ttshape{8}{1000}{OT1TT} \setfont\smallerbf\bfshape{10}{800}{OT1} \setfont\smallerit\itshape{8}{1000}{OT1IT} \setfont\smallersl\slshape{8}{1000}{OT1} \setfont\smallersf\sfshape{8}{1000}{OT1} \setfont\smallersc\scshape{10}{800}{OT1} \setfont\smallerttsl\ttslshape{10}{800}{OT1TT} \font\smalleri=cmmi8 \font\smallersy=cmsy8 \def\smallerecsize{0800} % Fonts for title page (20.4pt): \def\titlenominalsize{20pt} \setfont\titlerm\rmbshape{12}{\magstep3}{OT1} \setfont\titleit\itbshape{10}{\magstep4}{OT1IT} \setfont\titlesl\slbshape{10}{\magstep4}{OT1} \setfont\titlett\ttbshape{12}{\magstep3}{OT1TT} \setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT} \setfont\titlesf\sfbshape{17}{\magstep1}{OT1} \let\titlebf=\titlerm \setfont\titlesc\scbshape{10}{\magstep4}{OT1} \font\titlei=cmmi12 scaled \magstep3 \font\titlesy=cmsy10 scaled \magstep4 \def\titleecsize{2074} % Chapter fonts (14.4pt). \def\chapnominalsize{14pt} \setfont\chaprm\rmbshape{12}{\magstep1}{OT1} \setfont\chapit\itbshape{10}{\magstep2}{OT1IT} \setfont\chapsl\slbshape{10}{\magstep2}{OT1} \setfont\chaptt\ttbshape{12}{\magstep1}{OT1TT} \setfont\chapttsl\ttslshape{10}{\magstep2}{OT1TT} \setfont\chapsf\sfbshape{12}{\magstep1}{OT1} \let\chapbf\chaprm \setfont\chapsc\scbshape{10}{\magstep2}{OT1} \font\chapi=cmmi12 scaled \magstep1 \font\chapsy=cmsy10 scaled \magstep2 \def\chapecsize{1440} % Section fonts (12pt). \def\secnominalsize{12pt} \setfont\secrm\rmbshape{12}{1000}{OT1} \setfont\secit\itbshape{10}{\magstep1}{OT1IT} \setfont\secsl\slbshape{10}{\magstep1}{OT1} \setfont\sectt\ttbshape{12}{1000}{OT1TT} \setfont\secttsl\ttslshape{10}{\magstep1}{OT1TT} \setfont\secsf\sfbshape{12}{1000}{OT1} \let\secbf\secrm \setfont\secsc\scbshape{10}{\magstep1}{OT1} \font\seci=cmmi12 \font\secsy=cmsy10 scaled \magstep1 \def\sececsize{1200} % Subsection fonts (10pt). \def\ssecnominalsize{10pt} \setfont\ssecrm\rmbshape{10}{1000}{OT1} \setfont\ssecit\itbshape{10}{1000}{OT1IT} \setfont\ssecsl\slbshape{10}{1000}{OT1} \setfont\ssectt\ttbshape{10}{1000}{OT1TT} \setfont\ssecttsl\ttslshape{10}{1000}{OT1TT} \setfont\ssecsf\sfbshape{10}{1000}{OT1} \let\ssecbf\ssecrm \setfont\ssecsc\scbshape{10}{1000}{OT1} \font\sseci=cmmi10 \font\ssecsy=cmsy10 \def\ssececsize{1000} % Reduced fonts for @acro in text (9pt). \def\reducednominalsize{9pt} \setfont\reducedrm\rmshape{9}{1000}{OT1} \setfont\reducedtt\ttshape{9}{1000}{OT1TT} \setfont\reducedbf\bfshape{10}{900}{OT1} \setfont\reducedit\itshape{9}{1000}{OT1IT} \setfont\reducedsl\slshape{9}{1000}{OT1} \setfont\reducedsf\sfshape{9}{1000}{OT1} \setfont\reducedsc\scshape{10}{900}{OT1} \setfont\reducedttsl\ttslshape{10}{900}{OT1TT} \font\reducedi=cmmi9 \font\reducedsy=cmsy9 \def\reducedecsize{0900} % reduce space between paragraphs \divide\parskip by 2 % reset the current fonts \textfonts \rm } % end of 10pt text font size definitions % We provide the user-level command % @fonttextsize 10 % (or 11) to redefine the text font size. pt is assumed. % \def\xword{10} \def\xiword{11} % \parseargdef\fonttextsize{% \def\textsizearg{#1}% \wlog{doing @fonttextsize \textsizearg}% % % Set \globaldefs so that documents can use this inside @tex, since % makeinfo 4.8 does not support it, but we need it nonetheless. % \begingroup \globaldefs=1 \ifx\textsizearg\xword \definetextfontsizex \else \ifx\textsizearg\xiword \definetextfontsizexi \else \errhelp=\EMsimple \errmessage{@fonttextsize only supports `10' or `11', not `\textsizearg'} \fi\fi \endgroup } % In order for the font changes to affect most math symbols and letters, % we have to define the \textfont of the standard families. Since % texinfo doesn't allow for producing subscripts and superscripts except % in the main text, we don't bother to reset \scriptfont and % \scriptscriptfont (which would also require loading a lot more fonts). % \def\resetmathfonts{% \textfont0=\tenrm \textfont1=\teni \textfont2=\tensy \textfont\itfam=\tenit \textfont\slfam=\tensl \textfont\bffam=\tenbf \textfont\ttfam=\tentt \textfont\sffam=\tensf } % The font-changing commands redefine the meanings of \tenSTYLE, instead % of just \STYLE. We do this because \STYLE needs to also set the % current \fam for math mode. Our \STYLE (e.g., \rm) commands hardwire % \tenSTYLE to set the current font. % % Each font-changing command also sets the names \lsize (one size lower) % and \lllsize (three sizes lower). These relative commands are used in % the LaTeX logo and acronyms. % % This all needs generalizing, badly. % \def\textfonts{% \let\tenrm=\textrm \let\tenit=\textit \let\tensl=\textsl \let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc \let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy \let\tenttsl=\textttsl \def\curfontsize{text}% \def\lsize{reduced}\def\lllsize{smaller}% \resetmathfonts \setleading{\textleading}} \def\titlefonts{% \let\tenrm=\titlerm \let\tenit=\titleit \let\tensl=\titlesl \let\tenbf=\titlebf \let\tentt=\titlett \let\smallcaps=\titlesc \let\tensf=\titlesf \let\teni=\titlei \let\tensy=\titlesy \let\tenttsl=\titlettsl \def\curfontsize{title}% \def\lsize{chap}\def\lllsize{subsec}% \resetmathfonts \setleading{25pt}} \def\titlefont#1{{\titlefonts\rmisbold #1}} \def\chapfonts{% \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl \let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy \let\tenttsl=\chapttsl \def\curfontsize{chap}% \def\lsize{sec}\def\lllsize{text}% \resetmathfonts \setleading{19pt}} \def\secfonts{% \let\tenrm=\secrm \let\tenit=\secit \let\tensl=\secsl \let\tenbf=\secbf \let\tentt=\sectt \let\smallcaps=\secsc \let\tensf=\secsf \let\teni=\seci \let\tensy=\secsy \let\tenttsl=\secttsl \def\curfontsize{sec}% \def\lsize{subsec}\def\lllsize{reduced}% \resetmathfonts \setleading{16pt}} \def\subsecfonts{% \let\tenrm=\ssecrm \let\tenit=\ssecit \let\tensl=\ssecsl \let\tenbf=\ssecbf \let\tentt=\ssectt \let\smallcaps=\ssecsc \let\tensf=\ssecsf \let\teni=\sseci \let\tensy=\ssecsy \let\tenttsl=\ssecttsl \def\curfontsize{ssec}% \def\lsize{text}\def\lllsize{small}% \resetmathfonts \setleading{15pt}} \let\subsubsecfonts = \subsecfonts \def\reducedfonts{% \let\tenrm=\reducedrm \let\tenit=\reducedit \let\tensl=\reducedsl \let\tenbf=\reducedbf \let\tentt=\reducedtt \let\reducedcaps=\reducedsc \let\tensf=\reducedsf \let\teni=\reducedi \let\tensy=\reducedsy \let\tenttsl=\reducedttsl \def\curfontsize{reduced}% \def\lsize{small}\def\lllsize{smaller}% \resetmathfonts \setleading{10.5pt}} \def\smallfonts{% \let\tenrm=\smallrm \let\tenit=\smallit \let\tensl=\smallsl \let\tenbf=\smallbf \let\tentt=\smalltt \let\smallcaps=\smallsc \let\tensf=\smallsf \let\teni=\smalli \let\tensy=\smallsy \let\tenttsl=\smallttsl \def\curfontsize{small}% \def\lsize{smaller}\def\lllsize{smaller}% \resetmathfonts \setleading{10.5pt}} \def\smallerfonts{% \let\tenrm=\smallerrm \let\tenit=\smallerit \let\tensl=\smallersl \let\tenbf=\smallerbf \let\tentt=\smallertt \let\smallcaps=\smallersc \let\tensf=\smallersf \let\teni=\smalleri \let\tensy=\smallersy \let\tenttsl=\smallerttsl \def\curfontsize{smaller}% \def\lsize{smaller}\def\lllsize{smaller}% \resetmathfonts \setleading{9.5pt}} % Fonts for short table of contents. \setfont\shortcontrm\rmshape{12}{1000}{OT1} \setfont\shortcontbf\bfshape{10}{\magstep1}{OT1} % no cmb12 \setfont\shortcontsl\slshape{12}{1000}{OT1} \setfont\shortconttt\ttshape{12}{1000}{OT1TT} % Define these just so they can be easily changed for other fonts. \def\angleleft{$\langle$} \def\angleright{$\rangle$} % Set the fonts to use with the @small... environments. \let\smallexamplefonts = \smallfonts % About \smallexamplefonts. If we use \smallfonts (9pt), @smallexample % can fit this many characters: % 8.5x11=86 smallbook=72 a4=90 a5=69 % If we use \scriptfonts (8pt), then we can fit this many characters: % 8.5x11=90+ smallbook=80 a4=90+ a5=77 % For me, subjectively, the few extra characters that fit aren't worth % the additional smallness of 8pt. So I'm making the default 9pt. % % By the way, for comparison, here's what fits with @example (10pt): % 8.5x11=71 smallbook=60 a4=75 a5=58 % --karl, 24jan03. % Set up the default fonts, so we can use them for creating boxes. % \definetextfontsizexi \message{markup,} % Check if we are currently using a typewriter font. Since all the % Computer Modern typewriter fonts have zero interword stretch (and % shrink), and it is reasonable to expect all typewriter fonts to have % this property, we can check that font parameter. % \def\ifmonospace{\ifdim\fontdimen3\font=0pt } % Markup style infrastructure. \defmarkupstylesetup\INITMACRO will % define and register \INITMACRO to be called on markup style changes. % \INITMACRO can check \currentmarkupstyle for the innermost % style and the set of \ifmarkupSTYLE switches for all styles % currently in effect. \newif\ifmarkupvar \newif\ifmarkupsamp \newif\ifmarkupkey %\newif\ifmarkupfile % @file == @samp. %\newif\ifmarkupoption % @option == @samp. \newif\ifmarkupcode \newif\ifmarkupkbd %\newif\ifmarkupenv % @env == @code. %\newif\ifmarkupcommand % @command == @code. \newif\ifmarkuptex % @tex (and part of @math, for now). \newif\ifmarkupexample \newif\ifmarkupverb \newif\ifmarkupverbatim \let\currentmarkupstyle\empty \def\setupmarkupstyle#1{% \csname markup#1true\endcsname \def\currentmarkupstyle{#1}% \markupstylesetup } \let\markupstylesetup\empty \def\defmarkupstylesetup#1{% \expandafter\def\expandafter\markupstylesetup \expandafter{\markupstylesetup #1}% \def#1% } % Markup style setup for left and right quotes. \defmarkupstylesetup\markupsetuplq{% \expandafter\let\expandafter \temp \csname markupsetuplq\currentmarkupstyle\endcsname \ifx\temp\relax \markupsetuplqdefault \else \temp \fi } \defmarkupstylesetup\markupsetuprq{% \expandafter\let\expandafter \temp \csname markupsetuprq\currentmarkupstyle\endcsname \ifx\temp\relax \markupsetuprqdefault \else \temp \fi } { \catcode`\'=\active \catcode`\`=\active \gdef\markupsetuplqdefault{\let`\lq} \gdef\markupsetuprqdefault{\let'\rq} \gdef\markupsetcodequoteleft{\let`\codequoteleft} \gdef\markupsetcodequoteright{\let'\codequoteright} \gdef\markupsetnoligaturesquoteleft{\let`\noligaturesquoteleft} } \let\markupsetuplqcode \markupsetcodequoteleft \let\markupsetuprqcode \markupsetcodequoteright \let\markupsetuplqexample \markupsetcodequoteleft \let\markupsetuprqexample \markupsetcodequoteright \let\markupsetuplqverb \markupsetcodequoteleft \let\markupsetuprqverb \markupsetcodequoteright \let\markupsetuplqverbatim \markupsetcodequoteleft \let\markupsetuprqverbatim \markupsetcodequoteright \let\markupsetuplqsamp \markupsetnoligaturesquoteleft \let\markupsetuplqkbd \markupsetnoligaturesquoteleft % Allow an option to not replace quotes with a regular directed right % quote/apostrophe (char 0x27), but instead use the undirected quote % from cmtt (char 0x0d). The undirected quote is ugly, so don't make it % the default, but it works for pasting with more pdf viewers (at least % evince), the lilypond developers report. xpdf does work with the % regular 0x27. % \def\codequoteright{% \expandafter\ifx\csname SETtxicodequoteundirected\endcsname\relax \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax '% \else \char'15 \fi \else \char'15 \fi } % % and a similar option for the left quote char vs. a grave accent. % Modern fonts display ASCII 0x60 as a grave accent, so some people like % the code environments to do likewise. % \def\codequoteleft{% \expandafter\ifx\csname SETtxicodequotebacktick\endcsname\relax \expandafter\ifx\csname SETcodequotebacktick\endcsname\relax % [Knuth] pp. 380,381,391 % \relax disables Spanish ligatures ?` and !` of \tt font. \relax`% \else \char'22 \fi \else \char'22 \fi } % [Knuth] pp. 380,381,391, disable Spanish ligatures ?` and !` of \tt font. \def\noligaturesquoteleft{\relax\lq} % Count depth in font-changes, for error checks \newcount\fontdepth \fontdepth=0 %% Add scribe-like font environments, plus @l for inline lisp (usually sans %% serif) and @ii for TeX italic % \smartitalic{ARG} outputs arg in italics, followed by an italic correction % unless the following character is such as not to need one. \def\smartitalicx{\ifx\next,\else\ifx\next-\else\ifx\next.\else \ptexslash\fi\fi\fi} \def\smartslanted#1{{\ifusingtt\ttsl\sl #1}\futurelet\next\smartitalicx} \def\smartitalic#1{{\ifusingtt\ttsl\it #1}\futurelet\next\smartitalicx} % like \smartslanted except unconditionally uses \ttsl. % @var is set to this for defun arguments. \def\ttslanted#1{{\ttsl #1}\futurelet\next\smartitalicx} % @cite is like \smartslanted except unconditionally use \sl. We never want % ttsl for book titles, do we? \def\cite#1{{\sl #1}\futurelet\next\smartitalicx} \let\i=\smartitalic \let\slanted=\smartslanted \def\var#1{{\setupmarkupstyle{var}\smartslanted{#1}}} \let\dfn=\smartslanted \let\emph=\smartitalic % Explicit font changes: @r, @sc, undocumented @ii. \def\r#1{{\rm #1}} % roman font \def\sc#1{{\smallcaps#1}} % smallcaps font \def\ii#1{{\it #1}} % italic font % @b, explicit bold. Also @strong. \def\b#1{{\bf #1}} \let\strong=\b % @sansserif, explicit sans. \def\sansserif#1{{\sf #1}} % We can't just use \exhyphenpenalty, because that only has effect at % the end of a paragraph. Restore normal hyphenation at the end of the % group within which \nohyphenation is presumably called. % \def\nohyphenation{\hyphenchar\font = -1 \aftergroup\restorehyphenation} \def\restorehyphenation{\hyphenchar\font = `- } % Set sfcode to normal for the chars that usually have another value. % Can't use plain's \frenchspacing because it uses the `\x notation, and % sometimes \x has an active definition that messes things up. % \catcode`@=11 \def\plainfrenchspacing{% \sfcode\dotChar =\@m \sfcode\questChar=\@m \sfcode\exclamChar=\@m \sfcode\colonChar=\@m \sfcode\semiChar =\@m \sfcode\commaChar =\@m \def\endofsentencespacefactor{1000}% for @. and friends } \def\plainnonfrenchspacing{% \sfcode`\.3000\sfcode`\?3000\sfcode`\!3000 \sfcode`\:2000\sfcode`\;1500\sfcode`\,1250 \def\endofsentencespacefactor{3000}% for @. and friends } \catcode`@=\other \def\endofsentencespacefactor{3000}% default % @t, explicit typewriter. \def\t#1{% {\tt \rawbackslash \plainfrenchspacing #1}% \null } % @samp. \def\samp#1{{\setupmarkupstyle{samp}\lq\tclose{#1}\rq\null}} % definition of @key that produces a lozenge. Doesn't adjust to text size. %\setfont\keyrm\rmshape{8}{1000}{OT1} %\font\keysy=cmsy9 %\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{% % \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{% % \vbox{\hrule\kern-0.4pt % \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}% % \kern-0.4pt\hrule}% % \kern-.06em\raise0.4pt\hbox{\angleright}}}} % definition of @key with no lozenge. If the current font is already % monospace, don't change it; that way, we respect @kbdinputstyle. But % if it isn't monospace, then use \tt. % \def\key#1{{\setupmarkupstyle{key}% \nohyphenation \ifmonospace\else\tt\fi #1}\null} % ctrl is no longer a Texinfo command. \def\ctrl #1{{\tt \rawbackslash \hat}#1} % @file, @option are the same as @samp. \let\file=\samp \let\option=\samp % @code is a modification of @t, % which makes spaces the same size as normal in the surrounding text. \def\tclose#1{% {% % Change normal interword space to be same as for the current font. \spaceskip = \fontdimen2\font % % Switch to typewriter. \tt % % But `\ ' produces the large typewriter interword space. \def\ {{\spaceskip = 0pt{} }}% % % Turn off hyphenation. \nohyphenation % \rawbackslash \plainfrenchspacing #1% }% \null } % We *must* turn on hyphenation at `-' and `_' in @code. % Otherwise, it is too hard to avoid overfull hboxes % in the Emacs manual, the Library manual, etc. % Unfortunately, TeX uses one parameter (\hyphenchar) to control % both hyphenation at - and hyphenation within words. % We must therefore turn them both off (\tclose does that) % and arrange explicitly to hyphenate at a dash. % -- rms. { \catcode`\-=\active \catcode`\_=\active \catcode`\'=\active \catcode`\`=\active \global\let'=\rq \global\let`=\lq % default definitions % \global\def\code{\begingroup \setupmarkupstyle{code}% % The following should really be moved into \setupmarkupstyle handlers. \catcode\dashChar=\active \catcode\underChar=\active \ifallowcodebreaks \let-\codedash \let_\codeunder \else \let-\realdash \let_\realunder \fi \codex } } \def\realdash{-} \def\codedash{-\discretionary{}{}{}} \def\codeunder{% % this is all so @math{@code{var_name}+1} can work. In math mode, _ % is "active" (mathcode"8000) and \normalunderscore (or \char95, etc.) % will therefore expand the active definition of _, which is us % (inside @code that is), therefore an endless loop. \ifusingtt{\ifmmode \mathchar"075F % class 0=ordinary, family 7=ttfam, pos 0x5F=_. \else\normalunderscore \fi \discretionary{}{}{}}% {\_}% } \def\codex #1{\tclose{#1}\endgroup} % An additional complication: the above will allow breaks after, e.g., % each of the four underscores in __typeof__. This is undesirable in % some manuals, especially if they don't have long identifiers in % general. @allowcodebreaks provides a way to control this. % \newif\ifallowcodebreaks \allowcodebreakstrue \def\keywordtrue{true} \def\keywordfalse{false} \parseargdef\allowcodebreaks{% \def\txiarg{#1}% \ifx\txiarg\keywordtrue \allowcodebreakstrue \else\ifx\txiarg\keywordfalse \allowcodebreaksfalse \else \errhelp = \EMsimple \errmessage{Unknown @allowcodebreaks option `\txiarg'}% \fi\fi } % @kbd is like @code, except that if the argument is just one @key command, % then @kbd has no effect. \def\kbd#1{{\setupmarkupstyle{kbd}\def\look{#1}\expandafter\kbdfoo\look??\par}} % @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always), % `example' (@kbd uses ttsl only inside of @example and friends), % or `code' (@kbd uses normal tty font always). \parseargdef\kbdinputstyle{% \def\txiarg{#1}% \ifx\txiarg\worddistinct \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}% \else\ifx\txiarg\wordexample \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}% \else\ifx\txiarg\wordcode \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}% \else \errhelp = \EMsimple \errmessage{Unknown @kbdinputstyle option `\txiarg'}% \fi\fi\fi } \def\worddistinct{distinct} \def\wordexample{example} \def\wordcode{code} % Default is `distinct'. \kbdinputstyle distinct \def\xkey{\key} \def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}% \ifx\one\xkey\ifx\threex\three \key{#2}% \else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi \else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi} % For @indicateurl, @env, @command quotes seem unnecessary, so use \code. \let\indicateurl=\code \let\env=\code \let\command=\code % @clicksequence{File @click{} Open ...} \def\clicksequence#1{\begingroup #1\endgroup} % @clickstyle @arrow (by default) \parseargdef\clickstyle{\def\click{#1}} \def\click{\arrow} % @uref (abbreviation for `urlref') takes an optional (comma-separated) % second argument specifying the text to display and an optional third % arg as text to display instead of (rather than in addition to) the url % itself. First (mandatory) arg is the url. Perhaps eventually put in % a hypertex \special here. % \def\uref#1{\douref #1,,,\finish} \def\douref#1,#2,#3,#4\finish{\begingroup \unsepspaces \pdfurl{#1}% \setbox0 = \hbox{\ignorespaces #3}% \ifdim\wd0 > 0pt \unhbox0 % third arg given, show only that \else \setbox0 = \hbox{\ignorespaces #2}% \ifdim\wd0 > 0pt \ifpdf \unhbox0 % PDF: 2nd arg given, show only it \else \unhbox0\ (\code{#1})% DVI: 2nd arg given, show both it and url \fi \else \code{#1}% only url given, so show it \fi \fi \endlink \endgroup} % @url synonym for @uref, since that's how everyone uses it. % \let\url=\uref % rms does not like angle brackets --karl, 17may97. % So now @email is just like @uref, unless we are pdf. % %\def\email#1{\angleleft{\tt #1}\angleright} \ifpdf \def\email#1{\doemail#1,,\finish} \def\doemail#1,#2,#3\finish{\begingroup \unsepspaces \pdfurl{mailto:#1}% \setbox0 = \hbox{\ignorespaces #2}% \ifdim\wd0>0pt\unhbox0\else\code{#1}\fi \endlink \endgroup} \else \let\email=\uref \fi % Typeset a dimension, e.g., `in' or `pt'. The only reason for the % argument is to make the input look right: @dmn{pt} instead of @dmn{}pt. % \def\dmn#1{\thinspace #1} % @l was never documented to mean ``switch to the Lisp font'', % and it is not used as such in any manual I can find. We need it for % Polish suppressed-l. --karl, 22sep96. %\def\l#1{{\li #1}\null} % @acronym for "FBI", "NATO", and the like. % We print this one point size smaller, since it's intended for % all-uppercase. % \def\acronym#1{\doacronym #1,,\finish} \def\doacronym#1,#2,#3\finish{% {\selectfonts\lsize #1}% \def\temp{#2}% \ifx\temp\empty \else \space ({\unsepspaces \ignorespaces \temp \unskip})% \fi } % @abbr for "Comput. J." and the like. % No font change, but don't do end-of-sentence spacing. % \def\abbr#1{\doabbr #1,,\finish} \def\doabbr#1,#2,#3\finish{% {\plainfrenchspacing #1}% \def\temp{#2}% \ifx\temp\empty \else \space ({\unsepspaces \ignorespaces \temp \unskip})% \fi } \message{glyphs,} % @point{}, @result{}, @expansion{}, @print{}, @equiv{}. % % Since these characters are used in examples, they should be an even number of % \tt widths. Each \tt character is 1en, so two makes it 1em. % \def\point{$\star$} \def\arrow{\leavevmode\raise.05ex\hbox to 1em{\hfil$\rightarrow$\hfil}} \def\result{\leavevmode\raise.05ex\hbox to 1em{\hfil$\Rightarrow$\hfil}} \def\expansion{\leavevmode\hbox to 1em{\hfil$\mapsto$\hfil}} \def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}} \def\equiv{\leavevmode\hbox to 1em{\hfil$\ptexequiv$\hfil}} % The @error{} command. % Adapted from the TeXbook's \boxit. % \newbox\errorbox % {\tentt \global\dimen0 = 3em}% Width of the box. \dimen2 = .55pt % Thickness of rules % The text. (`r' is open on the right, `e' somewhat less so on the left.) \setbox0 = \hbox{\kern-.75pt \reducedsf error\kern-1.5pt} % \setbox\errorbox=\hbox to \dimen0{\hfil \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right. \advance\hsize by -2\dimen2 % Rules. \vbox{% \hrule height\dimen2 \hbox{\vrule width\dimen2 \kern3pt % Space to left of text. \vtop{\kern2.4pt \box0 \kern2.4pt}% Space above/below. \kern3pt\vrule width\dimen2}% Space to right. \hrule height\dimen2} \hfil} % \def\error{\leavevmode\lower.7ex\copy\errorbox} % @pounds{} is a sterling sign, which Knuth put in the CM italic font. % \def\pounds{{\it\$}} % @euro{} comes from a separate font, depending on the current style. % We use the free feym* fonts from the eurosym package by Henrik % Theiling, which support regular, slanted, bold and bold slanted (and % "outlined" (blackboard board, sort of) versions, which we don't need). % It is available from http://www.ctan.org/tex-archive/fonts/eurosym. % % Although only regular is the truly official Euro symbol, we ignore % that. The Euro is designed to be slightly taller than the regular % font height. % % feymr - regular % feymo - slanted % feybr - bold % feybo - bold slanted % % There is no good (free) typewriter version, to my knowledge. % A feymr10 euro is ~7.3pt wide, while a normal cmtt10 char is ~5.25pt wide. % Hmm. % % Also doesn't work in math. Do we need to do math with euro symbols? % Hope not. % % \def\euro{{\eurofont e}} \def\eurofont{% % We set the font at each command, rather than predefining it in % \textfonts and the other font-switching commands, so that % installations which never need the symbol don't have to have the % font installed. % % There is only one designed size (nominal 10pt), so we always scale % that to the current nominal size. % % By the way, simply using "at 1em" works for cmr10 and the like, but % does not work for cmbx10 and other extended/shrunken fonts. % \def\eurosize{\csname\curfontsize nominalsize\endcsname}% % \ifx\curfontstyle\bfstylename % bold: \font\thiseurofont = \ifusingit{feybo10}{feybr10} at \eurosize \else % regular: \font\thiseurofont = \ifusingit{feymo10}{feymr10} at \eurosize \fi \thiseurofont } % Glyphs from the EC fonts. We don't use \let for the aliases, because % sometimes we redefine the original macro, and the alias should reflect % the redefinition. % % Use LaTeX names for the Icelandic letters. \def\DH{{\ecfont \char"D0}} % Eth \def\dh{{\ecfont \char"F0}} % eth \def\TH{{\ecfont \char"DE}} % Thorn \def\th{{\ecfont \char"FE}} % thorn % \def\guillemetleft{{\ecfont \char"13}} \def\guillemotleft{\guillemetleft} \def\guillemetright{{\ecfont \char"14}} \def\guillemotright{\guillemetright} \def\guilsinglleft{{\ecfont \char"0E}} \def\guilsinglright{{\ecfont \char"0F}} \def\quotedblbase{{\ecfont \char"12}} \def\quotesinglbase{{\ecfont \char"0D}} % % This positioning is not perfect (see the ogonek LaTeX package), but % we have the precomposed glyphs for the most common cases. We put the % tests to use those glyphs in the single \ogonek macro so we have fewer % dummy definitions to worry about for index entries, etc. % % ogonek is also used with other letters in Lithuanian (IOU), but using % the precomposed glyphs for those is not so easy since they aren't in % the same EC font. \def\ogonek#1{{% \def\temp{#1}% \ifx\temp\macrocharA\Aogonek \else\ifx\temp\macrochara\aogonek \else\ifx\temp\macrocharE\Eogonek \else\ifx\temp\macrochare\eogonek \else \ecfont \setbox0=\hbox{#1}% \ifdim\ht0=1ex\accent"0C #1% \else\ooalign{\unhbox0\crcr\hidewidth\char"0C \hidewidth}% \fi \fi\fi\fi\fi }% } \def\Aogonek{{\ecfont \char"81}}\def\macrocharA{A} \def\aogonek{{\ecfont \char"A1}}\def\macrochara{a} \def\Eogonek{{\ecfont \char"86}}\def\macrocharE{E} \def\eogonek{{\ecfont \char"A6}}\def\macrochare{e} % % Use the ec* fonts (cm-super in outline format) for non-CM glyphs. \def\ecfont{% % We can't distinguish serif/sans and italic/slanted, but this % is used for crude hacks anyway (like adding French and German % quotes to documents typeset with CM, where we lose kerning), so % hopefully nobody will notice/care. \edef\ecsize{\csname\curfontsize ecsize\endcsname}% \edef\nominalsize{\csname\curfontsize nominalsize\endcsname}% \ifx\curfontstyle\bfstylename % bold: \font\thisecfont = ecb\ifusingit{i}{x}\ecsize \space at \nominalsize \else % regular: \font\thisecfont = ec\ifusingit{ti}{rm}\ecsize \space at \nominalsize \fi \thisecfont } % @registeredsymbol - R in a circle. The font for the R should really % be smaller yet, but lllsize is the best we can do for now. % Adapted from the plain.tex definition of \copyright. % \def\registeredsymbol{% $^{{\ooalign{\hfil\raise.07ex\hbox{\selectfonts\lllsize R}% \hfil\crcr\Orb}}% }$% } % @textdegree - the normal degrees sign. % \def\textdegree{$^\circ$} % Laurent Siebenmann reports \Orb undefined with: % Textures 1.7.7 (preloaded format=plain 93.10.14) (68K) 16 APR 2004 02:38 % so we'll define it if necessary. % \ifx\Orb\undefined \def\Orb{\mathhexbox20D} \fi % Quotes. \chardef\quotedblleft="5C \chardef\quotedblright=`\" \chardef\quoteleft=`\` \chardef\quoteright=`\' \message{page headings,} \newskip\titlepagetopglue \titlepagetopglue = 1.5in \newskip\titlepagebottomglue \titlepagebottomglue = 2pc % First the title page. Must do @settitle before @titlepage. \newif\ifseenauthor \newif\iffinishedtitlepage % Do an implicit @contents or @shortcontents after @end titlepage if the % user says @setcontentsaftertitlepage or @setshortcontentsaftertitlepage. % \newif\ifsetcontentsaftertitlepage \let\setcontentsaftertitlepage = \setcontentsaftertitlepagetrue \newif\ifsetshortcontentsaftertitlepage \let\setshortcontentsaftertitlepage = \setshortcontentsaftertitlepagetrue \parseargdef\shorttitlepage{\begingroup\hbox{}\vskip 1.5in \chaprm \centerline{#1}% \endgroup\page\hbox{}\page} \envdef\titlepage{% % Open one extra group, as we want to close it in the middle of \Etitlepage. \begingroup \parindent=0pt \textfonts % Leave some space at the very top of the page. \vglue\titlepagetopglue % No rule at page bottom unless we print one at the top with @title. \finishedtitlepagetrue % % Most title ``pages'' are actually two pages long, with space % at the top of the second. We don't want the ragged left on the second. \let\oldpage = \page \def\page{% \iffinishedtitlepage\else \finishtitlepage \fi \let\page = \oldpage \page \null }% } \def\Etitlepage{% \iffinishedtitlepage\else \finishtitlepage \fi % It is important to do the page break before ending the group, % because the headline and footline are only empty inside the group. % If we use the new definition of \page, we always get a blank page % after the title page, which we certainly don't want. \oldpage \endgroup % % Need this before the \...aftertitlepage checks so that if they are % in effect the toc pages will come out with page numbers. \HEADINGSon % % If they want short, they certainly want long too. \ifsetshortcontentsaftertitlepage \shortcontents \contents \global\let\shortcontents = \relax \global\let\contents = \relax \fi % \ifsetcontentsaftertitlepage \contents \global\let\contents = \relax \global\let\shortcontents = \relax \fi } \def\finishtitlepage{% \vskip4pt \hrule height 2pt width \hsize \vskip\titlepagebottomglue \finishedtitlepagetrue } %%% Macros to be used within @titlepage: \let\subtitlerm=\tenrm \def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines} \parseargdef\title{% \checkenv\titlepage \leftline{\titlefonts\rmisbold #1} % print a rule at the page bottom also. \finishedtitlepagefalse \vskip4pt \hrule height 4pt width \hsize \vskip4pt } \parseargdef\subtitle{% \checkenv\titlepage {\subtitlefont \rightline{#1}}% } % @author should come last, but may come many times. % It can also be used inside @quotation. % \parseargdef\author{% \def\temp{\quotation}% \ifx\thisenv\temp \def\quotationauthor{#1}% printed in \Equotation. \else \checkenv\titlepage \ifseenauthor\else \vskip 0pt plus 1filll \seenauthortrue \fi {\secfonts\rmisbold \leftline{#1}}% \fi } %%% Set up page headings and footings. \let\thispage=\folio \newtoks\evenheadline % headline on even pages \newtoks\oddheadline % headline on odd pages \newtoks\evenfootline % footline on even pages \newtoks\oddfootline % footline on odd pages % Now make TeX use those variables \headline={{\textfonts\rm \ifodd\pageno \the\oddheadline \else \the\evenheadline \fi}} \footline={{\textfonts\rm \ifodd\pageno \the\oddfootline \else \the\evenfootline \fi}\HEADINGShook} \let\HEADINGShook=\relax % Commands to set those variables. % For example, this is what @headings on does % @evenheading @thistitle|@thispage|@thischapter % @oddheading @thischapter|@thispage|@thistitle % @evenfooting @thisfile|| % @oddfooting ||@thisfile \def\evenheading{\parsearg\evenheadingxxx} \def\evenheadingxxx #1{\evenheadingyyy #1\|\|\|\|\finish} \def\evenheadingyyy #1\|#2\|#3\|#4\finish{% \global\evenheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} \def\oddheading{\parsearg\oddheadingxxx} \def\oddheadingxxx #1{\oddheadingyyy #1\|\|\|\|\finish} \def\oddheadingyyy #1\|#2\|#3\|#4\finish{% \global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} \parseargdef\everyheading{\oddheadingxxx{#1}\evenheadingxxx{#1}}% \def\evenfooting{\parsearg\evenfootingxxx} \def\evenfootingxxx #1{\evenfootingyyy #1\|\|\|\|\finish} \def\evenfootingyyy #1\|#2\|#3\|#4\finish{% \global\evenfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} \def\oddfooting{\parsearg\oddfootingxxx} \def\oddfootingxxx #1{\oddfootingyyy #1\|\|\|\|\finish} \def\oddfootingyyy #1\|#2\|#3\|#4\finish{% \global\oddfootline = {\rlap{\centerline{#2}}\line{#1\hfil#3}}% % % Leave some space for the footline. Hopefully ok to assume % @evenfooting will not be used by itself. \global\advance\pageheight by -12pt \global\advance\vsize by -12pt } \parseargdef\everyfooting{\oddfootingxxx{#1}\evenfootingxxx{#1}} % @evenheadingmarks top \thischapter <- chapter at the top of a page % @evenheadingmarks bottom \thischapter <- chapter at the bottom of a page % % The same set of arguments for: % % @oddheadingmarks % @evenfootingmarks % @oddfootingmarks % @everyheadingmarks % @everyfootingmarks \def\evenheadingmarks{\headingmarks{even}{heading}} \def\oddheadingmarks{\headingmarks{odd}{heading}} \def\evenfootingmarks{\headingmarks{even}{footing}} \def\oddfootingmarks{\headingmarks{odd}{footing}} \def\everyheadingmarks#1 {\headingmarks{even}{heading}{#1} \headingmarks{odd}{heading}{#1} } \def\everyfootingmarks#1 {\headingmarks{even}{footing}{#1} \headingmarks{odd}{footing}{#1} } % #1 = even/odd, #2 = heading/footing, #3 = top/bottom. \def\headingmarks#1#2#3 {% \expandafter\let\expandafter\temp \csname get#3headingmarks\endcsname \global\expandafter\let\csname get#1#2marks\endcsname \temp } \everyheadingmarks bottom \everyfootingmarks bottom % @headings double turns headings on for double-sided printing. % @headings single turns headings on for single-sided printing. % @headings off turns them off. % @headings on same as @headings double, retained for compatibility. % @headings after turns on double-sided headings after this page. % @headings doubleafter turns on double-sided headings after this page. % @headings singleafter turns on single-sided headings after this page. % By default, they are off at the start of a document, % and turned `on' after @end titlepage. \def\headings #1 {\csname HEADINGS#1\endcsname} \def\HEADINGSoff{% \global\evenheadline={\hfil} \global\evenfootline={\hfil} \global\oddheadline={\hfil} \global\oddfootline={\hfil}} \HEADINGSoff % When we turn headings on, set the page number to 1. % For double-sided printing, put current file name in lower left corner, % chapter name on inside top of right hand pages, document % title on inside top of left hand pages, and page numbers on outside top % edge of all pages. \def\HEADINGSdouble{% \global\pageno=1 \global\evenfootline={\hfil} \global\oddfootline={\hfil} \global\evenheadline={\line{\folio\hfil\thistitle}} \global\oddheadline={\line{\thischapter\hfil\folio}} \global\let\contentsalignmacro = \chapoddpage } \let\contentsalignmacro = \chappager % For single-sided printing, chapter title goes across top left of page, % page number on top right. \def\HEADINGSsingle{% \global\pageno=1 \global\evenfootline={\hfil} \global\oddfootline={\hfil} \global\evenheadline={\line{\thischapter\hfil\folio}} \global\oddheadline={\line{\thischapter\hfil\folio}} \global\let\contentsalignmacro = \chappager } \def\HEADINGSon{\HEADINGSdouble} \def\HEADINGSafter{\let\HEADINGShook=\HEADINGSdoublex} \let\HEADINGSdoubleafter=\HEADINGSafter \def\HEADINGSdoublex{% \global\evenfootline={\hfil} \global\oddfootline={\hfil} \global\evenheadline={\line{\folio\hfil\thistitle}} \global\oddheadline={\line{\thischapter\hfil\folio}} \global\let\contentsalignmacro = \chapoddpage } \def\HEADINGSsingleafter{\let\HEADINGShook=\HEADINGSsinglex} \def\HEADINGSsinglex{% \global\evenfootline={\hfil} \global\oddfootline={\hfil} \global\evenheadline={\line{\thischapter\hfil\folio}} \global\oddheadline={\line{\thischapter\hfil\folio}} \global\let\contentsalignmacro = \chappager } % Subroutines used in generating headings % This produces Day Month Year style of output. % Only define if not already defined, in case a txi-??.tex file has set % up a different format (e.g., txi-cs.tex does this). \ifx\today\undefined \def\today{% \number\day\space \ifcase\month \or\putwordMJan\or\putwordMFeb\or\putwordMMar\or\putwordMApr \or\putwordMMay\or\putwordMJun\or\putwordMJul\or\putwordMAug \or\putwordMSep\or\putwordMOct\or\putwordMNov\or\putwordMDec \fi \space\number\year} \fi % @settitle line... specifies the title of the document, for headings. % It generates no output of its own. \def\thistitle{\putwordNoTitle} \def\settitle{\parsearg{\gdef\thistitle}} \message{tables,} % Tables -- @table, @ftable, @vtable, @item(x). % default indentation of table text \newdimen\tableindent \tableindent=.8in % default indentation of @itemize and @enumerate text \newdimen\itemindent \itemindent=.3in % margin between end of table item and start of table text. \newdimen\itemmargin \itemmargin=.1in % used internally for \itemindent minus \itemmargin \newdimen\itemmax % Note @table, @ftable, and @vtable define @item, @itemx, etc., with % these defs. % They also define \itemindex % to index the item name in whatever manner is desired (perhaps none). \newif\ifitemxneedsnegativevskip \def\itemxpar{\par\ifitemxneedsnegativevskip\nobreak\vskip-\parskip\nobreak\fi} \def\internalBitem{\smallbreak \parsearg\itemzzz} \def\internalBitemx{\itemxpar \parsearg\itemzzz} \def\itemzzz #1{\begingroup % \advance\hsize by -\rightskip \advance\hsize by -\tableindent \setbox0=\hbox{\itemindicate{#1}}% \itemindex{#1}% \nobreak % This prevents a break before @itemx. % % If the item text does not fit in the space we have, put it on a line % by itself, and do not allow a page break either before or after that % line. We do not start a paragraph here because then if the next % command is, e.g., @kindex, the whatsit would get put into the % horizontal list on a line by itself, resulting in extra blank space. \ifdim \wd0>\itemmax % % Make this a paragraph so we get the \parskip glue and wrapping, % but leave it ragged-right. \begingroup \advance\leftskip by-\tableindent \advance\hsize by\tableindent \advance\rightskip by0pt plus1fil \leavevmode\unhbox0\par \endgroup % % We're going to be starting a paragraph, but we don't want the % \parskip glue -- logically it's part of the @item we just started. \nobreak \vskip-\parskip % % Stop a page break at the \parskip glue coming up. However, if % what follows is an environment such as @example, there will be no % \parskip glue; then the negative vskip we just inserted would % cause the example and the item to crash together. So we use this % bizarre value of 10001 as a signal to \aboveenvbreak to insert % \parskip glue after all. Section titles are handled this way also. % \penalty 10001 \endgroup \itemxneedsnegativevskipfalse \else % The item text fits into the space. Start a paragraph, so that the % following text (if any) will end up on the same line. \noindent % Do this with kerns and \unhbox so that if there is a footnote in % the item text, it can migrate to the main vertical list and % eventually be printed. \nobreak\kern-\tableindent \dimen0 = \itemmax \advance\dimen0 by \itemmargin \advance\dimen0 by -\wd0 \unhbox0 \nobreak\kern\dimen0 \endgroup \itemxneedsnegativevskiptrue \fi } \def\item{\errmessage{@item while not in a list environment}} \def\itemx{\errmessage{@itemx while not in a list environment}} % @table, @ftable, @vtable. \envdef\table{% \let\itemindex\gobble \tablecheck{table}% } \envdef\ftable{% \def\itemindex ##1{\doind {fn}{\code{##1}}}% \tablecheck{ftable}% } \envdef\vtable{% \def\itemindex ##1{\doind {vr}{\code{##1}}}% \tablecheck{vtable}% } \def\tablecheck#1{% \ifnum \the\catcode`\^^M=\active \endgroup \errmessage{This command won't work in this context; perhaps the problem is that we are \inenvironment\thisenv}% \def\next{\doignore{#1}}% \else \let\next\tablex \fi \next } \def\tablex#1{% \def\itemindicate{#1}% \parsearg\tabley } \def\tabley#1{% {% \makevalueexpandable \edef\temp{\noexpand\tablez #1\space\space\space}% \expandafter }\temp \endtablez } \def\tablez #1 #2 #3 #4\endtablez{% \aboveenvbreak \ifnum 0#1>0 \advance \leftskip by #1\mil \fi \ifnum 0#2>0 \tableindent=#2\mil \fi \ifnum 0#3>0 \advance \rightskip by #3\mil \fi \itemmax=\tableindent \advance \itemmax by -\itemmargin \advance \leftskip by \tableindent \exdentamount=\tableindent \parindent = 0pt \parskip = \smallskipamount \ifdim \parskip=0pt \parskip=2pt \fi \let\item = \internalBitem \let\itemx = \internalBitemx } \def\Etable{\endgraf\afterenvbreak} \let\Eftable\Etable \let\Evtable\Etable \let\Eitemize\Etable \let\Eenumerate\Etable % This is the counter used by @enumerate, which is really @itemize \newcount \itemno \envdef\itemize{\parsearg\doitemize} \def\doitemize#1{% \aboveenvbreak \itemmax=\itemindent \advance\itemmax by -\itemmargin \advance\leftskip by \itemindent \exdentamount=\itemindent \parindent=0pt \parskip=\smallskipamount \ifdim\parskip=0pt \parskip=2pt \fi % % Try typesetting the item mark that if the document erroneously says % something like @itemize @samp (intending @table), there's an error % right away at the @itemize. It's not the best error message in the % world, but it's better than leaving it to the @item. This means if % the user wants an empty mark, they have to say @w{} not just @w. \def\itemcontents{#1}% \setbox0 = \hbox{\itemcontents}% % % @itemize with no arg is equivalent to @itemize @bullet. \ifx\itemcontents\empty\def\itemcontents{\bullet}\fi % \let\item=\itemizeitem } % Definition of @item while inside @itemize and @enumerate. % \def\itemizeitem{% \advance\itemno by 1 % for enumerations {\let\par=\endgraf \smallbreak}% reasonable place to break {% % If the document has an @itemize directly after a section title, a % \nobreak will be last on the list, and \sectionheading will have % done a \vskip-\parskip. In that case, we don't want to zero % parskip, or the item text will crash with the heading. On the % other hand, when there is normal text preceding the item (as there % usually is), we do want to zero parskip, or there would be too much % space. In that case, we won't have a \nobreak before. At least % that's the theory. \ifnum\lastpenalty<10000 \parskip=0in \fi \noindent \hbox to 0pt{\hss \itemcontents \kern\itemmargin}% % \vadjust{\penalty 1200}}% not good to break after first line of item. \flushcr } % \splitoff TOKENS\endmark defines \first to be the first token in % TOKENS, and \rest to be the remainder. % \def\splitoff#1#2\endmark{\def\first{#1}\def\rest{#2}}% % Allow an optional argument of an uppercase letter, lowercase letter, % or number, to specify the first label in the enumerated list. No % argument is the same as `1'. % \envparseargdef\enumerate{\enumeratey #1 \endenumeratey} \def\enumeratey #1 #2\endenumeratey{% % If we were given no argument, pretend we were given `1'. \def\thearg{#1}% \ifx\thearg\empty \def\thearg{1}\fi % % Detect if the argument is a single token. If so, it might be a % letter. Otherwise, the only valid thing it can be is a number. % (We will always have one token, because of the test we just made. % This is a good thing, since \splitoff doesn't work given nothing at % all -- the first parameter is undelimited.) \expandafter\splitoff\thearg\endmark \ifx\rest\empty % Only one token in the argument. It could still be anything. % A ``lowercase letter'' is one whose \lccode is nonzero. % An ``uppercase letter'' is one whose \lccode is both nonzero, and % not equal to itself. % Otherwise, we assume it's a number. % % We need the \relax at the end of the \ifnum lines to stop TeX from % continuing to look for a <number>. % \ifnum\lccode\expandafter`\thearg=0\relax \numericenumerate % a number (we hope) \else % It's a letter. \ifnum\lccode\expandafter`\thearg=\expandafter`\thearg\relax \lowercaseenumerate % lowercase letter \else \uppercaseenumerate % uppercase letter \fi \fi \else % Multiple tokens in the argument. We hope it's a number. \numericenumerate \fi } % An @enumerate whose labels are integers. The starting integer is % given in \thearg. % \def\numericenumerate{% \itemno = \thearg \startenumeration{\the\itemno}% } % The starting (lowercase) letter is in \thearg. \def\lowercaseenumerate{% \itemno = \expandafter`\thearg \startenumeration{% % Be sure we're not beyond the end of the alphabet. \ifnum\itemno=0 \errmessage{No more lowercase letters in @enumerate; get a bigger alphabet}% \fi \char\lccode\itemno }% } % The starting (uppercase) letter is in \thearg. \def\uppercaseenumerate{% \itemno = \expandafter`\thearg \startenumeration{% % Be sure we're not beyond the end of the alphabet. \ifnum\itemno=0 \errmessage{No more uppercase letters in @enumerate; get a bigger alphabet} \fi \char\uccode\itemno }% } % Call \doitemize, adding a period to the first argument and supplying the % common last two arguments. Also subtract one from the initial value in % \itemno, since @item increments \itemno. % \def\startenumeration#1{% \advance\itemno by -1 \doitemize{#1.}\flushcr } % @alphaenumerate and @capsenumerate are abbreviations for giving an arg % to @enumerate. % \def\alphaenumerate{\enumerate{a}} \def\capsenumerate{\enumerate{A}} \def\Ealphaenumerate{\Eenumerate} \def\Ecapsenumerate{\Eenumerate} % @multitable macros % Amy Hendrickson, 8/18/94, 3/6/96 % % @multitable ... @end multitable will make as many columns as desired. % Contents of each column will wrap at width given in preamble. Width % can be specified either with sample text given in a template line, % or in percent of \hsize, the current width of text on page. % Table can continue over pages but will only break between lines. % To make preamble: % % Either define widths of columns in terms of percent of \hsize: % @multitable @columnfractions .25 .3 .45 % @item ... % % Numbers following @columnfractions are the percent of the total % current hsize to be used for each column. You may use as many % columns as desired. % Or use a template: % @multitable {Column 1 template} {Column 2 template} {Column 3 template} % @item ... % using the widest term desired in each column. % Each new table line starts with @item, each subsequent new column % starts with @tab. Empty columns may be produced by supplying @tab's % with nothing between them for as many times as empty columns are needed, % ie, @tab@tab@tab will produce two empty columns. % @item, @tab do not need to be on their own lines, but it will not hurt % if they are. % Sample multitable: % @multitable {Column 1 template} {Column 2 template} {Column 3 template} % @item first col stuff @tab second col stuff @tab third col % @item % first col stuff % @tab % second col stuff % @tab % third col % @item first col stuff @tab second col stuff % @tab Many paragraphs of text may be used in any column. % % They will wrap at the width determined by the template. % @item@tab@tab This will be in third column. % @end multitable % Default dimensions may be reset by user. % @multitableparskip is vertical space between paragraphs in table. % @multitableparindent is paragraph indent in table. % @multitablecolmargin is horizontal space to be left between columns. % @multitablelinespace is space to leave between table items, baseline % to baseline. % 0pt means it depends on current normal line spacing. % \newskip\multitableparskip \newskip\multitableparindent \newdimen\multitablecolspace \newskip\multitablelinespace \multitableparskip=0pt \multitableparindent=6pt \multitablecolspace=12pt \multitablelinespace=0pt % Macros used to set up halign preamble: % \let\endsetuptable\relax \def\xendsetuptable{\endsetuptable} \let\columnfractions\relax \def\xcolumnfractions{\columnfractions} \newif\ifsetpercent % #1 is the @columnfraction, usually a decimal number like .5, but might % be just 1. We just use it, whatever it is. % \def\pickupwholefraction#1 {% \global\advance\colcount by 1 \expandafter\xdef\csname col\the\colcount\endcsname{#1\hsize}% \setuptable } \newcount\colcount \def\setuptable#1{% \def\firstarg{#1}% \ifx\firstarg\xendsetuptable \let\go = \relax \else \ifx\firstarg\xcolumnfractions \global\setpercenttrue \else \ifsetpercent \let\go\pickupwholefraction \else \global\advance\colcount by 1 \setbox0=\hbox{#1\unskip\space}% Add a normal word space as a % separator; typically that is always in the input, anyway. \expandafter\xdef\csname col\the\colcount\endcsname{\the\wd0}% \fi \fi \ifx\go\pickupwholefraction % Put the argument back for the \pickupwholefraction call, so % we'll always have a period there to be parsed. \def\go{\pickupwholefraction#1}% \else \let\go = \setuptable \fi% \fi \go } % multitable-only commands. % % @headitem starts a heading row, which we typeset in bold. % Assignments have to be global since we are inside the implicit group % of an alignment entry. \everycr resets \everytab so we don't have to % undo it ourselves. \def\headitemfont{\b}% for people to use in the template row; not changeable \def\headitem{% \checkenv\multitable \crcr \global\everytab={\bf}% can't use \headitemfont since the parsing differs \the\everytab % for the first item }% % % A \tab used to include \hskip1sp. But then the space in a template % line is not enough. That is bad. So let's go back to just `&' until % we again encounter the problem the 1sp was intended to solve. % --karl, nathan@acm.org, 20apr99. \def\tab{\checkenv\multitable &\the\everytab}% % @multitable ... @end multitable definitions: % \newtoks\everytab % insert after every tab. % \envdef\multitable{% \vskip\parskip \startsavinginserts % % @item within a multitable starts a normal row. % We use \def instead of \let so that if one of the multitable entries % contains an @itemize, we don't choke on the \item (seen as \crcr aka % \endtemplate) expanding \doitemize. \def\item{\crcr}% % \tolerance=9500 \hbadness=9500 \setmultitablespacing \parskip=\multitableparskip \parindent=\multitableparindent \overfullrule=0pt \global\colcount=0 % \everycr = {% \noalign{% \global\everytab={}% \global\colcount=0 % Reset the column counter. % Check for saved footnotes, etc. \checkinserts % Keeps underfull box messages off when table breaks over pages. %\filbreak % Maybe so, but it also creates really weird page breaks when the % table breaks over pages. Wouldn't \vfil be better? Wait until the % problem manifests itself, so it can be fixed for real --karl. }% }% % \parsearg\domultitable } \def\domultitable#1{% % To parse everything between @multitable and @item: \setuptable#1 \endsetuptable % % This preamble sets up a generic column definition, which will % be used as many times as user calls for columns. % \vtop will set a single line and will also let text wrap and % continue for many paragraphs if desired. \halign\bgroup &% \global\advance\colcount by 1 \multistrut \vtop{% % Use the current \colcount to find the correct column width: \hsize=\expandafter\csname col\the\colcount\endcsname % % In order to keep entries from bumping into each other % we will add a \leftskip of \multitablecolspace to all columns after % the first one. % % If a template has been used, we will add \multitablecolspace % to the width of each template entry. % % If the user has set preamble in terms of percent of \hsize we will % use that dimension as the width of the column, and the \leftskip % will keep entries from bumping into each other. Table will start at % left margin and final column will justify at right margin. % % Make sure we don't inherit \rightskip from the outer environment. \rightskip=0pt \ifnum\colcount=1 % The first column will be indented with the surrounding text. \advance\hsize by\leftskip \else \ifsetpercent \else % If user has not set preamble in terms of percent of \hsize % we will advance \hsize by \multitablecolspace. \advance\hsize by \multitablecolspace \fi % In either case we will make \leftskip=\multitablecolspace: \leftskip=\multitablecolspace \fi % Ignoring space at the beginning and end avoids an occasional spurious % blank line, when TeX decides to break the line at the space before the % box from the multistrut, so the strut ends up on a line by itself. % For example: % @multitable @columnfractions .11 .89 % @item @code{#} % @tab Legal holiday which is valid in major parts of the whole country. % Is automatically provided with highlighting sequences respectively % marking characters. \noindent\ignorespaces##\unskip\multistrut }\cr } \def\Emultitable{% \crcr \egroup % end the \halign \global\setpercentfalse } \def\setmultitablespacing{% \def\multistrut{\strut}% just use the standard line spacing % % Compute \multitablelinespace (if not defined by user) for use in % \multitableparskip calculation. We used define \multistrut based on % this, but (ironically) that caused the spacing to be off. % See bug-texinfo report from Werner Lemberg, 31 Oct 2004 12:52:20 +0100. \ifdim\multitablelinespace=0pt \setbox0=\vbox{X}\global\multitablelinespace=\the\baselineskip \global\advance\multitablelinespace by-\ht0 \fi %% Test to see if parskip is larger than space between lines of %% table. If not, do nothing. %% If so, set to same dimension as multitablelinespace. \ifdim\multitableparskip>\multitablelinespace \global\multitableparskip=\multitablelinespace \global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller %% than skip between lines in the table. \fi% \ifdim\multitableparskip=0pt \global\multitableparskip=\multitablelinespace \global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller %% than skip between lines in the table. \fi} \message{conditionals,} % @iftex, @ifnotdocbook, @ifnothtml, @ifnotinfo, @ifnotplaintext, % @ifnotxml always succeed. They currently do nothing; we don't % attempt to check whether the conditionals are properly nested. But we % have to remember that they are conditionals, so that @end doesn't % attempt to close an environment group. % \def\makecond#1{% \expandafter\let\csname #1\endcsname = \relax \expandafter\let\csname iscond.#1\endcsname = 1 } \makecond{iftex} \makecond{ifnotdocbook} \makecond{ifnothtml} \makecond{ifnotinfo} \makecond{ifnotplaintext} \makecond{ifnotxml} % Ignore @ignore, @ifhtml, @ifinfo, and the like. % \def\direntry{\doignore{direntry}} \def\documentdescription{\doignore{documentdescription}} \def\docbook{\doignore{docbook}} \def\html{\doignore{html}} \def\ifdocbook{\doignore{ifdocbook}} \def\ifhtml{\doignore{ifhtml}} \def\ifinfo{\doignore{ifinfo}} \def\ifnottex{\doignore{ifnottex}} \def\ifplaintext{\doignore{ifplaintext}} \def\ifxml{\doignore{ifxml}} \def\ignore{\doignore{ignore}} \def\menu{\doignore{menu}} \def\xml{\doignore{xml}} % Ignore text until a line `@end #1', keeping track of nested conditionals. % % A count to remember the depth of nesting. \newcount\doignorecount \def\doignore#1{\begingroup % Scan in ``verbatim'' mode: \obeylines \catcode`\@ = \other \catcode`\{ = \other \catcode`\} = \other % % Make sure that spaces turn into tokens that match what \doignoretext wants. \spaceisspace % % Count number of #1's that we've seen. \doignorecount = 0 % % Swallow text until we reach the matching `@end #1'. \dodoignore{#1}% } { \catcode`_=11 % We want to use \_STOP_ which cannot appear in texinfo source. \obeylines % % \gdef\dodoignore#1{% % #1 contains the command name as a string, e.g., `ifinfo'. % % Define a command to find the next `@end #1'. \long\def\doignoretext##1^^M@end #1{% \doignoretextyyy##1^^M@#1\_STOP_}% % % And this command to find another #1 command, at the beginning of a % line. (Otherwise, we would consider a line `@c @ifset', for % example, to count as an @ifset for nesting.) \long\def\doignoretextyyy##1^^M@#1##2\_STOP_{\doignoreyyy{##2}\_STOP_}% % % And now expand that command. \doignoretext ^^M% }% } \def\doignoreyyy#1{% \def\temp{#1}% \ifx\temp\empty % Nothing found. \let\next\doignoretextzzz \else % Found a nested condition, ... \advance\doignorecount by 1 \let\next\doignoretextyyy % ..., look for another. % If we're here, #1 ends with ^^M\ifinfo (for example). \fi \next #1% the token \_STOP_ is present just after this macro. } % We have to swallow the remaining "\_STOP_". % \def\doignoretextzzz#1{% \ifnum\doignorecount = 0 % We have just found the outermost @end. \let\next\enddoignore \else % Still inside a nested condition. \advance\doignorecount by -1 \let\next\doignoretext % Look for the next @end. \fi \next } % Finish off ignored text. { \obeylines% % Ignore anything after the last `@end #1'; this matters in verbatim % environments, where otherwise the newline after an ignored conditional % would result in a blank line in the output. \gdef\enddoignore#1^^M{\endgroup\ignorespaces}% } % @set VAR sets the variable VAR to an empty value. % @set VAR REST-OF-LINE sets VAR to the value REST-OF-LINE. % % Since we want to separate VAR from REST-OF-LINE (which might be % empty), we can't just use \parsearg; we have to insert a space of our % own to delimit the rest of the line, and then take it out again if we % didn't need it. % We rely on the fact that \parsearg sets \catcode`\ =10. % \parseargdef\set{\setyyy#1 \endsetyyy} \def\setyyy#1 #2\endsetyyy{% {% \makevalueexpandable \def\temp{#2}% \edef\next{\gdef\makecsname{SET#1}}% \ifx\temp\empty \next{}% \else \setzzz#2\endsetzzz \fi }% } % Remove the trailing space \setxxx inserted. \def\setzzz#1 \endsetzzz{\next{#1}} % @clear VAR clears (i.e., unsets) the variable VAR. % \parseargdef\clear{% {% \makevalueexpandable \global\expandafter\let\csname SET#1\endcsname=\relax }% } % @value{foo} gets the text saved in variable foo. \def\value{\begingroup\makevalueexpandable\valuexxx} \def\valuexxx#1{\expandablevalue{#1}\endgroup} { \catcode`\- = \active \catcode`\_ = \active % \gdef\makevalueexpandable{% \let\value = \expandablevalue % We don't want these characters active, ... \catcode`\-=\other \catcode`\_=\other % ..., but we might end up with active ones in the argument if % we're called from @code, as @code{@value{foo-bar_}}, though. % So \let them to their normal equivalents. \let-\realdash \let_\normalunderscore } } % We have this subroutine so that we can handle at least some @value's % properly in indexes (we call \makevalueexpandable in \indexdummies). % The command has to be fully expandable (if the variable is set), since % the result winds up in the index file. This means that if the % variable's value contains other Texinfo commands, it's almost certain % it will fail (although perhaps we could fix that with sufficient work % to do a one-level expansion on the result, instead of complete). % \def\expandablevalue#1{% \expandafter\ifx\csname SET#1\endcsname\relax {[No value for ``#1'']}% \message{Variable `#1', used in @value, is not set.}% \else \csname SET#1\endcsname \fi } % @ifset VAR ... @end ifset reads the `...' iff VAR has been defined % with @set. % % To get special treatment of `@end ifset,' call \makeond and the redefine. % \makecond{ifset} \def\ifset{\parsearg{\doifset{\let\next=\ifsetfail}}} \def\doifset#1#2{% {% \makevalueexpandable \let\next=\empty \expandafter\ifx\csname SET#2\endcsname\relax #1% If not set, redefine \next. \fi \expandafter }\next } \def\ifsetfail{\doignore{ifset}} % @ifclear VAR ... @end ifclear reads the `...' iff VAR has never been % defined with @set, or has been undefined with @clear. % % The `\else' inside the `\doifset' parameter is a trick to reuse the % above code: if the variable is not set, do nothing, if it is set, % then redefine \next to \ifclearfail. % \makecond{ifclear} \def\ifclear{\parsearg{\doifset{\else \let\next=\ifclearfail}}} \def\ifclearfail{\doignore{ifclear}} % @dircategory CATEGORY -- specify a category of the dir file % which this file should belong to. Ignore this in TeX. \let\dircategory=\comment % @defininfoenclose. \let\definfoenclose=\comment \message{indexing,} % Index generation facilities % Define \newwrite to be identical to plain tex's \newwrite % except not \outer, so it can be used within macros and \if's. \edef\newwrite{\makecsname{ptexnewwrite}} % \newindex {foo} defines an index named foo. % It automatically defines \fooindex such that % \fooindex ...rest of line... puts an entry in the index foo. % It also defines \fooindfile to be the number of the output channel for % the file that accumulates this index. The file's extension is foo. % The name of an index should be no more than 2 characters long % for the sake of vms. % \def\newindex#1{% \iflinks \expandafter\newwrite \csname#1indfile\endcsname \openout \csname#1indfile\endcsname \jobname.#1 % Open the file \fi \expandafter\xdef\csname#1index\endcsname{% % Define @#1index \noexpand\doindex{#1}} } % @defindex foo == \newindex{foo} % \def\defindex{\parsearg\newindex} % Define @defcodeindex, like @defindex except put all entries in @code. % \def\defcodeindex{\parsearg\newcodeindex} % \def\newcodeindex#1{% \iflinks \expandafter\newwrite \csname#1indfile\endcsname \openout \csname#1indfile\endcsname \jobname.#1 \fi \expandafter\xdef\csname#1index\endcsname{% \noexpand\docodeindex{#1}}% } % @synindex foo bar makes index foo feed into index bar. % Do this instead of @defindex foo if you don't want it as a separate index. % % @syncodeindex foo bar similar, but put all entries made for index foo % inside @code. % \def\synindex#1 #2 {\dosynindex\doindex{#1}{#2}} \def\syncodeindex#1 #2 {\dosynindex\docodeindex{#1}{#2}} % #1 is \doindex or \docodeindex, #2 the index getting redefined (foo), % #3 the target index (bar). \def\dosynindex#1#2#3{% % Only do \closeout if we haven't already done it, else we'll end up % closing the target index. \expandafter \ifx\csname donesynindex#2\endcsname \relax % The \closeout helps reduce unnecessary open files; the limit on the % Acorn RISC OS is a mere 16 files. \expandafter\closeout\csname#2indfile\endcsname \expandafter\let\csname donesynindex#2\endcsname = 1 \fi % redefine \fooindfile: \expandafter\let\expandafter\temp\expandafter=\csname#3indfile\endcsname \expandafter\let\csname#2indfile\endcsname=\temp % redefine \fooindex: \expandafter\xdef\csname#2index\endcsname{\noexpand#1{#3}}% } % Define \doindex, the driver for all \fooindex macros. % Argument #1 is generated by the calling \fooindex macro, % and it is "foo", the name of the index. % \doindex just uses \parsearg; it calls \doind for the actual work. % This is because \doind is more useful to call from other macros. % There is also \dosubind {index}{topic}{subtopic} % which makes an entry in a two-level index such as the operation index. \def\doindex#1{\edef\indexname{#1}\parsearg\singleindexer} \def\singleindexer #1{\doind{\indexname}{#1}} % like the previous two, but they put @code around the argument. \def\docodeindex#1{\edef\indexname{#1}\parsearg\singlecodeindexer} \def\singlecodeindexer #1{\doind{\indexname}{\code{#1}}} % Take care of Texinfo commands that can appear in an index entry. % Since there are some commands we want to expand, and others we don't, % we have to laboriously prevent expansion for those that we don't. % \def\indexdummies{% \escapechar = `\\ % use backslash in output files. \def\@{@}% change to @@ when we switch to @ as escape char in index files. \def\ {\realbackslash\space }% % % Need these in case \tex is in effect and \{ is a \delimiter again. % But can't use \lbracecmd and \rbracecmd because texindex assumes % braces and backslashes are used only as delimiters. \let\{ = \mylbrace \let\} = \myrbrace % % I don't entirely understand this, but when an index entry is % generated from a macro call, the \endinput which \scanmacro inserts % causes processing to be prematurely terminated. This is, % apparently, because \indexsorttmp is fully expanded, and \endinput % is an expandable command. The redefinition below makes \endinput % disappear altogether for that purpose -- although logging shows that % processing continues to some further point. On the other hand, it % seems \endinput does not hurt in the printed index arg, since that % is still getting written without apparent harm. % % Sample source (mac-idx3.tex, reported by Graham Percival to % help-texinfo, 22may06): % @macro funindex {WORD} % @findex xyz % @end macro % ... % @funindex commtest % % The above is not enough to reproduce the bug, but it gives the flavor. % % Sample whatsit resulting: % .@write3{\entry{xyz}{@folio }{@code {xyz@endinput }}} % % So: \let\endinput = \empty % % Do the redefinitions. \commondummies } % For the aux and toc files, @ is the escape character. So we want to % redefine everything using @ as the escape character (instead of % \realbackslash, still used for index files). When everything uses @, % this will be simpler. % \def\atdummies{% \def\@{@@}% \def\ {@ }% \let\{ = \lbraceatcmd \let\} = \rbraceatcmd % % Do the redefinitions. \commondummies \otherbackslash } % Called from \indexdummies and \atdummies. % \def\commondummies{% % % \definedummyword defines \#1 as \string\#1\space, thus effectively % preventing its expansion. This is used only for control% words, % not control letters, because the \space would be incorrect for % control characters, but is needed to separate the control word % from whatever follows. % % For control letters, we have \definedummyletter, which omits the % space. % % These can be used both for control words that take an argument and % those that do not. If it is followed by {arg} in the input, then % that will dutifully get written to the index (or wherever). % \def\definedummyword ##1{\def##1{\string##1\space}}% \def\definedummyletter##1{\def##1{\string##1}}% \let\definedummyaccent\definedummyletter % \commondummiesnofonts % \definedummyletter\_% % % Non-English letters. \definedummyword\AA \definedummyword\AE \definedummyword\DH \definedummyword\L \definedummyword\O \definedummyword\OE \definedummyword\TH \definedummyword\aa \definedummyword\ae \definedummyword\dh \definedummyword\exclamdown \definedummyword\l \definedummyword\o \definedummyword\oe \definedummyword\ordf \definedummyword\ordm \definedummyword\questiondown \definedummyword\ss \definedummyword\th % % Although these internal commands shouldn't show up, sometimes they do. \definedummyword\bf \definedummyword\gtr \definedummyword\hat \definedummyword\less \definedummyword\sf \definedummyword\sl \definedummyword\tclose \definedummyword\tt % \definedummyword\LaTeX \definedummyword\TeX % % Assorted special characters. \definedummyword\bullet \definedummyword\comma \definedummyword\copyright \definedummyword\registeredsymbol \definedummyword\dots \definedummyword\enddots \definedummyword\equiv \definedummyword\error \definedummyword\euro \definedummyword\guillemetleft \definedummyword\guillemetright \definedummyword\guilsinglleft \definedummyword\guilsinglright \definedummyword\expansion \definedummyword\minus \definedummyword\ogonek \definedummyword\pounds \definedummyword\point \definedummyword\print \definedummyword\quotedblbase \definedummyword\quotedblleft \definedummyword\quotedblright \definedummyword\quoteleft \definedummyword\quoteright \definedummyword\quotesinglbase \definedummyword\result \definedummyword\textdegree % % We want to disable all macros so that they are not expanded by \write. \macrolist % \normalturnoffactive % % Handle some cases of @value -- where it does not contain any % (non-fully-expandable) commands. \makevalueexpandable } % \commondummiesnofonts: common to \commondummies and \indexnofonts. % \def\commondummiesnofonts{% % Control letters and accents. \definedummyletter\!% \definedummyaccent\"% \definedummyaccent\'% \definedummyletter\*% \definedummyaccent\,% \definedummyletter\.% \definedummyletter\/% \definedummyletter\:% \definedummyaccent\=% \definedummyletter\?% \definedummyaccent\^% \definedummyaccent\`% \definedummyaccent\~% \definedummyword\u \definedummyword\v \definedummyword\H \definedummyword\dotaccent \definedummyword\ogonek \definedummyword\ringaccent \definedummyword\tieaccent \definedummyword\ubaraccent \definedummyword\udotaccent \definedummyword\dotless % % Texinfo font commands. \definedummyword\b \definedummyword\i \definedummyword\r \definedummyword\sc \definedummyword\t % % Commands that take arguments. \definedummyword\acronym \definedummyword\cite \definedummyword\code \definedummyword\command \definedummyword\dfn \definedummyword\emph \definedummyword\env \definedummyword\file \definedummyword\kbd \definedummyword\key \definedummyword\math \definedummyword\option \definedummyword\pxref \definedummyword\ref \definedummyword\samp \definedummyword\strong \definedummyword\tie \definedummyword\uref \definedummyword\url \definedummyword\var \definedummyword\verb \definedummyword\w \definedummyword\xref } % \indexnofonts is used when outputting the strings to sort the index % by, and when constructing control sequence names. It eliminates all % control sequences and just writes whatever the best ASCII sort string % would be for a given command (usually its argument). % \def\indexnofonts{% % Accent commands should become @asis. \def\definedummyaccent##1{\let##1\asis}% % We can just ignore other control letters. \def\definedummyletter##1{\let##1\empty}% % Hopefully, all control words can become @asis. \let\definedummyword\definedummyaccent % \commondummiesnofonts % % Don't no-op \tt, since it isn't a user-level command % and is used in the definitions of the active chars like <, >, |, etc. % Likewise with the other plain tex font commands. %\let\tt=\asis % \def\ { }% \def\@{@}% % how to handle braces? \def\_{\normalunderscore}% % % Non-English letters. \def\AA{AA}% \def\AE{AE}% \def\DH{DZZ}% \def\L{L}% \def\OE{OE}% \def\O{O}% \def\TH{ZZZ}% \def\aa{aa}% \def\ae{ae}% \def\dh{dzz}% \def\exclamdown{!}% \def\l{l}% \def\oe{oe}% \def\ordf{a}% \def\ordm{o}% \def\o{o}% \def\questiondown{?}% \def\ss{ss}% \def\th{zzz}% % \def\LaTeX{LaTeX}% \def\TeX{TeX}% % % Assorted special characters. % (The following {} will end up in the sort string, but that's ok.) \def\bullet{bullet}% \def\comma{,}% \def\copyright{copyright}% \def\dots{...}% \def\enddots{...}% \def\equiv{==}% \def\error{error}% \def\euro{euro}% \def\expansion{==>}% \def\guillemetleft{<<}% \def\guillemetright{>>}% \def\guilsinglleft{<}% \def\guilsinglright{>}% \def\minus{-}% \def\point{.}% \def\pounds{pounds}% \def\print{-|}% \def\quotedblbase{"}% \def\quotedblleft{"}% \def\quotedblright{"}% \def\quoteleft{`}% \def\quoteright{'}% \def\quotesinglbase{,}% \def\registeredsymbol{R}% \def\result{=>}% \def\textdegree{o}% % % We need to get rid of all macros, leaving only the arguments (if present). % Of course this is not nearly correct, but it is the best we can do for now. % makeinfo does not expand macros in the argument to @deffn, which ends up % writing an index entry, and texindex isn't prepared for an index sort entry % that starts with \. % % Since macro invocations are followed by braces, we can just redefine them % to take a single TeX argument. The case of a macro invocation that % goes to end-of-line is not handled. % \macrolist } \let\indexbackslash=0 %overridden during \printindex. \let\SETmarginindex=\relax % put index entries in margin (undocumented)? % Most index entries go through here, but \dosubind is the general case. % #1 is the index name, #2 is the entry text. \def\doind#1#2{\dosubind{#1}{#2}{}} % Workhorse for all \fooindexes. % #1 is name of index, #2 is stuff to put there, #3 is subentry -- % empty if called from \doind, as we usually are (the main exception % is with most defuns, which call us directly). % \def\dosubind#1#2#3{% \iflinks {% % Store the main index entry text (including the third arg). \toks0 = {#2}% % If third arg is present, precede it with a space. \def\thirdarg{#3}% \ifx\thirdarg\empty \else \toks0 = \expandafter{\the\toks0 \space #3}% \fi % \edef\writeto{\csname#1indfile\endcsname}% % \safewhatsit\dosubindwrite }% \fi } % Write the entry in \toks0 to the index file: % \def\dosubindwrite{% % Put the index entry in the margin if desired. \ifx\SETmarginindex\relax\else \insert\margin{\hbox{\vrule height8pt depth3pt width0pt \the\toks0}}% \fi % % Remember, we are within a group. \indexdummies % Must do this here, since \bf, etc expand at this stage \def\backslashcurfont{\indexbackslash}% \indexbackslash isn't defined now % so it will be output as is; and it will print as backslash. % % Process the index entry with all font commands turned off, to % get the string to sort by. {\indexnofonts \edef\temp{\the\toks0}% need full expansion \xdef\indexsorttmp{\temp}% }% % % Set up the complete index entry, with both the sort key and % the original text, including any font commands. We write % three arguments to \entry to the .?? file (four in the % subentry case), texindex reduces to two when writing the .??s % sorted result. \edef\temp{% \write\writeto{% \string\entry{\indexsorttmp}{\noexpand\folio}{\the\toks0}}% }% \temp } % Take care of unwanted page breaks/skips around a whatsit: % % If a skip is the last thing on the list now, preserve it % by backing up by \lastskip, doing the \write, then inserting % the skip again. Otherwise, the whatsit generated by the % \write or \pdfdest will make \lastskip zero. The result is that % sequences like this: % @end defun % @tindex whatever % @defun ... % will have extra space inserted, because the \medbreak in the % start of the @defun won't see the skip inserted by the @end of % the previous defun. % % But don't do any of this if we're not in vertical mode. We % don't want to do a \vskip and prematurely end a paragraph. % % Avoid page breaks due to these extra skips, too. % % But wait, there is a catch there: % We'll have to check whether \lastskip is zero skip. \ifdim is not % sufficient for this purpose, as it ignores stretch and shrink parts % of the skip. The only way seems to be to check the textual % representation of the skip. % % The following is almost like \def\zeroskipmacro{0.0pt} except that % the ``p'' and ``t'' characters have catcode \other, not 11 (letter). % \edef\zeroskipmacro{\expandafter\the\csname z@skip\endcsname} % \newskip\whatsitskip \newcount\whatsitpenalty % % ..., ready, GO: % \def\safewhatsit#1{% \ifhmode #1% \else % \lastskip and \lastpenalty cannot both be nonzero simultaneously. \whatsitskip = \lastskip \edef\lastskipmacro{\the\lastskip}% \whatsitpenalty = \lastpenalty % % If \lastskip is nonzero, that means the last item was a % skip. And since a skip is discardable, that means this % -\whatsitskip glue we're inserting is preceded by a % non-discardable item, therefore it is not a potential % breakpoint, therefore no \nobreak needed. \ifx\lastskipmacro\zeroskipmacro \else \vskip-\whatsitskip \fi % #1% % \ifx\lastskipmacro\zeroskipmacro % If \lastskip was zero, perhaps the last item was a penalty, and % perhaps it was >=10000, e.g., a \nobreak. In that case, we want % to re-insert the same penalty (values >10000 are used for various % signals); since we just inserted a non-discardable item, any % following glue (such as a \parskip) would be a breakpoint. For example: % % @deffn deffn-whatever % @vindex index-whatever % Description. % would allow a break between the index-whatever whatsit % and the "Description." paragraph. \ifnum\whatsitpenalty>9999 \penalty\whatsitpenalty \fi \else % On the other hand, if we had a nonzero \lastskip, % this make-up glue would be preceded by a non-discardable item % (the whatsit from the \write), so we must insert a \nobreak. \nobreak\vskip\whatsitskip \fi \fi } % The index entry written in the file actually looks like % \entry {sortstring}{page}{topic} % or % \entry {sortstring}{page}{topic}{subtopic} % The texindex program reads in these files and writes files % containing these kinds of lines: % \initial {c} % before the first topic whose initial is c % \entry {topic}{pagelist} % for a topic that is used without subtopics % \primary {topic} % for the beginning of a topic that is used with subtopics % \secondary {subtopic}{pagelist} % for each subtopic. % Define the user-accessible indexing commands % @findex, @vindex, @kindex, @cindex. \def\findex {\fnindex} \def\kindex {\kyindex} \def\cindex {\cpindex} \def\vindex {\vrindex} \def\tindex {\tpindex} \def\pindex {\pgindex} \def\cindexsub {\begingroup\obeylines\cindexsub} {\obeylines % \gdef\cindexsub "#1" #2^^M{\endgroup % \dosubind{cp}{#2}{#1}}} % Define the macros used in formatting output of the sorted index material. % @printindex causes a particular index (the ??s file) to get printed. % It does not print any chapter heading (usually an @unnumbered). % \parseargdef\printindex{\begingroup \dobreak \chapheadingskip{10000}% % \smallfonts \rm \tolerance = 9500 \plainfrenchspacing \everypar = {}% don't want the \kern\-parindent from indentation suppression. % % See if the index file exists and is nonempty. % Change catcode of @ here so that if the index file contains % \initial {@} % as its first line, TeX doesn't complain about mismatched braces % (because it thinks @} is a control sequence). \catcode`\@ = 11 \openin 1 \jobname.#1s \ifeof 1 % \enddoublecolumns gets confused if there is no text in the index, % and it loses the chapter title and the aux file entries for the % index. The easiest way to prevent this problem is to make sure % there is some text. \putwordIndexNonexistent \else % % If the index file exists but is empty, then \openin leaves \ifeof % false. We have to make TeX try to read something from the file, so % it can discover if there is anything in it. \read 1 to \temp \ifeof 1 \putwordIndexIsEmpty \else % Index files are almost Texinfo source, but we use \ as the escape % character. It would be better to use @, but that's too big a change % to make right now. \def\indexbackslash{\backslashcurfont}% \catcode`\\ = 0 \escapechar = `\\ \begindoublecolumns \input \jobname.#1s \enddoublecolumns \fi \fi \closein 1 \endgroup} % These macros are used by the sorted index file itself. % Change them to control the appearance of the index. \def\initial#1{{% % Some minor font changes for the special characters. \let\tentt=\sectt \let\tt=\sectt \let\sf=\sectt % % Remove any glue we may have, we'll be inserting our own. \removelastskip % % We like breaks before the index initials, so insert a bonus. \nobreak \vskip 0pt plus 3\baselineskip \penalty 0 \vskip 0pt plus -3\baselineskip % % Typeset the initial. Making this add up to a whole number of % baselineskips increases the chance of the dots lining up from column % to column. It still won't often be perfect, because of the stretch % we need before each entry, but it's better. % % No shrink because it confuses \balancecolumns. \vskip 1.67\baselineskip plus .5\baselineskip \leftline{\secbf #1}% % Do our best not to break after the initial. \nobreak \vskip .33\baselineskip plus .1\baselineskip }} % \entry typesets a paragraph consisting of the text (#1), dot leaders, and % then page number (#2) flushed to the right margin. It is used for index % and table of contents entries. The paragraph is indented by \leftskip. % % A straightforward implementation would start like this: % \def\entry#1#2{... % But this freezes the catcodes in the argument, and can cause problems to % @code, which sets - active. This problem was fixed by a kludge--- % ``-'' was active throughout whole index, but this isn't really right. % % The right solution is to prevent \entry from swallowing the whole text. % --kasal, 21nov03 \def\entry{% \begingroup % % Start a new paragraph if necessary, so our assignments below can't % affect previous text. \par % % Do not fill out the last line with white space. \parfillskip = 0in % % No extra space above this paragraph. \parskip = 0in % % Do not prefer a separate line ending with a hyphen to fewer lines. \finalhyphendemerits = 0 % % \hangindent is only relevant when the entry text and page number % don't both fit on one line. In that case, bob suggests starting the % dots pretty far over on the line. Unfortunately, a large % indentation looks wrong when the entry text itself is broken across % lines. So we use a small indentation and put up with long leaders. % % \hangafter is reset to 1 (which is the value we want) at the start % of each paragraph, so we need not do anything with that. \hangindent = 2em % % When the entry text needs to be broken, just fill out the first line % with blank space. \rightskip = 0pt plus1fil % % A bit of stretch before each entry for the benefit of balancing % columns. \vskip 0pt plus1pt % % Swallow the left brace of the text (first parameter): \afterassignment\doentry \let\temp = } \def\doentry{% \bgroup % Instead of the swallowed brace. \noindent \aftergroup\finishentry % And now comes the text of the entry. } \def\finishentry#1{% % #1 is the page number. % % The following is kludged to not output a line of dots in the index if % there are no page numbers. The next person who breaks this will be % cursed by a Unix daemon. \setbox\boxA = \hbox{#1}% \ifdim\wd\boxA = 0pt \ % \else % % If we must, put the page number on a line of its own, and fill out % this line with blank space. (The \hfil is overwhelmed with the % fill leaders glue in \indexdotfill if the page number does fit.) \hfil\penalty50 \null\nobreak\indexdotfill % Have leaders before the page number. % % The `\ ' here is removed by the implicit \unskip that TeX does as % part of (the primitive) \par. Without it, a spurious underfull % \hbox ensues. \ifpdf \pdfgettoks#1.% \ \the\toksA \else \ #1% \fi \fi \par \endgroup } % Like plain.tex's \dotfill, except uses up at least 1 em. \def\indexdotfill{\cleaders \hbox{$\mathsurround=0pt \mkern1.5mu.\mkern1.5mu$}\hskip 1em plus 1fill} \def\primary #1{\line{#1\hfil}} \newskip\secondaryindent \secondaryindent=0.5cm \def\secondary#1#2{{% \parfillskip=0in \parskip=0in \hangindent=1in \hangafter=1 \noindent\hskip\secondaryindent\hbox{#1}\indexdotfill \ifpdf \pdfgettoks#2.\ \the\toksA % The page number ends the paragraph. \else #2 \fi \par }} % Define two-column mode, which we use to typeset indexes. % Adapted from the TeXbook, page 416, which is to say, % the manmac.tex format used to print the TeXbook itself. \catcode`\@=11 \newbox\partialpage \newdimen\doublecolumnhsize \def\begindoublecolumns{\begingroup % ended by \enddoublecolumns % Grab any single-column material above us. \output = {% % % Here is a possibility not foreseen in manmac: if we accumulate a % whole lot of material, we might end up calling this \output % routine twice in a row (see the doublecol-lose test, which is % essentially a couple of indexes with @setchapternewpage off). In % that case we just ship out what is in \partialpage with the normal % output routine. Generally, \partialpage will be empty when this % runs and this will be a no-op. See the indexspread.tex test case. \ifvoid\partialpage \else \onepageout{\pagecontents\partialpage}% \fi % \global\setbox\partialpage = \vbox{% % Unvbox the main output page. \unvbox\PAGE \kern-\topskip \kern\baselineskip }% }% \eject % run that output routine to set \partialpage % % Use the double-column output routine for subsequent pages. \output = {\doublecolumnout}% % % Change the page size parameters. We could do this once outside this % routine, in each of @smallbook, @afourpaper, and the default 8.5x11 % format, but then we repeat the same computation. Repeating a couple % of assignments once per index is clearly meaningless for the % execution time, so we may as well do it in one place. % % First we halve the line length, less a little for the gutter between % the columns. We compute the gutter based on the line length, so it % changes automatically with the paper format. The magic constant % below is chosen so that the gutter has the same value (well, +-<1pt) % as it did when we hard-coded it. % % We put the result in a separate register, \doublecolumhsize, so we % can restore it in \pagesofar, after \hsize itself has (potentially) % been clobbered. % \doublecolumnhsize = \hsize \advance\doublecolumnhsize by -.04154\hsize \divide\doublecolumnhsize by 2 \hsize = \doublecolumnhsize % % Double the \vsize as well. (We don't need a separate register here, % since nobody clobbers \vsize.) \vsize = 2\vsize } % The double-column output routine for all double-column pages except % the last. % \def\doublecolumnout{% \splittopskip=\topskip \splitmaxdepth=\maxdepth % Get the available space for the double columns -- the normal % (undoubled) page height minus any material left over from the % previous page. \dimen@ = \vsize \divide\dimen@ by 2 \advance\dimen@ by -\ht\partialpage % % box0 will be the left-hand column, box2 the right. \setbox0=\vsplit255 to\dimen@ \setbox2=\vsplit255 to\dimen@ \onepageout\pagesofar \unvbox255 \penalty\outputpenalty } % % Re-output the contents of the output page -- any previous material, % followed by the two boxes we just split, in box0 and box2. \def\pagesofar{% \unvbox\partialpage % \hsize = \doublecolumnhsize \wd0=\hsize \wd2=\hsize \hbox to\pagewidth{\box0\hfil\box2}% } % % All done with double columns. \def\enddoublecolumns{% % The following penalty ensures that the page builder is exercised % _before_ we change the output routine. This is necessary in the % following situation: % % The last section of the index consists only of a single entry. % Before this section, \pagetotal is less than \pagegoal, so no % break occurs before the last section starts. However, the last % section, consisting of \initial and the single \entry, does not % fit on the page and has to be broken off. Without the following % penalty the page builder will not be exercised until \eject % below, and by that time we'll already have changed the output % routine to the \balancecolumns version, so the next-to-last % double-column page will be processed with \balancecolumns, which % is wrong: The two columns will go to the main vertical list, with % the broken-off section in the recent contributions. As soon as % the output routine finishes, TeX starts reconsidering the page % break. The two columns and the broken-off section both fit on the % page, because the two columns now take up only half of the page % goal. When TeX sees \eject from below which follows the final % section, it invokes the new output routine that we've set after % \balancecolumns below; \onepageout will try to fit the two columns % and the final section into the vbox of \pageheight (see % \pagebody), causing an overfull box. % % Note that glue won't work here, because glue does not exercise the % page builder, unlike penalties (see The TeXbook, pp. 280-281). \penalty0 % \output = {% % Split the last of the double-column material. Leave it on the % current page, no automatic page break. \balancecolumns % % If we end up splitting too much material for the current page, % though, there will be another page break right after this \output % invocation ends. Having called \balancecolumns once, we do not % want to call it again. Therefore, reset \output to its normal % definition right away. (We hope \balancecolumns will never be % called on to balance too much material, but if it is, this makes % the output somewhat more palatable.) \global\output = {\onepageout{\pagecontents\PAGE}}% }% \eject \endgroup % started in \begindoublecolumns % % \pagegoal was set to the doubled \vsize above, since we restarted % the current page. We're now back to normal single-column % typesetting, so reset \pagegoal to the normal \vsize (after the % \endgroup where \vsize got restored). \pagegoal = \vsize } % % Called at the end of the double column material. \def\balancecolumns{% \setbox0 = \vbox{\unvbox255}% like \box255 but more efficient, see p.120. \dimen@ = \ht0 \advance\dimen@ by \topskip \advance\dimen@ by-\baselineskip \divide\dimen@ by 2 % target to split to %debug\message{final 2-column material height=\the\ht0, target=\the\dimen@.}% \splittopskip = \topskip % Loop until we get a decent breakpoint. {% \vbadness = 10000 \loop \global\setbox3 = \copy0 \global\setbox1 = \vsplit3 to \dimen@ \ifdim\ht3>\dimen@ \global\advance\dimen@ by 1pt \repeat }% %debug\message{split to \the\dimen@, column heights: \the\ht1, \the\ht3.}% \setbox0=\vbox to\dimen@{\unvbox1}% \setbox2=\vbox to\dimen@{\unvbox3}% % \pagesofar } \catcode`\@ = \other \message{sectioning,} % Chapters, sections, etc. % \unnumberedno is an oxymoron, of course. But we count the unnumbered % sections so that we can refer to them unambiguously in the pdf % outlines by their "section number". We avoid collisions with chapter % numbers by starting them at 10000. (If a document ever has 10000 % chapters, we're in trouble anyway, I'm sure.) \newcount\unnumberedno \unnumberedno = 10000 \newcount\chapno \newcount\secno \secno=0 \newcount\subsecno \subsecno=0 \newcount\subsubsecno \subsubsecno=0 % This counter is funny since it counts through charcodes of letters A, B, ... \newcount\appendixno \appendixno = `\@ % % \def\appendixletter{\char\the\appendixno} % We do the following ugly conditional instead of the above simple % construct for the sake of pdftex, which needs the actual % letter in the expansion, not just typeset. % \def\appendixletter{% \ifnum\appendixno=`A A% \else\ifnum\appendixno=`B B% \else\ifnum\appendixno=`C C% \else\ifnum\appendixno=`D D% \else\ifnum\appendixno=`E E% \else\ifnum\appendixno=`F F% \else\ifnum\appendixno=`G G% \else\ifnum\appendixno=`H H% \else\ifnum\appendixno=`I I% \else\ifnum\appendixno=`J J% \else\ifnum\appendixno=`K K% \else\ifnum\appendixno=`L L% \else\ifnum\appendixno=`M M% \else\ifnum\appendixno=`N N% \else\ifnum\appendixno=`O O% \else\ifnum\appendixno=`P P% \else\ifnum\appendixno=`Q Q% \else\ifnum\appendixno=`R R% \else\ifnum\appendixno=`S S% \else\ifnum\appendixno=`T T% \else\ifnum\appendixno=`U U% \else\ifnum\appendixno=`V V% \else\ifnum\appendixno=`W W% \else\ifnum\appendixno=`X X% \else\ifnum\appendixno=`Y Y% \else\ifnum\appendixno=`Z Z% % The \the is necessary, despite appearances, because \appendixletter is % expanded while writing the .toc file. \char\appendixno is not % expandable, thus it is written literally, thus all appendixes come out % with the same letter (or @) in the toc without it. \else\char\the\appendixno \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi} % Each @chapter defines these (using marks) as the number+name, number % and name of the chapter. Page headings and footings can use % these. @section does likewise. \def\thischapter{} \def\thischapternum{} \def\thischaptername{} \def\thissection{} \def\thissectionnum{} \def\thissectionname{} \newcount\absseclevel % used to calculate proper heading level \newcount\secbase\secbase=0 % @raisesections/@lowersections modify this count % @raisesections: treat @section as chapter, @subsection as section, etc. \def\raisesections{\global\advance\secbase by -1} \let\up=\raisesections % original BFox name % @lowersections: treat @chapter as section, @section as subsection, etc. \def\lowersections{\global\advance\secbase by 1} \let\down=\lowersections % original BFox name % we only have subsub. \chardef\maxseclevel = 3 % % A numbered section within an unnumbered changes to unnumbered too. % To achive this, remember the "biggest" unnum. sec. we are currently in: \chardef\unmlevel = \maxseclevel % % Trace whether the current chapter is an appendix or not: % \chapheadtype is "N" or "A", unnumbered chapters are ignored. \def\chapheadtype{N} % Choose a heading macro % #1 is heading type % #2 is heading level % #3 is text for heading \def\genhead#1#2#3{% % Compute the abs. sec. level: \absseclevel=#2 \advance\absseclevel by \secbase % Make sure \absseclevel doesn't fall outside the range: \ifnum \absseclevel < 0 \absseclevel = 0 \else \ifnum \absseclevel > 3 \absseclevel = 3 \fi \fi % The heading type: \def\headtype{#1}% \if \headtype U% \ifnum \absseclevel < \unmlevel \chardef\unmlevel = \absseclevel \fi \else % Check for appendix sections: \ifnum \absseclevel = 0 \edef\chapheadtype{\headtype}% \else \if \headtype A\if \chapheadtype N% \errmessage{@appendix... within a non-appendix chapter}% \fi\fi \fi % Check for numbered within unnumbered: \ifnum \absseclevel > \unmlevel \def\headtype{U}% \else \chardef\unmlevel = 3 \fi \fi % Now print the heading: \if \headtype U% \ifcase\absseclevel \unnumberedzzz{#3}% \or \unnumberedseczzz{#3}% \or \unnumberedsubseczzz{#3}% \or \unnumberedsubsubseczzz{#3}% \fi \else \if \headtype A% \ifcase\absseclevel \appendixzzz{#3}% \or \appendixsectionzzz{#3}% \or \appendixsubseczzz{#3}% \or \appendixsubsubseczzz{#3}% \fi \else \ifcase\absseclevel \chapterzzz{#3}% \or \seczzz{#3}% \or \numberedsubseczzz{#3}% \or \numberedsubsubseczzz{#3}% \fi \fi \fi \suppressfirstparagraphindent } % an interface: \def\numhead{\genhead N} \def\apphead{\genhead A} \def\unnmhead{\genhead U} % @chapter, @appendix, @unnumbered. Increment top-level counter, reset % all lower-level sectioning counters to zero. % % Also set \chaplevelprefix, which we prepend to @float sequence numbers % (e.g., figures), q.v. By default (before any chapter), that is empty. \let\chaplevelprefix = \empty % \outer\parseargdef\chapter{\numhead0{#1}} % normally numhead0 calls chapterzzz \def\chapterzzz#1{% % section resetting is \global in case the chapter is in a group, such % as an @include file. \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 \global\advance\chapno by 1 % % Used for \float. \gdef\chaplevelprefix{\the\chapno.}% \resetallfloatnos % % \putwordChapter can contain complex things in translations. \toks0=\expandafter{\putwordChapter}% \message{\the\toks0 \space \the\chapno}% % % Write the actual heading. \chapmacro{#1}{Ynumbered}{\the\chapno}% % % So @section and the like are numbered underneath this chapter. \global\let\section = \numberedsec \global\let\subsection = \numberedsubsec \global\let\subsubsection = \numberedsubsubsec } \outer\parseargdef\appendix{\apphead0{#1}} % normally calls appendixzzz % \def\appendixzzz#1{% \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 \global\advance\appendixno by 1 \gdef\chaplevelprefix{\appendixletter.}% \resetallfloatnos % % \putwordAppendix can contain complex things in translations. \toks0=\expandafter{\putwordAppendix}% \message{\the\toks0 \space \appendixletter}% % \chapmacro{#1}{Yappendix}{\appendixletter}% % \global\let\section = \appendixsec \global\let\subsection = \appendixsubsec \global\let\subsubsection = \appendixsubsubsec } \outer\parseargdef\unnumbered{\unnmhead0{#1}} % normally unnmhead0 calls unnumberedzzz \def\unnumberedzzz#1{% \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 \global\advance\unnumberedno by 1 % % Since an unnumbered has no number, no prefix for figures. \global\let\chaplevelprefix = \empty \resetallfloatnos % % This used to be simply \message{#1}, but TeX fully expands the % argument to \message. Therefore, if #1 contained @-commands, TeX % expanded them. For example, in `@unnumbered The @cite{Book}', TeX % expanded @cite (which turns out to cause errors because \cite is meant % to be executed, not expanded). % % Anyway, we don't want the fully-expanded definition of @cite to appear % as a result of the \message, we just want `@cite' itself. We use % \the<toks register> to achieve this: TeX expands \the<toks> only once, % simply yielding the contents of <toks register>. (We also do this for % the toc entries.) \toks0 = {#1}% \message{(\the\toks0)}% % \chapmacro{#1}{Ynothing}{\the\unnumberedno}% % \global\let\section = \unnumberedsec \global\let\subsection = \unnumberedsubsec \global\let\subsubsection = \unnumberedsubsubsec } % @centerchap is like @unnumbered, but the heading is centered. \outer\parseargdef\centerchap{% % Well, we could do the following in a group, but that would break % an assumption that \chapmacro is called at the outermost level. % Thus we are safer this way: --kasal, 24feb04 \let\centerparametersmaybe = \centerparameters \unnmhead0{#1}% \let\centerparametersmaybe = \relax } % @top is like @unnumbered. \let\top\unnumbered % Sections. \outer\parseargdef\numberedsec{\numhead1{#1}} % normally calls seczzz \def\seczzz#1{% \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 \sectionheading{#1}{sec}{Ynumbered}{\the\chapno.\the\secno}% } \outer\parseargdef\appendixsection{\apphead1{#1}} % normally calls appendixsectionzzz \def\appendixsectionzzz#1{% \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 \sectionheading{#1}{sec}{Yappendix}{\appendixletter.\the\secno}% } \let\appendixsec\appendixsection \outer\parseargdef\unnumberedsec{\unnmhead1{#1}} % normally calls unnumberedseczzz \def\unnumberedseczzz#1{% \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 \sectionheading{#1}{sec}{Ynothing}{\the\unnumberedno.\the\secno}% } % Subsections. \outer\parseargdef\numberedsubsec{\numhead2{#1}} % normally calls numberedsubseczzz \def\numberedsubseczzz#1{% \global\subsubsecno=0 \global\advance\subsecno by 1 \sectionheading{#1}{subsec}{Ynumbered}{\the\chapno.\the\secno.\the\subsecno}% } \outer\parseargdef\appendixsubsec{\apphead2{#1}} % normally calls appendixsubseczzz \def\appendixsubseczzz#1{% \global\subsubsecno=0 \global\advance\subsecno by 1 \sectionheading{#1}{subsec}{Yappendix}% {\appendixletter.\the\secno.\the\subsecno}% } \outer\parseargdef\unnumberedsubsec{\unnmhead2{#1}} %normally calls unnumberedsubseczzz \def\unnumberedsubseczzz#1{% \global\subsubsecno=0 \global\advance\subsecno by 1 \sectionheading{#1}{subsec}{Ynothing}% {\the\unnumberedno.\the\secno.\the\subsecno}% } % Subsubsections. \outer\parseargdef\numberedsubsubsec{\numhead3{#1}} % normally numberedsubsubseczzz \def\numberedsubsubseczzz#1{% \global\advance\subsubsecno by 1 \sectionheading{#1}{subsubsec}{Ynumbered}% {\the\chapno.\the\secno.\the\subsecno.\the\subsubsecno}% } \outer\parseargdef\appendixsubsubsec{\apphead3{#1}} % normally appendixsubsubseczzz \def\appendixsubsubseczzz#1{% \global\advance\subsubsecno by 1 \sectionheading{#1}{subsubsec}{Yappendix}% {\appendixletter.\the\secno.\the\subsecno.\the\subsubsecno}% } \outer\parseargdef\unnumberedsubsubsec{\unnmhead3{#1}} %normally unnumberedsubsubseczzz \def\unnumberedsubsubseczzz#1{% \global\advance\subsubsecno by 1 \sectionheading{#1}{subsubsec}{Ynothing}% {\the\unnumberedno.\the\secno.\the\subsecno.\the\subsubsecno}% } % These macros control what the section commands do, according % to what kind of chapter we are in (ordinary, appendix, or unnumbered). % Define them by default for a numbered chapter. \let\section = \numberedsec \let\subsection = \numberedsubsec \let\subsubsection = \numberedsubsubsec % Define @majorheading, @heading and @subheading % NOTE on use of \vbox for chapter headings, section headings, and such: % 1) We use \vbox rather than the earlier \line to permit % overlong headings to fold. % 2) \hyphenpenalty is set to 10000 because hyphenation in a % heading is obnoxious; this forbids it. % 3) Likewise, headings look best if no \parindent is used, and % if justification is not attempted. Hence \raggedright. \def\majorheading{% {\advance\chapheadingskip by 10pt \chapbreak }% \parsearg\chapheadingzzz } \def\chapheading{\chapbreak \parsearg\chapheadingzzz} \def\chapheadingzzz#1{% {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 \parindent=0pt\ptexraggedright \rmisbold #1\hfill}}% \bigskip \par\penalty 200\relax \suppressfirstparagraphindent } % @heading, @subheading, @subsubheading. \parseargdef\heading{\sectionheading{#1}{sec}{Yomitfromtoc}{} \suppressfirstparagraphindent} \parseargdef\subheading{\sectionheading{#1}{subsec}{Yomitfromtoc}{} \suppressfirstparagraphindent} \parseargdef\subsubheading{\sectionheading{#1}{subsubsec}{Yomitfromtoc}{} \suppressfirstparagraphindent} % These macros generate a chapter, section, etc. heading only % (including whitespace, linebreaking, etc. around it), % given all the information in convenient, parsed form. %%% Args are the skip and penalty (usually negative) \def\dobreak#1#2{\par\ifdim\lastskip<#1\removelastskip\penalty#2\vskip#1\fi} %%% Define plain chapter starts, and page on/off switching for it % Parameter controlling skip before chapter headings (if needed) \newskip\chapheadingskip \def\chapbreak{\dobreak \chapheadingskip {-4000}} \def\chappager{\par\vfill\supereject} % Because \domark is called before \chapoddpage, the filler page will % get the headings for the next chapter, which is wrong. But we don't % care -- we just disable all headings on the filler page. \def\chapoddpage{% \chappager \ifodd\pageno \else \begingroup \evenheadline={\hfil}\evenfootline={\hfil}% \oddheadline={\hfil}\oddfootline={\hfil}% \hbox to 0pt{}% \chappager \endgroup \fi } \def\setchapternewpage #1 {\csname CHAPPAG#1\endcsname} \def\CHAPPAGoff{% \global\let\contentsalignmacro = \chappager \global\let\pchapsepmacro=\chapbreak \global\let\pagealignmacro=\chappager} \def\CHAPPAGon{% \global\let\contentsalignmacro = \chappager \global\let\pchapsepmacro=\chappager \global\let\pagealignmacro=\chappager \global\def\HEADINGSon{\HEADINGSsingle}} \def\CHAPPAGodd{% \global\let\contentsalignmacro = \chapoddpage \global\let\pchapsepmacro=\chapoddpage \global\let\pagealignmacro=\chapoddpage \global\def\HEADINGSon{\HEADINGSdouble}} \CHAPPAGon % Chapter opening. % % #1 is the text, #2 is the section type (Ynumbered, Ynothing, % Yappendix, Yomitfromtoc), #3 the chapter number. % % To test against our argument. \def\Ynothingkeyword{Ynothing} \def\Yomitfromtockeyword{Yomitfromtoc} \def\Yappendixkeyword{Yappendix} % \def\chapmacro#1#2#3{% % Insert the first mark before the heading break (see notes for \domark). \let\prevchapterdefs=\lastchapterdefs \let\prevsectiondefs=\lastsectiondefs \gdef\lastsectiondefs{\gdef\thissectionname{}\gdef\thissectionnum{}% \gdef\thissection{}}% % \def\temptype{#2}% \ifx\temptype\Ynothingkeyword \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}% \gdef\thischapter{\thischaptername}}% \else\ifx\temptype\Yomitfromtockeyword \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}% \gdef\thischapter{}}% \else\ifx\temptype\Yappendixkeyword \toks0={#1}% \xdef\lastchapterdefs{% \gdef\noexpand\thischaptername{\the\toks0}% \gdef\noexpand\thischapternum{\appendixletter}% % \noexpand\putwordAppendix avoids expanding indigestible % commands in some of the translations. \gdef\noexpand\thischapter{\noexpand\putwordAppendix{} \noexpand\thischapternum: \noexpand\thischaptername}% }% \else \toks0={#1}% \xdef\lastchapterdefs{% \gdef\noexpand\thischaptername{\the\toks0}% \gdef\noexpand\thischapternum{\the\chapno}% % \noexpand\putwordChapter avoids expanding indigestible % commands in some of the translations. \gdef\noexpand\thischapter{\noexpand\putwordChapter{} \noexpand\thischapternum: \noexpand\thischaptername}% }% \fi\fi\fi % % Output the mark. Pass it through \safewhatsit, to take care of % the preceding space. \safewhatsit\domark % % Insert the chapter heading break. \pchapsepmacro % % Now the second mark, after the heading break. No break points % between here and the heading. \let\prevchapterdefs=\lastchapterdefs \let\prevsectiondefs=\lastsectiondefs \domark % {% \chapfonts \rmisbold % % Have to define \lastsection before calling \donoderef, because the % xref code eventually uses it. On the other hand, it has to be called % after \pchapsepmacro, or the headline will change too soon. \gdef\lastsection{#1}% % % Only insert the separating space if we have a chapter/appendix % number, and don't print the unnumbered ``number''. \ifx\temptype\Ynothingkeyword \setbox0 = \hbox{}% \def\toctype{unnchap}% \else\ifx\temptype\Yomitfromtockeyword \setbox0 = \hbox{}% contents like unnumbered, but no toc entry \def\toctype{omit}% \else\ifx\temptype\Yappendixkeyword \setbox0 = \hbox{\putwordAppendix{} #3\enspace}% \def\toctype{app}% \else \setbox0 = \hbox{#3\enspace}% \def\toctype{numchap}% \fi\fi\fi % % Write the toc entry for this chapter. Must come before the % \donoderef, because we include the current node name in the toc % entry, and \donoderef resets it to empty. \writetocentry{\toctype}{#1}{#3}% % % For pdftex, we have to write out the node definition (aka, make % the pdfdest) after any page break, but before the actual text has % been typeset. If the destination for the pdf outline is after the % text, then jumping from the outline may wind up with the text not % being visible, for instance under high magnification. \donoderef{#2}% % % Typeset the actual heading. \nobreak % Avoid page breaks at the interline glue. \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \ptexraggedright \hangindent=\wd0 \centerparametersmaybe \unhbox0 #1\par}% }% \nobreak\bigskip % no page break after a chapter title \nobreak } % @centerchap -- centered and unnumbered. \let\centerparametersmaybe = \relax \def\centerparameters{% \advance\rightskip by 3\rightskip \leftskip = \rightskip \parfillskip = 0pt } % I don't think this chapter style is supported any more, so I'm not % updating it with the new noderef stuff. We'll see. --karl, 11aug03. % \def\setchapterstyle #1 {\csname CHAPF#1\endcsname} % \def\unnchfopen #1{% \chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 \parindent=0pt\ptexraggedright \rmisbold #1\hfill}}\bigskip \par\nobreak } \def\chfopen #1#2{\chapoddpage {\chapfonts \vbox to 3in{\vfil \hbox to\hsize{\hfil #2} \hbox to\hsize{\hfil #1} \vfil}}% \par\penalty 5000 % } \def\centerchfopen #1{% \chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 \parindent=0pt \hfill {\rmisbold #1}\hfill}}\bigskip \par\nobreak } \def\CHAPFopen{% \global\let\chapmacro=\chfopen \global\let\centerchapmacro=\centerchfopen} % Section titles. These macros combine the section number parts and % call the generic \sectionheading to do the printing. % \newskip\secheadingskip \def\secheadingbreak{\dobreak \secheadingskip{-1000}} % Subsection titles. \newskip\subsecheadingskip \def\subsecheadingbreak{\dobreak \subsecheadingskip{-500}} % Subsubsection titles. \def\subsubsecheadingskip{\subsecheadingskip} \def\subsubsecheadingbreak{\subsecheadingbreak} % Print any size, any type, section title. % % #1 is the text, #2 is the section level (sec/subsec/subsubsec), #3 is % the section type for xrefs (Ynumbered, Ynothing, Yappendix), #4 is the % section number. % \def\seckeyword{sec} % \def\sectionheading#1#2#3#4{% {% % Switch to the right set of fonts. \csname #2fonts\endcsname \rmisbold % \def\sectionlevel{#2}% \def\temptype{#3}% % % Insert first mark before the heading break (see notes for \domark). \let\prevsectiondefs=\lastsectiondefs \ifx\temptype\Ynothingkeyword \ifx\sectionlevel\seckeyword \gdef\lastsectiondefs{\gdef\thissectionname{#1}\gdef\thissectionnum{}% \gdef\thissection{\thissectionname}}% \fi \else\ifx\temptype\Yomitfromtockeyword % Don't redefine \thissection. \else\ifx\temptype\Yappendixkeyword \ifx\sectionlevel\seckeyword \toks0={#1}% \xdef\lastsectiondefs{% \gdef\noexpand\thissectionname{\the\toks0}% \gdef\noexpand\thissectionnum{#4}% % \noexpand\putwordSection avoids expanding indigestible % commands in some of the translations. \gdef\noexpand\thissection{\noexpand\putwordSection{} \noexpand\thissectionnum: \noexpand\thissectionname}% }% \fi \else \ifx\sectionlevel\seckeyword \toks0={#1}% \xdef\lastsectiondefs{% \gdef\noexpand\thissectionname{\the\toks0}% \gdef\noexpand\thissectionnum{#4}% % \noexpand\putwordSection avoids expanding indigestible % commands in some of the translations. \gdef\noexpand\thissection{\noexpand\putwordSection{} \noexpand\thissectionnum: \noexpand\thissectionname}% }% \fi \fi\fi\fi % % Go into vertical mode. Usually we'll already be there, but we % don't want the following whatsit to end up in a preceding paragraph % if the document didn't happen to have a blank line. \par % % Output the mark. Pass it through \safewhatsit, to take care of % the preceding space. \safewhatsit\domark % % Insert space above the heading. \csname #2headingbreak\endcsname % % Now the second mark, after the heading break. No break points % between here and the heading. \let\prevsectiondefs=\lastsectiondefs \domark % % Only insert the space after the number if we have a section number. \ifx\temptype\Ynothingkeyword \setbox0 = \hbox{}% \def\toctype{unn}% \gdef\lastsection{#1}% \else\ifx\temptype\Yomitfromtockeyword % for @headings -- no section number, don't include in toc, % and don't redefine \lastsection. \setbox0 = \hbox{}% \def\toctype{omit}% \let\sectionlevel=\empty \else\ifx\temptype\Yappendixkeyword \setbox0 = \hbox{#4\enspace}% \def\toctype{app}% \gdef\lastsection{#1}% \else \setbox0 = \hbox{#4\enspace}% \def\toctype{num}% \gdef\lastsection{#1}% \fi\fi\fi % % Write the toc entry (before \donoderef). See comments in \chapmacro. \writetocentry{\toctype\sectionlevel}{#1}{#4}% % % Write the node reference (= pdf destination for pdftex). % Again, see comments in \chapmacro. \donoderef{#3}% % % Interline glue will be inserted when the vbox is completed. % That glue will be a valid breakpoint for the page, since it'll be % preceded by a whatsit (usually from the \donoderef, or from the % \writetocentry if there was no node). We don't want to allow that % break, since then the whatsits could end up on page n while the % section is on page n+1, thus toc/etc. are wrong. Debian bug 276000. \nobreak % % Output the actual section heading. \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \ptexraggedright \hangindent=\wd0 % zero if no section number \unhbox0 #1}% }% % Add extra space after the heading -- half of whatever came above it. % Don't allow stretch, though. \kern .5 \csname #2headingskip\endcsname % % Do not let the kern be a potential breakpoint, as it would be if it % was followed by glue. \nobreak % % We'll almost certainly start a paragraph next, so don't let that % glue accumulate. (Not a breakpoint because it's preceded by a % discardable item.) \vskip-\parskip % % This is purely so the last item on the list is a known \penalty > % 10000. This is so \startdefun can avoid allowing breakpoints after % section headings. Otherwise, it would insert a valid breakpoint between: % % @section sec-whatever % @deffn def-whatever \penalty 10001 } \message{toc,} % Table of contents. \newwrite\tocfile % Write an entry to the toc file, opening it if necessary. % Called from @chapter, etc. % % Example usage: \writetocentry{sec}{Section Name}{\the\chapno.\the\secno} % We append the current node name (if any) and page number as additional % arguments for the \{chap,sec,...}entry macros which will eventually % read this. The node name is used in the pdf outlines as the % destination to jump to. % % We open the .toc file for writing here instead of at @setfilename (or % any other fixed time) so that @contents can be anywhere in the document. % But if #1 is `omit', then we don't do anything. This is used for the % table of contents chapter openings themselves. % \newif\iftocfileopened \def\omitkeyword{omit}% % \def\writetocentry#1#2#3{% \edef\writetoctype{#1}% \ifx\writetoctype\omitkeyword \else \iftocfileopened\else \immediate\openout\tocfile = \jobname.toc \global\tocfileopenedtrue \fi % \iflinks {\atdummies \edef\temp{% \write\tocfile{@#1entry{#2}{#3}{\lastnode}{\noexpand\folio}}}% \temp }% \fi \fi % % Tell \shipout to create a pdf destination on each page, if we're % writing pdf. These are used in the table of contents. We can't % just write one on every page because the title pages are numbered % 1 and 2 (the page numbers aren't printed), and so are the first % two pages of the document. Thus, we'd have two destinations named % `1', and two named `2'. \ifpdf \global\pdfmakepagedesttrue \fi } % These characters do not print properly in the Computer Modern roman % fonts, so we must take special care. This is more or less redundant % with the Texinfo input format setup at the end of this file. % \def\activecatcodes{% \catcode`\"=\active \catcode`\$=\active \catcode`\<=\active \catcode`\>=\active \catcode`\\=\active \catcode`\^=\active \catcode`\_=\active \catcode`\|=\active \catcode`\~=\active } % Read the toc file, which is essentially Texinfo input. \def\readtocfile{% \setupdatafile \activecatcodes \input \tocreadfilename } \newskip\contentsrightmargin \contentsrightmargin=1in \newcount\savepageno \newcount\lastnegativepageno \lastnegativepageno = -1 % Prepare to read what we've written to \tocfile. % \def\startcontents#1{% % If @setchapternewpage on, and @headings double, the contents should % start on an odd page, unlike chapters. Thus, we maintain % \contentsalignmacro in parallel with \pagealignmacro. % From: Torbjorn Granlund <tege@matematik.su.se> \contentsalignmacro \immediate\closeout\tocfile % % Don't need to put `Contents' or `Short Contents' in the headline. % It is abundantly clear what they are. \chapmacro{#1}{Yomitfromtoc}{}% % \savepageno = \pageno \begingroup % Set up to handle contents files properly. \raggedbottom % Worry more about breakpoints than the bottom. \advance\hsize by -\contentsrightmargin % Don't use the full line length. % % Roman numerals for page numbers. \ifnum \pageno>0 \global\pageno = \lastnegativepageno \fi } % redefined for the two-volume lispref. We always output on % \jobname.toc even if this is redefined. % \def\tocreadfilename{\jobname.toc} % Normal (long) toc. % \def\contents{% \startcontents{\putwordTOC}% \openin 1 \tocreadfilename\space \ifeof 1 \else \readtocfile \fi \vfill \eject \contentsalignmacro % in case @setchapternewpage odd is in effect \ifeof 1 \else \pdfmakeoutlines \fi \closein 1 \endgroup \lastnegativepageno = \pageno \global\pageno = \savepageno } % And just the chapters. \def\summarycontents{% \startcontents{\putwordShortTOC}% % \let\numchapentry = \shortchapentry \let\appentry = \shortchapentry \let\unnchapentry = \shortunnchapentry % We want a true roman here for the page numbers. \secfonts \let\rm=\shortcontrm \let\bf=\shortcontbf \let\sl=\shortcontsl \let\tt=\shortconttt \rm \hyphenpenalty = 10000 \advance\baselineskip by 1pt % Open it up a little. \def\numsecentry##1##2##3##4{} \let\appsecentry = \numsecentry \let\unnsecentry = \numsecentry \let\numsubsecentry = \numsecentry \let\appsubsecentry = \numsecentry \let\unnsubsecentry = \numsecentry \let\numsubsubsecentry = \numsecentry \let\appsubsubsecentry = \numsecentry \let\unnsubsubsecentry = \numsecentry \openin 1 \tocreadfilename\space \ifeof 1 \else \readtocfile \fi \closein 1 \vfill \eject \contentsalignmacro % in case @setchapternewpage odd is in effect \endgroup \lastnegativepageno = \pageno \global\pageno = \savepageno } \let\shortcontents = \summarycontents % Typeset the label for a chapter or appendix for the short contents. % The arg is, e.g., `A' for an appendix, or `3' for a chapter. % \def\shortchaplabel#1{% % This space should be enough, since a single number is .5em, and the % widest letter (M) is 1em, at least in the Computer Modern fonts. % But use \hss just in case. % (This space doesn't include the extra space that gets added after % the label; that gets put in by \shortchapentry above.) % % We'd like to right-justify chapter numbers, but that looks strange % with appendix letters. And right-justifying numbers and % left-justifying letters looks strange when there is less than 10 % chapters. Have to read the whole toc once to know how many chapters % there are before deciding ... \hbox to 1em{#1\hss}% } % These macros generate individual entries in the table of contents. % The first argument is the chapter or section name. % The last argument is the page number. % The arguments in between are the chapter number, section number, ... % Chapters, in the main contents. \def\numchapentry#1#2#3#4{\dochapentry{#2\labelspace#1}{#4}} % % Chapters, in the short toc. % See comments in \dochapentry re vbox and related settings. \def\shortchapentry#1#2#3#4{% \tocentry{\shortchaplabel{#2}\labelspace #1}{\doshortpageno\bgroup#4\egroup}% } % Appendices, in the main contents. % Need the word Appendix, and a fixed-size box. % \def\appendixbox#1{% % We use M since it's probably the widest letter. \setbox0 = \hbox{\putwordAppendix{} M}% \hbox to \wd0{\putwordAppendix{} #1\hss}} % \def\appentry#1#2#3#4{\dochapentry{\appendixbox{#2}\labelspace#1}{#4}} % Unnumbered chapters. \def\unnchapentry#1#2#3#4{\dochapentry{#1}{#4}} \def\shortunnchapentry#1#2#3#4{\tocentry{#1}{\doshortpageno\bgroup#4\egroup}} % Sections. \def\numsecentry#1#2#3#4{\dosecentry{#2\labelspace#1}{#4}} \let\appsecentry=\numsecentry \def\unnsecentry#1#2#3#4{\dosecentry{#1}{#4}} % Subsections. \def\numsubsecentry#1#2#3#4{\dosubsecentry{#2\labelspace#1}{#4}} \let\appsubsecentry=\numsubsecentry \def\unnsubsecentry#1#2#3#4{\dosubsecentry{#1}{#4}} % And subsubsections. \def\numsubsubsecentry#1#2#3#4{\dosubsubsecentry{#2\labelspace#1}{#4}} \let\appsubsubsecentry=\numsubsubsecentry \def\unnsubsubsecentry#1#2#3#4{\dosubsubsecentry{#1}{#4}} % This parameter controls the indentation of the various levels. % Same as \defaultparindent. \newdimen\tocindent \tocindent = 15pt % Now for the actual typesetting. In all these, #1 is the text and #2 is the % page number. % % If the toc has to be broken over pages, we want it to be at chapters % if at all possible; hence the \penalty. \def\dochapentry#1#2{% \penalty-300 \vskip1\baselineskip plus.33\baselineskip minus.25\baselineskip \begingroup \chapentryfonts \tocentry{#1}{\dopageno\bgroup#2\egroup}% \endgroup \nobreak\vskip .25\baselineskip plus.1\baselineskip } \def\dosecentry#1#2{\begingroup \secentryfonts \leftskip=\tocindent \tocentry{#1}{\dopageno\bgroup#2\egroup}% \endgroup} \def\dosubsecentry#1#2{\begingroup \subsecentryfonts \leftskip=2\tocindent \tocentry{#1}{\dopageno\bgroup#2\egroup}% \endgroup} \def\dosubsubsecentry#1#2{\begingroup \subsubsecentryfonts \leftskip=3\tocindent \tocentry{#1}{\dopageno\bgroup#2\egroup}% \endgroup} % We use the same \entry macro as for the index entries. \let\tocentry = \entry % Space between chapter (or whatever) number and the title. \def\labelspace{\hskip1em \relax} \def\dopageno#1{{\rm #1}} \def\doshortpageno#1{{\rm #1}} \def\chapentryfonts{\secfonts \rm} \def\secentryfonts{\textfonts} \def\subsecentryfonts{\textfonts} \def\subsubsecentryfonts{\textfonts} \message{environments,} % @foo ... @end foo. % @tex ... @end tex escapes into raw Tex temporarily. % One exception: @ is still an escape character, so that @end tex works. % But \@ or @@ will get a plain tex @ character. \envdef\tex{% \setupmarkupstyle{tex}% \catcode `\\=0 \catcode `\{=1 \catcode `\}=2 \catcode `\$=3 \catcode `\&=4 \catcode `\#=6 \catcode `\^=7 \catcode `\_=8 \catcode `\~=\active \let~=\tie \catcode `\%=14 \catcode `\+=\other \catcode `\"=\other \catcode `\|=\other \catcode `\<=\other \catcode `\>=\other \catcode`\`=\other \catcode`\'=\other \escapechar=`\\ % \let\b=\ptexb \let\bullet=\ptexbullet \let\c=\ptexc \let\,=\ptexcomma \let\.=\ptexdot \let\dots=\ptexdots \let\equiv=\ptexequiv \let\!=\ptexexclam \let\i=\ptexi \let\indent=\ptexindent \let\noindent=\ptexnoindent \let\{=\ptexlbrace \let\+=\tabalign \let\}=\ptexrbrace \let\/=\ptexslash \let\*=\ptexstar \let\t=\ptext \expandafter \let\csname top\endcsname=\ptextop % outer \let\frenchspacing=\plainfrenchspacing % \def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}% \def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi}% \def\@{@}% } % There is no need to define \Etex. % Define @lisp ... @end lisp. % @lisp environment forms a group so it can rebind things, % including the definition of @end lisp (which normally is erroneous). % Amount to narrow the margins by for @lisp. \newskip\lispnarrowing \lispnarrowing=0.4in % This is the definition that ^^M gets inside @lisp, @example, and other % such environments. \null is better than a space, since it doesn't % have any width. \def\lisppar{\null\endgraf} % This space is always present above and below environments. \newskip\envskipamount \envskipamount = 0pt % Make spacing and below environment symmetrical. We use \parskip here % to help in doing that, since in @example-like environments \parskip % is reset to zero; thus the \afterenvbreak inserts no space -- but the % start of the next paragraph will insert \parskip. % \def\aboveenvbreak{{% % =10000 instead of <10000 because of a special case in \itemzzz and % \sectionheading, q.v. \ifnum \lastpenalty=10000 \else \advance\envskipamount by \parskip \endgraf \ifdim\lastskip<\envskipamount \removelastskip % it's not a good place to break if the last penalty was \nobreak % or better ... \ifnum\lastpenalty<10000 \penalty-50 \fi \vskip\envskipamount \fi \fi }} \let\afterenvbreak = \aboveenvbreak % \nonarrowing is a flag. If "set", @lisp etc don't narrow margins; it will % also clear it, so that its embedded environments do the narrowing again. \let\nonarrowing=\relax % @cartouche ... @end cartouche: draw rectangle w/rounded corners around % environment contents. \font\circle=lcircle10 \newdimen\circthick \newdimen\cartouter\newdimen\cartinner \newskip\normbskip\newskip\normpskip\newskip\normlskip \circthick=\fontdimen8\circle % \def\ctl{{\circle\char'013\hskip -6pt}}% 6pt from pl file: 1/2charwidth \def\ctr{{\hskip 6pt\circle\char'010}} \def\cbl{{\circle\char'012\hskip -6pt}} \def\cbr{{\hskip 6pt\circle\char'011}} \def\carttop{\hbox to \cartouter{\hskip\lskip \ctl\leaders\hrule height\circthick\hfil\ctr \hskip\rskip}} \def\cartbot{\hbox to \cartouter{\hskip\lskip \cbl\leaders\hrule height\circthick\hfil\cbr \hskip\rskip}} % \newskip\lskip\newskip\rskip \envdef\cartouche{% \ifhmode\par\fi % can't be in the midst of a paragraph. \startsavinginserts \lskip=\leftskip \rskip=\rightskip \leftskip=0pt\rightskip=0pt % we want these *outside*. \cartinner=\hsize \advance\cartinner by-\lskip \advance\cartinner by-\rskip \cartouter=\hsize \advance\cartouter by 18.4pt % allow for 3pt kerns on either % side, and for 6pt waste from % each corner char, and rule thickness \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip % Flag to tell @lisp, etc., not to narrow margin. \let\nonarrowing = t% \vbox\bgroup \baselineskip=0pt\parskip=0pt\lineskip=0pt \carttop \hbox\bgroup \hskip\lskip \vrule\kern3pt \vbox\bgroup \kern3pt \hsize=\cartinner \baselineskip=\normbskip \lineskip=\normlskip \parskip=\normpskip \vskip -\parskip \comment % For explanation, see the end of \def\group. } \def\Ecartouche{% \ifhmode\par\fi \kern3pt \egroup \kern3pt\vrule \hskip\rskip \egroup \cartbot \egroup \checkinserts } % This macro is called at the beginning of all the @example variants, % inside a group. \newdimen\nonfillparindent \def\nonfillstart{% \aboveenvbreak \hfuzz = 12pt % Don't be fussy \sepspaces % Make spaces be word-separators rather than space tokens. \let\par = \lisppar % don't ignore blank lines \obeylines % each line of input is a line of output \parskip = 0pt % Turn off paragraph indentation but redefine \indent to emulate % the normal \indent. \nonfillparindent=\parindent \parindent = 0pt \let\indent\nonfillindent % \emergencystretch = 0pt % don't try to avoid overfull boxes \ifx\nonarrowing\relax \advance \leftskip by \lispnarrowing \exdentamount=\lispnarrowing \else \let\nonarrowing = \relax \fi \let\exdent=\nofillexdent } \begingroup \obeyspaces % We want to swallow spaces (but not other tokens) after the fake % @indent in our nonfill-environments, where spaces are normally % active and set to @tie, resulting in them not being ignored after % @indent. \gdef\nonfillindent{\futurelet\temp\nonfillindentcheck}% \gdef\nonfillindentcheck{% \ifx\temp % \expandafter\nonfillindentgobble% \else% \leavevmode\nonfillindentbox% \fi% }% \endgroup \def\nonfillindentgobble#1{\nonfillindent} \def\nonfillindentbox{\hbox to \nonfillparindent{\hss}} % If you want all examples etc. small: @set dispenvsize small. % If you want even small examples the full size: @set dispenvsize nosmall. % This affects the following displayed environments: % @example, @display, @format, @lisp % \def\smallword{small} \def\nosmallword{nosmall} \let\SETdispenvsize\relax \def\setnormaldispenv{% \ifx\SETdispenvsize\smallword % end paragraph for sake of leading, in case document has no blank % line. This is redundant with what happens in \aboveenvbreak, but % we need to do it before changing the fonts, and it's inconvenient % to change the fonts afterward. \ifnum \lastpenalty=10000 \else \endgraf \fi \smallexamplefonts \rm \fi } \def\setsmalldispenv{% \ifx\SETdispenvsize\nosmallword \else \ifnum \lastpenalty=10000 \else \endgraf \fi \smallexamplefonts \rm \fi } % We often define two environments, @foo and @smallfoo. % Let's do it by one command: \def\makedispenv #1#2{ \expandafter\envdef\csname#1\endcsname {\setnormaldispenv #2} \expandafter\envdef\csname small#1\endcsname {\setsmalldispenv #2} \expandafter\let\csname E#1\endcsname \afterenvbreak \expandafter\let\csname Esmall#1\endcsname \afterenvbreak } % Define two synonyms: \def\maketwodispenvs #1#2#3{ \makedispenv{#1}{#3} \makedispenv{#2}{#3} } % @lisp: indented, narrowed, typewriter font; @example: same as @lisp. % % @smallexample and @smalllisp: use smaller fonts. % Originally contributed by Pavel@xerox. % \maketwodispenvs {lisp}{example}{% \nonfillstart \tt\setupmarkupstyle{example}% \let\kbdfont = \kbdexamplefont % Allow @kbd to do something special. \gobble % eat return } % @display/@smalldisplay: same as @lisp except keep current font. % \makedispenv {display}{% \nonfillstart \gobble } % @format/@smallformat: same as @display except don't narrow margins. % \makedispenv{format}{% \let\nonarrowing = t% \nonfillstart \gobble } % @flushleft: same as @format, but doesn't obey \SETdispenvsize. \envdef\flushleft{% \let\nonarrowing = t% \nonfillstart \gobble } \let\Eflushleft = \afterenvbreak % @flushright. % \envdef\flushright{% \let\nonarrowing = t% \nonfillstart \advance\leftskip by 0pt plus 1fill \gobble } \let\Eflushright = \afterenvbreak % @raggedright does more-or-less normal line breaking but no right % justification. From plain.tex. \envdef\raggedright{% \rightskip0pt plus2em \spaceskip.3333em \xspaceskip.5em\relax } \let\Eraggedright\par \envdef\raggedleft{% \parindent=0pt \leftskip0pt plus2em \spaceskip.3333em \xspaceskip.5em \parfillskip=0pt \hbadness=10000 % Last line will usually be underfull, so turn off % badness reporting. } \let\Eraggedleft\par \envdef\raggedcenter{% \parindent=0pt \rightskip0pt plus1em \leftskip0pt plus1em \spaceskip.3333em \xspaceskip.5em \parfillskip=0pt \hbadness=10000 % Last line will usually be underfull, so turn off % badness reporting. } \let\Eraggedcenter\par % @quotation does normal linebreaking (hence we can't use \nonfillstart) % and narrows the margins. We keep \parskip nonzero in general, since % we're doing normal filling. So, when using \aboveenvbreak and % \afterenvbreak, temporarily make \parskip 0. % \def\quotationstart{% {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip \parindent=0pt % % @cartouche defines \nonarrowing to inhibit narrowing at next level down. \ifx\nonarrowing\relax \advance\leftskip by \lispnarrowing \advance\rightskip by \lispnarrowing \exdentamount = \lispnarrowing \else \let\nonarrowing = \relax \fi \parsearg\quotationlabel } \envdef\quotation{% \setnormaldispenv \quotationstart } \envdef\smallquotation{% \setsmalldispenv \quotationstart } \let\Esmallquotation = \Equotation % We have retained a nonzero parskip for the environment, since we're % doing normal filling. % \def\Equotation{% \par \ifx\quotationauthor\undefined\else % indent a bit. \leftline{\kern 2\leftskip \sl ---\quotationauthor}% \fi {\parskip=0pt \afterenvbreak}% } % If we're given an argument, typeset it in bold with a colon after. \def\quotationlabel#1{% \def\temp{#1}% \ifx\temp\empty \else {\bf #1: }% \fi } % LaTeX-like @verbatim...@end verbatim and @verb{<char>...<char>} % If we want to allow any <char> as delimiter, % we need the curly braces so that makeinfo sees the @verb command, eg: % `@verbx...x' would look like the '@verbx' command. --janneke@gnu.org % % [Knuth]: Donald Ervin Knuth, 1996. The TeXbook. % % [Knuth] p.344; only we need to do the other characters Texinfo sets % active too. Otherwise, they get lost as the first character on a % verbatim line. \def\dospecials{% \do\ \do\\\do\{\do\}\do\$\do\&% \do\#\do\^\do\^^K\do\_\do\^^A\do\%\do\~% \do\<\do\>\do\|\do\@\do+\do\"% % Don't do the quotes -- if we do, @set txicodequoteundirected and % @set txicodequotebacktick will not have effect on @verb and % @verbatim, and ?` and !` ligatures won't get disabled. %\do\`\do\'% } % % [Knuth] p. 380 \def\uncatcodespecials{% \def\do##1{\catcode`##1=\other}\dospecials} % % Setup for the @verb command. % % Eight spaces for a tab \begingroup \catcode`\^^I=\active \gdef\tabeightspaces{\catcode`\^^I=\active\def^^I{\ \ \ \ \ \ \ \ }} \endgroup % \def\setupverb{% \tt % easiest (and conventionally used) font for verbatim \def\par{\leavevmode\endgraf}% \setupmarkupstyle{verb}% \tabeightspaces % Respect line breaks, % print special symbols as themselves, and % make each space count % must do in this order: \obeylines \uncatcodespecials \sepspaces } % Setup for the @verbatim environment % % Real tab expansion \newdimen\tabw \setbox0=\hbox{\tt\space} \tabw=8\wd0 % tab amount % \def\starttabbox{\setbox0=\hbox\bgroup} % \begingroup \catcode`\^^I=\active \gdef\tabexpand{% \catcode`\^^I=\active \def^^I{\leavevmode\egroup \dimen0=\wd0 % the width so far, or since the previous tab \divide\dimen0 by\tabw \multiply\dimen0 by\tabw % compute previous multiple of \tabw \advance\dimen0 by\tabw % advance to next multiple of \tabw \wd0=\dimen0 \box0 \starttabbox }% } \endgroup % start the verbatim environment. \def\setupverbatim{% \let\nonarrowing = t% \nonfillstart % Easiest (and conventionally used) font for verbatim \tt \def\par{\leavevmode\egroup\box0\endgraf}% \tabexpand \setupmarkupstyle{verbatim}% % Respect line breaks, % print special symbols as themselves, and % make each space count % must do in this order: \obeylines \uncatcodespecials \sepspaces \everypar{\starttabbox}% } % Do the @verb magic: verbatim text is quoted by unique % delimiter characters. Before first delimiter expect a % right brace, after last delimiter expect closing brace: % % \def\doverb'{'<char>#1<char>'}'{#1} % % [Knuth] p. 382; only eat outer {} \begingroup \catcode`[=1\catcode`]=2\catcode`\{=\other\catcode`\}=\other \gdef\doverb{#1[\def\next##1#1}[##1\endgroup]\next] \endgroup % \def\verb{\begingroup\setupverb\doverb} % % % Do the @verbatim magic: define the macro \doverbatim so that % the (first) argument ends when '@end verbatim' is reached, ie: % % \def\doverbatim#1@end verbatim{#1} % % For Texinfo it's a lot easier than for LaTeX, % because texinfo's \verbatim doesn't stop at '\end{verbatim}': % we need not redefine '\', '{' and '}'. % % Inspired by LaTeX's verbatim command set [latex.ltx] % \begingroup \catcode`\ =\active \obeylines % % ignore everything up to the first ^^M, that's the newline at the end % of the @verbatim input line itself. Otherwise we get an extra blank % line in the output. \xdef\doverbatim#1^^M#2@end verbatim{#2\noexpand\end\gobble verbatim}% % We really want {...\end verbatim} in the body of the macro, but % without the active space; thus we have to use \xdef and \gobble. \endgroup % \envdef\verbatim{% \setupverbatim\doverbatim } \let\Everbatim = \afterenvbreak % @verbatiminclude FILE - insert text of file in verbatim environment. % \def\verbatiminclude{\parseargusing\filenamecatcodes\doverbatiminclude} % \def\doverbatiminclude#1{% {% \makevalueexpandable \setupverbatim \indexnofonts % Allow `@@' and other weird things in file names. \input #1 \afterenvbreak }% } % @copying ... @end copying. % Save the text away for @insertcopying later. % % We save the uninterpreted tokens, rather than creating a box. % Saving the text in a box would be much easier, but then all the % typesetting commands (@smallbook, font changes, etc.) have to be done % beforehand -- and a) we want @copying to be done first in the source % file; b) letting users define the frontmatter in as flexible order as % possible is very desirable. % \def\copying{\checkenv{}\begingroup\scanargctxt\docopying} \def\docopying#1@end copying{\endgroup\def\copyingtext{#1}} % \def\insertcopying{% \begingroup \parindent = 0pt % paragraph indentation looks wrong on title page \scanexp\copyingtext \endgroup } \message{defuns,} % @defun etc. \newskip\defbodyindent \defbodyindent=.4in \newskip\defargsindent \defargsindent=50pt \newskip\deflastargmargin \deflastargmargin=18pt \newcount\defunpenalty % Start the processing of @deffn: \def\startdefun{% \ifnum\lastpenalty<10000 \medbreak \defunpenalty=10003 % Will keep this @deffn together with the % following @def command, see below. \else % If there are two @def commands in a row, we'll have a \nobreak, % which is there to keep the function description together with its % header. But if there's nothing but headers, we need to allow a % break somewhere. Check specifically for penalty 10002, inserted % by \printdefunline, instead of 10000, since the sectioning % commands also insert a nobreak penalty, and we don't want to allow % a break between a section heading and a defun. % % As a minor refinement, we avoid "club" headers by signalling % with penalty of 10003 after the very first @deffn in the % sequence (see above), and penalty of 10002 after any following % @def command. \ifnum\lastpenalty=10002 \penalty2000 \else \defunpenalty=10002 \fi % % Similarly, after a section heading, do not allow a break. % But do insert the glue. \medskip % preceded by discardable penalty, so not a breakpoint \fi % \parindent=0in \advance\leftskip by \defbodyindent \exdentamount=\defbodyindent } \def\dodefunx#1{% % First, check whether we are in the right environment: \checkenv#1% % % As above, allow line break if we have multiple x headers in a row. % It's not a great place, though. \ifnum\lastpenalty=10002 \penalty3000 \else \defunpenalty=10002 \fi % % And now, it's time to reuse the body of the original defun: \expandafter\gobbledefun#1% } \def\gobbledefun#1\startdefun{} % \printdefunline \deffnheader{text} % \def\printdefunline#1#2{% \begingroup % call \deffnheader: #1#2 \endheader % common ending: \interlinepenalty = 10000 \advance\rightskip by 0pt plus 1fil \endgraf \nobreak\vskip -\parskip \penalty\defunpenalty % signal to \startdefun and \dodefunx % Some of the @defun-type tags do not enable magic parentheses, % rendering the following check redundant. But we don't optimize. \checkparencounts \endgroup } \def\Edefun{\endgraf\medbreak} % \makedefun{deffn} creates \deffn, \deffnx and \Edeffn; % the only thing remaining is to define \deffnheader. % \def\makedefun#1{% \expandafter\let\csname E#1\endcsname = \Edefun \edef\temp{\noexpand\domakedefun \makecsname{#1}\makecsname{#1x}\makecsname{#1header}}% \temp } % \domakedefun \deffn \deffnx \deffnheader % % Define \deffn and \deffnx, without parameters. % \deffnheader has to be defined explicitly. % \def\domakedefun#1#2#3{% \envdef#1{% \startdefun \parseargusing\activeparens{\printdefunline#3}% }% \def#2{\dodefunx#1}% \def#3% } %%% Untyped functions: % @deffn category name args \makedefun{deffn}{\deffngeneral{}} % @deffn category class name args \makedefun{defop}#1 {\defopon{#1\ \putwordon}} % \defopon {category on}class name args \def\defopon#1#2 {\deffngeneral{\putwordon\ \code{#2}}{#1\ \code{#2}} } % \deffngeneral {subind}category name args % \def\deffngeneral#1#2 #3 #4\endheader{% % Remember that \dosubind{fn}{foo}{} is equivalent to \doind{fn}{foo}. \dosubind{fn}{\code{#3}}{#1}% \defname{#2}{}{#3}\magicamp\defunargs{#4\unskip}% } %%% Typed functions: % @deftypefn category type name args \makedefun{deftypefn}{\deftypefngeneral{}} % @deftypeop category class type name args \makedefun{deftypeop}#1 {\deftypeopon{#1\ \putwordon}} % \deftypeopon {category on}class type name args \def\deftypeopon#1#2 {\deftypefngeneral{\putwordon\ \code{#2}}{#1\ \code{#2}} } % \deftypefngeneral {subind}category type name args % \def\deftypefngeneral#1#2 #3 #4 #5\endheader{% \dosubind{fn}{\code{#4}}{#1}% \defname{#2}{#3}{#4}\defunargs{#5\unskip}% } %%% Typed variables: % @deftypevr category type var args \makedefun{deftypevr}{\deftypecvgeneral{}} % @deftypecv category class type var args \makedefun{deftypecv}#1 {\deftypecvof{#1\ \putwordof}} % \deftypecvof {category of}class type var args \def\deftypecvof#1#2 {\deftypecvgeneral{\putwordof\ \code{#2}}{#1\ \code{#2}} } % \deftypecvgeneral {subind}category type var args % \def\deftypecvgeneral#1#2 #3 #4 #5\endheader{% \dosubind{vr}{\code{#4}}{#1}% \defname{#2}{#3}{#4}\defunargs{#5\unskip}% } %%% Untyped variables: % @defvr category var args \makedefun{defvr}#1 {\deftypevrheader{#1} {} } % @defcv category class var args \makedefun{defcv}#1 {\defcvof{#1\ \putwordof}} % \defcvof {category of}class var args \def\defcvof#1#2 {\deftypecvof{#1}#2 {} } %%% Type: % @deftp category name args \makedefun{deftp}#1 #2 #3\endheader{% \doind{tp}{\code{#2}}% \defname{#1}{}{#2}\defunargs{#3\unskip}% } % Remaining @defun-like shortcuts: \makedefun{defun}{\deffnheader{\putwordDeffunc} } \makedefun{defmac}{\deffnheader{\putwordDefmac} } \makedefun{defspec}{\deffnheader{\putwordDefspec} } \makedefun{deftypefun}{\deftypefnheader{\putwordDeffunc} } \makedefun{defvar}{\defvrheader{\putwordDefvar} } \makedefun{defopt}{\defvrheader{\putwordDefopt} } \makedefun{deftypevar}{\deftypevrheader{\putwordDefvar} } \makedefun{defmethod}{\defopon\putwordMethodon} \makedefun{deftypemethod}{\deftypeopon\putwordMethodon} \makedefun{defivar}{\defcvof\putwordInstanceVariableof} \makedefun{deftypeivar}{\deftypecvof\putwordInstanceVariableof} % \defname, which formats the name of the @def (not the args). % #1 is the category, such as "Function". % #2 is the return type, if any. % #3 is the function name. % % We are followed by (but not passed) the arguments, if any. % \def\defname#1#2#3{% % Get the values of \leftskip and \rightskip as they were outside the @def... \advance\leftskip by -\defbodyindent % % How we'll format the type name. Putting it in brackets helps % distinguish it from the body text that may end up on the next line % just below it. \def\temp{#1}% \setbox0=\hbox{\kern\deflastargmargin \ifx\temp\empty\else [\rm\temp]\fi} % % Figure out line sizes for the paragraph shape. % The first line needs space for \box0; but if \rightskip is nonzero, % we need only space for the part of \box0 which exceeds it: \dimen0=\hsize \advance\dimen0 by -\wd0 \advance\dimen0 by \rightskip % The continuations: \dimen2=\hsize \advance\dimen2 by -\defargsindent % (plain.tex says that \dimen1 should be used only as global.) \parshape 2 0in \dimen0 \defargsindent \dimen2 % % Put the type name to the right margin. \noindent \hbox to 0pt{% \hfil\box0 \kern-\hsize % \hsize has to be shortened this way: \kern\leftskip % Intentionally do not respect \rightskip, since we need the space. }% % % Allow all lines to be underfull without complaint: \tolerance=10000 \hbadness=10000 \exdentamount=\defbodyindent {% % defun fonts. We use typewriter by default (used to be bold) because: % . we're printing identifiers, they should be in tt in principle. % . in languages with many accents, such as Czech or French, it's % common to leave accents off identifiers. The result looks ok in % tt, but exceedingly strange in rm. % . we don't want -- and --- to be treated as ligatures. % . this still does not fix the ?` and !` ligatures, but so far no % one has made identifiers using them :). \df \tt \def\temp{#2}% return value type \ifx\temp\empty\else \tclose{\temp} \fi #3% output function name }% {\rm\enskip}% hskip 0.5 em of \tenrm % \boldbrax % arguments will be output next, if any. } % Print arguments in slanted roman (not ttsl), inconsistently with using % tt for the name. This is because literal text is sometimes needed in % the argument list (groff manual), and ttsl and tt are not very % distinguishable. Prevent hyphenation at `-' chars. % \def\defunargs#1{% % use sl by default (not ttsl), % tt for the names. \df \sl \hyphenchar\font=0 % % On the other hand, if an argument has two dashes (for instance), we % want a way to get ttsl. Let's try @var for that. \def\var##1{{\setupmarkupstyle{var}\ttslanted{##1}}}% #1% \sl\hyphenchar\font=45 } % We want ()&[] to print specially on the defun line. % \def\activeparens{% \catcode`\(=\active \catcode`\)=\active \catcode`\[=\active \catcode`\]=\active \catcode`\&=\active } % Make control sequences which act like normal parenthesis chars. \let\lparen = ( \let\rparen = ) % Be sure that we always have a definition for `(', etc. For example, % if the fn name has parens in it, \boldbrax will not be in effect yet, % so TeX would otherwise complain about undefined control sequence. { \activeparens \global\let(=\lparen \global\let)=\rparen \global\let[=\lbrack \global\let]=\rbrack \global\let& = \& \gdef\boldbrax{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb} \gdef\magicamp{\let&=\amprm} } \newcount\parencount % If we encounter &foo, then turn on ()-hacking afterwards \newif\ifampseen \def\amprm#1 {\ampseentrue{\bf\&#1 }} \def\parenfont{% \ifampseen % At the first level, print parens in roman, % otherwise use the default font. \ifnum \parencount=1 \rm \fi \else % The \sf parens (in \boldbrax) actually are a little bolder than % the contained text. This is especially needed for [ and ] . \sf \fi } \def\infirstlevel#1{% \ifampseen \ifnum\parencount=1 #1% \fi \fi } \def\bfafterword#1 {#1 \bf} \def\opnr{% \global\advance\parencount by 1 {\parenfont(}% \infirstlevel \bfafterword } \def\clnr{% {\parenfont)}% \infirstlevel \sl \global\advance\parencount by -1 } \newcount\brackcount \def\lbrb{% \global\advance\brackcount by 1 {\bf[}% } \def\rbrb{% {\bf]}% \global\advance\brackcount by -1 } \def\checkparencounts{% \ifnum\parencount=0 \else \badparencount \fi \ifnum\brackcount=0 \else \badbrackcount \fi } % these should not use \errmessage; the glibc manual, at least, actually % has such constructs (when documenting function pointers). \def\badparencount{% \message{Warning: unbalanced parentheses in @def...}% \global\parencount=0 } \def\badbrackcount{% \message{Warning: unbalanced square brackets in @def...}% \global\brackcount=0 } \message{macros,} % @macro. % To do this right we need a feature of e-TeX, \scantokens, % which we arrange to emulate with a temporary file in ordinary TeX. \ifx\eTeXversion\undefined \newwrite\macscribble \def\scantokens#1{% \toks0={#1}% \immediate\openout\macscribble=\jobname.tmp \immediate\write\macscribble{\the\toks0}% \immediate\closeout\macscribble \input \jobname.tmp } \fi \def\scanmacro#1{% \begingroup \newlinechar`\^^M \let\xeatspaces\eatspaces % Undo catcode changes of \startcontents and \doprintindex % When called from @insertcopying or (short)caption, we need active % backslash to get it printed correctly. Previously, we had % \catcode`\\=\other instead. We'll see whether a problem appears % with macro expansion. --kasal, 19aug04 \catcode`\@=0 \catcode`\\=\active \escapechar=`\@ % ... and \example \spaceisspace % % Append \endinput to make sure that TeX does not see the ending newline. % I've verified that it is necessary both for e-TeX and for ordinary TeX % --kasal, 29nov03 \scantokens{#1\endinput}% \endgroup } \def\scanexp#1{% \edef\temp{\noexpand\scanmacro{#1}}% \temp } \newcount\paramno % Count of parameters \newtoks\macname % Macro name \newif\ifrecursive % Is it recursive? % List of all defined macros in the form % \definedummyword\macro1\definedummyword\macro2... % Currently is also contains all @aliases; the list can be split % if there is a need. \def\macrolist{} % Add the macro to \macrolist \def\addtomacrolist#1{\expandafter \addtomacrolistxxx \csname#1\endcsname} \def\addtomacrolistxxx#1{% \toks0 = \expandafter{\macrolist\definedummyword#1}% \xdef\macrolist{\the\toks0}% } % Utility routines. % This does \let #1 = #2, with \csnames; that is, % \let \csname#1\endcsname = \csname#2\endcsname % (except of course we have to play expansion games). % \def\cslet#1#2{% \expandafter\let \csname#1\expandafter\endcsname \csname#2\endcsname } % Trim leading and trailing spaces off a string. % Concepts from aro-bend problem 15 (see CTAN). {\catcode`\@=11 \gdef\eatspaces #1{\expandafter\trim@\expandafter{#1 }} \gdef\trim@ #1{\trim@@ @#1 @ #1 @ @@} \gdef\trim@@ #1@ #2@ #3@@{\trim@@@\empty #2 @} \def\unbrace#1{#1} \unbrace{\gdef\trim@@@ #1 } #2@{#1} } % Trim a single trailing ^^M off a string. {\catcode`\^^M=\other \catcode`\Q=3% \gdef\eatcr #1{\eatcra #1Q^^MQ}% \gdef\eatcra#1^^MQ{\eatcrb#1Q}% \gdef\eatcrb#1Q#2Q{#1}% } % Macro bodies are absorbed as an argument in a context where % all characters are catcode 10, 11 or 12, except \ which is active % (as in normal texinfo). It is necessary to change the definition of \. % Non-ASCII encodings make 8-bit characters active, so un-activate % them to avoid their expansion. Must do this non-globally, to % confine the change to the current group. % It's necessary to have hard CRs when the macro is executed. This is % done by making ^^M (\endlinechar) catcode 12 when reading the macro % body, and then making it the \newlinechar in \scanmacro. \def\scanctxt{% \catcode`\"=\other \catcode`\+=\other \catcode`\<=\other \catcode`\>=\other \catcode`\@=\other \catcode`\^=\other \catcode`\_=\other \catcode`\|=\other \catcode`\~=\other \ifx\declaredencoding\ascii \else \setnonasciicharscatcodenonglobal\other \fi } \def\scanargctxt{% \scanctxt \catcode`\\=\other \catcode`\^^M=\other } \def\macrobodyctxt{% \scanctxt \catcode`\{=\other \catcode`\}=\other \catcode`\^^M=\other \usembodybackslash } \def\macroargctxt{% \scanctxt \catcode`\\=\other } % \mbodybackslash is the definition of \ in @macro bodies. % It maps \foo\ => \csname macarg.foo\endcsname => #N % where N is the macro parameter number. % We define \csname macarg.\endcsname to be \realbackslash, so % \\ in macro replacement text gets you a backslash. {\catcode`@=0 @catcode`@\=@active @gdef@usembodybackslash{@let\=@mbodybackslash} @gdef@mbodybackslash#1\{@csname macarg.#1@endcsname} } \expandafter\def\csname macarg.\endcsname{\realbackslash} \def\macro{\recursivefalse\parsearg\macroxxx} \def\rmacro{\recursivetrue\parsearg\macroxxx} \def\macroxxx#1{% \getargs{#1}% now \macname is the macname and \argl the arglist \ifx\argl\empty % no arguments \paramno=0% \else \expandafter\parsemargdef \argl;% \fi \if1\csname ismacro.\the\macname\endcsname \message{Warning: redefining \the\macname}% \else \expandafter\ifx\csname \the\macname\endcsname \relax \else \errmessage{Macro name \the\macname\space already defined}\fi \global\cslet{macsave.\the\macname}{\the\macname}% \global\expandafter\let\csname ismacro.\the\macname\endcsname=1% \addtomacrolist{\the\macname}% \fi \begingroup \macrobodyctxt \ifrecursive \expandafter\parsermacbody \else \expandafter\parsemacbody \fi} \parseargdef\unmacro{% \if1\csname ismacro.#1\endcsname \global\cslet{#1}{macsave.#1}% \global\expandafter\let \csname ismacro.#1\endcsname=0% % Remove the macro name from \macrolist: \begingroup \expandafter\let\csname#1\endcsname \relax \let\definedummyword\unmacrodo \xdef\macrolist{\macrolist}% \endgroup \else \errmessage{Macro #1 not defined}% \fi } % Called by \do from \dounmacro on each macro. The idea is to omit any % macro definitions that have been changed to \relax. % \def\unmacrodo#1{% \ifx #1\relax % remove this \else \noexpand\definedummyword \noexpand#1% \fi } % This makes use of the obscure feature that if the last token of a % <parameter list> is #, then the preceding argument is delimited by % an opening brace, and that opening brace is not consumed. \def\getargs#1{\getargsxxx#1{}} \def\getargsxxx#1#{\getmacname #1 \relax\getmacargs} \def\getmacname #1 #2\relax{\macname={#1}} \def\getmacargs#1{\def\argl{#1}} % Parse the optional {params} list. Set up \paramno and \paramlist % so \defmacro knows what to do. Define \macarg.blah for each blah % in the params list, to be ##N where N is the position in that list. % That gets used by \mbodybackslash (above). % We need to get `macro parameter char #' into several definitions. % The technique used is stolen from LaTeX: let \hash be something % unexpandable, insert that wherever you need a #, and then redefine % it to # just before using the token list produced. % % The same technique is used to protect \eatspaces till just before % the macro is used. \def\parsemargdef#1;{\paramno=0\def\paramlist{}% \let\hash\relax\let\xeatspaces\relax\parsemargdefxxx#1,;,} \def\parsemargdefxxx#1,{% \if#1;\let\next=\relax \else \let\next=\parsemargdefxxx \advance\paramno by 1% \expandafter\edef\csname macarg.\eatspaces{#1}\endcsname {\xeatspaces{\hash\the\paramno}}% \edef\paramlist{\paramlist\hash\the\paramno,}% \fi\next} % These two commands read recursive and nonrecursive macro bodies. % (They're different since rec and nonrec macros end differently.) \long\def\parsemacbody#1@end macro% {\xdef\temp{\eatcr{#1}}\endgroup\defmacro}% \long\def\parsermacbody#1@end rmacro% {\xdef\temp{\eatcr{#1}}\endgroup\defmacro}% % This defines the macro itself. There are six cases: recursive and % nonrecursive macros of zero, one, and many arguments. % Much magic with \expandafter here. % \xdef is used so that macro definitions will survive the file % they're defined in; @include reads the file inside a group. \def\defmacro{% \let\hash=##% convert placeholders to macro parameter chars \ifrecursive \ifcase\paramno % 0 \expandafter\xdef\csname\the\macname\endcsname{% \noexpand\scanmacro{\temp}}% \or % 1 \expandafter\xdef\csname\the\macname\endcsname{% \bgroup\noexpand\macroargctxt \noexpand\braceorline \expandafter\noexpand\csname\the\macname xxx\endcsname}% \expandafter\xdef\csname\the\macname xxx\endcsname##1{% \egroup\noexpand\scanmacro{\temp}}% \else % many \expandafter\xdef\csname\the\macname\endcsname{% \bgroup\noexpand\macroargctxt \noexpand\csname\the\macname xx\endcsname}% \expandafter\xdef\csname\the\macname xx\endcsname##1{% \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}% \expandafter\expandafter \expandafter\xdef \expandafter\expandafter \csname\the\macname xxx\endcsname \paramlist{\egroup\noexpand\scanmacro{\temp}}% \fi \else \ifcase\paramno % 0 \expandafter\xdef\csname\the\macname\endcsname{% \noexpand\norecurse{\the\macname}% \noexpand\scanmacro{\temp}\egroup}% \or % 1 \expandafter\xdef\csname\the\macname\endcsname{% \bgroup\noexpand\macroargctxt \noexpand\braceorline \expandafter\noexpand\csname\the\macname xxx\endcsname}% \expandafter\xdef\csname\the\macname xxx\endcsname##1{% \egroup \noexpand\norecurse{\the\macname}% \noexpand\scanmacro{\temp}\egroup}% \else % many \expandafter\xdef\csname\the\macname\endcsname{% \bgroup\noexpand\macroargctxt \expandafter\noexpand\csname\the\macname xx\endcsname}% \expandafter\xdef\csname\the\macname xx\endcsname##1{% \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}% \expandafter\expandafter \expandafter\xdef \expandafter\expandafter \csname\the\macname xxx\endcsname \paramlist{% \egroup \noexpand\norecurse{\the\macname}% \noexpand\scanmacro{\temp}\egroup}% \fi \fi} \def\norecurse#1{\bgroup\cslet{#1}{macsave.#1}} % \braceorline decides whether the next nonwhitespace character is a % {. If so it reads up to the closing }, if not, it reads the whole % line. Whatever was read is then fed to the next control sequence % as an argument (by \parsebrace or \parsearg) \def\braceorline#1{\let\macnamexxx=#1\futurelet\nchar\braceorlinexxx} \def\braceorlinexxx{% \ifx\nchar\bgroup\else \expandafter\parsearg \fi \macnamexxx} % @alias. % We need some trickery to remove the optional spaces around the equal % sign. Just make them active and then expand them all to nothing. \def\alias{\parseargusing\obeyspaces\aliasxxx} \def\aliasxxx #1{\aliasyyy#1\relax} \def\aliasyyy #1=#2\relax{% {% \expandafter\let\obeyedspace=\empty \addtomacrolist{#1}% \xdef\next{\global\let\makecsname{#1}=\makecsname{#2}}% }% \next } \message{cross references,} \newwrite\auxfile \newif\ifhavexrefs % True if xref values are known. \newif\ifwarnedxrefs % True if we warned once that they aren't known. % @inforef is relatively simple. \def\inforef #1{\inforefzzz #1,,,,**} \def\inforefzzz #1,#2,#3,#4**{\putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}}, node \samp{\ignorespaces#1{}}} % @node's only job in TeX is to define \lastnode, which is used in % cross-references. The @node line might or might not have commas, and % might or might not have spaces before the first comma, like: % @node foo , bar , ... % We don't want such trailing spaces in the node name. % \parseargdef\node{\checkenv{}\donode #1 ,\finishnodeparse} % % also remove a trailing comma, in case of something like this: % @node Help-Cross, , , Cross-refs \def\donode#1 ,#2\finishnodeparse{\dodonode #1,\finishnodeparse} \def\dodonode#1,#2\finishnodeparse{\gdef\lastnode{#1}} \let\nwnode=\node \let\lastnode=\empty % Write a cross-reference definition for the current node. #1 is the % type (Ynumbered, Yappendix, Ynothing). % \def\donoderef#1{% \ifx\lastnode\empty\else \setref{\lastnode}{#1}% \global\let\lastnode=\empty \fi } % @anchor{NAME} -- define xref target at arbitrary point. % \newcount\savesfregister % \def\savesf{\relax \ifhmode \savesfregister=\spacefactor \fi} \def\restoresf{\relax \ifhmode \spacefactor=\savesfregister \fi} \def\anchor#1{\savesf \setref{#1}{Ynothing}\restoresf \ignorespaces} % \setref{NAME}{SNT} defines a cross-reference point NAME (a node or an % anchor), which consists of three parts: % 1) NAME-title - the current sectioning name taken from \lastsection, % or the anchor name. % 2) NAME-snt - section number and type, passed as the SNT arg, or % empty for anchors. % 3) NAME-pg - the page number. % % This is called from \donoderef, \anchor, and \dofloat. In the case of % floats, there is an additional part, which is not written here: % 4) NAME-lof - the text as it should appear in a @listoffloats. % \def\setref#1#2{% \pdfmkdest{#1}% \iflinks {% \atdummies % preserve commands, but don't expand them \edef\writexrdef##1##2{% \write\auxfile{@xrdef{#1-% #1 of \setref, expanded by the \edef ##1}{##2}}% these are parameters of \writexrdef }% \toks0 = \expandafter{\lastsection}% \immediate \writexrdef{title}{\the\toks0 }% \immediate \writexrdef{snt}{\csname #2\endcsname}% \Ynumbered etc. \safewhatsit{\writexrdef{pg}{\folio}}% will be written later, during \shipout }% \fi } % @xref, @pxref, and @ref generate cross-references. For \xrefX, #1 is % the node name, #2 the name of the Info cross-reference, #3 the printed % node name, #4 the name of the Info file, #5 the name of the printed % manual. All but the node name can be omitted. % \def\pxref#1{\putwordsee{} \xrefX[#1,,,,,,,]} \def\xref#1{\putwordSee{} \xrefX[#1,,,,,,,]} \def\ref#1{\xrefX[#1,,,,,,,]} \def\xrefX[#1,#2,#3,#4,#5,#6]{\begingroup \unsepspaces \def\printedmanual{\ignorespaces #5}% \def\printedrefname{\ignorespaces #3}% \setbox1=\hbox{\printedmanual\unskip}% \setbox0=\hbox{\printedrefname\unskip}% \ifdim \wd0 = 0pt % No printed node name was explicitly given. \expandafter\ifx\csname SETxref-automatic-section-title\endcsname\relax % Use the node name inside the square brackets. \def\printedrefname{\ignorespaces #1}% \else % Use the actual chapter/section title appear inside % the square brackets. Use the real section title if we have it. \ifdim \wd1 > 0pt % It is in another manual, so we don't have it. \def\printedrefname{\ignorespaces #1}% \else \ifhavexrefs % We know the real title if we have the xref values. \def\printedrefname{\refx{#1-title}{}}% \else % Otherwise just copy the Info node name. \def\printedrefname{\ignorespaces #1}% \fi% \fi \fi \fi % % Make link in pdf output. \ifpdf {\indexnofonts \turnoffactive % This expands tokens, so do it after making catcode changes, so _ % etc. don't get their TeX definitions. \getfilename{#4}% % % See comments at \activebackslashdouble. {\activebackslashdouble \xdef\pdfxrefdest{#1}% \backslashparens\pdfxrefdest}% % \leavevmode \startlink attr{/Border [0 0 0]}% \ifnum\filenamelength>0 goto file{\the\filename.pdf} name{\pdfxrefdest}% \else goto name{\pdfmkpgn{\pdfxrefdest}}% \fi }% \setcolor{\linkcolor}% \fi % % Float references are printed completely differently: "Figure 1.2" % instead of "[somenode], p.3". We distinguish them by the % LABEL-title being set to a magic string. {% % Have to otherify everything special to allow the \csname to % include an _ in the xref name, etc. \indexnofonts \turnoffactive \expandafter\global\expandafter\let\expandafter\Xthisreftitle \csname XR#1-title\endcsname }% \iffloat\Xthisreftitle % If the user specified the print name (third arg) to the ref, % print it instead of our usual "Figure 1.2". \ifdim\wd0 = 0pt \refx{#1-snt}{}% \else \printedrefname \fi % % if the user also gave the printed manual name (fifth arg), append % "in MANUALNAME". \ifdim \wd1 > 0pt \space \putwordin{} \cite{\printedmanual}% \fi \else % node/anchor (non-float) references. % % If we use \unhbox0 and \unhbox1 to print the node names, TeX does not % insert empty discretionaries after hyphens, which means that it will % not find a line break at a hyphen in a node names. Since some manuals % are best written with fairly long node names, containing hyphens, this % is a loss. Therefore, we give the text of the node name again, so it % is as if TeX is seeing it for the first time. \ifdim \wd1 > 0pt \putwordSection{} ``\printedrefname'' \putwordin{} \cite{\printedmanual}% \else % _ (for example) has to be the character _ for the purposes of the % control sequence corresponding to the node, but it has to expand % into the usual \leavevmode...\vrule stuff for purposes of % printing. So we \turnoffactive for the \refx-snt, back on for the % printing, back off for the \refx-pg. {\turnoffactive % Only output a following space if the -snt ref is nonempty; for % @unnumbered and @anchor, it won't be. \setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}% \ifdim \wd2 > 0pt \refx{#1-snt}\space\fi }% % output the `[mynode]' via a macro so it can be overridden. \xrefprintnodename\printedrefname % % But we always want a comma and a space: ,\space % % output the `page 3'. \turnoffactive \putwordpage\tie\refx{#1-pg}{}% \fi \fi \endlink \endgroup} % This macro is called from \xrefX for the `[nodename]' part of xref % output. It's a separate macro only so it can be changed more easily, % since square brackets don't work well in some documents. Particularly % one that Bob is working on :). % \def\xrefprintnodename#1{[#1]} % Things referred to by \setref. % \def\Ynothing{} \def\Yomitfromtoc{} \def\Ynumbered{% \ifnum\secno=0 \putwordChapter@tie \the\chapno \else \ifnum\subsecno=0 \putwordSection@tie \the\chapno.\the\secno \else \ifnum\subsubsecno=0 \putwordSection@tie \the\chapno.\the\secno.\the\subsecno \else \putwordSection@tie \the\chapno.\the\secno.\the\subsecno.\the\subsubsecno \fi\fi\fi } \def\Yappendix{% \ifnum\secno=0 \putwordAppendix@tie @char\the\appendixno{}% \else \ifnum\subsecno=0 \putwordSection@tie @char\the\appendixno.\the\secno \else \ifnum\subsubsecno=0 \putwordSection@tie @char\the\appendixno.\the\secno.\the\subsecno \else \putwordSection@tie @char\the\appendixno.\the\secno.\the\subsecno.\the\subsubsecno \fi\fi\fi } % Define \refx{NAME}{SUFFIX} to reference a cross-reference string named NAME. % If its value is nonempty, SUFFIX is output afterward. % \def\refx#1#2{% {% \indexnofonts \otherbackslash \expandafter\global\expandafter\let\expandafter\thisrefX \csname XR#1\endcsname }% \ifx\thisrefX\relax % If not defined, say something at least. \angleleft un\-de\-fined\angleright \iflinks \ifhavexrefs \message{\linenumber Undefined cross reference `#1'.}% \else \ifwarnedxrefs\else \global\warnedxrefstrue \message{Cross reference values unknown; you must run TeX again.}% \fi \fi \fi \else % It's defined, so just use it. \thisrefX \fi #2% Output the suffix in any case. } % This is the macro invoked by entries in the aux file. Usually it's % just a \def (we prepend XR to the control sequence name to avoid % collisions). But if this is a float type, we have more work to do. % \def\xrdef#1#2{% {% The node name might contain 8-bit characters, which in our current % implementation are changed to commands like @'e. Don't let these % mess up the control sequence name. \indexnofonts \turnoffactive \xdef\safexrefname{#1}% }% % \expandafter\gdef\csname XR\safexrefname\endcsname{#2}% remember this xref % % Was that xref control sequence that we just defined for a float? \expandafter\iffloat\csname XR\safexrefname\endcsname % it was a float, and we have the (safe) float type in \iffloattype. \expandafter\let\expandafter\floatlist \csname floatlist\iffloattype\endcsname % % Is this the first time we've seen this float type? \expandafter\ifx\floatlist\relax \toks0 = {\do}% yes, so just \do \else % had it before, so preserve previous elements in list. \toks0 = \expandafter{\floatlist\do}% \fi % % Remember this xref in the control sequence \floatlistFLOATTYPE, % for later use in \listoffloats. \expandafter\xdef\csname floatlist\iffloattype\endcsname{\the\toks0 {\safexrefname}}% \fi } % Read the last existing aux file, if any. No error if none exists. % \def\tryauxfile{% \openin 1 \jobname.aux \ifeof 1 \else \readdatafile{aux}% \global\havexrefstrue \fi \closein 1 } \def\setupdatafile{% \catcode`\^^@=\other \catcode`\^^A=\other \catcode`\^^B=\other \catcode`\^^C=\other \catcode`\^^D=\other \catcode`\^^E=\other \catcode`\^^F=\other \catcode`\^^G=\other \catcode`\^^H=\other \catcode`\^^K=\other \catcode`\^^L=\other \catcode`\^^N=\other \catcode`\^^P=\other \catcode`\^^Q=\other \catcode`\^^R=\other \catcode`\^^S=\other \catcode`\^^T=\other \catcode`\^^U=\other \catcode`\^^V=\other \catcode`\^^W=\other \catcode`\^^X=\other \catcode`\^^Z=\other \catcode`\^^[=\other \catcode`\^^\=\other \catcode`\^^]=\other \catcode`\^^^=\other \catcode`\^^_=\other % It was suggested to set the catcode of ^ to 7, which would allow ^^e4 etc. % in xref tags, i.e., node names. But since ^^e4 notation isn't % supported in the main text, it doesn't seem desirable. Furthermore, % that is not enough: for node names that actually contain a ^ % character, we would end up writing a line like this: 'xrdef {'hat % b-title}{'hat b} and \xrdef does a \csname...\endcsname on the first % argument, and \hat is not an expandable control sequence. It could % all be worked out, but why? Either we support ^^ or we don't. % % The other change necessary for this was to define \auxhat: % \def\auxhat{\def^{'hat }}% extra space so ok if followed by letter % and then to call \auxhat in \setq. % \catcode`\^=\other % % Special characters. Should be turned off anyway, but... \catcode`\~=\other \catcode`\[=\other \catcode`\]=\other \catcode`\"=\other \catcode`\_=\other \catcode`\|=\other \catcode`\<=\other \catcode`\>=\other \catcode`\$=\other \catcode`\#=\other \catcode`\&=\other \catcode`\%=\other \catcode`+=\other % avoid \+ for paranoia even though we've turned it off % % This is to support \ in node names and titles, since the \ % characters end up in a \csname. It's easier than % leaving it active and making its active definition an actual \ % character. What I don't understand is why it works in the *value* % of the xrdef. Seems like it should be a catcode12 \, and that % should not typeset properly. But it works, so I'm moving on for % now. --karl, 15jan04. \catcode`\\=\other % % Make the characters 128-255 be printing characters. {% \count1=128 \def\loop{% \catcode\count1=\other \advance\count1 by 1 \ifnum \count1<256 \loop \fi }% }% % % @ is our escape character in .aux files, and we need braces. \catcode`\{=1 \catcode`\}=2 \catcode`\@=0 } \def\readdatafile#1{% \begingroup \setupdatafile \input\jobname.#1 \endgroup} \message{insertions,} % including footnotes. \newcount \footnoteno % The trailing space in the following definition for supereject is % vital for proper filling; pages come out unaligned when you do a % pagealignmacro call if that space before the closing brace is % removed. (Generally, numeric constants should always be followed by a % space to prevent strange expansion errors.) \def\supereject{\par\penalty -20000\footnoteno =0 } % @footnotestyle is meaningful for info output only. \let\footnotestyle=\comment {\catcode `\@=11 % % Auto-number footnotes. Otherwise like plain. \gdef\footnote{% \let\indent=\ptexindent \let\noindent=\ptexnoindent \global\advance\footnoteno by \@ne \edef\thisfootno{$^{\the\footnoteno}$}% % % In case the footnote comes at the end of a sentence, preserve the % extra spacing after we do the footnote number. \let\@sf\empty \ifhmode\edef\@sf{\spacefactor\the\spacefactor}\ptexslash\fi % % Remove inadvertent blank space before typesetting the footnote number. \unskip \thisfootno\@sf \dofootnote }% % Don't bother with the trickery in plain.tex to not require the % footnote text as a parameter. Our footnotes don't need to be so general. % % Oh yes, they do; otherwise, @ifset (and anything else that uses % \parseargline) fails inside footnotes because the tokens are fixed when % the footnote is read. --karl, 16nov96. % \gdef\dofootnote{% \insert\footins\bgroup % We want to typeset this text as a normal paragraph, even if the % footnote reference occurs in (for example) a display environment. % So reset some parameters. \hsize=\pagewidth \interlinepenalty\interfootnotelinepenalty \splittopskip\ht\strutbox % top baseline for broken footnotes \splitmaxdepth\dp\strutbox \floatingpenalty\@MM \leftskip\z@skip \rightskip\z@skip \spaceskip\z@skip \xspaceskip\z@skip \parindent\defaultparindent % \smallfonts \rm % % Because we use hanging indentation in footnotes, a @noindent appears % to exdent this text, so make it be a no-op. makeinfo does not use % hanging indentation so @noindent can still be needed within footnote % text after an @example or the like (not that this is good style). \let\noindent = \relax % % Hang the footnote text off the number. Use \everypar in case the % footnote extends for more than one paragraph. \everypar = {\hang}% \textindent{\thisfootno}% % % Don't crash into the line above the footnote text. Since this % expands into a box, it must come within the paragraph, lest it % provide a place where TeX can split the footnote. \footstrut \futurelet\next\fo@t } }%end \catcode `\@=11 % In case a @footnote appears in a vbox, save the footnote text and create % the real \insert just after the vbox finished. Otherwise, the insertion % would be lost. % Similarly, if a @footnote appears inside an alignment, save the footnote % text to a box and make the \insert when a row of the table is finished. % And the same can be done for other insert classes. --kasal, 16nov03. % Replace the \insert primitive by a cheating macro. % Deeper inside, just make sure that the saved insertions are not spilled % out prematurely. % \def\startsavinginserts{% \ifx \insert\ptexinsert \let\insert\saveinsert \else \let\checkinserts\relax \fi } % This \insert replacement works for both \insert\footins{foo} and % \insert\footins\bgroup foo\egroup, but it doesn't work for \insert27{foo}. % \def\saveinsert#1{% \edef\next{\noexpand\savetobox \makeSAVEname#1}% \afterassignment\next % swallow the left brace \let\temp = } \def\makeSAVEname#1{\makecsname{SAVE\expandafter\gobble\string#1}} \def\savetobox#1{\global\setbox#1 = \vbox\bgroup \unvbox#1} \def\checksaveins#1{\ifvoid#1\else \placesaveins#1\fi} \def\placesaveins#1{% \ptexinsert \csname\expandafter\gobblesave\string#1\endcsname {\box#1}% } % eat @SAVE -- beware, all of them have catcode \other: { \def\dospecials{\do S\do A\do V\do E} \uncatcodespecials % ;-) \gdef\gobblesave @SAVE{} } % initialization: \def\newsaveins #1{% \edef\next{\noexpand\newsaveinsX \makeSAVEname#1}% \next } \def\newsaveinsX #1{% \csname newbox\endcsname #1% \expandafter\def\expandafter\checkinserts\expandafter{\checkinserts \checksaveins #1}% } % initialize: \let\checkinserts\empty \newsaveins\footins \newsaveins\margin % @image. We use the macros from epsf.tex to support this. % If epsf.tex is not installed and @image is used, we complain. % % Check for and read epsf.tex up front. If we read it only at @image % time, we might be inside a group, and then its definitions would get % undone and the next image would fail. \openin 1 = epsf.tex \ifeof 1 \else % Do not bother showing banner with epsf.tex v2.7k (available in % doc/epsf.tex and on ctan). \def\epsfannounce{\toks0 = }% \input epsf.tex \fi \closein 1 % % We will only complain once about lack of epsf.tex. \newif\ifwarnednoepsf \newhelp\noepsfhelp{epsf.tex must be installed for images to work. It is also included in the Texinfo distribution, or you can get it from ftp://tug.org/tex/epsf.tex.} % \def\image#1{% \ifx\epsfbox\undefined \ifwarnednoepsf \else \errhelp = \noepsfhelp \errmessage{epsf.tex not found, images will be ignored}% \global\warnednoepsftrue \fi \else \imagexxx #1,,,,,\finish \fi } % % Arguments to @image: % #1 is (mandatory) image filename; we tack on .eps extension. % #2 is (optional) width, #3 is (optional) height. % #4 is (ignored optional) html alt text. % #5 is (ignored optional) extension. % #6 is just the usual extra ignored arg for parsing this stuff. \newif\ifimagevmode \def\imagexxx#1,#2,#3,#4,#5,#6\finish{\begingroup \catcode`\^^M = 5 % in case we're inside an example \normalturnoffactive % allow _ et al. in names % If the image is by itself, center it. \ifvmode \imagevmodetrue \nobreak\medskip % Usually we'll have text after the image which will insert % \parskip glue, so insert it here too to equalize the space % above and below. \nobreak\vskip\parskip \nobreak \fi % % Leave vertical mode so that indentation from an enclosing % environment such as @quotation is respected. On the other hand, if % it's at the top level, we don't want the normal paragraph indentation. \noindent % % Output the image. \ifpdf \dopdfimage{#1}{#2}{#3}% \else % \epsfbox itself resets \epsf?size at each figure. \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi \setbox0 = \hbox{\ignorespaces #3}\ifdim\wd0 > 0pt \epsfysize=#3\relax \fi \epsfbox{#1.eps}% \fi % \ifimagevmode \medskip \fi % space after the standalone image \endgroup} % @float FLOATTYPE,LABEL,LOC ... @end float for displayed figures, tables, % etc. We don't actually implement floating yet, we always include the % float "here". But it seemed the best name for the future. % \envparseargdef\float{\eatcommaspace\eatcommaspace\dofloat#1, , ,\finish} % There may be a space before second and/or third parameter; delete it. \def\eatcommaspace#1, {#1,} % #1 is the optional FLOATTYPE, the text label for this float, typically % "Figure", "Table", "Example", etc. Can't contain commas. If omitted, % this float will not be numbered and cannot be referred to. % % #2 is the optional xref label. Also must be present for the float to % be referable. % % #3 is the optional positioning argument; for now, it is ignored. It % will somehow specify the positions allowed to float to (here, top, bottom). % % We keep a separate counter for each FLOATTYPE, which we reset at each % chapter-level command. \let\resetallfloatnos=\empty % \def\dofloat#1,#2,#3,#4\finish{% \let\thiscaption=\empty \let\thisshortcaption=\empty % % don't lose footnotes inside @float. % % BEWARE: when the floats start float, we have to issue warning whenever an % insert appears inside a float which could possibly float. --kasal, 26may04 % \startsavinginserts % % We can't be used inside a paragraph. \par % \vtop\bgroup \def\floattype{#1}% \def\floatlabel{#2}% \def\floatloc{#3}% we do nothing with this yet. % \ifx\floattype\empty \let\safefloattype=\empty \else {% % the floattype might have accents or other special characters, % but we need to use it in a control sequence name. \indexnofonts \turnoffactive \xdef\safefloattype{\floattype}% }% \fi % % If label is given but no type, we handle that as the empty type. \ifx\floatlabel\empty \else % We want each FLOATTYPE to be numbered separately (Figure 1, % Table 1, Figure 2, ...). (And if no label, no number.) % \expandafter\getfloatno\csname\safefloattype floatno\endcsname \global\advance\floatno by 1 % {% % This magic value for \lastsection is output by \setref as the % XREFLABEL-title value. \xrefX uses it to distinguish float % labels (which have a completely different output format) from % node and anchor labels. And \xrdef uses it to construct the % lists of floats. % \edef\lastsection{\floatmagic=\safefloattype}% \setref{\floatlabel}{Yfloat}% }% \fi % % start with \parskip glue, I guess. \vskip\parskip % % Don't suppress indentation if a float happens to start a section. \restorefirstparagraphindent } % we have these possibilities: % @float Foo,lbl & @caption{Cap}: Foo 1.1: Cap % @float Foo,lbl & no caption: Foo 1.1 % @float Foo & @caption{Cap}: Foo: Cap % @float Foo & no caption: Foo % @float ,lbl & Caption{Cap}: 1.1: Cap % @float ,lbl & no caption: 1.1 % @float & @caption{Cap}: Cap % @float & no caption: % \def\Efloat{% \let\floatident = \empty % % In all cases, if we have a float type, it comes first. \ifx\floattype\empty \else \def\floatident{\floattype}\fi % % If we have an xref label, the number comes next. \ifx\floatlabel\empty \else \ifx\floattype\empty \else % if also had float type, need tie first. \appendtomacro\floatident{\tie}% \fi % the number. \appendtomacro\floatident{\chaplevelprefix\the\floatno}% \fi % % Start the printed caption with what we've constructed in % \floatident, but keep it separate; we need \floatident again. \let\captionline = \floatident % \ifx\thiscaption\empty \else \ifx\floatident\empty \else \appendtomacro\captionline{: }% had ident, so need a colon between \fi % % caption text. \appendtomacro\captionline{\scanexp\thiscaption}% \fi % % If we have anything to print, print it, with space before. % Eventually this needs to become an \insert. \ifx\captionline\empty \else \vskip.5\parskip \captionline % % Space below caption. \vskip\parskip \fi % % If have an xref label, write the list of floats info. Do this % after the caption, to avoid chance of it being a breakpoint. \ifx\floatlabel\empty \else % Write the text that goes in the lof to the aux file as % \floatlabel-lof. Besides \floatident, we include the short % caption if specified, else the full caption if specified, else nothing. {% \atdummies % % since we read the caption text in the macro world, where ^^M % is turned into a normal character, we have to scan it back, so % we don't write the literal three characters "^^M" into the aux file. \scanexp{% \xdef\noexpand\gtemp{% \ifx\thisshortcaption\empty \thiscaption \else \thisshortcaption \fi }% }% \immediate\write\auxfile{@xrdef{\floatlabel-lof}{\floatident \ifx\gtemp\empty \else : \gtemp \fi}}% }% \fi \egroup % end of \vtop % % place the captured inserts % % BEWARE: when the floats start floating, we have to issue warning % whenever an insert appears inside a float which could possibly % float. --kasal, 26may04 % \checkinserts } % Append the tokens #2 to the definition of macro #1, not expanding either. % \def\appendtomacro#1#2{% \expandafter\def\expandafter#1\expandafter{#1#2}% } % @caption, @shortcaption % \def\caption{\docaption\thiscaption} \def\shortcaption{\docaption\thisshortcaption} \def\docaption{\checkenv\float \bgroup\scanargctxt\defcaption} \def\defcaption#1#2{\egroup \def#1{#2}} % The parameter is the control sequence identifying the counter we are % going to use. Create it if it doesn't exist and assign it to \floatno. \def\getfloatno#1{% \ifx#1\relax % Haven't seen this figure type before. \csname newcount\endcsname #1% % % Remember to reset this floatno at the next chap. \expandafter\gdef\expandafter\resetallfloatnos \expandafter{\resetallfloatnos #1=0 }% \fi \let\floatno#1% } % \setref calls this to get the XREFLABEL-snt value. We want an @xref % to the FLOATLABEL to expand to "Figure 3.1". We call \setref when we % first read the @float command. % \def\Yfloat{\floattype@tie \chaplevelprefix\the\floatno}% % Magic string used for the XREFLABEL-title value, so \xrefX can % distinguish floats from other xref types. \def\floatmagic{!!float!!} % #1 is the control sequence we are passed; we expand into a conditional % which is true if #1 represents a float ref. That is, the magic % \lastsection value which we \setref above. % \def\iffloat#1{\expandafter\doiffloat#1==\finish} % % #1 is (maybe) the \floatmagic string. If so, #2 will be the % (safe) float type for this float. We set \iffloattype to #2. % \def\doiffloat#1=#2=#3\finish{% \def\temp{#1}% \def\iffloattype{#2}% \ifx\temp\floatmagic } % @listoffloats FLOATTYPE - print a list of floats like a table of contents. % \parseargdef\listoffloats{% \def\floattype{#1}% floattype {% % the floattype might have accents or other special characters, % but we need to use it in a control sequence name. \indexnofonts \turnoffactive \xdef\safefloattype{\floattype}% }% % % \xrdef saves the floats as a \do-list in \floatlistSAFEFLOATTYPE. \expandafter\ifx\csname floatlist\safefloattype\endcsname \relax \ifhavexrefs % if the user said @listoffloats foo but never @float foo. \message{\linenumber No `\safefloattype' floats to list.}% \fi \else \begingroup \leftskip=\tocindent % indent these entries like a toc \let\do=\listoffloatsdo \csname floatlist\safefloattype\endcsname \endgroup \fi } % This is called on each entry in a list of floats. We're passed the % xref label, in the form LABEL-title, which is how we save it in the % aux file. We strip off the -title and look up \XRLABEL-lof, which % has the text we're supposed to typeset here. % % Figures without xref labels will not be included in the list (since % they won't appear in the aux file). % \def\listoffloatsdo#1{\listoffloatsdoentry#1\finish} \def\listoffloatsdoentry#1-title\finish{{% % Can't fully expand XR#1-lof because it can contain anything. Just % pass the control sequence. On the other hand, XR#1-pg is just the % page number, and we want to fully expand that so we can get a link % in pdf output. \toksA = \expandafter{\csname XR#1-lof\endcsname}% % % use the same \entry macro we use to generate the TOC and index. \edef\writeentry{\noexpand\entry{\the\toksA}{\csname XR#1-pg\endcsname}}% \writeentry }} \message{localization,} % For single-language documents, @documentlanguage is usually given very % early, just after @documentencoding. Single argument is the language % (de) or locale (de_DE) abbreviation. % { \catcode`\_ = \active \globaldefs=1 \parseargdef\documentlanguage{\begingroup \let_=\normalunderscore % normal _ character for filenames \tex % read txi-??.tex file in plain TeX. % Read the file by the name they passed if it exists. \openin 1 txi-#1.tex \ifeof 1 \documentlanguagetrywithoutunderscore{#1_\finish}% \else \globaldefs = 1 % everything in the txi-LL files needs to persist \input txi-#1.tex \fi \closein 1 \endgroup % end raw TeX \endgroup} % % If they passed de_DE, and txi-de_DE.tex doesn't exist, % try txi-de.tex. % \gdef\documentlanguagetrywithoutunderscore#1_#2\finish{% \openin 1 txi-#1.tex \ifeof 1 \errhelp = \nolanghelp \errmessage{Cannot read language file txi-#1.tex}% \else \globaldefs = 1 % everything in the txi-LL files needs to persist \input txi-#1.tex \fi \closein 1 } }% end of special _ catcode % \newhelp\nolanghelp{The given language definition file cannot be found or is empty. Maybe you need to install it? Putting it in the current directory should work if nowhere else does.} % This macro is called from txi-??.tex files; the first argument is the % \language name to set (without the "\lang@" prefix), the second and % third args are \{left,right}hyphenmin. % % The language names to pass are determined when the format is built. % See the etex.log file created at that time, e.g., % /usr/local/texlive/2008/texmf-var/web2c/pdftex/etex.log. % % With TeX Live 2008, etex now includes hyphenation patterns for all % available languages. This means we can support hyphenation in % Texinfo, at least to some extent. (This still doesn't solve the % accented characters problem.) % \catcode`@=11 \def\txisetlanguage#1#2#3{% % do not set the language if the name is undefined in the current TeX. \expandafter\ifx\csname lang@#1\endcsname \relax \message{no patterns for #1}% \else \global\language = \csname lang@#1\endcsname \fi % but there is no harm in adjusting the hyphenmin values regardless. \global\lefthyphenmin = #2\relax \global\righthyphenmin = #3\relax } % Helpers for encodings. % Set the catcode of characters 128 through 255 to the specified number. % \def\setnonasciicharscatcode#1{% \count255=128 \loop\ifnum\count255<256 \global\catcode\count255=#1\relax \advance\count255 by 1 \repeat } \def\setnonasciicharscatcodenonglobal#1{% \count255=128 \loop\ifnum\count255<256 \catcode\count255=#1\relax \advance\count255 by 1 \repeat } % @documentencoding sets the definition of non-ASCII characters % according to the specified encoding. % \parseargdef\documentencoding{% % Encoding being declared for the document. \def\declaredencoding{\csname #1.enc\endcsname}% % % Supported encodings: names converted to tokens in order to be able % to compare them with \ifx. \def\ascii{\csname US-ASCII.enc\endcsname}% \def\latnine{\csname ISO-8859-15.enc\endcsname}% \def\latone{\csname ISO-8859-1.enc\endcsname}% \def\lattwo{\csname ISO-8859-2.enc\endcsname}% \def\utfeight{\csname UTF-8.enc\endcsname}% % \ifx \declaredencoding \ascii \asciichardefs % \else \ifx \declaredencoding \lattwo \setnonasciicharscatcode\active \lattwochardefs % \else \ifx \declaredencoding \latone \setnonasciicharscatcode\active \latonechardefs % \else \ifx \declaredencoding \latnine \setnonasciicharscatcode\active \latninechardefs % \else \ifx \declaredencoding \utfeight \setnonasciicharscatcode\active \utfeightchardefs % \else \message{Unknown document encoding #1, ignoring.}% % \fi % utfeight \fi % latnine \fi % latone \fi % lattwo \fi % ascii } % A message to be logged when using a character that isn't available % the default font encoding (OT1). % \def\missingcharmsg#1{\message{Character missing in OT1 encoding: #1.}} % Take account of \c (plain) vs. \, (Texinfo) difference. \def\cedilla#1{\ifx\c\ptexc\c{#1}\else\,{#1}\fi} % First, make active non-ASCII characters in order for them to be % correctly categorized when TeX reads the replacement text of % macros containing the character definitions. \setnonasciicharscatcode\active % % Latin1 (ISO-8859-1) character definitions. \def\latonechardefs{% \gdef^^a0{~} \gdef^^a1{\exclamdown} \gdef^^a2{\missingcharmsg{CENT SIGN}} \gdef^^a3{{\pounds}} \gdef^^a4{\missingcharmsg{CURRENCY SIGN}} \gdef^^a5{\missingcharmsg{YEN SIGN}} \gdef^^a6{\missingcharmsg{BROKEN BAR}} \gdef^^a7{\S} \gdef^^a8{\"{}} \gdef^^a9{\copyright} \gdef^^aa{\ordf} \gdef^^ab{\guillemetleft} \gdef^^ac{$\lnot$} \gdef^^ad{\-} \gdef^^ae{\registeredsymbol} \gdef^^af{\={}} % \gdef^^b0{\textdegree} \gdef^^b1{$\pm$} \gdef^^b2{$^2$} \gdef^^b3{$^3$} \gdef^^b4{\'{}} \gdef^^b5{$\mu$} \gdef^^b6{\P} % \gdef^^b7{$^.$} \gdef^^b8{\cedilla\ } \gdef^^b9{$^1$} \gdef^^ba{\ordm} % \gdef^^bb{\guilletright} \gdef^^bc{$1\over4$} \gdef^^bd{$1\over2$} \gdef^^be{$3\over4$} \gdef^^bf{\questiondown} % \gdef^^c0{\`A} \gdef^^c1{\'A} \gdef^^c2{\^A} \gdef^^c3{\~A} \gdef^^c4{\"A} \gdef^^c5{\ringaccent A} \gdef^^c6{\AE} \gdef^^c7{\cedilla C} \gdef^^c8{\`E} \gdef^^c9{\'E} \gdef^^ca{\^E} \gdef^^cb{\"E} \gdef^^cc{\`I} \gdef^^cd{\'I} \gdef^^ce{\^I} \gdef^^cf{\"I} % \gdef^^d0{\DH} \gdef^^d1{\~N} \gdef^^d2{\`O} \gdef^^d3{\'O} \gdef^^d4{\^O} \gdef^^d5{\~O} \gdef^^d6{\"O} \gdef^^d7{$\times$} \gdef^^d8{\O} \gdef^^d9{\`U} \gdef^^da{\'U} \gdef^^db{\^U} \gdef^^dc{\"U} \gdef^^dd{\'Y} \gdef^^de{\TH} \gdef^^df{\ss} % \gdef^^e0{\`a} \gdef^^e1{\'a} \gdef^^e2{\^a} \gdef^^e3{\~a} \gdef^^e4{\"a} \gdef^^e5{\ringaccent a} \gdef^^e6{\ae} \gdef^^e7{\cedilla c} \gdef^^e8{\`e} \gdef^^e9{\'e} \gdef^^ea{\^e} \gdef^^eb{\"e} \gdef^^ec{\`{\dotless i}} \gdef^^ed{\'{\dotless i}} \gdef^^ee{\^{\dotless i}} \gdef^^ef{\"{\dotless i}} % \gdef^^f0{\dh} \gdef^^f1{\~n} \gdef^^f2{\`o} \gdef^^f3{\'o} \gdef^^f4{\^o} \gdef^^f5{\~o} \gdef^^f6{\"o} \gdef^^f7{$\div$} \gdef^^f8{\o} \gdef^^f9{\`u} \gdef^^fa{\'u} \gdef^^fb{\^u} \gdef^^fc{\"u} \gdef^^fd{\'y} \gdef^^fe{\th} \gdef^^ff{\"y} } % Latin9 (ISO-8859-15) encoding character definitions. \def\latninechardefs{% % Encoding is almost identical to Latin1. \latonechardefs % \gdef^^a4{\euro} \gdef^^a6{\v S} \gdef^^a8{\v s} \gdef^^b4{\v Z} \gdef^^b8{\v z} \gdef^^bc{\OE} \gdef^^bd{\oe} \gdef^^be{\"Y} } % Latin2 (ISO-8859-2) character definitions. \def\lattwochardefs{% \gdef^^a0{~} \gdef^^a1{\ogonek{A}} \gdef^^a2{\u{}} \gdef^^a3{\L} \gdef^^a4{\missingcharmsg{CURRENCY SIGN}} \gdef^^a5{\v L} \gdef^^a6{\'S} \gdef^^a7{\S} \gdef^^a8{\"{}} \gdef^^a9{\v S} \gdef^^aa{\cedilla S} \gdef^^ab{\v T} \gdef^^ac{\'Z} \gdef^^ad{\-} \gdef^^ae{\v Z} \gdef^^af{\dotaccent Z} % \gdef^^b0{\textdegree} \gdef^^b1{\ogonek{a}} \gdef^^b2{\ogonek{ }} \gdef^^b3{\l} \gdef^^b4{\'{}} \gdef^^b5{\v l} \gdef^^b6{\'s} \gdef^^b7{\v{}} \gdef^^b8{\cedilla\ } \gdef^^b9{\v s} \gdef^^ba{\cedilla s} \gdef^^bb{\v t} \gdef^^bc{\'z} \gdef^^bd{\H{}} \gdef^^be{\v z} \gdef^^bf{\dotaccent z} % \gdef^^c0{\'R} \gdef^^c1{\'A} \gdef^^c2{\^A} \gdef^^c3{\u A} \gdef^^c4{\"A} \gdef^^c5{\'L} \gdef^^c6{\'C} \gdef^^c7{\cedilla C} \gdef^^c8{\v C} \gdef^^c9{\'E} \gdef^^ca{\ogonek{E}} \gdef^^cb{\"E} \gdef^^cc{\v E} \gdef^^cd{\'I} \gdef^^ce{\^I} \gdef^^cf{\v D} % \gdef^^d0{\DH} \gdef^^d1{\'N} \gdef^^d2{\v N} \gdef^^d3{\'O} \gdef^^d4{\^O} \gdef^^d5{\H O} \gdef^^d6{\"O} \gdef^^d7{$\times$} \gdef^^d8{\v R} \gdef^^d9{\ringaccent U} \gdef^^da{\'U} \gdef^^db{\H U} \gdef^^dc{\"U} \gdef^^dd{\'Y} \gdef^^de{\cedilla T} \gdef^^df{\ss} % \gdef^^e0{\'r} \gdef^^e1{\'a} \gdef^^e2{\^a} \gdef^^e3{\u a} \gdef^^e4{\"a} \gdef^^e5{\'l} \gdef^^e6{\'c} \gdef^^e7{\cedilla c} \gdef^^e8{\v c} \gdef^^e9{\'e} \gdef^^ea{\ogonek{e}} \gdef^^eb{\"e} \gdef^^ec{\v e} \gdef^^ed{\'\i} \gdef^^ee{\^\i} \gdef^^ef{\v d} % \gdef^^f0{\dh} \gdef^^f1{\'n} \gdef^^f2{\v n} \gdef^^f3{\'o} \gdef^^f4{\^o} \gdef^^f5{\H o} \gdef^^f6{\"o} \gdef^^f7{$\div$} \gdef^^f8{\v r} \gdef^^f9{\ringaccent u} \gdef^^fa{\'u} \gdef^^fb{\H u} \gdef^^fc{\"u} \gdef^^fd{\'y} \gdef^^fe{\cedilla t} \gdef^^ff{\dotaccent{}} } % UTF-8 character definitions. % % This code to support UTF-8 is based on LaTeX's utf8.def, with some % changes for Texinfo conventions. It is included here under the GPL by % permission from Frank Mittelbach and the LaTeX team. % \newcount\countUTFx \newcount\countUTFy \newcount\countUTFz \gdef\UTFviiiTwoOctets#1#2{\expandafter \UTFviiiDefined\csname u8:#1\string #2\endcsname} % \gdef\UTFviiiThreeOctets#1#2#3{\expandafter \UTFviiiDefined\csname u8:#1\string #2\string #3\endcsname} % \gdef\UTFviiiFourOctets#1#2#3#4{\expandafter \UTFviiiDefined\csname u8:#1\string #2\string #3\string #4\endcsname} \gdef\UTFviiiDefined#1{% \ifx #1\relax \message{\linenumber Unicode char \string #1 not defined for Texinfo}% \else \expandafter #1% \fi } \begingroup \catcode`\~13 \catcode`\"12 \def\UTFviiiLoop{% \global\catcode\countUTFx\active \uccode`\~\countUTFx \uppercase\expandafter{\UTFviiiTmp}% \advance\countUTFx by 1 \ifnum\countUTFx < \countUTFy \expandafter\UTFviiiLoop \fi} \countUTFx = "C2 \countUTFy = "E0 \def\UTFviiiTmp{% \xdef~{\noexpand\UTFviiiTwoOctets\string~}} \UTFviiiLoop \countUTFx = "E0 \countUTFy = "F0 \def\UTFviiiTmp{% \xdef~{\noexpand\UTFviiiThreeOctets\string~}} \UTFviiiLoop \countUTFx = "F0 \countUTFy = "F4 \def\UTFviiiTmp{% \xdef~{\noexpand\UTFviiiFourOctets\string~}} \UTFviiiLoop \endgroup \begingroup \catcode`\"=12 \catcode`\<=12 \catcode`\.=12 \catcode`\,=12 \catcode`\;=12 \catcode`\!=12 \catcode`\~=13 \gdef\DeclareUnicodeCharacter#1#2{% \countUTFz = "#1\relax \wlog{\space\space defining Unicode char U+#1 (decimal \the\countUTFz)}% \begingroup \parseXMLCharref \def\UTFviiiTwoOctets##1##2{% \csname u8:##1\string ##2\endcsname}% \def\UTFviiiThreeOctets##1##2##3{% \csname u8:##1\string ##2\string ##3\endcsname}% \def\UTFviiiFourOctets##1##2##3##4{% \csname u8:##1\string ##2\string ##3\string ##4\endcsname}% \expandafter\expandafter\expandafter\expandafter \expandafter\expandafter\expandafter \gdef\UTFviiiTmp{#2}% \endgroup} \gdef\parseXMLCharref{% \ifnum\countUTFz < "A0\relax \errhelp = \EMsimple \errmessage{Cannot define Unicode char value < 00A0}% \else\ifnum\countUTFz < "800\relax \parseUTFviiiA,% \parseUTFviiiB C\UTFviiiTwoOctets.,% \else\ifnum\countUTFz < "10000\relax \parseUTFviiiA;% \parseUTFviiiA,% \parseUTFviiiB E\UTFviiiThreeOctets.{,;}% \else \parseUTFviiiA;% \parseUTFviiiA,% \parseUTFviiiA!% \parseUTFviiiB F\UTFviiiFourOctets.{!,;}% \fi\fi\fi } \gdef\parseUTFviiiA#1{% \countUTFx = \countUTFz \divide\countUTFz by 64 \countUTFy = \countUTFz \multiply\countUTFz by 64 \advance\countUTFx by -\countUTFz \advance\countUTFx by 128 \uccode `#1\countUTFx \countUTFz = \countUTFy} \gdef\parseUTFviiiB#1#2#3#4{% \advance\countUTFz by "#10\relax \uccode `#3\countUTFz \uppercase{\gdef\UTFviiiTmp{#2#3#4}}} \endgroup \def\utfeightchardefs{% \DeclareUnicodeCharacter{00A0}{\tie} \DeclareUnicodeCharacter{00A1}{\exclamdown} \DeclareUnicodeCharacter{00A3}{\pounds} \DeclareUnicodeCharacter{00A8}{\"{ }} \DeclareUnicodeCharacter{00A9}{\copyright} \DeclareUnicodeCharacter{00AA}{\ordf} \DeclareUnicodeCharacter{00AB}{\guillemetleft} \DeclareUnicodeCharacter{00AD}{\-} \DeclareUnicodeCharacter{00AE}{\registeredsymbol} \DeclareUnicodeCharacter{00AF}{\={ }} \DeclareUnicodeCharacter{00B0}{\ringaccent{ }} \DeclareUnicodeCharacter{00B4}{\'{ }} \DeclareUnicodeCharacter{00B8}{\cedilla{ }} \DeclareUnicodeCharacter{00BA}{\ordm} \DeclareUnicodeCharacter{00BB}{\guillemetright} \DeclareUnicodeCharacter{00BF}{\questiondown} \DeclareUnicodeCharacter{00C0}{\`A} \DeclareUnicodeCharacter{00C1}{\'A} \DeclareUnicodeCharacter{00C2}{\^A} \DeclareUnicodeCharacter{00C3}{\~A} \DeclareUnicodeCharacter{00C4}{\"A} \DeclareUnicodeCharacter{00C5}{\AA} \DeclareUnicodeCharacter{00C6}{\AE} \DeclareUnicodeCharacter{00C7}{\cedilla{C}} \DeclareUnicodeCharacter{00C8}{\`E} \DeclareUnicodeCharacter{00C9}{\'E} \DeclareUnicodeCharacter{00CA}{\^E} \DeclareUnicodeCharacter{00CB}{\"E} \DeclareUnicodeCharacter{00CC}{\`I} \DeclareUnicodeCharacter{00CD}{\'I} \DeclareUnicodeCharacter{00CE}{\^I} \DeclareUnicodeCharacter{00CF}{\"I} \DeclareUnicodeCharacter{00D0}{\DH} \DeclareUnicodeCharacter{00D1}{\~N} \DeclareUnicodeCharacter{00D2}{\`O} \DeclareUnicodeCharacter{00D3}{\'O} \DeclareUnicodeCharacter{00D4}{\^O} \DeclareUnicodeCharacter{00D5}{\~O} \DeclareUnicodeCharacter{00D6}{\"O} \DeclareUnicodeCharacter{00D8}{\O} \DeclareUnicodeCharacter{00D9}{\`U} \DeclareUnicodeCharacter{00DA}{\'U} \DeclareUnicodeCharacter{00DB}{\^U} \DeclareUnicodeCharacter{00DC}{\"U} \DeclareUnicodeCharacter{00DD}{\'Y} \DeclareUnicodeCharacter{00DE}{\TH} \DeclareUnicodeCharacter{00DF}{\ss} \DeclareUnicodeCharacter{00E0}{\`a} \DeclareUnicodeCharacter{00E1}{\'a} \DeclareUnicodeCharacter{00E2}{\^a} \DeclareUnicodeCharacter{00E3}{\~a} \DeclareUnicodeCharacter{00E4}{\"a} \DeclareUnicodeCharacter{00E5}{\aa} \DeclareUnicodeCharacter{00E6}{\ae} \DeclareUnicodeCharacter{00E7}{\cedilla{c}} \DeclareUnicodeCharacter{00E8}{\`e} \DeclareUnicodeCharacter{00E9}{\'e} \DeclareUnicodeCharacter{00EA}{\^e} \DeclareUnicodeCharacter{00EB}{\"e} \DeclareUnicodeCharacter{00EC}{\`{\dotless{i}}} \DeclareUnicodeCharacter{00ED}{\'{\dotless{i}}} \DeclareUnicodeCharacter{00EE}{\^{\dotless{i}}} \DeclareUnicodeCharacter{00EF}{\"{\dotless{i}}} \DeclareUnicodeCharacter{00F0}{\dh} \DeclareUnicodeCharacter{00F1}{\~n} \DeclareUnicodeCharacter{00F2}{\`o} \DeclareUnicodeCharacter{00F3}{\'o} \DeclareUnicodeCharacter{00F4}{\^o} \DeclareUnicodeCharacter{00F5}{\~o} \DeclareUnicodeCharacter{00F6}{\"o} \DeclareUnicodeCharacter{00F8}{\o} \DeclareUnicodeCharacter{00F9}{\`u} \DeclareUnicodeCharacter{00FA}{\'u} \DeclareUnicodeCharacter{00FB}{\^u} \DeclareUnicodeCharacter{00FC}{\"u} \DeclareUnicodeCharacter{00FD}{\'y} \DeclareUnicodeCharacter{00FE}{\th} \DeclareUnicodeCharacter{00FF}{\"y} \DeclareUnicodeCharacter{0100}{\=A} \DeclareUnicodeCharacter{0101}{\=a} \DeclareUnicodeCharacter{0102}{\u{A}} \DeclareUnicodeCharacter{0103}{\u{a}} \DeclareUnicodeCharacter{0104}{\ogonek{A}} \DeclareUnicodeCharacter{0105}{\ogonek{a}} \DeclareUnicodeCharacter{0106}{\'C} \DeclareUnicodeCharacter{0107}{\'c} \DeclareUnicodeCharacter{0108}{\^C} \DeclareUnicodeCharacter{0109}{\^c} \DeclareUnicodeCharacter{0118}{\ogonek{E}} \DeclareUnicodeCharacter{0119}{\ogonek{e}} \DeclareUnicodeCharacter{010A}{\dotaccent{C}} \DeclareUnicodeCharacter{010B}{\dotaccent{c}} \DeclareUnicodeCharacter{010C}{\v{C}} \DeclareUnicodeCharacter{010D}{\v{c}} \DeclareUnicodeCharacter{010E}{\v{D}} \DeclareUnicodeCharacter{0112}{\=E} \DeclareUnicodeCharacter{0113}{\=e} \DeclareUnicodeCharacter{0114}{\u{E}} \DeclareUnicodeCharacter{0115}{\u{e}} \DeclareUnicodeCharacter{0116}{\dotaccent{E}} \DeclareUnicodeCharacter{0117}{\dotaccent{e}} \DeclareUnicodeCharacter{011A}{\v{E}} \DeclareUnicodeCharacter{011B}{\v{e}} \DeclareUnicodeCharacter{011C}{\^G} \DeclareUnicodeCharacter{011D}{\^g} \DeclareUnicodeCharacter{011E}{\u{G}} \DeclareUnicodeCharacter{011F}{\u{g}} \DeclareUnicodeCharacter{0120}{\dotaccent{G}} \DeclareUnicodeCharacter{0121}{\dotaccent{g}} \DeclareUnicodeCharacter{0124}{\^H} \DeclareUnicodeCharacter{0125}{\^h} \DeclareUnicodeCharacter{0128}{\~I} \DeclareUnicodeCharacter{0129}{\~{\dotless{i}}} \DeclareUnicodeCharacter{012A}{\=I} \DeclareUnicodeCharacter{012B}{\={\dotless{i}}} \DeclareUnicodeCharacter{012C}{\u{I}} \DeclareUnicodeCharacter{012D}{\u{\dotless{i}}} \DeclareUnicodeCharacter{0130}{\dotaccent{I}} \DeclareUnicodeCharacter{0131}{\dotless{i}} \DeclareUnicodeCharacter{0132}{IJ} \DeclareUnicodeCharacter{0133}{ij} \DeclareUnicodeCharacter{0134}{\^J} \DeclareUnicodeCharacter{0135}{\^{\dotless{j}}} \DeclareUnicodeCharacter{0139}{\'L} \DeclareUnicodeCharacter{013A}{\'l} \DeclareUnicodeCharacter{0141}{\L} \DeclareUnicodeCharacter{0142}{\l} \DeclareUnicodeCharacter{0143}{\'N} \DeclareUnicodeCharacter{0144}{\'n} \DeclareUnicodeCharacter{0147}{\v{N}} \DeclareUnicodeCharacter{0148}{\v{n}} \DeclareUnicodeCharacter{014C}{\=O} \DeclareUnicodeCharacter{014D}{\=o} \DeclareUnicodeCharacter{014E}{\u{O}} \DeclareUnicodeCharacter{014F}{\u{o}} \DeclareUnicodeCharacter{0150}{\H{O}} \DeclareUnicodeCharacter{0151}{\H{o}} \DeclareUnicodeCharacter{0152}{\OE} \DeclareUnicodeCharacter{0153}{\oe} \DeclareUnicodeCharacter{0154}{\'R} \DeclareUnicodeCharacter{0155}{\'r} \DeclareUnicodeCharacter{0158}{\v{R}} \DeclareUnicodeCharacter{0159}{\v{r}} \DeclareUnicodeCharacter{015A}{\'S} \DeclareUnicodeCharacter{015B}{\'s} \DeclareUnicodeCharacter{015C}{\^S} \DeclareUnicodeCharacter{015D}{\^s} \DeclareUnicodeCharacter{015E}{\cedilla{S}} \DeclareUnicodeCharacter{015F}{\cedilla{s}} \DeclareUnicodeCharacter{0160}{\v{S}} \DeclareUnicodeCharacter{0161}{\v{s}} \DeclareUnicodeCharacter{0162}{\cedilla{t}} \DeclareUnicodeCharacter{0163}{\cedilla{T}} \DeclareUnicodeCharacter{0164}{\v{T}} \DeclareUnicodeCharacter{0168}{\~U} \DeclareUnicodeCharacter{0169}{\~u} \DeclareUnicodeCharacter{016A}{\=U} \DeclareUnicodeCharacter{016B}{\=u} \DeclareUnicodeCharacter{016C}{\u{U}} \DeclareUnicodeCharacter{016D}{\u{u}} \DeclareUnicodeCharacter{016E}{\ringaccent{U}} \DeclareUnicodeCharacter{016F}{\ringaccent{u}} \DeclareUnicodeCharacter{0170}{\H{U}} \DeclareUnicodeCharacter{0171}{\H{u}} \DeclareUnicodeCharacter{0174}{\^W} \DeclareUnicodeCharacter{0175}{\^w} \DeclareUnicodeCharacter{0176}{\^Y} \DeclareUnicodeCharacter{0177}{\^y} \DeclareUnicodeCharacter{0178}{\"Y} \DeclareUnicodeCharacter{0179}{\'Z} \DeclareUnicodeCharacter{017A}{\'z} \DeclareUnicodeCharacter{017B}{\dotaccent{Z}} \DeclareUnicodeCharacter{017C}{\dotaccent{z}} \DeclareUnicodeCharacter{017D}{\v{Z}} \DeclareUnicodeCharacter{017E}{\v{z}} \DeclareUnicodeCharacter{01C4}{D\v{Z}} \DeclareUnicodeCharacter{01C5}{D\v{z}} \DeclareUnicodeCharacter{01C6}{d\v{z}} \DeclareUnicodeCharacter{01C7}{LJ} \DeclareUnicodeCharacter{01C8}{Lj} \DeclareUnicodeCharacter{01C9}{lj} \DeclareUnicodeCharacter{01CA}{NJ} \DeclareUnicodeCharacter{01CB}{Nj} \DeclareUnicodeCharacter{01CC}{nj} \DeclareUnicodeCharacter{01CD}{\v{A}} \DeclareUnicodeCharacter{01CE}{\v{a}} \DeclareUnicodeCharacter{01CF}{\v{I}} \DeclareUnicodeCharacter{01D0}{\v{\dotless{i}}} \DeclareUnicodeCharacter{01D1}{\v{O}} \DeclareUnicodeCharacter{01D2}{\v{o}} \DeclareUnicodeCharacter{01D3}{\v{U}} \DeclareUnicodeCharacter{01D4}{\v{u}} \DeclareUnicodeCharacter{01E2}{\={\AE}} \DeclareUnicodeCharacter{01E3}{\={\ae}} \DeclareUnicodeCharacter{01E6}{\v{G}} \DeclareUnicodeCharacter{01E7}{\v{g}} \DeclareUnicodeCharacter{01E8}{\v{K}} \DeclareUnicodeCharacter{01E9}{\v{k}} \DeclareUnicodeCharacter{01F0}{\v{\dotless{j}}} \DeclareUnicodeCharacter{01F1}{DZ} \DeclareUnicodeCharacter{01F2}{Dz} \DeclareUnicodeCharacter{01F3}{dz} \DeclareUnicodeCharacter{01F4}{\'G} \DeclareUnicodeCharacter{01F5}{\'g} \DeclareUnicodeCharacter{01F8}{\`N} \DeclareUnicodeCharacter{01F9}{\`n} \DeclareUnicodeCharacter{01FC}{\'{\AE}} \DeclareUnicodeCharacter{01FD}{\'{\ae}} \DeclareUnicodeCharacter{01FE}{\'{\O}} \DeclareUnicodeCharacter{01FF}{\'{\o}} \DeclareUnicodeCharacter{021E}{\v{H}} \DeclareUnicodeCharacter{021F}{\v{h}} \DeclareUnicodeCharacter{0226}{\dotaccent{A}} \DeclareUnicodeCharacter{0227}{\dotaccent{a}} \DeclareUnicodeCharacter{0228}{\cedilla{E}} \DeclareUnicodeCharacter{0229}{\cedilla{e}} \DeclareUnicodeCharacter{022E}{\dotaccent{O}} \DeclareUnicodeCharacter{022F}{\dotaccent{o}} \DeclareUnicodeCharacter{0232}{\=Y} \DeclareUnicodeCharacter{0233}{\=y} \DeclareUnicodeCharacter{0237}{\dotless{j}} \DeclareUnicodeCharacter{02DB}{\ogonek{ }} \DeclareUnicodeCharacter{1E02}{\dotaccent{B}} \DeclareUnicodeCharacter{1E03}{\dotaccent{b}} \DeclareUnicodeCharacter{1E04}{\udotaccent{B}} \DeclareUnicodeCharacter{1E05}{\udotaccent{b}} \DeclareUnicodeCharacter{1E06}{\ubaraccent{B}} \DeclareUnicodeCharacter{1E07}{\ubaraccent{b}} \DeclareUnicodeCharacter{1E0A}{\dotaccent{D}} \DeclareUnicodeCharacter{1E0B}{\dotaccent{d}} \DeclareUnicodeCharacter{1E0C}{\udotaccent{D}} \DeclareUnicodeCharacter{1E0D}{\udotaccent{d}} \DeclareUnicodeCharacter{1E0E}{\ubaraccent{D}} \DeclareUnicodeCharacter{1E0F}{\ubaraccent{d}} \DeclareUnicodeCharacter{1E1E}{\dotaccent{F}} \DeclareUnicodeCharacter{1E1F}{\dotaccent{f}} \DeclareUnicodeCharacter{1E20}{\=G} \DeclareUnicodeCharacter{1E21}{\=g} \DeclareUnicodeCharacter{1E22}{\dotaccent{H}} \DeclareUnicodeCharacter{1E23}{\dotaccent{h}} \DeclareUnicodeCharacter{1E24}{\udotaccent{H}} \DeclareUnicodeCharacter{1E25}{\udotaccent{h}} \DeclareUnicodeCharacter{1E26}{\"H} \DeclareUnicodeCharacter{1E27}{\"h} \DeclareUnicodeCharacter{1E30}{\'K} \DeclareUnicodeCharacter{1E31}{\'k} \DeclareUnicodeCharacter{1E32}{\udotaccent{K}} \DeclareUnicodeCharacter{1E33}{\udotaccent{k}} \DeclareUnicodeCharacter{1E34}{\ubaraccent{K}} \DeclareUnicodeCharacter{1E35}{\ubaraccent{k}} \DeclareUnicodeCharacter{1E36}{\udotaccent{L}} \DeclareUnicodeCharacter{1E37}{\udotaccent{l}} \DeclareUnicodeCharacter{1E3A}{\ubaraccent{L}} \DeclareUnicodeCharacter{1E3B}{\ubaraccent{l}} \DeclareUnicodeCharacter{1E3E}{\'M} \DeclareUnicodeCharacter{1E3F}{\'m} \DeclareUnicodeCharacter{1E40}{\dotaccent{M}} \DeclareUnicodeCharacter{1E41}{\dotaccent{m}} \DeclareUnicodeCharacter{1E42}{\udotaccent{M}} \DeclareUnicodeCharacter{1E43}{\udotaccent{m}} \DeclareUnicodeCharacter{1E44}{\dotaccent{N}} \DeclareUnicodeCharacter{1E45}{\dotaccent{n}} \DeclareUnicodeCharacter{1E46}{\udotaccent{N}} \DeclareUnicodeCharacter{1E47}{\udotaccent{n}} \DeclareUnicodeCharacter{1E48}{\ubaraccent{N}} \DeclareUnicodeCharacter{1E49}{\ubaraccent{n}} \DeclareUnicodeCharacter{1E54}{\'P} \DeclareUnicodeCharacter{1E55}{\'p} \DeclareUnicodeCharacter{1E56}{\dotaccent{P}} \DeclareUnicodeCharacter{1E57}{\dotaccent{p}} \DeclareUnicodeCharacter{1E58}{\dotaccent{R}} \DeclareUnicodeCharacter{1E59}{\dotaccent{r}} \DeclareUnicodeCharacter{1E5A}{\udotaccent{R}} \DeclareUnicodeCharacter{1E5B}{\udotaccent{r}} \DeclareUnicodeCharacter{1E5E}{\ubaraccent{R}} \DeclareUnicodeCharacter{1E5F}{\ubaraccent{r}} \DeclareUnicodeCharacter{1E60}{\dotaccent{S}} \DeclareUnicodeCharacter{1E61}{\dotaccent{s}} \DeclareUnicodeCharacter{1E62}{\udotaccent{S}} \DeclareUnicodeCharacter{1E63}{\udotaccent{s}} \DeclareUnicodeCharacter{1E6A}{\dotaccent{T}} \DeclareUnicodeCharacter{1E6B}{\dotaccent{t}} \DeclareUnicodeCharacter{1E6C}{\udotaccent{T}} \DeclareUnicodeCharacter{1E6D}{\udotaccent{t}} \DeclareUnicodeCharacter{1E6E}{\ubaraccent{T}} \DeclareUnicodeCharacter{1E6F}{\ubaraccent{t}} \DeclareUnicodeCharacter{1E7C}{\~V} \DeclareUnicodeCharacter{1E7D}{\~v} \DeclareUnicodeCharacter{1E7E}{\udotaccent{V}} \DeclareUnicodeCharacter{1E7F}{\udotaccent{v}} \DeclareUnicodeCharacter{1E80}{\`W} \DeclareUnicodeCharacter{1E81}{\`w} \DeclareUnicodeCharacter{1E82}{\'W} \DeclareUnicodeCharacter{1E83}{\'w} \DeclareUnicodeCharacter{1E84}{\"W} \DeclareUnicodeCharacter{1E85}{\"w} \DeclareUnicodeCharacter{1E86}{\dotaccent{W}} \DeclareUnicodeCharacter{1E87}{\dotaccent{w}} \DeclareUnicodeCharacter{1E88}{\udotaccent{W}} \DeclareUnicodeCharacter{1E89}{\udotaccent{w}} \DeclareUnicodeCharacter{1E8A}{\dotaccent{X}} \DeclareUnicodeCharacter{1E8B}{\dotaccent{x}} \DeclareUnicodeCharacter{1E8C}{\"X} \DeclareUnicodeCharacter{1E8D}{\"x} \DeclareUnicodeCharacter{1E8E}{\dotaccent{Y}} \DeclareUnicodeCharacter{1E8F}{\dotaccent{y}} \DeclareUnicodeCharacter{1E90}{\^Z} \DeclareUnicodeCharacter{1E91}{\^z} \DeclareUnicodeCharacter{1E92}{\udotaccent{Z}} \DeclareUnicodeCharacter{1E93}{\udotaccent{z}} \DeclareUnicodeCharacter{1E94}{\ubaraccent{Z}} \DeclareUnicodeCharacter{1E95}{\ubaraccent{z}} \DeclareUnicodeCharacter{1E96}{\ubaraccent{h}} \DeclareUnicodeCharacter{1E97}{\"t} \DeclareUnicodeCharacter{1E98}{\ringaccent{w}} \DeclareUnicodeCharacter{1E99}{\ringaccent{y}} \DeclareUnicodeCharacter{1EA0}{\udotaccent{A}} \DeclareUnicodeCharacter{1EA1}{\udotaccent{a}} \DeclareUnicodeCharacter{1EB8}{\udotaccent{E}} \DeclareUnicodeCharacter{1EB9}{\udotaccent{e}} \DeclareUnicodeCharacter{1EBC}{\~E} \DeclareUnicodeCharacter{1EBD}{\~e} \DeclareUnicodeCharacter{1ECA}{\udotaccent{I}} \DeclareUnicodeCharacter{1ECB}{\udotaccent{i}} \DeclareUnicodeCharacter{1ECC}{\udotaccent{O}} \DeclareUnicodeCharacter{1ECD}{\udotaccent{o}} \DeclareUnicodeCharacter{1EE4}{\udotaccent{U}} \DeclareUnicodeCharacter{1EE5}{\udotaccent{u}} \DeclareUnicodeCharacter{1EF2}{\`Y} \DeclareUnicodeCharacter{1EF3}{\`y} \DeclareUnicodeCharacter{1EF4}{\udotaccent{Y}} \DeclareUnicodeCharacter{1EF8}{\~Y} \DeclareUnicodeCharacter{1EF9}{\~y} \DeclareUnicodeCharacter{2013}{--} \DeclareUnicodeCharacter{2014}{---} \DeclareUnicodeCharacter{2018}{\quoteleft} \DeclareUnicodeCharacter{2019}{\quoteright} \DeclareUnicodeCharacter{201A}{\quotesinglbase} \DeclareUnicodeCharacter{201C}{\quotedblleft} \DeclareUnicodeCharacter{201D}{\quotedblright} \DeclareUnicodeCharacter{201E}{\quotedblbase} \DeclareUnicodeCharacter{2022}{\bullet} \DeclareUnicodeCharacter{2026}{\dots} \DeclareUnicodeCharacter{2039}{\guilsinglleft} \DeclareUnicodeCharacter{203A}{\guilsinglright} \DeclareUnicodeCharacter{20AC}{\euro} \DeclareUnicodeCharacter{2192}{\expansion} \DeclareUnicodeCharacter{21D2}{\result} \DeclareUnicodeCharacter{2212}{\minus} \DeclareUnicodeCharacter{2217}{\point} \DeclareUnicodeCharacter{2261}{\equiv} }% end of \utfeightchardefs % US-ASCII character definitions. \def\asciichardefs{% nothing need be done \relax } % Make non-ASCII characters printable again for compatibility with % existing Texinfo documents that may use them, even without declaring a % document encoding. % \setnonasciicharscatcode \other \message{formatting,} \newdimen\defaultparindent \defaultparindent = 15pt \chapheadingskip = 15pt plus 4pt minus 2pt \secheadingskip = 12pt plus 3pt minus 2pt \subsecheadingskip = 9pt plus 2pt minus 2pt % Prevent underfull vbox error messages. \vbadness = 10000 % Don't be so finicky about underfull hboxes, either. \hbadness = 2000 % Following George Bush, get rid of widows and orphans. \widowpenalty=10000 \clubpenalty=10000 % Use TeX 3.0's \emergencystretch to help line breaking, but if we're % using an old version of TeX, don't do anything. We want the amount of % stretch added to depend on the line length, hence the dependence on % \hsize. We call this whenever the paper size is set. % \def\setemergencystretch{% \ifx\emergencystretch\thisisundefined % Allow us to assign to \emergencystretch anyway. \def\emergencystretch{\dimen0}% \else \emergencystretch = .15\hsize \fi } % Parameters in order: 1) textheight; 2) textwidth; % 3) voffset; 4) hoffset; 5) binding offset; 6) topskip; % 7) physical page height; 8) physical page width. % % We also call \setleading{\textleading}, so the caller should define % \textleading. The caller should also set \parskip. % \def\internalpagesizes#1#2#3#4#5#6#7#8{% \voffset = #3\relax \topskip = #6\relax \splittopskip = \topskip % \vsize = #1\relax \advance\vsize by \topskip \outervsize = \vsize \advance\outervsize by 2\topandbottommargin \pageheight = \vsize % \hsize = #2\relax \outerhsize = \hsize \advance\outerhsize by 0.5in \pagewidth = \hsize % \normaloffset = #4\relax \bindingoffset = #5\relax % \ifpdf \pdfpageheight #7\relax \pdfpagewidth #8\relax % if we don't reset these, they will remain at "1 true in" of % whatever layout pdftex was dumped with. \pdfhorigin = 1 true in \pdfvorigin = 1 true in \fi % \setleading{\textleading} % \parindent = \defaultparindent \setemergencystretch } % @letterpaper (the default). \def\letterpaper{{\globaldefs = 1 \parskip = 3pt plus 2pt minus 1pt \textleading = 13.2pt % % If page is nothing but text, make it come out even. \internalpagesizes{607.2pt}{6in}% that's 46 lines {\voffset}{.25in}% {\bindingoffset}{36pt}% {11in}{8.5in}% }} % Use @smallbook to reset parameters for 7x9.25 trim size. \def\smallbook{{\globaldefs = 1 \parskip = 2pt plus 1pt \textleading = 12pt % \internalpagesizes{7.5in}{5in}% {-.2in}{0in}% {\bindingoffset}{16pt}% {9.25in}{7in}% % \lispnarrowing = 0.3in \tolerance = 700 \hfuzz = 1pt \contentsrightmargin = 0pt \defbodyindent = .5cm }} % Use @smallerbook to reset parameters for 6x9 trim size. % (Just testing, parameters still in flux.) \def\smallerbook{{\globaldefs = 1 \parskip = 1.5pt plus 1pt \textleading = 12pt % \internalpagesizes{7.4in}{4.8in}% {-.2in}{-.4in}% {0pt}{14pt}% {9in}{6in}% % \lispnarrowing = 0.25in \tolerance = 700 \hfuzz = 1pt \contentsrightmargin = 0pt \defbodyindent = .4cm }} % Use @afourpaper to print on European A4 paper. \def\afourpaper{{\globaldefs = 1 \parskip = 3pt plus 2pt minus 1pt \textleading = 13.2pt % % Double-side printing via postscript on Laserjet 4050 % prints double-sided nicely when \bindingoffset=10mm and \hoffset=-6mm. % To change the settings for a different printer or situation, adjust % \normaloffset until the front-side and back-side texts align. Then % do the same for \bindingoffset. You can set these for testing in % your texinfo source file like this: % @tex % \global\normaloffset = -6mm % \global\bindingoffset = 10mm % @end tex \internalpagesizes{673.2pt}{160mm}% that's 51 lines {\voffset}{\hoffset}% {\bindingoffset}{44pt}% {297mm}{210mm}% % \tolerance = 700 \hfuzz = 1pt \contentsrightmargin = 0pt \defbodyindent = 5mm }} % Use @afivepaper to print on European A5 paper. % From romildo@urano.iceb.ufop.br, 2 July 2000. % He also recommends making @example and @lisp be small. \def\afivepaper{{\globaldefs = 1 \parskip = 2pt plus 1pt minus 0.1pt \textleading = 12.5pt % \internalpagesizes{160mm}{120mm}% {\voffset}{\hoffset}% {\bindingoffset}{8pt}% {210mm}{148mm}% % \lispnarrowing = 0.2in \tolerance = 800 \hfuzz = 1.2pt \contentsrightmargin = 0pt \defbodyindent = 2mm \tableindent = 12mm }} % A specific text layout, 24x15cm overall, intended for A4 paper. \def\afourlatex{{\globaldefs = 1 \afourpaper \internalpagesizes{237mm}{150mm}% {\voffset}{4.6mm}% {\bindingoffset}{7mm}% {297mm}{210mm}% % % Must explicitly reset to 0 because we call \afourpaper. \globaldefs = 0 }} % Use @afourwide to print on A4 paper in landscape format. \def\afourwide{{\globaldefs = 1 \afourpaper \internalpagesizes{241mm}{165mm}% {\voffset}{-2.95mm}% {\bindingoffset}{7mm}% {297mm}{210mm}% \globaldefs = 0 }} % @pagesizes TEXTHEIGHT[,TEXTWIDTH] % Perhaps we should allow setting the margins, \topskip, \parskip, % and/or leading, also. Or perhaps we should compute them somehow. % \parseargdef\pagesizes{\pagesizesyyy #1,,\finish} \def\pagesizesyyy#1,#2,#3\finish{{% \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \hsize=#2\relax \fi \globaldefs = 1 % \parskip = 3pt plus 2pt minus 1pt \setleading{\textleading}% % \dimen0 = #1\relax \advance\dimen0 by \voffset % \dimen2 = \hsize \advance\dimen2 by \normaloffset % \internalpagesizes{#1}{\hsize}% {\voffset}{\normaloffset}% {\bindingoffset}{44pt}% {\dimen0}{\dimen2}% }} % Set default to letter. % \letterpaper \message{and turning on texinfo input format.} % DEL is a comment character, in case @c does not suffice. \catcode`\^^? = 14 % Define macros to output various characters with catcode for normal text. \catcode`\"=\other \catcode`\~=\other \catcode`\^=\other \catcode`\_=\other \catcode`\|=\other \catcode`\<=\other \catcode`\>=\other \catcode`\+=\other \catcode`\$=\other \def\normaldoublequote{"} \def\normaltilde{~} \def\normalcaret{^} \def\normalunderscore{_} \def\normalverticalbar{|} \def\normalless{<} \def\normalgreater{>} \def\normalplus{+} \def\normaldollar{$}%$ font-lock fix % This macro is used to make a character print one way in \tt % (where it can probably be output as-is), and another way in other fonts, % where something hairier probably needs to be done. % % #1 is what to print if we are indeed using \tt; #2 is what to print % otherwise. Since all the Computer Modern typewriter fonts have zero % interword stretch (and shrink), and it is reasonable to expect all % typewriter fonts to have this, we can check that font parameter. % \def\ifusingtt#1#2{\ifdim \fontdimen3\font=0pt #1\else #2\fi} % Same as above, but check for italic font. Actually this also catches % non-italic slanted fonts since it is impossible to distinguish them from % italic fonts. But since this is only used by $ and it uses \sl anyway % this is not a problem. \def\ifusingit#1#2{\ifdim \fontdimen1\font>0pt #1\else #2\fi} % Turn off all special characters except @ % (and those which the user can use as if they were ordinary). % Most of these we simply print from the \tt font, but for some, we can % use math or other variants that look better in normal text. \catcode`\"=\active \def\activedoublequote{{\tt\char34}} \let"=\activedoublequote \catcode`\~=\active \def~{{\tt\char126}} \chardef\hat=`\^ \catcode`\^=\active \def^{{\tt \hat}} \catcode`\_=\active \def_{\ifusingtt\normalunderscore\_} \let\realunder=_ % Subroutine for the previous macro. \def\_{\leavevmode \kern.07em \vbox{\hrule width.3em height.1ex}\kern .07em } \catcode`\|=\active \def|{{\tt\char124}} \chardef \less=`\< \catcode`\<=\active \def<{{\tt \less}} \chardef \gtr=`\> \catcode`\>=\active \def>{{\tt \gtr}} \catcode`\+=\active \def+{{\tt \char 43}} \catcode`\$=\active \def${\ifusingit{{\sl\$}}\normaldollar}%$ font-lock fix % If a .fmt file is being used, characters that might appear in a file % name cannot be active until we have parsed the command line. % So turn them off again, and have \everyjob (or @setfilename) turn them on. % \otherifyactive is called near the end of this file. \def\otherifyactive{\catcode`+=\other \catcode`\_=\other} % Used sometimes to turn off (effectively) the active characters even after % parsing them. \def\turnoffactive{% \normalturnoffactive \otherbackslash } \catcode`\@=0 % \backslashcurfont outputs one backslash character in current font, % as in \char`\\. \global\chardef\backslashcurfont=`\\ \global\let\rawbackslashxx=\backslashcurfont % let existing .??s files work % \realbackslash is an actual character `\' with catcode other, and % \doublebackslash is two of them (for the pdf outlines). {\catcode`\\=\other @gdef@realbackslash{\} @gdef@doublebackslash{\\}} % In texinfo, backslash is an active character; it prints the backslash % in fixed width font. \catcode`\\=\active @def@normalbackslash{{@tt@backslashcurfont}} % On startup, @fixbackslash assigns: % @let \ = @normalbackslash % \rawbackslash defines an active \ to do \backslashcurfont. % \otherbackslash defines an active \ to be a literal `\' character with % catcode other. @gdef@rawbackslash{@let\=@backslashcurfont} @gdef@otherbackslash{@let\=@realbackslash} % Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of % the literal character `\'. % @def@normalturnoffactive{% @let\=@normalbackslash @let"=@normaldoublequote @let~=@normaltilde @let^=@normalcaret @let_=@normalunderscore @let|=@normalverticalbar @let<=@normalless @let>=@normalgreater @let+=@normalplus @let$=@normaldollar %$ font-lock fix @markupsetuplqdefault @markupsetuprqdefault @unsepspaces } % Make _ and + \other characters, temporarily. % This is canceled by @fixbackslash. @otherifyactive % If a .fmt file is being used, we don't want the `\input texinfo' to show up. % That is what \eatinput is for; after that, the `\' should revert to printing % a backslash. % @gdef@eatinput input texinfo{@fixbackslash} @global@let\ = @eatinput % On the other hand, perhaps the file did not have a `\input texinfo'. Then % the first `\' in the file would cause an error. This macro tries to fix % that, assuming it is called before the first `\' could plausibly occur. % Also turn back on active characters that might appear in the input % file name, in case not using a pre-dumped format. % @gdef@fixbackslash{% @ifx\@eatinput @let\ = @normalbackslash @fi @catcode`+=@active @catcode`@_=@active } % Say @foo, not \foo, in error messages. @escapechar = `@@ % These look ok in all fonts, so just make them not special. @catcode`@& = @other @catcode`@# = @other @catcode`@% = @other @c Finally, make ` and ' active, so that txicodequoteundirected and @c txicodequotebacktick work right in, e.g., @w{@code{`foo'}}. If we @c don't make ` and ' active, @code will not get them as active chars. @c Do this last of all since we use ` in the previous @catcode assignments. @catcode`@'=@active @catcode`@`=@active @markupsetuplqdefault @markupsetuprqdefault @c Gnulib now utterly and painfully insists on no trailing whitespace. @c So we have to nuke it. @c Local variables: @c eval: (add-hook 'write-file-hooks 'time-stamp) @c eval: (add-hook 'write-file-hooks 'nuke-trailing-whitespace) @c page-delimiter: "^\\\\message" @c time-stamp-start: "def\\\\texinfoversion{" @c time-stamp-format: "%:y-%02m-%02d.%02H" @c time-stamp-end: "}" @c End: @c vim:sw=2: @ignore arch-tag: e1b36e32-c96e-4135-a41a-0b2efa2ea115 @end ignore ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/build-aux/config.sub���������������������������������������������������������0000755�0001750�0001750�00000102240�11672675561�015603� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 # Free Software Foundation, Inc. timestamp='2009-04-17' # 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., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Please send patches to <config-patches@gnu.org>. 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 <config-patches@gnu.org>." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray) os= basic_machine=$1 ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nios | nios2 \ | ns16k | ns32k \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aros) basic_machine=i386-pc os=-aros ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dicos) basic_machine=i686-pc os=-dicos ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; 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 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tic55x | c55x*) basic_machine=tic55x-unknown os=-coff ;; tic6x | c6x*) basic_machine=tic6x-unknown os=-coff ;; tile*) basic_machine=tile-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; z80-*-coff) basic_machine=z80-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -kopensolaris* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/build-aux/snippet/�����������������������������������������������������������0000775�0001750�0001750�00000000000�11676051670�015356� 5����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/build-aux/snippet/arg-nonnull.h����������������������������������������������0000664�0001750�0001750�00000002300�11672675561�017705� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* A C macro for declaring that specific arguments must not be NULL. Copyright (C) 2009-2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools that the values passed as arguments n, ..., m must be non-NULL pointers. n = 1 stands for the first argument, n = 2 for the second argument etc. */ #ifndef _GL_ARG_NONNULL # if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) # else # define _GL_ARG_NONNULL(params) # endif #endif ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/build-aux/snippet/_Noreturn.h������������������������������������������������0000664�0001750�0001750�00000000420�11672675561�017425� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef _Noreturn # if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \ || 0x5110 <= __SUNPRO_C) # define _Noreturn __attribute__ ((__noreturn__)) # elif 1200 <= _MSC_VER # define _Noreturn __declspec (noreturn) # else # define _Noreturn # endif #endif ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/build-aux/snippet/c++defs.h��������������������������������������������������0000664�0001750�0001750�00000026753�11672675561�016705� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* C++ compatible function declaration macros. Copyright (C) 2010-2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef _GL_CXXDEFS_H #define _GL_CXXDEFS_H /* The three most frequent use cases of these macros are: * For providing a substitute for a function that is missing on some platforms, but is declared and works fine on the platforms on which it exists: #if @GNULIB_FOO@ # if !@HAVE_FOO@ _GL_FUNCDECL_SYS (foo, ...); # endif _GL_CXXALIAS_SYS (foo, ...); _GL_CXXALIASWARN (foo); #elif defined GNULIB_POSIXCHECK ... #endif * For providing a replacement for a function that exists on all platforms, but is broken/insufficient and needs to be replaced on some platforms: #if @GNULIB_FOO@ # if @REPLACE_FOO@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef foo # define foo rpl_foo # endif _GL_FUNCDECL_RPL (foo, ...); _GL_CXXALIAS_RPL (foo, ...); # else _GL_CXXALIAS_SYS (foo, ...); # endif _GL_CXXALIASWARN (foo); #elif defined GNULIB_POSIXCHECK ... #endif * For providing a replacement for a function that exists on some platforms but is broken/insufficient and needs to be replaced on some of them and is additionally either missing or undeclared on some other platforms: #if @GNULIB_FOO@ # if @REPLACE_FOO@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef foo # define foo rpl_foo # endif _GL_FUNCDECL_RPL (foo, ...); _GL_CXXALIAS_RPL (foo, ...); # else # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ _GL_FUNCDECL_SYS (foo, ...); # endif _GL_CXXALIAS_SYS (foo, ...); # endif _GL_CXXALIASWARN (foo); #elif defined GNULIB_POSIXCHECK ... #endif */ /* _GL_EXTERN_C declaration; performs the declaration with C linkage. */ #if defined __cplusplus # define _GL_EXTERN_C extern "C" #else # define _GL_EXTERN_C extern #endif /* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); declares a replacement function, named rpl_func, with the given prototype, consisting of return type, parameters, and attributes. Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) #define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ _GL_EXTERN_C rettype rpl_func parameters_and_attributes /* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); declares the system function, named func, with the given prototype, consisting of return type, parameters, and attributes. Example: _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); */ #define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ _GL_EXTERN_C rettype func parameters_and_attributes /* _GL_CXXALIAS_RPL (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to rpl_func, if GNULIB_NAMESPACE is defined. Example: _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); */ #define _GL_CXXALIAS_RPL(func,rettype,parameters) \ _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) #if defined __cplusplus && defined GNULIB_NAMESPACE # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ namespace GNULIB_NAMESPACE \ { \ rettype (*const func) parameters = ::rpl_func; \ } \ _GL_EXTERN_C int _gl_cxxalias_dummy #else # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ _GL_EXTERN_C int _gl_cxxalias_dummy #endif /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different declaration. A cast is used to silence the "invalid conversion" error that would otherwise occur. */ #if defined __cplusplus && defined GNULIB_NAMESPACE # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ namespace GNULIB_NAMESPACE \ { \ rettype (*const func) parameters = \ reinterpret_cast<rettype(*)parameters>(::rpl_func); \ } \ _GL_EXTERN_C int _gl_cxxalias_dummy #else # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ _GL_EXTERN_C int _gl_cxxalias_dummy #endif /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE is defined. Example: _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); */ #if defined __cplusplus && defined GNULIB_NAMESPACE /* If we were to write rettype (*const func) parameters = ::func; like above in _GL_CXXALIAS_RPL_1, the compiler could optimize calls better (remove an indirection through a 'static' pointer variable), but then the _GL_CXXALIASWARN macro below would cause a warning not only for uses of ::func but also for uses of GNULIB_NAMESPACE::func. */ # define _GL_CXXALIAS_SYS(func,rettype,parameters) \ namespace GNULIB_NAMESPACE \ { \ static rettype (*func) parameters = ::func; \ } \ _GL_EXTERN_C int _gl_cxxalias_dummy #else # define _GL_CXXALIAS_SYS(func,rettype,parameters) \ _GL_EXTERN_C int _gl_cxxalias_dummy #endif /* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); is like _GL_CXXALIAS_SYS (func, rettype, parameters); except that the C function func may have a slightly different declaration. A cast is used to silence the "invalid conversion" error that would otherwise occur. */ #if defined __cplusplus && defined GNULIB_NAMESPACE # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ namespace GNULIB_NAMESPACE \ { \ static rettype (*func) parameters = \ reinterpret_cast<rettype(*)parameters>(::func); \ } \ _GL_EXTERN_C int _gl_cxxalias_dummy #else # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ _GL_EXTERN_C int _gl_cxxalias_dummy #endif /* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); is like _GL_CXXALIAS_SYS (func, rettype, parameters); except that the C function is picked among a set of overloaded functions, namely the one with rettype2 and parameters2. Two consecutive casts are used to silence the "cannot find a match" and "invalid conversion" errors that would otherwise occur. */ #if defined __cplusplus && defined GNULIB_NAMESPACE /* The outer cast must be a reinterpret_cast. The inner cast: When the function is defined as a set of overloaded functions, it works as a static_cast<>, choosing the designated variant. When the function is defined as a single variant, it works as a reinterpret_cast<>. The parenthesized cast syntax works both ways. */ # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ namespace GNULIB_NAMESPACE \ { \ static rettype (*func) parameters = \ reinterpret_cast<rettype(*)parameters>( \ (rettype2(*)parameters2)(::func)); \ } \ _GL_EXTERN_C int _gl_cxxalias_dummy #else # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ _GL_EXTERN_C int _gl_cxxalias_dummy #endif /* _GL_CXXALIASWARN (func); causes a warning to be emitted when ::func is used but not when GNULIB_NAMESPACE::func is used. func must be defined without overloaded variants. */ #if defined __cplusplus && defined GNULIB_NAMESPACE # define _GL_CXXALIASWARN(func) \ _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) # define _GL_CXXALIASWARN_1(func,namespace) \ _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>, we enable the warning only when not optimizing. */ # if !__OPTIMIZE__ # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING # define _GL_CXXALIASWARN_2(func,namespace) \ extern __typeof__ (func) func # else # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_EXTERN_C int _gl_cxxalias_dummy # endif #else # define _GL_CXXALIASWARN(func) \ _GL_EXTERN_C int _gl_cxxalias_dummy #endif /* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); causes a warning to be emitted when the given overloaded variant of ::func is used but not when GNULIB_NAMESPACE::func is used. */ #if defined __cplusplus && defined GNULIB_NAMESPACE # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ GNULIB_NAMESPACE) # define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>, we enable the warning only when not optimizing. */ # if !__OPTIMIZE__ # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ extern __typeof__ (func) func # else # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ _GL_EXTERN_C int _gl_cxxalias_dummy # endif #else # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ _GL_EXTERN_C int _gl_cxxalias_dummy #endif #endif /* _GL_CXXDEFS_H */ ���������������������source-highlight-3.1.6/build-aux/snippet/warn-on-use.h����������������������������������������������0000664�0001750�0001750�00000012016�11672675561�017631� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* A C macro for emitting warnings if a function is used. Copyright (C) 2010-2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration for FUNCTION which will then trigger a compiler warning containing the text of "literal string" anywhere that function is called, if supported by the compiler. If the compiler does not support this feature, the macro expands to an unused extern declaration. This macro is useful for marking a function as a potential portability trap, with the intent that "literal string" include instructions on the replacement function that should be used instead. However, one of the reasons that a function is a portability trap is if it has the wrong signature. Declaring FUNCTION with a different signature in C is a compilation error, so this macro must use the same type as any existing declaration so that programs that avoid the problematic FUNCTION do not fail to compile merely because they included a header that poisoned the function. But this implies that _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already have a declaration. Use of this macro implies that there must not be any other macro hiding the declaration of FUNCTION; but undefining FUNCTION first is part of the poisoning process anyway (although for symbols that are provided only via a macro, the result is a compilation error rather than a warning containing "literal string"). Also note that in C++, it is only safe to use if FUNCTION has no overloads. For an example, it is possible to poison 'getline' by: - adding a call to gl_WARN_ON_USE_PREPARE([[#include <stdio.h>]], [getline]) in configure.ac, which potentially defines HAVE_RAW_DECL_GETLINE - adding this code to a header that wraps the system <stdio.h>: #undef getline #if HAVE_RAW_DECL_GETLINE _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" "not universally present; use the gnulib module getline"); #endif It is not possible to directly poison global variables. But it is possible to write a wrapper accessor function, and poison that (less common usage, like &environ, will cause a compilation error rather than issue the nice warning, but the end result of informing the developer about their portability problem is still achieved): #if HAVE_RAW_DECL_ENVIRON static inline char ***rpl_environ (void) { return &environ; } _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); # undef environ # define environ (*rpl_environ ()) #endif */ #ifndef _GL_WARN_ON_USE # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ extern __typeof__ (function) function __attribute__ ((__warning__ (message))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ extern __typeof__ (function) function # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif /* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") is like _GL_WARN_ON_USE (function, "string"), except that the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ extern rettype function parameters_and_attributes \ __attribute__ ((__warning__ (msg))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ extern rettype function parameters_and_attributes # else /* Unsupported. */ # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif /* _GL_WARN_EXTERN_C declaration; performs the declaration with C linkage. */ #ifndef _GL_WARN_EXTERN_C # if defined __cplusplus # define _GL_WARN_EXTERN_C extern "C" # else # define _GL_WARN_EXTERN_C extern # endif #endif ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/build-aux/depcomp������������������������������������������������������������0000755�0001750�0001750�00000044267�11672675561�015213� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2009-04-28.21; # UTC # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free # Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>. case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by `PROGRAMS ARGS'. object Object file output by `PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputing dependencies. libtool Whether libtool is used (yes/no). Report bugs to <bug-automake@gnu.org>. EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u="sed s,\\\\\\\\,/,g" depmode=msvisualcpp fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' ' ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts `$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; icc) # Intel's C compiler understands `-MD -MF file'. However on # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h # which is wrong. We want: # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using \ : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" # Add `dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a # static library. This mechanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # generates 2 separate objects for the 2 libraries. These two # compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 tmpdepfile2=$dir$base.o.d # libtool 1.5 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.o.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d tmpdepfile4=$dir$base.d "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for `:' # in the target name. This is to cope with DOS-style filenames: # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. "$@" $dashmflag | sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/build-aux/missing������������������������������������������������������������0000755�0001750�0001750�00000026233�11672675561�015226� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2009-04-28.21; # UTC # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, # 2008, 2009 Free Software Foundation, Inc. # Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case $1 in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' autom4te touch the output file, or create a stub one automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and \`g' are ignored when checking the name. Send bug reports to <bug-automake@gnu.org>." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; esac # normalize program name to check for. program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). This is about non-GNU programs, so use $1 not # $program. case $1 in lex*|yacc*) # Not GNU programs, they don't have --version. ;; tar*) if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then exit 1 fi ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case $program in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case $f in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te*) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison*|yacc*) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi if test ! -f y.tab.h; then echo >y.tab.h fi if test ! -f y.tab.c; then echo 'main() { return 0; }' >y.tab.c fi ;; lex*|flex*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if test ! -f lex.yy.c; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit $? fi ;; makeinfo*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n ' /^@setfilename/{ s/.* \([^ ]*\) *$/\1/ p q }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi # If the file does not exist, the user really needs makeinfo; # let's fail without touching anything. test -f $file || exit 1 touch $file ;; tar*) shift # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case $firstarg in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case $firstarg in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/configure.ac�����������������������������������������������������������������0000644�0001750�0001750�00000025742�11672675561�014227� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Copyright (C) 1999-2009 Lorenzo Bettini <http://www.lorenzobettini.it> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. dnl Process this file with autoconf to produce a configure script. AC_INIT(source-highlight,3.1.6) # this is requested for the install-data-local of doxygen documentation AC_PREREQ([2.62]) AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_MACRO_DIR([m4]) dnl for automake AM_CONFIG_HEADER(config.h) AM_INIT_AUTOMAKE($PACKAGE_NAME, $PACKAGE_VERSION) #API version (often = GENERIC_MAJOR_VERSION.GENERIC_MINOR_VERSION) #API_VERSION=1.0 #AC_SUBST(API_VERSION) #shared library versioning LIBRARY_VERSION=4:0:0 # | | | # +------+ | +---+ # | | | # current:revision:age # | | | # | | +- increment if interfaces have been added # | | set to zero if interfaces have been removed # | | or changed # | +- increment if source code has changed # | set to zero if current is incremented # +- increment if interfaces have been added, removed or changed AC_SUBST(LIBRARY_VERSION) AC_DEFINE_UNQUOTED(LIBRARY_VERSION, "$LIBRARY_VERSION") AC_SUBST(source_highlightdatadir) AC_SUBST(source_highlightdocdir) AC_SUBST(source_highlightlibdocdir) AC_SUBST(source_highlightlibexampledir) AC_SUBST(bash_completiondir) source_highlightdatadir=$datadir/source-highlight source_highlightdocdir=$docdir source_highlightlibdocdir=$docdir/api source_highlightlibexampledir=$docdir/examples bash_completiondir=$sysconfdir/bash_completion.d dnl the namespace and header directory LIBRARY_NAMESPACE=srchilite AC_SUBST(LIBRARY_NAMESPACE) dnl Checks for C compiler. AC_PROG_CC dnl Use of GnuLib gl_EARLY dnl add options for non GNU compilers AC_NONGNU_FLAGS dnl Checks for typedefs, structures, and compiler characteristics. AC_TYPE_SIZE_T AC_CHECK_HEADERS([libintl.h]) AC_CHECK_HEADERS([stddef.h]) dnl If on SCO UNIX, add `-lintl' to output variable `LIBS' AC_SCO_INTL dnl for Cygwin32 environment dnl AM_CYGWIN32 (obsolete) dnl AC_CYGWIN AC_EXEEXT dnl Checks for C++ compiler. AC_PROG_CXX AC_LANG_CPLUSPLUS AC_PROG_AWK AC_PROG_INSTALL AM_PROG_LIBTOOL dnl test for --enable-warnings command line option AC_ARG_ENABLE( warnings, [ --enable-warnings enable compiler warnings], AC_COMPILE_WARNINGS ) dnl check for STL AC_CXX_HAVE_STL dnl check for sstream.h AC_CXX_HAVE_SSTREAM dnl check for ios_base AC_CXX_HAVE_IOS_BASE dnl check for Boost regular expression library AX_BOOST_BASE([1.33.1]) AX_BOOST_REGEX dnl AC_CHECK_HEADERS([boost/shared_ptr.hpp]) dnl it's no use searching for shared_ptr.hpp: it's already included in boost base dnl test for ch-root feature AC_SUBST(CHROOT_INPUT_DIR) AC_ARG_ENABLE( input-chroot, [ --enable-input-chroot=DIR change the root input dir], if test $enableval = yes || test $enableval = no; then echo "configure: error: you must specify a path for --enable-input-chroot" 1>&2; exit 1; else CHROOT_INPUT_DIR=$enableval; fi, CHROOT_INPUT_DIR= ) AC_DEFINE_UNQUOTED(CHROOT_INPUT_DIR, "$CHROOT_INPUT_DIR") dnl AC_ARG_ENABLE( bash-completion-dir, dnl [ --bash-completion-dir=DIR specify directory for bash completion files dnl @<:@default=/etc/bash_completion.d@:>@], if test $enableval = yes || test $enableval = no; then echo "configure: error: you must specify a path for --bash-completion-dir" 1>&2; exit 1; else BASH_COMPLETION_DIR=$enableval; fi, BASH_COMPLETION_DIR="/etc/bash_completion.d/" ) AC_ARG_WITH([bash-completion], AS_HELP_STRING([--with-bash-completion@<:@=DIR@:>@], [install bash_completion conf file (default is yes) - it is possible to specify bash_completion's config file directory (default is SYSCONFDIR/bash_completion.d)]), [ if test "$withval" = "no"; then BASH_COMPLETION_DIR="" elif test "$withval" = "yes"; then BASH_COMPLETION_DIR=$sysconfdir/bash_completion.d else BASH_COMPLETION_DIR="$withval" fi ], [BASH_COMPLETION_DIR=$sysconfdir/bash_completion.d]) AC_SUBST(BASH_COMPLETION_DIR) dnl for yacc or bison AC_PROG_YACC dnl for lex or flex AM_PROG_LEX dnl Checks for libraries. dnl Replace 'main' with a function in -lfl: dnl we don't need lexlibrary dnl AC_CHECK_LIB(fl, main) dnl check for Electric Fence library, but do not link it automatically AC_HAVE_LIBRARY(libefence.a, [LIBS="$LIBS"]) dnl if (f)lex library is not present (yywrap won't be found) we provide dnl a simple implementation (see yywrap.cc) which will be included in dnl added objs and linked against the program (see src/Makefile.am) dnl this works with flex generated files (I don't know about others) AC_REPLACE_FUNCS(yywrap) dnl Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS(unistd.h) # For gnulib. gl_INIT dnl needed by readtags.c AC_TYPE_OFF_T dnl this is only for developers who change src/cmdline.ggo file dnl GNU gengetopt can be found at http://www.gnu.org/software/gengetopt AC_PATH_PROGS(GENGETOPT, gengetopt) AM_CONDITIONAL(NO_GENGETOPT, test -z "$ac_cv_path_GENGETOPT" ) dnl this is only for developers who use double dispatch dnl doublecpp can be found at http://www.lorenzobettini.it/software/doublecpp AC_PATH_PROGS(DOUBLECPP, doublecpp) AM_CONDITIONAL(NO_DOUBLECPP, test -z "$ac_cv_path_DOUBLECPP" ) dnl this is for testing purpose and development AC_PATH_PROGS(VALGRIND, valgrind) dnl this is only for developers who use change command line options AC_PATH_PROGS(HELP2MAN, help2man) AM_CONDITIONAL(NO_HELP2MAN, test -z "$ac_cv_path_HELP2MAN" ) dnl this is for generating references AC_PATH_PROGS(CTAGS, ctags exuberant-ctags) if test -n "$ac_cv_path_CTAGS"; then AC_CTAGS_FLAGS AM_CONDITIONAL(NO_CTAGS, test "$ac_cv_ctags_flags" = "no" ) else AM_CONDITIONAL(NO_CTAGS, test -z "$ac_cv_path_CTAGS" ) fi # Check for doxygen program. AC_ARG_WITH([doxygen], [AS_HELP_STRING([--with-doxygen], [build doxygen documentation for the api of the library])], [AC_PROG_TRY_DOXYGEN], [with_doxygen=check]) AM_CONDITIONAL([HAVE_DOXYGEN],[test -n "$DOXYGEN"]) dnl ******************* dnl added by me dnl ******************* AC_PATH_PROGS(BASH_SHELL, bash sh) dnl set some flags if it's bison AC_SUBST(YFLAGS)dnl YFLAGS="$YFLAGS -d" AC_MSG_CHECKING( checking if it's bison ) if test "$ac_cv_prog_YACC" = "bison -y"; then YFLAGS="$YFLAGS -o y.tab.c -l" AC_MSG_RESULT( $ac_cv_prog_YACC ) else YFLAGS="$YFLAGS -l" AC_MSG_RESULT( no: it's $YACC ) fi dnl CXXFLAGS="-DSOURCE_HIGHLIGHT_DATA_DIR=\\\"$source_highlightdatadir\\\" $CXXFLAGS" AC_PATH_PROGS(TAR, tar gtar) AC_PATH_PROGS(TEXI2HTML, texi2html) AH_TEMPLATE(CHROOT_INPUT_DIR) AH_TEMPLATE(LIBRARY_VERSION) dnl compute relative paths dnl adl_COMPUTE_STANDARD_RELATIVE_PATHS adl_COMPUTE_RELATIVE_PATHS([bindir:datadir:bin_to_data]) source_highlight_lang_dir="$bin_to_data/source-highlight" adl_NORMALIZE_PATH([source_highlight_lang_dir], prefix) source_highlight_absolute_lang_dir=$source_highlightdatadir adl_NORMALIZE_PATH([source_highlight_absolute_lang_dir], prefix) AC_DEFINE_UNQUOTED([RELATIVEDATADIR], ["$source_highlight_lang_dir"], [Define to the source-highlight data directory relative to installation path.]) AC_DEFINE_DIR([ABSOLUTEDATADIR], [datadir/source-highlight], [Define to the source-highlight data directory absolute to installation path.]) bash_completiondir="${BASH_COMPLETION_DIR}" AM_CONDITIONAL(USE_BASH_COMPLETION, test "${BASH_COMPLETION_DIR}" != "") AM_MAINTAINER_MODE if test "x$ac_cv_cxx_have_sstream" != "xyes"; then dnl generate the replacement for sstream AC_CONFIG_LINKS([sstream:_sstream]) fi AC_CONFIG_FILES( [ Makefile source-highlight.pc m4/Makefile gl/Makefile src/Makefile src/java2html src/cpp2html src/src-hilite-lesspipe.sh doc/Makefile lib/Makefile lib/srchilite/Makefile lib/srchilite/srchilite.doxyfile lib/tests/Makefile lib/examples/Makefile lib/compat/Makefile tests/Makefile tests/output_dir/Makefile source-highlight.spec]) AC_CONFIG_FILES([tests/valgrind_tests.sh], [chmod +x tests/valgrind_tests.sh]) AC_CONFIG_FILES([tests/valgrind_suppressions.sh], [chmod +x tests/valgrind_suppressions.sh]) AC_CONFIG_FILES([tests/valgrind_test.sh], [chmod +x tests/valgrind_test.sh]) AC_CONFIG_FILES([lib/tests/valgrind_test.sh], [chmod +x lib/tests/valgrind_test.sh]) AC_CONFIG_FILES([doc/shjs_css_transform.sh], [chmod +x doc/shjs_css_transform.sh]) AC_CONFIG_FILES([doc/gen_style_example.sh], [chmod +x doc/gen_style_example.sh]) AC_OUTPUT if test "$ax_cv_boost_regex" = "yes"; then if test -z "$BOOST_REGEX_LIB"; then AC_MSG_ERROR([ ERROR! Boost::regex library is installed, but you must specify the suffix with --with-boost-regex at configure for instance, --with-boost-regex=boost_regex-gcc-1_31]) else echo "" echo "Good - your configure finished. Start make now" echo "" fi else AC_MSG_ERROR([ ERROR! Boost::regex library not installed. Please install it (download at http://www.boost.org/)]) fi echo " These programs are NOT required, and are useful only for source-highlight developers Gengetopt.........: $GENGETOPT Doublecpp.........: $DOUBLECPP Valgrind..........: $VALGRIND " echo " ($PACKAGE_NAME) version $PACKAGE_VERSION Prefix.........: $prefix Using Boost....: $BOOST_REGEX_LIB C++ Compiler...: $CXX $CXXFLAGS $CPPFLAGS Linker.........: $LD $LDFLAGS $LIBS Doxygen........: ${DOXYGEN:-NONE or not enabled} Help2Man.......: ${HELP2MAN:-NONE} Ctags..........: ${CTAGS:-NONE} " if test -z "$ac_cv_path_HELP2MAN"; then AC_MSG_WARN([ help2man is not installed so the man page will not be updated in case command line options are changed. This is important for maintainers only, though.]) fi if test -z "$ac_cv_path_CTAGS"; then AC_MSG_WARN([ ctags is not installed so you won't be able to generate references (--gen-references). You can find it here http://ctags.sourceforge.net ]) else if test "$ac_cv_ctags_flags" = "no"; then AC_MSG_WARN([ The ctags you have on your system cannot be used by source-highlight (make sure you have a ctags that support --excmd option, e.g., exuberant ctags, You can find it here http://ctags.sourceforge.net). so you won't be able to generate references (--gen-references). ]) fi fi if test -z "$DOXYGEN"; then echo "-----------------------------------------" echo " No Doxygen program found - continuing" echo " without Doxygen documentation support." echo " (it must be enabled with --with-doxygen)" echo "-----------------------------------------" fi if test "${BASH_COMPLETION_DIR}" != ""; then echo "Good: you're using bash_completion! dir: $BASH_COMPLETION_DIR" else echo "you're not using bash_completion (I'm not installing its config file)." BASH_COMPLETION_DIR="" fi echo "" ������������������������������source-highlight-3.1.6/acinclude.m4�����������������������������������������������������������������0000644�0001750�0001750�00000042204�11672675560�014121� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������dnl @synopsis AC_CTAGS_FLAGS dnl dnl check whether it's the correct version of ctags AC_DEFUN([AC_CTAGS_FLAGS], [AC_CACHE_CHECK(whether ${CTAGS} accept --excmd, ac_cv_ctags_flags, [echo 'void f(){}' > conftest.c if test -z "`${CTAGS} --excmd=n -f conftags conftest.c 2>&1`"; then ac_cv_ctags_flags=yes else ac_cv_ctags_flags=no fi rm -f conftest* rm -f conftags* ])]) dnl @synopsis AC_COMPILE_WARNINGS dnl dnl Set the maximum warning verbosity according to compiler used. dnl Currently supports g++ and gcc. dnl This macro must be put after AC_PROG_CC and AC_PROG_CXX in dnl configure.in dnl dnl @author Loic Dachary <loic@senga.org> dnl AC_DEFUN([AC_COMPILE_WARNINGS], [AC_MSG_CHECKING(maximum warning verbosity option) if test -n "$CXX" then if test "$GXX" = "yes" then ac_compile_warnings_opt='-Wall' fi CXXFLAGS="$CXXFLAGS $ac_compile_warnings_opt" ac_compile_warnings_msg="$ac_compile_warnings_opt for C++" fi if test -n "$CC" then if test "$GCC" = "yes" then ac_compile_warnings_opt='-Wall' fi CFLAGS="$CFLAGS $ac_compile_warnings_opt" ac_compile_warnings_msg="$ac_compile_warnings_msg $ac_compile_warnings_opt for C" fi AC_MSG_RESULT($ac_compile_warnings_msg) unset ac_compile_warnings_msg unset ac_compile_warnings_opt ]) dnl Copyright (C) 2001 Lorenzo Bettini <http://www.lorenzobettini.it> dnl dnl This program 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 @synopsis AC_NONGNU_FLAGS dnl dnl check if the non-GNU C compiler accepts -Aa (HP-UX) AC_DEFUN([AC_NONGNU_FLAGS], [ if test -z "$GCC"; then AC_CC_AA_FLAG if test $ac_cv_cc_aa_flag = yes; then CFLAGS="$CFLAGS -Aa" fi fi ]) dnl @synopsis AC_CC_AA_FLAG dnl dnl check if the C compiler accepts -Aa (HP-UX) AC_DEFUN([AC_CC_AA_FLAG], [AC_CACHE_CHECK(whether ${CC-cc} accepts -Aa, ac_cv_cc_aa_flag, [echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -Aa -c conftest.c 2>&1`"; then ac_cv_cc_aa_flag=yes else ac_cv_cc_aa_flag=no fi rm -f conftest* ])]) dnl @synopsis AC_CXX_NAMESPACES dnl dnl If the compiler can prevent names clashes using namespaces, define dnl HAVE_NAMESPACES. dnl dnl @author Luc Maisonobe dnl AC_DEFUN([AC_CXX_NAMESPACES], [AC_CACHE_CHECK(whether the compiler implements namespaces, ac_cv_cxx_namespaces, [AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_TRY_COMPILE([namespace Outer { namespace Inner { int i = 0; }}], [using namespace Outer::Inner; return i;], ac_cv_cxx_namespaces=yes, ac_cv_cxx_namespaces=no) AC_LANG_RESTORE ]) if test "$ac_cv_cxx_namespaces" = yes; then AC_DEFINE(HAVE_NAMESPACES,,[define if the compiler implements namespaces]) fi ]) dnl @synopsis AC_CXX_HAVE_STL dnl dnl If the compiler supports the Standard Template Library, define HAVE_STL. dnl dnl @author Luc Maisonobe dnl AC_DEFUN([AC_CXX_HAVE_STL], [AC_CACHE_CHECK(whether the compiler supports Standard Template Library, ac_cv_cxx_have_stl, [AC_REQUIRE([AC_CXX_NAMESPACES]) AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_TRY_COMPILE([#include <list> #include <deque> #ifdef HAVE_NAMESPACES using namespace std; #endif],[list<int> x; x.push_back(5); list<int>::iterator iter = x.begin(); if (iter != x.end()) ++iter; return 0;], ac_cv_cxx_have_stl=yes, ac_cv_cxx_have_stl=no) AC_LANG_RESTORE ]) if test "$ac_cv_cxx_have_stl" = yes; then AC_DEFINE(HAVE_STL,,[define if the compiler supports Standard Template Library]) fi ]) dnl @synopsis AC_CXX_HAVE_SSTREAM dnl dnl If the C++ library has a working stringstream, define HAVE_SSTREAM. dnl dnl @author Ben Stanley dnl AC_DEFUN([AC_CXX_HAVE_SSTREAM], [AC_CACHE_CHECK(whether the compiler has stringstream, ac_cv_cxx_have_sstream, [AC_REQUIRE([AC_CXX_NAMESPACES]) AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_TRY_COMPILE([#include <sstream> #ifdef HAVE_NAMESPACES using namespace std; #endif],[stringstream message; message << "Hello"; return 0;], ac_cv_cxx_have_sstream=yes, ac_cv_cxx_have_sstream=no) AC_LANG_RESTORE ]) if test "$ac_cv_cxx_have_sstream" = yes; then AC_DEFINE(HAVE_SSTREAM,,[define if the compiler has stringstream]) fi ]) dnl Check whether ios_base is defined, otherwise use ios dnl Author, Lorenzo Bettini, http://www.lorenzobettini.it AC_DEFUN([AC_CXX_HAVE_IOS_BASE], [AC_CACHE_CHECK(whether the compiler has ios_base, ac_cv_cxx_have_ios_base, [AC_REQUIRE([AC_CXX_NAMESPACES]) AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_TRY_COMPILE([#include <fstream> #ifdef HAVE_NAMESPACES using namespace std; #endif],[ifstream file ("foo", ios_base::binary); return 0;], ac_cv_cxx_have_ios_base=yes, ac_cv_cxx_have_ios_base=no) AC_LANG_RESTORE ]) if test "$ac_cv_cxx_have_sstream" = no; then AC_DEFINE_UNQUOTED(ios_base,ios,[Define to ios if the compiler does not provide ios_base]) fi ]) dnl @synopsis adl_NORMALIZE_PATH(VARNAME, [REFERENCE_STRING]) dnl dnl Perform some cleanups on the value of $VARNAME (interpreted as a dnl path): dnl dnl - empty paths are changed to '.' dnl - trailing slashes are removed dnl - repeated slashes are squeezed except a leading doubled slash '//' dnl (which might indicate a networked disk on some OS). dnl dnl REFERENCE_STRING is used to turn '/' into '\' and vice-versa: if dnl REFERENCE_STRING contains some backslashes, all slashes and dnl backslashes are turned into backslashes, otherwise they are all dnl turned into slashes. dnl dnl This makes processing of DOS filenames quite easier, because you dnl can turn a filename to the Unix notation, make your processing, and dnl turn it back to original notation. dnl dnl filename='A:\FOO\\BAR\' dnl old_filename="$filename" dnl # Switch to the unix notation dnl adl_NORMALIZE_PATH([filename], ["/"]) dnl # now we have $filename = 'A:/FOO/BAR' and we can process it as if dnl # it was a Unix path. For instance let's say that you want dnl # to append '/subpath': dnl filename="$filename/subpath" dnl # finally switch back to the original notation dnl adl_NORMALIZE_PATH([filename], ["$old_filename"]) dnl # now $filename equals to 'A:\FOO\BAR\subpath' dnl dnl One good reason to make all path processing with the unix dnl convention is that backslashes have a special meaning in many dnl cases. For instance dnl dnl expr 'A:\FOO' : 'A:\Foo' dnl dnl will return 0 because the second argument is a regex in which dnl backslashes have to be backslashed. In other words, to have the two dnl strings to match you should write this instead: dnl dnl expr 'A:\Foo' : 'A:\\Foo' dnl dnl Such behavior makes DOS filenames extremely unpleasant to work dnl with. So temporary turn your paths to the Unix notation, and revert dnl them to the original notation after the processing. See the macro dnl adl_COMPUTE_RELATIVE_PATHS for a concrete example of this. dnl dnl REFERENCE_STRING defaults to $VARIABLE, this means that slashes dnl will be converted to backslashes if $VARIABLE already contains some dnl backslashes (see $thirddir below). dnl dnl firstdir='/usr/local//share' dnl seconddir='C:\Program Files\\' dnl thirddir='C:\home/usr/' dnl adl_NORMALIZE_PATH([firstdir]) dnl adl_NORMALIZE_PATH([seconddir]) dnl adl_NORMALIZE_PATH([thirddir]) dnl # $firstdir = '/usr/local/share' dnl # $seconddir = 'C:\Program Files' dnl # $thirddir = 'C:\home\usr' dnl dnl @category Misc dnl @author Alexandre Duret-Lutz <duret_g@epita.fr> dnl @version 2001-05-25 dnl @license GPLWithACException AC_DEFUN([adl_NORMALIZE_PATH], [case ":[$]$1:" in # change empty paths to '.' ::) $1='.' ;; # strip trailing slashes :*[[\\/]]:) $1=`echo "[$]$1" | sed 's,[[\\/]]*[$],,'` ;; :*:) ;; esac # squeze repeated slashes case ifelse($2,,"[$]$1",$2) in # if the path contains any backslashes, turn slashes into backslashes *\\*) $1=`echo "[$]$1" | sed 's,\(.\)[[\\/]][[\\/]]*,\1\\\\,g'` ;; # if the path contains slashes, also turn backslashes into slashes *) $1=`echo "[$]$1" | sed 's,\(.\)[[\\/]][[\\/]]*,\1/,g'` ;; esac]) dnl @synopsis adl_COMPUTE_RELATIVE_PATHS(PATH_LIST) dnl dnl PATH_LIST is a space-separated list of colon-separated triplets of dnl the form 'FROM:TO:RESULT'. This function iterates over these dnl triplets and set $RESULT to the relative path from $FROM to $TO. dnl Note that $FROM and $TO needs to be absolute filenames for this dnl macro to success. dnl dnl For instance, dnl dnl first=/usr/local/bin dnl second=/usr/local/share dnl adl_COMPUTE_RELATIVE_PATHS([first:second:fs second:first:sf]) dnl # $fs is set to ../share dnl # $sf is set to ../bin dnl dnl $FROM and $TO are both eval'ed recursively and normalized, this dnl means that you can call this macro with autoconf's dirnames like dnl `prefix' or `datadir'. For example: dnl dnl adl_COMPUTE_RELATIVE_PATHS([bindir:datadir:bin_to_data]) dnl dnl adl_COMPUTE_RELATIVE_PATHS should also works with DOS filenames. dnl dnl You may want to use this macro in order to make your package dnl relocatable. Instead of hardcoding $datadir into your programs just dnl encode $bin_to_data and try to determine $bindir at run-time. dnl dnl This macro requires adl_NORMALIZE_PATH. dnl dnl @category Misc dnl @author Alexandre Duret-Lutz <duret_g@epita.fr> dnl @version 2001-05-25 dnl @license GPLWithACException AC_DEFUN([adl_COMPUTE_RELATIVE_PATHS], [for _lcl_i in $1; do _lcl_from=\[$]`echo "[$]_lcl_i" | sed 's,:.*$,,'` _lcl_to=\[$]`echo "[$]_lcl_i" | sed 's,^[[^:]]*:,,' | sed 's,:[[^:]]*$,,'` _lcl_result_var=`echo "[$]_lcl_i" | sed 's,^.*:,,'` adl_RECURSIVE_EVAL([[$]_lcl_from], [_lcl_from]) adl_RECURSIVE_EVAL([[$]_lcl_to], [_lcl_to]) _lcl_notation="$_lcl_from$_lcl_to" adl_NORMALIZE_PATH([_lcl_from],['/']) adl_NORMALIZE_PATH([_lcl_to],['/']) adl_COMPUTE_RELATIVE_PATH([_lcl_from], [_lcl_to], [_lcl_result_tmp]) adl_NORMALIZE_PATH([_lcl_result_tmp],["[$]_lcl_notation"]) eval $_lcl_result_var='[$]_lcl_result_tmp' done]) ## Note: ## ***** ## The following helper macros are too fragile to be used out ## of adl_COMPUTE_RELATIVE_PATHS (mainly because they assume that ## paths are normalized), that's why I'm keeping them in the same file. ## Still, some of them maybe worth to reuse. dnl adl_COMPUTE_RELATIVE_PATH(FROM, TO, RESULT) dnl =========================================== dnl Compute the relative path to go from $FROM to $TO and set the value dnl of $RESULT to that value. This function work on raw filenames dnl (for instead it will considerate /usr//local and /usr/local as dnl two distinct paths), you should really use adl_COMPUTE_REALTIVE_PATHS dnl instead to have the paths sanitized automatically. dnl dnl For instance: dnl first_dir=/somewhere/on/my/disk/bin dnl second_dir=/somewhere/on/another/disk/share dnl adl_COMPUTE_RELATIVE_PATH(first_dir, second_dir, first_to_second) dnl will set $first_to_second to '../../../another/disk/share'. AC_DEFUN([adl_COMPUTE_RELATIVE_PATH], [adl_COMPUTE_COMMON_PATH([$1], [$2], [_lcl_common_prefix]) adl_COMPUTE_BACK_PATH([$1], [_lcl_common_prefix], [_lcl_first_rel]) adl_COMPUTE_SUFFIX_PATH([$2], [_lcl_common_prefix], [_lcl_second_suffix]) $3="[$]_lcl_first_rel[$]_lcl_second_suffix"]) dnl adl_COMPUTE_COMMON_PATH(LEFT, RIGHT, RESULT) dnl ============================================ dnl Compute the common path to $LEFT and $RIGHT and set the result to $RESULT. dnl dnl For instance: dnl first_path=/somewhere/on/my/disk/bin dnl second_path=/somewhere/on/another/disk/share dnl adl_COMPUTE_COMMON_PATH(first_path, second_path, common_path) dnl will set $common_path to '/somewhere/on'. AC_DEFUN([adl_COMPUTE_COMMON_PATH], [$3='' _lcl_second_prefix_match='' while test "[$]_lcl_second_prefix_match" != 0; do _lcl_first_prefix=`expr "x[$]$1" : "x\([$]$3/*[[^/]]*\)"` _lcl_second_prefix_match=`expr "x[$]$2" : "x[$]_lcl_first_prefix"` if test "[$]_lcl_second_prefix_match" != 0; then if test "[$]_lcl_first_prefix" != "[$]$3"; then $3="[$]_lcl_first_prefix" else _lcl_second_prefix_match=0 fi fi done]) dnl adl_COMPUTE_SUFFIX_PATH(PATH, SUBPATH, RESULT) dnl ============================================== dnl Substrack $SUBPATH from $PATH, and set the resulting suffix dnl (or the empty string if $SUBPATH is not a subpath of $PATH) dnl to $RESULT. dnl dnl For instace: dnl first_path=/somewhere/on/my/disk/bin dnl second_path=/somewhere/on dnl adl_COMPUTE_SUFFIX_PATH(first_path, second_path, common_path) dnl will set $common_path to '/my/disk/bin'. AC_DEFUN([adl_COMPUTE_SUFFIX_PATH], [$3=`expr "x[$]$1" : "x[$]$2/*\(.*\)"`]) dnl adl_COMPUTE_BACK_PATH(PATH, SUBPATH, RESULT) dnl ============================================ dnl Compute the relative path to go from $PATH to $SUBPATH, knowing that dnl $SUBPATH is a subpath of $PATH (any other words, only repeated '../' dnl should be needed to move from $PATH to $SUBPATH) and set the value dnl of $RESULT to that value. If $SUBPATH is not a subpath of PATH, dnl set $RESULT to the empty string. dnl dnl For instance: dnl first_path=/somewhere/on/my/disk/bin dnl second_path=/somewhere/on dnl adl_COMPUTE_BACK_PATH(first_path, second_path, back_path) dnl will set $back_path to '../../../'. AC_DEFUN([adl_COMPUTE_BACK_PATH], [adl_COMPUTE_SUFFIX_PATH([$1], [$2], [_lcl_first_suffix]) $3='' _lcl_tmp='xxx' while test "[$]_lcl_tmp" != ''; do _lcl_tmp=`expr "x[$]_lcl_first_suffix" : "x[[^/]]*/*\(.*\)"` if test "[$]_lcl_first_suffix" != ''; then _lcl_first_suffix="[$]_lcl_tmp" $3="../[$]$3" fi done]) dnl adl_RECURSIVE_EVAL(VALUE, RESULT) dnl ================================= dnl Interpolate the VALUE in loop until it doesn't change, dnl and set the result to $RESULT. dnl WARNING: It's easy to get an infinite loop with some unsane input. AC_DEFUN([adl_RECURSIVE_EVAL], [_lcl_receval="$1" $2=`(test "x$prefix" = xNONE && prefix="$ac_default_prefix" test "x$exec_prefix" = xNONE && exec_prefix="${prefix}" _lcl_receval_old='' while test "[$]_lcl_receval_old" != "[$]_lcl_receval"; do _lcl_receval_old="[$]_lcl_receval" eval _lcl_receval="\"[$]_lcl_receval\"" done echo "[$]_lcl_receval")`]) dnl @synopsis adl_COMPUTE_STANDARD_RELATIVE_PATHS dnl dnl Here is the standard hierarchy of paths, as defined by the GNU dnl Coding Standards: dnl dnl prefix dnl exec_prefix dnl bindir dnl libdir dnl libexecdir dnl sbindir dnl datadir dnl sysconfdir dnl sharestatedir dnl localstatedir dnl infodir dnl lispdir dnl includedir dnl oldincludedir dnl mandir dnl dnl This macro will setup a set of variables of the form dnl 'xxx_forward_relative_path' and 'xxx_backward_relative_path' where dnl xxx is one of the above directories. The latter variable is set to dnl the relative path to go from xxx to its parent directory, while the dnl former hold the other way. dnl dnl For instance `bindir_relative_path' will contains the value to add dnl to $exec_prefix to reach the $bindir directory (usually 'bin'), and dnl `bindir_backward_relative_path' the value to append to $bindir to dnl reach the $exec_prefix directory (usually '..'). dnl dnl This macro requires adl_COMPUTE_RELATIVE_PATHS which itself dnl requires adl_NORMALIZE_PATH. dnl dnl @category Misc dnl @author Alexandre Duret-Lutz <duret_g@epita.fr> dnl @version 2001-05-25 dnl @license GPLWithACException AC_DEFUN([adl_COMPUTE_STANDARD_RELATIVE_PATHS], ## These calls need to be on separate lines for aclocal to work! [adl_COMPUTE_RELATIVE_PATHS(dnl adl_STANDARD_RELATIVE_PATH_LIST)]) dnl adl_STANDARD_RELATIVE_PATH_LIST dnl =============================== dnl A list of standard paths, ready to supply to adl_COMPUTE_RELATIVE_PATHS. AC_DEFUN([adl_STANDARD_RELATIVE_PATH_LIST], [pushdef([TRIPLET], [$][1:$][2:$][2_forward_relative_path $]dnl [2:$][1:$][2_backward_relative_path])dnl TRIPLET(prefix, exec_prefix) dnl TRIPLET(exec_prefix, bindir) dnl TRIPLET(exec_prefix, libdir) dnl TRIPLET(exec_prefix, libexecdir) dnl TRIPLET(exec_prefix, sbindir) dnl TRIPLET(prefix, datadir) dnl TRIPLET(prefix, sysconfdir) dnl TRIPLET(prefix, sharestatedir) dnl TRIPLET(prefix, localstatedir) dnl TRIPLET(prefix, infodir) dnl TRIPLET(prefix, lispdir) dnl TRIPLET(prefix, includedir) dnl TRIPLET(prefix, oldincludedir) dnl TRIPLET(prefix, mandir) dnl popdef([TRIPLET])]) dnl @synopsis AC_DEFINE_DIR(VARNAME, DIR [, DESCRIPTION]) dnl dnl This macro sets VARNAME to the expansion of the DIR variable, dnl taking care of fixing up ${prefix} and such. dnl dnl VARNAME is then offered as both an output variable and a C dnl preprocessor symbol. dnl dnl Example: dnl dnl AC_DEFINE_DIR([DATADIR], [datadir], [Where data are placed to.]) dnl dnl @category Misc dnl @author Stepan Kasal <kasal@ucw.cz> dnl @author Andreas Schwab <schwab@suse.de> dnl @author Guido Draheim <guidod@gmx.de> dnl @author Alexandre Oliva dnl @version 2005-07-29 dnl @license AllPermissive AC_DEFUN([AC_DEFINE_DIR], [ prefix_NONE= exec_prefix_NONE= test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix dnl In Autoconf 2.60, ${datadir} refers to ${datarootdir}, which in turn dnl refers to ${prefix}. Thus we have to use `eval' twice. eval ac_define_dir="\"[$]$2\"" eval ac_define_dir="\"$ac_define_dir\"" AC_SUBST($1, "$ac_define_dir") AC_DEFINE_UNQUOTED($1, "$ac_define_dir", [$3]) test "$prefix_NONE" && prefix=NONE test "$exec_prefix_NONE" && exec_prefix=NONE ]) ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/CREDITS����������������������������������������������������������������������0000644�0001750�0001750�00000005336�11672675560�012755� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Credits for Source-highlight Some of these people helped me previously with java2html, and cpp2html, so they implicitly helped me also for source-highlight (if I forgot to mention someone, please let me know): * Marcus G. Daniels who gave me some good advices about GNU standards, * Osvaldo Pinali Doederlein for tab option idea, * Richard Freedman for feed back and bug notifications * John Constantine for some great suggestions I'll surely apply. * Raymond Lambe, for quotation bug notification * Robert J. Clark for adding -input, -output, -title options * Hans-Peter Bischof for suggestions (to apply). * Luc Maisonobe for the patch for const char * in order to make it work under gcc 2.95 * Jari Korva for the bug of \" inside a string and & treatment, and especially for adding CSS options and handling * Kaloian Doganov for .css suggestion and for providing some nice .css files * Ziv Caspi found the bug of \\ in chars * Chris Mason found the darkgreen bug, and that --tab was not documented * Michael Gasche found the bug of /* comment inside another environment * Xavier Outhier added --header and --footer options * Tom Hull added hexadecimal and floating point handling * Maxim Dementiev reported bug in cmdline.c * Geurt Vos sent me keywords file and added many highlightings and # color formats, and added some colors. * Aldo D. Longhi reported alloca problem * Robert Wetzel added CGI support * Martin Gebert notified some errors, and he's implementing ksrc2html, a KDE interface to these programs. He also wrote the scanner for Prolog and Python. * Arto Viitanen found some bugs * Bernie Boudet suggested customization of normal text * Christian Paulsen notified the error for multiple input files * Alexios Zavras and Bruno Schweizer notified the problem in compilation with gcc 3.0. * Ed Scott and Andre Charbonneau suggested line number feature. * Alain Barbet wrote the Perl scanner. * Dan barthel fixed a compilation error on some compilers * Keith Robertson notified a bug in line numbering in the presence of I/O redirection * Manuel Kauers and Fabio Calefato reported the bug of if, while, highlighting for Java sources. * Christian W. Zuckschwerdt and Josh Ghiloni helped in generating xhtml code. * Konstantine Serebriany helped in creating the ESC output format and using source-highlight with less * Marc Côté wrote the scanenr for Lua * Noritsugu Nakamura wrote the scanner for Ruby * Stuart Rackham wrote the DocBook output format definition * Dirk Jagdmann wrote the postscript language definition��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/source-highlight.pro���������������������������������������������������������0000644�0001750�0001750�00000001143�11672675564�015720� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������include(defines.pri) TEMPLATE = subdirs CONFIG += ordered recursive SUBDIRS = lib src OTHER_FILES = TODO.txt \ COPYING \ AUTHORS \ INSTALL \ README \ THANKS message(Compiler : $${COMPILER}) message(Compiler Binary: $$QMAKE_CXX) isEmpty(BUILDING_STATIC_LIBRARY) { message("dynamic library") } else { message("static library") } message( "Libraries: " ) message( "specified by user : " $$ADDITIONAL_LIBRARIES ) contains(COMPILER, msvc) { isEmpty(BUILDING_STATIC_LIBRARY) { warning("on msvc only static version of the library can be currently built") } } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/TODO.txt���������������������������������������������������������������������0000644�0001750�0001750�00000007556�11672675560�013251� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������TODO list ========= test for always flush (together with line number), and command line option use <ol> lists and css for changing colors of lines, see http://shiflett.org/code/highlight.php shjs_css_transform.sh in share background color in some .css in doc (for TODO) the default ctags command line option should contain the actual found ctags line numbers in table in a smarter way, so that code is separated by lines (different columns). CODE CLEANUP the style file is always parsed even for output formats that don't need it... but how to infer whether the style must be read or not? IMPORTANT: this is crucial for output generation such as CSS that produces elements with the class syntax: if that element is not in the style file that element will be generated with class normal but this is not really correct... GROUPS also string def as StringDef Is there an element class that is not a StateStartLangElem? check empty alternative in string def: "foo||" which would lead to a non-terminating program LANG FILES ---------- recognize kde rc files LIBRARY --------------- - RegexPreprocessor should not contain code dealing with boost::regex? - in LineRule is it really required to put the [^...]? - use also line prefix in order to write line number in a different column than the source highlighted code. - outputfilename and outputfilename extension do not concern the formatter? the only thing that should be passed to format() should be linenumber and filename? - why refentry.filename == fileinfo->filename || refentry.filename == fileinfo->input_file_name) also input_file_name (no path)? - line numbers and code in different columns when generating tables (probably use linesuffix)? - ctags: Are the input and output file useful in ctagsformatter? Or could we put it into FormatterParams? LIBRARY - use namespaces (for copyright and reportbugs?) - class for parsers (or for langdefparserfun.h) in order to use namespaces - document LangElem - should library headers use <srchilite/...> ? - who calls createMissingFormatter? Configuration: a class with data dir, LangMap, keep all the related objects consistent: e.g., if we change dataDir, then change it also in lang map objects. (?) move .lang, .outlang and others in another directory? Makefile.lang: - add VAR += VALUE and -= VALUE remove @author in files (and check doxygen documentation) Java annotations @Override, etc.? accept rgb colors in the style and .outlang can express a way to use the colors in this format TextStyleFormatterFactory: PreFormatter is never used! 3.1.2 improve source-highlight-settings interface add help and some command lines (--show) in less handle file names with spaces (use " ?) increment x:X:x for library (languageinfer.cpp) string delim "\"" '\"(c|w|d)' build a multiline regex! rule (string) "`(?:[^`])*`" (exit level: 0, next: 0) rule (string) "\"" (exit level: 0, next: 4) STATE 4 default: string rule (string) "\"(?:c|w|d)" (exit level: 1, next: 0) move .lang, .outlang, .map, etc in a share directory in source folder, together with style and css files. in this case df = include "c_comment.lang" reports as file name error c_comment.lang! if the included file cannot be found it does not report an error? QMAKE ----- ABSOLUTEDATADIR=\\\"/usr/local\\\" make it configurable PREFIX variable to pass to qmake texinfo generate html and put in the doc source folder common.pri for files in src LANGUAGES doxygen doxygen in C/C++ (\ syntax) deal with php in html title and other special cases qmake .pro and .pri files .ini files (e.g., php.ini) comment lines start with ; in latex.outlang "~" "{\\raise.17ex\\hbox{$\\scriptstyle\\sim$}}" texinfo generated files in the doc source folder BEFORE RELEASING remember to update the version and library version in defines.pri include config.h in all source files to deal with gnulib? ��������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/source-highlight.pc.in�������������������������������������������������������0000644�0001750�0001750�00000000513�11672675564�016127� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ Name: libsource-highlight Description: GNU Source-highlight library. URL: http://www.gnu.org/software/src-highlite/ Version: @VERSION@ Libs: -L${libdir} -lsource-highlight @BOOST_LDFLAGS@ @BOOST_REGEX_LIB@ Cflags: -I${includedir} @BOOST_CPPFLAGS@ �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/source-highlight.spec.in�����������������������������������������������������0000644�0001750�0001750�00000002462�11672675564�016464� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# # spec file for package GNU Source Highlight (Version 1.x) # # Author: Christian W. Zuckschwerdt <zany@triq.net>, Jan 2003 # Summary: syntax highlighting for source documents Name: source-highlight Version: @VERSION@ Release: @VERSION@ License: GPL Group: Utilities/Console Source: ftp://ftp.gnu.org/gnu/source-highlight/%{name}-%{version}.tar.gz URL: http://www.gnu.org/software/src-highlite/ BuildRoot: %{_tmppath}/%{name}-%{version}-root %description This program, given a source file, produces a document with syntax highlighting. Both source languages and output formats can be specified with a simple syntax and added dynamically. At the moment this package can handle many programming languages, such as, e.g., Java, C/C++, Prolog, Perl, Php3, Python, Flex, ChangeLog, etc. as source languages, and some output formats such, as, e.g., HTML, XHTML, LaTeX, etc. %prep %setup -q %build ./configure $MYARCH_FLAGS \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ --datadir=%{_datadir} make %install rm -rf $RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT install %clean rm -rf $RPM_BUILD_ROOT %files %defattr(644, root, root, 755) %doc README COPYING ChangeLog TODO.txt AUTHORS THANKS %doc doc/*.html doc/*.css %attr(755,root,root) %{_prefix}/bin/* %{_datadir}/%{name}/* %{_mandir}/man?/* ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/ChangeLog��������������������������������������������������������������������0000644�0001750�0001750�00000157464�11676047431�013513� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������2011-12-26 Lorenzo Bettini <bettini@bettini> * src/mediawiki.outlang: Added, thanks to Abe Skolnik 2011-12-12 Paul W. Harvey <Paul.W.Harvey@csiro.au> * src/tml.lang: TML language definition file 2011-09-02 Viraj Sinha <viraj@intrepid.com> * src/upc.lang: UPC language definition file 2011-09-02 Mark Silberbauer <mark@stonethree.com> * src/javalog.lang: lang file for javalog files 2011-05-02 Lorenzo Bettini <bettini@bettini-desk-lucid> * src/clike_vardeclaration.lang: detect also _ in type and variable name 2011-04-23 Masatake YAMATO <yamato@redhat.com> * lib/srchilite/docgenerator.cc: added inputlang in the output file 2011-03-18 Lorenzo Bettini <bettini@bettini-laptop> * src/logtalk.lang: improved definition * src/lang.map: emacs lisp files highlighted as lisp * src/sql.lang: added UNION as a keyword 2011-02-11 Lorenzo Bettini <bettini@bettini-desk-lucid> * src/scala.lang: fixed separation between string keywords and symbol keywords 2011-01-27 Gary Funck * m4/ax_boost_regex.m4: new upstream version that fixes for finding lib64 version 2010-06-17 Lorenzo Bettini <bettini@bettini-laptop> * m4/Makefile.am (EXTRA_DIST): don't install boost m4 macros 2010-05-31 Lorenzo Bettini <bettini@bettini-laptop> * tests/Makefile.am (check): enable some tests only in maintainer-mode 2010-04-28 Lorenzo Bettini <bettini@bettini-laptop> * src/lisp.lang: Lisp language definition * src/vala.lang: Vala language definition 2010-04-26 Lorenzo Bettini <bettini@bettini-desk-lucid> * lib/srchilite/fileutil.h: include <cstdio> to solve compilation problems in Sun CC. 2010-03-12 Lorenzo Bettini <bettini@bettini-laptop> * autogen.sh: removed * src/haskell_literate.lang: literate programming for haskell in bird and latex style * src/proto.lang: Google's Protocol Buffers language definition added (thanks to Joel Smith) 2010-01-22 Lorenzo Bettini <bettini@bettini-laptop> * src/html.lang: handle embedded css handle embedded javascript 2010-01-21 Lorenzo Bettini <bettini@bettini-laptop> * src/php.lang: added keywords null, false, true handles embedded html * src/html_simple.lang: version with only html features no other languages (to be used for inclusion in comment environments) 2010-01-16 Lorenzo Bettini <bettini@bettini-laptop> * src/lang.map: bash mapped to sh.lang 2010-01-14 bettini <bettini@bettini-laptop> * src/source-highlight.cc (main): tab option is handled 2009-12-23 Lorenzo Bettini <bettini@bettini-prog-karmic> * lib/srchilite/Makefile.am (libsource_highlight_la_SOURCES): put generated bison and flex files in sources * src/Makefile.am: when gengetopt is missing don't do anything (don't touch files) 2009-12-09 Lorenzo Bettini <bettini@bettini-laptop-karmic> * src/url.lang: improved email regular expression 2009-12-06 Lorenzo Bettini <bettini@bettini-laptop-karmic> * src/erlang.lang: added * lib/srchilite/reportbugs.text copyright.text: removed * lib/srchilite/Makefile.am: flex and bison generated files are generated in the source directory (available in repository) 2009-11-23 bettini <bettini@dellbettini> * defines.pri: use version number for dynamically linking in mingw forces CONFIG+=static in case of msvc 2009-11-22 bettini <bettini@dellbettini> * lib\compat\compat_dirent.cpp: Needed only for compilation with msvc. * lib\compat\compat_dirent.h: Ditto. * lib\compat\getopt.c: Ditto. * lib\compat\getopt.h: Ditto. * lib\compat\getopt1.c: Ditto. * lib\compat\getopt_int.h: Ditto. * lib\compat\Makefile.am: Ditto. * lib\compat\unistd.h: Ditto. * defines.pri: check for msvc * lib\srchilite\ctagscollector.h: forward declaration to a struct is NOT expressed with a class * lib\srchilite\ctagsformatter.h: Ditto. * lib\srchilite\debuglistener.h: Ditto. * lib\srchilite\formatter.h: Ditto. * lib\srchilite\highlightbuilderexception.h: Ditto. * lib\srchilite\highlightevent.h: Ditto. * lib\srchilite\highlighteventlistener.h: Ditto. * lib\srchilite\highlightrule.h: Ditto. * lib\srchilite\highlightstate.h: Ditto. * lib\srchilite\highlightstateprinter.h: Ditto. * lib\srchilite\langdefparser.yy: Ditto. * lib\srchilite\parserexception.h: Ditto. * lib\srchilite\sourcehighlighter.h: Ditto. * lib\srchilite\settings.cpp: Deal with opendir, mkdir for msvc * lib\srchilite\sourcehighlightutils.cpp: Ditto. * src\source-highlight.pro: boost regex library is linked as the last * src\source-highlight-settings.pro: Ditto. * src\cmdline.c (update_arg): removed FIX_UNUSED, which does not compile in msvc * src\source-highlight.cc (print_copyright): inserted string (print_reportbugs): Ditto. 2009-11-19 bettini <bettini@dellbettini> * lib\srchilite\fileinfo.h: include parserinfo.h with "" instead of <> * lib\srchilite\settings.cpp (Settings::Settings): (findHomeDirectory): searches for home directory in other standard windows environment variable besides HOME * defines.pri: use CONFIG += console otherwise no output is shown 2009-11-18 bettini <bettini@dellbettini> * defines.pri: additional libraries variable (boost_regex) check the variable USE_MINGW * lib\srchilite\settings.cpp: try to do a manual fix when compiling with qmake and using mingw * lib\srchilite\srchilite.pro: * src\source-highlight-settings.pro: * src\source-highlight.pro: 2009-11-18 bettini <bettini@bettini-laptop> * src/source-highlight-settings.pro: New file. * src/source-highlight.pro: New file. * src/source-highlight-settings.cpp: deal with progname.h when compiling with qmake 2009-11-17 bettini <bettini@bettini-laptop> * defines.pri: New file. * lib/lib.pro: qmake pro file. * source-highlight.pro: New file. * src/src.pro: New file. * lib/srchilite/langdefparser.cc: bison and flex generated files are in the CVS now * lib/srchilite/langdefparser.h: New file. * lib/srchilite/langdefscanner.cc: New file. * lib/srchilite/outlangdefparser.cc: New file. * lib/srchilite/outlangdefparser.h: New file. * lib/srchilite/outlangdefscanner.cc: New file. * lib/srchilite/srchilite.pro: New file. * lib/srchilite/stylecssparser.cc: New file. * lib/srchilite/stylecssparser.h: New file. * lib/srchilite/stylecssscanner.cc: New file. * lib/srchilite/styleparser.cc: New file. * lib/srchilite/styleparser.h: New file. * lib/srchilite/stylescanner.cc: New file. * lib/srchilite/fileutil.cc: default CHROOT_INPUT_DIR * lib/srchilite/settings.cpp: include config.h selectively * src/source-highlight.cc (main): deal with progname.h when compiling with qmake 2009-10-19 bettini <bettini@bettini-laptop> * src/errors.lang: lang definition file for compiler output errors. 2009-10-13 bettini <bettini@bettini-desktop-mint> * src/d.lang: lang for D 2009-10-11 bettini <bettini@bettini-desktop-mint> * src/cobol.lang: lang for Cobol 2009-10-11 bettini <bettini@bettini-laptop> * src/clipper.lang: lang for Clipper * src/c.lang: label element * src/bat.lang: lang for DOS batch files. * src/default.style: style for label and path * src/style.defaults: style for label and path 2009-10-05 bettini <bettini@bettini-laptop> * src/vbscript.lang: lang file for vbscript. * src/applescript.lang: lang file for applescript. * src/todo.lang: isolated TODO elements. * src/asm.lang: lang file for asm. * src/manifest.lang: lang file for Manifest files. * tests/test.ecore.html: test for inference of <?xml. * lib/srchilite/languageinfer.cpp (LanguageInfer::infer): regexs are now static local variables. (LanguageInfer::infer): check also for <?xml and <!doctype 2009-09-20 Sergey Astanin * src/haskell.lang: language definition for haskell 2009-09-14 bettini <bettini@bettini-laptop> * lib/srchilite/settings.cpp (Settings::getDefaultDataDir): retrieve the hardcoded value for datadir * lib/srchilite/settings.h (Settings): * NEWS: * tests/Makefile.am: adapted to shadow build * lib/srchilite/Makefile.am: make sure to generate doublecpp files into srcdir 2009-08-24 bettini <bettini@bettini-laptop> * lib/srchilite/fileutil.cc (open_data_file_stream): throw exception if the file name is empty 2009-08-23 bettini <bettini@bettini-laptop> * tests/test.c: Removed. * tests/test_c.c: replaces test.c to avoid problems with test.l. 2009-08-21 bettini <bettini@bettini-laptop> * lib/srchilite/settings.cpp (Settings::checkSettings): static method for checking the current settings * lib/srchilite/settings.h (Settings): Ditto. * lib/srchilite/instances.cpp: provides access to static (single) instances of LangDefManager, LangMap, etc. * lib/srchilite/instances.h: Ditto. * lib/srchilite/langmap.cpp: method for reloading the contents * lib/srchilite/langmap.h (LangMap): path and filename fields are not static anymore 2009-08-17 bettini <bettini@bettini-laptop> * lib/srchilite/Makefile.am: use AM_LDFLAGS for the library otherwise a non standard boost library will not be found * lib/srchilite/settings.cpp (Settings::retrieveDataDir): (Settings::setGlobalDataDir): mechanism for setting a global data dir value that is always returned by retrieveDataDir * lib/srchilite/settings.h (Settings): Ditto * lib/tests/test_settings_main.cpp (main): Ditto * lib/srchilite/sourcehighlightutils.cpp (SourceHighlightUtils::getLangFileNames): (SourceHighlightUtils::getOutLangFileNames): Added * lib/srchilite/sourcehighlightutils.h (SourceHighlightUtils): Added utility functions for retrieving .lang files and .outlang files. 2009-08-01 bettini <bettini@bettini-laptop> * source-highlight.pc.in: removed libdir/include 2009-07-18 bettini <bettini@bettini-laptop> * src/texinfo.lang: language definition file for texinfo 2009-07-14 bettini <bettini@bettini-laptop> * lib/srchilite/stylescanner.ll: white is a standard color * lib/srchilite/Makefile.am: utils.h is installed 2009-07-12 bettini <bettini@bettini-laptop> * lib/srchilite/sourcehighlight.h (SourceHighlight.setLineNumberDigits): to explicitly set the number of digits for line numbers * lib/srchilite/sourcehighlight.cpp (SourceHighlight::initialize): keep the background color empty if none is specified 2009-07-05 bettini <bettini@bettini-laptop> * lib/srchilite/sourcehighlight.h (SourceHighlight): default output to "html.outlang" not "html.lang" (SourceHighlight.getOutputFileExtension): return the output file extension as specified in the output format definition file 2009-06-30 bettini <bettini@bettini-laptop> * lib/examples/Makefile.am: install style formatter example 2009-06-13 bettini <bettini@bettini-desktop> * src/oz.lang: New file. taken from http://www.cs.unb.ca/~bremner//blog/posts/oz-source-highlight/ 2009-06-07 bettini <bettini@bettini-laptop> * lib/examples/styleformatter-main.cpp: Example using customized FormatterFactory * lib/examples/styleformatter.h: New file. * lib/examples/styleformatterfactory.h: New file. * doc/source-highlight-lib.texinfo: added example of customized FormatterFactory * lib/srchilite/stylefileparser.cpp (StyleFileParser::parseStyleFile): (StyleFileParser::parseCssStyleFile): versions with explicit path * lib/srchilite/stylefileparser.h (StyleFileParser): Ditto 2009-05-27 bettini <bettini@bettini-desktop> * lib/srchilite/formattermanager.h (FormatterManager.getFormatterMap): return a const reference to the formatter map 2009-05-23 bettini <bettini@bettini-laptop> * lib/srchilite/highlightstate.cpp (HighlightState::HighlightState): the copy constructor does NOT copy the id of the state, but generates a new one; this is required for highlighting in contexts where the processing is not sequential (e.g., in text editors) 2009-05-21 bettini <bettini@bettini-laptop> * lib/srchilite/formattermanager.h (FormatterManager.reset): added method to clear the formatter map 2009-05-20 bettini <bettini@bettini-laptop> * lib/srchilite/sourcehighlightutils.h (SourceHighlightUtils): added class with static methods for retrieving style files 2009-05-19 Lorenzo Bettini <bettini@bettini-laptop> * doc/Makefile.am (source_highlightdata_DATA): install .css files in the data dir 2009-05-18 Cesare Tirabassi * doc/source-highlight-settings.1: added 2009-05-18 bettini <bettini@bettini-laptop> * doc/source-highlight-settings.1: * lib/srchilite/srchilite.doxyfile.in: use an .in file that is configured with the right source directory (so that it works also if the build is in a different directory) 2009-05-15 Lorenzo Bettini <bettini@bettini-laptop> * src/latex.outlang: use \textgreater and \textless for formatting < > (thanks to Jan Schafer) * lib/srchilite/Makefile.am (EXTRA_DIST): doxyfile added 2009-05-10 Lorenzo Bettini <bettini@bettini-laptop> * doc/index.html: put examples in a separate file: examples.html 2009-05-09 bettini <bettini@bettini-desktop> * configure.ac: removed check for flex library (which is not needed anyway) 2009-05-05 bettini <bettini@bettini-laptop> * lib/srchilite/langdefparser.yy: can specify the exit level (default 1) 2009-04-21 bettini <bettini@bettini-laptop> * src/cmdline.ggo: added --binary-output command line arg so that output files are written in binary mode 2009-04-19 bettini <bettini@bettini-laptop> * lib/srchilite/verbose.h: removed, since now we only use Verbosity * lib/srchilite/verbosity.h (Verbosity): class with static methods for global verbosity 2009-04-18 bettini <bettini@bettini-laptop> * src/source-highlight-settings.cpp (main): new program to interact with the user for the settings * lib/srchilite/versions.h (Versions): static public methods for retrieving version numbers * lib/srchilite/settings.h (Settings): class for dealing with setting reading and storage 2009-04-14 bettini <bettini@bettini-laptop> * configure.ac: use --docdir for documentation directory 2009-04-13 bettini <bettini@bettini-laptop> * src/html.lang: deal with HTML5 stuff * src/key_string.lang: deal with HTML5 stuff * src/xml.lang: deal with HTML5 stuff 2009-04-11 bettini <bettini@bettini-laptop> * lib/srchilite/regexranges.h (RegexRanges): to search for ranges delimited by a regular expression * src/source-highlight.cc: removed check for range-context and separator which is executed by the command line parser itself * src/cmdline.ggo: range-context and range-separator depend on line-range 2009-01-18 bettini <bettini@bettini-laptop> * tests/Makefile.am: use diff --strip-trailing-cr to work also on windows (in case output files are generated with \r) * src/xhtmltable.outlang: added the nodoctemplate (this also fixes the output of style_examples.html) 2009-01-16 bettini <bettini@bettini-laptop> * doc/Makefile.am: generated texinfos are in maintainer-clean, not dist-clean 2008-12-23 bettini <bettini@bettini-laptop> * src/source-highlight.cc (main): check that if -i or -o is specified then no other files are specified on the command line 2008-12-07 bettini <bettini@bettini-laptop> * lib/srchilite/formatterfactory.h (FormatterFactory): Added abstract factory for creating formatters. 2008-10-26 bettini <bettini@bettini-laptop> * library code uses namespaces * _sstream: replacement for sstream if not present (used by the configure script); 2008-11-22 Jason Blevins * src/fortran.lang: improved with new keywords from Fortran 90 through Fortran 2003 2008-11-20 bettini <bettini@dellbettini> * src\lib\Makefile.am: libsrchilite renamed into libsource-highlight * lib\Makefile.am: library files moved here 2008-10-26 bettini <bettini@bettini-laptop> * src/xorg.lang: language definition for XOrg conf files 2008-10-11 bettini <bettini@localhost> * src/includes/sstream: moved to version 3 of GPL 2008-09-24 bettini <bettini@bettini-laptop> * src/lib/sourcehighlight.h (SourceHighlight): use LineRanges * src/lib/sourcehighlighter.h (SourceHighlight): output can be suspended * src/source-highlight.h (SourceHighlight): --line-ranges 2008-09-17 bettini <bettini@bettini-laptop> * src/lib/lineranges.h (LineRanges): new class for checking whether a line is a range 2008-09-14 bettini <bettini@bettini-laptop> * src/lib/stylecssparser.yy: yyerror(const char *) * src/lib/styleparser.yy: yyerror(const char *) 2008-09-14 Lorenzo Bettini <bettini@laptop> * src/properties.lang: [:blank:]* changed to [[:blank:]]* * src/key_string.lang: [:blank:]* changed to [[:blank:]]* * src/desktop.lang: [:blank:]* changed to [[:blank:]]* 2008-09-04 bettini <bettini@dellbettini> * src\ruby.lang: fixed the order of definitions * src\m4.lang: fixed the order of definitions * src\glsl.lang: fixed the order of definitions * src\lib\highlightstate.cpp (HighlightState::findBestMatch): check whether the prefix is only spaces (or empty); if so, then don't test other rules 2008-09-02 bettini <bettini@laptop> * src/javascript.lang: fixed regexp element (avoid catching single line comments), thanks to gnombat 2008-06-05 Lorenzo Bettini <bettini@laptop> * src/m4.lang: simplified and it does not rely on sh.lang anymore 2008-02-11 Lorenzo Bettini <bettini@laptop> * src/lib/valgrind_test.sh.in: added also in the lib dir to check leaks and errors in the library 2008-01-31 Lorenzo Bettini <bettini@laptop> * src/lib/regexpengine.h: does not have file reading functionality and provides only a method for highlighting a text * src/lib/filehighlighter.h: (class FileHighlighter) class added to read a file and highlight it using RegExpEngine * src/lib/globalostream.h: removed global stream * src/lib/linenumdigit.h: removed global vars * src/lib/mainoutputbuffer.h: removed global outputbuffer 2008-01-27 Lorenzo Bettini <bettini@laptop> * src/html_ref.outlang: common definition of html anchors and refs 2008-01-18 Lorenzo Bettini <bettini@laptop> * src/xml.lang: added . for xml element names (thanks to Toby White) 2008-01-01 Lorenzo Bettini <bettini@laptop> * src/php.lang: removed wrong variable specification (copied from prolog.lang) 2007-12-30 Lorenzo Bettini <bettini@laptop> * src/lib/langdefscanner.ll: (open_include_file) insert the right path in the ParseStruct (otherwise search for file to include does not work after the first inclusion) * src/lib/outlangdefscanner.ll: (open_include_file) idem 2007-11-08 Lorenzo Bettini <bettini@lorelap> * src/c.lang: language definition for C (not C++) * src/lib/Makefile.am: doublecpp generated header files have extension .hpp instead of .H 2007-09-16 Lorenzo Bettini <bettini@lorelap> * doc/Makefile.am: removed non standard % make rules * src/lib/Makefile.am (.h.H): removed non standard % make rules 2007-09-14 Lorenzo Bettini <bettini@lorelap> * src/sql.lang: fixed spell of some keywords 2007-09-09 Lorenzo Bettini <bettini@lorelap> * COPYING: switched to version 3 of GPL * src/cmdline.ggo: --line-number can take also the padding char (default is '0'), by Roger Nilsson * src/javascript.lang: regular expression highlighting (by Ed Kelly) * src/perl.lang: improved regexp and string highlighting 2007-08-01 Lorenzo Bettini <bettini@lorelap> * tests/Makefile.am: removed non standard %. rules 2007-07-30 Lorenzo Bettini <bettini@lorelap> * src/lua.lang: updated with --[(=*)[[ comments and back reference * src/logtalk.lang: Applied changes provided by Paulo Moura 2007-07-19 Lorenzo Bettini <bettini@lorelap> * src/lib/regexpreprocessor.cpp (num_of_backreferences): count the number of backreferences and the highest backreference number 2007-07-17 Lorenzo Bettini <bettini@lorelap> * src/lib/regexpstatebuilder.cpp (build): check whether to isolate the string (only isolate the double quoted strings), bug fixed * src/slang.lang: by John E. Davis * src/perl.lang: removed stray char in getpriority keyword 2007-06-05 Lorenzo Bettini <bettini@lorelap> * src/ruby.lang: does not perform highlighting for functions (since it might be confusing) ? and ! are not highlighted as symbols if they're part of a method invocation 2007-05-27 Lorenzo Bettini <bettini@lorelap> * src/lib/lineoutputgenerator.h: (class LineOutputGenerator) removed and included in OutputGenerator * src/lib/generatormap.h: (class GeneratorMap) removed and put everything in TextFormatter 2007-05-26 Lorenzo Bettini <bettini@lorelap> * src/xhtml_notfixed.outlang: added for output in xhtml with nonfixed font * src/html_notfixed.outlang: add the information about the generator in a comment 2007-05-23 Lorenzo Bettini <bettini@lorelap> * src/docbookdoc.outlang: output with --doc for docbook references in docbook output * src/ruby.lang: handle ruby regexp correctly 2007-05-20 Lorenzo Bettini <bettini@lorelap> * src/html.lang: a tag must start with an alpha char, non numeric 2007-05-13 Lorenzo Bettini <bettini@lorelap> * src/lib/langdefscanner.ll: check that backreferences are not used inside ' and " 2007-05-08 Lorenzo Bettini <bettini@work> * src/java.lang (preproc): highlight class names as types using named groups 2007-05-06 Lorenzo Bettini <bettini@lorelap> * src/lib/langdefscanner.ll: spaces are not discarded in strings (bugfix) * src/lib/messages.cc (exitError): added version for ParseStruct and ParserInfo that print also file name and line num * src/lib/regexpstatebuilder.cpp (build): correctly print the line of the bad expression 2007-04-30 Lorenzo Bettini <bettini@lorelap> * src/lib/regexpengine.cpp: deal with alternatives in RegExpState and with named grouped subexpressions * src/lib/regexpstate.h (struct RegExpState): contain a linked list of possible alternatives (this is required to handle backreferences). Field hasMarkedAlternatives, meaning that the state has a regular expression made up of many marked expressions (this was the situation till version 2.7) Field allAlternativesCanMatch, meaning that the regular expression is made up of all marked subexpressions where each subexpression represents a language element 2007-04-25 Lorenzo Bettini <bettini@lorelap> * src/lib/regexpstatebuilder.cpp (add_exp): for each marked subexpression add the same formatter 2007-04-24 Lorenzo Bettini <bettini@work> * src/lib/languageinfer.cpp (infer): also try the env specification * src/cmdline.ggo: moved to src directory (makes no sense in lib) 2007-04-23 Lorenzo Bettini <bettini@work> * src/lib/regexpstate.h (struct RegExpFormatter): moved in lib dir * src/lib/regexpenginedebug.h (class RegExpEngineDebug): moved in lib dir * src/lib/regexpengine.h (class RegExpEngine): moved in lib dir 2007-04-20 Lorenzo Bettini <bettini@lorelap> * src/lib/langelem.h (class LangElem): abstract method toStringOriginal to print the original representation i.e., without preprocessing * src/lib/regexpstatebuilder.cpp: does not perform regexp preprocessing anymore * src/lib/langdefscanner.ll: regexp preprocessing was moved in flush_buffer_preproc * src/lib/regexpreprocessor.cpp: moved regexp for preprocess outside the method (optimization: created only once) 2007-04-10 Lorenzo Bettini <bettini@lorelap> * src/perl.lang: highlight regular expressions correctly (better, but probably not perfectly) 2007-04-01 Lorenzo Bettini <bettini@lorelap> * src/lib/langdefparser.yy: correctly release scanner memory * src/lib/outlangdefparser.yy: correctly release scanner memory * src/lib/stylecssparser.yy: correctly release scanner memory * src/lib/styleparser.yy: correctly release scanner memory 2007-03-30 <bettini@gentoo> * tests/Makefile.am: use sed -iext with explicit extension otherwise we might experience problems with non gnu sed * src/lib/Makefile.am: exclude test_readtags in case ctags is missing or not the one we can use * doc/Makefile.am (DISTCLEANFILES): source-highlight.1 is not in distclean 2007-03-27 <bettini@work> * configure.ac: give priority to exuberant-ctags if found and check that the ctags program support --excmd * tests/Makefile.am: remove use of non-standard -r sed command line argument 2007-03-25 Lorenzo Bettini <bettini@lorelap> * src/postscript.lang: handle ( ) strings * src/lang.map: fixed association with log.lang (instead of syslog.lang) 2007-03-23 <bettini@work> * src/lib/styles.h: removed, no longer needed * src/lib/stylecssparser.yy: use GeneratorFactory directly without using Style * src/lib/styleparser.yy: use GeneratorFactory directly without using Style 2007-03-18 Lorenzo Bettini <bettini@lorelap> * src/lib/styles.h (class Styles): store also the background color * src/lib/doctemplate.h: handle also the background property 2007-03-15 <bettini@work> * src/lib/stylecssscanner.ll: added to handle css as style file * src/lib/stylecssparser.yy: added to handle css as style file 2007-03-13 <bettini@work> * src/lib/stylescanner.ll: renames optscanner.ll * src/lib/styleparser.yy: renames optparser.yy 2007-03-12 <bettini@work> * src/lib/optparser.yy (option): can assign formatting options to more than one element on the same line 2007-03-11 Lorenzo Bettini <bettini@lorelap> * src/lang.map: maps other shell files, csh, tcsh, ksh to sh.lang 2007-03-08 Lorenzo Bettini <bettini@lorelap> * src/esc.style: updated with style for diff files * src/css.lang: added language definition for css files * acinclude.m4 (AX_BOOST_REGEX): updated to new version of the macro 2007-03-03 Lorenzo Bettini <bettini@lorelap> * src/outlang.lang: highlight ' as strings * src/xml.lang: also handles - and _ chars * src/makefile.lang: added (based on the file of Maurizio Loreti) * src/sh.lang: handles $ variables better 2007-02-23 Lorenzo Bettini <bettini@work> * src/php.lang (comment): uses c_comment.lang 2007-02-02 Lorenzo Bettini <bettini@lorelap> * src/outlang.map: fixed xhtml doc and css output (thanks to C. Michael Pilato) * src/lib/cmdline.ggo: --quiet option showing no progress information 2007-01-20 Lorenzo Bettini <bettini@lorelap> * configure.ac: use libtool and gnulib 2006-12-23 Lorenzo Bettini <bettini@lorelap> * src/php.lang: highlight "<?php" as a symbol 2006-08-31 Lorenzo Bettini <bettini@lorelap> * src/html.lang: fix of type definition (excluding also the char >) * src/html.outlang: generate also header and footer 2006-08-23 Lorenzo Bettini <bettini@lorelap> * src/startapp.cc (processFile): use default.lang if it does not know the input language and it is in failsafe mode * src/lib/langdefparser.yy: accept empty language definitions 2006-08-21 Lorenzo Bettini <bettini@lorelap> * src/regexpenginedebug.cpp (step): for interactive debugging 2006-07-16 Lorenzo Bettini <bettini@lorelap> * src/lang.map: fixed name php.lang (instead of php3.lang) 2006-06-25 Lorenzo Bettini <bettini@lorelap> * src/lib/regexpstatebuilder.cpp (build): "isolate" correctly also nonsensitive keywords. Before, if a keyword is nonsensitive, e.g., IF, then it was highlighted even if inside another word, e.g., MIFOO, since the nonsensitive keyword was not isolated with \< \> (bug reported by Andrea Ercolino) * src/url.lang: bug fix 2006-05-20 Lorenzo Bettini <bettini@lorelap> * src/html_notfixed.outlang: output format definition for HTML where fonts by default are not fixed width. 2006-05-14 Lorenzo Bettini <bettini@lorelap> * configure.ac: enable maintainer mode check so that stuff in doc directory doesn't need to be generated by standard users 2005-12-09 Lorenzo Bettini <bettini@localhost.localdomain> * src/lib/langmap.cpp: fixed the regular expression for reading .map files (fixed bug with \r under windows) 2005-11-03 Lorenzo Bettini <bettini@localhost.localdomain> * src/lib/regexpstateprinter.cpp: print on standard output instead of standard error 2005-09-20 Lorenzo Bettini <bettini@localhost.localdomain> * src/regexpengine.cpp (process_file): make sure to flush the buffer 2005-09-11 Lorenzo Bettini <bettini@localhost.localdomain> * src/lib/fileutil.cc: the starting path is still hardcoded but an attempt is made to compute the relative path at runtime 2005-09-08 Lorenzo Bettini <bettini@localhost.localdomain> * src/lib/generatormap.cpp (generateEntire): reduce the size of output by buffering elements of the same category 2005-08-31 Lorenzo Bettini <bettini@localhost.localdomain> * src/lib/regexpstatebuilder.cpp (build): in case of a delimited elem checks whether it is the start element of a state; if so generate a correct end regular expression 2005-08-28 Lorenzo Bettini <bettini@localhost.localdomain> * src/lib/langdefloader.cpp (get_lang_def): store the RegExpState in a cache in order to parse same language sorces with the same one * src/lib/styles.h (class Style): this was previously class Tags whose name was very misleading 2005-08-27 Lorenzo Bettini <bettini@localhost.localdomain> * src/regexpengine.cpp (process_file): set flags |= boost::match_not_bol only if it matched a non empty string 2005-08-26 Lorenzo Bettini <bettini@localhost.localdomain> * src/lib/regexpstatebuilder.cpp (build): correctly set the default formatter. Correctly sets the exit state level for delimited elements. 2005-08-19 Lorenzo Bettini <bettini@localhost.localdomain> * src/lib/generatorfactory.cc (createGenerator): handle direct color specifications independently from HTML * src/lib/optparser.yy (option): allow empty color specification * src/latex.outlang: generate double quotes " with a final {} in order to work with some inputencs 2005-08-17 Lorenzo Bettini <bettini@localhost.localdomain> * src/lib/outputbuffer.h (class OutputBuffer): does not store all the lines but only the current line, and uses an OutputGenerator to generate each line. * src/lib/regexpstatebuilder.cpp (build): do not throw boost::bad_expression 2005-07-31 Lorenzo Bettini <bettini@localhost.localdomain> * src/lib/generatormap.cpp (generateString): takes care of preformatting through a PreFormatter * src/lib/textformatter.cpp (format): does not preformatting anymore * src/lib/preformatter.h (class PreFormatter): the base class for CharTranslator and SrcUntabifier, instead of TextFormatter. 2005-07-26 Lorenzo Bettini <bettini@localhost.localdomain> * src/lib/linebuffer.h (class LineBuffer): also contains a buffer for stuff to be generated after the line (e.g., references) * src/lib/outputbuffer.h (class OutputBuffer): contains a list of LineBuffer 2005-07-24 Lorenzo Bettini <bettini@localhost.localdomain> * src/lib/textstyle.h (class TextStyle): it is parametric on the variable names 2005-07-16 Lorenzo Bettini <bettini@localhost.localdomain> * src/lib/langdefscanner.ll: fix a bug that raises a segmentation fault when more than one file is processed. 2005-06-05 Lorenzo Bettini <bettini@localhost.localdomain> * src/lib/tags.cc: removed GlobalTags 2005-06-04 Lorenzo Bettini <bettini@localhost.localdomain> * removed genesc and genhtml, everything is done by GeneratorFactory 2005-05-30 Lorenzo Bettini <bettini@localhost.localdomain> * src/lib/langdefparser.yy (parse_lang_def_file): does not use the path for the very file, but only for future includes. 2005-05-08 Lorenzo Bettini <bettini@localhost.localdomain> * src/src-hilite-lesspipe.sh.in: it is able to handle more files, using also the --failsafe option. * src/lib/cmdline.ggo: added option --failsafe, when the input file language is unknown, it simply copies the input file to the output file (useful when used with less) 2005-01-23 Lorenzo Bettini * src/regexpengine.cpp (load_line): discard possible \r characters, reported by Martin Gebert 2004-11-26 Lorenzo Bettini * src/lib/srcuntabifier.h (class Untabifier): inherit from TextFormatter now * src/lib/textformatter.h (class TextFormatter): decorator class to preprocess text * src/lib/srcpretranslator.h (struct Pretranslator): removed 2004-10-17 Lorenzo Bettini * src/lib/envmapper.c removed // C99 comments * configure.in: check for libintl on sco unix 2004-10-13 Lorenzo Bettini * src/lib/langdefparser.yy: the parser for language definitions 2004-10-01 Lorenzo Bettini * src/lib/srcuntabifier.cpp (check_tab): use boost::regex to discover tabs inside a string 2004-09-29 Lorenzo Bettini * src/lib/chartranslator.cc (translate): use boost::regex_replace 2004-09-26 Lorenzo Bettini * src/lib/textgen.h (class TextGenerator): handle all text generation using a string for starting a tag and a string for ending a tag. Decorators classes have been completely removed. 2004-09-05 Lorenzo Bettini * src/lib/genfun.cc (processFile): when stdin is used, make sure that the source language is specified 2004-09-03 Lorenzo Bettini * src/lib/lineoutputgenerator.h (class LineOutputGenerator): replace the previous LineNumberGenerator decorator, now remove, and generate a line number before each line of the buffered output * src/lib/outputgenerator.h (class OutputGenerator): take care of actually generating the buffered output to a stream * src/lib/outputbuffer.h (class OutputBuffer): store the output in a structure 2004-09-02 Lorenzo Bettini * src/lib/textgen.cc (output): all derived classes call this method instead of writing directly to the output stream 2004-08-26 Lorenzo Bettini * src/lib/optparser.yy (yyerror): exit when there's a syntax error in the tags file. check that an option is not declared twice * src/lib/generatormap.h (class GeneratorMap): associate a generator to a specific tag 2004-08-22 Lorenzo Bettini * src/lib/optscanner.ll: any string is considered a tag handle // comments * src/lib/generatorfactory.cc (createGenerators): iterate through tags, instead of using global TextGenerators, that are now removed 2004-08-08 Lorenzo Bettini * configure.in: check for the right ar command to use 2004-08-03 Lorenzo Bettini * src/genhtml/htmldocgenerator.cc: (generate_start_doc), (generate_end_doc) <tt><pre> are on the same line without additional newlines. 2004-07-11 Lorenzo Bettini * src/syslog_scanner.ll: scanner for log files contributed by Geir Nilsen * acinclude.m4 (AC_CXX_HAVE_IOS_BASE): check for ios_base 2004-04-15 Lorenzo Bettini * src/lib/fileutil.cc: use strings and fstreams 2004-03-04 Lorenzo Bettini * src/sml_scanner.ll: added scanner for SML 2003-12-12 Lorenzo Bettini * src/genhtml/htmldecorator.cc (generateAttrVal): use "" for attribute values 2003-11-26 Lorenzo Bettini * src/caml_scanner.ll: added scanner for CAML * src/perl_scanner.ll: treat \" as a symbol when used in regular expressions * src/src-hilite-lesspipe.sh.in: Added to be used with less 2003-11-25 Lorenzo Bettini * src/lib/fileutil.cc (get_file_extension): added * src/lib/cmdline.ggo: src-lang is not required * src/lib/genfun.cc (processFile): use ScannerMap for invoking the requested scanner and try to infer the scanner to be called according to the file extension * src/lib/scanner_map.h (class ScannerMap): added for storing the association between file types and scanners * src/cpp_scanner.ll: handle tabs in preprocessing directives 2003-11-25 Marc C�t� * src/lua_scanner.ll: Added scanner for the language LUA 2003-10-25 Lorenzo Bettini * src/lib/cmdline.ggo: added --no-doc option to cancel the --doc option even if it is implied added --gen-version flag to disable the generation of source-highlight version in the output file 2003-10-05 Lorenzo Bettini * src/cpp_scanner.ll: treat \r so that they are generated only outside tags * src/java_scanner.ll: IDEM * src/javascript_scanner.ll: IDEM * src/prolog_scanner.ll: IDEM * src/php3_scanner.ll: IDEM * src/perl_scanner.ll: IDEM * src/python_scanner.ll: IDEM * src/lib/genfun.cc (generateNewLine): accept a string with possible characters before the actual new line (e.g., \r) 2003-08-31 Lorenzo Bettini * src/javascript_scanner.ll: added scanner for Javascript * src/java_scanner.ll: added true and false in the keywords 2003-07-27 Lorenzo Bettini * src/perl_scanner.ll: correctly treat =head =cut sections 2003-06-29 Lorenzo Bettini * src/changelog_scanner.ll: e-mail address is printed according to string color. recognize lines starting with * but without a source name * src/genhtml/htmldecorator.h (class TagDecorator): use only string * src/lib/generatorfactory.h (class GeneratorFactory): use only string * src/lib/tags.h (class Tag): do not use char * anymore, use string instead * src/lib/colors.h: removed any reference to HTML colors * src/lib/generatorfactory.cc (createGenerator): translate the color through the color map * src/lib/tags.cc (Tag): the constructor does not translate colors anymore, i.e., it is independent from the target language * src/lib/generatorfactory.h (class GeneratorFactory): method createColorMap abstract; it has to be redefined by a specific factory in order to initialize the map of colors * src/lib/colormap.h (class ColorMap): store the mapping for colors and it is independent from the target language 2003-06-22 Lorenzo Bettini * src/lib/genfun.cc (processFile): use GlobalDocGenerator for generating top and bottom * src/lib/docgenerator.h (class DocGenerator): added for handling generation of top and bottom part of a document and to abstract from the target language 2003-06-21 Lorenzo Bettini * src/genesc/escdecorator.h (class EscDecorator): decorator for ESC codes * src/lib/generatorfactory.h (class GeneratorFactory): the create methods now return a TextGenerator instead of TextDecorator 2003-06-13 Don Stauffer * src/lib/srcuntabifier.h (class Untabifier): inherit from Pretranslator and preprocess tab characters * src/lib/srcpretranslator.h (struct Pretranslator): Added for performing any possible needed preprocessing and for directly calling the appropriate generator 2003-03-17 Lorenzo Bettini * src/Makefile.am: explicit rules do not use $< 2003-02-14 Lorenzo Bettini * src/changelog_scanner.ll: when generating the string, collect more characters 2003-02-12 Noritsugu Nakamura * src/ruby_scanner.ll: Added scanner for Ruby language * tests/test.rb: Added test for ruby 2003-01-30 Lorenzo Bettini * NEWS: Version 1.6.3 * src/Makefile.am (LDADD): add getopt and yywrap files for systems that do not provide it 2003-01-30 Christian W. Zuckschwerdt * source-highlight.spec.in: Added for generating .rpm and .rpm.src from the .tar.gz sources 2003-01-17 Lorenzo Bettini * NEWS: Version 1.6.2 2003-01-01 Lorenzo Bettini * compliant to C++ standard headers (iostream etc.), no more backward compatibility warnings with gcc 3.2 2002-11-05 Lorenzo Bettini * NEWS: Version 1.6.1 2002-10-30 Lorenzo Bettini * src/lib/Makefile.am (libcommon_a_LIBADD): correctly add possible missing files 2002-10-13 Lorenzo Bettini * NEWS: Version 1.6 2002-09-17 Lorenzo Bettini * src/source-highlight.cc (main): directly call a StartApp * src/genhtml/startapphtml.h (class StartAppHtml): removed 2002-09-16 Lorenzo Bettini * src/genhtml/cssdecorator.h (class SpanDecorator): moved here * src/genhtml/xhtmldecorator.h (class XhtmlTagDecorator): moved here * src/genhtml/htmldecorator.h (class TagDecorator): moved here * src/lib/decorators.h (class TextDecorator): moved here * src/genhtml/cssgeneratorfactory.h (class CssGeneratorFactory): create generators for css based html * src/genhtml/xhtmlgeneratorfactory.h (class XHtmlGeneratorFactory): create generators for xhtml * src/genhtml/htmlgeneratorfactory.h (class HtmlGeneratorFactory): create generators for html * src/lib/generators.cc: only defines the global generators * src/lib/generatorfactory.h (class GeneratorFactory): Added abstract factory for generators 2002-08-11 Lorenzo Bettini * src/Makefile.am (bin_PROGRAMS): build source-highlight-cgi a separate program to use as a cgi 2002-08-08 Lorenzo Bettini * tests/Makefile.am: added tests for flex and changelog * src/Makefile.am (source_highlight_SOURCES): correctly include changelog_scanner.ll 2002-08-02 John Millaway * src/flex_scanner.ll: Added scanner for flex * src/changelog_scanner.ll: Added scanner for ChangeLog * src/Makefile.am: do not use .stamp files anymore, use flex's prefix 2002-07-30 Lorenzo Bettini * acinclude.m4 (LF_PROG_TXTC): fixed a little bug that shows up only now with the new version of autoconf * acconfig.h: removed, no longer needed with autoconf * configure.in: use the new AC_LIBOBJ * doc/Makefile.am: removed an extra EXTRA_DIST 2002-07-21 Lorenzo Bettini * src/python_scanner.ll: fixed a problem with string comments * src/lib/genfun.cc (processFile): correctly set deleteOStream * src/lib/startapp.cc (start): default to stdout also when -i option is used. (start): check whether "STDOUT" was specified as output * src/lib/genfun.cc (print_xtop): always generate the correct header for XHTML 2002-07-10 Lorenzo Bettini * src/python_scanner.ll: the same * src/php3_scanner.ll: deal with strings that span more than one lines (useful for line numbers) 2002-07-07 Lorenzo Bettini * src/python_scanner.ll: Added scanner for Python provided by Martin Gebert 2002-05-20 Lorenzo Bettini * src/lib/decorators.h (class XhtmlColorDecorator): inherit from XhtmlTagDecorator * src/lib/genfun.cc (print_xtop): generate correct page style options * src/lib/startapp.cc (start): if xhtml is chosen as output format and css is not specified then use Xhtml generators * src/lib/generators.cc (createXhtmlGenerator): Added, create an XhtmlTagDecorator * src/lib/decorators.h (class XhtmlTagDecorator): inherit from TagDecorator and redefine generateAttrVal * src/lib/decorators.cc (generateAttrVal): redefinable method to generate attribute and value * src/lib/genfun.cc: (startColor) (endColor) removed 2002-05-19 Lorenzo Bettini * src/java_scanner.ll: assert is recognized as keyword * doc/Hello_xhtml.html: Added 2002-05-16 Christian W. Zuckschwerdt * src/lib/genfun.cc: (print_xtop) output for xhtml (processFile): also get the output format 2002-04-26 Lorenzo Bettini * NEWS: Version 1.4 released * src/perl_scanner.ll: tab is correctly scanned * src/prolog_scanner.ll: tab is correctly scanned * src/java_scanner.ll: keyword if, while, etc. that use '(' ')' are now correctly highlighted as keywords instead of functions 2002-03-31 Lorenzo Bettini * src/lib/genfun.cc (processFile): default line_num_digit to 5 if IO redirection is used (processFile): call LineNumberDecorator::reset so that if many files are processed the current line number is correctly reset * src/php3_scanner.ll: Added PHP3 scanner, written by Alain Barbet 2002-03-23 Lorenzo Bettini * src/lib/globalostream.h: include iostream.h instead of ostream.h * src/lib/fileutil.h: include iostream.h instead of istream.h 2002-03-06 Lorenzo Bettini * NEWS: Version 1.3 released 2002-03-05 Lorenzo Bettini * doc/source-highlight.1.in: Added man page 2002-03-01 Lorenzo Bettini * src/lib/my_string.h: added for problems with std:string 2002-02-07 Lorenzo Bettini * src/perl_scanner.ll: Added Perl scanner, written by Alain Barbet 2002-01-30 Lorenzo Bettini * src/lib/fileutil.cc (get_line_count): correctly check whether the file can be opened * src/lib/genfun.cc (generateTab): translate tabs even if no --tab option is given, when --line-number is given * src/lib/startapp.cc: cmdline args_info is now global * doc/Makefile.am (Hello_lines.html): Added, example of line number generation 2002-01-29 Lorenzo Bettini * src/cpp_scanner.ll: idem tabs are handled (bug fixed) * src/java_scanner.ll: do not handle \n in COMMENT_STATE, otherwise line numbers would be printed in the same style of comments * tests/Makefile.am: Added tests for --line-number * src/lib/linenogen.cc (reset): reset static data (startDecorate): call generate_lineno (generateln): do not call generate_lineno, only generate and generate_preproc call generate_lineno * src/lib/linenogen.h (class LineNumberDecorator): generated_newline and lineno are static 2002-01-28 Lorenzo Bettini * src/lib/genfun.cc (_generate): directly print to sout, without using generators (so that line numbers are not generated while generating header and footer) 2002-01-26 Lorenzo Bettini * src/lib/cmdline.ggo: Added option for numbering lines * src/lib/textgen.cc (generate): not const anymore, the same for the other generation methods * src/lib/linenogen.h (class LineNumberDecorator): generate line numbers * src/lib/linenumdigit.h: contain extern definition of line_num_digit 2002-01-25 Lorenzo Bettini * src/lib/globalostream.h: contain extern definition of sout * src/lib/genfun.cc (processFile): compute the number of digits to represent a line number * src/lib/fileutil.cc (get_line_count): count lines in a file * src/lib/genfun.cc (processFile): correctly check whether it is possible to open the file for writing * tests/Makefile.am (test_header.html): Added test for header and footer * src/lib/startapp.cc (start): set entire_doc also if docHeader or docFooter is specified 2001-12-26 Lorenzo Bettini * tests/Makefile.am (check_prolog2html): check for prolog sources * tests/test.pl: test for Prolog * src/prolog_scanner.ll: Added the scanner for Prolog provided by Martin Gebert * src/substit_scanner.templ: this is the template from which all *_scanner.sed are automatically generated * src/lib/startapp.cc (start): check whether the output format is html * configure.in: versions for scanners * tests/Makefile.am: call source-highlight with the appropriate command line option instead of java2html and cpp2html * src/lib/genfun.cc (processFile): instead of programName and programVersion take as parameter the source language and call the appropriate lexer * src/cpp2html.cc: removed * src/java2html.cc: removed * src/source-highlight.cc (main): now this is the only main file * src/cpp_scanner.sed: the same for cpp * src/java_scanner.sed: sed file substitution for java scanner generated by flex * src/lib/cmdline.ggo: Added option src-lang for specifying the source language (e.g. java, cpp, etc.) and out-format for the output format (for the moment only html) 2001-12-20 Lorenzo Bettini * NEWS: Version 1.2.1 released * src/getopt.c: much more modern version taken from GNU C library * src/getopt1.c: much more modern version taken from GNU C library * src/getopt.h: much more modern version taken from GNU C library * src/lib/alloca.c: removed, no longer needed * configure.in: removed check for alloca * src/lib/my_sstream.h: use using std::ostringstream if the compiler supports it * src/lib/my_set.h: use using std::set if the compiler supports it 2001-12-03 Lorenzo Bettini * NEWS: Version 1.2 released * configure.in: upgrade to new versions * src/lib/fileutil.cc (file_error): use streams instead of fprintf 2001-11-28 Lorenzo Bettini * src/lib/list.h: removed * src/lib/tags.h (struct TagLess): Added for comparing two tags (class Tags): use set as a container * src/lib/messages.h: methods and functions get const char * * src/lib/optparser.yy (yyerror): use ostringstream instead of strstream * src/includes/sstream: Added in case sstream is missing in the standard library * configure.in: added check for STL 2001-11-25 Lorenzo Bettini * src\lib\fileutil.cc (createOutputFileName): set outputFileName[0] to '\0' in order to make strcat work correctly 2001-09-23 Lorenzo Bettini * tests/test_template.cc: Added to test highlighting of templates * src/lib/genfun.cc (print_top): URL fixed 2001-08-24 Lorenzo Bettini * src/cpp_scanner.ll: use generate_normal for normal text in INITIAL state * src/java_scanner.ll: use generate_normal for normal text in INITIAL state * src/lib/genfun.cc (generate_normal): Added to print normal text 2001-08-23 Lorenzo Bettini * src/lib/optparser.yy (parseTags): print the correct tag file name * src/lib/messages.h: Added printMessage_noln * src/tags2.j2h: Added, use normal text specification * src/lib/generators.cc: Added NormalGenerator for normal text * src/lib/tags.cc: NULL substituted with 0 * src/lib/tags.h: NULL substituted with 0 * src/lib/optscanner.ll: Added "normal" keyword 2001-08-13 Lorenzo Bettini * NEWS: Version 1.1 released 2001-08-04 Lorenzo Bettini * src/java_scanner.ll: idem * src/cpp_scanner.ll: removed useless code for single line comments * tests/test_comments.java: idem * tests/test_comments.cc: Added in order to test only comments * tests/Makefile.am: started to modify it in order to handle more than one single test per program 2001-07-07 Lorenzo Bettini * src/lib/genfun.cc (get_input_file_name): Added to use CHAROOT_INPUT_DIR (processFile): use get_input_file_name to obtain the complete path of the input file name * configure.in: Added --enable-input-chroot * src/lib/fileutil.cc (createOutputFileName): Also check for DOS path separator so that it works also under DOS systems 2001-06-27 Lorenzo Bettini * doc/Makefile.am: moved here * src/lib/Makefile.am: removed generation of html from sources * src/lib/startapp.cc (start): Pass output-dir to createOutputFileName * src/lib/cmdline.ggo: Added --output-dir option 2001-06-24 Lorenzo Bettini * src/lib/fileutil.cc (createOutputFileName): also get the outputDir, but not used yet * src/lib/envmapper.c: include ctype for isxdigit * src/lib/chartranslator.cc (translate): cast the string character to unsigned so that also extended ASCII is handled (e.g. foreign characters, such as �). 2001-06-19 Robert Wetzel * src/lib/envmapper.c (__convert_char): Added (__convert_string): Added interpret '%XX' 'characters' of 'QUERY_STRING' checks for CGI by scanning REQUEST_METHOD 'QUERY_STRING' is determined by REQUEST_METHOD Both http-methods (GET & POST) are supported now. '%'-sequences will be converted, if given correctly. * src/lib/envmapper.h: added ENV_REQUEST_METHOD, MAX_QUERY_STRING_LEN, REQUEST_METHOD_GET 2001-06-13 Lorenzo Bettini (LAP) * src/lib/startapp.cc: Added include stdlib.h 2001-06-03 Lorenzo Bettini * Version 1 released * src/lib/tags.h (class Tag): darkgreen handled * src/lib/optscanner.ll: brightgreen added (bug fixed) * src/lib/list.h (class List): comments are in English now 2001-06-02 Lorenzo Bettini * src/genhtml/startapphtml.h (class StartAppHtml): specialize class StartApp * src/genhtml/startapp4html.cc (startapp4html): moved in this directory for html related stuff * src/lib/startapp.h (class StartApp): Added, for starting the translation * src/lib/startapp4html.cc (print_version): print GNU as well 2001-05-24 Lorenzo Bettini * src/java_scanner.ll: removed < > & token scanning * src/cpp_scanner.ll: removed < > & token scanning call generateString for includes with <> * src/lib/textgen.cc (generateEntire): Call generate_preproc instead of generate (beginText): Idem (endText): Idem 2001-05-20 Lorenzo Bettini * src/lib/textgen.cc (generate_preproc): Added, preprocess the string translate any special characters * src/lib/genfun.cc (print_top): print information about source-highlighter * src/lib/startapp4html.cc (startapp4html): print help and version * src/lib/reportbugs.text: report bugs mail address here * src/lib/copyright.text: copyright here * src/lib/cmdline.ggo: Added purpose * configure.in: versions of java2html and cpp2html are created in config.h 2001-05-19 Lorenzo Bettini * src/lib/startapp4html.cc (startapp4html): use HtmlCharTranslator * src/lib/textgen.h (class TextGenerator): Added constructor to get a CharTranslator * src/lib/textgen.cc: Added, implementation moved here * src/lib/html_chartranslator.h (class HtmlCharTranslator): Specialize CharTranslator for translating characters for html * src/lib/chartranslator.h (class CharTranslator): Added, to translate some special characters, base class * src/lib/strdup.c (strdup): Added in case it's not in std library 2001-04-16 Lorenzo Bettini * src/lib/startapp4html.cc (startapp4html): if cgi print cgi header * src/cpp2html.cc (main): IDEM * src/java2html.cc (main): simply call startapp * src/lib/startapp.cc (startapp): Added, the entry point to be called in main 2001-04-15 Lorenzo Bettini * src/cpp_scanner.ll: IDEM * src/java_scanner.ll: \n is put back in the stream while in single line mode, so that single line comments are treated according to HTML standards, as suggested by Robert Wetzel 2001-04-11 Robert Wetzel * src/lib/envmapper.c (map_environment): in case QUERY_STRING is defined in the environment, translate the string passed by the html page into command line option for the standard program. It is used if the program is used as a CGI 2001-03-18 Lorenzo Bettini * src/lib/optparser.yy (openTagsFile): First try with the possible specified tag file * src/lib/cmdline.ggo: Added --tags-file option for specifying the tag file * src/java_scanner.ll: highlight symbols, curly brackets and functions 'import' is considered 'preproc' instead of 'keyword' * test/Makefile.am: Added test directory for testing 2001-03-17 Lorenzo Bettini * src/cpp2html.cc: Added, replace previous main.cc * src/lib/fileutil.cc: Added, contain util functions for files, previously in main * src/lib/genfun.cc: Added, contain the gen functions, previously in main * src/main.cc: removed 2001-03-15 Lorenzo Bettini * common files for cpp2html and java2html have been moved to directory lib, and are linked into a library * configure.in: added check for ranlib 2001-02-11 Geurt Vos * src/tags.h (class Tag): Added DirectColor and for handling colors specified with # format * src/optscanner.ll: Added keywords and colors for... see below and for for handling colors specified with # format * src/main.cc: Added functions for... see below * src/generators.cc: Added generators for preproc, function, symbols and bracket * src/colors.h: Added teal, gray and darkblue ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/Makefile.in������������������������������������������������������������������0000664�0001750�0001750�00000125262�11675044677�014007� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Copyright (C) 1999, 2000, 2001 Lorenzo Bettini <http://www.lorenzobettini.it> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/_sstream $(srcdir)/config.h.in \ $(srcdir)/source-highlight.pc.in \ $(srcdir)/source-highlight.spec.in $(top_srcdir)/configure \ AUTHORS COPYING ChangeLog INSTALL NEWS THANKS \ build-aux/config.guess build-aux/config.sub build-aux/depcomp \ build-aux/install-sh build-aux/ltmain.sh build-aux/mdate-sh \ build-aux/missing build-aux/texinfo.tex ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/gl/m4/00gnulib.m4 \ $(top_srcdir)/gl/m4/ac_prog_doxygen.m4 \ $(top_srcdir)/gl/m4/dirent_h.m4 $(top_srcdir)/gl/m4/dirname.m4 \ $(top_srcdir)/gl/m4/double-slash-root.m4 \ $(top_srcdir)/gl/m4/extensions.m4 \ $(top_srcdir)/gl/m4/getopt.m4 \ $(top_srcdir)/gl/m4/gnulib-common.m4 \ $(top_srcdir)/gl/m4/gnulib-comp.m4 \ $(top_srcdir)/gl/m4/include_next.m4 \ $(top_srcdir)/gl/m4/malloc.m4 $(top_srcdir)/gl/m4/memset.m4 \ $(top_srcdir)/gl/m4/mkdir.m4 $(top_srcdir)/gl/m4/nocrash.m4 \ $(top_srcdir)/gl/m4/ssize_t.m4 $(top_srcdir)/gl/m4/stdbool.m4 \ $(top_srcdir)/gl/m4/stddef_h.m4 \ $(top_srcdir)/gl/m4/stdlib_h.m4 $(top_srcdir)/gl/m4/strdup.m4 \ $(top_srcdir)/gl/m4/string_h.m4 \ $(top_srcdir)/gl/m4/sys_stat_h.m4 \ $(top_srcdir)/gl/m4/time_h.m4 $(top_srcdir)/gl/m4/unistd_h.m4 \ $(top_srcdir)/gl/m4/warn-on-use.m4 \ $(top_srcdir)/gl/m4/wchar_t.m4 \ $(top_srcdir)/m4/ax_boost_base.m4 \ $(top_srcdir)/m4/ax_boost_regex.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = source-highlight.pc source-highlight.spec sstream CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(bash_completiondir)" \ "$(DESTDIR)$(pkgconfigdir)" \ "$(DESTDIR)$(source_highlightdocdir)" DATA = $(bash_completion_DATA) $(pkgconfig_DATA) \ $(source_highlightdoc_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir dist dist-all distcheck ETAGS = etags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ { test ! -d "$(distdir)" \ || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr "$(distdir)"; }; } am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ABSOLUTEDATADIR = @ABSOLUTEDATADIR@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ ARFLAGS = @ARFLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASH_COMPLETION_DIR = @BASH_COMPLETION_DIR@ BASH_SHELL = @BASH_SHELL@ BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ BOOST_LDFLAGS = @BOOST_LDFLAGS@ BOOST_REGEX_LIB = @BOOST_REGEX_LIB@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHROOT_INPUT_DIR = @CHROOT_INPUT_DIR@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOUBLECPP = @DOUBLECPP@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GENGETOPT = @GENGETOPT@ GETOPT_H = @GETOPT_H@ GNULIB_ALPHASORT = @GNULIB_ALPHASORT@ GNULIB_ATOLL = @GNULIB_ATOLL@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ GNULIB_CHDIR = @GNULIB_CHDIR@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@ GNULIB_DIRFD = @GNULIB_DIRFD@ GNULIB_DUP = @GNULIB_DUP@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ GNULIB_FDATASYNC = @GNULIB_FDATASYNC@ GNULIB_FDOPENDIR = @GNULIB_FDOPENDIR@ GNULIB_FFSL = @GNULIB_FFSL@ GNULIB_FFSLL = @GNULIB_FFSLL@ GNULIB_FSTAT = @GNULIB_FSTAT@ GNULIB_FSTATAT = @GNULIB_FSTATAT@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@ GNULIB_GRANTPT = @GNULIB_GRANTPT@ GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@ GNULIB_LCHMOD = @GNULIB_LCHMOD@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MBTOWC = @GNULIB_MBTOWC@ GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_MKDIRAT = @GNULIB_MKDIRAT@ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ GNULIB_MKFIFO = @GNULIB_MKFIFO@ GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@ GNULIB_MKNOD = @GNULIB_MKNOD@ GNULIB_MKNODAT = @GNULIB_MKNODAT@ GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_MKTIME = @GNULIB_MKTIME@ GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@ GNULIB_OPENDIR = @GNULIB_OPENDIR@ GNULIB_PIPE = @GNULIB_PIPE@ GNULIB_PIPE2 = @GNULIB_PIPE2@ GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PTSNAME = @GNULIB_PTSNAME@ GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PWRITE = @GNULIB_PWRITE@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_READ = @GNULIB_READ@ GNULIB_READDIR = @GNULIB_READDIR@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ GNULIB_REWINDDIR = @GNULIB_REWINDDIR@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SCANDIR = @GNULIB_SCANDIR@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_STAT = @GNULIB_STAT@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRERROR_R = @GNULIB_STRERROR_R@ GNULIB_STRNCAT = @GNULIB_STRNCAT@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRPTIME = @GNULIB_STRPTIME@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOD = @GNULIB_STRTOD@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRTOLL = @GNULIB_STRTOLL@ GNULIB_STRTOULL = @GNULIB_STRTOULL@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@ GNULIB_TIMEGM = @GNULIB_TIMEGM@ GNULIB_TIME_R = @GNULIB_TIME_R@ GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@ GNULIB_UNSETENV = @GNULIB_UNSETENV@ GNULIB_USLEEP = @GNULIB_USLEEP@ GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@ GNULIB_WCTOMB = @GNULIB_WCTOMB@ GNULIB_WRITE = @GNULIB_WRITE@ GNULIB__EXIT = @GNULIB__EXIT@ GREP = @GREP@ HAVE_ALPHASORT = @HAVE_ALPHASORT@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ HAVE_CHOWN = @HAVE_CHOWN@ HAVE_CLOSEDIR = @HAVE_CLOSEDIR@ HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@ HAVE_DECL_FDOPENDIR = @HAVE_DECL_FDOPENDIR@ HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ HAVE_DIRENT_H = @HAVE_DIRENT_H@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHDIR = @HAVE_FCHDIR@ HAVE_FCHMODAT = @HAVE_FCHMODAT@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FDATASYNC = @HAVE_FDATASYNC@ HAVE_FDOPENDIR = @HAVE_FDOPENDIR@ HAVE_FFSL = @HAVE_FFSL@ HAVE_FFSLL = @HAVE_FFSLL@ HAVE_FSTATAT = @HAVE_FSTATAT@ HAVE_FSYNC = @HAVE_FSYNC@ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ HAVE_FUTIMENS = @HAVE_FUTIMENS@ HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ HAVE_GETGROUPS = @HAVE_GETGROUPS@ HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ HAVE_GETLOGIN = @HAVE_GETLOGIN@ HAVE_GETOPT_H = @HAVE_GETOPT_H@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GRANTPT = @HAVE_GRANTPT@ HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LCHOWN = @HAVE_LCHOWN@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ HAVE_LSTAT = @HAVE_LSTAT@ HAVE_MBSLEN = @HAVE_MBSLEN@ HAVE_MEMCHR = @HAVE_MEMCHR@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_MKDIRAT = @HAVE_MKDIRAT@ HAVE_MKDTEMP = @HAVE_MKDTEMP@ HAVE_MKFIFO = @HAVE_MKFIFO@ HAVE_MKFIFOAT = @HAVE_MKFIFOAT@ HAVE_MKNOD = @HAVE_MKNOD@ HAVE_MKNODAT = @HAVE_MKNODAT@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMP = @HAVE_MKSTEMP@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ HAVE_NANOSLEEP = @HAVE_NANOSLEEP@ HAVE_OPENDIR = @HAVE_OPENDIR@ HAVE_OS_H = @HAVE_OS_H@ HAVE_PIPE = @HAVE_PIPE@ HAVE_PIPE2 = @HAVE_PIPE2@ HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@ HAVE_PREAD = @HAVE_PREAD@ HAVE_PTSNAME = @HAVE_PTSNAME@ HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ HAVE_PWRITE = @HAVE_PWRITE@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_READDIR = @HAVE_READDIR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ HAVE_REALPATH = @HAVE_REALPATH@ HAVE_REWINDDIR = @HAVE_REWINDDIR@ HAVE_RPMATCH = @HAVE_RPMATCH@ HAVE_SCANDIR = @HAVE_SCANDIR@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@ HAVE_SLEEP = @HAVE_SLEEP@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRPTIME = @HAVE_STRPTIME@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ HAVE_TIMEGM = @HAVE_TIMEGM@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ HAVE_USLEEP = @HAVE_USLEEP@ HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE__BOOL = @HAVE__BOOL@ HAVE__EXIT = @HAVE__EXIT@ HELP2MAN = @HELP2MAN@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBRARY_NAMESPACE = @LIBRARY_NAMESPACE@ LIBRARY_VERSION = @LIBRARY_VERSION@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@ NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ NEXT_DIRENT_H = @NEXT_DIRENT_H@ NEXT_GETOPT_H = @NEXT_GETOPT_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PRAGMA_COLUMNS = @PRAGMA_COLUMNS@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ RANLIB = @RANLIB@ REPLACE_CALLOC = @REPLACE_CALLOC@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ REPLACE_CHOWN = @REPLACE_CHOWN@ REPLACE_CLOSE = @REPLACE_CLOSE@ REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@ REPLACE_DIRFD = @REPLACE_DIRFD@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@ REPLACE_FSTAT = @REPLACE_FSTAT@ REPLACE_FSTATAT = @REPLACE_FSTATAT@ REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_LSTAT = @REPLACE_LSTAT@ REPLACE_MALLOC = @REPLACE_MALLOC@ REPLACE_MBTOWC = @REPLACE_MBTOWC@ REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKDIR = @REPLACE_MKDIR@ REPLACE_MKFIFO = @REPLACE_MKFIFO@ REPLACE_MKNOD = @REPLACE_MKNOD@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OPENDIR = @REPLACE_OPENDIR@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_PWRITE = @REPLACE_PWRITE@ REPLACE_READ = @REPLACE_READ@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_REALLOC = @REPLACE_REALLOC@ REPLACE_REALPATH = @REPLACE_REALPATH@ REPLACE_RMDIR = @REPLACE_RMDIR@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_STAT = @REPLACE_STAT@ REPLACE_STPNCPY = @REPLACE_STPNCPY@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRERROR_R = @REPLACE_STRERROR_R@ REPLACE_STRNCAT = @REPLACE_STRNCAT@ REPLACE_STRNDUP = @REPLACE_STRNDUP@ REPLACE_STRNLEN = @REPLACE_STRNLEN@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ REPLACE_UNLINK = @REPLACE_UNLINK@ REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ REPLACE_UNSETENV = @REPLACE_UNSETENV@ REPLACE_USLEEP = @REPLACE_USLEEP@ REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@ REPLACE_WCTOMB = @REPLACE_WCTOMB@ REPLACE_WRITE = @REPLACE_WRITE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STRIP = @STRIP@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TAR = @TAR@ TEXI2HTML = @TEXI2HTML@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ VALGRIND = @VALGRIND@ VERSION = @VERSION@ YACC = @YACC@ YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bash_completiondir = @bash_completiondir@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ gltests_WITNESS = @gltests_WITNESS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ source_highlightdatadir = @source_highlightdatadir@ source_highlightdocdir = @source_highlightdocdir@ source_highlightlibdocdir = @source_highlightlibdocdir@ source_highlightlibexampledir = @source_highlightlibexampledir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = m4 gl lib src doc tests EXTRA_DIST = \ source-highlight.spec.in \ source-highlight.spec \ TODO.txt \ CREDITS gl/m4/gnulib-cache.m4 \ completion/source-highlight \ _sstream \ source-highlight.pro defines.pri source_highlightdoc_DATA = \ ChangeLog \ COPYING \ NEWS \ THANKS \ INSTALL \ README \ TODO.txt \ CREDITS @USE_BASH_COMPLETION_FALSE@bash_completion_DATA = @USE_BASH_COMPLETION_TRUE@bash_completion_DATA = completion/source-highlight ACLOCAL_AMFLAGS = -I m4 -I gl/m4 pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = source-highlight.pc DISTCHECK_CONFIGURE_FLAGS = --with-doxygen all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: am--refresh: @: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): config.h: stamp-h1 @if test ! -f $@; then \ rm -f stamp-h1; \ $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 source-highlight.pc: $(top_builddir)/config.status $(srcdir)/source-highlight.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ source-highlight.spec: $(top_builddir)/config.status $(srcdir)/source-highlight.spec.in cd $(top_builddir) && $(SHELL) ./config.status $@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool config.lt install-bash_completionDATA: $(bash_completion_DATA) @$(NORMAL_INSTALL) test -z "$(bash_completiondir)" || $(MKDIR_P) "$(DESTDIR)$(bash_completiondir)" @list='$(bash_completion_DATA)'; test -n "$(bash_completiondir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(bash_completiondir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(bash_completiondir)" || exit $$?; \ done uninstall-bash_completionDATA: @$(NORMAL_UNINSTALL) @list='$(bash_completion_DATA)'; test -n "$(bash_completiondir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(bash_completiondir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bash_completiondir)" && rm -f $$files install-pkgconfigDATA: $(pkgconfig_DATA) @$(NORMAL_INSTALL) test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ done uninstall-pkgconfigDATA: @$(NORMAL_UNINSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(pkgconfigdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(pkgconfigdir)" && rm -f $$files install-source_highlightdocDATA: $(source_highlightdoc_DATA) @$(NORMAL_INSTALL) test -z "$(source_highlightdocdir)" || $(MKDIR_P) "$(DESTDIR)$(source_highlightdocdir)" @list='$(source_highlightdoc_DATA)'; test -n "$(source_highlightdocdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(source_highlightdocdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(source_highlightdocdir)" || exit $$?; \ done uninstall-source_highlightdocDATA: @$(NORMAL_UNINSTALL) @list='$(source_highlightdoc_DATA)'; test -n "$(source_highlightdocdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(source_highlightdocdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(source_highlightdocdir)" && rm -f $$files # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-lzma: distdir tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma $(am__remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @$(am__cd) '$(distuninstallcheck_dir)' \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile $(DATA) config.h installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(bash_completiondir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(source_highlightdocdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-hdr \ distclean-libtool distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-bash_completionDATA install-pkgconfigDATA \ install-source_highlightdocDATA install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-bash_completionDATA uninstall-pkgconfigDATA \ uninstall-source_highlightdocDATA .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \ ctags-recursive install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-am clean clean-generic \ clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ dist-gzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \ distcheck distclean distclean-generic distclean-hdr \ distclean-libtool distclean-tags distcleancheck distdir \ distuninstallcheck dvi dvi-am html html-am info info-am \ install install-am install-bash_completionDATA install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-pkgconfigDATA install-ps install-ps-am \ install-source_highlightdocDATA install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am uninstall-bash_completionDATA \ uninstall-pkgconfigDATA uninstall-source_highlightdocDATA # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/COPYING����������������������������������������������������������������������0000644�0001750�0001750�00000104512�11672675560�012764� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������ GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. <one line to give the program's name and a brief idea of what it does.> Copyright (C) <year> <name of author> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: <program> Copyright (C) <year> <name of author> This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see <http://www.gnu.org/licenses/>. The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read <http://www.gnu.org/philosophy/why-not-lgpl.html>. ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/configure��������������������������������������������������������������������0000775�0001750�0001750�00002560407�11675044675�013655� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.68 for source-highlight 3.1.6. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software # Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV export CONFIG_SHELL case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" SHELL=${CONFIG_SHELL-/bin/sh} test -n "$DJDIR" || exec 7<&0 </dev/null exec 6>&1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='source-highlight' PACKAGE_TARNAME='source-highlight' PACKAGE_VERSION='3.1.6' PACKAGE_STRING='source-highlight 3.1.6' PACKAGE_BUGREPORT='' PACKAGE_URL='' # Factoring default headers for most tests. ac_includes_default="\ #include <stdio.h> #ifdef HAVE_SYS_TYPES_H # include <sys/types.h> #endif #ifdef HAVE_SYS_STAT_H # include <sys/stat.h> #endif #ifdef STDC_HEADERS # include <stdlib.h> # include <stddef.h> #else # ifdef HAVE_STDLIB_H # include <stdlib.h> # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include <memory.h> # endif # include <string.h> #endif #ifdef HAVE_STRINGS_H # include <strings.h> #endif #ifdef HAVE_INTTYPES_H # include <inttypes.h> #endif #ifdef HAVE_STDINT_H # include <stdint.h> #endif #ifdef HAVE_UNISTD_H # include <unistd.h> #endif" ac_header_list= gl_getopt_required=POSIX gl_getopt_required=POSIX ac_func_list= ac_subst_vars='gltests_LTLIBOBJS gltests_LIBOBJS gl_LTLIBOBJS gl_LIBOBJS am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS MAINT MAINTAINER_MODE_FALSE MAINTAINER_MODE_TRUE USE_BASH_COMPLETION_FALSE USE_BASH_COMPLETION_TRUE ABSOLUTEDATADIR TEXI2HTML TAR BASH_SHELL HAVE_DOXYGEN_FALSE HAVE_DOXYGEN_TRUE DOXYGEN NO_CTAGS_FALSE NO_CTAGS_TRUE CTAGS NO_HELP2MAN_FALSE NO_HELP2MAN_TRUE HELP2MAN VALGRIND NO_DOUBLECPP_FALSE NO_DOUBLECPP_TRUE DOUBLECPP NO_GENGETOPT_FALSE NO_GENGETOPT_TRUE GENGETOPT gltests_WITNESS HAVE_UNISTD_H NEXT_AS_FIRST_DIRECTIVE_UNISTD_H NEXT_UNISTD_H PTHREAD_H_DEFINES_STRUCT_TIMESPEC SYS_TIME_H_DEFINES_STRUCT_TIMESPEC TIME_H_DEFINES_STRUCT_TIMESPEC NEXT_AS_FIRST_DIRECTIVE_TIME_H NEXT_TIME_H REPLACE_TIMEGM REPLACE_NANOSLEEP REPLACE_MKTIME REPLACE_LOCALTIME_R HAVE_TIMEGM HAVE_STRPTIME HAVE_NANOSLEEP HAVE_DECL_LOCALTIME_R GNULIB_TIME_R GNULIB_TIMEGM GNULIB_STRPTIME GNULIB_NANOSLEEP GNULIB_MKTIME NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H NEXT_SYS_STAT_H NEXT_AS_FIRST_DIRECTIVE_STRING_H NEXT_STRING_H UNDEFINE_STRTOK_R REPLACE_STRTOK_R REPLACE_STRSIGNAL REPLACE_STRNLEN REPLACE_STRNDUP REPLACE_STRNCAT REPLACE_STRERROR_R REPLACE_STRERROR REPLACE_STRCHRNUL REPLACE_STRCASESTR REPLACE_STRSTR REPLACE_STRDUP REPLACE_STPNCPY REPLACE_MEMMEM REPLACE_MEMCHR HAVE_STRVERSCMP HAVE_DECL_STRSIGNAL HAVE_DECL_STRERROR_R HAVE_DECL_STRTOK_R HAVE_STRCASESTR HAVE_STRSEP HAVE_STRPBRK HAVE_DECL_STRNLEN HAVE_DECL_STRNDUP HAVE_DECL_STRDUP HAVE_STRCHRNUL HAVE_STPNCPY HAVE_STPCPY HAVE_RAWMEMCHR HAVE_DECL_MEMRCHR HAVE_MEMPCPY HAVE_DECL_MEMMEM HAVE_MEMCHR HAVE_FFSLL HAVE_FFSL HAVE_MBSLEN GNULIB_STRVERSCMP GNULIB_STRSIGNAL GNULIB_STRERROR_R GNULIB_STRERROR GNULIB_MBSTOK_R GNULIB_MBSSEP GNULIB_MBSSPN GNULIB_MBSPBRK GNULIB_MBSCSPN GNULIB_MBSCASESTR GNULIB_MBSPCASECMP GNULIB_MBSNCASECMP GNULIB_MBSCASECMP GNULIB_MBSSTR GNULIB_MBSRCHR GNULIB_MBSCHR GNULIB_MBSNLEN GNULIB_MBSLEN GNULIB_STRTOK_R GNULIB_STRCASESTR GNULIB_STRSTR GNULIB_STRSEP GNULIB_STRPBRK GNULIB_STRNLEN GNULIB_STRNDUP GNULIB_STRNCAT GNULIB_STRDUP GNULIB_STRCHRNUL GNULIB_STPNCPY GNULIB_STPCPY GNULIB_RAWMEMCHR GNULIB_MEMRCHR GNULIB_MEMPCPY GNULIB_MEMMEM GNULIB_MEMCHR GNULIB_FFSLL GNULIB_FFSL NEXT_AS_FIRST_DIRECTIVE_STDLIB_H NEXT_STDLIB_H NEXT_AS_FIRST_DIRECTIVE_STDDEF_H NEXT_STDDEF_H GL_GENERATE_STDDEF_H_FALSE GL_GENERATE_STDDEF_H_TRUE STDDEF_H HAVE_WCHAR_T REPLACE_NULL HAVE__BOOL GL_GENERATE_STDBOOL_H_FALSE GL_GENERATE_STDBOOL_H_TRUE STDBOOL_H REPLACE_UTIMENSAT REPLACE_STAT REPLACE_MKNOD REPLACE_MKFIFO REPLACE_MKDIR REPLACE_LSTAT REPLACE_FUTIMENS REPLACE_FSTATAT REPLACE_FSTAT HAVE_UTIMENSAT HAVE_MKNODAT HAVE_MKNOD HAVE_MKFIFOAT HAVE_MKFIFO HAVE_MKDIRAT HAVE_LSTAT HAVE_LCHMOD HAVE_FUTIMENS HAVE_FSTATAT HAVE_FCHMODAT GNULIB_UTIMENSAT GNULIB_STAT GNULIB_MKNODAT GNULIB_MKNOD GNULIB_MKFIFOAT GNULIB_MKFIFO GNULIB_MKDIRAT GNULIB_LSTAT GNULIB_LCHMOD GNULIB_FUTIMENS GNULIB_FSTATAT GNULIB_FSTAT GNULIB_FCHMODAT REPLACE_WCTOMB REPLACE_UNSETENV REPLACE_STRTOD REPLACE_SETENV REPLACE_REALPATH REPLACE_REALLOC REPLACE_PUTENV REPLACE_PTSNAME_R REPLACE_MKSTEMP REPLACE_MBTOWC REPLACE_MALLOC REPLACE_CANONICALIZE_FILE_NAME REPLACE_CALLOC HAVE_DECL_UNSETENV HAVE_UNLOCKPT HAVE_SYS_LOADAVG_H HAVE_STRUCT_RANDOM_DATA HAVE_STRTOULL HAVE_STRTOLL HAVE_STRTOD HAVE_DECL_SETENV HAVE_SETENV HAVE_RPMATCH HAVE_REALPATH HAVE_RANDOM_R HAVE_RANDOM_H HAVE_PTSNAME_R HAVE_PTSNAME HAVE_POSIX_OPENPT HAVE_MKSTEMPS HAVE_MKSTEMP HAVE_MKOSTEMPS HAVE_MKOSTEMP HAVE_MKDTEMP HAVE_GRANTPT HAVE_GETSUBOPT HAVE_DECL_GETLOADAVG HAVE_CANONICALIZE_FILE_NAME HAVE_ATOLL HAVE__EXIT GNULIB_WCTOMB GNULIB_UNSETENV GNULIB_UNLOCKPT GNULIB_SYSTEM_POSIX GNULIB_STRTOULL GNULIB_STRTOLL GNULIB_STRTOD GNULIB_SETENV GNULIB_RPMATCH GNULIB_REALPATH GNULIB_REALLOC_POSIX GNULIB_RANDOM_R GNULIB_PUTENV GNULIB_PTSNAME_R GNULIB_PTSNAME GNULIB_POSIX_OPENPT GNULIB_MKSTEMPS GNULIB_MKSTEMP GNULIB_MKOSTEMPS GNULIB_MKOSTEMP GNULIB_MKDTEMP GNULIB_MBTOWC GNULIB_MALLOC_POSIX GNULIB_GRANTPT GNULIB_GETSUBOPT GNULIB_GETLOADAVG GNULIB_CANONICALIZE_FILE_NAME GNULIB_CALLOC_POSIX GNULIB_ATOLL GNULIB__EXIT LTLIBINTL LIBINTL GNULIB_GL_UNISTD_H_GETOPT GETOPT_H HAVE_GETOPT_H NEXT_AS_FIRST_DIRECTIVE_GETOPT_H NEXT_GETOPT_H HAVE_DIRENT_H NEXT_AS_FIRST_DIRECTIVE_DIRENT_H NEXT_DIRENT_H PRAGMA_COLUMNS PRAGMA_SYSTEM_HEADER INCLUDE_NEXT_AS_FIRST_DIRECTIVE INCLUDE_NEXT REPLACE_FDOPENDIR REPLACE_DIRFD REPLACE_CLOSEDIR REPLACE_OPENDIR HAVE_ALPHASORT HAVE_SCANDIR HAVE_FDOPENDIR HAVE_DECL_FDOPENDIR HAVE_DECL_DIRFD HAVE_CLOSEDIR HAVE_REWINDDIR HAVE_READDIR HAVE_OPENDIR GNULIB_ALPHASORT GNULIB_SCANDIR GNULIB_FDOPENDIR GNULIB_DIRFD GNULIB_CLOSEDIR GNULIB_REWINDDIR GNULIB_READDIR GNULIB_OPENDIR UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS UNISTD_H_HAVE_WINSOCK2_H REPLACE_WRITE REPLACE_USLEEP REPLACE_UNLINKAT REPLACE_UNLINK REPLACE_TTYNAME_R REPLACE_SYMLINK REPLACE_SLEEP REPLACE_RMDIR REPLACE_READLINK REPLACE_READ REPLACE_PWRITE REPLACE_PREAD REPLACE_LSEEK REPLACE_LINKAT REPLACE_LINK REPLACE_LCHOWN REPLACE_GETPAGESIZE REPLACE_GETGROUPS REPLACE_GETLOGIN_R REPLACE_GETDOMAINNAME REPLACE_GETCWD REPLACE_FCHOWNAT REPLACE_DUP2 REPLACE_DUP REPLACE_CLOSE REPLACE_CHOWN HAVE_SYS_PARAM_H HAVE_OS_H HAVE_DECL_TTYNAME_R HAVE_DECL_SETHOSTNAME HAVE_DECL_GETUSERSHELL HAVE_DECL_GETPAGESIZE HAVE_DECL_GETLOGIN_R HAVE_DECL_GETDOMAINNAME HAVE_DECL_FDATASYNC HAVE_DECL_FCHDIR HAVE_DECL_ENVIRON HAVE_USLEEP HAVE_UNLINKAT HAVE_SYMLINKAT HAVE_SYMLINK HAVE_SLEEP HAVE_SETHOSTNAME HAVE_READLINKAT HAVE_READLINK HAVE_PWRITE HAVE_PREAD HAVE_PIPE2 HAVE_PIPE HAVE_LINKAT HAVE_LINK HAVE_LCHOWN HAVE_GROUP_MEMBER HAVE_GETPAGESIZE HAVE_GETLOGIN HAVE_GETHOSTNAME HAVE_GETGROUPS HAVE_GETDTABLESIZE HAVE_FTRUNCATE HAVE_FSYNC HAVE_FDATASYNC HAVE_FCHOWNAT HAVE_FCHDIR HAVE_FACCESSAT HAVE_EUIDACCESS HAVE_DUP3 HAVE_DUP2 HAVE_CHOWN GNULIB_WRITE GNULIB_USLEEP GNULIB_UNLINKAT GNULIB_UNLINK GNULIB_UNISTD_H_SIGPIPE GNULIB_UNISTD_H_NONBLOCKING GNULIB_TTYNAME_R GNULIB_SYMLINKAT GNULIB_SYMLINK GNULIB_SLEEP GNULIB_SETHOSTNAME GNULIB_RMDIR GNULIB_READLINKAT GNULIB_READLINK GNULIB_READ GNULIB_PWRITE GNULIB_PREAD GNULIB_PIPE2 GNULIB_PIPE GNULIB_LSEEK GNULIB_LINKAT GNULIB_LINK GNULIB_LCHOWN GNULIB_GROUP_MEMBER GNULIB_GETUSERSHELL GNULIB_GETPAGESIZE GNULIB_GETLOGIN_R GNULIB_GETLOGIN GNULIB_GETHOSTNAME GNULIB_GETGROUPS GNULIB_GETDTABLESIZE GNULIB_GETDOMAINNAME GNULIB_GETCWD GNULIB_FTRUNCATE GNULIB_FSYNC GNULIB_FDATASYNC GNULIB_FCHOWNAT GNULIB_FCHDIR GNULIB_FACCESSAT GNULIB_EUIDACCESS GNULIB_ENVIRON GNULIB_DUP3 GNULIB_DUP2 GNULIB_DUP GNULIB_CLOSE GNULIB_CHOWN GNULIB_CHDIR GL_COND_LIBTOOL_FALSE GL_COND_LIBTOOL_TRUE LIBOBJS LEXLIB LEX_OUTPUT_ROOT LEX YFLAGS YACC BASH_COMPLETION_DIR CHROOT_INPUT_DIR BOOST_REGEX_LIB BOOST_LDFLAGS BOOST_CPPFLAGS CXXCPP OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL MANIFEST_TOOL ac_ct_AR DLLTOOL OBJDUMP LN_S NM ac_ct_DUMPBIN DUMPBIN LD FGREP SED LIBTOOL am__fastdepCXX_FALSE am__fastdepCXX_TRUE CXXDEPMODE ac_ct_CXX CXXFLAGS CXX host_os host_vendor host_cpu host build_os build_vendor build_cpu build RANLIB ARFLAGS AR EGREP GREP CPP am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC LIBRARY_NAMESPACE bash_completiondir source_highlightlibexampledir source_highlightlibdocdir source_highlightdocdir source_highlightdatadir LIBRARY_VERSION am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_dependency_tracking enable_shared enable_static with_pic enable_fast_install with_gnu_ld with_sysroot enable_libtool_lock enable_warnings with_boost with_boost_libdir with_boost_regex enable_input_chroot with_bash_completion with_doxygen enable_maintainer_mode ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP CXX CXXFLAGS CCC CXXCPP YACC YFLAGS' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures source-highlight 3.1.6 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/source-highlight] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of source-highlight 3.1.6:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) --enable-warnings enable compiler warnings --enable-input-chroot=DIR change the root input dir --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-pic try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot=DIR Search for dependent libraries within DIR (or the compiler's sysroot if not specified). --with-boost[=ARG] use Boost library from a standard location (ARG=yes), from the specified location (ARG=<path>), or disable it (ARG=no) [ARG=yes] --with-boost-libdir=LIB_DIR Force given directory for boost libraries. Note that this will override library path detection, so use this parameter only if default library detection fails and you know exactly where your boost libraries are located. --with-boost-regex[=special-lib] use the Regex library from boost - it is possible to specify a certain library for the linker e.g. --with-boost-regex=boost_regex-gcc-mt-d-1_33_1 --with-bash-completion[=DIR] install bash_completion conf file (default is yes) - it is possible to specify bash_completion's config file directory (default is SYSCONFDIR/bash_completion.d) --with-doxygen build doxygen documentation for the api of the library Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a nonstandard directory <lib dir> LIBS libraries to pass to the linker, e.g. -l<library> CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if you have headers in a nonstandard directory <include dir> CPP C preprocessor CXX C++ compiler command CXXFLAGS C++ compiler flags CXXCPP C++ preprocessor YACC The `Yet Another Compiler Compiler' implementation to use. Defaults to the first program found out of: `bison -y', `byacc', `yacc'. YFLAGS The list of arguments that will be passed by default to $YACC. This script will default YFLAGS to the empty string to avoid a default value of `-d' given by some make applications. Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to the package provider. _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF source-highlight configure 3.1.6 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_check_type LINENO TYPE VAR INCLUDES # ------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache # variable VAR accordingly. ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof ($2)) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else eval "$3=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case <limits.h> declares $2. For example, HP-UX 11i <limits.h> declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer <limits.h> to <assert.h> if __STDC__ is defined, since <limits.h> exists even on freestanding compilers. */ #ifdef __STDC__ # include <limits.h> #else # include <assert.h> #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func # ac_fn_cxx_try_compile LINENO # ---------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_compile # ac_fn_cxx_try_cpp LINENO # ------------------------ # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_cpp # ac_fn_cxx_try_link LINENO # ------------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_link # ac_fn_cxx_check_func LINENO FUNC VAR # ------------------------------------ # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_cxx_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case <limits.h> declares $2. For example, HP-UX 11i <limits.h> declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer <limits.h> to <assert.h> if __STDC__ is defined, since <limits.h> exists even on freestanding compilers. */ #ifdef __STDC__ # include <limits.h> #else # include <assert.h> #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_cxx_check_func # ac_fn_cxx_try_run LINENO # ------------------------ # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_cxx_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_run # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES # --------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_cxx_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_cxx_check_header_mongrel # ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES # --------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_cxx_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_cxx_check_header_compile # ac_fn_cxx_check_decl LINENO SYMBOL VAR INCLUDES # ----------------------------------------------- # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR # accordingly. ac_fn_cxx_check_decl () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack as_decl_name=`echo $2|sed 's/ *(.*//'` as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 $as_echo_n "checking whether $as_decl_name is declared... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { #ifndef $as_decl_name #ifdef __cplusplus (void) $as_decl_use; #else (void) $as_decl_name; #endif #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_cxx_check_decl # ac_fn_cxx_check_type LINENO TYPE VAR INCLUDES # --------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache # variable VAR accordingly. ac_fn_cxx_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof ($2)) return 0; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else eval "$3=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_cxx_check_type cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by source-highlight $as_me 3.1.6, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi as_fn_append ac_header_list " dirent.h" gl_getopt_required=GNU as_fn_append ac_header_list " getopt.h" as_fn_append ac_header_list " unistd.h" as_fn_append ac_func_list " strdup" as_fn_append ac_header_list " sys/stat.h" as_fn_append ac_header_list " sys/time.h" # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # this is requested for the install-data-local of doxygen documentation ac_aux_dir= for ac_dir in build-aux "$srcdir"/build-aux; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. ac_config_headers="$ac_config_headers config.h" am__api_version='1.11' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE=$PACKAGE_NAME VERSION=$PACKAGE_VERSION cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' #API version (often = GENERIC_MAJOR_VERSION.GENERIC_MINOR_VERSION) #API_VERSION=1.0 #AC_SUBST(API_VERSION) #shared library versioning LIBRARY_VERSION=4:0:0 # | | | # +------+ | +---+ # | | | # current:revision:age # | | | # | | +- increment if interfaces have been added # | | set to zero if interfaces have been removed # | | or changed # | +- increment if source code has changed # | set to zero if current is incremented # +- increment if interfaces have been added, removed or changed cat >>confdefs.h <<_ACEOF #define LIBRARY_VERSION "$LIBRARY_VERSION" _ACEOF source_highlightdatadir=$datadir/source-highlight source_highlightdocdir=$docdir source_highlightlibdocdir=$docdir/api source_highlightlibexampledir=$docdir/examples bash_completiondir=$sysconfdir/bash_completion.d LIBRARY_NAMESPACE=srchilite ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <stdio.h> int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <stdarg.h> #include <stdio.h> #include <sys/types.h> #include <sys/stat.h> /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since # <limits.h> exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include <limits.h> #else # include <assert.h> #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <ac_nonexistent.h> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since # <limits.h> exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include <limits.h> #else # include <assert.h> #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <ac_nonexistent.h> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5 $as_echo_n "checking for Minix Amsterdam compiler... " >&6; } if ${gl_cv_c_amsterdam_compiler+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __ACK__ Amsterdam #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "Amsterdam" >/dev/null 2>&1; then : gl_cv_c_amsterdam_compiler=yes else gl_cv_c_amsterdam_compiler=no fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5 $as_echo "$gl_cv_c_amsterdam_compiler" >&6; } if test -z "$AR"; then if test $gl_cv_c_amsterdam_compiler = yes; then AR='cc -c.a' if test -z "$ARFLAGS"; then ARFLAGS='-o' fi else if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AR="${ac_tool_prefix}ar" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_AR"; then ac_ct_AR=$AR # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_AR="ar" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_AR" = x; then AR="ar" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi else AR="$ac_cv_prog_AR" fi if test -z "$ARFLAGS"; then ARFLAGS='cru' fi fi else if test -z "$ARFLAGS"; then ARFLAGS='cru' fi fi if test -z "$RANLIB"; then if test $gl_cv_c_amsterdam_compiler = yes; then RANLIB=':' else if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi fi fi # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <stdlib.h> #include <stdarg.h> #include <string.h> #include <float.h> int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <string.h> _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <stdlib.h> _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <ctype.h> #include <stdlib.h> #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" if test "x$ac_cv_header_minix_config_h" = xyes; then : MINIX=yes else MINIX= fi if test "$MINIX" = yes; then $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h $as_echo "#define _MINIX 1" >>confdefs.h fi case "$host_os" in hpux*) $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } if ${ac_cv_safe_to_define___extensions__+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ # define __EXTENSIONS__ 1 $ac_includes_default int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_safe_to_define___extensions__=yes else ac_cv_safe_to_define___extensions__=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } test $ac_cv_safe_to_define___extensions__ = yes && $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h $as_echo "#define _ALL_SOURCE 1" >>confdefs.h $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h $as_echo "#define _GNU_SOURCE 1" >>confdefs.h $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h # Code from module dirent: # Code from module dirname-lgpl: # Code from module dosname: # Code from module double-slash-root: # Code from module extensions: # Code from module getopt: # Code from module getopt-gnu: # Code from module getopt-posix: # Code from module gettext-h: # Code from module include_next: # Code from module malloc-posix: # Code from module memset: # Code from module mkdir: # Code from module nocrash: # Code from module progname: # Code from module snippet/_Noreturn: # Code from module snippet/arg-nonnull: # Code from module snippet/c++defs: # Code from module snippet/warn-on-use: # Code from module ssize_t: # Code from module stdbool: # Code from module stddef: # Code from module stdlib: # Code from module strdup: # Code from module string: # Code from module sys_stat: # Code from module time: # Code from module unistd: if test -z "$GCC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC-cc} accepts -Aa" >&5 $as_echo_n "checking whether ${CC-cc} accepts -Aa... " >&6; } if ${ac_cv_cc_aa_flag+:} false; then : $as_echo_n "(cached) " >&6 else echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -Aa -c conftest.c 2>&1`"; then ac_cv_cc_aa_flag=yes else ac_cv_cc_aa_flag=no fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_aa_flag" >&5 $as_echo "$ac_cv_cc_aa_flag" >&6; } if test $ac_cv_cc_aa_flag = yes; then CFLAGS="$CFLAGS -Aa" fi fi ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi for ac_header in libintl.h do : ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default" if test "x$ac_cv_header_libintl_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBINTL_H 1 _ACEOF fi done for ac_header in stddef.h do : ac_fn_c_check_header_mongrel "$LINENO" "stddef.h" "ac_cv_header_stddef_h" "$ac_includes_default" if test "x$ac_cv_header_stddef_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STDDEF_H 1 _ACEOF fi done for ac_func in strftime do : ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime" if test "x$ac_cv_func_strftime" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRFTIME 1 _ACEOF else # strftime is in -lintl on SCO UNIX. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strftime in -lintl" >&5 $as_echo_n "checking for strftime in -lintl... " >&6; } if ${ac_cv_lib_intl_strftime+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char strftime (); int main () { return strftime (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_intl_strftime=yes else ac_cv_lib_intl_strftime=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_strftime" >&5 $as_echo "$ac_cv_lib_intl_strftime" >&6; } if test "x$ac_cv_lib_intl_strftime" = xyes; then : $as_echo "#define HAVE_STRFTIME 1" >>confdefs.h LIBS="-lintl $LIBS" fi fi done ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } if ${ac_cv_cxx_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } if ${ac_cv_prog_cxx_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes else CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= 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 depcc="$CXX" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CXX_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done case `pwd` in *\ * | *\ *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac macro_version='2.4' macro_revision='1.3293' ltmain="$ac_aux_dir/ltmain.sh" # Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\(["`$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 $as_echo_n "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "" } case "$ECHO" in printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 $as_echo "printf" >&6; } ;; print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 $as_echo "print -r" >&6; } ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 $as_echo "cat" >&6; } ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } if ${ac_cv_path_FGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else if test -z "$FGREP"; then ac_path_FGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in *GNU*) ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_FGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 $as_echo "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in *GNU* | *'with BFD'*) test "$with_gnu_ld" != no && break ;; *) test "$with_gnu_ld" != yes && break ;; esac fi done IFS="$lt_save_ifs" else lt_cv_path_LD="$LD" # Let the user override the test with a path. fi fi LD="$lt_cv_path_LD" if test -n "$LD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 </dev/null` in *GNU* | *'with BFD'*) lt_cv_prog_gnu_ld=yes ;; *) lt_cv_prog_gnu_ld=no ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else if test -n "$ac_tool_prefix"; then for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 $as_echo "$DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$DUMPBIN" && break done fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 $as_echo "$ac_ct_DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_DUMPBIN" && break done if test "x$ac_ct_DUMPBIN" = x; then DUMPBIN=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN fi fi case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols" ;; *) DUMPBIN=: ;; esac fi if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } if ${lt_cv_nm_interface+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 $as_echo "$lt_cv_nm_interface" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi # find the maximum length of command line arguments { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } if ${lt_cv_sys_max_cmd_len+:} false; then : $as_echo_n "(cached) " >&6 else i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac fi if test -n $lt_cv_sys_max_cmd_len ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len : ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 $as_echo "$xsi_shell" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 $as_echo_n "checking whether the shell understands \"+=\"... " >&6; } lt_shell_append=no ( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 $as_echo "$lt_shell_append" >&6; } if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 $as_echo_n "checking how to convert $build file names to $host format... " >&6; } if ${lt_cv_to_host_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac fi to_host_file_cmd=$lt_cv_to_host_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 $as_echo "$lt_cv_to_host_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } if ${lt_cv_to_tool_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else #assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac fi to_tool_file_cmd=$lt_cv_to_tool_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 $as_echo "$lt_cv_to_tool_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if ${lt_cv_ld_reload_flag+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in cygwin* | mingw* | pw32* | cegcc*) if test "$GCC" != yes; then reload_cmds=false fi ;; darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi test -z "$OBJDUMP" && OBJDUMP=objdump { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } if ${lt_cv_deplibs_check_method+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # which responds to the $file_magic_cmd with a given extended regex. # If you have `file' or equivalent on your system and you're not sure # whether `pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 $as_echo "$DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 $as_echo "$ac_ct_DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi test -z "$DLLTOOL" && DLLTOOL=dlltool { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 $as_echo_n "checking how to associate runtime and link libraries... " >&6; } if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh # decide which to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd="$ECHO" ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO if test -n "$ac_tool_prefix"; then for ac_prog in ar do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AR" && break done fi if test -z "$AR"; then ac_ct_AR=$AR for ac_prog in ar do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_AR" && break done if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi fi : ${AR=ar} : ${AR_FLAGS=cru} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 $as_echo_n "checking for archiver @FILE support... " >&6; } if ${lt_cv_ar_at_file+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ar_at_file=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -eq 0; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -ne 0; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 $as_echo "$lt_cv_ar_at_file" >&6; } if test "x$lt_cv_ar_at_file" = xno; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi test -z "$STRIP" && STRIP=: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi test -z "$RANLIB" && RANLIB=: # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } if ${lt_cv_sys_global_symbol_pipe+:} false; then : $as_echo_n "(cached) " >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 $as_echo "failed" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then nm_file_list_spec='@' fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 $as_echo_n "checking for sysroot... " >&6; } # Check whether --with-sysroot was given. if test "${with_sysroot+set}" = set; then : withval=$with_sysroot; else with_sysroot=no fi lt_sysroot= case ${with_sysroot} in #( yes) if test "$GCC" = yes; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 $as_echo "${with_sysroot}" >&6; } as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 $as_echo "${lt_sysroot:-no}" >&6; } # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } if ${lt_cv_cc_needs_belf+:} false; then : $as_echo_n "(cached) " >&6 else 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 cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else lt_cv_cc_needs_belf=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext 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 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. set dummy ${ac_tool_prefix}mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$MANIFEST_TOOL"; then ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL if test -n "$MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 $as_echo "$MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL # Extract the first word of "mt", so it can be a program name with args. set dummy mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_MANIFEST_TOOL"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL if test -n "$ac_ct_MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_MANIFEST_TOOL" = x; then MANIFEST_TOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL fi else MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" fi test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } if ${lt_cv_path_mainfest_tool+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&5 if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 $as_echo "$lt_cv_path_mainfest_tool" >&6; } if test "x$lt_cv_path_mainfest_tool" != xyes; then MANIFEST_TOOL=: fi case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 $as_echo "$LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 $as_echo "$ac_ct_LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then LIPO=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO fi else LIPO="$ac_cv_prog_LIPO" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 $as_echo "$OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 $as_echo "$ac_ct_OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then OTOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL fi else OTOOL="$ac_cv_prog_OTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 $as_echo "$OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 $as_echo "$ac_ct_OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then OTOOL64=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 fi else OTOOL64="$ac_cv_prog_OTOOL64" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } if ${lt_cv_apple_cc_single_mod+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&5 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 fi rm -rf libconftest.dylib* rm -f conftest.* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if ${lt_cv_ld_exported_symbols_list+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_ld_exported_symbols_list=yes else lt_cv_ld_exported_symbols_list=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 $as_echo_n "checking for -force_load linker flag... " >&6; } if ${lt_cv_ld_force_load+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 echo "$AR cru libconftest.a conftest.o" >&5 $AR cru libconftest.a conftest.o 2>&5 echo "$RANLIB libconftest.a" >&5 $RANLIB libconftest.a 2>&5 cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then lt_cv_ld_force_load=yes else cat conftest.err >&5 fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 $as_echo "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[012]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac for ac_header in dlfcn.h do : ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " if test "x$ac_cv_header_dlfcn_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DLFCN_H 1 _ACEOF fi done func_stripname_cnf () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname_cnf # Set options enable_dlopen=no enable_win32_dll=no # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac else enable_shared=yes fi # Check whether --enable-static was given. if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac else enable_static=yes fi # Check whether --with-pic was given. if test "${with_pic+set}" = set; then : withval=$with_pic; pic_mode="$withval" else pic_mode=default fi test -z "$pic_mode" && pic_mode=default # Check whether --enable-fast-install was given. if test "${enable_fast_install+set}" = set; then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac else enable_fast_install=yes fi # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' test -z "$LN_S" && LN_S="ln -s" if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } if ${lt_cv_objdir+:} false; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir cat >>confdefs.h <<_ACEOF #define LT_OBJDIR "$lt_cv_objdir/" _ACEOF case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/${ac_tool_prefix}file; then lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/file; then lt_cv_path_MAGIC_CMD="$ac_dir/file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac # Use C for the default configuration in the libtool script lt_save_CC="$CC" 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 # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then case $cc_basename in nvcc*) lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; *) lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; *) lt_prog_compiler_pic='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 lt_prog_compiler_wl='-Xlinker ' lt_prog_compiler_pic='-Xcompiler -fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # Lahey Fortran 8.1. lf95*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ F* | *Sun*Fortran*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; esac ;; esac ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if ${lt_cv_prog_compiler_pic+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic=$lt_prog_compiler_pic fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 $as_echo "$lt_cv_prog_compiler_pic" >&6; } lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if ${lt_cv_prog_compiler_pic_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test x"$lt_cv_prog_compiler_pic_works" = xyes; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if ${lt_cv_prog_compiler_static_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test x"$lt_cv_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= always_export_symbols=no archive_cmds= archive_expsym_cmds= compiler_needs_object=no enable_shared_with_static_runtimes=no export_dynamic_flag_spec= export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' hardcode_automatic=no hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported inherit_rpath=no link_all_deplibs=unknown module_cmds= module_expsym_cmds= old_archive_from_new_cmds= old_archive_from_expsyms_cmds= thread_safe_flag_spec= whole_archive_flag_spec= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; linux* | k*bsd*-gnu | gnu*) link_all_deplibs=no ;; esac ld_shlibs=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test "$with_gnu_ld" = yes; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; *\ \(GNU\ Binutils\)\ [3-9]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach <jrb3@best.com> says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' export_dynamic_flag_spec='${wl}--export-all-symbols' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; haiku*) archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' link_all_deplibs=yes ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld='-rpath $libdir' archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else ld_shlibs=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes file_list_spec='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi link_all_deplibs=no else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi export_dynamic_flag_spec='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' ${wl}-bernotok' allow_undefined_flag=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' fi archive_cmds_need_lc=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported always_export_symbols=yes file_list_spec='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, )='true' enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib old_postinstall_cmds='chmod 644 $oldlib' postlink_cmds='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_from_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' enable_shared_with_static_runtimes=yes ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported if test "$lt_cv_ld_force_load" = "yes"; then whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec='' fi link_all_deplibs=yes allow_undefined_flag="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else ld_shlibs=no fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; freebsd1*) ld_shlibs=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='${wl}-E' ;; hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_flag_spec_ld='+b $libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 $as_echo_n "checking if $CC understands -b... " >&6; } if ${lt_cv_prog_compiler__b+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler__b=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -b" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler__b=yes fi else lt_cv_prog_compiler__b=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 $as_echo "$lt_cv_prog_compiler__b" >&6; } if test x"$lt_cv_prog_compiler__b" = xyes; then archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } if ${lt_cv_irix_exported_symbol+:} false; then : $as_echo_n "(cached) " >&6 else save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo (void) { return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_irix_exported_symbol=yes else lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 $as_echo "$lt_cv_irix_exported_symbol" >&6; } if test "$lt_cv_irix_exported_symbol" = yes; then archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' fi else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no hardcode_direct_absolute=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-R$libdir' ;; *) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi archive_cmds_need_lc='no' hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='${wl}-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='${wl}-z,text' allow_undefined_flag='${wl}-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) export_dynamic_flag_spec='${wl}-Blargedynsym' ;; esac fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test "$ld_shlibs" = no && can_build_shared=no with_gnu_ld=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } if ${lt_cv_archive_cmds_need_lc+:} false; then : $as_echo_n "(cached) " >&6 else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc=no else lt_cv_archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; } archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;; *) lt_sed_strip_eq="s,=/,/,g" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's,/\([A-Za-z]:\),\1,g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib<name>.so # instead of lib<name>.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; haiku*) version_type=linux need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || test "X$hardcode_automatic" = "Xyes" ; then # We can hardcode non-existent directories. if test "$hardcode_direct" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } if test "$hardcode_action" = relink || test "$inherit_rpath" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = xyes; then : lt_cv_dlopen="shl_load" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if ${ac_cv_lib_dld_shl_load+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = xyes; then : lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = xyes; then : lt_cv_dlopen="dlopen" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if ${ac_cv_lib_svld_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes else ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if ${ac_cv_lib_dld_dld_link+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes else ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = xyes; then : lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include <dlfcn.h> #endif #include <stdio.h> #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self_static+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include <dlfcn.h> #endif #include <stdio.h> #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 $as_echo "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi striplib= old_striplib= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 $as_echo_n "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac fi # Report which library types will actually be built { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu CC="$lt_save_CC" if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 $as_echo_n "checking how to run the C++ preprocessor... " >&6; } if test -z "$CXXCPP"; then if ${ac_cv_prog_CXXCPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" do ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since # <limits.h> exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include <limits.h> #else # include <assert.h> #endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <ac_nonexistent.h> _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CXXCPP=$CXXCPP fi CXXCPP=$ac_cv_prog_CXXCPP else ac_cv_prog_CXXCPP=$CXXCPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 $as_echo "$CXXCPP" >&6; } ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since # <limits.h> exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include <limits.h> #else # include <assert.h> #endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <ac_nonexistent.h> _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu else _lt_caught_CXX_error=yes fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu archive_cmds_need_lc_CXX=no allow_undefined_flag_CXX= always_export_symbols_CXX=no archive_expsym_cmds_CXX= compiler_needs_object_CXX=no export_dynamic_flag_spec_CXX= hardcode_direct_CXX=no hardcode_direct_absolute_CXX=no hardcode_libdir_flag_spec_CXX= hardcode_libdir_flag_spec_ld_CXX= hardcode_libdir_separator_CXX= hardcode_minus_L_CXX=no hardcode_shlibpath_var_CXX=unsupported hardcode_automatic_CXX=no inherit_rpath_CXX=no module_cmds_CXX= module_expsym_cmds_CXX= link_all_deplibs_CXX=unknown old_archive_cmds_CXX=$old_archive_cmds reload_flag_CXX=$reload_flag reload_cmds_CXX=$reload_cmds no_undefined_flag_CXX= whole_archive_flag_spec_CXX= enable_shared_with_static_runtimes_CXX=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o objext_CXX=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_caught_CXX_error" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} CFLAGS=$CXXFLAGS compiler=$CC compiler_CXX=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' else lt_prog_compiler_no_builtin_flag_CXX= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in *GNU* | *'with BFD'*) test "$with_gnu_ld" != no && break ;; *) test "$with_gnu_ld" != yes && break ;; esac fi done IFS="$lt_save_ifs" else lt_cv_path_LD="$LD" # Let the user override the test with a path. fi fi LD="$lt_cv_path_LD" if test -n "$LD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 </dev/null` in *GNU* | *'with BFD'*) lt_cv_prog_gnu_ld=yes ;; *) lt_cv_prog_gnu_ld=no ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_CXX= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } ld_shlibs_CXX=yes case $host_os in aix3*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_CXX='' hardcode_direct_CXX=yes hardcode_direct_absolute_CXX=yes hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes file_list_spec_CXX='${wl}-f,' if test "$GXX" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct_CXX=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_CXX=yes hardcode_libdir_flag_spec_CXX='-L$libdir' hardcode_libdir_separator_CXX= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi export_dynamic_flag_spec_CXX='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. always_export_symbols_CXX=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_CXX='-berok' # Determine the default libpath from the value encoded in an empty # executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath__CXX+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath__CXX fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_CXX="-z nodefs" archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath__CXX+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath__CXX fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_CXX=' ${wl}-bernotok' allow_undefined_flag_CXX=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_CXX='$convenience' fi archive_cmds_need_lc_CXX=yes # This is similar to how AIX traditionally builds its shared # libraries. archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_CXX=unsupported # Joseph Beckenbach <jrb3@best.com> says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_CXX=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in ,cl* | no,cl*) # Native MSVC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec_CXX=' ' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=yes file_list_spec_CXX='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true' enable_shared_with_static_runtimes_CXX=yes # Don't use ranlib old_postinstall_cmds_CXX='chmod 644 $oldlib' postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ func_to_tool_file "$lt_outputfile"~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_CXX='-L$libdir' export_dynamic_flag_spec_CXX='${wl}--export-all-symbols' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=no enable_shared_with_static_runtimes_CXX=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_CXX=no fi ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc_CXX=no hardcode_direct_CXX=no hardcode_automatic_CXX=yes hardcode_shlibpath_var_CXX=unsupported if test "$lt_cv_ld_force_load" = "yes"; then whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec_CXX='' fi link_all_deplibs_CXX=yes allow_undefined_flag_CXX="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" if test "$lt_cv_apple_cc_single_mod" != "yes"; then archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi else ld_shlibs_CXX=no fi ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; freebsd[12]*) # C++ shared libraries reported to be fairly broken before # switch to ELF ld_shlibs_CXX=no ;; freebsd-elf*) archive_cmds_need_lc_CXX=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions ld_shlibs_CXX=yes ;; gnu*) ;; haiku*) archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' link_all_deplibs_CXX=yes ;; hpux9*) hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: export_dynamic_flag_spec_CXX='${wl}-E' hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: case $host_cpu in hppa*64*|ia64*) ;; *) export_dynamic_flag_spec_CXX='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no ;; *) hardcode_direct_CXX=yes hardcode_direct_absolute_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; interix[3-9]*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' fi fi link_all_deplibs_CXX=yes ;; esac hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: inherit_rpath_CXX=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac archive_cmds_need_lc_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [1-5].* | *pgcpp\ [1-5].*) prelink_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' old_archive_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' archive_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; esac hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_CXX='-rpath $libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' hardcode_libdir_flag_spec_CXX='-R$libdir' whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object_CXX=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; m88k*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) ld_shlibs_CXX=yes ;; openbsd2*) # C++ shared libraries are fairly broken ld_shlibs_CXX=no ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no hardcode_direct_absolute_CXX=yes archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' export_dynamic_flag_spec_CXX='${wl}-E' whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else ld_shlibs_CXX=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx*) case $host in osf3*) allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' ;; *) allow_undefined_flag_CXX=' -expect_unresolved \*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ $RM $lib.exp' hardcode_libdir_flag_spec_CXX='-rpath $libdir' ;; esac hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) archive_cmds_CXX='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ archive_cmds_need_lc_CXX=yes no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_shlibpath_var_CXX=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' ;; esac link_all_deplibs_CXX=yes output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then no_undefined_flag_CXX=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_CXX='${wl}-z,text' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag_CXX='${wl}-z,text' allow_undefined_flag_CXX='${wl}-z,nodefs' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir' hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes export_dynamic_flag_spec_CXX='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~ '"$old_archive_cmds_CXX" reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~ '"$reload_cmds_CXX" ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no GCC_CXX="$GXX" LD_CXX="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... # Dependencies to place before and after the object being linked: predep_objects_CXX= postdep_objects_CXX= predeps_CXX= postdeps_CXX= compiler_lib_search_path_CXX= cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; esac if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case ${prev}${p} in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" || test $p = "-R"; then prev=$p continue fi # Expand the sysroot to ease extracting the directories later. if test -z "$prev"; then case $p in -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; esac fi case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac if test "$pre_test_object_deps_done" = no; then case ${prev} in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$compiler_lib_search_path_CXX"; then compiler_lib_search_path_CXX="${prev}${p}" else compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$postdeps_CXX"; then postdeps_CXX="${prev}${p}" else postdeps_CXX="${postdeps_CXX} ${prev}${p}" fi fi prev= ;; *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$predep_objects_CXX"; then predep_objects_CXX="$p" else predep_objects_CXX="$predep_objects_CXX $p" fi else if test -z "$postdep_objects_CXX"; then postdep_objects_CXX="$p" else postdep_objects_CXX="$postdep_objects_CXX $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling CXX test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken case $host_os in interix[3-9]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. predep_objects_CXX= postdep_objects_CXX= postdeps_CXX= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then postdeps_CXX='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then postdeps_CXX='-library=Cstd -library=Crun' fi ;; esac ;; esac case " $postdeps_CXX " in *" -lc "*) archive_cmds_need_lc_CXX=no ;; esac compiler_lib_search_dirs_CXX= if test -n "${compiler_lib_search_path_CXX}"; then compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi lt_prog_compiler_wl_CXX= lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX= # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic_CXX='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_CXX='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all lt_prog_compiler_pic_CXX= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static_CXX= ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_CXX=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic_CXX='-fPIC -shared' ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac else case $host_os in aix[4-9]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' else lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; dgux*) case $cc_basename in ec++*) lt_prog_compiler_pic_CXX='-KPIC' ;; ghcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then lt_prog_compiler_pic_CXX='+Z' fi ;; aCC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_CXX='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler lt_prog_compiler_wl_CXX='--backend -Wl,' lt_prog_compiler_pic_CXX='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64 which still supported -KPIC. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fPIC' lt_prog_compiler_static_CXX='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fpic' lt_prog_compiler_static_CXX='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; xlc* | xlC* | bgxl[cC]* | mpixl[cC]*) # IBM XL 8.0, 9.0 on PPC and BlueGene lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-qpic' lt_prog_compiler_static_CXX='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) lt_prog_compiler_pic_CXX='-W c,exportall' ;; *) ;; esac ;; netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic_CXX='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) lt_prog_compiler_wl_CXX='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 lt_prog_compiler_pic_CXX='-pic' ;; cxx*) # Digital/Compaq C++ lt_prog_compiler_wl_CXX='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x lt_prog_compiler_pic_CXX='-pic' lt_prog_compiler_static_CXX='-Bstatic' ;; lcc*) # Lucid lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 lt_prog_compiler_pic_CXX='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) lt_prog_compiler_can_build_shared_CXX=no ;; esac fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_CXX= ;; *) lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if ${lt_cv_prog_compiler_pic_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5 $as_echo "$lt_cv_prog_compiler_pic_CXX" >&6; } lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } if ${lt_cv_prog_compiler_pic_works_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works_CXX=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works_CXX=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; } if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then case $lt_prog_compiler_pic_CXX in "" | " "*) ;; *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; esac else lt_prog_compiler_pic_CXX= lt_prog_compiler_can_build_shared_CXX=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if ${lt_cv_prog_compiler_static_works_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works_CXX=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works_CXX=yes fi else lt_cv_prog_compiler_static_works_CXX=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; } if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then : else lt_prog_compiler_static_CXX= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' case $host_os in aix[4-9]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global defined # symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) export_symbols_cmds_CXX="$ltdll_cmds" ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl*) ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' ;; esac ;; linux* | k*bsd*-gnu | gnu*) link_all_deplibs_CXX=no ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no with_gnu_ld_CXX=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_CXX" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_CXX=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_CXX in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } if ${lt_cv_archive_cmds_need_lc_CXX+:} false; then : $as_echo_n "(cached) " >&6 else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_CXX pic_flag=$lt_prog_compiler_pic_CXX compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_CXX allow_undefined_flag_CXX= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc_CXX=no else lt_cv_archive_cmds_need_lc_CXX=yes fi allow_undefined_flag_CXX=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5 $as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; } archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib<name>.so # instead of lib<name>.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; haiku*) version_type=linux need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action_CXX= if test -n "$hardcode_libdir_flag_spec_CXX" || test -n "$runpath_var_CXX" || test "X$hardcode_automatic_CXX" = "Xyes" ; then # We can hardcode non-existent directories. if test "$hardcode_direct_CXX" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no && test "$hardcode_minus_L_CXX" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_CXX=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_CXX=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_CXX=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5 $as_echo "$hardcode_action_CXX" >&6; } if test "$hardcode_action_CXX" = relink || test "$inherit_rpath_CXX" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi fi # test -n "$compiler" CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test "$_lt_caught_CXX_error" != yes ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_config_commands="$ac_config_commands libtool" # Only expand once: # Check whether --enable-warnings was given. if test "${enable_warnings+set}" = set; then : enableval=$enable_warnings; { $as_echo "$as_me:${as_lineno-$LINENO}: checking maximum warning verbosity option" >&5 $as_echo_n "checking maximum warning verbosity option... " >&6; } if test -n "$CXX" then if test "$GXX" = "yes" then ac_compile_warnings_opt='-Wall' fi CXXFLAGS="$CXXFLAGS $ac_compile_warnings_opt" ac_compile_warnings_msg="$ac_compile_warnings_opt for C++" fi if test -n "$CC" then if test "$GCC" = "yes" then ac_compile_warnings_opt='-Wall' fi CFLAGS="$CFLAGS $ac_compile_warnings_opt" ac_compile_warnings_msg="$ac_compile_warnings_msg $ac_compile_warnings_opt for C" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_compile_warnings_msg" >&5 $as_echo "$ac_compile_warnings_msg" >&6; } unset ac_compile_warnings_msg unset ac_compile_warnings_opt fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler implements namespaces" >&5 $as_echo_n "checking whether the compiler implements namespaces... " >&6; } if ${ac_cv_cxx_namespaces+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ namespace Outer { namespace Inner { int i = 0; }} int main () { using namespace Outer::Inner; return i; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_cxx_namespaces=yes else ac_cv_cxx_namespaces=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_namespaces" >&5 $as_echo "$ac_cv_cxx_namespaces" >&6; } if test "$ac_cv_cxx_namespaces" = yes; then $as_echo "#define HAVE_NAMESPACES /**/" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports Standard Template Library" >&5 $as_echo_n "checking whether the compiler supports Standard Template Library... " >&6; } if ${ac_cv_cxx_have_stl+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <list> #include <deque> #ifdef HAVE_NAMESPACES using namespace std; #endif int main () { list<int> x; x.push_back(5); list<int>::iterator iter = x.begin(); if (iter != x.end()) ++iter; return 0; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_cxx_have_stl=yes else ac_cv_cxx_have_stl=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_have_stl" >&5 $as_echo "$ac_cv_cxx_have_stl" >&6; } if test "$ac_cv_cxx_have_stl" = yes; then $as_echo "#define HAVE_STL /**/" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler has stringstream" >&5 $as_echo_n "checking whether the compiler has stringstream... " >&6; } if ${ac_cv_cxx_have_sstream+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <sstream> #ifdef HAVE_NAMESPACES using namespace std; #endif int main () { stringstream message; message << "Hello"; return 0; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_cxx_have_sstream=yes else ac_cv_cxx_have_sstream=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_have_sstream" >&5 $as_echo "$ac_cv_cxx_have_sstream" >&6; } if test "$ac_cv_cxx_have_sstream" = yes; then $as_echo "#define HAVE_SSTREAM /**/" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler has ios_base" >&5 $as_echo_n "checking whether the compiler has ios_base... " >&6; } if ${ac_cv_cxx_have_ios_base+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <fstream> #ifdef HAVE_NAMESPACES using namespace std; #endif int main () { ifstream file ("foo", ios_base::binary); return 0; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_cxx_have_ios_base=yes else ac_cv_cxx_have_ios_base=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_have_ios_base" >&5 $as_echo "$ac_cv_cxx_have_ios_base" >&6; } if test "$ac_cv_cxx_have_sstream" = no; then cat >>confdefs.h <<_ACEOF #define ios_base ios _ACEOF fi # Check whether --with-boost was given. if test "${with_boost+set}" = set; then : withval=$with_boost; if test "$withval" = "no"; then want_boost="no" elif test "$withval" = "yes"; then want_boost="yes" ac_boost_path="" else want_boost="yes" ac_boost_path="$withval" fi else want_boost="yes" fi # Check whether --with-boost-libdir was given. if test "${with_boost_libdir+set}" = set; then : withval=$with_boost_libdir; if test -d "$withval" then ac_boost_lib_path="$withval" else as_fn_error $? "--with-boost-libdir expected directory name" "$LINENO" 5 fi else ac_boost_lib_path="" fi if test "x$want_boost" = "xyes"; then boost_lib_version_req=1.33.1 boost_lib_version_req_shorten=`expr $boost_lib_version_req : '\([0-9]*\.[0-9]*\)'` boost_lib_version_req_major=`expr $boost_lib_version_req : '\([0-9]*\)'` boost_lib_version_req_minor=`expr $boost_lib_version_req : '[0-9]*\.\([0-9]*\)'` boost_lib_version_req_sub_minor=`expr $boost_lib_version_req : '[0-9]*\.[0-9]*\.\([0-9]*\)'` if test "x$boost_lib_version_req_sub_minor" = "x" ; then boost_lib_version_req_sub_minor="0" fi WANT_BOOST_VERSION=`expr $boost_lib_version_req_major \* 100000 \+ $boost_lib_version_req_minor \* 100 \+ $boost_lib_version_req_sub_minor` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for boostlib >= $boost_lib_version_req" >&5 $as_echo_n "checking for boostlib >= $boost_lib_version_req... " >&6; } succeeded=no libsubdirs="lib" ax_arch=`uname -m` if test $ax_arch = x86_64 -o $ax_arch = ppc64 -o $ax_arch = s390x -o $ax_arch = sparc64; then libsubdirs="lib64 lib lib64" fi if test "$ac_boost_path" != ""; then BOOST_CPPFLAGS="-I$ac_boost_path/include" for ac_boost_path_tmp in $libsubdirs; do if test -d "$ac_boost_path"/"$ac_boost_path_tmp" ; then BOOST_LDFLAGS="-L$ac_boost_path/$ac_boost_path_tmp" break fi done elif test "$cross_compiling" != yes; then for ac_boost_path_tmp in /usr /usr/local /opt /opt/local ; do if test -d "$ac_boost_path_tmp/include/boost" && test -r "$ac_boost_path_tmp/include/boost"; then for libsubdir in $libsubdirs ; do if ls "$ac_boost_path_tmp/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi done BOOST_LDFLAGS="-L$ac_boost_path_tmp/$libsubdir" BOOST_CPPFLAGS="-I$ac_boost_path_tmp/include" break; fi done fi if test "$ac_boost_lib_path" != ""; then BOOST_LDFLAGS="-L$ac_boost_lib_path" fi CPPFLAGS_SAVED="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" export CPPFLAGS LDFLAGS_SAVED="$LDFLAGS" LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" export LDFLAGS ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <boost/version.hpp> int main () { #if BOOST_VERSION >= $WANT_BOOST_VERSION // Everything is okay #else # error Boost version is too old #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } succeeded=yes found_system=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test "x$succeeded" != "xyes"; then _version=0 if test "$ac_boost_path" != ""; then if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do _version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'` V_CHECK=`expr $_version_tmp \> $_version` if test "$V_CHECK" = "1" ; then _version=$_version_tmp fi VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'` BOOST_CPPFLAGS="-I$ac_boost_path/include/boost-$VERSION_UNDERSCORE" done fi else if test "$cross_compiling" != yes; then for ac_boost_path in /usr /usr/local /opt /opt/local ; do if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do _version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'` V_CHECK=`expr $_version_tmp \> $_version` if test "$V_CHECK" = "1" ; then _version=$_version_tmp best_path=$ac_boost_path fi done fi done VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'` BOOST_CPPFLAGS="-I$best_path/include/boost-$VERSION_UNDERSCORE" if test "$ac_boost_lib_path" = ""; then for libsubdir in $libsubdirs ; do if ls "$best_path/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi done BOOST_LDFLAGS="-L$best_path/$libsubdir" fi fi if test "x$BOOST_ROOT" != "x"; then for libsubdir in $libsubdirs ; do if ls "$BOOST_ROOT/stage/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi done if test -d "$BOOST_ROOT" && test -r "$BOOST_ROOT" && test -d "$BOOST_ROOT/stage/$libsubdir" && test -r "$BOOST_ROOT/stage/$libsubdir"; then version_dir=`expr //$BOOST_ROOT : '.*/\(.*\)'` stage_version=`echo $version_dir | sed 's/boost_//' | sed 's/_/./g'` stage_version_shorten=`expr $stage_version : '\([0-9]*\.[0-9]*\)'` V_CHECK=`expr $stage_version_shorten \>\= $_version` if test "$V_CHECK" = "1" -a "$ac_boost_lib_path" = "" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: We will use a staged boost library from $BOOST_ROOT" >&5 $as_echo "$as_me: We will use a staged boost library from $BOOST_ROOT" >&6;} BOOST_CPPFLAGS="-I$BOOST_ROOT" BOOST_LDFLAGS="-L$BOOST_ROOT/stage/$libsubdir" fi fi fi fi CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" export CPPFLAGS LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" export LDFLAGS ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <boost/version.hpp> int main () { #if BOOST_VERSION >= $WANT_BOOST_VERSION // Everything is okay #else # error Boost version is too old #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } succeeded=yes found_system=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu fi if test "$succeeded" != "yes" ; then if test "$_version" = "0" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: We could not detect the boost libraries (version $boost_lib_version_req_shorten or higher). If you have a staged boost library (still not installed) please specify \$BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in <boost/version.hpp>. See http://randspringer.de/boost for more documentation." >&5 $as_echo "$as_me: We could not detect the boost libraries (version $boost_lib_version_req_shorten or higher). If you have a staged boost library (still not installed) please specify \$BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in <boost/version.hpp>. See http://randspringer.de/boost for more documentation." >&6;} else { $as_echo "$as_me:${as_lineno-$LINENO}: Your boost libraries seems to old (version $_version)." >&5 $as_echo "$as_me: Your boost libraries seems to old (version $_version)." >&6;} fi # execute ACTION-IF-NOT-FOUND (if present): : else $as_echo "#define HAVE_BOOST /**/" >>confdefs.h # execute ACTION-IF-FOUND (if present): : fi CPPFLAGS="$CPPFLAGS_SAVED" LDFLAGS="$LDFLAGS_SAVED" fi # Check whether --with-boost-regex was given. if test "${with_boost_regex+set}" = set; then : withval=$with_boost_regex; if test "$withval" = "no"; then want_boost="no" elif test "$withval" = "yes"; then want_boost="yes" ax_boost_user_regex_lib="" else want_boost="yes" ax_boost_user_regex_lib="$withval" fi else want_boost="yes" fi if test "x$want_boost" = "xyes"; then CPPFLAGS_SAVED="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" export CPPFLAGS LDFLAGS_SAVED="$LDFLAGS" LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" export LDFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the Boost::Regex library is available" >&5 $as_echo_n "checking whether the Boost::Regex library is available... " >&6; } if ${ax_cv_boost_regex+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <boost/regex.hpp> int main () { boost::regex r(); return 0; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ax_cv_boost_regex=yes else ax_cv_boost_regex=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_boost_regex" >&5 $as_echo "$ax_cv_boost_regex" >&6; } if test "x$ax_cv_boost_regex" = "xyes"; then $as_echo "#define HAVE_BOOST_REGEX /**/" >>confdefs.h BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/[^\/]*//'` if test "x$ax_boost_user_regex_lib" = "x"; then for libextension in `ls $BOOSTLIBDIR/libboost_regex*.so* $BOOSTLIBDIR/libboost_regex*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_regex.*\)\.so.*$;\1;' -e 's;^lib\(boost_regex.*\)\.a*$;\1;'` ; do ax_lib=${libextension} as_ac_Lib=`$as_echo "ac_cv_lib_$ax_lib''_exit" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for exit in -l$ax_lib" >&5 $as_echo_n "checking for exit in -l$ax_lib... " >&6; } if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-l$ax_lib $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char exit (); int main () { return exit (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" else eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : BOOST_REGEX_LIB="-l$ax_lib"; link_regex="yes"; break else link_regex="no" fi done if test "x$link_regex" != "xyes"; then for libextension in `ls $BOOSTLIBDIR/boost_regex*.{dll,a}* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_regex.*\)\.dll.*$;\1;' -e 's;^\(boost_regex.*\)\.a*$;\1;'` ; do ax_lib=${libextension} as_ac_Lib=`$as_echo "ac_cv_lib_$ax_lib''_exit" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for exit in -l$ax_lib" >&5 $as_echo_n "checking for exit in -l$ax_lib... " >&6; } if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-l$ax_lib $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char exit (); int main () { return exit (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" else eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : BOOST_REGEX_LIB="-l$ax_lib"; link_regex="yes"; break else link_regex="no" fi done fi else for ax_lib in $ax_boost_user_regex_lib boost_regex-$ax_boost_user_regex_lib; do as_ac_Lib=`$as_echo "ac_cv_lib_$ax_lib''_main" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -l$ax_lib" >&5 $as_echo_n "checking for main in -l$ax_lib... " >&6; } if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-l$ax_lib $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" else eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : BOOST_REGEX_LIB="-l$ax_lib"; link_regex="yes"; break else link_regex="no" fi done fi if test "x$ax_lib" = "x"; then as_fn_error $? "Could not find a version of the Boost::Regex library!" "$LINENO" 5 fi if test "x$link_regex" != "xyes"; then as_fn_error $? "Could not link against $ax_lib !" "$LINENO" 5 fi fi CPPFLAGS="$CPPFLAGS_SAVED" LDFLAGS="$LDFLAGS_SAVED" fi # Check whether --enable-input-chroot was given. if test "${enable_input_chroot+set}" = set; then : enableval=$enable_input_chroot; if test $enableval = yes || test $enableval = no; then echo "configure: error: you must specify a path for --enable-input-chroot" 1>&2; exit 1; else CHROOT_INPUT_DIR=$enableval; fi else CHROOT_INPUT_DIR= fi cat >>confdefs.h <<_ACEOF #define CHROOT_INPUT_DIR "$CHROOT_INPUT_DIR" _ACEOF # Check whether --with-bash-completion was given. if test "${with_bash_completion+set}" = set; then : withval=$with_bash_completion; if test "$withval" = "no"; then BASH_COMPLETION_DIR="" elif test "$withval" = "yes"; then BASH_COMPLETION_DIR=$sysconfdir/bash_completion.d else BASH_COMPLETION_DIR="$withval" fi else BASH_COMPLETION_DIR=$sysconfdir/bash_completion.d fi for ac_prog in 'bison -y' byacc do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_YACC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$YACC"; then ac_cv_prog_YACC="$YACC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_YACC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi YACC=$ac_cv_prog_YACC if test -n "$YACC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5 $as_echo "$YACC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$YACC" && break done test -n "$YACC" || YACC="yacc" for ac_prog in flex lex do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_LEX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LEX"; then ac_cv_prog_LEX="$LEX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_LEX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LEX=$ac_cv_prog_LEX if test -n "$LEX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5 $as_echo "$LEX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$LEX" && break done test -n "$LEX" || LEX=":" if test "x$LEX" != "x:"; then cat >conftest.l <<_ACEOF %% a { ECHO; } b { REJECT; } c { yymore (); } d { yyless (1); } e { yyless (input () != 0); } f { unput (yytext[0]); } . { BEGIN INITIAL; } %% #ifdef YYTEXT_POINTER extern char *yytext; #endif int main (void) { return ! yylex () + ! yywrap (); } _ACEOF { { ac_try="$LEX conftest.l" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$LEX conftest.l") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex output file root" >&5 $as_echo_n "checking lex output file root... " >&6; } if ${ac_cv_prog_lex_root+:} false; then : $as_echo_n "(cached) " >&6 else if test -f lex.yy.c; then ac_cv_prog_lex_root=lex.yy elif test -f lexyy.c; then ac_cv_prog_lex_root=lexyy else as_fn_error $? "cannot find output from $LEX; giving up" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5 $as_echo "$ac_cv_prog_lex_root" >&6; } LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root if test -z "${LEXLIB+set}"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex library" >&5 $as_echo_n "checking lex library... " >&6; } if ${ac_cv_lib_lex+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_LIBS=$LIBS ac_cv_lib_lex='none needed' for ac_lib in '' -lfl -ll; do LIBS="$ac_lib $ac_save_LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ `cat $LEX_OUTPUT_ROOT.c` _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_lex=$ac_lib fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext test "$ac_cv_lib_lex" != 'none needed' && break done LIBS=$ac_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5 $as_echo "$ac_cv_lib_lex" >&6; } test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5 $as_echo_n "checking whether yytext is a pointer... " >&6; } if ${ac_cv_prog_lex_yytext_pointer+:} false; then : $as_echo_n "(cached) " >&6 else # POSIX says lex can declare yytext either as a pointer or an array; the # default is implementation-dependent. Figure out which it is, since # not all implementations provide the %pointer and %array declarations. ac_cv_prog_lex_yytext_pointer=no ac_save_LIBS=$LIBS LIBS="$LEXLIB $ac_save_LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define YYTEXT_POINTER 1 `cat $LEX_OUTPUT_ROOT.c` _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_prog_lex_yytext_pointer=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5 $as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; } if test $ac_cv_prog_lex_yytext_pointer = yes; then $as_echo "#define YYTEXT_POINTER 1" >>confdefs.h fi rm -f conftest.l $LEX_OUTPUT_ROOT.c fi if test "$LEX" = :; then LEX=${am_missing_run}flex fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lefence" >&5 $as_echo_n "checking for main in -lefence... " >&6; } if ${ac_cv_lib_efence_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lefence $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_efence_main=yes else ac_cv_lib_efence_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_efence_main" >&5 $as_echo "$ac_cv_lib_efence_main" >&6; } if test "x$ac_cv_lib_efence_main" = xyes; then : LIBS="$LIBS" fi ac_cv_lib_efence=ac_cv_lib_efence_main ac_fn_cxx_check_func "$LINENO" "yywrap" "ac_cv_func_yywrap" if test "x$ac_cv_func_yywrap" = xyes; then : $as_echo "#define HAVE_YYWRAP 1" >>confdefs.h else case " $LIBOBJS " in *" yywrap.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS yywrap.$ac_objext" ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <stdlib.h> #include <stdarg.h> #include <string.h> #include <float.h> int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <string.h> _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <stdlib.h> _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <ctype.h> #include <stdlib.h> #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi for ac_header in unistd.h do : ac_fn_cxx_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default" if test "x$ac_cv_header_unistd_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_UNISTD_H 1 _ACEOF fi done # For gnulib. LIBC_FATAL_STDERR_=1 export LIBC_FATAL_STDERR_ GNULIB_CHDIR=0; GNULIB_CHOWN=0; GNULIB_CLOSE=0; GNULIB_DUP=0; GNULIB_DUP2=0; GNULIB_DUP3=0; GNULIB_ENVIRON=0; GNULIB_EUIDACCESS=0; GNULIB_FACCESSAT=0; GNULIB_FCHDIR=0; GNULIB_FCHOWNAT=0; GNULIB_FDATASYNC=0; GNULIB_FSYNC=0; GNULIB_FTRUNCATE=0; GNULIB_GETCWD=0; GNULIB_GETDOMAINNAME=0; GNULIB_GETDTABLESIZE=0; GNULIB_GETGROUPS=0; GNULIB_GETHOSTNAME=0; GNULIB_GETLOGIN=0; GNULIB_GETLOGIN_R=0; GNULIB_GETPAGESIZE=0; GNULIB_GETUSERSHELL=0; GNULIB_GROUP_MEMBER=0; GNULIB_LCHOWN=0; GNULIB_LINK=0; GNULIB_LINKAT=0; GNULIB_LSEEK=0; GNULIB_PIPE=0; GNULIB_PIPE2=0; GNULIB_PREAD=0; GNULIB_PWRITE=0; GNULIB_READ=0; GNULIB_READLINK=0; GNULIB_READLINKAT=0; GNULIB_RMDIR=0; GNULIB_SETHOSTNAME=0; GNULIB_SLEEP=0; GNULIB_SYMLINK=0; GNULIB_SYMLINKAT=0; GNULIB_TTYNAME_R=0; GNULIB_UNISTD_H_NONBLOCKING=0; GNULIB_UNISTD_H_SIGPIPE=0; GNULIB_UNLINK=0; GNULIB_UNLINKAT=0; GNULIB_USLEEP=0; GNULIB_WRITE=0; HAVE_CHOWN=1; HAVE_DUP2=1; HAVE_DUP3=1; HAVE_EUIDACCESS=1; HAVE_FACCESSAT=1; HAVE_FCHDIR=1; HAVE_FCHOWNAT=1; HAVE_FDATASYNC=1; HAVE_FSYNC=1; HAVE_FTRUNCATE=1; HAVE_GETDTABLESIZE=1; HAVE_GETGROUPS=1; HAVE_GETHOSTNAME=1; HAVE_GETLOGIN=1; HAVE_GETPAGESIZE=1; HAVE_GROUP_MEMBER=1; HAVE_LCHOWN=1; HAVE_LINK=1; HAVE_LINKAT=1; HAVE_PIPE=1; HAVE_PIPE2=1; HAVE_PREAD=1; HAVE_PWRITE=1; HAVE_READLINK=1; HAVE_READLINKAT=1; HAVE_SETHOSTNAME=1; HAVE_SLEEP=1; HAVE_SYMLINK=1; HAVE_SYMLINKAT=1; HAVE_UNLINKAT=1; HAVE_USLEEP=1; HAVE_DECL_ENVIRON=1; HAVE_DECL_FCHDIR=1; HAVE_DECL_FDATASYNC=1; HAVE_DECL_GETDOMAINNAME=1; HAVE_DECL_GETLOGIN_R=1; HAVE_DECL_GETPAGESIZE=1; HAVE_DECL_GETUSERSHELL=1; HAVE_DECL_SETHOSTNAME=1; HAVE_DECL_TTYNAME_R=1; HAVE_OS_H=0; HAVE_SYS_PARAM_H=0; REPLACE_CHOWN=0; REPLACE_CLOSE=0; REPLACE_DUP=0; REPLACE_DUP2=0; REPLACE_FCHOWNAT=0; REPLACE_GETCWD=0; REPLACE_GETDOMAINNAME=0; REPLACE_GETLOGIN_R=0; REPLACE_GETGROUPS=0; REPLACE_GETPAGESIZE=0; REPLACE_LCHOWN=0; REPLACE_LINK=0; REPLACE_LINKAT=0; REPLACE_LSEEK=0; REPLACE_PREAD=0; REPLACE_PWRITE=0; REPLACE_READ=0; REPLACE_READLINK=0; REPLACE_RMDIR=0; REPLACE_SLEEP=0; REPLACE_SYMLINK=0; REPLACE_TTYNAME_R=0; REPLACE_UNLINK=0; REPLACE_UNLINKAT=0; REPLACE_USLEEP=0; REPLACE_WRITE=0; UNISTD_H_HAVE_WINSOCK2_H=0; UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0; GNULIB_OPENDIR=0; GNULIB_READDIR=0; GNULIB_REWINDDIR=0; GNULIB_CLOSEDIR=0; GNULIB_DIRFD=0; GNULIB_FDOPENDIR=0; GNULIB_SCANDIR=0; GNULIB_ALPHASORT=0; HAVE_OPENDIR=1; HAVE_READDIR=1; HAVE_REWINDDIR=1; HAVE_CLOSEDIR=1; HAVE_DECL_DIRFD=1; HAVE_DECL_FDOPENDIR=1; HAVE_FDOPENDIR=1; HAVE_SCANDIR=1; HAVE_ALPHASORT=1; REPLACE_OPENDIR=0; REPLACE_CLOSEDIR=0; REPLACE_DIRFD=0; REPLACE_FDOPENDIR=0; { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5 $as_echo_n "checking whether the preprocessor supports include_next... " >&6; } if ${gl_cv_have_include_next+:} false; then : $as_echo_n "(cached) " >&6 else rm -rf conftestd1a conftestd1b conftestd2 mkdir conftestd1a conftestd1b conftestd2 cat <<EOF > conftestd1a/conftest.h #define DEFINED_IN_CONFTESTD1 #include_next <conftest.h> #ifdef DEFINED_IN_CONFTESTD2 int foo; #else #error "include_next doesn't work" #endif EOF cat <<EOF > conftestd1b/conftest.h #define DEFINED_IN_CONFTESTD1 #include <stdio.h> #include_next <conftest.h> #ifdef DEFINED_IN_CONFTESTD2 int foo; #else #error "include_next doesn't work" #endif EOF cat <<EOF > conftestd2/conftest.h #ifndef DEFINED_IN_CONFTESTD1 #error "include_next test doesn't work" #endif #define DEFINED_IN_CONFTESTD2 EOF gl_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <conftest.h> _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : gl_cv_have_include_next=yes else CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <conftest.h> _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : gl_cv_have_include_next=buggy else gl_cv_have_include_next=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CPPFLAGS="$gl_save_CPPFLAGS" rm -rf conftestd1a conftestd1b conftestd2 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5 $as_echo "$gl_cv_have_include_next" >&6; } PRAGMA_SYSTEM_HEADER= if test $gl_cv_have_include_next = yes; then INCLUDE_NEXT=include_next INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next if test -n "$GCC"; then PRAGMA_SYSTEM_HEADER='#pragma GCC system_header' fi else if test $gl_cv_have_include_next = buggy; then INCLUDE_NEXT=include INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next else INCLUDE_NEXT=include INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5 $as_echo_n "checking whether system header files limit the line length... " >&6; } if ${gl_cv_pragma_columns+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __TANDEM choke me #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "choke me" >/dev/null 2>&1; then : gl_cv_pragma_columns=yes else gl_cv_pragma_columns=no fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5 $as_echo "$gl_cv_pragma_columns" >&6; } if test $gl_cv_pragma_columns = yes; then PRAGMA_COLUMNS="#pragma COLUMNS 10000" else PRAGMA_COLUMNS= fi for ac_header in $ac_header_list do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5 $as_echo_n "checking whether // is distinct from /... " >&6; } if ${gl_cv_double_slash_root+:} false; then : $as_echo_n "(cached) " >&6 else if test x"$cross_compiling" = xyes ; then # When cross-compiling, there is no way to tell whether // is special # short of a list of hosts. However, the only known hosts to date # that have a distinct // are Apollo DomainOS (too old to port to), # Cygwin, and z/OS. If anyone knows of another system for which // has # special semantics and is distinct from /, please report it to # <bug-gnulib@gnu.org>. case $host in *-cygwin | i370-ibm-openedition) gl_cv_double_slash_root=yes ;; *) # Be optimistic and assume that / and // are the same when we # don't know. gl_cv_double_slash_root='unknown, assuming no' ;; esac else set x `ls -di / // 2>/dev/null` if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then gl_cv_double_slash_root=no else gl_cv_double_slash_root=yes fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5 $as_echo "$gl_cv_double_slash_root" >&6; } if test "$gl_cv_double_slash_root" = yes; then $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h fi if test $gl_cv_have_include_next = yes; then gl_cv_next_getopt_h='<'getopt.h'>' else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5 $as_echo_n "checking absolute name of <getopt.h>... " >&6; } if ${gl_cv_next_getopt_h+:} false; then : $as_echo_n "(cached) " >&6 else if test $ac_cv_header_getopt_h = yes; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <getopt.h> _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac case "$host_os" in mingw*) gl_dirsep_regex='[/\\]' ;; *) gl_dirsep_regex='\/' ;; esac gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' gl_header_literal_regex=`echo 'getopt.h' \ | sed -e "$gl_make_literal_regex_sed"` gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ s|^/[^/]|//&| p q }' gl_cv_next_getopt_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n "$gl_absolute_header_sed"`'"' else gl_cv_next_getopt_h='<'getopt.h'>' fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5 $as_echo "$gl_cv_next_getopt_h" >&6; } fi NEXT_GETOPT_H=$gl_cv_next_getopt_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'getopt.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_getopt_h fi NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive if test $ac_cv_header_getopt_h = yes; then HAVE_GETOPT_H=1 else HAVE_GETOPT_H=0 fi gl_replace_getopt= if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then for ac_header in getopt.h do : ac_fn_cxx_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default" if test "x$ac_cv_header_getopt_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETOPT_H 1 _ACEOF else gl_replace_getopt=yes fi done fi if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then for ac_func in getopt_long_only do : ac_fn_cxx_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only" if test "x$ac_cv_func_getopt_long_only" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETOPT_LONG_ONLY 1 _ACEOF else gl_replace_getopt=yes fi done fi if test -z "$gl_replace_getopt"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5 $as_echo_n "checking whether getopt is POSIX compatible... " >&6; } if ${gl_cv_func_getopt_posix+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <unistd.h> int main () { int *p = &optreset; return optreset; ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : gl_optind_min=1 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <getopt.h> int main () { return !getopt_clip; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : gl_optind_min=1 else gl_optind_min=0 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext gl_save_CPPFLAGS=$CPPFLAGS CPPFLAGS="$CPPFLAGS -DOPTIND_MIN=$gl_optind_min" if test "$cross_compiling" = yes; then : case "$host_os" in mingw*) gl_cv_func_getopt_posix="guessing no";; darwin* | aix*) gl_cv_func_getopt_posix="guessing no";; *) gl_cv_func_getopt_posix="guessing yes";; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <unistd.h> #include <stdlib.h> #include <string.h> int main () { { static char program[] = "program"; static char a[] = "-a"; static char foo[] = "foo"; static char bar[] = "bar"; char *argv[] = { program, a, foo, bar, NULL }; int c; optind = OPTIND_MIN; opterr = 0; c = getopt (4, argv, "ab"); if (!(c == 'a')) return 1; c = getopt (4, argv, "ab"); if (!(c == -1)) return 2; if (!(optind == 2)) return 3; } /* Some internal state exists at this point. */ { static char program[] = "program"; static char donald[] = "donald"; static char p[] = "-p"; static char billy[] = "billy"; static char duck[] = "duck"; static char a[] = "-a"; static char bar[] = "bar"; char *argv[] = { program, donald, p, billy, duck, a, bar, NULL }; int c; optind = OPTIND_MIN; opterr = 0; c = getopt (7, argv, "+abp:q:"); if (!(c == -1)) return 4; if (!(strcmp (argv[0], "program") == 0)) return 5; if (!(strcmp (argv[1], "donald") == 0)) return 6; if (!(strcmp (argv[2], "-p") == 0)) return 7; if (!(strcmp (argv[3], "billy") == 0)) return 8; if (!(strcmp (argv[4], "duck") == 0)) return 9; if (!(strcmp (argv[5], "-a") == 0)) return 10; if (!(strcmp (argv[6], "bar") == 0)) return 11; if (!(optind == 1)) return 12; } /* Detect MacOS 10.5, AIX 7.1 bug. */ { static char program[] = "program"; static char ab[] = "-ab"; char *argv[3] = { program, ab, NULL }; optind = OPTIND_MIN; opterr = 0; if (getopt (2, argv, "ab:") != 'a') return 13; if (getopt (2, argv, "ab:") != '?') return 14; if (optopt != 'b') return 15; if (optind != 2) return 16; } return 0; } _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : gl_cv_func_getopt_posix=yes else gl_cv_func_getopt_posix=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi CPPFLAGS=$gl_save_CPPFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5 $as_echo "$gl_cv_func_getopt_posix" >&6; } case "$gl_cv_func_getopt_posix" in *no) gl_replace_getopt=yes ;; esac fi if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5 $as_echo_n "checking for working GNU getopt function... " >&6; } if ${gl_cv_func_getopt_gnu+:} false; then : $as_echo_n "(cached) " >&6 else # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the # optstring is necessary for programs like m4 that have POSIX-mandated # semantics for supporting options interspersed with files. # Also, since getopt_long is a GNU extension, we require optind=0. # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT; # so take care to revert to the correct (non-)export state. gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }' case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in xx) gl_had_POSIXLY_CORRECT=exported ;; x) gl_had_POSIXLY_CORRECT=yes ;; *) gl_had_POSIXLY_CORRECT= ;; esac POSIXLY_CORRECT=1 export POSIXLY_CORRECT if test "$cross_compiling" = yes; then : case $host_os:$ac_cv_have_decl_optreset in *-gnu*:* | mingw*:*) gl_cv_func_getopt_gnu=no;; *:yes) gl_cv_func_getopt_gnu=no;; *) gl_cv_func_getopt_gnu=yes;; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <getopt.h> #include <stddef.h> #include <string.h> #include <stdlib.h> #if defined __MACH__ && defined __APPLE__ /* Avoid a crash on MacOS X. */ #include <mach/mach.h> #include <mach/mach_error.h> #include <mach/thread_status.h> #include <mach/exception.h> #include <mach/task.h> #include <pthread.h> /* The exception port on which our thread listens. */ static mach_port_t our_exception_port; /* The main function of the thread listening for exceptions of type EXC_BAD_ACCESS. */ static void * mach_exception_thread (void *arg) { /* Buffer for a message to be received. */ struct { mach_msg_header_t head; mach_msg_body_t msgh_body; char data[1024]; } msg; mach_msg_return_t retval; /* Wait for a message on the exception port. */ retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg), our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL); if (retval != MACH_MSG_SUCCESS) abort (); exit (1); } static void nocrash_init (void) { mach_port_t self = mach_task_self (); /* Allocate a port on which the thread shall listen for exceptions. */ if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port) == KERN_SUCCESS) { /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */ if (mach_port_insert_right (self, our_exception_port, our_exception_port, MACH_MSG_TYPE_MAKE_SEND) == KERN_SUCCESS) { /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting for us. */ exception_mask_t mask = EXC_MASK_BAD_ACCESS; /* Create the thread listening on the exception port. */ pthread_attr_t attr; pthread_t thread; if (pthread_attr_init (&attr) == 0 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) { pthread_attr_destroy (&attr); /* Replace the exception port info for these exceptions with our own. Note that we replace the exception port for the entire task, not only for a particular thread. This has the effect that when our exception port gets the message, the thread specific exception port has already been asked, and we don't need to bother about it. See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */ task_set_exception_ports (self, mask, our_exception_port, EXCEPTION_DEFAULT, MACHINE_THREAD_STATE); } } } } #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* Avoid a crash on native Windows. */ #define WIN32_LEAN_AND_MEAN #include <windows.h> #include <winerror.h> static LONG WINAPI exception_filter (EXCEPTION_POINTERS *ExceptionInfo) { switch (ExceptionInfo->ExceptionRecord->ExceptionCode) { case EXCEPTION_ACCESS_VIOLATION: case EXCEPTION_IN_PAGE_ERROR: case EXCEPTION_STACK_OVERFLOW: case EXCEPTION_GUARD_PAGE: case EXCEPTION_PRIV_INSTRUCTION: case EXCEPTION_ILLEGAL_INSTRUCTION: case EXCEPTION_DATATYPE_MISALIGNMENT: case EXCEPTION_ARRAY_BOUNDS_EXCEEDED: case EXCEPTION_NONCONTINUABLE_EXCEPTION: exit (1); } return EXCEPTION_CONTINUE_SEARCH; } static void nocrash_init (void) { SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter); } #else /* Avoid a crash on POSIX systems. */ #include <signal.h> /* A POSIX signal handler. */ static void exception_handler (int sig) { exit (1); } static void nocrash_init (void) { #ifdef SIGSEGV signal (SIGSEGV, exception_handler); #endif #ifdef SIGBUS signal (SIGBUS, exception_handler); #endif } #endif int main () { int result = 0; nocrash_init(); /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw, and fails on MacOS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10. */ { static char conftest[] = "conftest"; static char plus[] = "-+"; char *argv[3] = { conftest, plus, NULL }; opterr = 0; if (getopt (2, argv, "+a") != '?') result |= 1; } /* This code succeeds on glibc 2.8, mingw, and fails on MacOS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */ { static char program[] = "program"; static char p[] = "-p"; static char foo[] = "foo"; static char bar[] = "bar"; char *argv[] = { program, p, foo, bar, NULL }; optind = 1; if (getopt (4, argv, "p::") != 'p') result |= 2; else if (optarg != NULL) result |= 4; else if (getopt (4, argv, "p::") != -1) result |= 6; else if (optind != 2) result |= 8; } /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */ { static char program[] = "program"; static char foo[] = "foo"; static char p[] = "-p"; char *argv[] = { program, foo, p, NULL }; optind = 0; if (getopt (3, argv, "-p") != 1) result |= 16; else if (getopt (3, argv, "-p") != 'p') result |= 32; } /* This code fails on glibc 2.11. */ { static char program[] = "program"; static char b[] = "-b"; static char a[] = "-a"; char *argv[] = { program, b, a, NULL }; optind = opterr = 0; if (getopt (3, argv, "+:a:b") != 'b') result |= 64; else if (getopt (3, argv, "+:a:b") != ':') result |= 64; } /* This code dumps core on glibc 2.14. */ { static char program[] = "program"; static char w[] = "-W"; static char dummy[] = "dummy"; char *argv[] = { program, w, dummy, NULL }; optind = opterr = 1; if (getopt (3, argv, "W;") != 'W') result |= 128; } return result; ; return 0; } _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : gl_cv_func_getopt_gnu=yes else gl_cv_func_getopt_gnu=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi case $gl_had_POSIXLY_CORRECT in exported) ;; yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;; *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5 $as_echo "$gl_cv_func_getopt_gnu" >&6; } if test "$gl_cv_func_getopt_gnu" = "no"; then gl_replace_getopt=yes fi fi REPLACE_GETOPT=0 if test -n "$gl_replace_getopt"; then : REPLACE_GETOPT=1 fi if test $REPLACE_GETOPT = 1; then GETOPT_H=getopt.h $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h fi ac_fn_cxx_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default" if test "x$ac_cv_have_decl_getenv" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_GETENV $ac_have_decl _ACEOF GNULIB__EXIT=0; GNULIB_ATOLL=0; GNULIB_CALLOC_POSIX=0; GNULIB_CANONICALIZE_FILE_NAME=0; GNULIB_GETLOADAVG=0; GNULIB_GETSUBOPT=0; GNULIB_GRANTPT=0; GNULIB_MALLOC_POSIX=0; GNULIB_MBTOWC=0; GNULIB_MKDTEMP=0; GNULIB_MKOSTEMP=0; GNULIB_MKOSTEMPS=0; GNULIB_MKSTEMP=0; GNULIB_MKSTEMPS=0; GNULIB_POSIX_OPENPT=0; GNULIB_PTSNAME=0; GNULIB_PTSNAME_R=0; GNULIB_PUTENV=0; GNULIB_RANDOM_R=0; GNULIB_REALLOC_POSIX=0; GNULIB_REALPATH=0; GNULIB_RPMATCH=0; GNULIB_SETENV=0; GNULIB_STRTOD=0; GNULIB_STRTOLL=0; GNULIB_STRTOULL=0; GNULIB_SYSTEM_POSIX=0; GNULIB_UNLOCKPT=0; GNULIB_UNSETENV=0; GNULIB_WCTOMB=0; HAVE__EXIT=1; HAVE_ATOLL=1; HAVE_CANONICALIZE_FILE_NAME=1; HAVE_DECL_GETLOADAVG=1; HAVE_GETSUBOPT=1; HAVE_GRANTPT=1; HAVE_MKDTEMP=1; HAVE_MKOSTEMP=1; HAVE_MKOSTEMPS=1; HAVE_MKSTEMP=1; HAVE_MKSTEMPS=1; HAVE_POSIX_OPENPT=1; HAVE_PTSNAME=1; HAVE_PTSNAME_R=1; HAVE_RANDOM_H=1; HAVE_RANDOM_R=1; HAVE_REALPATH=1; HAVE_RPMATCH=1; HAVE_SETENV=1; HAVE_DECL_SETENV=1; HAVE_STRTOD=1; HAVE_STRTOLL=1; HAVE_STRTOULL=1; HAVE_STRUCT_RANDOM_DATA=1; HAVE_SYS_LOADAVG_H=0; HAVE_UNLOCKPT=1; HAVE_DECL_UNSETENV=1; REPLACE_CALLOC=0; REPLACE_CANONICALIZE_FILE_NAME=0; REPLACE_MALLOC=0; REPLACE_MBTOWC=0; REPLACE_MKSTEMP=0; REPLACE_PTSNAME_R=0; REPLACE_PUTENV=0; REPLACE_REALLOC=0; REPLACE_REALPATH=0; REPLACE_SETENV=0; REPLACE_STRTOD=0; REPLACE_UNSETENV=0; REPLACE_WCTOMB=0; { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5 $as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; } if ${gl_cv_func_malloc_posix+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ choke me #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : gl_cv_func_malloc_posix=yes else gl_cv_func_malloc_posix=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5 $as_echo "$gl_cv_func_malloc_posix" >&6; } GNULIB_FCHMODAT=0; GNULIB_FSTAT=0; GNULIB_FSTATAT=0; GNULIB_FUTIMENS=0; GNULIB_LCHMOD=0; GNULIB_LSTAT=0; GNULIB_MKDIRAT=0; GNULIB_MKFIFO=0; GNULIB_MKFIFOAT=0; GNULIB_MKNOD=0; GNULIB_MKNODAT=0; GNULIB_STAT=0; GNULIB_UTIMENSAT=0; HAVE_FCHMODAT=1; HAVE_FSTATAT=1; HAVE_FUTIMENS=1; HAVE_LCHMOD=1; HAVE_LSTAT=1; HAVE_MKDIRAT=1; HAVE_MKFIFO=1; HAVE_MKFIFOAT=1; HAVE_MKNOD=1; HAVE_MKNODAT=1; HAVE_UTIMENSAT=1; REPLACE_FSTAT=0; REPLACE_FSTATAT=0; REPLACE_FUTIMENS=0; REPLACE_LSTAT=0; REPLACE_MKDIR=0; REPLACE_MKFIFO=0; REPLACE_MKNOD=0; REPLACE_STAT=0; REPLACE_UTIMENSAT=0; { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } if ${ac_cv_header_stdbool_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <stdbool.h> #ifndef bool "error: bool is not defined" #endif #ifndef false "error: false is not defined" #endif #if false "error: false is not 0" #endif #ifndef true "error: true is not defined" #endif #if true != 1 "error: true is not 1" #endif #ifndef __bool_true_false_are_defined "error: __bool_true_false_are_defined is not defined" #endif struct s { _Bool s: 1; _Bool t; } s; char a[true == 1 ? 1 : -1]; char b[false == 0 ? 1 : -1]; char c[__bool_true_false_are_defined == 1 ? 1 : -1]; char d[(bool) 0.5 == true ? 1 : -1]; /* See body of main program for 'e'. */ char f[(_Bool) 0.0 == false ? 1 : -1]; char g[true]; char h[sizeof (_Bool)]; char i[sizeof s.t]; enum { j = false, k = true, l = false * true, m = true * 256 }; /* The following fails for HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ _Bool n[m]; char o[sizeof n == m * sizeof n[0] ? 1 : -1]; char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; /* Catch a bug in an HP-UX C compiler. See http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html */ _Bool q = true; _Bool *pq = &q; int main () { bool e = &s; *pq |= q; *pq |= ! q; /* Refer to every declared value, to avoid compiler optimizations. */ return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l + !m + !n + !o + !p + !q + !pq); ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_header_stdbool_h=yes else ac_cv_header_stdbool_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5 $as_echo "$ac_cv_header_stdbool_h" >&6; } ac_fn_cxx_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default" if test "x$ac_cv_type__Bool" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE__BOOL 1 _ACEOF fi REPLACE_NULL=0; HAVE_WCHAR_T=1; { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5 $as_echo_n "checking for wchar_t... " >&6; } if ${gt_cv_c_wchar_t+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <stddef.h> wchar_t foo = (wchar_t)'\0'; int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : gt_cv_c_wchar_t=yes else gt_cv_c_wchar_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5 $as_echo "$gt_cv_c_wchar_t" >&6; } if test $gt_cv_c_wchar_t = yes; then $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h fi GNULIB_FFSL=0; GNULIB_FFSLL=0; GNULIB_MEMCHR=0; GNULIB_MEMMEM=0; GNULIB_MEMPCPY=0; GNULIB_MEMRCHR=0; GNULIB_RAWMEMCHR=0; GNULIB_STPCPY=0; GNULIB_STPNCPY=0; GNULIB_STRCHRNUL=0; GNULIB_STRDUP=0; GNULIB_STRNCAT=0; GNULIB_STRNDUP=0; GNULIB_STRNLEN=0; GNULIB_STRPBRK=0; GNULIB_STRSEP=0; GNULIB_STRSTR=0; GNULIB_STRCASESTR=0; GNULIB_STRTOK_R=0; GNULIB_MBSLEN=0; GNULIB_MBSNLEN=0; GNULIB_MBSCHR=0; GNULIB_MBSRCHR=0; GNULIB_MBSSTR=0; GNULIB_MBSCASECMP=0; GNULIB_MBSNCASECMP=0; GNULIB_MBSPCASECMP=0; GNULIB_MBSCASESTR=0; GNULIB_MBSCSPN=0; GNULIB_MBSPBRK=0; GNULIB_MBSSPN=0; GNULIB_MBSSEP=0; GNULIB_MBSTOK_R=0; GNULIB_STRERROR=0; GNULIB_STRERROR_R=0; GNULIB_STRSIGNAL=0; GNULIB_STRVERSCMP=0; HAVE_MBSLEN=0; HAVE_FFSL=1; HAVE_FFSLL=1; HAVE_MEMCHR=1; HAVE_DECL_MEMMEM=1; HAVE_MEMPCPY=1; HAVE_DECL_MEMRCHR=1; HAVE_RAWMEMCHR=1; HAVE_STPCPY=1; HAVE_STPNCPY=1; HAVE_STRCHRNUL=1; HAVE_DECL_STRDUP=1; HAVE_DECL_STRNDUP=1; HAVE_DECL_STRNLEN=1; HAVE_STRPBRK=1; HAVE_STRSEP=1; HAVE_STRCASESTR=1; HAVE_DECL_STRTOK_R=1; HAVE_DECL_STRERROR_R=1; HAVE_DECL_STRSIGNAL=1; HAVE_STRVERSCMP=1; REPLACE_MEMCHR=0; REPLACE_MEMMEM=0; REPLACE_STPNCPY=0; REPLACE_STRDUP=0; REPLACE_STRSTR=0; REPLACE_STRCASESTR=0; REPLACE_STRCHRNUL=0; REPLACE_STRERROR=0; REPLACE_STRERROR_R=0; REPLACE_STRNCAT=0; REPLACE_STRNDUP=0; REPLACE_STRNLEN=0; REPLACE_STRSIGNAL=0; REPLACE_STRTOK_R=0; UNDEFINE_STRTOK_R=0; for ac_func in $ac_func_list do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done ac_fn_cxx_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default" if test "x$ac_cv_have_decl_strdup" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_STRDUP $ac_have_decl _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5 $as_echo_n "checking for C/C++ restrict keyword... " >&6; } if ${ac_cv_c_restrict+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_restrict=no # The order here caters to the fact that C++ does not require restrict. for ac_kw in __restrict __restrict__ _Restrict restrict; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ typedef int * int_ptr; int foo (int_ptr $ac_kw ip) { return ip[0]; } int main () { int s[1]; int * $ac_kw t = s; t[0] = 0; return foo(t) ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_c_restrict=$ac_kw fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$ac_cv_c_restrict" != no && break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5 $as_echo "$ac_cv_c_restrict" >&6; } case $ac_cv_c_restrict in restrict) ;; no) $as_echo "#define restrict /**/" >>confdefs.h ;; *) cat >>confdefs.h <<_ACEOF #define restrict $ac_cv_c_restrict _ACEOF ;; esac if test $gl_cv_have_include_next = yes; then gl_cv_next_string_h='<'string.h'>' else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5 $as_echo_n "checking absolute name of <string.h>... " >&6; } if ${gl_cv_next_string_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <string.h> _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac case "$host_os" in mingw*) gl_dirsep_regex='[/\\]' ;; *) gl_dirsep_regex='\/' ;; esac gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' gl_header_literal_regex=`echo 'string.h' \ | sed -e "$gl_make_literal_regex_sed"` gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ s|^/[^/]|//&| p q }' gl_cv_next_string_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n "$gl_absolute_header_sed"`'"' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5 $as_echo "$gl_cv_next_string_h" >&6; } fi NEXT_STRING_H=$gl_cv_next_string_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'string.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_string_h fi NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive for gl_func in ffsl ffsll memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul strdup strncat strndup strnlen strpbrk strsep strcasestr strtok_r strerror_r strsignal strverscmp; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } if eval \${$as_gl_Symbol+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <string.h> int main () { #undef $gl_func (void) $gl_func; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : eval "$as_gl_Symbol=yes" else eval "$as_gl_Symbol=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$as_gl_Symbol { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF eval ac_cv_have_decl_$gl_func=yes fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 $as_echo_n "checking for inline... " >&6; } if ${ac_cv_c_inline+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; static $ac_kw foo_t static_foo () {return 0; } $ac_kw foo_t foo () {return 0; } #endif _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_c_inline=$ac_kw fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$ac_cv_c_inline" != no && break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 $as_echo "$ac_cv_c_inline" >&6; } case $ac_cv_c_inline in inline | yes) ;; *) case $ac_cv_c_inline in no) ac_val=;; *) ac_val=$ac_cv_c_inline;; esac cat >>confdefs.h <<_ACEOF #ifndef __cplusplus #define inline $ac_val #endif _ACEOF ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5 $as_echo_n "checking whether stat file-mode macros are broken... " >&6; } if ${ac_cv_header_stat_broken+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <sys/types.h> #include <sys/stat.h> #if defined S_ISBLK && defined S_IFDIR extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1]; #endif #if defined S_ISBLK && defined S_IFCHR extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1]; #endif #if defined S_ISLNK && defined S_IFREG extern char c3[S_ISLNK (S_IFREG) ? -1 : 1]; #endif #if defined S_ISSOCK && defined S_IFREG extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1]; #endif _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_header_stat_broken=no else ac_cv_header_stat_broken=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5 $as_echo "$ac_cv_header_stat_broken" >&6; } if test $ac_cv_header_stat_broken = yes; then $as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h fi ac_fn_cxx_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default" if test "x$ac_cv_type_mode_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define mode_t int _ACEOF fi GNULIB_MKTIME=0; GNULIB_NANOSLEEP=0; GNULIB_STRPTIME=0; GNULIB_TIMEGM=0; GNULIB_TIME_R=0; HAVE_DECL_LOCALTIME_R=1; HAVE_NANOSLEEP=1; HAVE_STRPTIME=1; HAVE_TIMEGM=1; REPLACE_LOCALTIME_R=GNULIB_PORTCHECK; REPLACE_MKTIME=GNULIB_PORTCHECK; REPLACE_NANOSLEEP=GNULIB_PORTCHECK; REPLACE_TIMEGM=GNULIB_PORTCHECK; { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5 $as_echo_n "checking for struct timespec in <time.h>... " >&6; } if ${gl_cv_sys_struct_timespec_in_time_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <time.h> int main () { static struct timespec x; x.tv_sec = x.tv_nsec; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : gl_cv_sys_struct_timespec_in_time_h=yes else gl_cv_sys_struct_timespec_in_time_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5 $as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; } TIME_H_DEFINES_STRUCT_TIMESPEC=0 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then TIME_H_DEFINES_STRUCT_TIMESPEC=1 else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5 $as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; } if ${gl_cv_sys_struct_timespec_in_sys_time_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <sys/time.h> int main () { static struct timespec x; x.tv_sec = x.tv_nsec; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : gl_cv_sys_struct_timespec_in_sys_time_h=yes else gl_cv_sys_struct_timespec_in_sys_time_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5 $as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; } if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1 else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5 $as_echo_n "checking for struct timespec in <pthread.h>... " >&6; } if ${gl_cv_sys_struct_timespec_in_pthread_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <pthread.h> int main () { static struct timespec x; x.tv_sec = x.tv_nsec; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : gl_cv_sys_struct_timespec_in_pthread_h=yes else gl_cv_sys_struct_timespec_in_pthread_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5 $as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; } if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1 fi fi fi if test $gl_cv_have_include_next = yes; then gl_cv_next_time_h='<'time.h'>' else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5 $as_echo_n "checking absolute name of <time.h>... " >&6; } if ${gl_cv_next_time_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <time.h> _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac case "$host_os" in mingw*) gl_dirsep_regex='[/\\]' ;; *) gl_dirsep_regex='\/' ;; esac gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' gl_header_literal_regex=`echo 'time.h' \ | sed -e "$gl_make_literal_regex_sed"` gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ s|^/[^/]|//&| p q }' gl_cv_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n "$gl_absolute_header_sed"`'"' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5 $as_echo "$gl_cv_next_time_h" >&6; } fi NEXT_TIME_H=$gl_cv_next_time_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'time.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_time_h fi NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive ac_fn_cxx_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" if test "x$ac_cv_type_pid_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define pid_t int _ACEOF fi if true; then GL_COND_LIBTOOL_TRUE= GL_COND_LIBTOOL_FALSE='#' else GL_COND_LIBTOOL_TRUE='#' GL_COND_LIBTOOL_FALSE= fi gl_cond_libtool=true gl_m4_base='gl/m4' gl_source_base='gl' if test $gl_cv_have_include_next = yes; then gl_cv_next_dirent_h='<'dirent.h'>' else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5 $as_echo_n "checking absolute name of <dirent.h>... " >&6; } if ${gl_cv_next_dirent_h+:} false; then : $as_echo_n "(cached) " >&6 else if test $ac_cv_header_dirent_h = yes; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <dirent.h> _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac case "$host_os" in mingw*) gl_dirsep_regex='[/\\]' ;; *) gl_dirsep_regex='\/' ;; esac gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' gl_header_literal_regex=`echo 'dirent.h' \ | sed -e "$gl_make_literal_regex_sed"` gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ s|^/[^/]|//&| p q }' gl_cv_next_dirent_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n "$gl_absolute_header_sed"`'"' else gl_cv_next_dirent_h='<'dirent.h'>' fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5 $as_echo "$gl_cv_next_dirent_h" >&6; } fi NEXT_DIRENT_H=$gl_cv_next_dirent_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'dirent.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_dirent_h fi NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive if test $ac_cv_header_dirent_h = yes; then HAVE_DIRENT_H=1 else HAVE_DIRENT_H=0 fi for gl_func in alphasort closedir dirfd fdopendir opendir readdir rewinddir scandir; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } if eval \${$as_gl_Symbol+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <dirent.h> int main () { #undef $gl_func (void) $gl_func; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : eval "$as_gl_Symbol=yes" else eval "$as_gl_Symbol=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$as_gl_Symbol { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF eval ac_cv_have_decl_$gl_func=yes fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5 $as_echo_n "checking whether // is distinct from /... " >&6; } if ${gl_cv_double_slash_root+:} false; then : $as_echo_n "(cached) " >&6 else if test x"$cross_compiling" = xyes ; then # When cross-compiling, there is no way to tell whether // is special # short of a list of hosts. However, the only known hosts to date # that have a distinct // are Apollo DomainOS (too old to port to), # Cygwin, and z/OS. If anyone knows of another system for which // has # special semantics and is distinct from /, please report it to # <bug-gnulib@gnu.org>. case $host in *-cygwin | i370-ibm-openedition) gl_cv_double_slash_root=yes ;; *) # Be optimistic and assume that / and // are the same when we # don't know. gl_cv_double_slash_root='unknown, assuming no' ;; esac else set x `ls -di / // 2>/dev/null` if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then gl_cv_double_slash_root=no else gl_cv_double_slash_root=yes fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5 $as_echo "$gl_cv_double_slash_root" >&6; } if test "$gl_cv_double_slash_root" = yes; then $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h fi if test $REPLACE_GETOPT = 1; then gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext" gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext" GNULIB_GL_UNISTD_H_GETOPT=1 fi $as_echo "#define GNULIB_TEST_GETOPT_GNU 1" >>confdefs.h REPLACE_GETOPT=0 if test -n "$gl_replace_getopt"; then : REPLACE_GETOPT=1 fi if test $REPLACE_GETOPT = 1; then GETOPT_H=getopt.h $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h fi if test $REPLACE_GETOPT = 1; then gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext" gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext" GNULIB_GL_UNISTD_H_GETOPT=1 fi if test $gl_cv_func_malloc_posix = yes; then $as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h else REPLACE_MALLOC=1 fi if test $REPLACE_MALLOC = 1; then gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext" fi GNULIB_MALLOC_POSIX=1 $as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h for ac_func in memset do : ac_fn_cxx_check_func "$LINENO" "memset" "ac_cv_func_memset" if test "x$ac_cv_func_memset" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_MEMSET 1 _ACEOF fi done if test $ac_cv_func_memset = no; then gl_LIBOBJS="$gl_LIBOBJS memset.$ac_objext" : fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing slash" >&5 $as_echo_n "checking whether mkdir handles trailing slash... " >&6; } if ${gl_cv_func_mkdir_trailing_slash_works+:} false; then : $as_echo_n "(cached) " >&6 else rm -rf conftest.dir if test "$cross_compiling" = yes; then : gl_cv_func_mkdir_trailing_slash_works="guessing no" else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ # include <sys/types.h> # include <sys/stat.h> int main () { return mkdir ("conftest.dir/", 0700); ; return 0; } _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : gl_cv_func_mkdir_trailing_slash_works=yes else gl_cv_func_mkdir_trailing_slash_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -rf conftest.dir fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_slash_works" >&5 $as_echo "$gl_cv_func_mkdir_trailing_slash_works" >&6; } if test "$gl_cv_func_mkdir_trailing_slash_works" != yes; then REPLACE_MKDIR=1 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing dot" >&5 $as_echo_n "checking whether mkdir handles trailing dot... " >&6; } if ${gl_cv_func_mkdir_trailing_dot_works+:} false; then : $as_echo_n "(cached) " >&6 else rm -rf conftest.dir if test "$cross_compiling" = yes; then : gl_cv_func_mkdir_trailing_dot_works="guessing no" else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ # include <sys/types.h> # include <sys/stat.h> int main () { return !mkdir ("conftest.dir/./", 0700); ; return 0; } _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : gl_cv_func_mkdir_trailing_dot_works=yes else gl_cv_func_mkdir_trailing_dot_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -rf conftest.dir fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_dot_works" >&5 $as_echo "$gl_cv_func_mkdir_trailing_dot_works" >&6; } if test "$gl_cv_func_mkdir_trailing_dot_works" != yes; then REPLACE_MKDIR=1 $as_echo "#define FUNC_MKDIR_DOT_BUG 1" >>confdefs.h fi if test $REPLACE_MKDIR = 1; then gl_LIBOBJS="$gl_LIBOBJS mkdir.$ac_objext" fi ac_fn_cxx_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h> " if test "x$ac_cv_have_decl_program_invocation_name" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl _ACEOF ac_fn_cxx_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h> " if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5 $as_echo_n "checking for ssize_t... " >&6; } if ${gt_cv_ssize_t+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <sys/types.h> int main () { int x = sizeof (ssize_t *) + sizeof (ssize_t); return !x; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : gt_cv_ssize_t=yes else gt_cv_ssize_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5 $as_echo "$gt_cv_ssize_t" >&6; } if test $gt_cv_ssize_t = no; then $as_echo "#define ssize_t int" >>confdefs.h fi # Define two additional variables used in the Makefile substitution. if test "$ac_cv_header_stdbool_h" = yes; then STDBOOL_H='' else STDBOOL_H='stdbool.h' fi if test -n "$STDBOOL_H"; then GL_GENERATE_STDBOOL_H_TRUE= GL_GENERATE_STDBOOL_H_FALSE='#' else GL_GENERATE_STDBOOL_H_TRUE='#' GL_GENERATE_STDBOOL_H_FALSE= fi if test "$ac_cv_type__Bool" = yes; then HAVE__BOOL=1 else HAVE__BOOL=0 fi STDDEF_H= if test $gt_cv_c_wchar_t = no; then HAVE_WCHAR_T=0 STDDEF_H=stddef.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5 $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; } if ${gl_cv_decl_null_works+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <stddef.h> int test[2 * (sizeof NULL == sizeof (void *)) -1]; int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : gl_cv_decl_null_works=yes else gl_cv_decl_null_works=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5 $as_echo "$gl_cv_decl_null_works" >&6; } if test $gl_cv_decl_null_works = no; then REPLACE_NULL=1 STDDEF_H=stddef.h fi if test -n "$STDDEF_H"; then GL_GENERATE_STDDEF_H_TRUE= GL_GENERATE_STDDEF_H_FALSE='#' else GL_GENERATE_STDDEF_H_TRUE='#' GL_GENERATE_STDDEF_H_FALSE= fi if test -n "$STDDEF_H"; then if test $gl_cv_have_include_next = yes; then gl_cv_next_stddef_h='<'stddef.h'>' else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5 $as_echo_n "checking absolute name of <stddef.h>... " >&6; } if ${gl_cv_next_stddef_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <stddef.h> _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac case "$host_os" in mingw*) gl_dirsep_regex='[/\\]' ;; *) gl_dirsep_regex='\/' ;; esac gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' gl_header_literal_regex=`echo 'stddef.h' \ | sed -e "$gl_make_literal_regex_sed"` gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ s|^/[^/]|//&| p q }' gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n "$gl_absolute_header_sed"`'"' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5 $as_echo "$gl_cv_next_stddef_h" >&6; } fi NEXT_STDDEF_H=$gl_cv_next_stddef_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'stddef.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_stddef_h fi NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive fi if test $gl_cv_have_include_next = yes; then gl_cv_next_stdlib_h='<'stdlib.h'>' else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5 $as_echo_n "checking absolute name of <stdlib.h>... " >&6; } if ${gl_cv_next_stdlib_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <stdlib.h> _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac case "$host_os" in mingw*) gl_dirsep_regex='[/\\]' ;; *) gl_dirsep_regex='\/' ;; esac gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' gl_header_literal_regex=`echo 'stdlib.h' \ | sed -e "$gl_make_literal_regex_sed"` gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ s|^/[^/]|//&| p q }' gl_cv_next_stdlib_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n "$gl_absolute_header_sed"`'"' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5 $as_echo "$gl_cv_next_stdlib_h" >&6; } fi NEXT_STDLIB_H=$gl_cv_next_stdlib_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'stdlib.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_stdlib_h fi NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive for gl_func in _Exit atoll canonicalize_file_name getloadavg getsubopt grantpt initstate_r mkdtemp mkostemp mkostemps mkstemp mkstemps posix_openpt ptsname ptsname_r random_r realpath rpmatch setenv setstate_r srandom_r strtod strtoll strtoull unlockpt unsetenv; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } if eval \${$as_gl_Symbol+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <stdlib.h> #if HAVE_SYS_LOADAVG_H # include <sys/loadavg.h> #endif #if HAVE_RANDOM_H # include <random.h> #endif int main () { #undef $gl_func (void) $gl_func; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : eval "$as_gl_Symbol=yes" else eval "$as_gl_Symbol=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$as_gl_Symbol { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF eval ac_cv_have_decl_$gl_func=yes fi done if test $ac_cv_have_decl_strdup = no; then HAVE_DECL_STRDUP=0 fi if test $ac_cv_func_strdup = no; then gl_LIBOBJS="$gl_LIBOBJS strdup.$ac_objext" : fi GNULIB_STRDUP=1 $as_echo "#define GNULIB_TEST_STRDUP 1" >>confdefs.h if test $gl_cv_have_include_next = yes; then gl_cv_next_sys_stat_h='<'sys/stat.h'>' else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5 $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; } if ${gl_cv_next_sys_stat_h+:} false; then : $as_echo_n "(cached) " >&6 else if test $ac_cv_header_sys_stat_h = yes; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <sys/stat.h> _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac case "$host_os" in mingw*) gl_dirsep_regex='[/\\]' ;; *) gl_dirsep_regex='\/' ;; esac gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' gl_header_literal_regex=`echo 'sys/stat.h' \ | sed -e "$gl_make_literal_regex_sed"` gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ s|^/[^/]|//&| p q }' gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n "$gl_absolute_header_sed"`'"' else gl_cv_next_sys_stat_h='<'sys/stat.h'>' fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5 $as_echo "$gl_cv_next_sys_stat_h" >&6; } fi NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'sys/stat.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_sys_stat_h fi NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive ac_fn_cxx_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h> #include <sys/stat.h> " if test "x$ac_cv_type_nlink_t" = xyes; then : else $as_echo "#define nlink_t int" >>confdefs.h fi for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } if eval \${$as_gl_Symbol+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <sys/stat.h> int main () { #undef $gl_func (void) $gl_func; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : eval "$as_gl_Symbol=yes" else eval "$as_gl_Symbol=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$as_gl_Symbol { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF eval ac_cv_have_decl_$gl_func=yes fi done if test $gl_cv_have_include_next = yes; then gl_cv_next_unistd_h='<'unistd.h'>' else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5 $as_echo_n "checking absolute name of <unistd.h>... " >&6; } if ${gl_cv_next_unistd_h+:} false; then : $as_echo_n "(cached) " >&6 else if test $ac_cv_header_unistd_h = yes; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <unistd.h> _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac case "$host_os" in mingw*) gl_dirsep_regex='[/\\]' ;; *) gl_dirsep_regex='\/' ;; esac gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' gl_header_literal_regex=`echo 'unistd.h' \ | sed -e "$gl_make_literal_regex_sed"` gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ s|^/[^/]|//&| p q }' gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | sed -n "$gl_absolute_header_sed"`'"' else gl_cv_next_unistd_h='<'unistd.h'>' fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5 $as_echo "$gl_cv_next_unistd_h" >&6; } fi NEXT_UNISTD_H=$gl_cv_next_unistd_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'unistd.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=$gl_cv_next_unistd_h fi NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive if test $ac_cv_header_unistd_h = yes; then HAVE_UNISTD_H=1 else HAVE_UNISTD_H=0 fi for gl_func in chdir chown dup dup2 dup3 environ euidaccess faccessat fchdir fchownat fdatasync fsync ftruncate getcwd getdomainname getdtablesize getgroups gethostname getlogin getlogin_r getpagesize getusershell setusershell endusershell group_member lchown link linkat lseek pipe pipe2 pread pwrite readlink readlinkat rmdir sethostname sleep symlink symlinkat ttyname_r unlink unlinkat usleep; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } if eval \${$as_gl_Symbol+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if HAVE_UNISTD_H # include <unistd.h> #endif /* Some systems declare various items in the wrong headers. */ #if !(defined __GLIBC__ && !defined __UCLIBC__) # include <fcntl.h> # include <stdio.h> # include <stdlib.h> # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ # include <io.h> # endif #endif int main () { #undef $gl_func (void) $gl_func; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : eval "$as_gl_Symbol=yes" else eval "$as_gl_Symbol=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$as_gl_Symbol { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF eval ac_cv_have_decl_$gl_func=yes fi done # End of code from modules gltests_libdeps= gltests_ltlibdeps= gl_source_base='tests' gltests_WITNESS=IN_`echo "${PACKAGE-$PACKAGE_TARNAME}" | LC_ALL=C tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ | LC_ALL=C sed -e 's/[^A-Z0-9_]/_/g'`_GNULIB_TESTS gl_module_indicator_condition=$gltests_WITNESS ac_fn_cxx_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default" if test "x$ac_cv_type_off_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define off_t long int _ACEOF fi for ac_prog in gengetopt do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_GENGETOPT+:} false; then : $as_echo_n "(cached) " >&6 else case $GENGETOPT in [\\/]* | ?:[\\/]*) ac_cv_path_GENGETOPT="$GENGETOPT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_GENGETOPT="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi GENGETOPT=$ac_cv_path_GENGETOPT if test -n "$GENGETOPT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENGETOPT" >&5 $as_echo "$GENGETOPT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$GENGETOPT" && break done if test -z "$ac_cv_path_GENGETOPT" ; then NO_GENGETOPT_TRUE= NO_GENGETOPT_FALSE='#' else NO_GENGETOPT_TRUE='#' NO_GENGETOPT_FALSE= fi for ac_prog in doublecpp do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_DOUBLECPP+:} false; then : $as_echo_n "(cached) " >&6 else case $DOUBLECPP in [\\/]* | ?:[\\/]*) ac_cv_path_DOUBLECPP="$DOUBLECPP" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_DOUBLECPP="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi DOUBLECPP=$ac_cv_path_DOUBLECPP if test -n "$DOUBLECPP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOUBLECPP" >&5 $as_echo "$DOUBLECPP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$DOUBLECPP" && break done if test -z "$ac_cv_path_DOUBLECPP" ; then NO_DOUBLECPP_TRUE= NO_DOUBLECPP_FALSE='#' else NO_DOUBLECPP_TRUE='#' NO_DOUBLECPP_FALSE= fi for ac_prog in valgrind do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_VALGRIND+:} false; then : $as_echo_n "(cached) " >&6 else case $VALGRIND in [\\/]* | ?:[\\/]*) ac_cv_path_VALGRIND="$VALGRIND" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_VALGRIND="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi VALGRIND=$ac_cv_path_VALGRIND if test -n "$VALGRIND"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VALGRIND" >&5 $as_echo "$VALGRIND" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$VALGRIND" && break done for ac_prog in help2man do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_HELP2MAN+:} false; then : $as_echo_n "(cached) " >&6 else case $HELP2MAN in [\\/]* | ?:[\\/]*) ac_cv_path_HELP2MAN="$HELP2MAN" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_HELP2MAN="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi HELP2MAN=$ac_cv_path_HELP2MAN if test -n "$HELP2MAN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HELP2MAN" >&5 $as_echo "$HELP2MAN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$HELP2MAN" && break done if test -z "$ac_cv_path_HELP2MAN" ; then NO_HELP2MAN_TRUE= NO_HELP2MAN_FALSE='#' else NO_HELP2MAN_TRUE='#' NO_HELP2MAN_FALSE= fi for ac_prog in ctags exuberant-ctags do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_CTAGS+:} false; then : $as_echo_n "(cached) " >&6 else case $CTAGS in [\\/]* | ?:[\\/]*) ac_cv_path_CTAGS="$CTAGS" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_CTAGS="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi CTAGS=$ac_cv_path_CTAGS if test -n "$CTAGS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CTAGS" >&5 $as_echo "$CTAGS" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CTAGS" && break done if test -n "$ac_cv_path_CTAGS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CTAGS} accept --excmd" >&5 $as_echo_n "checking whether ${CTAGS} accept --excmd... " >&6; } if ${ac_cv_ctags_flags+:} false; then : $as_echo_n "(cached) " >&6 else echo 'void f(){}' > conftest.c if test -z "`${CTAGS} --excmd=n -f conftags conftest.c 2>&1`"; then ac_cv_ctags_flags=yes else ac_cv_ctags_flags=no fi rm -f conftest* rm -f conftags* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_ctags_flags" >&5 $as_echo "$ac_cv_ctags_flags" >&6; } if test "$ac_cv_ctags_flags" = "no" ; then NO_CTAGS_TRUE= NO_CTAGS_FALSE='#' else NO_CTAGS_TRUE='#' NO_CTAGS_FALSE= fi else if test -z "$ac_cv_path_CTAGS" ; then NO_CTAGS_TRUE= NO_CTAGS_FALSE='#' else NO_CTAGS_TRUE='#' NO_CTAGS_FALSE= fi fi # Check for doxygen program. # Check whether --with-doxygen was given. if test "${with_doxygen+set}" = set; then : withval=$with_doxygen; test -z "$DOXYGEN" &&\ for ac_prog in doxygen$EXEEXT do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_DOXYGEN+:} false; then : $as_echo_n "(cached) " >&6 else case $DOXYGEN in [\\/]* | ?:[\\/]*) ac_cv_path_DOXYGEN="$DOXYGEN" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_DOXYGEN="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi DOXYGEN=$ac_cv_path_DOXYGEN if test -n "$DOXYGEN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOXYGEN" >&5 $as_echo "$DOXYGEN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$DOXYGEN" && break done else with_doxygen=check fi if test -n "$DOXYGEN"; then HAVE_DOXYGEN_TRUE= HAVE_DOXYGEN_FALSE='#' else HAVE_DOXYGEN_TRUE='#' HAVE_DOXYGEN_FALSE= fi for ac_prog in bash sh do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_BASH_SHELL+:} false; then : $as_echo_n "(cached) " >&6 else case $BASH_SHELL in [\\/]* | ?:[\\/]*) ac_cv_path_BASH_SHELL="$BASH_SHELL" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_BASH_SHELL="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi BASH_SHELL=$ac_cv_path_BASH_SHELL if test -n "$BASH_SHELL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH_SHELL" >&5 $as_echo "$BASH_SHELL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$BASH_SHELL" && break done YFLAGS="$YFLAGS -d" { $as_echo "$as_me:${as_lineno-$LINENO}: checking checking if it's bison " >&5 $as_echo_n "checking checking if it's bison ... " >&6; } if test "$ac_cv_prog_YACC" = "bison -y"; then YFLAGS="$YFLAGS -o y.tab.c -l" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_YACC " >&5 $as_echo "$ac_cv_prog_YACC " >&6; } else YFLAGS="$YFLAGS -l" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no: it's $YACC " >&5 $as_echo "no: it's $YACC " >&6; } fi for ac_prog in tar gtar do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_TAR+:} false; then : $as_echo_n "(cached) " >&6 else case $TAR in [\\/]* | ?:[\\/]*) ac_cv_path_TAR="$TAR" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi TAR=$ac_cv_path_TAR if test -n "$TAR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5 $as_echo "$TAR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$TAR" && break done for ac_prog in texi2html do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_TEXI2HTML+:} false; then : $as_echo_n "(cached) " >&6 else case $TEXI2HTML in [\\/]* | ?:[\\/]*) ac_cv_path_TEXI2HTML="$TEXI2HTML" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_TEXI2HTML="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi TEXI2HTML=$ac_cv_path_TEXI2HTML if test -n "$TEXI2HTML"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEXI2HTML" >&5 $as_echo "$TEXI2HTML" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$TEXI2HTML" && break done for _lcl_i in bindir:datadir:bin_to_data; do _lcl_from=\$`echo "$_lcl_i" | sed 's,:.*$,,'` _lcl_to=\$`echo "$_lcl_i" | sed 's,^[^:]*:,,' | sed 's,:[^:]*$,,'` _lcl_result_var=`echo "$_lcl_i" | sed 's,^.*:,,'` _lcl_receval="$_lcl_from" _lcl_from=`(test "x$prefix" = xNONE && prefix="$ac_default_prefix" test "x$exec_prefix" = xNONE && exec_prefix="${prefix}" _lcl_receval_old='' while test "$_lcl_receval_old" != "$_lcl_receval"; do _lcl_receval_old="$_lcl_receval" eval _lcl_receval="\"$_lcl_receval\"" done echo "$_lcl_receval")` _lcl_receval="$_lcl_to" _lcl_to=`(test "x$prefix" = xNONE && prefix="$ac_default_prefix" test "x$exec_prefix" = xNONE && exec_prefix="${prefix}" _lcl_receval_old='' while test "$_lcl_receval_old" != "$_lcl_receval"; do _lcl_receval_old="$_lcl_receval" eval _lcl_receval="\"$_lcl_receval\"" done echo "$_lcl_receval")` _lcl_notation="$_lcl_from$_lcl_to" case ":$_lcl_from:" in # change empty paths to '.' ::) _lcl_from='.' ;; # strip trailing slashes :*[\\/]:) _lcl_from=`echo "$_lcl_from" | sed 's,[\\/]*$,,'` ;; :*:) ;; esac # squeze repeated slashes case '/' in # if the path contains any backslashes, turn slashes into backslashes *\\*) _lcl_from=`echo "$_lcl_from" | sed 's,\(.\)[\\/][\\/]*,\1\\\\,g'` ;; # if the path contains slashes, also turn backslashes into slashes *) _lcl_from=`echo "$_lcl_from" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;; esac case ":$_lcl_to:" in # change empty paths to '.' ::) _lcl_to='.' ;; # strip trailing slashes :*[\\/]:) _lcl_to=`echo "$_lcl_to" | sed 's,[\\/]*$,,'` ;; :*:) ;; esac # squeze repeated slashes case '/' in # if the path contains any backslashes, turn slashes into backslashes *\\*) _lcl_to=`echo "$_lcl_to" | sed 's,\(.\)[\\/][\\/]*,\1\\\\,g'` ;; # if the path contains slashes, also turn backslashes into slashes *) _lcl_to=`echo "$_lcl_to" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;; esac _lcl_common_prefix='' _lcl_second_prefix_match='' while test "$_lcl_second_prefix_match" != 0; do _lcl_first_prefix=`expr "x$_lcl_from" : "x\($_lcl_common_prefix/*[^/]*\)"` _lcl_second_prefix_match=`expr "x$_lcl_to" : "x$_lcl_first_prefix"` if test "$_lcl_second_prefix_match" != 0; then if test "$_lcl_first_prefix" != "$_lcl_common_prefix"; then _lcl_common_prefix="$_lcl_first_prefix" else _lcl_second_prefix_match=0 fi fi done _lcl_first_suffix=`expr "x$_lcl_from" : "x$_lcl_common_prefix/*\(.*\)"` _lcl_first_rel='' _lcl_tmp='xxx' while test "$_lcl_tmp" != ''; do _lcl_tmp=`expr "x$_lcl_first_suffix" : "x[^/]*/*\(.*\)"` if test "$_lcl_first_suffix" != ''; then _lcl_first_suffix="$_lcl_tmp" _lcl_first_rel="../$_lcl_first_rel" fi done _lcl_second_suffix=`expr "x$_lcl_to" : "x$_lcl_common_prefix/*\(.*\)"` _lcl_result_tmp="$_lcl_first_rel$_lcl_second_suffix" case ":$_lcl_result_tmp:" in # change empty paths to '.' ::) _lcl_result_tmp='.' ;; # strip trailing slashes :*[\\/]:) _lcl_result_tmp=`echo "$_lcl_result_tmp" | sed 's,[\\/]*$,,'` ;; :*:) ;; esac # squeze repeated slashes case "$_lcl_notation" in # if the path contains any backslashes, turn slashes into backslashes *\\*) _lcl_result_tmp=`echo "$_lcl_result_tmp" | sed 's,\(.\)[\\/][\\/]*,\1\\\\,g'` ;; # if the path contains slashes, also turn backslashes into slashes *) _lcl_result_tmp=`echo "$_lcl_result_tmp" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;; esac eval $_lcl_result_var='$_lcl_result_tmp' done source_highlight_lang_dir="$bin_to_data/source-highlight" case ":$source_highlight_lang_dir:" in # change empty paths to '.' ::) source_highlight_lang_dir='.' ;; # strip trailing slashes :*[\\/]:) source_highlight_lang_dir=`echo "$source_highlight_lang_dir" | sed 's,[\\/]*$,,'` ;; :*:) ;; esac # squeze repeated slashes case prefix in # if the path contains any backslashes, turn slashes into backslashes *\\*) source_highlight_lang_dir=`echo "$source_highlight_lang_dir" | sed 's,\(.\)[\\/][\\/]*,\1\\\\,g'` ;; # if the path contains slashes, also turn backslashes into slashes *) source_highlight_lang_dir=`echo "$source_highlight_lang_dir" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;; esac source_highlight_absolute_lang_dir=$source_highlightdatadir case ":$source_highlight_absolute_lang_dir:" in # change empty paths to '.' ::) source_highlight_absolute_lang_dir='.' ;; # strip trailing slashes :*[\\/]:) source_highlight_absolute_lang_dir=`echo "$source_highlight_absolute_lang_dir" | sed 's,[\\/]*$,,'` ;; :*:) ;; esac # squeze repeated slashes case prefix in # if the path contains any backslashes, turn slashes into backslashes *\\*) source_highlight_absolute_lang_dir=`echo "$source_highlight_absolute_lang_dir" | sed 's,\(.\)[\\/][\\/]*,\1\\\\,g'` ;; # if the path contains slashes, also turn backslashes into slashes *) source_highlight_absolute_lang_dir=`echo "$source_highlight_absolute_lang_dir" | sed 's,\(.\)[\\/][\\/]*,\1/,g'` ;; esac cat >>confdefs.h <<_ACEOF #define RELATIVEDATADIR "$source_highlight_lang_dir" _ACEOF prefix_NONE= exec_prefix_NONE= test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix eval ac_define_dir="\"$datadir/source-highlight\"" eval ac_define_dir="\"$ac_define_dir\"" ABSOLUTEDATADIR="$ac_define_dir" cat >>confdefs.h <<_ACEOF #define ABSOLUTEDATADIR "$ac_define_dir" _ACEOF test "$prefix_NONE" && prefix=NONE test "$exec_prefix_NONE" && exec_prefix=NONE bash_completiondir="${BASH_COMPLETION_DIR}" if test "${BASH_COMPLETION_DIR}" != ""; then USE_BASH_COMPLETION_TRUE= USE_BASH_COMPLETION_FALSE='#' else USE_BASH_COMPLETION_TRUE='#' USE_BASH_COMPLETION_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } # Check whether --enable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then : enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval else USE_MAINTAINER_MODE=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 $as_echo "$USE_MAINTAINER_MODE" >&6; } if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' else MAINTAINER_MODE_TRUE='#' MAINTAINER_MODE_FALSE= fi MAINT=$MAINTAINER_MODE_TRUE if test "x$ac_cv_cxx_have_sstream" != "xyes"; then ac_config_links="$ac_config_links sstream:_sstream" fi ac_config_files="$ac_config_files Makefile source-highlight.pc m4/Makefile gl/Makefile src/Makefile src/java2html src/cpp2html src/src-hilite-lesspipe.sh doc/Makefile lib/Makefile lib/srchilite/Makefile lib/srchilite/srchilite.doxyfile lib/tests/Makefile lib/examples/Makefile lib/compat/Makefile tests/Makefile tests/output_dir/Makefile source-highlight.spec" ac_config_files="$ac_config_files tests/valgrind_tests.sh" ac_config_files="$ac_config_files tests/valgrind_suppressions.sh" ac_config_files="$ac_config_files tests/valgrind_test.sh" ac_config_files="$ac_config_files lib/tests/valgrind_test.sh" ac_config_files="$ac_config_files doc/shjs_css_transform.sh" ac_config_files="$ac_config_files doc/gen_style_example.sh" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi gl_libobjs= gl_ltlibobjs= if test -n "$gl_LIBOBJS"; then # Remove the extension. sed_drop_objext='s/\.o$//;s/\.obj$//' for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do gl_libobjs="$gl_libobjs $i.$ac_objext" gl_ltlibobjs="$gl_ltlibobjs $i.lo" done fi gl_LIBOBJS=$gl_libobjs gl_LTLIBOBJS=$gl_ltlibobjs gltests_libobjs= gltests_ltlibobjs= if test -n "$gltests_LIBOBJS"; then # Remove the extension. sed_drop_objext='s/\.o$//;s/\.obj$//' for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do gltests_libobjs="$gltests_libobjs $i.$ac_objext" gltests_ltlibobjs="$gltests_ltlibobjs $i.lo" done fi gltests_LIBOBJS=$gltests_libobjs gltests_LTLIBOBJS=$gltests_ltlibobjs if test -z "${NO_GENGETOPT_TRUE}" && test -z "${NO_GENGETOPT_FALSE}"; then as_fn_error $? "conditional \"NO_GENGETOPT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${NO_DOUBLECPP_TRUE}" && test -z "${NO_DOUBLECPP_FALSE}"; then as_fn_error $? "conditional \"NO_DOUBLECPP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${NO_HELP2MAN_TRUE}" && test -z "${NO_HELP2MAN_FALSE}"; then as_fn_error $? "conditional \"NO_HELP2MAN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${NO_CTAGS_TRUE}" && test -z "${NO_CTAGS_FALSE}"; then as_fn_error $? "conditional \"NO_CTAGS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${NO_CTAGS_TRUE}" && test -z "${NO_CTAGS_FALSE}"; then as_fn_error $? "conditional \"NO_CTAGS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_DOXYGEN_TRUE}" && test -z "${HAVE_DOXYGEN_FALSE}"; then as_fn_error $? "conditional \"HAVE_DOXYGEN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USE_BASH_COMPLETION_TRUE}" && test -z "${USE_BASH_COMPLETION_FALSE}"; then as_fn_error $? "conditional \"USE_BASH_COMPLETION\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by source-highlight $as_me 3.1.6, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_links="$ac_config_links" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration links: $config_links Configuration commands: $config_commands Report bugs to the package provider." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ source-highlight config.status 3.1.6 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" Copyright (C) 2010 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_ld='`$ECHO "$hardcode_libdir_flag_spec_ld" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`' hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' compiler_lib_search_dirs='`$ECHO "$compiler_lib_search_dirs" | $SED "$delay_single_quote_subst"`' predep_objects='`$ECHO "$predep_objects" | $SED "$delay_single_quote_subst"`' postdep_objects='`$ECHO "$postdep_objects" | $SED "$delay_single_quote_subst"`' predeps='`$ECHO "$predeps" | $SED "$delay_single_quote_subst"`' postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`' compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`' LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`' reload_flag_CXX='`$ECHO "$reload_flag_CXX" | $SED "$delay_single_quote_subst"`' reload_cmds_CXX='`$ECHO "$reload_cmds_CXX" | $SED "$delay_single_quote_subst"`' old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`' GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes_CXX='`$ECHO "$enable_shared_with_static_runtimes_CXX" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec_CXX='`$ECHO "$export_dynamic_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec_CXX='`$ECHO "$whole_archive_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' compiler_needs_object_CXX='`$ECHO "$compiler_needs_object_CXX" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds_CXX='`$ECHO "$old_archive_from_new_cmds_CXX" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds_CXX='`$ECHO "$old_archive_from_expsyms_cmds_CXX" | $SED "$delay_single_quote_subst"`' archive_cmds_CXX='`$ECHO "$archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds_CXX='`$ECHO "$archive_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' module_cmds_CXX='`$ECHO "$module_cmds_CXX" | $SED "$delay_single_quote_subst"`' module_expsym_cmds_CXX='`$ECHO "$module_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`' allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_ld_CXX='`$ECHO "$hardcode_libdir_flag_spec_ld_CXX" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`' hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`' hardcode_minus_L_CXX='`$ECHO "$hardcode_minus_L_CXX" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_single_quote_subst"`' hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`' inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`' link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`' always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`' export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`' exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`' include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`' prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`' postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`' file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`' hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`' compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`' predep_objects_CXX='`$ECHO "$predep_objects_CXX" | $SED "$delay_single_quote_subst"`' postdep_objects_CXX='`$ECHO "$postdep_objects_CXX" | $SED "$delay_single_quote_subst"`' predeps_CXX='`$ECHO "$predeps_CXX" | $SED "$delay_single_quote_subst"`' postdeps_CXX='`$ECHO "$postdeps_CXX" | $SED "$delay_single_quote_subst"`' compiler_lib_search_path_CXX='`$ECHO "$compiler_lib_search_path_CXX" | $SED "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } # Quote evaled strings. for var in SHELL \ ECHO \ SED \ GREP \ EGREP \ FGREP \ LD \ NM \ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ OBJDUMP \ deplibs_check_method \ file_magic_cmd \ file_magic_glob \ want_nocaseglob \ DLLTOOL \ sharedlib_from_linklib_cmd \ AR \ AR_FLAGS \ archiver_list_spec \ STRIP \ RANLIB \ CC \ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ nm_file_list_spec \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_pic \ lt_prog_compiler_wl \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ MANIFEST_TOOL \ DSYMUTIL \ NMEDIT \ LIPO \ OTOOL \ OTOOL64 \ shrext_cmds \ export_dynamic_flag_spec \ whole_archive_flag_spec \ compiler_needs_object \ with_gnu_ld \ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ exclude_expsyms \ include_expsyms \ file_list_spec \ variables_saved_for_relink \ libname_spec \ library_names_spec \ soname_spec \ install_override_mode \ finish_eval \ old_striplib \ striplib \ compiler_lib_search_dirs \ predep_objects \ postdep_objects \ predeps \ postdeps \ compiler_lib_search_path \ LD_CXX \ reload_flag_CXX \ compiler_CXX \ lt_prog_compiler_no_builtin_flag_CXX \ lt_prog_compiler_pic_CXX \ lt_prog_compiler_wl_CXX \ lt_prog_compiler_static_CXX \ lt_cv_prog_compiler_c_o_CXX \ export_dynamic_flag_spec_CXX \ whole_archive_flag_spec_CXX \ compiler_needs_object_CXX \ with_gnu_ld_CXX \ allow_undefined_flag_CXX \ no_undefined_flag_CXX \ hardcode_libdir_flag_spec_CXX \ hardcode_libdir_flag_spec_ld_CXX \ hardcode_libdir_separator_CXX \ exclude_expsyms_CXX \ include_expsyms_CXX \ file_list_spec_CXX \ compiler_lib_search_dirs_CXX \ predep_objects_CXX \ postdep_objects_CXX \ predeps_CXX \ postdeps_CXX \ compiler_lib_search_path_CXX; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in reload_cmds \ old_postinstall_cmds \ old_postuninstall_cmds \ old_archive_cmds \ extract_expsyms_cmds \ old_archive_from_new_cmds \ old_archive_from_expsyms_cmds \ archive_cmds \ archive_expsym_cmds \ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ postlink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ sys_lib_dlsearch_path_spec \ reload_cmds_CXX \ old_archive_cmds_CXX \ old_archive_from_new_cmds_CXX \ old_archive_from_expsyms_cmds_CXX \ archive_cmds_CXX \ archive_expsym_cmds_CXX \ module_cmds_CXX \ module_expsym_cmds_CXX \ export_symbols_cmds_CXX \ prelink_cmds_CXX \ postlink_cmds_CXX; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done ac_aux_dir='$ac_aux_dir' xsi_shell='$xsi_shell' lt_shell_append='$lt_shell_append' # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "sstream") CONFIG_LINKS="$CONFIG_LINKS sstream:_sstream" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "source-highlight.pc") CONFIG_FILES="$CONFIG_FILES source-highlight.pc" ;; "m4/Makefile") CONFIG_FILES="$CONFIG_FILES m4/Makefile" ;; "gl/Makefile") CONFIG_FILES="$CONFIG_FILES gl/Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "src/java2html") CONFIG_FILES="$CONFIG_FILES src/java2html" ;; "src/cpp2html") CONFIG_FILES="$CONFIG_FILES src/cpp2html" ;; "src/src-hilite-lesspipe.sh") CONFIG_FILES="$CONFIG_FILES src/src-hilite-lesspipe.sh" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; "lib/srchilite/Makefile") CONFIG_FILES="$CONFIG_FILES lib/srchilite/Makefile" ;; "lib/srchilite/srchilite.doxyfile") CONFIG_FILES="$CONFIG_FILES lib/srchilite/srchilite.doxyfile" ;; "lib/tests/Makefile") CONFIG_FILES="$CONFIG_FILES lib/tests/Makefile" ;; "lib/examples/Makefile") CONFIG_FILES="$CONFIG_FILES lib/examples/Makefile" ;; "lib/compat/Makefile") CONFIG_FILES="$CONFIG_FILES lib/compat/Makefile" ;; "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; "tests/output_dir/Makefile") CONFIG_FILES="$CONFIG_FILES tests/output_dir/Makefile" ;; "source-highlight.spec") CONFIG_FILES="$CONFIG_FILES source-highlight.spec" ;; "tests/valgrind_tests.sh") CONFIG_FILES="$CONFIG_FILES tests/valgrind_tests.sh" ;; "tests/valgrind_suppressions.sh") CONFIG_FILES="$CONFIG_FILES tests/valgrind_suppressions.sh" ;; "tests/valgrind_test.sh") CONFIG_FILES="$CONFIG_FILES tests/valgrind_test.sh" ;; "lib/tests/valgrind_test.sh") CONFIG_FILES="$CONFIG_FILES lib/tests/valgrind_test.sh" ;; "doc/shjs_css_transform.sh") CONFIG_FILES="$CONFIG_FILES doc/shjs_css_transform.sh" ;; "doc/gen_style_example.sh") CONFIG_FILES="$CONFIG_FILES doc/gen_style_example.sh" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' <conf$$subs.awk | sed ' /^[^""]/{ N s/\n// } ' >>$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' <confdefs.h | sed ' s/'"$ac_delim"'/"\\\ "/g' >>$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :L) # # CONFIG_LINK # if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then : else # Prefer the file from the source tree if names are identical. if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then ac_source=$srcdir/$ac_source fi { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;} if test ! -r "$ac_source"; then as_fn_error $? "$ac_source: file not found" "$LINENO" 5 fi rm -f "$ac_file" # Try a relative symlink, then a hard link, then a copy. case $ac_source in [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;; *) ac_rel_source=$ac_top_build_prefix$ac_source ;; esac ln -s "$ac_rel_source" "$ac_file" 2>/dev/null || ln "$ac_source" "$ac_file" 2>/dev/null || cp -p "$ac_source" "$ac_file" || as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5 fi ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; "libtool":C) # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010 Free Software Foundation, # Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool 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. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # The names of the tagged configurations supported by this script. available_tags="CXX " # ### BEGIN LIBTOOL CONFIG # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # What type of objects to build. pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # An echo program that protects backslashes. ECHO=$lt_ECHO # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="\$SED -e 1s/^X//" # A grep program that handles long lines. GREP=$lt_GREP # An ERE matcher. EGREP=$lt_EGREP # A literal string matcher. FGREP=$lt_FGREP # A BSD- or MS-compatible name lister. NM=$lt_NM # Whether we need soft or hard links. LN_S=$lt_LN_S # What is the maximum length of a command? max_cmd_len=$max_cmd_len # Object file suffix (normally "o"). objext=$ac_objext # Executable file suffix (normally ""). exeext=$exeext # whether the shell understands "unset". lt_unset=$lt_unset # turn spaces into newlines. SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP # convert \$build file names to \$host format. to_host_file_cmd=$lt_cv_to_host_file_cmd # convert \$build files to toolchain format. to_tool_file_cmd=$lt_cv_to_tool_file_cmd # An object symbol dumper. OBJDUMP=$lt_OBJDUMP # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method = "file_magic". file_magic_cmd=$lt_file_magic_cmd # How to find potential files when deplibs_check_method = "file_magic". file_magic_glob=$lt_file_magic_glob # Find potential files using nocaseglob when deplibs_check_method = "file_magic". want_nocaseglob=$lt_want_nocaseglob # DLL creation program. DLLTOOL=$lt_DLLTOOL # Command to associate shared and link libraries. sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd # The archiver. AR=$lt_AR # Flags to create an archive. AR_FLAGS=$lt_AR_FLAGS # How to feed a file listing to the archiver. archiver_list_spec=$lt_archiver_list_spec # A symbol stripping program. STRIP=$lt_STRIP # Commands used to install an old-style archive. RANLIB=$lt_RANLIB old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Whether to use a lock for old archive extraction. lock_old_archive_extraction=$lock_old_archive_extraction # A C compiler. LTCC=$lt_CC # LTCC compiler flags. LTCFLAGS=$lt_CFLAGS # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix # Specify filename containing input files for \$NM. nm_file_list_spec=$lt_nm_file_list_spec # The root where to search for dependent libraries,and in which our libraries should be installed. lt_sysroot=$lt_sysroot # The name of the directory that contains temporary libtool files. objdir=$objdir # Used to examine libraries when file_magic_cmd begins with "file". MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks # Manifest tool. MANIFEST_TOOL=$lt_MANIFEST_TOOL # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL # Tool to change global to local symbols on Mac OS X. NMEDIT=$lt_NMEDIT # Tool to manipulate fat objects and archives on Mac OS X. LIPO=$lt_LIPO # ldd/readelf like tool for Mach-O binaries on Mac OS X. OTOOL=$lt_OTOOL # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. OTOOL64=$lt_OTOOL64 # Old archive suffix (normally "a"). libext=$libext # Shared library suffix (normally ".so"). shrext_cmds=$lt_shrext_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Variables whose values should be saved in libtool wrapper scripts and # restored at link time. variables_saved_for_relink=$lt_variables_saved_for_relink # Do we need the "lib" prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Library versioning type. version_type=$version_type # Shared library runtime path variable. runpath_var=$runpath_var # Shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Permission mode override for installation of shared libraries. install_override_mode=$lt_install_override_mode # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds # Command to use after uninstallation of a shared archive. postuninstall_cmds=$lt_postuninstall_cmds # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # As "finish_cmds", except a single script fragment to be evaled but # not shown. finish_eval=$lt_finish_eval # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Compile-time system search path for libraries. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries. sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # The linker used to build libraries. LD=$lt_LD # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds # A language specific compiler. CC=$lt_compiler # Is the compiler the GNU compiler? with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # If ld is used when linking, flag to hardcode \$libdir into a binary # during linking. This must work even if \$libdir does not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \${shlibpath_var} if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds # Specify filename containing input files. file_list_spec=$lt_file_list_spec # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # The directories searched by this compiler when creating a shared library. compiler_lib_search_dirs=$lt_compiler_lib_search_dirs # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects postdep_objects=$lt_postdep_objects predeps=$lt_predeps postdeps=$lt_postdeps # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac ltmain="$ac_aux_dir/ltmain.sh" # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) if test x"$xsi_shell" = xyes; then sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ func_dirname ()\ {\ \ case ${1} in\ \ */*) func_dirname_result="${1%/*}${2}" ;;\ \ * ) func_dirname_result="${3}" ;;\ \ esac\ } # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_basename ()$/,/^} # func_basename /c\ func_basename ()\ {\ \ func_basename_result="${1##*/}"\ } # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ func_dirname_and_basename ()\ {\ \ case ${1} in\ \ */*) func_dirname_result="${1%/*}${2}" ;;\ \ * ) func_dirname_result="${3}" ;;\ \ esac\ \ func_basename_result="${1##*/}"\ } # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ func_stripname ()\ {\ \ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ \ # positional parameters, so assign one to ordinary parameter first.\ \ func_stripname_result=${3}\ \ func_stripname_result=${func_stripname_result#"${1}"}\ \ func_stripname_result=${func_stripname_result%"${2}"}\ } # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ func_split_long_opt ()\ {\ \ func_split_long_opt_name=${1%%=*}\ \ func_split_long_opt_arg=${1#*=}\ } # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ func_split_short_opt ()\ {\ \ func_split_short_opt_arg=${1#??}\ \ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ } # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ func_lo2o ()\ {\ \ case ${1} in\ \ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ \ *) func_lo2o_result=${1} ;;\ \ esac\ } # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_xform ()$/,/^} # func_xform /c\ func_xform ()\ {\ func_xform_result=${1%.*}.lo\ } # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_arith ()$/,/^} # func_arith /c\ func_arith ()\ {\ func_arith_result=$(( $* ))\ } # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_len ()$/,/^} # func_len /c\ func_len ()\ {\ func_len_result=${#1}\ } # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$lt_shell_append" = xyes; then sed -e '/^func_append ()$/,/^} # func_append /c\ func_append ()\ {\ eval "${1}+=\\${2}"\ } # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ func_append_quoted ()\ {\ \ func_quote_for_eval "${2}"\ \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ } # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: # Save a `func_append' function call where possible by direct use of '+=' sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: else # Save a `func_append' function call even when '+=' is not available sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$_lt_function_replace_fail" = x":"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 $as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} fi mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" cat <<_LT_EOF >> "$ofile" # ### BEGIN LIBTOOL TAG CONFIG: CXX # The linker used to build libraries. LD=$lt_LD_CXX # How to create reloadable object files. reload_flag=$lt_reload_flag_CXX reload_cmds=$lt_reload_cmds_CXX # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds_CXX # A language specific compiler. CC=$lt_compiler_CXX # Is the compiler the GNU compiler? with_gcc=$GCC_CXX # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_CXX # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_CXX # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_CXX # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_CXX # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object_CXX # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds_CXX archive_expsym_cmds=$lt_archive_expsym_cmds_CXX # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds_CXX module_expsym_cmds=$lt_module_expsym_cmds_CXX # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld_CXX # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_CXX # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_CXX # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX # If ld is used when linking, flag to hardcode \$libdir into a binary # during linking. This must work even if \$libdir does not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct_CXX # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \${shlibpath_var} if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute_CXX # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L_CXX # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic_CXX # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath_CXX # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_CXX # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols_CXX # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_CXX # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_CXX # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_CXX # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds_CXX # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds_CXX # Specify filename containing input files. file_list_spec=$lt_file_list_spec_CXX # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_CXX # The directories searched by this compiler when creating a shared library. compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects_CXX postdep_objects=$lt_postdep_objects_CXX predeps=$lt_predeps_CXX postdeps=$lt_postdeps_CXX # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_CXX # ### END LIBTOOL TAG CONFIG: CXX _LT_EOF ;; "tests/valgrind_tests.sh":F) chmod +x tests/valgrind_tests.sh ;; "tests/valgrind_suppressions.sh":F) chmod +x tests/valgrind_suppressions.sh ;; "tests/valgrind_test.sh":F) chmod +x tests/valgrind_test.sh ;; "lib/tests/valgrind_test.sh":F) chmod +x lib/tests/valgrind_test.sh ;; "doc/shjs_css_transform.sh":F) chmod +x doc/shjs_css_transform.sh ;; "doc/gen_style_example.sh":F) chmod +x doc/gen_style_example.sh ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi if test "$ax_cv_boost_regex" = "yes"; then if test -z "$BOOST_REGEX_LIB"; then as_fn_error $? " ERROR! Boost::regex library is installed, but you must specify the suffix with --with-boost-regex at configure for instance, --with-boost-regex=boost_regex-gcc-1_31" "$LINENO" 5 else echo "" echo "Good - your configure finished. Start make now" echo "" fi else as_fn_error $? " ERROR! Boost::regex library not installed. Please install it (download at http://www.boost.org/)" "$LINENO" 5 fi echo " These programs are NOT required, and are useful only for source-highlight developers Gengetopt.........: $GENGETOPT Doublecpp.........: $DOUBLECPP Valgrind..........: $VALGRIND " echo " ($PACKAGE_NAME) version $PACKAGE_VERSION Prefix.........: $prefix Using Boost....: $BOOST_REGEX_LIB C++ Compiler...: $CXX $CXXFLAGS $CPPFLAGS Linker.........: $LD $LDFLAGS $LIBS Doxygen........: ${DOXYGEN:-NONE or not enabled} Help2Man.......: ${HELP2MAN:-NONE} Ctags..........: ${CTAGS:-NONE} " if test -z "$ac_cv_path_HELP2MAN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: help2man is not installed so the man page will not be updated in case command line options are changed. This is important for maintainers only, though." >&5 $as_echo "$as_me: WARNING: help2man is not installed so the man page will not be updated in case command line options are changed. This is important for maintainers only, though." >&2;} fi if test -z "$ac_cv_path_CTAGS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ctags is not installed so you won't be able to generate references (--gen-references). You can find it here http://ctags.sourceforge.net " >&5 $as_echo "$as_me: WARNING: ctags is not installed so you won't be able to generate references (--gen-references). You can find it here http://ctags.sourceforge.net " >&2;} else if test "$ac_cv_ctags_flags" = "no"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The ctags you have on your system cannot be used by source-highlight (make sure you have a ctags that support --excmd option, e.g., exuberant ctags, You can find it here http://ctags.sourceforge.net). so you won't be able to generate references (--gen-references). " >&5 $as_echo "$as_me: WARNING: The ctags you have on your system cannot be used by source-highlight (make sure you have a ctags that support --excmd option, e.g., exuberant ctags, You can find it here http://ctags.sourceforge.net). so you won't be able to generate references (--gen-references). " >&2;} fi fi if test -z "$DOXYGEN"; then echo "-----------------------------------------" echo " No Doxygen program found - continuing" echo " without Doxygen documentation support." echo " (it must be enabled with --with-doxygen)" echo "-----------------------------------------" fi if test "${BASH_COMPLETION_DIR}" != ""; then echo "Good: you're using bash_completion! dir: $BASH_COMPLETION_DIR" else echo "you're not using bash_completion (I'm not installing its config file)." BASH_COMPLETION_DIR="" fi echo "" ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/defines.pri������������������������������������������������������������������0000644�0001750�0001750�00000002554�11672675561�014066� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������MAJOR_VERSION = 3 VERSION = $${MAJOR_VERSION}.0.1 # better to avoid both builds (especially on windows) CONFIG-=debug_and_release CONFIG -= qt CONFIG += console warn_on CONFIG -= thread # ------------------------------------------------- # Auto select compiler # ------------------------------------------------- win32-g++: COMPILER = mingw win32-msvc*: COMPILER = msvc linux-g++: COMPILER = gcc DEFINES += ABSOLUTEDATADIR=\\\"/usr/local/share/source-highlight/\\\" \ VERSION=\\\"3.1.6\\\" \ LIBRARY_VERSION=\\\"4.0.0\\\" \ PACKAGE=\\\"source-highlight\\\" \ RELATIVEDATADIR=\\\"../share/source-highlight\\\" LIBRARY_NAME = source-highlight LIBRARY_LIB = $${LIBRARY_NAME} CONFIG(static) { BUILDING_STATIC_LIBRARY=1 } contains(COMPILER, mingw) { isEmpty(BUILDING_STATIC_LIBRARY) { LIBRARY_LIB=$${LIBRARY_NAME}$${MAJOR_VERSION} } } contains(COMPILER, msvc) { isEmpty(BUILDING_STATIC_LIBRARY) { CONFIG+=static } } !isEmpty(BOOST_REGEX) { # remove the library found with pkg-config with the one explicitly specified ADDITIONAL_LIBRARIES += -l$$BOOST_REGEX } else { ADDITIONAL_LIBRARIES += -lboost_regex } contains(COMPILER, msvc) { # Special cases for MSVC DEFINES += USE_MSVC DEFINES += _CRT_SECURE_NO_WARNINGS } contains(COMPILER, mingw) { # Special cases for mingw DEFINES += USE_MINGW } ����������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/config.h.in������������������������������������������������������������������0000664�0001750�0001750�00000047257�11675044733�013765� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* config.h.in. Generated from configure.ac by autoheader. */ /* Define to the source-highlight data directory absolute to installation path. */ #undef ABSOLUTEDATADIR /* */ #undef CHROOT_INPUT_DIR /* Define to 1 if // is a file system root distinct from /. */ #undef DOUBLE_SLASH_IS_DISTINCT_ROOT /* Define to 1 if mkdir mistakenly creates a directory given with a trailing dot component. */ #undef FUNC_MKDIR_DOT_BUG /* Define to 1 when the gnulib module getopt-gnu should be tested. */ #undef GNULIB_TEST_GETOPT_GNU /* Define to 1 when the gnulib module malloc-posix should be tested. */ #undef GNULIB_TEST_MALLOC_POSIX /* Define to 1 when the gnulib module strdup should be tested. */ #undef GNULIB_TEST_STRDUP /* define if the Boost library is available */ #undef HAVE_BOOST /* define if the Boost::Regex library is available */ #undef HAVE_BOOST_REGEX /* Define to 1 if you have the declaration of `getenv', and to 0 if you don't. */ #undef HAVE_DECL_GETENV /* Define to 1 if you have the declaration of `program_invocation_name', and to 0 if you don't. */ #undef HAVE_DECL_PROGRAM_INVOCATION_NAME /* Define to 1 if you have the declaration of `program_invocation_short_name', and to 0 if you don't. */ #undef HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME /* Define to 1 if you have the declaration of `strdup', and to 0 if you don't. */ #undef HAVE_DECL_STRDUP /* Define to 1 if you have the <dirent.h> header file. */ #undef HAVE_DIRENT_H /* Define to 1 if you have the <dlfcn.h> header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you have the <getopt.h> header file. */ #undef HAVE_GETOPT_H /* Define to 1 if you have the `getopt_long_only' function. */ #undef HAVE_GETOPT_LONG_ONLY /* Define to 1 if you have the <inttypes.h> header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the <libintl.h> header file. */ #undef HAVE_LIBINTL_H /* Define if the 'malloc' function is POSIX compliant. */ #undef HAVE_MALLOC_POSIX /* Define to 1 if you have the <memory.h> header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `memset' function. */ #undef HAVE_MEMSET /* define if the compiler implements namespaces */ #undef HAVE_NAMESPACES /* Define to 1 if alphasort is declared even after undefining macros. */ #undef HAVE_RAW_DECL_ALPHASORT /* Define to 1 if atoll is declared even after undefining macros. */ #undef HAVE_RAW_DECL_ATOLL /* Define to 1 if canonicalize_file_name is declared even after undefining macros. */ #undef HAVE_RAW_DECL_CANONICALIZE_FILE_NAME /* Define to 1 if chdir is declared even after undefining macros. */ #undef HAVE_RAW_DECL_CHDIR /* Define to 1 if chown is declared even after undefining macros. */ #undef HAVE_RAW_DECL_CHOWN /* Define to 1 if closedir is declared even after undefining macros. */ #undef HAVE_RAW_DECL_CLOSEDIR /* Define to 1 if dirfd is declared even after undefining macros. */ #undef HAVE_RAW_DECL_DIRFD /* Define to 1 if dup is declared even after undefining macros. */ #undef HAVE_RAW_DECL_DUP /* Define to 1 if dup2 is declared even after undefining macros. */ #undef HAVE_RAW_DECL_DUP2 /* Define to 1 if dup3 is declared even after undefining macros. */ #undef HAVE_RAW_DECL_DUP3 /* Define to 1 if endusershell is declared even after undefining macros. */ #undef HAVE_RAW_DECL_ENDUSERSHELL /* Define to 1 if environ is declared even after undefining macros. */ #undef HAVE_RAW_DECL_ENVIRON /* Define to 1 if euidaccess is declared even after undefining macros. */ #undef HAVE_RAW_DECL_EUIDACCESS /* Define to 1 if faccessat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FACCESSAT /* Define to 1 if fchdir is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FCHDIR /* Define to 1 if fchmodat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FCHMODAT /* Define to 1 if fchownat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FCHOWNAT /* Define to 1 if fdatasync is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FDATASYNC /* Define to 1 if fdopendir is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FDOPENDIR /* Define to 1 if ffsl is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FFSL /* Define to 1 if ffsll is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FFSLL /* Define to 1 if fstat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FSTAT /* Define to 1 if fstatat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FSTATAT /* Define to 1 if fsync is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FSYNC /* Define to 1 if ftruncate is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FTRUNCATE /* Define to 1 if futimens is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FUTIMENS /* Define to 1 if getcwd is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETCWD /* Define to 1 if getdomainname is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETDOMAINNAME /* Define to 1 if getdtablesize is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETDTABLESIZE /* Define to 1 if getgroups is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETGROUPS /* Define to 1 if gethostname is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETHOSTNAME /* Define to 1 if getloadavg is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETLOADAVG /* Define to 1 if getlogin is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETLOGIN /* Define to 1 if getlogin_r is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETLOGIN_R /* Define to 1 if getpagesize is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETPAGESIZE /* Define to 1 if getsubopt is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETSUBOPT /* Define to 1 if getusershell is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETUSERSHELL /* Define to 1 if grantpt is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GRANTPT /* Define to 1 if group_member is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GROUP_MEMBER /* Define to 1 if initstate_r is declared even after undefining macros. */ #undef HAVE_RAW_DECL_INITSTATE_R /* Define to 1 if lchmod is declared even after undefining macros. */ #undef HAVE_RAW_DECL_LCHMOD /* Define to 1 if lchown is declared even after undefining macros. */ #undef HAVE_RAW_DECL_LCHOWN /* Define to 1 if link is declared even after undefining macros. */ #undef HAVE_RAW_DECL_LINK /* Define to 1 if linkat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_LINKAT /* Define to 1 if lseek is declared even after undefining macros. */ #undef HAVE_RAW_DECL_LSEEK /* Define to 1 if lstat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_LSTAT /* Define to 1 if memmem is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MEMMEM /* Define to 1 if mempcpy is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MEMPCPY /* Define to 1 if memrchr is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MEMRCHR /* Define to 1 if mkdirat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MKDIRAT /* Define to 1 if mkdtemp is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MKDTEMP /* Define to 1 if mkfifo is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MKFIFO /* Define to 1 if mkfifoat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MKFIFOAT /* Define to 1 if mknod is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MKNOD /* Define to 1 if mknodat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MKNODAT /* Define to 1 if mkostemp is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MKOSTEMP /* Define to 1 if mkostemps is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MKOSTEMPS /* Define to 1 if mkstemp is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MKSTEMP /* Define to 1 if mkstemps is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MKSTEMPS /* Define to 1 if opendir is declared even after undefining macros. */ #undef HAVE_RAW_DECL_OPENDIR /* Define to 1 if pipe is declared even after undefining macros. */ #undef HAVE_RAW_DECL_PIPE /* Define to 1 if pipe2 is declared even after undefining macros. */ #undef HAVE_RAW_DECL_PIPE2 /* Define to 1 if posix_openpt is declared even after undefining macros. */ #undef HAVE_RAW_DECL_POSIX_OPENPT /* Define to 1 if pread is declared even after undefining macros. */ #undef HAVE_RAW_DECL_PREAD /* Define to 1 if ptsname is declared even after undefining macros. */ #undef HAVE_RAW_DECL_PTSNAME /* Define to 1 if ptsname_r is declared even after undefining macros. */ #undef HAVE_RAW_DECL_PTSNAME_R /* Define to 1 if pwrite is declared even after undefining macros. */ #undef HAVE_RAW_DECL_PWRITE /* Define to 1 if random_r is declared even after undefining macros. */ #undef HAVE_RAW_DECL_RANDOM_R /* Define to 1 if rawmemchr is declared even after undefining macros. */ #undef HAVE_RAW_DECL_RAWMEMCHR /* Define to 1 if readdir is declared even after undefining macros. */ #undef HAVE_RAW_DECL_READDIR /* Define to 1 if readlink is declared even after undefining macros. */ #undef HAVE_RAW_DECL_READLINK /* Define to 1 if readlinkat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_READLINKAT /* Define to 1 if realpath is declared even after undefining macros. */ #undef HAVE_RAW_DECL_REALPATH /* Define to 1 if rewinddir is declared even after undefining macros. */ #undef HAVE_RAW_DECL_REWINDDIR /* Define to 1 if rmdir is declared even after undefining macros. */ #undef HAVE_RAW_DECL_RMDIR /* Define to 1 if rpmatch is declared even after undefining macros. */ #undef HAVE_RAW_DECL_RPMATCH /* Define to 1 if scandir is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SCANDIR /* Define to 1 if setenv is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SETENV /* Define to 1 if sethostname is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SETHOSTNAME /* Define to 1 if setstate_r is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SETSTATE_R /* Define to 1 if setusershell is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SETUSERSHELL /* Define to 1 if sleep is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SLEEP /* Define to 1 if srandom_r is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SRANDOM_R /* Define to 1 if stat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STAT /* Define to 1 if stpcpy is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STPCPY /* Define to 1 if stpncpy is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STPNCPY /* Define to 1 if strcasestr is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRCASESTR /* Define to 1 if strchrnul is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRCHRNUL /* Define to 1 if strdup is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRDUP /* Define to 1 if strerror_r is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRERROR_R /* Define to 1 if strncat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRNCAT /* Define to 1 if strndup is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRNDUP /* Define to 1 if strnlen is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRNLEN /* Define to 1 if strpbrk is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRPBRK /* Define to 1 if strsep is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRSEP /* Define to 1 if strsignal is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRSIGNAL /* Define to 1 if strtod is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRTOD /* Define to 1 if strtok_r is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRTOK_R /* Define to 1 if strtoll is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRTOLL /* Define to 1 if strtoull is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRTOULL /* Define to 1 if strverscmp is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRVERSCMP /* Define to 1 if symlink is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SYMLINK /* Define to 1 if symlinkat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SYMLINKAT /* Define to 1 if ttyname_r is declared even after undefining macros. */ #undef HAVE_RAW_DECL_TTYNAME_R /* Define to 1 if unlink is declared even after undefining macros. */ #undef HAVE_RAW_DECL_UNLINK /* Define to 1 if unlinkat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_UNLINKAT /* Define to 1 if unlockpt is declared even after undefining macros. */ #undef HAVE_RAW_DECL_UNLOCKPT /* Define to 1 if unsetenv is declared even after undefining macros. */ #undef HAVE_RAW_DECL_UNSETENV /* Define to 1 if usleep is declared even after undefining macros. */ #undef HAVE_RAW_DECL_USLEEP /* Define to 1 if utimensat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_UTIMENSAT /* Define to 1 if _Exit is declared even after undefining macros. */ #undef HAVE_RAW_DECL__EXIT /* define if the compiler has stringstream */ #undef HAVE_SSTREAM /* Define to 1 if you have the <stddef.h> header file. */ #undef HAVE_STDDEF_H /* Define to 1 if you have the <stdint.h> header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the <stdlib.h> header file. */ #undef HAVE_STDLIB_H /* define if the compiler supports Standard Template Library */ #undef HAVE_STL /* 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 <strings.h> header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the <string.h> header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the <sys/stat.h> header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the <sys/time.h> header file. */ #undef HAVE_SYS_TIME_H /* Define to 1 if you have the <sys/types.h> header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the <unistd.h> header file. */ #undef HAVE_UNISTD_H /* Define if you have the 'wchar_t' type. */ #undef HAVE_WCHAR_T /* Define to 1 if you have the `yywrap' function. */ #undef HAVE_YYWRAP /* Define to 1 if the system has the type `_Bool'. */ #undef HAVE__BOOL /* */ #undef LIBRARY_VERSION /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define to the source-highlight data directory relative to installation path. */ #undef RELATIVEDATADIR /* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly. */ #undef STAT_MACROS_BROKEN /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Version number of package */ #undef VERSION /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #undef YYTEXT_POINTER /* Define to 1 if on MINIX. */ #undef _MINIX /* The _Noreturn keyword of draft C1X. */ #ifndef _Noreturn # if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \ || 0x5110 <= __SUNPRO_C) # define _Noreturn __attribute__ ((__noreturn__)) # elif defined _MSC_VER && 1200 <= _MSC_VER # define _Noreturn __declspec (noreturn) # else # define _Noreturn # endif #endif /* Define to 2 if the system does not provide POSIX.1 features except with this defined. */ #undef _POSIX_1_SOURCE /* Define to 1 if you need to in order for `stat' and other things to work. */ #undef _POSIX_SOURCE /* Define to 500 only on HP-UX. */ #undef _XOPEN_SOURCE /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # undef _ALL_SOURCE #endif /* Enable general extensions on MacOS X. */ #ifndef _DARWIN_C_SOURCE # undef _DARWIN_C_SOURCE #endif /* Enable GNU extensions on systems that have them. */ #ifndef _GNU_SOURCE # undef _GNU_SOURCE #endif /* Enable threading extensions on Solaris. */ #ifndef _POSIX_PTHREAD_SEMANTICS # undef _POSIX_PTHREAD_SEMANTICS #endif /* Enable extensions on HP NonStop. */ #ifndef _TANDEM_SOURCE # undef _TANDEM_SOURCE #endif /* Enable general extensions on Solaris. */ #ifndef __EXTENSIONS__ # undef __EXTENSIONS__ #endif /* Define to rpl_ if the getopt replacement functions and variables should be used. */ #undef __GETOPT_PREFIX /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus #undef inline #endif /* Define to ios if the compiler does not provide ios_base */ #undef ios_base /* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of earlier versions), but does not display it by setting __GNUC_STDC_INLINE__. __APPLE__ && __MACH__ test for MacOS X. __APPLE_CC__ tests for the Apple compiler and its version. __STDC_VERSION__ tests for the C99 mode. */ #if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__ # define __GNUC_STDC_INLINE__ 1 #endif /* Define to `int' if <sys/types.h> does not define. */ #undef mode_t /* Define to the type of st_nlink in struct stat, or a supertype. */ #undef nlink_t /* Define to `long int' if <sys/types.h> does not define. */ #undef off_t /* Define to `int' if <sys/types.h> does not define. */ #undef pid_t /* Define to the equivalent of the C99 'restrict' keyword, or to nothing if this is not supported. Do not define if restrict is supported directly. */ #undef restrict /* Work around a bug in Sun C++: it does not support _Restrict or __restrict__, even though the corresponding Sun C compiler ends up with "#define restrict _Restrict" or "#define restrict __restrict__" in the previous line. Perhaps some future version of Sun C++ will work with restrict; if so, hopefully it defines __RESTRICT like Sun C does. */ #if defined __SUNPRO_CC && !defined __RESTRICT # define _Restrict # define __restrict__ #endif /* Define to `unsigned int' if <sys/types.h> does not define. */ #undef size_t /* Define as a signed type of the same size as size_t. */ #undef ssize_t /* Define as a marker that can be attached to declarations that might not be used. This helps to reduce warnings, such as from GCC -Wunused-parameter. */ #if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) # define _GL_UNUSED __attribute__ ((__unused__)) #else # define _GL_UNUSED #endif /* The name _UNUSED_PARAMETER_ is an earlier spelling, although the name is a misnomer outside of parameter lists. */ #define _UNUSED_PARAMETER_ _GL_UNUSED /* The __pure__ attribute was added in gcc 2.96. */ #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) # define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) #else # define _GL_ATTRIBUTE_PURE /* empty */ #endif /* The __const__ attribute was added in gcc 2.95. */ #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) # define _GL_ATTRIBUTE_CONST __attribute__ ((__const__)) #else # define _GL_ATTRIBUTE_CONST /* empty */ #endif �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/THANKS�����������������������������������������������������������������������0000644�0001750�0001750�00000004410�11676047450�012633� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight THANKS file source-highlight has originally been written by Lorenzo Bettini. Many people have further contributed to source-highlight by reporting problems, suggesting various improvements, or submitting actual code. Here is a list of these people (alphabetically sorted). Help me keep it complete and exempt of errors, please. Some of these people actually helped me previously with java2html, and cpp2html, so they implicitly helped me also for source-highlight :-) Sergey Astanin Alain Barbet Rodolfo Barrett Dan Barthel Manos Batsis Hans-Peter Bischof Pascal Bleser Jason Blevins Bernie Boudet David Bremners Federico Bruni Luca Bruno Andy Buckley Reto Buerki Bill Burgess Fabio Calefato Ziv Caspi Eugene Chae Andre Charbonneau Robert J. Clark John Constantine Marco Costalba Marc C�t� Marcus G. Daniels John E. Davis Maxim Dementiev Osvaldo Pinali Doederlein Kaloian Doganov Paul Dubuc Andrea Ercolino Oliver Fischer Richard Freedman Gary Funck Nazar Gabriel Michael Gasche Valentin Gatien-Baron Martin Gebert Grant McLean Josh Ghiloni Pierre-Fran�ois Giraud Jackie Goodwin Nathaniel Gray Paul W. Harvey Arne Heizmann Reiner Herrmann Orlando Hill Jos Hirth Jurgen Hotzel Tom Hull Dirk Jagdmann Kristoforos Joanidis Peter Johansson Manuel Kauers Ed Kelly Britton Kerin Thomas Klausner Jari Korva Raymond Lambe Keith Lea Eric O. Lebigot Vladimir Lomov Aldo D. Longhi Maurizio Loreti Luc Maisonobe Chris Mason Michael McDermott Grant McLean Caolan McMahon Hayato Mikami Horacio Montenegro Paulo Moura Tim M�ller Tiziano Muller Hugh S. Myers Noritsugu Nakamura Helmut Naughton Geir Nilsen Roger Nilsson Mikel Olasagasti Xavier Outhier Hidagus Pa Stefan Palm Bill Pace Christian Paulsen Damir Perisa Simon Pieters C. Michael Pilato Elias Pipping Matthias Pospiech Stuart Rackham Adrian Reber James Riely Keith Robertson Jean-Baptiste Rouquier Jan Schafer Bruno Schweizer Ed Scott Konstantine Serebriany Hemmi Shigeru Mark Silberbauer Viraj Sinha Abe Skolnik Joel Smith Don Stauffer Danijel Tasov Jan Tatarik Cesare Tirabassi Paul Townsend Miklos Vajna Alessandro Vesely Arto Viitanen Xavier-Emmanuel Vincent Geurt Vos Patrick Wagstrom Dean Wampler Derek Wyatt Robert Wetzel Curtis Weyant Toby White Dag Wieers Masatake Yamato Alexios Zavras Mauricio Zepeda Christian W. Zuckschwerdt��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/�������������������������������������������������������������������������0000775�0001750�0001750�00000000000�11676051673�012552� 5����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/sh_navy.css��������������������������������������������������������������0000644�0001750�0001750�00000001651�11672675562�014661� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������body { background-color: #000035; color: #008bff; font-weight: normal; font-style: normal; } .keyword { color: #f8c50b; font-weight: bold; font-style: normal; } .type { color: #e1e72f; font-weight: normal; font-style: normal; } .string { color: #ffffff; font-weight: normal; font-style: normal; } .specialchar { color: #ffffff; font-weight: normal; font-style: normal; } .comment { color: #ffbb00; font-weight: normal; font-style: italic; } .number { color: #f87ff4; font-weight: normal; font-style: normal; } .preproc { color: #bb00ff; font-weight: normal; font-style: normal; } .symbol { color: #ffffff; font-weight: normal; font-style: normal; } .function { color: #ffffff; font-weight: normal; font-style: normal; } .cbracket { color: #ffffff; font-weight: normal; font-style: normal; } ���������������������������������������������������������������������������������������source-highlight-3.1.6/doc/sh_typical.css�����������������������������������������������������������0000644�0001750�0001750�00000001647�11672675562�015356� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������body { background-color: #ffffff; color: #000000; font-weight: normal; font-style: normal; } .keyword { color: #0000ff; font-weight: bold; font-style: normal; } .type { color: #0000ff; font-weight: normal; font-style: normal; } .string { color: #ff0000; font-weight: normal; font-style: normal; } .specialchar { color: #C42DA8; font-weight: normal; font-style: normal; } .comment { color: #666666; font-weight: normal; font-style: italic; } .number { color: #a900a9; font-weight: normal; font-style: normal; } .preproc { color: #00b800; font-weight: normal; font-style: normal; } .symbol { color: #ff0000; font-weight: normal; font-style: normal; } .function { color: #000000; font-weight: bold; font-style: normal; } .cbracket { color: #ff0000; font-weight: normal; font-style: normal; } �����������������������������������������������������������������������������������������source-highlight-3.1.6/doc/help-output.texinfo������������������������������������������������������0000644�0001750�0001750�00000020005�11675045062�016343� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight Highlight the syntax of a source file (e.g. Java) into a specific format (e.g. HTML) Usage: [OPTIONS]... < input_file > output_file source-highlight [OPTIONS]... -i input_file -o output_file source-highlight [OPTIONS]... [FILES]... -h, --help Print help and exit --detailed-help Print help, including all details and hidden options, and exit -V, --version Print version and exit -i, --input=filename input file. default std input -o, --output=filename output file. default std output (when the third invocation form is used). If STDOUT is specified, the output is directed to standard output you can simply specify some files at the command line and also use regular expressions (for instance *.java). In this case the name for the output files will be formed using the name of the source file with a .<ext> appended, where <ext> is the extension chosen according to the output format specified (for instance .html). -s, --src-lang=STRING source language (use --lang-list to get the complete list). If not specified, the source language will be guessed from the file extension. --lang-list list all the supported language and associated language definition file --outlang-list list all the supported output language and associated language definition file -f, --out-format=STRING output format (use --outlang-list to get the complete list) (default=`html') -d, --doc create an output file that can be used as a stand alone document (e.g., not to be included in another one) --no-doc cancel the --doc option even if it is implied (e.g., when css is given) -c, --css=filename the external style sheet filename. Implies --doc -T, --title=STRING give a title to the output document. Implies --doc -t, --tab=INT specify tab length. (default=`8') -H, --header=filename file to insert as header -F, --footer=filename file to insert as footer --style-file=filename specify the file containing format options (default=`default.style') --style-css-file=filename specify the file containing format options (in css syntax) --style-defaults=filename specify the file containing defaults for format options (default=`style.defaults') --outlang-def=filename output language definition file --outlang-map=filename output language map file (default=`outlang.map') --data-dir=path directory where language definition files and language maps are searched for. If not specified these files are searched for in the current directory and in the data dir installation directory --output-dir=path output directory --lang-def=filename language definition file --lang-map=filename language map file (default=`lang.map') --show-lang-elements=filename prints the language elements that are defined in the language definition file --infer-lang force to infer source script language (overriding given language specification) Lines: -n, --line-number[=padding] number all output lines, using the specified padding character (default=`0') --line-number-ref[=prefix] number all output lines and generate an anchor, made of the specified prefix + the line number (default=`line') Filtering output: Mode: linerange specifying line ranges --line-range=STRING generate only the lines in the specified range(s) each range can be of the shape: single line (e.g., --line-range=50) full range (e.g., --line-range=2-10) partial range (e.g., --line-range=-30, first 30 lines, --line-range=40- from line 40 to the end --range-separator=STRING the optional separator to be printed among ranges (e.g., "...") --range-context=INT number of (context) lines generated even if not in range The optional --range-context specifies the number of lines that are not in range that will be printed anyway (before and after the lines in range); These lines will be formatted according to the "context" style. Mode: regexrange specifying regular expression delimited ranges --regex-range=STRING generate only the lines within the specified regular expressions when a line containing the specified regular expression is found, then the lines after this one are actually generated, until another line, containing the same regular expression is found (this last line is not generated). More than one regular expression can be specified. reference generation: --gen-references=STRING generate references (possible values="inline", "postline", "postdoc" default=`inline') --ctags-file=filename specify the file generated by ctags that will be used to generate references (default=`tags') --ctags=cmd how to run the ctags command. If this option is not specified, ctags will be executed with the default value. If it is specified with an empty string, ctags will not be executed at all (default=`ctags --excmd=n --tag-relative=yes') testing: -v, --verbose verbose mode on -q, --quiet print no progress information --binary-output write output files in binary mode This is useful for testing purposes, since you may want to make sure that output files are always generated with a final newline character only --statistics print some statistics (i.e., elapsed time) --gen-version put source-highlight version in the generated file (default=on) --check-lang=filename only check the correctness of a language definition file --check-outlang=filename only check the correctness of an output language definition file --failsafe if no language definition is found for the input, it is simply copied to the output -g, --debug-langdef[=type] debug a language definition. In dump mode just dumps all the steps; in interactive, at each step, waits for some input (press ENTER to step) (possible values="interactive", "dump" default=`dump') --show-regex=filename show the regular expression automaton corresponding to a language definition file ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/sh_ide-devcpp.css��������������������������������������������������������0000644�0001750�0001750�00000001403�11672675562�015717� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������body { background-color: #ffffff; color: #000000; font-weight: normal; font-style: normal; } .keyword { color: #000000; font-weight: bold; font-style: normal; } .type { color: #000000; font-weight: normal; font-style: normal; } .string { color: #ff0000; font-weight: normal; font-style: normal; } .specialchar { color: #ff0000; font-weight: normal; font-style: normal; } .comment { color: #000080; font-weight: normal; font-style: italic; } .number { color: #0000ff; font-weight: normal; font-style: normal; } .preproc { color: #008000; font-weight: normal; font-style: normal; } .function { color: #000000; font-weight: normal; font-style: normal; } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/css_example.css����������������������������������������������������������0000644�0001750�0001750�00000000414�11672675561�015510� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������body { background-color: <color specification>; } .selector { color: <color specification>; background-color: <color specification>; font-weight: bold; /* this is a comment */ font-family: monospace; font-style: italic; text-decoration: underline; }����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/header.html��������������������������������������������������������������0000644�0001750�0001750�00000001005�11672675561�014606� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<body text="#000000" bgcolor="#CBFFE1" link="#CC6600" vlink="#51188E" alink="#FF0000"> This file has been formatted with <br><b><font color="#FF0000">GNU Source-highlight</font></b>, <a href="http://www.gnu.org/software/src-highlite">http://www.gnu.org/software/src-highlite</a> <br> by <i><font color="#009900">Lorenzo Bettini</font></i> <a href="http://www.lorenzobettini.it">http://www.lorenzobettini.it</a> <hr> <table BORDER=3 CELLPADDING=10 COLS=1 WIDTH="90%" BGCOLOR="#FFFF99" NOSAVE > <tr NOSAVE> <td NOSAVE> ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/c_string.lang.texinfo����������������������������������������������������0000664�0001750�0001750�00000000626�11675045060�016614� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@c Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite @example @b{vardef} @t{@i{SPECIALCHAR}} = @t{'\\.'} @b{environment} @t{@i{string}} @b{delim} @t{"\""} @t{"\""} @b{begin} @t{@i{specialchar}} = @t{@i{$SPECIALCHAR}} @b{end} @b{environment} @t{@i{string}} @b{delim} @t{"'"} @t{"'"} @b{begin} @t{@i{specialchar}} = @t{@i{$SPECIALCHAR}} @b{end} @end example����������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/log.langelems.texinfo����������������������������������������������������0000664�0001750�0001750�00000000135�11675045061�016607� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������cbracket comment date function ip normal number port string symbol time twonumbers webmethod �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/sh_matlab.css������������������������������������������������������������0000644�0001750�0001750�00000001137�11672675562�015143� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������body { background-color: #ffffff; color: #000000; font-weight: normal; font-style: normal; } .keyword { color: #0000ff; font-weight: normal; font-style: normal; } .type { color: #000000; font-weight: normal; font-style: normal; } .string { color: #800000; font-weight: normal; font-style: normal; } .specialchar { color: #000000; font-weight: normal; font-style: normal; } .number { color: #000000; font-weight: normal; font-style: normal; } .function { color: #000000; font-weight: normal; font-style: normal; } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/source-highlight.info����������������������������������������������������0000644�0001750�0001750�00000721155�11676050501�016612� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������This is ../../doc/source-highlight.info, produced by makeinfo version 4.13 from ../../doc/source-highlight.texinfo. This manual is for GNU Source-highlight (version 3.1.6, 24 December 2011), which given a source file, produces a document with syntax highlighting. Copyright (C) 2005-2008 Lorenzo Bettini, `http://www.lorenzobettini.it'. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with the Front-Cover Texts being "A GNU Manual," and with the Back-Cover Texts as in (a) below. A copy of the license is included in the section entitled "GNU Free Documentation License." (a) The FSF's Back-Cover Text is: "You have freedom to copy and modify this GNU Manual, like GNU software. Copies published by the Free Software Foundation raise funds for GNU development." INFO-DIR-SECTION Utilities START-INFO-DIR-ENTRY * Source-highlight: (source-highlight). Highlights contents END-INFO-DIR-ENTRY  File: source-highlight.info, Node: Top, Next: Introduction, Prev: (dir), Up: (dir) GNU Source-highlight ******************** GNU Source-highlight, given a source file, produces a document with syntax highlighting. This is Edition 3.1.6 of the Source-highlight manual. This file documents GNU Source-highlight version 3.1.6. This manual is for GNU Source-highlight (version 3.1.6, 24 December 2011), which given a source file, produces a document with syntax highlighting. Copyright (C) 2005-2008 Lorenzo Bettini, `http://www.lorenzobettini.it'. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with the Front-Cover Texts being "A GNU Manual," and with the Back-Cover Texts as in (a) below. A copy of the license is included in the section entitled "GNU Free Documentation License." (a) The FSF's Back-Cover Text is: "You have freedom to copy and modify this GNU Manual, like GNU software. Copies published by the Free Software Foundation raise funds for GNU development." * Menu: * Introduction:: What's it for? * Installation:: Download and installation * Copying:: Licence issues * Simple Usage:: Very basic usage * Configuration files:: Files needed for execution * Invoking source-highlight:: How to run `source-highlight'. * Language Definitions:: How to define an input language * Output Language Definitions:: How to define an output format * Generating References:: Anchors and cross references * Examples:: Some output examples * Problems:: Reporting bugs. * Mailing Lists:: * Concept Index:: Index of concepts.  File: source-highlight.info, Node: Introduction, Next: Installation, Prev: Top, Up: Top 1 Introduction ************** GNU Source-highlight, given a source file, produces a document with syntax highlighting. The colors and the styles can be specified (bold, italics, underline) by means of a configuration file, and some other options can be specified at the command line. The program already recognizes many programming languages (e.g., C++, Java, Perl, etc.) and file formats (e.g., log files, ChangeLog, etc.), and some output formats (e.g., HTML, ANSI color escape sequences, LaTeX, etc.). Since version 2.0, it allows you to specify your own input source language via a simple syntax described later in this manual (*note Language Definitions::). Since version 2.1, it allows you to specify your own output format language via a simple syntax described later in this manual (*note Output Language Definitions::). Since version 2.2, it is able to generate cross references (e.g., to variable names, field names, etc.) by relying on the program _ctags_, `http://ctags.sourceforge.net' (*note Generating References::). Since version 3.0, GNU Source-highlight also provides a C++ library (which is used by the main program itself), that can be used by C++ programmers to add highlighting functionalities to their programs. *note (source-highlight-info)Introduction::. * Menu: * Supported languages:: * The program source-highlight-settings:: * Notes on some languages:: * Using source-highlight as a simple formatter:: * Related Software and Links::  File: source-highlight.info, Node: Supported languages, Next: The program source-highlight-settings, Prev: Introduction, Up: Introduction 1.1 Supported languages ======================= The complete list of languages (indeed, file extensions) natively supported by this version of Source-highlight (3.1.6), as reported by `--lang-list', is the following: C = cpp.lang H = cpp.lang ac = m4.lang ada = ada.lang adb = ada.lang am = makefile.lang applescript = applescript.lang asm = asm.lang autoconf = m4.lang awk = awk.lang bash = sh.lang bat = bat.lang batch = bat.lang bib = bib.lang bison = bison.lang c = c.lang caml = caml.lang cbl = cobol.lang cc = cpp.lang changelog = changelog.lang clipper = clipper.lang cls = latex.lang cobol = cobol.lang conf = conf.lang cpp = cpp.lang cs = csharp.lang csh = sh.lang csharp = csharp.lang css = css.lang ctp = php.lang d = d.lang desktop = desktop.lang diff = diff.lang dmd = d.lang docbook = xml.lang dtx = latex.lang el = lisp.lang eps = postscript.lang erl = erlang.lang erlang = erlang.lang errors = errors.lang fixed-fortran = fixed-fortran.lang flex = flex.lang fortran = fortran.lang free-fortran = fortran.lang glsl = glsl.lang h = cpp.lang haskell = haskell.lang haxe = haxe.lang hh = cpp.lang hpp = cpp.lang hs = haskell.lang htm = html.lang html = html.lang hx = haxe.lang in = makefile.lang ini = desktop.lang java = java.lang javalog = javalog.lang javascript = javascript.lang js = javascript.lang kcfg = xml.lang kdevelop = xml.lang kidl = xml.lang ksh = sh.lang l = flex.lang lang = langdef.lang langdef = langdef.lang latex = latex.lang ldap = ldap.lang ldif = ldap.lang lex = flex.lang lgt = logtalk.lang lhs = haskell_literate.lang lisp = lisp.lang ll = flex.lang log = log.lang logtalk = logtalk.lang lsm = lsm.lang lua = lua.lang m4 = m4.lang makefile = makefile.lang manifest = manifest.lang mf = manifest.lang ml = caml.lang mli = caml.lang moc = cpp.lang opa = opa.lang outlang = outlang.lang oz = oz.lang pas = pascal.lang pascal = pascal.lang patch = diff.lang pc = pc.lang perl = perl.lang php = php.lang php3 = php.lang php4 = php.lang php5 = php.lang pkgconfig = pc.lang pl = prolog.lang pm = perl.lang po = po.lang postscript = postscript.lang pot = po.lang prg = clipper.lang prolog = prolog.lang properties = properties.lang proto = proto.lang protobuf = proto.lang ps = postscript.lang py = python.lang python = python.lang rb = ruby.lang rc = xml.lang ruby = ruby.lang s = asm.lang scala = scala.lang scheme = scheme.lang scm = scheme.lang scpt = applescript.lang sh = sh.lang shell = sh.lang sig = sml.lang sl = slang.lang slang = slang.lang slsh = slang.lang sml = sml.lang spec = spec.lang sql = sql.lang sty = latex.lang style = style.lang syslog = log.lang tcl = tcl.lang tcsh = sh.lang tex = latex.lang texi = texinfo.lang texinfo = texinfo.lang tk = tcl.lang tml = tml.lang txt = nohilite.lang ui = xml.lang upc = upc.lang vala = vala.lang vbs = vbscript.lang vbscript = vbscript.lang xhtml = xml.lang xml = xml.lang xorg = xorg.lang y = bison.lang yacc = bison.lang yy = bison.lang The complete list of output formats natively supported by this version of Source-highlight (3.1.6), as reported by `--outlang-list', is the following: docbook = docbook.outlang esc = esc.outlang html = html.outlang html-css = htmlcss.outlang htmltable = htmltable.outlang javadoc = javadoc.outlang latex = latex.outlang latexcolor = latexcolor.outlang mediawiki = mediawiki.outlang odf = odf.outlang texinfo = texinfo.outlang xhtml = xhtml.outlang xhtml-css = xhtmlcss.outlang xhtmltable = xhtmltable.outlang The meaning of the suffix `-css' is explained in *note Output Language map::(1). Please, keep in mind, that I haven't tested personally all these language definitions: I actually checked that the definition files are syntactically correct (with the command line option `--check-lang' and `--check-outlang', *note Invoking source-highlight::), but I'm not sure their definition actually respects that language syntax (e.g., I've put up together some language definitions by searching for information in the Internet, but I've never programmed in that language). So, if you find that a language definition is not precise, please let me know. Moreover, if you have a program example in a language that's not included in the `tests' directory, please send it to me so that I can include it in the test suite. ---------- Footnotes ---------- (1) Up to version 2.9, there were also the suffixes `-doc' and `-css-doc', but this mechanism was quite confusing and complex; hopefully, this new one should be better.  File: source-highlight.info, Node: The program source-highlight-settings, Next: Notes on some languages, Prev: Supported languages, Up: Introduction 1.2 The program `source-highlight-settings' =========================================== Since version 3.0, GNU Source-highlight includes also the program `source-highlight-settings', which can be used to check whether source-highlight will be able find its language definition files, and other configuration files, and in case, to store the correct settings in a configuration file, in the user home directory. In particular, the stored configuration file will be called `source-highlight.conf' and stored in `$HOME/.source-highlight/'. For the moment, this file only stores the default value for the `--data-dir' option. The user can always override the contents of this configuration file, and the default hardcoded value, by using the environment variable `SOURCE_HIGHLIGHT_DATADIR'.  File: source-highlight.info, Node: Notes on some languages, Next: Using source-highlight as a simple formatter, Prev: The program source-highlight-settings, Up: Introduction 1.3 Notes on some languages =========================== In this section I'd like to go into details on the highlighting of some specific programming languages. These notes might be useful when the highlighted language has some "dialects" that might require some further specification at the command line (e.g., to select a specific dialect). * Menu: * Fortran:: * Perl::  File: source-highlight.info, Node: Fortran, Next: Perl, Prev: Notes on some languages, Up: Notes on some languages 1.3.1 Fortran ------------- As Toby White explained to me, Fortran comes into different "flavors": a fixed-format, where some characters have a different semantics depending on their column position in the source file, and a free-format where this is not true. For instance, in the former, `*' and `c' start a command line, but only if they are specified in the first column (while this is not true in the free-format). By default, the free-format is assumed for Fortran files; if you want to use the fixed-format, you need to specify `fortran-fixed' at the `--src-lang' command line option.  File: source-highlight.info, Node: Perl, Prev: Fortran, Up: Notes on some languages 1.3.2 Perl ---------- Perl syntax forms, especially its regular expression specifications, are quite a nightmare ;-) I tried to specify as much as possible in the `perl.lang' but some particular regular expressions might not be highlighted correctly. Actually, I never programmed in Perl, so, if you see that some parts of your Perl programs are not highlighted correctly, please do not hesitate to contact me, so that I can improve Perl highlighting. Moreover, although the standard extension for Perl files is `.pl', since the Prolog language definition was implemented in source-highlight before Perl, this extension is assigned, by default, to Prolog files. However, you can use `--infer-lang' command line option, so that source-highlight can try to detect the language by inspecting the first lines of the input file (*note How the input language is discovered::); you can also use `--src-lang=perl' command line specification to explicitly require Perl highlighting.  File: source-highlight.info, Node: Using source-highlight as a simple formatter, Next: Related Software and Links, Prev: Notes on some languages, Up: Introduction 1.4 Using source-highlight as a simple formatter ================================================ You can also use source-highlight as a simple formatter of input file, i.e., without performing any highlighting(1). You can achieve this by using, as the language definition file for input sources the file `nohilite.lang', using the command line option `--lang-def' (*note Invoking source-highlight::). Since that language definition is empty, no highlighting will be performed; however, source-highlight will transform the input file in the output format. Note, in the input language associations in *note Supported languages::, that `nohilite.lang' is also associated to txt files. This, for instance, makes source-highlight useful in cases you want to transform a text file into HTML or LaTeX. During the output, in fact, source-highlight will correctly generate characters that have a specific meanings in the output format. For instance, in this Texinfo manual, if I want to insert a @ or a { I have to "escape" them to make them appear literally since they have a special meaning in Texinfo. The same holds, e.g., for `<', `>' or `&' in HTML. If you use source-highlight, it will take care of this, automatically for you. This is the Texinfo source of the above sentence: For instance, in this Texinfo manual, if I want to insert a @@ or a @{ I have to ``escape'' them to make them appear literally since they have a special meaning in Texinfo. The same holds, e.g., for @code{<}, @code{>} or @code{&} in HTML. If you use source-highlight, it will take care of this, automatically for you. This was processed by source-highlight as a simple text file, without no highlighting; however since it was formatted in Texinfo, all the necessary escaping was automatically performed. This way, it is very easy to insert, in the same document, a code, and its result (as in this example). This is actually the formatting performed by source-highlight; except for the comment, this is basically what you should have written yourself to do all the escaping stuff manually: @c Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite @example For instance, in this Texinfo manual, if I want to insert a @@@@ or a @@@{ I have to ``escape'' them to make them appear literally since they have a special meaning in Texinfo. The same holds, e.g., for @@code@{<@}, @@code@{>@} or @@code@{&@} in HTML. If you use source-highlight, it will take care of this, automatically for you. @end example In case source-highlight does not handle a specific input language, you can still use the option `--failsafe' (*note Invoking source-highlight::) and also in that case no highlighting will be performed, but source-highlight will transform the input file in the output format. Note, however, that if the input language cannot be established, the `default.lang' will be used: an empty language definition file which you might want to customize. ---------- Footnotes ---------- (1) Although this might have been achieved with previous version, it is an official supported feature since version 2.5.  File: source-highlight.info, Node: Related Software and Links, Prev: Using source-highlight as a simple formatter, Up: Introduction 1.5 Related Software and Links ============================== Here we list some software related to source-highlight in the sense that it uses it as a backend (i.e., provides an interface to source-highlight) or it uses some of its features (e.g., definition files): * Source-highlight-qt is a library for performing syntax highlighting in Qt documents by relying on GNU Source-Highlight library. This library provides an implementation of the qt abstract class QSyntaxHighlighter class, and it deals both with Qt3 and Qt4. `http://srchiliteqt.sourceforge.net'. * QSource-Highlight is a Qt4 front-end for GNU Source-Highlight (it relies on the library Source-Highlight-Qt). You can highlight your code on the fly, and have the highlighted output in all the formats supported by source-highlight (e.g., HTML, LaTeX, Texinfo, etc.). You can then copy the formatted output and paste it (e.g., in your blog), or save it to a file. A preview of the highlighted output is available for some output formats (e.g., HTML, XHTML, etc.). `http://qsrchilite.sourceforge.net'. * SourceHighlightIDE is a small IDE (based on Qt4 and Source-highlight-qt) I wrote for developing and debugging new language definitions for source-highlight: `http://srchighliteide.sourceforge.net'. * Martin Gebert implemented a KDE interface to source-highlight programs (and he did a wonderful job!), and it is called _Ksrc2highlight_; if you want to test it: `http://www.mgebert.de/Ksrc2highlight'. * There's also a Java version of java2html, you can find it at `http://www.generationjava.com/projects/Java2Html.shtml'. * This web site provides a web interface to source-highlight so that you can highlight your code on-line: `http://www.alaide.com/outils_colorsyntaxe.php' * SHJS is a JavaScript program that highlights source code passages in HTML documents. Documents using SHJS are highlighted on the client side by the web browser. SHJS uses language definitions from Source-highlight. `http://shjs.sourceforge.net' * Code2blog is a pyGTK front-end to source-highlight for easy conversion from source code to HTML. `http://code.google.com/p/code2blog' * Andy Buckley wrote a wrapper around source-highlight, which can be used as an Apache filter to highlight source code in Web pages on the fly. `http://www.insectnation.org/projects/filter-src-highlight' * Roger Nilsson wrote a frontend for source-highlight that is used in a popular webdesign app for OSX called RapidWeaver. The frontend is called High-Light and allows users to easily add syntax-colored code inside RapidWeaver. `http://nilrogsplace.se/webdesign/rapidweaver/plugins/high-light/index_en.html' * Mauricio Zepeda published in his blog an article with a script to automatically highlight a file and show it in Firefox: `http://chillorb.com/?p=122' * Jason Blevins made a plugin for Ikiwiki that enables syntax highlighting of source code fragments and whole files via source-highlight. `http://jblevins.org/projects/ikiwiki/code' * Pascal Bleser created a PHP extension that uses the GNU source-highlight library directly from PHP, instead of relying on spawning a process or using the source-highlight CGI. `http://code.google.com/p/php-source-highlight/' * Roberto Alsina made a partial python binding using SIP so that you can use Source-Highlight-Qt in PyQt programs. `http://marave.googlecode.com/svn/trunk/marave/highlight/' * A perl binding for source-highlight is available at CPAN: `http://search.cpan.org/perldoc?Syntax::SourceHighlight' * Danijel Tasov wrote a pastebin service based on perl source-highlight binding: `http://pb.rbfh.de'  File: source-highlight.info, Node: Installation, Next: Copying, Prev: Introduction, Up: Top 2 Installation ************** See the file `INSTALL' for detailed building and installation instructions; anyway if you're used to compiling Linux software that comes with sources you may simply follow the usual procedure, i.e., untar the file you downloaded in a directory and then: cd <source code main directory> ./configure make make install We strongly suggest to use shadow builds, thus, create a build directory, say `build' and run configuration and make in that directory: cd <source code main directory> mkdir build cd build ../configure make make install However, before you do this, please check that you have everything that is needed to build source-highlight, *note What you need to build source-highlight::. Note: unless you specify a different install directory by `--prefix' option of configure (e.g. `./configure --prefix=<your home>'), you must be root to run `make install'. You may want to run `./configure --help' to see all the possible options that can be passed to the configuration script. Files will be installed in the following directories: `Executables' `prefix/bin' `docs and output examples' `prefix/share/doc/source-highlight' `library examples' `prefix/share/doc/source-highlight/examples' `library API documentation' `prefix/share/doc/source-highlight/api' `conf files' `prefix/share/source-highlight' Default value for prefix is `/usr/local' but you may change it with `--prefix' option to configure. For further `configure' options, you can run `configure --help'. Tiziano Muller wrote a bash completion configuration file for source-highlight; this will be installed by default in the directory `sysconfdir/bash_completion.d', where `sysconfdir' defaults to `prefix/etc'; however, typically, the directory where the bash completion script searches for configuration file is `/etc/bash_completion.d'. Thus, we suggest you explicitly specify this directory with the configuration script command line option `--with-bash-completion'. If you want to build and install the API documentation of Source-highlight library, you need to run `configure' with the option `--with-doxygen', but you need the program _Doxygen_, `http://www.doxygen.org', to build the documentation. The documentation will be installed in the following directory: `Library API documentation' `prefix/share/doc/source-highlight/api' NOTE: Originally, instead of Source-highlight, there were two separate programs, namely _GNU java2html_ and _GNU cpp2html_. There are two shell scripts with the same name that will be installed together with Source-highlight in order to facilitate the migration (however their use is not advised and it is deprecated). * Menu: * Building with qmake:: * Download:: * Anonymous Git Checkout:: * What you need to build source-highlight:: * Tips on installing Boost Regex library:: * Patching from a previous version:: * Using source-highlight with less:: * Using source-highlight as a CGI:: * Building .rpm::  File: source-highlight.info, Node: Building with qmake, Next: Download, Prev: Installation, Up: Installation 2.1 Building with qmake ======================= Since version 3.1.2, Source-highlight can be built also using `qmake', the build tool from Qt libraries (`http://qt.nokia.com'). This was made available to build Source-highlight on Windows based systems without using a Unix shell, and in particular to build Source-highlight with Microsoft MSVC compiler. You should use this method only if you don't have a Unix shell or if you really need to use the MSVC compiler (e.g., if you want to build Source-highlight library to be used in MSVC based programs). You still need the boost regex library, and if you use MSVC, you can find installation packages for this library at `http://www.boostpro.com'. This build mechanism is still experimental, and, when using MSVC, only a static version of Source-highlight library can be built (not a .dll). You can also use this method if you have the MinGW compiler, `http://www.mingw.org', (e.g., the one that comes with Qt Windows distribution) and you don't have Msys (`http://www.mingw.org/wiki/MSYS'). Otherwise, you should still use the `configure' based mechanims. Using `qmake', only a few options can be specified during the building (besides the ones you usually use with qmake), and these options can be specified only using environment variables: `BOOST_REGEX' By default, `boost_regex' will be used to link the boost library (i.e., `-lboost_regex'); if your boost regex library has a different name you must specify this name using this environment variable; e.g., if the library file is called `libboost_regex-mt.lib' or `boost_regex-mt.dll' you must set this variable to `boost_regex-mt'. `INCPATH' Specify the path of the boost header files. `LIBS' Specify the path of the boost lib files. Please, take into consideration that specifying the boost library include and library paths is completely up to you, using `INCPATH' and `LIBS', if they're not in the system path directories. Also remember to always use the option `-recursive' when running qmake. If you then want to run `make install', you can use the variable `INSTALL_ROOT' to prefix the installation path, which, otherwise, is the root directory.  File: source-highlight.info, Node: Download, Next: Anonymous Git Checkout, Prev: Building with qmake, Up: Installation 2.2 Download ============ You can download it from GNU's ftp site: `ftp://ftp.gnu.org/gnu/src-highlite' or from one of its mirrors (see `http://www.gnu.org/prep/ftp.html'). I do not distribute Windows binaries anymore; since, they can be built by using Cygnus C/C++ compiler, available at `http://www.cygwin.com'. However, if you don't feel like downloading such compiler or you experience problems with the Boost Regex library (see also *note Tips on installing Boost Regex library::; please also keep in mind that if you don't have these libraries installed, and your C/C++ compiler distribution does not provide a prebuilt package, it might take some time, even hours, to build the Boost libraries from sources), you can request such binaries directly to me, by e-mail (find my e-mail at my home page) and I'll be happy to send them to you. An MS-Windows port of Source-highlight is available from `http://gnuwin32.sourceforge.net'; however, I don't maintain those binaries personally, and they might be out of date. Archives are digitally signed by me (Lorenzo Bettini) with GNU gpg (`http://www.gnupg.org'). My GPG public key can be found at my home page (`http://www.lorenzobettini.it'). You can also get the patches, if they are available for a particular release (see below for patching from a previous version).  File: source-highlight.info, Node: Anonymous Git Checkout, Next: What you need to build source-highlight, Prev: Download, Up: Installation 2.3 Anonymous Git Checkout ========================== This project's git repository can be checked out through the following clone instruction(1): git clone git://git.savannah.gnu.org/src-highlite.git Further instructions can be found at the address: `http://savannah.gnu.org/projects/src-highlite'. And the git repository can also browsed on-line at `http://git.savannah.gnu.org/cgit/src-highlite.git'. Please note that this way you will get the latest development sources of Source-highlight, which may also be unstable. This solution is the best if you intend to correct/extend this program: you should send me patches against the latest git repository sources. If, on the contrary, you want to get the sources of a given release, through git, say, e.g., version X.Y.Z, you must specify the tag `rel_X_Y_Z'. When you compile the sources that you get from the git repository, before running the `configure' and `make' commands, for the first time, you must run the command: autoreconf -i This will run the autotools commands in the correct order, and also copy possibly missing files. You should have installed recent versions of `automake', `autoconf' and `libtool' in order for this to succeed. We strongly suggest to use shadow builds, thus, create a build directory, say `build' and run configuration and make in that directory: cd <source code main directory> mkdir build cd build ../configure make make install To summarize, the steps to get the sources from git and make the first build are: git clone git://git.savannah.gnu.org/src-highlite.git cd src-highlite autoreconf -i mkdir build cd build ../configure make ---------- Footnotes ---------- (1) Since version 3.1.2 of Source-highlight the CVS repository was dismissed in favor of Git (`http://git-scm.com/').  File: source-highlight.info, Node: What you need to build source-highlight, Next: Tips on installing Boost Regex library, Prev: Anonymous Git Checkout, Up: Installation 2.4 What you need to build source-highlight =========================================== Since version 2.0 Source-highlight relies on regular expressions as provided by boost (`http://www.boost.org'), so you need to install at least the regex library from boost. Most GNU/Linux distributions provide this library already in a compiled form. If you use your distribution packages, please be sure to install also the development package of the boost libraries. If you experience problems in installing Boost Regex library, or in compiling source-highlight because of this library, please take a look at *note Tips on installing Boost Regex library::. If you want to use a specific version of the Boost regex library (because you have many versions of it), you can use the configure option `--with-boost-regex' to specify a particular suffix. For instance, ./configure --with-boost-regex=boost_regex-gcc-1_31 Source-highlight has been developed under GNU/Linux, using gcc (C++), and bison (yacc) and flex (lex), and ported under Win32 with Cygwin C/C++compiler, available at `http://www.cygwin.com'. I use the excellent GNU Autoconf(1), GNU Automake(2) and GNU Libtool(3). Since version 2.6 I also started to use Gnulib - The GNU Portability Library(4), "a central location for common GNU code, intended to be shared among GNU packages" (for instance, I rely on Gnulib for checking for the presence and correctness of `getopt_long' function). Finally I used _GNU gengetopt_ (`http://www.gnu.org/software/gengetopt'), for command line parsing. I started to use also _doublecpp_ (`http://doublecpp.sourceforge.net') that permits achieving dynamic overloading. Actually, apart from the boost regex library, you don't need the other tools above to build source-highlight (indeed I provide the output sources generated by the above mentioned tools), unless you want to develop source-highlight. However, if you obtained sources through Git, you need some other tools, see *note Anonymous Git Checkout::. ---------- Footnotes ---------- (1) `http://www.gnu.org/software/autoconf' (2) `http://www.gnu.org/software/automake' (3) `http://www.gnu.org/software/libtool' (4) `http://www.gnu.org/software/gnulib'  File: source-highlight.info, Node: Tips on installing Boost Regex library, Next: Patching from a previous version, Prev: What you need to build source-highlight, Up: Installation 2.5 Tips on installing Boost Regex library ========================================== If you experience no problem in compiling source-highlight, you can happily skip this section(1) :-) I created this section because many users reported some problems after installing Boost Regex library from sources; other users had problems in compiling source-highlight even if this library was already correctly installed (especially windows users, using cygwin). I hope this section sheds some light in installing/using the Boost Regex library. Please, note that this section does not explain how to compile the Boost libraries (the documentation you'll find on `http://www.boost.org' is well done); it explains how to tweak things if you have problems in compiling source-highlight even after a successful installation of Boost libraries. First of all, if your distribution provides packages for the Boost regex library, please be sure to install also the development package of the boost libraries, i.e., those providing also the header files needed to compile a program using these libraries. For instance, on my Debian system I had to install the package `libboost-regex-dev', besides the package `libboost-regex'. If your distribution does not provide these packages then you have to download the sources of Boost libraries from `http://www.boost.org' and follow the instructions for compilation and installation. However, I suggest you specify `/usr' as prefix for installation, instead of relying on the default prefix `/usr/local' (unless `/usr/local/include' is already in the inclusion path of your C++ compiler), since this will make things easier when compiling source-highlight. I suggest this, since `/usr/include' is usually the place where C++ searches for header files during compilation. If you successfully compiled and installed the Boost Regex library, or you installed the package from your distribution, but you STILL experience problems in compiling source-highlight, then you simply have to adjust some things as described in the following. If the `./configure' command of source-highlight reports this error: ERROR! Boost::regex library not installed. then, the compiler cannot find the header files for this library. In this case, check that the directory `/usr/include/boost' actually exists; if it does not, then probably you'll find a similar directory, e.g., `/usr/include/boost-1_33/boost', depending on the version of the library you have installed. Then, all you have to do is to create a symbolic link as follows: ln -s /usr/include/boost-1_33/boost /usr/include/boost Alternatively, you might run source-highlight's configure as follows: ./configure CXXFLAGS=-I/usr/include/boost-1_33/ If you install (or build) the Boost Regex library in a non standard path, e.g., somewhere in your home directory, say `/home/myhome/boost-1_33', you'll have to update the `CXXFLAGS' variable accordingly on the `configure' command line; in this particular case, you might also have to specify the path of actual library files (`CXXFLAGS' will only specify the path of header files). In particular, you'll have to know where the lib files are within the boost installation (or build directory); for instance, if they are in `/home/myhome/boost-1_33/stage/lib', while the header files (i.e., the `boost' header files directory) are in `/home/myhome/boost-1_33', the complete `configure' command should be ./configure CXXFLAGS=-I/home/myhome/boost-1_33 \ LDFLAGS=-L/home/myhome/boost-1_33/stage/lib If then `./configure' command of source-highlight reports this other error: ERROR! Boost::regex library is installed, but you must specify the suffix with --with-boost-regex at configure for instance, --with-boost-regex=boost_regex-gcc-1_31 then, there's still another thing to fix: you must find out the exact names of the files of your installed Boost Regex libraries; you can do this by using the command: $ ls -l /usr/lib/libboost_regex* that, for instance, on one of my cygwin installation reports: -rwxr-x---+ Nov 9 23:29 /usr/lib/libboost_regex-gcc-mt-s-1_33.a -rwxr-x---+ Nov 22 09:22 /usr/lib/libboost_regex-gcc-mt-s.a -rwxr-x---+ Nov 9 23:29 /usr/lib/libboost_regex-gcc-mt-s-1_33.so -rwxr-x---+ Nov 22 09:22 /usr/lib/libboost_regex-gcc-mt-s.so Now, you have all the information to correctly run the source-highlight's configure command: ./configure --with-boost-regex=boost_regex-gcc-mt-s-1_33 or, if you solved the first problem in the second way(2), ./configure CXXFLAGS=-I/usr/include/boost-1_33/ \ --with-boost-regex=boost_regex-gcc-mt-s-1_33 Of course, you have to modify this command according to the names of your Boost Regex library installed files. These instructions managed to let many users, who were experiencing problems, to compile source-highlight If you still have problems, please send me an e-mail. ---------- Footnotes ---------- (1) Since version 2.11, the `configure' script should be able to correctly find the boost regex library if it is in the compiler default path. (2) Command lines that are too long are split into multiple indented lines separated by a `\'. Of course these commands are to be given in one line only, anyway.  File: source-highlight.info, Node: Patching from a previous version, Next: Using source-highlight with less, Prev: Tips on installing Boost Regex library, Up: Installation 2.6 Patching from a previous version ==================================== If you downloaded a patch, say `source-highlight-1.3-1.3.1-patch.gz' (i.e., the patch to go from version 1.3 to version 1.3.1), cd to the directory with sources from the previous version (source-highlight-1.3) and type: gunzip -cd ../source-highlight-1.3-1.3.1.patch.gz | patch -p1 and restart the compilation process (if you had already run configure a simple make should do).  File: source-highlight.info, Node: Using source-highlight with less, Next: Using source-highlight as a CGI, Prev: Patching from a previous version, Up: Installation 2.7 Using source-highlight with less ==================================== This was suggested by Konstantine Serebriany. The script `src-hilite-lesspipe.sh' will be installed together with source-highlight. You can use the following environment variables: export LESSOPEN="| /path/to/src-hilite-lesspipe.sh %s" export LESS=' -R ' This way, when you use less to browse a file, if it is a source file handled by source-highlight, it will be automatically highlighted.  File: source-highlight.info, Node: Using source-highlight as a CGI, Next: Building .rpm, Prev: Using source-highlight with less, Up: Installation 2.8 Using source-highlight as a CGI =================================== CGI support was enabled thanks to Robert Wetzel; I haven't tested it personally. If you want to use source-highlight as a CGI program, you have to use the executable source-highlight-cgi. You can build such executable by issuing make source-highlight-cgi in the `src' directory.  File: source-highlight.info, Node: Building .rpm, Prev: Using source-highlight as a CGI, Up: Installation 2.9 Building .rpm ================= Christian W. Zuckschwerdt added support for building an .rpm and an .rpm.src. You can issue the following command rpmbuild -tb source-highlight-3.1.6.tar.gz for building an .rpm with binaries and rpmbuild -ts source-highlight-3.1.6.tar.gz for building an .rpm.src with sources.  File: source-highlight.info, Node: Copying, Next: Simple Usage, Prev: Installation, Up: Top 3 Copying Conditions ******************** GNU Source-highlight is free software; you are free to use, share and modify it under the terms of the GNU General Public License that accompanies this software (see `COPYING'). GNU `source-highlight' was written and maintained by Lorenzo Bettini `http://www.lorenzobettini.it'.  File: source-highlight.info, Node: Simple Usage, Next: Configuration files, Prev: Copying, Up: Top 4 Simple Usage ************** Here are some realistic examples of running `source-highlight'(1). Source-highlight only does a lexical analysis of the source code, so the program source is assumed to be correct! Here's how to run source-highlight (for this example we will use C/C++ input files, but this is valid also for other source-highlight input languages): source-highlight --src-lang cpp --out-format html \ --input <C++ FILE> \ --output <HTML FILE> \ --style-file <STYLE FILE> \ OPTIONS For input files, apart from the `-i (--input)' option and the standard input redirection, you can simply specify some files at the command line and also use regular expressions (for instance `*.java'). In this case the name for the output files will be formed using the name of the source file with a .<ext> appended, where <ext> is the extension chosen according to the output format specified (in this example it would be .html). The style file (*note Output format style::) contains information on how to format specific language parts (e.g., keywords in blue and boldface, etc.). IMPORTANT: you must choose one of the above two invocation modes: either you use `-i (--input)', `-o (--output)' (possibly replacing them with standard input/output redirection), or you specify one or many files without `-i (--input)'; if you try to mix them you'll get an error: source-highlight -o main.html main.cpp Please, use one of the two syntaxes for invocation: source-highlight [OPTIONS]... -i input_file -o output_file source-highlight [OPTIONS]... [FILES]... If `STDOUT' string is passed as `-o (--output)' option, then the output is forced to the standard output anyway. If `-s (--src-lang)' is not specified, the source language is inferred by the extension of the input file or from the file name itself (possibly using also lower case versions); this, of course, does not work with standard input redirection. For further details, see *note How the input language is discovered::. If `-f (--out-format)' is not specified, the output will be produced in HTML. If `--style-file' is not specified, the `default.style', which is included in the distribution, will be used (see *note Output format style:: for further information). * Menu: * HTML and XHTML output:: * LaTeX output:: * Texinfo output:: * DocBook output:: * ANSI color escape sequences:: * Odf output:: ---------- Footnotes ---------- (1) Command lines that are too long are split into multiple indented lines separated by a `\'. Of course these commands are to be given in one line only, anyway.  File: source-highlight.info, Node: HTML and XHTML output, Next: LaTeX output, Prev: Simple Usage, Up: Simple Usage 4.1 HTML and XHTML output ========================= The default output format for HTML and XHTML uses fixed width fonts by inserting all the formatted output between `<tt>' and `</tt>'. Thus, for instance, specification for fixed width and not fixed width (see *note Output format style::) will have no effect: every character will have fixed width. If you don't like this default behavior and would like to have not fixed fonts by default (as it happens, e.g., with LaTeX output) you can use the file `html_notfixed.outlang' with the command line argument `--outlang-def'. For XHTML output, the corresponding file is `xhtml_notfixed.outlang' Furthermore, the file `htmltable.outlang' can be used to generate HTML output enclosed in an HTML table (which will use also a background color if specified in the style file). The file `xhtmltable.outlang' does the same but for XHTML output.  File: source-highlight.info, Node: LaTeX output, Next: Texinfo output, Prev: HTML and XHTML output, Up: Simple Usage 4.2 LaTeX output ================ When using LaTeX output format you can choose between monochromatic output (by using `-f latex') or colored output (by using `-f latexcolor'). When using colored output, you need the `color' package (again this should be present in your system). Of course, you are free to define your own LaTeX output format, see *note Output Language Definitions::.  File: source-highlight.info, Node: Texinfo output, Next: DocBook output, Prev: LaTeX output, Up: Simple Usage 4.3 Texinfo output ================== When using the Texinfo output format, you may want to use a dedicated style file, `texinfo.style', which comes with the source-highlight distribution, with the option `--style-file'. For instance, the example in *note Examples:: is formatted with this style file.  File: source-highlight.info, Node: DocBook output, Next: ANSI color escape sequences, Prev: Texinfo output, Up: Simple Usage 4.4 DocBook output ================== DocBook output is generated using the `<programlisting>' tag. If the `--doc' command line option is given, an `<article>' document is generated.  File: source-highlight.info, Node: ANSI color escape sequences, Next: Odf output, Prev: DocBook output, Up: Simple Usage 4.5 ANSI color escape sequences =============================== If you're using this output format, for instance together with `less' (see *note Using source-highlight with less::), you may want to use the `esc.style', which comes with the source-highlight distribution, with the option `--style-file'. This should result in a more pleasant coloring output.  File: source-highlight.info, Node: Odf output, Prev: ANSI color escape sequences, Up: Simple Usage 4.6 Odf output ============== The ODF language output for GNU source-highlight enables the user to generate color-highlighted ODF output of source code files. Or to generate ODF color-highlighted snippets to be used by ODF back-ends (like asciidoc-odf). We create an `.fodt' file, which is a Text document that newer versions of LibreOffice can open.  File: source-highlight.info, Node: Configuration files, Next: Invoking source-highlight, Prev: Simple Usage, Up: Top 5 Configuration files ********************* During execution, source-highlight needs some files where it finds directives on how to recognize the source language (if not specified explicitly with `--src-lang' or `--lang-def'), on which output format to use (if not specified explicitly with `--out-format' or `--outlang-def'), on how to format specific source elements (e.g., keywords, comments, etc.), and source and output language definitions. These files will be explained in the next sections. If the directory for such files is not explicitly specified with the command line option `--data-dir', these files are searched for in the following order: * the current directory; * the installation directory for conf files, see *note Installation:: (please keep in mind that this directory is hard-coded into source-highlight during compilation). * if the source-highlight command is specified with an explicit path name, the installation directory name is still used, but relative to the explicit path name. In particular, the user can set the value also with the environment variable `SOURCE_HIGHLIGHT_DATADIR' (see also *note The program source-highlight-settings::). If you want to be sure about which file is used during the execution, you can use the command line option `--verbose'. * Menu: * Output format style:: * Output format style using CSS:: * Default Styles:: * Language map:: * Language definition files:: * Output Language map:: * Output Language definition files:: * Developing your own definition files::  File: source-highlight.info, Node: Output format style, Next: Output format style using CSS, Prev: Configuration files, Up: Configuration files 5.1 Output format style ======================= You must specify your options for syntax highlighting in the file `default.style'(1). You can specify formatting options for each element defined by a language definition file (you can get the list of such elements, by using `--show-lang-elements', see *note Listing Language Elements::). Since version 2.6, you can also specify the background color for the output document, using the keyword `bgcolor' (this might be visible only when the `--doc' command line option is used). If many elements share the same formatting options, you can specify these elements in the same line, separated by a comma(2). Here's the `default.style' that comes with this distribution (this is formatted by using the `style.lang' that is shown in *note Tutorials on Language Definitions::): bgcolor "white"; // the background color for documents context gray; // the color for context lines (when specified with line ranges) keyword blue b ; // for language keywords type darkgreen ; // for basic types usertype teal ; // for user defined types string red f ; // for strings and chars regexp orange f ; // for strings and chars specialchar pink f ; // for special chars, e.g., \n, \t, \\ comment brown i, noref; // for comments number purple ; // for literal numbers preproc darkblue b ; // for preproc directives (e.g. #include, import) symbol darkred ; // for simbols (e.g. <, >, +) function black b; // for function calls and declarations cbracket red; // for block brackets (e.g. {, }) todo bg:cyan b; // for TODO and FIXME code bg:brightgreen b; // for code snippets //Predefined variables and functions (for instance glsl) predef_var darkblue ; predef_func darkblue b ; // for OOP classname teal ; // for class names, e.g., in Java and C++ // line numbers linenum black f; // Internet related url blue u, f; // other elements for ChangeLog and Log files date blue b ; time, file darkblue b ; ip, name darkgreen ; // for Prolog, Perl... variable darkgreen ; // explicit for Latex italics darkgreen i; bold darkgreen b; underline darkgreen u; fixed green f; argument darkgreen; optionalargument purple; math orange; bibtex blue; // for diffs oldfile orange; newfile darkgreen; difflines blue; // for css selector purple; property blue; value darkgreen i; // for oz atom orange; meta i; // for file system path orange; // for C (or other language) labels label teal b; // for errors error purple; warning darkgreen; This file tries to define a style for most elements defined in the language definition files that comes with Source-highlight distribution. You can specify your own file (it doesn't have to be named `default.style') with the command line option `--style-file'(3), see *note Invoking source-highlight::. You can also specify the color of normal text by adding this line normal darkblue ; As you might see the syntax of this file is quite straightforward: after the element (or elements, separated by commas) you can specify the color, and the background color(4) by using the prefix `bg:' (for instance, in the `default.style' above the background color is specified for the `todo' element). Note that the background color might not be available for all output formats: it is available for XHTML and LaTeX but not for HTML(5). Then, you can specify further formatting options such as bold, italics, etc.; these are the keywords that can be used: b = bold i = italics u = underline f = fixed nf = not fixed noref = no reference information is generated for these elements Since version 2.2, the color specification is not required. For instance, the `texinfo.style' is as follows (we avoid colors for Texinfo outputs): keyword, type b ; variable f, i ; string f ; regexp f ; comment nf, i, noref ; preproc b ; // line numbers linenum f; // Internet related url f; // for diffs oldfile, newfile i; difflines b; // for css selector, property b; value i; You may also specify more than on of these options separated by commas, e.g. keyword blue u, b ; Please keep in mind that in this case the order of these specified options is kept during the generation of the output; for instance, depending on the specific output format, the sequences `u, b' and `b, u' may lead to different results. In particular, the style that comes first is used after the ones that follow. For instance, in the case of HTML, the sequence `u, b' will lead to the following formatting: `<u><b>...</b></u>'. The `noref' option specifies that for this element reference information are not generated (see *note Generating References::). For instance, this is used for the `comment' element, since we do not want that elements in a comment are searched for cross-references. These are all possible color logical names handled by source-highlight(6): black red darkred brown yellow cyan blue pink purple orange brightorange green brightgreen darkgreen teal gray darkblue white You can also use the direct color scheme for the specific output format, by using double quotes, such as, e.g., `"#00FF00"' in HTML(7) or even string colors in double quotes(8), such as `"lightblue"'. Of course, the double quotes will be discarded during the generation. For instance, this is the `syslog.style' used in the `tests' directory. This uses direct color schemes. date, keyword yellow b ; time "#9999FF" ; ip "lightblue" b ; type cyan b ; string "brown" b ; comment teal ; number red ; preproc cyan ; symbol green ; function "#CC66CC" b ; cbracket green b ; twonumbers green b ; port green b ; webmethod teal ; // foo option foo red b ; // foo entry Note that, if you use direct color schemes, source-highlight will perform no transformation, and will output exactly the color scheme you specified. For instance, the specification `"brown"' is different from `brown': the former will be output as it is, while the latter will be translated in the corresponding color of the output format (for HTML the visible result is likely to be the same). It is up to you to specify a color scheme string that is handled by the specific output format. Thus, direct color schemes might not be portable in different output formats; for instance, `"#00FF00"' is valid in HTML but not in LaTeX. ---------- Footnotes ---------- (1) Before version 2.1, this file was called `tags.j2h' which used to be a very obscure name. I hope this name convention is a better one :-). (2) Since version 2.6. (3) Before version 2.1, this command line option was called `--tags-file' which used to be a very obscure name. I hope this name convention is a better one :-). (4) Since version 2.6. (5) Of course, if you use HTML and an external CSS file you will achieve the same result. (6) You can see these colors in HTML in the file `colors.html'. (7) Note that, since version 2.2, you must use double quotes. (8) Since version 2.6.  File: source-highlight.info, Node: Output format style using CSS, Next: Default Styles, Prev: Output format style, Up: Configuration files 5.2 Output format style using CSS ================================= Since version 2.6 you can specify the output format style also using a limited CSS syntax. Please, note that this has nothing to do with output produced by source-highlight using the `--css' option. By using a CSS file as the style file (i.e., passing it to the `--style-css-file' command line option) you will only specify the output format style using the same syntax of CSS. This means that you can use a css syntax for specifying the output format style independently from the actual output (this is what the output format style is for). Thus, you can use a css file as the output format style also for LaTeX output (just like you would do with a source-highlight output format style, *note Output format style::). This feature is provided basically for code re-use: you can specify the output format style using a css file, and then re-use the same css file as the actual style sheet of other HTML pages (or even output files produced by source-highlight using the `--css' option). Note that this feature is quite primordial, so only a limited subset of CSS syntax is recognized. In particular, selectors are always intended as CSS class selectors, so they must start with a dot. `/* */' comments are handled. Properties (and their values) not handled by source-highlight are simply (and silently) discarded). This is an example of CSS specification handled correctly by source-highlight as a style format specification: body { background-color: <color specification>; } .selector { color: <color specification>; background-color: <color specification>; font-weight: bold; /* this is a comment */ font-family: monospace; font-style: italic; text-decoration: underline; } Finally, this is the `default.css' that corresponds to `default.style' presented in *note Output format style::: body { background-color: white; } /* the color for context lines (when specified with line ranges) */ .context { color: gray; } .keyword { color: blue; font-weight: bold; } .type { color: darkgreen; } .usertype, .classname { color: teal; } .string { color: red; font-family: monospace; } .regexp { color: orange; } .specialchar { color: pink; font-family: monospace; } .comment { color: brown; font-style: italic; } .number { color: purple; } .preproc { color: darkblue; font-weight: bold; } .symbol { color: darkred; } .function { color: black; font-weight: bold; } .cbracket { color: red; } .todo { font-weight: bold; background-color: cyan; } /* line numbers */ .linenum { color: black; font-family: monospace; } /* Internet related */ .url { color: blue; text-decoration: underline; font-family: monospace; } /* other elements for ChangeLog and Log files */ .date { color: blue; font-weight: bold; } .time, .file { color: darkblue; font-weight: bold; } .ip, .name { color: darkgreen; } /* for Prolog, Perl */ .variable { color: darkgreen; } .italics { color: darkgreen; font-style: italic; } .bold { color: darkgreen; font-weight: bold; } /* for LaTeX */ .underline { color: darkgreen; text-decoration: underline; } .fixed { color: green; font-family: monospace; } .argument, .optionalargument { color: darkgreen; } .math { color: orange; } .bibtex { color: blue; } /* for diffs */ .oldfile { color: orange; } .newfile { color: darkgreen; } .difflines { color: blue; } /* for css */ .selector { color: purple; } .property { color: blue; } .value { color: darkgreen; font-style: italic; } /* for Oz */ .atom { color: orange; } .meta { font-style: italic; } If you pass this file to the `--style-css-file' command line option and you produce an output file, you will get the same result of using `default.style'. Source-highlight comes with a lot of CSS files that can be used either as standard CSS files for HTML documents, or as style files to pass to `--style-css-file'. In the documentation installation directory (see *note Installation::) you will find the file `style_examples.html' which shows many output examples, each one with a different CSS style.  File: source-highlight.info, Node: Default Styles, Next: Language map, Prev: Output format style using CSS, Up: Configuration files 5.3 Default Styles ================== This file(1) (the default file is `style.defaults') lists the default style for a language element whose output style is not specified in the style file; in particular the following line (comment lines start with `#'): elem1 = elem2 tells that, if the style for an element, say elem1, is not specified in the style file, then elem1 will have the same style of elem2. For instance, this is the `style.defaults' that comes with Source-highlight: # defaults for styles # the format is: # elem1 = elem2 # meaning that if the style for elem1 is not specified, # then it will have the same style as elem2 classname = normal usertype = normal preproc = keyword section = function paren = cbracket attribute = type value = string predef_var = type predef_func = function atom = regexp meta = function path = regexp label = preproc error = string warning = type code = preproc In this case the style for the element `preproc' will default to the style of the element `keyword'. This file is useful when you want to create your own style file and you don't want to specify styles for all the elements that will have the same output style in your style (e.g., the default style formats `preproc' elements differently from keywords, but if in your style you don't specify a style for it, a `preproc' element will still be formatted as a `keyword'). ---------- Footnotes ---------- (1) Since version 2.9.  File: source-highlight.info, Node: Language map, Next: Language definition files, Prev: Default Styles, Up: Configuration files 5.4 Language map ================ This configuration file associates a file extension to a specific language definition file. You can also use such file extension to specify the `--src-lang' option (see *note Simple Usage::). Source-highlight comes with such a file, called `lang.map'. Of course, you can override the settings of this file by writing your own language map file and specify such file with the command line option `--lang-map'). Moreover, as explained above, if a file `lang.map' is present in the current directory, such version will be used. The format of such file is quite simple (comment lines start with `#'): extension = language definition file The default language definition file is shown in *note Introduction::.  File: source-highlight.info, Node: Language definition files, Next: Output Language map, Prev: Language map, Up: Configuration files 5.5 Language definition files ============================= These files are crucial for source-highlight since they specify the source elements that have to be highlighted. These files also allow to specify your own language definitions in order to deal with a language that is not handled by source-highlight(1). The syntax for these files is explained in *note Language Definitions::. ---------- Footnotes ---------- (1) This is the main difference introduced in version 2.0 with respect the previous version.  File: source-highlight.info, Node: Output Language map, Next: Output Language definition files, Prev: Language definition files, Up: Configuration files 5.6 Output Language map ======================= This configuration file associates an output format to a specific output language definition file. You can use the name of that output format to specify the `--out-format' option (see *note Simple Usage::). Source-highlight comes with such a file, called `outlang.map'. Of course, you can override the settings of this file by writing your own output language map file and specify such file with the command line option `--outlang-map'). Moreover, as explained above, if a file `outlang.map' is present in the current directory, such version will be used. The format of such file is quite simple: output format name = language definition file The default language definition file is shown in *note Introduction::. In particular, there is a convention for the output format name in the output language map: the one with `-css' suffix is the one used when `--css' command line option is given  File: source-highlight.info, Node: Output Language definition files, Next: Developing your own definition files, Prev: Output Language map, Up: Configuration files 5.7 Output Language definition files ==================================== These files are crucial for source-highlight since they specify how the source elements are highlighted. These files also allow to specify your own output format definitions in order to deal with an output format that is not handled by source-highlight(1). The syntax for these files is explained in *note Output Language Definitions::. These files are part of source-highlight distribution, but they can also be downloaded, independently, from here: `http://www.gnu.org/software/src-highlite/outlang_files/' ---------- Footnotes ---------- (1) This is the main difference introduced in version 2.1 with respect the the previous version.  File: source-highlight.info, Node: Developing your own definition files, Prev: Output Language definition files, Up: Configuration files 5.8 Developing your own definition files ======================================== I encourage those who write new language definitions or correct/modify existing language definitions to send them to me so that they can be added to the source-highlight distribution! Since these files require more explanations (that, however, are not necessary to the standard usage of source-highlight), they are carefully explained in separate parts: *note Language Definitions:: and *note Output Language Definitions::. These files are part of source-highlight distribution, but they can also be downloaded, independently, from here: `http://www.gnu.org/software/src-highlite/lang_files/'  File: source-highlight.info, Node: Invoking source-highlight, Next: Language Definitions, Prev: Configuration files, Up: Top 6 Invoking `source-highlight' ***************************** The format for running the `source-highlight' program is: source-highlight OPTION ... `source-highlight' supports the following options, shown by the output of `source-highlight --detailed-help': source-highlight Highlight the syntax of a source file (e.g. Java) into a specific format (e.g. HTML) Usage: [OPTIONS]... < input_file > output_file source-highlight [OPTIONS]... -i input_file -o output_file source-highlight [OPTIONS]... [FILES]... -h, --help Print help and exit --detailed-help Print help, including all details and hidden options, and exit -V, --version Print version and exit -i, --input=filename input file. default std input -o, --output=filename output file. default std output (when the third invocation form is used). If STDOUT is specified, the output is directed to standard output you can simply specify some files at the command line and also use regular expressions (for instance *.java). In this case the name for the output files will be formed using the name of the source file with a .<ext> appended, where <ext> is the extension chosen according to the output format specified (for instance .html). -s, --src-lang=STRING source language (use --lang-list to get the complete list). If not specified, the source language will be guessed from the file extension. --lang-list list all the supported language and associated language definition file --outlang-list list all the supported output language and associated language definition file -f, --out-format=STRING output format (use --outlang-list to get the complete list) (default=`html') -d, --doc create an output file that can be used as a stand alone document (e.g., not to be included in another one) --no-doc cancel the --doc option even if it is implied (e.g., when css is given) -c, --css=filename the external style sheet filename. Implies --doc -T, --title=STRING give a title to the output document. Implies --doc -t, --tab=INT specify tab length. (default=`8') -H, --header=filename file to insert as header -F, --footer=filename file to insert as footer --style-file=filename specify the file containing format options (default=`default.style') --style-css-file=filename specify the file containing format options (in css syntax) --style-defaults=filename specify the file containing defaults for format options (default=`style.defaults') --outlang-def=filename output language definition file --outlang-map=filename output language map file (default=`outlang.map') --data-dir=path directory where language definition files and language maps are searched for. If not specified these files are searched for in the current directory and in the data dir installation directory --output-dir=path output directory --lang-def=filename language definition file --lang-map=filename language map file (default=`lang.map') --show-lang-elements=filename prints the language elements that are defined in the language definition file --infer-lang force to infer source script language (overriding given language specification) Lines: -n, --line-number[=padding] number all output lines, using the specified padding character (default=`0') --line-number-ref[=prefix] number all output lines and generate an anchor, made of the specified prefix + the line number (default=`line') Filtering output: Mode: linerange specifying line ranges --line-range=STRING generate only the lines in the specified range(s) each range can be of the shape: single line (e.g., --line-range=50) full range (e.g., --line-range=2-10) partial range (e.g., --line-range=-30, first 30 lines, --line-range=40- from line 40 to the end --range-separator=STRING the optional separator to be printed among ranges (e.g., "...") --range-context=INT number of (context) lines generated even if not in range The optional --range-context specifies the number of lines that are not in range that will be printed anyway (before and after the lines in range); These lines will be formatted according to the "context" style. Mode: regexrange specifying regular expression delimited ranges --regex-range=STRING generate only the lines within the specified regular expressions when a line containing the specified regular expression is found, then the lines after this one are actually generated, until another line, containing the same regular expression is found (this last line is not generated). More than one regular expression can be specified. reference generation: --gen-references=STRING generate references (possible values="inline", "postline", "postdoc" default=`inline') --ctags-file=filename specify the file generated by ctags that will be used to generate references (default=`tags') --ctags=cmd how to run the ctags command. If this option is not specified, ctags will be executed with the default value. If it is specified with an empty string, ctags will not be executed at all (default=`ctags --excmd=n --tag-relative=yes') testing: -v, --verbose verbose mode on -q, --quiet print no progress information --binary-output write output files in binary mode This is useful for testing purposes, since you may want to make sure that output files are always generated with a final newline character only --statistics print some statistics (i.e., elapsed time) --gen-version put source-highlight version in the generated file (default=on) --check-lang=filename only check the correctness of a language definition file --check-outlang=filename only check the correctness of an output language definition file --failsafe if no language definition is found for the input, it is simply copied to the output -g, --debug-langdef[=type] debug a language definition. In dump mode just dumps all the steps; in interactive, at each step, waits for some input (press ENTER to step) (possible values="interactive", "dump" default=`dump') --show-regex=filename show the regular expression automaton corresponding to a language definition file Let us explain some options in details (apart from those that should be clear from the `--help' output itself, and those already explained in *note Simple Usage::). `--data-dir' Source-highlight, during the execution, will need some files, such as, e.g., language definition files, output format definition files, etc. These files are installed in `prefix/share/source-highlight' where `prefix' is chosen at compilation time (see *Note Installation::). Thus, source-highlight should be able to find all the files it needs independently. However, if you want to override this setting, e.g., because you have your own language definition files, or simply because you installed a possible source-highlight binary in a different directory from the one used during the compilation, you can use the command line option `--data-dir'. `--doc' `-d' If you want a stand alone output document (i.e., an output file that is not thought to be included in another document), specify this option (otherwise you just get some text that you can paste into another document). If you choose this option and do not provide a `--title', the your source file name will be used as the title. `--no-doc' The `--doc' option above is actually implied by other command line options (e.g., `--css'). If you do not want this (e.g., you want to include the output in an existing document containing the global style sheet), you can disable this by using `--no-doc'. `--css' `-c' Specify the style sheet file (e.g., a `.css' for HTML(1)) for the output document. Note that source-highlight will not use this file: it will simply use this file name when generating the output file, so to specify that the output file uses this file as the style sheet (e.g., if the generated HTML relies on this file as the CSS file). `--tab' `-t' With this options, tab characters will be converted into specified number of space characters (tabulation points will be preserved). This option is automatically selected when generating line numbers. `--style-file' `--style-css-file' Specify the file that source-highlight will use to produce (i.e., format) the output (e.g., colors and other styles for each language element). The formats of these files are detailed in *note Output format style:: and in *note Output format style using CSS::, respectively. `--style-defaults' Specify the file that contains the default styles for elements whose styles are not found in the style file (see *note Default Styles:: for further details). `--output-dir' You can pass to source-highlight more than one input file (see *note Simple Usage::). In this case you cannot specify the output file name. In such cases the output files will be automatically generated into the directory where you invoked the command from; if you want the output files to be generated into a different directory you can use this option. `--infer-lang' Force the inference mechanism for detecting the input language. This is detailed in *note How the input language is discovered::. `--line-number' Line numbers will be generated in the output, using the (optional) specified padding character(2) (the default padding character is `0'). `--line-number-ref' As `--line-number', this option numbers all the output lines, and, additionally, generates an anchor for each line. The anchor consists of the specified prefix (default is `line') and the line number (e.g., `line25'). For instance, as prefix, if you deal with many files, you can use the file name. Note that some output languages might not support this feature (e.g., `esc', since it makes no sense in such case). See *note Anchors and References:: for defining how to generate an anchor in a specific output language. `--line-range' `--range-context' `--range-separator' Since version 2.11, you can specify multiple line ranges: only the lines in the source that are in these ranges will be output. For instance, by specifying --line-range="-5","10","20-25","50-" Only the following lines will be output: the first 5 lines, line 10, lines 20 to 25 and from line 50 to the end of input. (See also the examples in *note Line ranges::). Together with `--line-range', you can also specify `--range-context': this is the number of lines that will be printed before and after the lines of a range (i.e., the surrounding "context"). These lines will not be highlighted: they will be printed according to the style `context'. For instance, extending the previous example, --line-range="-5","10","20-25","50-" --range-context=1 Also the following lines will be output: 6, 9, 11, 19, 26, 49. (See also the examples in *note Line ranges (with context)::). Finally, you can specify a range separator line string with `--range-separator' that will be printed between ranges (See also the examples in *note Line ranges (with context)::). The separator string is preformatted automatically, so, e.g., you don't have to escape special output characters, such as the { } in texinfo output. `--regex-range' Ranges can be expressed also using regular expressions, with the command line option `--regex-range'. In this case the beginning of the range will be detected by a line containing (in any point) a string matching the specified regular expression; the end will be detected by a line containing a string matching the same regular expression that started the range. This feature is very useful when we want to document some code (e.g., in this very manual) by showing only specific parts, that are delimited in a ad-hoc way in the source code (e.g., with specific comment patterns). You can see some usage examples in *Note Regex ranges::. The specified strings (this option accepts multiple occurrences) must be valid regular expressions (thus you must escape special characters accordingly), otherwise you will get an error. Furthermore, `--line-range' and `--regex-range' cannot coexist in the same command line. `--failsafe' If no language specification is found, an error will be printed and the program exits. With this option, instead, in such situations, the input is simply formatted in the output format. This is useful when `source-highlight' is used with many input files, and it is also used in the `src-hilite-lesspipe.sh' script. Actually I failed to find a good reason why one should not always use this option. So my suggestion is to always use it when you run source-highlight (and indeed, in the future, this option might become the default one). See also *note Using source-highlight with less::, *note Using source-highlight as a simple formatter::. When using `--failsafe', if no input language can be established, source-highlight will use the input language definition file `default.lang', which is an empty file. You might want to customize such file, though. `--debug-lang' `--show-regex' Allows to debug a language definition file, *note Debugging::. The other command line options dealing with references are explained in more details in *note Generating References::. * Menu: * How the input language is discovered:: ---------- Footnotes ---------- (1) As explained before, originally Source-highlight was thought mainly for generating HTML output, this is why the term _css_ is used for style sheets. (2) Padding character can be specified since version 2.8.  File: source-highlight.info, Node: How the input language is discovered, Prev: Invoking source-highlight, Up: Invoking source-highlight 6.1 How the input language is discovered ======================================== As already explained, *note Simple Usage::, source-highlight uses a language definition file according the language specified with the option `--src-lang', or `--lang-def', or by using the input file extension. Since version 2.5, source-highlight can use an inference mechanism to deduce the input language. For the moment, it can detect script languages based on the "sha-bang" mechanism, i.e., when the first line of a script contains a line such as, e.g., #!/bin/sh It detects script languages specified by using the `env' program(1): #!/usr/bin/env perl It recognizes the Emacs convention, of declaring the Emacs major mode using the format `-*- lang -*-'. For instance, a script starting as the following one: #!/bin/bash # -*- Tcl -*- will be interpreted as a Tcl script, and not as bash script. Finally, it recognizes `<?' specifications (e.g., `<?php' and `<?xml') and `<!doctype' (in that case, it infers it is an xml file)(2). This inference mechanism is performed, by default, in case the input language is neither explicitly specified nor found in the language map file by using the input file extension or the filename itself, possibly also the lowercase version (the input file may also have no extension at all, but, for instance, a `ChangeLog' input file will be highlighted using `changelog.lang'). Furthermore, this mechanism can be given priority with the command line option `--infer-lang'. For instance, this is used in the script `src-hilite-lesspipe.sh' (*note Using source-highlight with less::) when running source-highlight, in order to avoid the problem of formatting a Perl script as a Prolog program (since the extension `.pl' is associated to Prolog programs in the language map file, *note Perl::). ---------- Footnotes ---------- (1) Since version 2.7. (2) Since version 3.1.2.  File: source-highlight.info, Node: Language Definitions, Next: Output Language Definitions, Prev: Invoking source-highlight, Up: Top 7 Language Definitions ********************** Since version 2.0 source-highlight uses a specific syntax to specify source language elements (e.g., keywords, strings, comments, etc.). Before version 2.0, language elements were scanned through Flex. This had the drawback of writing a new flex file to deal with a new language; even worse, a new language could not be added "dynamically": you had to recompile the whole source-highlight program. Instead, now, language elements are specified in a file, loaded dynamically, through a (hopefully) simple syntax. Then, these definitions are used internally to create, on-the-fly, regular expressions that are used to highlight the elements (see also *note How source-highlight works::). In particular, we use the regular expressions provided by the Boost library (see *note Installation::). Thus, when writing a language definition file you will surely have to deal with regular expressions. Don't be scared: for most of the languages you may never have to deal with difficult regular expressions, and you can also specify language keywords (such as, e.g., "if", "while", etc., see *note Simple definitions::); moreover, for defining delimited language elements you will not have to write a regular expression, but just the delimiters (see *note Delimited definitions::). However, there might be some language definitions that may require heavy use of more involved regular expressions (e.g., Perl, just to mention one). Of course, we use the Boost regex library regular expression syntax. We refer to Boost documentation for such syntax, `http://www.boost.org/libs/regex/doc/syntax.html', however, in *note Notes on regular expressions::, we provide some notes on regular expressions that might be helpful for those who never dealt with them. By default, Boost regex library uses Perl regular expression syntax, and, at the moment, this is the only syntax supported by source-highlight. Here, we see such syntax in details, by relying on many examples. This allows a user to easily modify an existing language definition and create a new one. These files have, typically, extension `.lang'. Each definition basically associates a regular expression to a language element and defines a name for the language element. Such name will be used to associate a particular style (e.g., bold face, color, etc.) when highlighting such elements. You cannot use names that are the same of keywords used in the language definition syntax (e.g., `start', as shown later, is a reserved word). Comments can be given by using `#'; the rest of the line is considered as a comment. Source-highlight will scan each line of the input file separately. So a regular expression that tries to match new line characters is destined to fail. However, the language definition syntax provides means to deal with multiple lines (see *note Delimited definitions:: and *note State/Environment Definitions::). * Menu: * Ways of specifying regular expressions:: * Simple definitions:: * Line wide definitions:: * Order of definitions:: * Delimited definitions:: * Variable definitions:: * Dynamic Backreferences:: * File inclusion:: Include the contents of another file * State/Environment Definitions:: * Explicit subexpressions with names:: * Redefinitions and Substitutions:: * How source-highlight works:: * Notes on regular expressions:: * The program check-regexp:: * Listing Language Elements:: * Concluding Remarks:: * Debugging:: Debug a language definition file * Tutorials on Language Definitions::  File: source-highlight.info, Node: Ways of specifying regular expressions, Next: Simple definitions, Prev: Language Definitions, Up: Language Definitions 7.1 Ways of specifying regular expressions ========================================== Before getting into details of language definition syntax, it is crucial to describe the 3 possible ways of specifying a regular expression string. These 3 different ways, basically differ in the way they handle regular expression special characters, such, e.g., parenthesis. For this reason, one mechanism can be more powerful than another one, but it could also require more attention; furthermore, there can be situations where you're forced to use only one mechanism, since the other ones cannot accomplish the required goal. `"expression"' If you use double quotes (note, `"' and not ```' or `''') to specify a regular expression, then basically all the characters, but the alternation symbol, i.e., the pipe symbol `|', are considered literally, and thus will be automatically escaped (e.g., a dot `.' is interpreted as the character `.' not as the regular expression wild card). Thus, for instance, if you specify "my(regular)ex.pre$$ion{*}" source-highlight will automatically transform it into my\(regular\)ex\.pre\$\$ion\{\*\} The special character `|', unless it is meant to separate two alternatives (*note Simple definitions::), must be escaped with the character `\', e.g., `\|'. Also the character `\', if it is intended literally, must be escaped, e.g., `\\'. `'expression'' If you want to enjoy (almost) the full power of regular expressions, you need to use single quoted strings (`''), instead of double quoted strings. This way, you can specify special characters with their intended meaning. However, marked subexpressions are automatically transformed in non marked subexpressions, i.e., the parts in the expression of the shape `(...)' will be transformed into `(?:...)' (as explained in *note Notes on regular expressions::, `(?:...)' lexically groups part of a regular expression, without generating a marked sub-expression). Thus, for instance, if you specify 'my(regular)ex.pre$ion*' source-highlight will automatically transform it into my(?:regular)ex.pre$ion* Since marked subexpressions cannot be specified with this syntax, then _backreferences_ (see *note Notes on regular expressions::) are not allowed. ``expression`' This syntax(1) (note the difference, this one uses the _backtick_ ``' while the previous one uses `'') for specifying a regular expression was introduced to overcome the limitations of the other two syntaxes. With this syntax, the marked subexpressions are not transformed, and so you can use regular expressions mechanisms that rely on marked subexpressions, such as _backreferences_ and _conditionals_ (see *note Notes on regular expressions::). This syntax is also crucial for highlighting specific program parts of some programming languages, such as, e.g., Perl regular expressions (e.g., in substitution expressions) that can be expressed in many forms, in particular, separators for the part to be replaced and the part to replace which can be any non alphanumerical characters(2), for instance, s/foo/bar/g s|foo|bar|g s#foo#bar#g s@foo@bar@g Using this syntax, and backreferences, we can easily define a single language element to deal with these expressions (without specifying all the cases for each possible non alphanumerical character): regexp = `s([^[:alnum:][:blank:]]).*\1.*\1[ixsmogce]*` Since version 2.11, in all kinds of regular expression specification, you can insert newline characters, which will simply be ignored. Thus, e.g., the file: # test_newlines.lang # test that newlines in expressions are simply discarded keyword = "foo | lang" (keyword,normal,classname) = `(\<struct) ([[:blank:]]+) ([[:alnum:]_]+)` preproc = '^[[:blank:]]* #([[:blank:]]* [[:word:]]*)' and the file: # test_nonewlines.lang # test that newlines in expressions are simply discarded # see the corresponding test_newlines.lang keyword = "foo|lang" (keyword,normal,classname) = `(\<struct)([[:blank:]]+)([[:alnum:]_]+)` preproc = '^[[:blank:]]*#([[:blank:]]*[[:word:]]*)' are equivalent. However, the former is surely more readable. Note however, that space characters are NOT ignored in regular expression definitions. ---------- Footnotes ---------- (1) Since version 2.7. (2) This issue concerning Perl regular expression syntax was raised by Elias Pipping, and this also pushed me to deal with this more powerful syntax that permits using backreferences, for instance. Although we're still far from highlighting Perl syntax completely (*note Perl::), I definitely must thank Elias for his precious information about this matter :-)  File: source-highlight.info, Node: Simple definitions, Next: Line wide definitions, Prev: Ways of specifying regular expressions, Up: Language Definitions 7.2 Simple definitions ====================== The simplest way to specify language elements is to list the possible alternatives. This is the case, for instance, for keywords. For instance, in `java.lang' you have: keyword = "abstract|assert|break|case|catch|class|const", "continue|default|do|else|extends|false|final", "finally|for|goto|if|implements|instanceof|interface" keyword = "native|new|null|private|protected|public|return", "static|strictfp|super|switch|synchronized|throw", "throws|true|this|transient|try|volatile|while" You can separate quoted definitions with commas. Alternatively, within a quoted definition, alternatives can be separated with the pipe symbol `|'. The above definition defines the language element `keyword'. Each time an element is found in the source file, it is highlighted with the style for the element with the same name in the output format style file (note that all elements shown in the example are taken from the language definition files that come with source-highlight and there is a style for each of such elements, see *note Configuration files::). If such an element is not specified in the output format style file, it is simply not highlighted (actually, it is highlighted with style `normal', *note Configuration files::) (so pay attention to typos :-). From the above example you may have noted that language element definitions are cumulative, so the second `keyword' definition does not replace the first one. (Indeed, in some cases you may want to actually redefine a language element; this is possible as explained in *note Redefinitions and Substitutions::). Note that words specified in double quotes have to match exactly in a source file, and they must be isolated (not surrounded by anything but spaces). Thus for instance `class' is matched as a keyword, but in `my_class' the substring `class' is not matched as keyword. From the point of view of regular expressions a string such as `class' in a double quote simple definition is intended as `\<(class)\>'. Special characters have to be escaped with the character `\'. So for instance if you want to specify the character `|', which is normally used to separate alternatives in double quoted strings, you have to specify `\|'. As explained in *note Ways of specifying regular expressions::, definitions in double quotes are interpreted literally (thus, e.g., a dot `.' is interpreted as the character `.' not as the regular expression wild card). If you want to enjoy the full power of regular expressions to specify a language alternative, you have to use single quoted strings (`''), instead of double quoted strings, or strings quoted with backticks (``'). For instance, the following is the definition for a preprocessor directive in C/C++: preproc = '^[[:blank:]]*#([[:blank:]]*[[:word:]]*)' Note that the definition `'class'' is different from `"class"', as explained above. Thus, for instance `'class'' matches also the sub-expression `class' inside `my_class'. Furthermore, you are not allowed to specify, in the same list, double quoted strings and single quoted strings: you need to split such list definitions. Thus, for instance, the following definition is wrong: preproc = "#define",'^[[:blank:]]*#([[:blank:]]*[[:word:]]*)' while the following one is correct: preproc = "#define" preproc = '^[[:blank:]]*#([[:blank:]]*[[:word:]]*)' Finally, at the end of a list of definitions, one can specify the keyword `nonsensitive'; in that case, the specified strings will be interpreted in a non case sensitive way. For instance, we use this feature in Pascal language definition, `pascal.lang' where keywords are parsed in a non sensitive way: keyword = "alfa|and|array|begin|case|const|div", "do|downto|else|end|false|file|for|function|get|goto|if|in", "label|mod|new|not|of|or|pack|packed|page|program", "put|procedure|read|readln|record|repeat|reset|rewrite|set", "text|then|to|true|type|unpack|until|var|while|with|writeln|write" nonsensitive  File: source-highlight.info, Node: Line wide definitions, Next: Order of definitions, Prev: Simple definitions, Up: Language Definitions 7.3 Line wide definitions ========================= It is often useful to define a language element that affects all the remaining characters up to the end of the line. For such definitions, instead of the `=' you must use the keyword `start'. For instance, the following is the definition of a single line comment in C++: comment start "//" This means that when the two characters `//' are encountered in the source file, everything from these characters on, up to the end of the line, will be highlighted according to the style `comment'.  File: source-highlight.info, Node: Order of definitions, Next: Delimited definitions, Prev: Line wide definitions, Up: Language Definitions 7.4 Order of definitions ======================== It is important to observe that the order of language definitions is important since it will be used during regular expression matching (this will be detailed in *note How source-highlight works::). You then have to make sure that, if there are definitions that start with same characters, the longest expression is specified first in the file. For instance if you write symbol = "/" comment start "//" The first expression will always be matched first, and the second expression will never be matched. The right order is comment start "//" symbol = "/"  File: source-highlight.info, Node: Delimited definitions, Next: Variable definitions, Prev: Order of definitions, Up: Language Definitions 7.5 Delimited definitions ========================= Many elements are delimited by specific character sequences. For instance, strings and multiline comments. The syntax for such an element definition is <name> delim <left delimited> <right delimiter> \ {escape <escape character>} \ {multiline} {nested} The `escape' statement specifies the escape character that may precede one of the delimiters inside the element. This is optional. For instance, this is the definition of C-like strings: string delim "\"" "\"" escape "\\" Note that `\' is a special characters in definitions so it has to be escaped. If the `escape' specification was omitted, the C string `"write \"hello\" string"' would have been highlight incorrectly (it would have been highlighted as the string `"write \"', the normal character sequence `hello\' and the string `" string"'). The option `multiline' specifies that the element can spawn multiple lines. For instance, PHP strings are defined as follows: string delim "\"" "\"" escape "\\" multiline The option `nested' instructs to count possible multiple occurrences of delimited characters and to match relative multiple occurrences (using a stack). For instance, if we wanted to highlight C-like multiline comments in a nested way(1), we could use the following definition: comment delim "/*" "*/" multiline nested If `nested' was not used, then the closing `*/' of the following nested comment would conclude the comment (and the second `*/' would not be highlighted as a comment): /* This is a /* nested comment */ */ Note that, in order for a delimited language element to be nested, its starting and ending elements must be different; thus, for instance, the following definition is not correct: string delim "\"" "\"" nested # WRONG! As said above, definitions are cumulative, and they are also cumulative even when using different syntactic forms. Thus, for instance, the complete definition for C++-style comments are the following (actually, the definition of C-style comment is more involved, see the file `c_comment.lang'): comment start "//" comment delim "/*" "*/" multiline ---------- Footnotes ---------- (1) As Ed Kelly correctly pointed out, C-style comments are NOT nested; it's a big shame I've been using C++ and Java for years and have always thought they were nested :-)... Thus, in previous versions of source-highlight distributions, C-style comments were (uncorrectly) defined as nested. Thank you Ed, for your feedback!  File: source-highlight.info, Node: Variable definitions, Next: Dynamic Backreferences, Prev: Delimited definitions, Up: Language Definitions 7.6 Variable definitions ======================== It is possible to define variables to be re-used in many parts in a language definition file. A variable is defined by using `vardef' <name of the variable> `=' <list of definitions> Once defined, a variable can be used by prepending the symbol `$' to its name. For instance, vardef FUNCTION = '(?:[[:alpha:]]|_)[[:word:]]*(?=[[:blank:]]*\()' function = $FUNCTION The capital letters are used only for readability. It is also possible to concatenate variables and expressions, and reuse variables inside further variable definitions: vardef basic_time = '[[:digit:]]{2}:[[:digit:]]{2}:[[:digit:]]{2}' vardef time = '\<' + $basic_time + '\>'  File: source-highlight.info, Node: Dynamic Backreferences, Next: File inclusion, Prev: Variable definitions, Up: Language Definitions 7.7 Dynamic Backreferences ========================== With _dynamic backreferences_ you can refer to a string matched by the regular expression of the first element of a `delim' specification(1). I called these backreferences dynamic in order to distinguish them by the backreferences of regular expression syntax, *note Ways of specifying regular expressions::. This is crucial in cases when the right delimiter depends on a subexpression matched by the left delimiter; for instance, Lua comments can be of the shape `--[[ comment ]]' or `--[=[ comment ]=]', but not `--[=[ comment ]]' neither `--[[ comment ]=]' (furthermore, they can be nested)(2). Thus, the regular expression of the right element depends on the one of the left element. A dynamic backreference is similar to a variable (*note Variable definitions::), but there's no declaration, and have the shape of @{number} where `number' is the number of the marked subexpression in the left delimiter (source-highlight will actually check that such a marked subexpression exists in the left delimiter). For instance, this is the definition of Lua comments (see also `lua.lang'): environment comment delim `--\[(=*)\[` "]" + @{1} + "]" multiline nested begin include "url.lang" ... end Note how the left delimiter can match an optional `=', as a marked subexpression, and the right delimiter refers to that with @{1}. Source-highlight will take care of escaping possible special characters during dynamic backreference substitutions. For instance, suppose that you must substitute `|' for @{1}, because we matched `|' with the subexpression `[^[:alnum:]]' in a delim element like the following one: comment delim `([^[:alnum:]])` @{1} Since `|' is a special character in regular expression syntax source-highlight will actually replace `@{1}' with `\|'. IMPORTANT: the right delimiter can only refer to subexpressions of its left delimiter; thus, in case of nested delim element definitions (e.g., in states or environment, *note State/Environment Definitions::), the left delimiter acts as a binder and hides possible subexpressions defined in outer delim elements. This is crucial to correctly match nested delimited elements with backreferences: source-highlight will correctly recognize this nested (and syntactically correct) Lua comment: --[[ first level comment --[=[ second level --[[ third level ]] ]=] ]] ---------- Footnotes ---------- (1) Since version 2.8 (2) I'm grateful to Jurgen Hotzel for rising this issue about Lua comments; this led me to introduce dynamic backreferences.  File: source-highlight.info, Node: File inclusion, Next: State/Environment Definitions, Prev: Dynamic Backreferences, Up: Language Definitions 7.8 File inclusion ================== It is possible to include other language definition files into another file. This is inclusion actually physically includes the contents of the included file into the current file during parsing, at the exact point of inclusion (just like the `#include' in C/C++). This is useful for re-using definitions in many files. For instance, C++ comment definitions are given in a file `c_comment.lang', and this file is included in the Java and C++ definition files. The same happens for number and functions. For instance, the file `java.lang' contains the following include instructions: include "c_comment.lang" include "number.lang" keywords ... include "function.lang" Note that the order of inclusion is crucial since the order of definition is crucial. If function definition was included before keyword definitions, then the sentence `if (exp)' would be highlighted as a function invocation (see *note Order of definitions:: and *note How source-highlight works::).  File: source-highlight.info, Node: State/Environment Definitions, Next: Explicit subexpressions with names, Prev: File inclusion, Up: Language Definitions 7.9 State/Environment Definitions ================================= Sometimes you want some source element to be highlighted only if they are surrounded by other elements. Source-highlight language definitions provides also this feature. state|environment <standard definition> begin <other definitions> end This structure is recursive (so other state/environment definitions can be given within a state/environment). The meaning of a state/environment is that the definitions within the `begin ... end' are matched only if the definitions that define the state/environment have been matched. When entering a state/environment, however, the definitions given outside the state/environment are not matched. The difference between `state' and `environment' is that in the latter, normal parts of the source language (i.e., those that do not match any definition) are highlighted according to the style of the definition that defines the environment. As an example, the following defines the multiline nested C comment, and highlights URL and e-mail addresses only when they appear inside a comment (note that this uses file inclusion): environment comment delim "/*" "*/" multiline nested begin include "url.lang" end Note that we used `environment' because everything else inside a comment has to be formatted according to the comment style. While for programming language definitions states/environments can be avoided (although they allow to highlight some parts only if inside a specific environment, e.g., URLs inside comments, or documentation tags in Javadoc comments), they are pretty important for highlighting files such as logs and ChangeLog files, since elements have to be highlighted when they appear in a specific position. For instance, for ChangeLog (see `changelog.lang'), we use a state for highlighting the date, name, e-mail or URL (taken from `url.lang'): state date start '[[:digit:]]{2,4}-?[[:digit:]]{2}-?[[:digit:]]{2}' begin include "url.lang" name = '([[:word:]]|[[:punct:]])+' end Note that definitions that appear inside a state/environment have the same scope of the expressions that define the environment. While this makes sense for `start' and `delim' definitions, it may make less sense for simple definitions (i.e., those that simply lists all possible expressions): in fact, in this case, such expressions do not define a scope. For such definitions, the semantics of state/environment is that the state/environment starts after matching one of the alternatives. And where will it end? In this case you must explicitly exit the environment. For instance, you can say that, when inside a state/environment, a specific language definition, when encountered also exits the environment, with the keyword `exit' (you can also specify the number of states to exit). You can even exit all the environments with `exitall'. For instance, the following definition, highlights a non empty string following a web method: vardef non_empty = '[^[:blank:]]+' state webmethod = "OPTIONS|GET|HEAD|POST|PUT|DELETE", "TRACE|CONNECT|PROPFIND|MKCOL|COPY|MOVE|LOCK|UNLOCK" begin string = $non_empty exit end If you ever need such advanced features, you may want to take a look at the `log.lang' definition file that defines highlighting for several log files (access logs, Apache logs, etc.). Moreover, there might be cases, and the above one is one of such cases, explicit subexpressions with names will be enough (see *note Explicit subexpressions with names::). We conclude this section with an interesting example: comments in M4 files can start with the `dnl' keyword (up to the end of line), e.g., dnl @synopsis AC_CTAGS_FLAGS Now if we want to highlight the `dnl' as a keyword, and the rest of line as a comment, we cannot simply rely on an environment, since this would highlight all the line with the same style. Moreover, we want to highlight elements starting with `@' differently, so we actually need a state (this would allow us also to highlight urls inside a comment just like in C++ comments in the example above). Thus, we need to simulate an environment with a state, and we do this for M4 as follows (see the file `m4.lang'): state keyword start "dnl" begin # avoid spaces in front of urls or @[[:alpha:]]+ be captured as prefixes comment = '[[:blank:]]+' include "url.lang" include "html.lang" type = '@[[:alpha:]]+' # everything else is a comment comment = '.+' end Once entered the state, every isolated space character is highlighted as a comment; then we have rules for URLs and @ elements; then everything else (`.+') is highlighted as a comment. One might think that a smarter way would be to have simply the following definition (after all, why bothering highlighting spaces as comments): state keyword start "dnl" begin include "url.lang" include "html.lang" type = '@[[:alpha:]]+' comment = '.+' end Well, with this definition spaces in front of matched URLs or @ elements would be highlighted as normal, being considered as prefixes. This is due to how source-highlight searches for matching rules; we refer to *note How source-highlight works:: for further details.  File: source-highlight.info, Node: Explicit subexpressions with names, Next: Redefinitions and Substitutions, Prev: State/Environment Definitions, Up: Language Definitions 7.10 Explicit subexpressions with names ======================================= Often, you need to specify two program elements in the same regular expressions, because they are tightly related, but you also need to highlight them differently. For instance, you might want to highlight the name of a class (or interface) in a class (or interface) definition (e.g., in Java). Thus, you can rely on the preceding `class' keyword which will then be followed by an identifier. A definition such as keyword = '(\<(?:class|interface))([[:blank:]]+)([$[:alnum:]]+)' will not produce a good final result, since the name of the class will be highlighted as a keyword, which is not what you might have wanted: for instance, the class name should be highlighted as a `type'. Up to version 2.6, the only way to do this was to use state or environments (*note State/Environment Definitions::) but this tended to be quite difficult to write. Since version 2.7, you can specify a regular expression with marked subexpressions and bind each of them to a specific language element (the regular expression must be enclosed in ``', see *note Ways of specifying regular expressions::): (elem1,...,elemn) = `(subexp1)(...)(subexpn)` Now, with this syntax, we can accomplish our previous goal: (keyword,normal,type) = `(\<(?:class|interface))([[:blank:]]+)([$[:alnum:]]+)` This way, the `class' (or `interface') will be highlighted as a keyword, the separating blank characters are formatted as `normal', and the name of the class as a `type'. Note that the number of element names must be equal to the number of subexpressions in the expression; furthermore, at least in the current version, the expression can contain only marked subexpressions (no character outside is allowed) and no nested subexpressions are allowed. Thus, the following specifications are NOT correct: (keyword,symbol) = `(...)(...)(...)` # number of elements doesn't match (keyword,symbol) = `(...(...)...)(...)` # contains nested subexpressions (keyword,symbol) = `...(...)...(...)` # outside characters This mechanism permits expressing regular expressions for some situation in a much more compact and probably more readable way. For instance, for highlighting ChangeLog parts (the optional `*' as a symbol, the optional file name and the element specified in parenthesis as a `file' element, and the rest as `normal') such as * src/Makefile.am (source_highlight_SOURCES): correctly include changelog_scanner.ll * this is a comment without a file name before version 2.6, we used to use these two language definitions: state symbol start '^(?:[[:blank:]]+)\*[[:blank:]]+' begin state file start '[^:]+\:' begin normal start '.' end end state normal start '^(?:[[:blank:]]+)' begin state file start '[^:]+\:' begin normal start '.' end end which can be hard to read after having written them. Now, we can write them more easily (see `changelog.lang'): (normal,symbol,normal,file)= `(^[[:blank:]]+)(\*)([[:blank:]]+)((?:[^:]+\:)?)` (normal,file)= `(^[[:blank:]]+)((?:[^:]+\:)?)` Since a language element definition using explicit subexpressions with names consists of more than one element, and thus of more than one formatting style, it cannot be used to start an environment (what would the default element be?); while, as seen above, they can be used to start a state.  File: source-highlight.info, Node: Redefinitions and Substitutions, Next: How source-highlight works, Prev: Explicit subexpressions with names, Up: Language Definitions 7.11 Redefinitions and Substitutions ==================================== These two features are useful when you want to define a language by re-using an existing language definition with some changes. Typically you `include' another language definition file and you redefine/substitute some elements. When you use `redef' you erase all the previous definitions of that language elements with the new one. The new language element definition will be placed exactly in the point of the new definition. We use this feature, for instance, when we define the `sml' language by re-using the `caml' one: they differ only for the keywords(1). In fact, the contents of `sml.lang' is summarized as follows: include "caml.lang" redef keyword = "abstraction|abstype|and|andalso..." redef type = "int|byte|boolean|char|long|float|double|short|void" Since the new language element definition appears in the exact point of the redefinition, this means that such a regular expression will be matched only if all the previous ones (the ones of the included file) cannot be matched. This may lead to unwanted results in some cases (not in the `sml' case though). In other words the following code keyword = "foo" keyword = "bar" type = "int" redef keyword = "myfoo" is equivalent to the following one type = "int" keyword = "myfoo" If this is not what you want, you can use `subst', which is similar to `redef' apart from that it replaces the previous first definition of that language element in the exact point of that first definition (all other possible definitions are simply erased). That is to say that the following code keyword = "foo" keyword = "bar" type = "int" subst keyword = "myfoo" is equivalent to the following one keyword = "myfoo" type = "int" It is up to you to decide which one fits best your needs. We could use this feature to define `javascript' in terms of `java', e.g.: include "java.lang" subst keyword = "abstract|break|case|catch|class|if..." Here using `redef' would have led to the unwanted behavior that `if (exp)' would have been highlighted as a function call, since the function element definition would have come first (and then matched first) than the redefinition of `if' as a keyword. Another example is the language definition for C# by reusing the one for C/C++, *note Highlighting C/C++ and C#::. ---------- Footnotes ---------- (1) At least, to the best of my knowledge :-)  File: source-highlight.info, Node: How source-highlight works, Next: Notes on regular expressions, Prev: Redefinitions and Substitutions, Up: Language Definitions 7.12 How source-highlight works =============================== As hinted at the beginning of *note Language Definitions::, source-highlight uses the definitions in the language definition file to internally create, on-the-fly, regular expressions that are used to highlight the tokens of an input file. Here we provide some internal details that are crucial to understand how to write language definition files correctly(1). First of all, for each element definition an highlighting rule is created by source-highlight (even if they correspond to the same language element); thus, each language definition file will correspond to a list of highlighting rules. For each line of the input file, source-highlight will try to match all these rules against the whole line (more formally, against the part of the line that has not been highlighted yet). It will not stop as soon as an highlighting rule matched, since there might be another rule that matches "better". Now, everything basically reduces to the semantics of that _better match_. The strategy used by source-highlight is to select the first matching rule * with empty prefix (or prefix containing only space characters, i.e., spaces or tabs) or * with the smallest prefix, where the _prefix_ of a matched rule is the part of the examined string that did not match(2). Thus, for instance, if we try to match the simple regular expression `=' against the string i = 10; then the prefix is `i ', including the space. Following the terminology of regular expression, the remaining part that did not match, i.e., ` 10;', is the _suffix_. When source-highlight finds a matching rule, according to the above strategy, it formats the matched part (and the prefix as `normal'), and then it starts again searching for a matching rule on the suffix, until it processed the whole line. Let us explain this strategy a little bit further with an example. Consider the following language definition file: # an example for explaining the strategy of source-highlight type = "int" keyword = "null" symbol = "=" and the following line to be highlighted: int i = null Then source-highlight performs these steps: 1. The first matching rule is the one for `type'; since it has an empty prefix, there's no need to look any further: it highlights `int' as `type'; the remaining part to be processed is now ` i = null'; 2. the first matching rule is the one for `keyword', with the prefix ` i = '; since the prefix is not empty (nor it contain only spaces), we inspect other rules; 3. the next matching rule is the one for `symbol', with prefix ` i ', which is smaller than the one for `keyword', and since there are no other matching rules, the one for `symbol' is better, and we highlight `=' as symbol; the remaining part to be processed is now ` null'; 4. the first matching rule is the one for `keyword', and, since it has a prefix with only spaces, we look no further, and we highlight `null' as `keyword'. We conclude this section by showing the following language definition, which summarizes what we said about the highlighting strategy: keyword = "if|class" type = 'int' comment delim "/*" "*/" # thus this won't catch "/* */ /" as a regexp, # since comment elem definition comes first regexp = '/.*/.*/' # this won't match if ( ) as a function, # since keyword elem definition comes first function = '([[:alpha:]]|_)[[:word:]]*[[:blank:]]*\(*[[:blank:]]*\)' # the following order is conceptually wrong, # since "//" won't be highlighted as a comment, but as two symbols symbol = "/" comment start "//" ---------- Footnotes ---------- (1) The strategy used by source-highlight for matching regular expressions changed since version 2.11 (and in version 2.10 the strategy used was not completely conceptually correct and it had a lot of overhead). (2) according to the terminology of regular expressions.  File: source-highlight.info, Node: Notes on regular expressions, Next: The program check-regexp, Prev: How source-highlight works, Up: Language Definitions 7.13 Notes on regular expressions ================================= Although we refer to Boost documentation for such syntax(1), we want to provide here some explanations of some forms of regular expressions that might be unknown but that are pretty useful in language definitions. Typically, when you need to group sub-expressions with parenthesis, but you don't want the parenthesis to spit out another marked sub-expression, you can use a _non-marking parenthesis_ `(?:expression)'. This is not necessary in the language definition syntax: even though you use standard parenthesis, source-highlight will transform it into a non-marking parenthesis. Source-highlight translates possible _marked subexpressions_, i.e., those enclosed in `(' and `)', into non-marked subexpressions (i.e., those explained above). Since version 2.7, if you specify the expression inside ``' the marked subexpressions are left as such (see also *note Ways of specifying regular expressions::). This is useful for _backreferences_ and _conditionals_. An escape character followed by a digit n, where n is in the range 1-9, is a _backreference_ matches the same string that was matched by sub-expression n. For example the expression `^(a*).*\1$' will match the string: `aaabbaaa' but not the string `aaabba'. Backreferences are useful to write compact language elements, such as in the case of Perl's substitution modifiers; thus regexp = `s([^[:alnum:][:blank:]]).*\1.*\1[ixsmogce]*` will match all these forms s/foo/bar/g s|foo|bar|g s#foo#bar#g s@foo@bar@g A useful regular expression form is the _Forward Lookahead Asserts_ that come in two forms, one for positive forward lookahead asserts, and one for negative lookahead asserts: `(?=abc)' matches zero characters only if they are followed by the expression "abc". `(?!abc)' matches zero characters only if they are not followed by the expression "abc". For instance, in the definition of a function (`function.lang') we use the following regular expression: ([[:alpha:]]|_)[[:word:]]*(?=[[:blank:]]*\() Thus after the name of a function we test, with the regular expression `(?=\()' whether an open parenthesis `(' can be matched. If it can be matched, however, we leave that part in the input, so that the parenthesis will not be formatted the same way of a function name (see also *note How source-highlight works:: to understand better this language element definition). Please, be careful when using such regular expression forms: since part of the input is not actually removed you may end up always scanning the same input part (thus looping) if you do not write the regular expressions well. For instance, consider this language definition state foo = '(?=foo)' begin foo = '(?=foo)' end and the following input file: hello foo bar As soon as we match the word `foo' we leave it in the input and we enter a state where we try to match the word `foo' still leaving it in the input. As you might have guess this will make source-highlight loop forever. Probably one might have wanted to write this language definition: state foo = '(?=foo)' begin foo = 'foo' end but a cut-and-paste error had its way ;-) You can also use _Lookbehind Asserts_: `(?<=pattern)' consumes zero characters, only if pattern could be matched against the characters preceding the current position (pattern must be of fixed length). `(?<!pattern)' consumes zero characters, only if pattern could not be matched against the characters preceding the current position (pattern must be of fixed length). Another advanced regular expression mechanism is the one of _conditional expressions_ `(?(condition)yes-pattern|no-pattern)' attempts to match yes-pattern if the condition is true, otherwise attempts to match no-pattern. `(?(condition)yes-pattern)' attempts to match yes-pattern if the condition is true, otherwise fails. Condition may be either a forward lookahead assert, or the index(2) of a marked sub-expression (the condition becomes true if the sub-expression has been matched). For instance, the following expression(3), that we wrote on more lines to try to make it more readable (?: (\() |(\[) |(\{) ) [[:alpha:]]* (?: (?(1) \) |(?:(?(2) \] |(?:\} ))))) will match `(foo)', `[foo]' and `{foo}' but not `(foo]', `{foo]' or `{foo)'. ---------- Footnotes ---------- (1) `http://www.boost.org/libs/regex/doc/syntax.html' (2) the index only, without the escape character. (3) This expression was provided by John Maddock, the author of the Boost regex library, as a solution of a problem I posted on the boost list, `http://thread.gmane.org/gmane.comp.lib.boost.devel/158237/focus=158276'  File: source-highlight.info, Node: The program check-regexp, Next: Listing Language Elements, Prev: Notes on regular expressions, Up: Language Definitions 7.14 The program `check-regexp' =============================== Since version 2.7, the source-highlight package comes with a small additional program, `check-regexp', that permits testing regular expressions on the command line. You simply pass as the first command line argument the regular expression and then the strings you want to try to match (actually, the program searches the string for the given regular expression, so it is not required to match the whole string). It is crucial, in order to avoid shell substitutions, to enclose both the expression and the strings in single quotes. The program then prints some information about the (possibly successful matching). The `what[0]' part represents the whole match, and `what[i]' part represents the i-th marked subexpression that matched. The program also prints possible prefix and suffix. Here's an example of output of the program: check-regexp '(a+)(.*)\1' 'aabcdaa' 'babbbacc' searching : aabcdaa for the regexp : (a+)(.*)\1 what[0]: aabcdaa what[1]: aa length: 2 what[2]: bcd length: 3 total number of matches: 1 searching : babbbacc for the regexp : (a+)(.*)\1 prefix: b what[0]: abbba what[1]: a length: 1 what[2]: bbb length: 3 suffix: cc total number of matches: 1 And here's the example of matching parenthesis we saw in *note Notes on regular expressions::: check-regexp \ '(?:(\()|(\[)|(\{))[[:alnum:]]*(?:(?(1)\)|(?:(?(2)\]|(?:\})))))' \ '{ciao}' '(foo]' '[hithere]' searching : {ciao} for the regexp : (?:(\()|(\[)|(\{))[[:alnum:]]*(?:(?(1)\)|(?:(?(2)\]|(?:\}))))) what[0]: {ciao} what[3]: { length: 1 total number of matches: 1 searching : (foo] for the regexp : (?:(\()|(\[)|(\{))[[:alnum:]]*(?:(?(1)\)|(?:(?(2)\]|(?:\}))))) total number of matches: 0 searching : [hithere] for the regexp : (?:(\()|(\[)|(\{))[[:alnum:]]*(?:(?(1)\)|(?:(?(2)\]|(?:\}))))) what[0]: [hithere] what[2]: [ length: 1 total number of matches: 1  File: source-highlight.info, Node: Listing Language Elements, Next: Concluding Remarks, Prev: The program check-regexp, Up: Language Definitions 7.15 Listing Language Elements ============================== In order for language definitions to be really useful they must be used in proper combination with formatting styles (see *note Output format style::). However, these different files might not be developed by the same person, or simply some one may want to customize one of these. In order to define good output formatting style files you should be aware of each language element defined by a language definition file. Instead of having to look inside the language definition file itself (and recursively in each included file) you can use the command line option `--show-lang-elements'(1), that simply prints to the standard output all the language elements that can be highlighted with a specific language definition file. For instance, for `cpp.lang' you get: cbracket classname comment function keyword label normal number preproc specialchar string symbol todo type url usertype while for `log.lang' you get: cbracket comment date function ip normal number port string symbol time twonumbers webmethod ---------- Footnotes ---------- (1) Since version 2.4.  File: source-highlight.info, Node: Concluding Remarks, Next: Debugging, Prev: Listing Language Elements, Up: Language Definitions 7.16 Concluding Remarks ======================= By mixing all these features you can unleash your imagination and define highlighting for complex source languages such as Flex and Bison by writing few lines of code and re-use existing ones. For instance, Flex and Bison have their own syntax and lets you write C/C++ code in specific parts of the source language, e.g., the code between the outmost brackets, in the following example, is C++ code, and should be highlighted following C++ language definitions (apart from variables that are prefixed with `$'): globaltags : options { if (...) { setTags( $1 ); } } This is easy to do (taken from `flex.lang'): state cbracket delim "{" "}" multiline nested begin variable = '\$.' include "cpp.lang" end Note that, since we used `nested' we can be sure that the C++ language definitions are not considered anymore when we matched the last closing `}'.  File: source-highlight.info, Node: Debugging, Next: Tutorials on Language Definitions, Prev: Concluding Remarks, Up: Language Definitions 7.17 Debugging ============== When writing a language definition file, it is quite useful to be able to debug it (by using complex regular expressions one may experience unwanted behaviors). Since version 2.1 the command line option `--debug-lang' is available. When using this option, some additional information are printed to the standard output. Since version 2.5 this option also accepts the a sub specification (see *note Invoking source-highlight::). When using `dump' (the default) all the additional information explained below will be dumped without interaction with the user. When using `interactive', for each formatted string the program will stop waiting for a command from the user. In this very primordial version of interactive debug, the user will only have to press `ENTER' to make the program continue until the next formatted string. This way, the programmer will have the chance to step the highlighting of each part of the input file. Moreover, when debugging is enabled, no buffering will be performed by the program, thus each formatted element will be immediately available in the output. For instance, you can use the command `tail -f' to see the modifications on the output file on-the-fly. When using this command line option the additional information produced has the following format: <.lang filename>:<line number> expression: <matched subexpression> formatting: <source file string to be formatted> entering: <next state's id> exiting state, level: <number of states> The lines starting with `entering', `exiting' and `exitingall' are related to entering a new state/environment and exiting one and all states/environments (`current state', if shown, comes after `entering' and prints the same state's regular expression but after the substitution of dynamic backreferences, *note Dynamic Backreferences::). The first line shows a link to the `.lang' definition file and the line number, i.e., and the sub-expression that matched and the line starting with `formatting' shows the source file string that matched with that expression. If a line starting with `formatting' is not preceded by a line with the link to the sub-expression, it means that no particular regular expression has matched, and thus the style `normal' will be used to format that string. Consider the following (simplified) Java source file: 01: /* 02: This is to demonstrate -debug-lang 03: http://www.lorenzobettini.it 04: */ 05: 06: package hello; 07: 08: public class Hello { 09: // just some greetings ;-) /* 10: int i = 10; 11: System.out.println("Hello World!"); 12: } 13: Now you can debug the `java.lang' file by using the `--debug-lang' command line option. And the output is as follows: c_comment.lang:24 expression: "/\*" formatting "/*" as comment entering state: 23 formatting " This is to demonstrate --debug-lang" as default formatting " " as default url.lang:3 expression: "(?:(?:<?)[[:word:]]+://[[:word:]\./\-_]+(?:>?))" formatting "http://www.lorenzobettini.it" as url c_comment.lang:24 expression: "\*/" formatting "*/" as comment exiting state, level: 1 java.lang:1 expression: "\<(?:import|package)\>" formatting "package" as preproc formatting " hello" as default symbols.lang:1 expression: "(?:~|!|%|\^|\*|\(|\)|-|\+|=|\[|\]|\\|:|;|,|\.|/|\?|&|<|>|\|)" formatting ";" as symbol ... omissis ... c_comment.lang:13 expression: "//" formatting "//" as comment entering state: 12 formatting " just some greetings ;-) /*" as default c_comment.lang:13 expression: "\z" formatting "" as comment exiting state, level: 1 ... omissis ... This should provide enough information to understand how the regular expressions are used and how the states/environments are entered and exited. Please note that the sub-expressions that are shown may differ from the original ones specified in the `.lang' file. This is due to the preprocessing that is performed by Source-highlight. Moreover, some sub-expressions are not defined at all in the `.lang' file: for instance, this is the case for line wide definitions, i.e., those that are defined with the keyword `start', *note Line wide definitions::. The last lines above, showing `expression: "\z"', means that we matched the end of a line. Another useful feature in debugging is the option `--show-regex' that shows, on the standard output, the regular expression automaton that source-highlight creates. For instance, consider this language definition (`comment-show.lang'): vardef TODO = '(TODO|FIXME)([:]?)' environment comment delim "/**" "*/" multiline begin type = '@[[:alpha:]]+' todo = $TODO end state cbracket delim "{" "}" escape "\\" multiline nested begin keyword = "if|then|else|endif" end string delim "<" ">" string2 delim "<<" ">>" multiline If you now execute the following command: source-highlight --show-regex=comment-show.lang you will get, on the standard output, the following output(1): STATE 1 default: normal rule (comment) "/\*\*" (exit level: 0, next: 2) STATE 2 default: comment rule (comment) "\*/" (exit level: 1, next: 0) rule (type) "(?:\@[[:alpha:]]+)" (exit level: 0, next: 0) rule (todo) "(?:(?:TODO|FIXME)(?:[:]?))" (exit level: 0, next: 0) rule (cbracket) "\{" (exit level: 0, next: 3) STATE 3 default: normal rule (cbracket) "\}" (exit level: 1, next: 0) rule (cbracket) "\\." (exit level: 0, next: 0) rule (cbracket) "\{" (exit level: 0, next: 0, nested) rule (keyword) "\<(?:if|then|else|endif)\>" (exit level: 0, next: 0) rule (string) "<(?:[^<>])*>" (exit level: 0, next: 0) rule (string2) "<<" (exit level: 0, next: 4) STATE 4 default: string2 rule (string2) ">>" (exit level: 1, next: 0) This shows the states and highlight rules of the regular expression automaton that source-highlight creates and will use to format an input source. Each state is associated a unique number in order to identify it; moreover, the default element of the state is shown (i.e., if none of the state's rule match, then that part is highlighted with the default element style). For instance, in the initial state the default style is normal. Then for each state it shows the rules for that state. For each rule you can see the corresponding element of the rule, the regular expression for the rule and some other information, that we explain in the following. We can see that if we match a `/**' (it is shown as a string with escaped special characters, `/\*\*') we enter a new state, in this case the state 2 (`next: 2'). This corresponds to the delimited element defining a new environment (*note State/Environment Definitions::). The fact that it is actually an environment and not a state(2) can be seen by the fact that the default element is the same of the environment itself. If we match a `*/', i.e., the end of the delimited element, we exit one level (`exit level: 1') meaning that we go back to state 1. Then we have the state for `cbracket', which is not an environment, in fact its default state is normal. The second rule of this state, `\\.' represents the `escape' string of the state definition. Since the delimited element is defined as nested, we have a third rule `{' which has the `nested' information; thus, if we match it, we simply enter a new instance of state 3 itself. The `string' and `string2' show the difference implied by the `multiline' option: since source-highlight handles a line of input separately, the first delimited definition can be handled with a single regular expression while the multiline version cannot. Note that the states/environments are indented so that it's easier to understand the outer and the inner states. Let us now consider a variation of the previous example: vardef TODO = '(TODO|FIXME)([:]?)' environment comment delim "/**" "*/" multiline nested begin type = '@[[:alpha:]]+' todo = $TODO end regexp = `([^[:alnum:]]).*(\1)` string delim "<" ">" string2 delim "<<" ">>" multiline (paren,normal,paren) = `(\[)(.*)(\])` and let us see the output of `--show-regex' STATE 1 default: normal rule (comment) "/\*\*" (exit level: 0, next: 2) STATE 2 default: comment rule (comment) "\*/" (exit level: 1, next: 0) rule (comment) "/\*\*" (exit level: 0, next: 0, nested) rule (type) "(?:\@[[:alpha:]]+)" (exit level: 0, next: 0) rule (todo) "(?:(?:TODO|FIXME)(?:[:]?))" (exit level: 0, next: 0) rule (regexp) "(?:([^[:alnum:]]).*(\1))" (exit level: 0, next: 0) rule (string) "<(?:[^<>])*>" (exit level: 0, next: 0) rule (string2) "<<" (exit level: 0, next: 3) STATE 3 default: string2 rule (string2) ">>" (exit level: 1, next: 0) rule (paren normal paren) "(\[)(.*)(\])" (exit level: 0, next: 0) Since in the rule `regexp' we used the ``' regular expression (see *note Ways of specifying regular expressions::), then, the marked subexpressions are not translated in order to make backreferences work correctly. The last rule uses explicit subexpressions with names (see *note Explicit subexpressions with names::); although that expression is made up of different elements, the expression is matched as a whole. ---------- Footnotes ---------- (1) Up to version 2.9 the output of `--show-regex' was a little bit more complex to read; hopefully this output is better. (2) Please note that this concept of state is different from the concept of "state" of an automaton.  File: source-highlight.info, Node: Tutorials on Language Definitions, Prev: Debugging, Up: Language Definitions 7.18 Tutorials on Language Definitions ====================================== Now we provide some examples of language definitions. In the previous sections we have already provided some code snippets, while here we provide complete examples of language definitions that are included in the source-highlight distribution itself. In particular we will first show the language definition for the language definition syntax itself (file `langdef.lang'). This will be used to highlight the examples of language definitions that we will show in this section (the highlighting will not be visible if you are viewing this manual with the `info' command). Of course, this example is highlighted itself. # this is the language definition for the # language definition syntax itself comment start "#" preproc = "include" string delim "\"" "\"" escape "\\" multiline regexp delim "'" "'" escape "\\" multiline regexp delim "`" "`" escape "\\" multiline keyword = "state|environment|begin|end|delim|escape|start", "multiline|nested|vardef|exitall|exit", "redef|subst|nonsensitive" symbol = "=|+|,|(|)" vardef ID = '[[:word:]]+' variable = '\$' + $ID variable = $ID The style that is used to highlight these examples in Texinfo is `texinfo.style' that is shown in *note Output format style::. The language definition for the style syntax (file `style.lang') is even simpler: # this is the language definition for the # style definition syntax comment start "//" string delim "\"" "\"" escape "\\" keyword = "bgcolor|purple|orange|brightorange|brightgreen|darkgreen", "green|darkred|red|brown|pink|yellow|cyan", "black|teal|gray|darkblue|blue", "normal|linenum", "noref|nf|f|u|i|b" keyword = 'bg\:' symbol = ",|;" variable = '[[:word:]]+' Note that this definition is pretty simple since the language definition syntax is simple. In the next examples we will see how to use more complex features to highlight more complex language syntaxes. * Menu: * Highlighting C/C++ and C#:: * Highlighting Diff files:: * Pseudo semantic analysis::  File: source-highlight.info, Node: Highlighting C/C++ and C#, Next: Highlighting Diff files, Prev: Tutorials on Language Definitions, Up: Tutorials on Language Definitions 7.18.1 Highlighting C/C++ and C# -------------------------------- This is the language definition for C, included in the file `c.lang': # definitions for C include "c_comment.lang" label = '^[[:blank:]]*[[:alnum:]]+:[[:blank:]]*\z' (keyword,normal,classname) = `(\<struct)([[:blank:]]+)([[:alnum:]_]+)` state preproc start '^[[:blank:]]*#(?:[[:blank:]]*include)' begin string delim "<" ">" string delim "\"" "\"" escape "\\" include "c_comment.lang" end preproc = '^[[:blank:]]*#([[:blank:]]*[[:word:]]*)' include "number.lang" include "c_string.lang" keyword = "__asm|__cdecl|__declspec|__export|__far16", "__fastcall|__fortran|__import", "__pascal|__rtti|__stdcall|_asm|_cdecl", "__except|_export|_far16|_fastcall", "__finally|_fortran|_import|_pascal|_stdcall|__thread|__try|asm|auto", "break|case|catch|cdecl|const|continue|default", "do|else|enum|extern|for|goto", "if|pascal", "register|return|sizeof|static", "struct|switch", "typedef|union", "volatile|while" type = "bool|char|double|float|int|long", "short|signed|unsigned|void|wchar_t" include "symbols.lang" cbracket = "{|}" include "function.lang" include "clike_vardeclaration.lang" Note that this makes use of lots of `include's since these parts are reused in other language definitions (e.g., Java has lots of parts that are in common with C/C++ so we wrote these parts in separate files). In particular the comments definitions: # c_comment.lang # comments with documentation tags environment comment start "///" begin include "url.lang" include "html_simple.lang" type = '@[[:alpha:]]+' include "todo.lang" end comment start "//" # comments with documentation tags environment comment delim "/**" "*/" multiline begin include "url.lang" include "html_simple.lang" type = '@[[:alpha:]]+' include "todo.lang" end # standard comments environment comment delim "/*" "*/" multiline begin include "url.lang" include "todo.lang" end Here we have the definitions for line-wide comments (`//') and for multi line comments where we highlight also URL addresses and e-mail addresses (defined in the file `url.lang' not shown here). Moreover, for comments that are used in automatic documentation generation tools (such as Doxygen or Javadoc), i.e., those that start with `/**' or `///') we also highlight the complete HTML syntax (defined in the file `html.lang' not shown here). Going back to `c.lang' we see that we use subexpressions with names (see *note Explicit subexpressions with names::) for highlighting the struct name (when preceded by `struct', highlighted as a keyword). For preprocessor directives `#include' we use a state definition since in this case the file included with the `<file>' syntax must be formatted as strings (and only in this context the `<>' must be considered as strings, anywhere else they are operators). Since a state erases definitions defined outside the state we must include `c_comment.lang' again in order to highlight comments also in this context(1). Then we have a definition of `preproc' that catches all the other preprocessor directives. The included file `number.lang' defines the regular expression that catches number constants (not shown here), then we include the file `c_string.lang' that define strings (again shared by Java): vardef SPECIALCHAR = '\\.' environment string delim "\"" "\"" begin specialchar = $SPECIALCHAR end environment string delim "'" "'" begin specialchar = $SPECIALCHAR end inside a string we want to highlight in a different way the special characters (such as, e.g., `\n', `\t', etc.) and in general escaped characters, matched by the regular expression ``\\.''. The included file `symbols.lang' defines all the symbols (shared also by other languages): symbol = "~","!","%","^","*","(",")","-","+","=","[", "]","\\",":",";",",",".","/","?","&","<",">","\|" This has nothing interesting but the fact that it shows that the character `\' and `|' have to be escaped. The included file `function.lang' defines the regular expression to match a function definition or invocation: vardef FUNCTION = '([[:alpha:]]|_)[[:word:]]*(?=[[:blank:]]*\()' function = $FUNCTION that shows an example of forward lookahead assert for the opening parenthesis (see *note Notes on regular expressions::). As noted in *note File inclusion::, it is crucial that this file is included after the keyword definition. Finally, `c.lang' includes the file `clike_vardeclaration.lang': (usertype,usertype,normal) = `([[:alpha:]_](?:[^[:punct:][:space:]]|[_])*) ((?:<.*>)?) (\s+(?=[*&]*[[:alpha:]_][^[:punct:][:space:]]*\s*[[:punct:]\[\]]+))` This definition, using subexpressions with names (see *note Explicit subexpressions with names::), tries(2) to match user types (e.g., struct names) in function parameter and variable declarations. It basically tries to match a type identifier, then a possible template specification(3) and then we have a complete lookahead assert (*note Notes on regular expressions::) that tries to match the variable identifier, possibly with `&' and `*' reference and pointer specification, followed by an assignment `=' or a `;', more generally a `[:punct:]' or `[]' (for array specifications). This should catch the user types in the correct contexts, as in the following (where we intentionally highlighted `usertype' in italics): Integer i = 10; Boolean b; String args[]; const MyType args[]; const My_Type args[]; List<Integer> mylist; List<List<Integer> > mylist; myspace::InputStream iStream ; MyType *t; MyType **t; const MyType &t; if (argc > 0) { } __mytype _i; typedef _mytype __i; Note that since for the third group we use a lookahead assert, what is matched is not actually formatted but it is put back in the input stream so that it can be formatted using other rules (e.g., `symbol' for `*' and `='). Since, at least syntactically, C++ is an extension of C, the language definition for C++, included in the file `cpp.lang', relies on `c.lang'(4): # definitions for C++ # most of it is shared with c.lang (keyword,normal,classname) = `(\<(?:class|struct|typename))([[:blank:]]+)([[:alnum:]_]+)` keyword = "class|const_cast|delete", "dynamic_cast|explicit|false|friend", "inline|mutable|namespace|new|operator|private|protected", "public|reinterpret_cast|static_cast", "template|this|throw|true", "try|typeid|typename", "using|virtual" include "c.lang" In particular, it extends the set of keywords. Moreover, note that we use subexpressions with names (see *note Explicit subexpressions with names::) for highlighting the class (or struct) name (when preceded by `class', `struct' or `typename', highlighted as a keyword). A similar rule was also present in `c.lang', but it concerned only `struct'. Now that we wrote the language definition for C/C++, writing the one for C# is straightforward, since we only need to add the keyword `using' as a preprocessor element, and redefine (or better, "substitute", *note Redefinitions and Substitutions::) the keywords and types: # definitions for C-sharp # by S. HEMMI, updated by L. Bettini. preproc = "using" number = '\<[+-]?((0x[[:xdigit:]]+)|(([[:digit:]]*\.)? [[:digit:]]+([eE][+-]?[[:digit:]]+)?))([FfDdMmUulL]+)?\>' include "cpp.lang" subst keyword = "abstract|event|new|struct", "as|explicit|null|switch", "base|extern|this", "false|operator|throw", "break|finally|out|true", "fixed|override|try", "case|params|typeof", "catch|for|private", "foreach|protected", "checked|goto|public|unchecked", "class|if|readonly|unsafe", "const|implicit|ref", "continue|in|return", "virtual", "default|interface|sealed|volatile", "delegate|internal", "do|is|sizeof|while", "lock|stackalloc", "else|static", "enum|namespace", "get|partial|set", "value|where|yield" subst type = "bool|byte|sbyte|char|decimal|double", "float|int|uint|long|ulong|object", "short|ushort|string|void" ---------- Footnotes ---------- (1) As a future extension we might think of providing a way, in the language definition syntax, to define a state/environment that extends the outer contexts instead of overriding them. (2) This was not tested extensively and might not catch all the correct situations. (3) OK, there are no templates in C, and they are only in C++, but we think it should no harm when highlighting C files. (4) Before version 2.9, there was only `cpp.lang' which was used both for C and C++; however, this way, if you had a C program where you were using a C++ keyword as a variable name--which of course is correct in C--that variable was actually highlighted as a keyword and this was not correct.  File: source-highlight.info, Node: Highlighting Diff files, Next: Pseudo semantic analysis, Prev: Highlighting C/C++ and C#, Up: Tutorials on Language Definitions 7.18.2 Highlighting Diff files ------------------------------ Now we want to highlight files that are generated by `diff' (typically used to create patches). This program can generate outputs in three different formats (at least at best of my knowledge). With the option `-u|--unified' the differences among files are shown in the same context, for instance (the examples of the diff files shown here are manually modified so that they can fit in the page width): diff -ruP source-highlight-2.1.1/source-highlight.spec ... -- source-highlight-2.1.1/source-highlight.spec ... +++ source-highlight-2.1.2/source-highlight.spec ... @@ -6,8 +6,8 @@ Summary: syntax highlighting for source documents Name: source-highlight -Version: 2.1.1 -Release: 2.1.1 +Version: 2.1.2 +Release: 2.1.2 License: GPL Group: Utilities/Console Source: ftp://ftp.gnu.org/gnu/source-highlight/%{name}-%{version}.tar.gz With the option `-c--context' the differences are shown into two different parts: diff -rc2P source-highlight-2.1.1/source-highlight.spec ... *** source-highlight-2.1.1/source-highlight.spec ... -- source-highlight-2.1.2/source-highlight.spec ... *************** *** 7,12 **** Summary: syntax highlighting for source documents Name: source-highlight ! Version: 2.1.1 ! Release: 2.1.1 License: GPL Group: Utilities/Console -- 7,12 --- Summary: syntax highlighting for source documents Name: source-highlight ! Version: 2.1.2 ! Release: 2.1.2 License: GPL Group: Utilities/Console diff -rc2P source-highlight-2.1.1/src/latex.outlang ... *** source-highlight-2.1.1/src/latex.outlang ... -- source-highlight-2.1.2/src/latex.outlang ... *************** *** 35,37 **** -- 35,38 --- "--" "-\\/-" "---" "-\\/-\\/-" + "\"" "\"{}" # avoids problems with some inputenc end Without options it generates only the essential difference information without any addition context lines: diff -rP source-highlight-2.1.1/source-highlight.spec ... 9,10c9,10 < Version: 2.1.1 < Release: 2.1.1 --- > Version: 2.1.2 > Release: 2.1.2 Summarizing, we would like to be able to handle all these three different syntaxes; note that the first format and the second format have something conflicting: the first one uses the `---' to indicate the new version of a file while the second format uses it to indicate the old version of a file. Since we want to highlight differently the old parts and the new parts (this is not visible in the Texinfo highlighting due to the lack of enhanced formatting features, but it is visible for instance in HTML output where we use two different colors), this behavior adds some difficulties. Of course, we could define three different language definitions, one for each diff output format. However, we prefer to handle them all in the same file! This is the language definition for diff files: # language definition for files created with 'diff' # diff created with -u option state oldfile = '(?=^[-]{3})' begin oldfile start '^[-]{3}' oldfile start '^[-]' newfile start '^[+]' difflines start '^@@' end # diff created with -c option state oldfile = '(?=^[*]{3})' begin environment oldfile = '^[*]{3}[[:blank:]]+[[:digit:]]' begin normal start '^[[:space:]]' newfile = '(?=^[-]{3})' exit end oldfile start '^[*]{3}' environment newfile = '^[-]{3}[[:blank:]]+[[:digit:]]' begin normal start '^[[:space:]]' newfile = '(?=^[*]{3})' exit normal start '^diff' exit end newfile start '^[-]{3}' end # otherwise, created without options state difflines = '(?=^[[:digit:]])' begin difflines start '^[[:digit:]]' oldfile start '^[<]' newfile start '^[>]' end Since we can safely assume that when we process a diff file it contains only information created with the same diff command line switch, we define three different states that correspond to the three diff output formats. Note that these states are entered with a simple definition; as noted in *note State/Environment Definitions::, this means that no automatic exit means are provided, and since no explicit exit condition is specified, this means that once one of this state is entered it will never be exited. This is consistent with our goal. Of course, the expression that makes us enter a state must be defined correctly, and in particular we first search for an initial `---' sequence since this is used as the first difference specification by the `-u|--unified' option, so this is a distinguishing feature to be used to infer which diff format file we are processing. Another interesting thing, is that we use the forward lookahead assert for the opening parenthesis (see *note Notes on regular expressions::), since we only want to see which file format we are processing. Once we entered the right state we can define the regular expressions for the elements of the specific diff file format. For the files created with the option `-c|--context' we define two inner environments, one for the new file part and one for the old file part (these are delimited by a `---' or `***' and line number information). Note that these are environments, so anything that is not matched by any expression is formatted according to the style of the element that defines the environment. Thus, we provide an expression for text that must be formatted as normal. For diff files this corresponds to a line that start with a space or with `diff' (take a look at the examples above). In particular the latter case can take place only during the new file part. In both environments we must define the exit conditions. In both cases these correspond to the beginning of the complementary part; also in this case we use forward lookahead assertions, since we use it only to exit the environment. The outer definitions for `oldfile' and `newfile' are used to match the lines with source file information information. The third state, corresponding to the normal diff output format, should be straightforward by now.  File: source-highlight.info, Node: Pseudo semantic analysis, Prev: Highlighting Diff files, Up: Tutorials on Language Definitions 7.18.3 Pseudo semantic analysis ------------------------------- Source-highlight, by means of regular expressions can only perform lexical analysis of the input source. In particular, it is based on the assumption that the input source is syntactically correct with respect to the input language. However, by using the language definition syntax and by writing the right regular expression it is possible to simulate some sort of semantic analysis of the input source. For instance, consider the following C (or C++) source file: // test special #if 0 treatment int main() { #if 0 // equivalent to a comment int i = 10; printf("this should never be executed\n"); return 1; #else printf("Hello world!\n"); return 0; #endif printf("never reach here!\n"); } It is easy to verify that the code between `#if 0' and `#else' will be never executed (indeed it will not even be compiled). Thus, we might want to format it as a comment. We then write another language definition file, based on the file `cpp.lang': environment comment start '^[[:blank:]]*#if[[:blank:]]+0' begin comment start '^[[:blank:]]*#(else|endif)' exit end include "cpp.lang" We intentionally included an error in this first version: we used the `start' element to start the environment, but such element has the scope of a single line, thus, it does not have the desired behavior: // test special #if 0 treatment int main() { #if 0 // equivalent to a comment int i = 10; printf("this should never be executed\n"); return 1; #else printf("Hello world!\n"); return 0; #endif printf("never reach here!\n"); } A better solution is the following one: environment comment = '^[[:blank:]]*#[[:blank:]]*if[[:blank:]]+0' begin comment start '^[[:blank:]]*#[[:blank:]]*(else|endif)' exit end include "cpp.lang" here we enter the `comment' environment by not using a delimited element, but simply the regular expression to match `#ifdef 0'. Then we exit the environment either when we match an `#else' or a `#endif'. This seems to work: // test special #if 0 treatment int main() { #if 0 // equivalent to a comment int i = 10; printf("this should never be executed\n"); return 1; #else printf("Hello world!\n"); return 0; #endif printf("never reach here!\n"); } However, it does not work if we consider nested `#if...#else'; for instance consider the following code, formatted with the previous language definition: // test special #if 0 treatment int main() { #if 0 // equivalent to a comment int i = 10; printf("this should never be executed\n"); # ifdef FOO printf("foo\n"); # ifndef BAR printf("no bar\n"); # else # endif # else printf("no foo\n"); # endif // FOO return 1; #else printf("Hello world!\n"); return 0; #endif printf("never reach here!\n"); } The problem is that the previous language definition does not consider nested `#if' and thus, the first time it matches a `#else' or an `#endif' it exits the `comment' environment. We must then take into account possible nested occurrences. This can be done by using a delimited element with the `nested' option (*note Delimited definitions::): # treat the preprocess statement # #if 0 # ... # #else # as a comment environment comment = '^[[:blank:]]*#[[:blank:]]*if[[:blank:]]+0' begin comment start '^[[:blank:]]*#[[:blank:]]*else' exit comment delim '^[[:blank:]]*#[[:blank:]]*if' '^[[:blank:]]*#[[:blank:]]*endif' multiline nested end include "cpp.lang" This time the right block of code is correctly formatted as a comment: // test special #if 0 treatment int main() { #if 0 // equivalent to a comment int i = 10; printf("this should never be executed\n"); # ifdef FOO printf("foo\n"); # ifndef BAR printf("no bar\n"); # else # endif # else printf("no foo\n"); # endif // FOO return 1; #else printf("Hello world!\n"); return 0; #endif printf("never reach here!\n"); } Note that it is crucial to exit the environment even when we match an `#else' (not only an `#endif', since, this way, we can match again another `#ifdef 0'; consider, for instance, the following code: // test special #if 0 treatment int main() { #if 0 // equivalent to a comment int i = 10; printf("this should never be executed\n"); return 1; #else printf("Hello world!\n"); # if 0 // another one return 1; # else return 0; # endif #endif printf("never reach here!\n"); }  File: source-highlight.info, Node: Output Language Definitions, Next: Generating References, Prev: Language Definitions, Up: Top 8 Output Language Definitions ***************************** Since version 2.1 source-highlight uses a specific syntax to specify output formats (e.g., how to format in HTML, LaTeX, etc.). Before version 2.1, in order to add a new output format, many C++ classes had to be written. This had the drawback that a new output format could not be added "dynamically": you had to recompile the whole source-highlight program. Instead, now, an output format is specified in a file, loaded dynamically, through a (hopefully) simple syntax. Then, these definitions are used internally to create, on-the-fly, text formatters. Here, we see such syntax in details, by relying on many examples. This allows a user to easily modify an existing output format definition and create a new one. These files have, typically, extension `.outlang'. Each definition basically associates a text style (such as, e.g., bold, italics, colors, etc.) to the representation of that style into the output format (such as, e.g., `<b>$text</b>' in HTML). The representation is given in `"' and you can use the classic escape character `\' to use the `"' inside the definition. If you want to specify the ASCII code for a character you can do so by specifying the numeric code in hexadecimal notation preceded by `\x', for an example, see *note Style template::. If no definition is given for a specific style, e.g., bold, then when that style is requested during formatting, the text will be formatted as it is, i.e., the style without the definition is simply ignored. Comments can be given by using `#'; the rest of the line is considered as a comment. Files can be included in the same way as for language definitions, *note File inclusion::. In any case, if a definition for a style is given more than once, the last definition replaces all the others. * Menu: * File extension:: Specify the output file extension * Text styles:: Bold, Italics, Underline, etc. * Colors:: Style and definitions for colors * Anchors and References:: * One style:: * Style template:: * Line prefix:: * String translation:: * Document template:: * Generating HTML output::  File: source-highlight.info, Node: File extension, Next: Text styles, Prev: Output Language Definitions, Up: Output Language Definitions 8.1 File extension ================== With the line: extension "<file extension>" you define the default file extension (without the `.') used to generate files formatted according to this output format. This is used when no output file name is specified; if the file extension is not included in the `.outlang' is not defined, and no output file name is specified, an error will occur. For instance, this is used in `html_common.outlang': extension "html"  File: source-highlight.info, Node: Text styles, Next: Colors, Prev: File extension, Up: Output Language Definitions 8.2 Text styles =============== These are the text styles that one can define: bold italics underline notfixed fixed These, of course, correspond to the ones used to specify the output format style, *note Output format style::. These definitions, for instance, are from the HTML format definition: bold "<b>$text</b>" italics "<i>$text</i>" underline "<u>$text</u>" Inside a definition you use the special variable `$text' to specify where the actual text to be formatted has to be inserted. For instance, the definition of `bold' above says that if you need to format the keyword `class' in bold in HTML, the following text will be generated: `<b>class</b>'. This variable is used also when mixing more than one styles recursively, in particular if you want to format in bold and italics (i.e, first bold and then italics, or, in other words, the sequence `i, b' is used in the the output format style file, see *note Output format style::), then first the text `class' is substituted for `$text' into `<b>$text</b>' and then the text `<b>class</b>' will be substituted for `$text' into `<i>$text</i>', thus obtaining `<i><b>class</b></i>'.  File: source-highlight.info, Node: Colors, Next: Anchors and References, Prev: Text styles, Up: Output Language Definitions 8.3 Colors ========== The definition for using colors during formatting requires the definition for the `color' style color "..." and for the `bgcolor' style(1): bgcolor "..." This definition concerns only the background color for a specific highlighted element, i.e., the color specified in the style file with the prefix `bg:' (see *note Output format style::) or the property `background-color' specified in a CSS file passed to `--style-css-file' (see *note Output format style using CSS::). Thus it should not be confused with the background color of the entire output (i.e., the one specified using `bgcolor' in a style file or the property `background-color' of the `body' selector in a CSS). The background color for the entire document is explained in *note Document template::. Note that the background color might not be available for all output formats. For instance, for HTML we only have: color "<font color=\"$style\">$text</font>" while for XHTML we have: color "<span style=\"color: $style\">$text</span>" bgcolor "<span style=\"background-color: $style\">$text</span>" Apart from the variable `$text' that we already saw, we have also the variable `$style', that will be replaced with the actual color. Source-highlight recognizes a number of color constants, see *note Output format style::. You then must associate a color constant to the color definition in the output format, through the `colormap' definition: colormap "color constant" "color representation" "color constant" "color representation" ... default "default color representation" end The `default' row (note the absence of `"') defines the color to be used in case a color constant is used during formatting, but it is not defined in the output format. For instance, for HTML we have: colormap "green" "#33CC00" "red" "#FF0000" "darkred" "#990000" "blue" "#0000FF" "brown" "#9A1900" "pink" "#CC33CC" "yellow" "#FFCC00" "cyan" "#66FFFF" "purple" "#993399" "orange" "#FF6600" "brightorange" "#FF9900" "brightgreen" "#33FF33" "darkgreen" "#009900" "black" "#000000" "teal" "#008080" "gray" "#808080" "darkblue" "#000080" default "#000000" end If your output format does not handle colors you can simply avoid the definitions of `color' and `colormap' and Source-highlight will simply ignore colors. The color is applied after applying the other styles, e.g., bold, italics, etc. Thus, by continuing the example of the previous section, suppose you defined the following output style for keywords: keyword blue i, b; then the `class' text will be replaced to `$text' variable and the value `#0000FF' to `$style' inside the color definition `<font color="$style">$text</font>' obtaining `<font color="#0000FF">class</font>' which will then be replaced to `$text' in `<b>$text</b>' and so on for italics, finally obtaining `<i><b><font color="#0000FF">class</font></b></i>'. ---------- Footnotes ---------- (1) Since version 2.6.  File: source-highlight.info, Node: Anchors and References, Next: One style, Prev: Colors, Up: Output Language Definitions 8.4 Anchors and References ========================== When using the command line option `--line-number-ref' (*note Invoking source-highlight::) an anchor is generated in the output file for each line numbering. The style of the anchor is defined by the definition `anchor'. If this is not defined, the option `--line-number-ref' has no effect. The `$linenum' variable will be replaced with the line number, and the `$text' variable with the actual text. For instance, for HTML we have anchor "<a name=\"$linenum\">$text</a>" Since version 2.2 source-highlight can also generate references to several elements (e.g., variables, class definitions, etc.), *note Generating References::. Also in this case the definition `anchor' is used; furthermore, the definition of `reference' is required. In the definition of `anchor' and `reference', apart from the variable `$linenum', we also have the variables `$infile' (the name of the original input file) and `$infilename' (the name of the original input file without the path) and in the definition of `reference' we also have the variable `$outfile' (the name of the file where the anchor is). One can decide how to define an anchor and a reference by using these two variables. For instance, for HTML we have reference "<a href=\"$outfile#$linenum\">$text</a>" Note, that in this case we use the `$outfile' since we actually generate a link to another (or possibly the same) output file. On the contrary, for LaTeX, since we do not generate a "clickable" reference, we refer to the original input file (we use both `$infilename' and `$linenum' in both definitions of `anchor' and `reference'): anchor "\label{$infilename:$linenum}$text" reference "{\hfill $text $\rightarrow$ $infile:$linenum, \ page~\pageref{$infilename:$linenum}}" In particular, we use `$infilename' for generating the `\label' and not `$infile' because the path symbol would "disturb" LaTeX (while we use the complete file path in the textual information of the reference). This will generate a right aligned reference. Note that it is assumed that when generating references in LaTeX one uses `--gen-references=postline' or `--gen-references=postdoc' and not `--gen-references=inline' (*note Generating References::), since it makes no sense to generate an inline reference (or at least I would not know how to generate a nice looking one :-). Furthermore, for Texinfo: anchor "@anchor{$infilename:$linenum}$text" reference "@flushright @xref{$infilename:$linenum,$text,$text $infile:$linenum}. @end flushright" Note that using both `$infilename' (and not `$infile' for the same reasons) and `$linenum' also in the definition of `anchor' somehow ensures that there are no duplicate anchors; this is done for LaTeX and Texinfo but not for HTML because it is assumed that the generated `.tex' and `.texinfo' file is included directly in a master file, as it is done in this manual (while, for instance, it is assumed that a separate HTML file is generated for each source and kept separate). If this is not your case you can change the definitions of `anchor' and `reference' as you see fit. Some examples of outputs with references in Texinfo are shown in *note Examples::. Indeed, one can use three more definitions for `reference' that corresponds to the three arguments that can be passed to `--gen-references' command line option (*note Generating References::): `inline_reference', `postline_reference' and `postdoc_reference'. If one of this not defined, then the same definition of `reference' is used. Having the possibility of specifying different definitions is useful for instance in the case of HTML: the same style for an inline reference is pretty ugly when used also for a postline or postdoc reference: postline_reference "<a href=\"$outfile#$linenum\">$text -> $infile:$linenum</a>" postdoc_reference "<a href=\"$outfile#$linenum\">$text -> $infile:$linenum</a>" reference "<a href=\"$outfile#$linenum\">$text</a>"  File: source-highlight.info, Node: One style, Next: Style template, Prev: Anchors and References, Up: Output Language Definitions 8.5 One style ============= If the output format you are defining does not have a specific style for bold, italics, ... and for colors you can simply use the definition `onestyle', where you can use both `$style' and `$text'. This will be used for any style (indeed any other definition such as bold, italics, color will be ignored). Indeed, in this case, it is assumed that the style of each source element is defined in a file with its own syntax, i.e., not with a syntax defined by Source-highlight. (This is the case, for instance, of HTML using CSS style sheets.) Moreover, since the output format style is not used, during formatting the variable `$style' will be replaced with the name of the element to highlight (e.g., `keyword', `comment', etc.). For instance, for HTML CSS, we simply have: onestyle "<span class=\"$style\">$text</span>" In fact, HTML CSS relies on style definitions provided in a separate file (the `.css' file indeed). Thus, when formatting a `keyword', e.g., `abstract', we will obtain: <span class="keyword">abstract</span> Of course, the style for `keyword' must be defined in the `.css' file.  File: source-highlight.info, Node: Style template, Next: Line prefix, Prev: One style, Up: Output Language Definitions 8.6 Style template ================== Some output formats are based on a unique template that where the other styles are composed; during composition the styles can be separated with a specific separator: styletemplate "..." styleseparator "..." This is used, for instance, for the ANSI color escape sequence output format (`esc.outlang'): styletemplate "\x1b[$stylem$text\x1b[m" styleseparator ";" bold "01$style" underline "04$style" italics "$style" color "$style" Note that, since more than one style can be mixed into the style template, `bold', `underline', ... explicitly use the variable `$style'.  File: source-highlight.info, Node: Line prefix, Next: String translation, Prev: Style template, Up: Output Language Definitions 8.7 Line prefix =============== This feature allows you to generate a string as the prefix of each generated line that corresponds to an input line (i.e., this prefix is not generated for other generated output elements, e.g., the lines in the header, footer, etc.). We use this feature in the LaTeX output (*note LaTeX output::): lineprefix "\mbox{}" This way each line in the LaTeX output is prefixed with `\mbox{}'(1). Another interesting example that uses `lineprefix' is the javadoc output, see *note Generating HTML output::. ---------- Footnotes ---------- (1) This is a sort of trick to insert spaces at the beginning of a line without using a tabular environment; without the leading `\mbox{}' these spaces would be ignored. This is the only way I found to achieve this, if you have suggestions, please let me know!  File: source-highlight.info, Node: String translation, Next: Document template, Prev: Line prefix, Up: Output Language Definitions 8.8 String translation ====================== Some character sequences that are in the source file may have a special meaning in an output format, so they need some preprocessing (e.g., escaping them). You can specify the translation table with: translations "original sequence" "transformed sequence" 'regex' "transformed sequence" ... end The difference between `"original sequence"' and `'regex''(1) is that with the former you specify a character sequence that will be matched literally, apart from special characters such as `\' (which, if needed to be inserted, must be escaped), `\n' (new line) and `\t' (tab character). Instead, with the latter, you can specify a regular expression (this is basically the same difference between `"' and `'' in language definitions, see *note Simple definitions::). For instance, for HTML, we have the following translation table: translations "&" "&amp;" "<" "&lt;" ">" "&gt;" end For LaTeX, the translation table is a little bit bigger; here we show only a little part, that shows how to escape special characters (such as `\'), to translate a new line character and tab character: translations "<" "$<$" ">" "$>$" "&" "\\&" "\\" "\\textbackslash{}" "\n" " \\\\\n" " " "\\ " "\t" "\\ \\ \\ \\ \\ \\ \\ \\ " end Note that, since a new character must be translated in LaTeX with `\\', we have to escape two `\' (i.e., `\\\\') and then we want to actually insert a new line in the output file `\n'. For HTML with not fixed font by default, `html_notfixed.outlang' (see *note HTML and XHTML output::), we need two translate two space sequence (i.e., two adjacent spaces, since in HTML more adjacent spaces are rendered as only one space(2), while we want them as they are), and we also need to translate a space starting a new line in the source (thus we use the regular expression `^ ', enclosed in `''); thus we have: translations "\n" "<br>\n" " " "&nbsp; " '^ ' "&nbsp;" # a space at the beginning of a line "\t" "&nbsp; &nbsp; &nbsp; &nbsp; " end ---------- Footnotes ---------- (1) Since version 2.4. (2) Unless they are inside a `<tt>...</tt>'.  File: source-highlight.info, Node: Document template, Next: Generating HTML output, Prev: String translation, Up: Output Language Definitions 8.9 Document template ===================== You can define the beginning and the end of an output file, with doctemplate "...beginning..." "...end..." end nodoctemplate "...beginning..." "...end..." end The first one is used when the `--doc' command line option is specified, while the second one is used in the other case(1). For instance, for HTML we have nodoctemplate "<!-- Generator: $additional --> $header<pre><tt>" "</tt></pre>$footer " end Note that in the end part there is an explicit new line. In the definition of the `doctemplate' and `nodoctemplate' the following variables can be used and will be replaced during the output generation: `$title' the value of the title for the output file (e.g., the one passed with the `--title' command line option; `$header' the contents of the file specified with the command line option `--header'; `$footer' the contents of the file specified with the command line option `--footer'; `$css' the value passed with the command line option `--css'; `$additional' other additional information. Source-highlight replaces this with its name and its version. `$docbgcolor(2)' the background color for the output document. Source-highlight replaces this with the value specified in the `bgcolor' of the `.style' file (see *note Output format style::) or in the `body' selector of the CSS file passed with `--style-css-file' (see *note Output format style using CSS::). For instance, for an HTML document with css, (file `htmlcss.outlang') we have: doctemplate "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\"> <html> <head> <meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\"> <meta name=\"GENERATOR\" content=\"$additional\"> <title>$title</title> <link rel=\"stylesheet\" href=\"$css\" type=\"text/css\"> </head> <body> $header<pre><tt>" "</tt></pre> $footer</body> </html> " end For an HTML document with header and footer, (file `html.outlang') we have (note the use of `$docbgcolor'): doctemplate "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML//EN\"> <html> <head> <meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\"> <meta name=\"GENERATOR\" content=\"$additional\"> <title>$title</title> </head> <body bgcolor=\"$docbgcolor\"> $header<pre><tt>" "</tt></pre> $footer</body> </html> " end And for an HTML table output (file `htmltable.outlang'): doctemplate "<table BGCOLOR=\"$docbgcolor\" NOSAVE > <tr NOSAVE> <td NOSAVE> <pre><tt>" "</tt></pre> </td> </tr> </table> " end ---------- Footnotes ---------- (1) Up to version 2.9, there was only `doctemplate' and for `--doc' there was a separate `.outlang' file; I think the present solution is better and reduces the number of files. (2) Since version 2.6.  File: source-highlight.info, Node: Generating HTML output, Prev: Document template, Up: Output Language Definitions 8.10 Generating HTML output =========================== As a complete example we show the file `html_common.outlang' which contains the common definitions for the various HTML output formats (`html.outlang', `htmltable.outlang', etc.): include "html_ref.outlang" extension "html" bold "<b>$text</b>" italics "<i>$text</i>" underline "<u>$text</u>" color "<font color=\"$style\">$text</font>" colormap "green" "#33CC00" "red" "#FF0000" "darkred" "#990000" "blue" "#0000FF" "brown" "#9A1900" "pink" "#CC33CC" "yellow" "#FFCC00" "cyan" "#66FFFF" "purple" "#993399" "orange" "#FF6600" "brightorange" "#FF9900" "brightgreen" "#33FF33" "darkgreen" "#009900" "black" "#000000" "teal" "#008080" "gray" "#808080" "darkblue" "#000080" "white" "#FFFFFF" default "#000000" end translations "&" "&amp;" "<" "&lt;" ">" "&gt;" end Moreover, this file is also used for generating javadoc output: include "html_common.outlang" doctemplate " * <!-- Generated by Source-highlight --> * <pre><tt> " " * </tt></pre> " end nodoctemplate " * <!-- Generated by Source-highlight --> * <pre><tt> " " * </tt></pre> " end lineprefix " * " translations "*/" "&#42;/" # this avoids the */ to be interpreted as # the end of a comment inside a javadoc comment end The javadoc output format is useful to format code snippets that have to be included inside a javadoc comment of another Java file(1). Apart from being formatted nicely in the generated HTML documentation, this also releases the programmer from escaping specific characters in the code snippet (i.e., `&', `<' and `>'). Note also that it also avoids the sequence `*/' to be interpreted as the closing of the (javadoc) comment. For instance, if you write this code: /** * This is an example of usage * * <pre><tt> * System.out.println("*/"); * </tt></pre> */ The resulting Java code contains a syntax error. If you use source-highlight to format the code to insert in a javadoc comment you will avoid these problems. An example of a javadoc generated HTML page containing a code snippet formatted with source-highlight can be found in the file `SimpleClass-doc.html' in the documentation directory. ---------- Footnotes ---------- (1) Although I haven't tested it, I think this will work also for Doxygen comments.  File: source-highlight.info, Node: Generating References, Next: Examples, Prev: Output Language Definitions, Up: Top 9 Generating References *********************** Since version 2.2 Source-highlight also produces references to fields, variables, etc. In order to do this it relies on the program _Exuberant Ctags_, by Darren Hiebert, available at `http://ctags.sourceforge.net'. Thus, you must install this program if you want Source-highlight to provide this feature. The `ctags' program generates an index (or "tag") file for a variety of language objects found in file(s). This allows these items to be quickly and easily located by a text editor or other utility (as in this case for Source-highlight). A "tag" signifies a language object for which an index entry is available (or, alternatively, the index entry created for that object)(1). This means that Source-highlight is able to generate references for a specific source language if and only if `ctags' handles such language. We refer to the command line options of `ctags': `--list-maps' and `--list-languages' to find out the associations of file extensions and supported languages. Reference generation is enable by using the command line option `--gen-references' (*note Invoking source-highlight::). This option takes an argument that rules how references will be generated: `inline' a reference pointer will be generated exactly in the same place of the specific element. This is useful in output formats that naturally supports links, such as HTML, while it is useless for output formats that do not support inline links, such as LaTeX. `postline' if a line of the input source contains elements for which we found references, the list of references will be generated right after the line (see the examples, *note Examples::). `postdoc' All the references will be generated after the whole input file has been generated. There is an exception: when an element has more than one reference (because a variable is defined in many sources or because a method is overloaded) then if `inline' is specified, the generation switches to `postline' for that occurrence. When `--gen-references' is specified, Source-highlight first invokes `ctags'. The use can customize this call by using the command line option `--ctags' (*note Invoking source-highlight::). In particular, if one does not want `ctags' to be invoked by Source-highlight (e.g., because the tags file has already been generated) then `--ctags' must be passed an empty string, `""'. In this case or when the specified `ctags' command line generates an alternative output tag file (the default generated file is `tags'), one must specify the exact tag file with the command line option `--ctags-file'. Once the tag file is generated, Source-highlight relies on the library `readtags' provided by the `ctags' distribution, and included in the Source-highlight sources. Note that if a program element is formatted according to a style that has the option `noref' (see *note Output format style::) then this element is not considered a tag, and no reference is generated. This is the case, for instance, for a `comment' element: each string that is generated with the `comment' style, since this is declared with the option `noref', it is not considered a tag (see *note Examples::). ---------- Footnotes ---------- (1) This description is taken from the ctags man page  File: source-highlight.info, Node: Examples, Next: Problems, Prev: Generating References, Up: Top 10 Examples *********** Here we provide some examples of sources formatted with Source-highlight using the `-f texinfo' command line option. Please keep in mind that the highlighting will not be visible in the Info file, but only in the printed manual and in the HTML output (well, at least line numbers are visible everywhere :-). * Menu: * Simple example:: * References:: * Line ranges:: * Line ranges (with context):: * Regex ranges::  File: source-highlight.info, Node: Simple example, Next: References, Prev: Examples, Up: Examples 10.1 Simple example =================== The first example is produced by using the command: source-highlight -f texinfo -i test.java -o test.java.texinfo -n and here's the result 01: /* 02: This is a classical Hello program 03: to test source-highlight with Java programs. 04: 05: to have an html translation type 06: 07: source-highlight -s java -f html -input Hello.java -output Hello.html 08: source-highlight -s java -f html < Hello.java > Hello.html 09: 10: or type source-highlight -help for the list of options 11: 12: written by 13: Lorenzo Bettini 14: http://www.lorenzobettini.it 15: http://www.gnu.org/software/src-highlite 16: */ 17: 18: package hello; 19: 20: import java.io.* ; 21: 22: /** 23: * <p> 24: * A simple Hello World class, used to demonstrate some 25: * features of Java source highlighting. 26: * </p> 27: * TODO: nothing, just to show an highlighted TODO or FIXME 28: * 29: * @author Lorenzo Bettini 30: * @version 2.0 31: */ /// class 32: public class Hello { 33: int foo = 1998 ; 34: int hex_foo = 0xCAFEBABE; 35: boolean b = false; 36: Integer i = null ; 37: char c = '\'', d = 'n', e = '\\' ; 38: String xml = "<tag attr=\"value\">&auml;</tag>", foo2 = "\\" ; 39: 40: /* mymethod */ 41: public void mymethod(int i) { 42: // just a foo method 43: } 44: /* mymethod */ 45: 46: /* main */ 47: public static void main( String args[] ) { 48: // just some greetings ;-) /* 49: System.out.println( "Hello from java2html :-)" ) ; 50: System.out.println( "\tby Lorenzo Bettini" ) ; 51: System.out.println( "\thttp://www.lorenzobettini.it" ) ; 52: if (argc > 0) 53: String param = argc[0]; 54: //System.out.println( "bye bye... :-D" ) ; // see you soon 55: } 56: /* main */ 57: } 58: /// class 59: 60: // end of file test.java  File: source-highlight.info, Node: References, Next: Line ranges, Prev: Simple example, Up: Examples 10.2 References =============== This example shows the use of `--gen-references' functionality. In particular, the following output is generated with the command: source-highlight -f texinfo -i test.h -o test_ref.h.texinfo -n \ --gen-references=postline and here's the result (note how the comment line containing the string `mysum' does not contain references, since it is a `comment' element, and this element has the option `noref' in the `texinfo.style', see *note Output format style::. The same holds for the `_TEXTGEN_H' comment in the last comment line). 01: /** 02: ** Copyright (C) 1999-2007 Lorenzo Bettini 03: ** 04: http://www.lorenzobettini.it 05: 06: r2 = r2 XOR (1<<10); 07: cout << "hello world" << endl; 08: ** 09: */ 10: 11: // this file also contains the definition of mysum as a #define 12: 13: // textgenerator.h : Text Generator class && 14: 15: #ifndef _TEXTGEN_H *Note _TEXTGEN_H: test.h:16. 16: #define _TEXTGEN_H 17: 18: #define foo(x) (x + 1) 19: 20: #define mysum myfunbody 21: 22: #include <iostream.h> // for cerr 23: 24: #include "genfun.h" /* for generating functions */ 25: 26: class TextGenerator { 27: public : 28: virtual void generate( const char *s ) const { (*sout) << s ; } 29: virtual void generate( const char *s, int start, int end ) const 30: { 31: for ( int i = start ; i <= end ; ++i ) 32: (*sout) << s[i] ; 33: return a<p->b ? a : 3; 34: } 35: virtual void generateln( const char *s ) const 36: { 37: generate( s ) ; *Note generate: test.h:28. *Note generate: test.h:29. 38: (*sout) << endl ; 39: } 40: virtual void generateEntire( const char *s ) const 41: { 42: startTextGeneration() ; *Note startTextGeneration: test.h:46. *Note startTextGeneration: test.h:70. 43: generate(s) ; *Note generate: test.h:28. *Note generate: test.h:29. 44: endTextGeneration() ; *Note endTextGeneration: test.h:47. *Note endTextGeneration: test.h:76. 45: } 46: virtual void startTextGeneration() const {} 47: virtual void endTextGeneration() const {} 48: virtual void beginText( const char *s ) const 49: { 50: startTextGeneration() ; *Note startTextGeneration: test.h:46. *Note startTextGeneration: test.h:70. 51: if ( s ) 52: generate( s ) ; *Note generate: test.h:28. *Note generate: test.h:29. 53: } 54: virtual void endText( const char *s ) const 55: { 56: if ( s ) 57: generate( s ) ; *Note generate: test.h:28. *Note generate: test.h:29. 58: endTextGeneration() ; *Note endTextGeneration: test.h:47. *Note endTextGeneration: test.h:76. 59: } 60: } ; 61: 62: // Decorator 63: class TextDecorator : public TextGenerator { *Note TextGenerator: test.h:26. 64: protected : 65: TextGenerator *decorated ; *Note TextGenerator: test.h:26. 66: 67: public : 68: TextDecorator( TextGenerator *t ) : decorated( t ) {} *Note TextGenerator: test.h:26. *Note decorated: test.h:65. 69: 70: virtual void startTextGeneration() const 71: { 72: startDecorate() ; 73: if ( decorated ) *Note decorated: test.h:65. 74: decorated->startTextGeneration() ; *Note startTextGeneration: test.h:46. *Note decorated: test.h:65. *Note startTextGeneration: test.h:70. 75: } 76: virtual void endTextGeneration() const 77: { 78: if ( decorated ) *Note decorated: test.h:65. 79: decorated->endTextGeneration() ; *Note endTextGeneration: test.h:47. *Note decorated: test.h:65. *Note endTextGeneration: test.h:76. 80: endDecorate() ; 81: mysum; *Note mysum: test.h:20. 82: } 83: 84: // pure virtual functions 85: virtual void startDecorate() const = 0 ; 86: virtual void endDecorate() const = 0 ; 87: } ; 88: 89: #endif // _TEXTGEN_H 90:  File: source-highlight.info, Node: Line ranges, Next: Line ranges (with context), Prev: References, Up: Examples 10.3 Line ranges ================ This is an example that uses `--line-range' command line option on the input file shown in *Note Simple example::: source-highlight -f texinfo -i test.java -n \ --line-range="12-18","29-34" This generates the following output 12: written by 13: Lorenzo Bettini 14: http://www.lorenzobettini.it 15: http://www.gnu.org/software/src-highlite 16: */ 17: 18: package hello; 29: * @author Lorenzo Bettini 30: * @version 2.0 31: */ /// class 32: public class Hello { 33: int foo = 1998 ; 34: int hex_foo = 0xCAFEBABE; Note that, although the specified line ranges span comment environments, the highlighting is respected: the starting of the comment is not printed, but the remaining parts of the comment are correctly highlighted as comment.  File: source-highlight.info, Node: Line ranges (with context), Next: Regex ranges, Prev: Line ranges, Up: Examples 10.4 Line ranges (with context) =============================== This is an example that uses the command line option `--line-range' together with the `--range-context' and `--range-separator': source-highlight -f texinfo -i test.java -n \ --line-range="12-18","29-34" \ --range-context=2 \ --range-separator="{... not in range ...}" This generates the following output {... not in range ...} 10: or type source-highlight --help for the list of options 11: 12: written by 13: Lorenzo Bettini 14: http://www.lorenzobettini.it 15: http://www.gnu.org/software/src-highlite 16: */ 17: 18: package hello; 19: 20: import java.io.* ; {... not in range ...} 27: * TODO: nothing, just to show an highlighted TODO or FIXME 28: * 29: * @author Lorenzo Bettini 30: * @version 2.0 31: */ /// class 32: public class Hello { 33: int foo = 1998 ; 34: int hex_foo = 0xCAFEBABE; 35: boolean b = false; 36: Integer i = null ; {... not in range ...} Note the two additional 2 lines before and after the ranges (compare it with the output in *note Line ranges::). Note that the (elements of the) context lines are not highlighted. Moreover, the range separator line `"{... not in range ...}"' is printed between ranges (the separator string is preformatted automatically, so, e.g., you don't have to escape special output characters, such as the { } in texinfo output).  File: source-highlight.info, Node: Regex ranges, Prev: Line ranges (with context), Up: Examples 10.5 Regex ranges ================= Ranges can be expressed also using regular expressions, with the command line option `--regex-range'. In this case the beginning of the range will be detected by a line containing (in any point) a string matching the specified regular expression; the end will be detected by a line containing a string matching the same regular expression that started the range. This feature is very useful when we want to document some code (e.g., in this very manual) by showing only specific parts, that are delimited in a ad-hoc way in the source code (e.g., with specific comment patterns). For instance, the following output was produced, starting from the source file shown in *Note Simple example::, by specifying: --regex-range="/// [[:alpha:]]+" Note that the lines containing `/// class', which determine the range, are not shown in the output: 32: public class Hello { 33: int foo = 1998 ; 34: int hex_foo = 0xCAFEBABE; 35: boolean b = false; 36: Integer i = null ; 37: char c = '\'', d = 'n', e = '\\' ; 38: String xml = "<tag attr=\"value\">&auml;</tag>", foo2 = "\\" ; 39: 40: /* mymethod */ 41: public void mymethod(int i) { 42: // just a foo method 43: } 44: /* mymethod */ 45: 46: /* main */ 47: public static void main( String args[] ) { 48: // just some greetings ;-) /* 49: System.out.println( "Hello from java2html :-)" ) ; 50: System.out.println( "\tby Lorenzo Bettini" ) ; 51: System.out.println( "\thttp://www.lorenzobettini.it" ) ; 52: if (argc > 0) 53: String param = argc[0]; 54: //System.out.println( "bye bye... :-D" ) ; // see you soon 55: } 56: /* main */ 57: } Furthermore, the line numbers are consistent with the lines of the original file. If we want to output only what is included between `/* main */', we specify (note that we must escape the special regular expression character `*'): --regex-range="/\* main \*/" and we get: 47: public static void main( String args[] ) { 48: // just some greetings ;-) /* 49: System.out.println( "Hello from java2html :-)" ) ; 50: System.out.println( "\tby Lorenzo Bettini" ) ; 51: System.out.println( "\thttp://www.lorenzobettini.it" ) ; 52: if (argc > 0) 53: String param = argc[0]; 54: //System.out.println( "bye bye... :-D" ) ; // see you soon 55: } If we want to show only the methods, which in the source file are delimited by comment lines containing the method's name, we can specify: --regex-range="/\* [[:alpha:]]+ \*/" 41: public void mymethod(int i) { 42: // just a foo method 43: } 47: public static void main( String args[] ) { 48: // just some greetings ;-) /* 49: System.out.println( "Hello from java2html :-)" ) ; 50: System.out.println( "\tby Lorenzo Bettini" ) ; 51: System.out.println( "\thttp://www.lorenzobettini.it" ) ; 52: if (argc > 0) 53: String param = argc[0]; 54: //System.out.println( "bye bye... :-D" ) ; // see you soon 55: } In this case, we might have also specified: --regex-range="/\* main \*/","/\* mymethod \*/" since `--regex-range' accepts multiple regular expressions. IMPORTANT: the order of regular expression specification is crucial, since they are tested in the same order they are specified at the command line.  File: source-highlight.info, Node: Problems, Next: Mailing Lists, Prev: Examples, Up: Top 11 Reporting Bugs ***************** If you find a bug in `source-highlight', please send electronic mail to `bug-source-highlight at gnu dot org' Include the version number, which you can find by running `source-highlight --version'. Also include in your message the output that the program produced and the output you expected. Even better, please file a bug report at Savannah site: `https://savannah.gnu.org/bugs/?group=src-highlite' If you have other questions, comments or suggestions about `source-highlight', contact the author via electronic mail (find the address at `http://www.lorenzobettini.it'). The author will try to help you out, although he may not have time to fix your problems.  File: source-highlight.info, Node: Mailing Lists, Next: Concept Index, Prev: Problems, Up: Top 12 Mailing Lists **************** The following mailing lists are available: `help-source-highlight at gnu dot org' for generic discussions about the program and for asking for help about it (open mailing list), `http://mail.gnu.org/mailman/listinfo/help-source-highlight' `info-source-highlight at gnu dot org' for receiving information about new releases and features (read-only mailing list), `http://mail.gnu.org/mailman/listinfo/info-source-highlight'. If you want to subscribe to a mailing list just go to the URL and follow the instructions, or send me an e-mail and I'll subscribe you. I'll describe new features in new releases also in my blog, at this URL: `http://tronprog.blogspot.com/search/label/source-highlight'  File: source-highlight.info, Node: Concept Index, Prev: Mailing Lists, Up: Top Concept Index ************* �[index�] * Menu: * "expression": Ways of specifying regular expressions. (line 15) * $infile: Anchors and References. (line 17) * $infilename: Anchors and References. (line 17) * $linenum: Anchors and References. (line 6) * $outfile: Anchors and References. (line 17) * $style: Colors. (line 6) * $text: Text styles. (line 23) * 'expression': Ways of specifying regular expressions. (line 34) * --data-dir <1>: Invoking source-highlight. (line 165) * --data-dir <2>: Configuration files. (line 14) * --data-dir: The program source-highlight-settings. (line 15) * --infer-lang <1>: How the input language is discovered. (line 42) * --infer-lang <2>: Invoking source-highlight. (line 229) * --infer-lang: Perl. (line 14) * --show-lang-elements <1>: Listing Language Elements. (line 13) * --show-lang-elements: Output format style. (line 9) * --style-css-file: Output format style using CSS. (line 10) * --style-file: Output format style. (line 99) * --with-doxygen: Installation. (line 67) * `expression`: Ways of specifying regular expressions. (line 59) * anchor: Generating References. (line 6) * ANSI color: ANSI color escape sequences. (line 6) * Apache: Related Software and Links. (line 63) * autoconf <1>: What you need to build source-highlight. (line 28) * autoconf: Anonymous Git Checkout. (line 35) * automake <1>: What you need to build source-highlight. (line 28) * automake: Anonymous Git Checkout. (line 35) * background color <1>: Colors. (line 11) * background color: Output format style. (line 12) * backreference <1>: Notes on regular expressions. (line 25) * backreference: Ways of specifying regular expressions. (line 60) * backtick: Ways of specifying regular expressions. (line 60) * bash completion: Installation. (line 58) * bgcolor: Output format style. (line 12) * bold <1>: Text styles. (line 6) * bold: Output format style. (line 116) * boost <1>: What you need to build source-highlight. (line 6) * boost: Building with qmake. (line 13) * Boost regex: Tips on installing Boost Regex library. (line 6) * bugs: Problems. (line 6) * building requirements: What you need to build source-highlight. (line 6) * CGI: Using source-highlight as a CGI. (line 6) * check-regexp: The program check-regexp. (line 6) * code2blog: Related Software and Links. (line 58) * color: Output format style. (line 107) * colors: Colors. (line 6) * compilation: Installation. (line 6) * compilation requirements: What you need to build source-highlight. (line 6) * conditional expressions: Notes on regular expressions. (line 105) * configuration files: Configuration files. (line 6) * Copying conditions: Copying. (line 6) * cpp2html: Installation. (line 76) * CSS: Output format style using CSS. (line 6) * ctags: Generating References. (line 6) * CXXFLAGS: Tips on installing Boost Regex library. (line 55) * debug: Debugging. (line 6) * default.lang <1>: Invoking source-highlight. (line 312) * default.lang: Using source-highlight as a simple formatter. (line 66) * default.style: Output format style. (line 6) * definition order: Order of definitions. (line 6) * delimited definitions: Delimited definitions. (line 6) * direct color scheme: Output format style. (line 191) * directories: Installation. (line 37) * DocBook: DocBook output. (line 6) * doctemplate: Document template. (line 8) * download: Download. (line 6) * doxygen: Installation. (line 67) * dynamic backreference: Dynamic Backreferences. (line 6) * environments: State/Environment Definitions. (line 6) * failsafe <1>: Invoking source-highlight. (line 301) * failsafe: Using source-highlight as a simple formatter. (line 60) * features: Introduction. (line 6) * file inclusion: File inclusion. (line 6) * Firefox: Related Software and Links. (line 76) * fixed <1>: Text styles. (line 6) * fixed: Output format style. (line 116) * Fortran: Fortran. (line 6) * getting help: Invoking source-highlight. (line 6) * Git: Anonymous Git Checkout. (line 6) * gnulib: What you need to build source-highlight. (line 29) * help: Invoking source-highlight. (line 6) * HTML: HTML and XHTML output. (line 6) * Ikiwiki: Related Software and Links. (line 81) * inline_reference: Anchors and References. (line 72) * installation: Installation. (line 6) * introduction: Introduction. (line 6) * invoking: Invoking source-highlight. (line 6) * italics <1>: Text styles. (line 6) * italics: Output format style. (line 116) * java2html <1>: Installation. (line 76) * java2html: Related Software and Links. (line 42) * KDE: Related Software and Links. (line 30) * Ksrc2highlight: Related Software and Links. (line 36) * language definition: Language Definitions. (line 6) * language inference: Invoking source-highlight. (line 229) * language map: Language map. (line 6) * LaTeX: LaTeX output. (line 6) * LDFLAGS: Tips on installing Boost Regex library. (line 71) * library <1>: Installation. (line 67) * library: Introduction. (line 23) * libtool <1>: What you need to build source-highlight. (line 28) * libtool: Anonymous Git Checkout. (line 35) * line ranges <1>: Line ranges (with context). (line 6) * line ranges <2>: Line ranges. (line 6) * line ranges: Invoking source-highlight. (line 248) * lines: Line wide definitions. (line 6) * lookahead asserts: Notes on regular expressions. (line 41) * lookbehind asserts: Notes on regular expressions. (line 93) * mailing list: Mailing Lists. (line 6) * marked subexpressions <1>: Notes on regular expressions. (line 18) * marked subexpressions: Ways of specifying regular expressions. (line 60) * matching strategy: How source-highlight works. (line 23) * MinGW: Building with qmake. (line 19) * MSVC: Building with qmake. (line 9) * msys: Building with qmake. (line 21) * nodoctemplate: Document template. (line 13) * nohilite.lang: Using source-highlight as a simple formatter. (line 9) * non-marking parenthesis: Notes on regular expressions. (line 11) * nonsensitive: Simple definitions. (line 76) * noref: Output format style. (line 164) * notfixed <1>: Text styles. (line 6) * notfixed: Output format style. (line 116) * one style: One style. (line 6) * options: Invoking source-highlight. (line 6) * output language definition: Output Language Definitions. (line 6) * output language map: Output Language map. (line 6) * output style: Output format style. (line 6) * Pastebin: Related Software and Links. (line 102) * patching: Patching from a previous version. (line 6) * Perl <1>: Related Software and Links. (line 98) * Perl: Perl. (line 6) * Php: Related Software and Links. (line 87) * postdoc_reference: Anchors and References. (line 72) * postline_reference: Anchors and References. (line 72) * prefix: How source-highlight works. (line 32) * problems: Problems. (line 6) * PyQt: Related Software and Links. (line 93) * Python: Related Software and Links. (line 93) * qmake: Building with qmake. (line 6) * QSource-Highlight: Related Software and Links. (line 19) * Qt: Related Software and Links. (line 11) * range context <1>: Line ranges (with context). (line 6) * range context: Invoking source-highlight. (line 248) * range separator <1>: Line ranges (with context). (line 6) * range separator: Invoking source-highlight. (line 248) * RapidWeaver: Related Software and Links. (line 69) * redef: Redefinitions and Substitutions. (line 11) * reference: Generating References. (line 6) * regex ranges <1>: Regex ranges. (line 6) * regex ranges: Invoking source-highlight. (line 280) * regular expressions: Notes on regular expressions. (line 6) * rpm: Building .rpm. (line 6) * sample: Simple Usage. (line 6) * shadow build <1>: Anonymous Git Checkout. (line 38) * shadow build: Installation. (line 16) * SHJS: Related Software and Links. (line 51) * simple language definition: Simple definitions. (line 6) * SIP: Related Software and Links. (line 93) * Source-Highlight-Qt: Related Software and Links. (line 11) * source-highlight-settings: The program source-highlight-settings. (line 6) * source-highlight.conf: The program source-highlight-settings. (line 12) * SOURCE_HIGHLIGHT_DATADIR <1>: Configuration files. (line 29) * SOURCE_HIGHLIGHT_DATADIR: The program source-highlight-settings. (line 19) * SourceHighlightIDE: Related Software and Links. (line 30) * states: State/Environment Definitions. (line 6) * style separator: Style template. (line 6) * style template: Style template. (line 6) * style.defaults: Default Styles. (line 16) * subst: Redefinitions and Substitutions. (line 40) * suffix: How source-highlight works. (line 38) * tail recursion: Concept Index. (line 6) * Texinfo: Texinfo output. (line 6) * underline <1>: Text styles. (line 6) * underline: Output format style. (line 116) * usage: Invoking source-highlight. (line 6) * variables: Variable definitions. (line 6) * version: Invoking source-highlight. (line 6) * Wiki: Related Software and Links. (line 81) * XHTML: HTML and XHTML output. (line 6)  Tag Table: Node: Top1133 Node: Introduction3056 Node: Supported languages4630 Ref: Supported languages-Footnote-19899 Node: The program source-highlight-settings10072 Node: Notes on some languages11029 Node: Fortran11586 Node: Perl12307 Node: Using source-highlight as a simple formatter13379 Ref: Using source-highlight as a simple formatter-Footnote-116675 Node: Related Software and Links16800 Node: Installation20854 Node: Building with qmake24031 Node: Download26374 Node: Anonymous Git Checkout27837 Ref: Anonymous Git Checkout-Footnote-129763 Node: What you need to build source-highlight29885 Ref: What you need to build source-highlight-Footnote-132139 Ref: What you need to build source-highlight-Footnote-232186 Ref: What you need to build source-highlight-Footnote-332233 Ref: What you need to build source-highlight-Footnote-432279 Node: Tips on installing Boost Regex library32324 Ref: Tips on installing Boost Regex library-Footnote-137547 Ref: Tips on installing Boost Regex library-Footnote-237694 Node: Patching from a previous version37861 Node: Using source-highlight with less38504 Node: Using source-highlight as a CGI39161 Node: Building .rpm39676 Node: Copying40125 Node: Simple Usage40551 Ref: Simple Usage-Footnote-143152 Node: HTML and XHTML output43319 Node: LaTeX output44338 Node: Texinfo output44851 Node: DocBook output45273 Node: ANSI color escape sequences45591 Node: Odf output46080 Node: Configuration files46539 Node: Output format style48237 Ref: Output format style-Footnote-155304 Ref: Output format style-Footnote-255452 Ref: Output format style-Footnote-355479 Ref: Output format style-Footnote-455645 Ref: Output format style-Footnote-555672 Ref: Output format style-Footnote-655766 Ref: Output format style-Footnote-755834 Ref: Output format style-Footnote-855900 Node: Output format style using CSS55927 Node: Default Styles60443 Ref: Default Styles-Footnote-162118 Node: Language map62145 Node: Language definition files63038 Ref: Language definition files-Footnote-163606 Node: Output Language map63703 Node: Output Language definition files64825 Ref: Output Language definition files-Footnote-165628 Node: Developing your own definition files65729 Node: Invoking source-highlight66561 Ref: Invoking source-highlight-Footnote-183431 Ref: Invoking source-highlight-Footnote-283588 Node: How the input language is discovered83650 Ref: How the input language is discovered-Footnote-185696 Ref: How the input language is discovered-Footnote-285723 Node: Language Definitions85752 Node: Ways of specifying regular expressions89482 Ref: Ways of specifying regular expressions-Footnote-194283 Ref: Ways of specifying regular expressions-Footnote-294310 Node: Simple definitions94675 Node: Line wide definitions99016 Node: Order of definitions99717 Node: Delimited definitions100499 Ref: Delimited definitions-Footnote-1102923 Node: Variable definitions103254 Node: Dynamic Backreferences104135 Ref: Dynamic Backreferences-Footnote-1106841 Ref: Dynamic Backreferences-Footnote-2106867 Node: File inclusion106996 Node: State/Environment Definitions108189 Node: Explicit subexpressions with names113737 Node: Redefinitions and Substitutions117436 Ref: Redefinitions and Substitutions-Footnote-1120094 Node: How source-highlight works120144 Ref: How source-highlight works-Footnote-1124122 Ref: How source-highlight works-Footnote-2124338 Node: Notes on regular expressions124399 Ref: Notes on regular expressions-Footnote-1129175 Ref: Notes on regular expressions-Footnote-2129233 Ref: Notes on regular expressions-Footnote-3129287 Node: The program check-regexp129509 Node: Listing Language Elements131837 Ref: Listing Language Elements-Footnote-1133253 Node: Concluding Remarks133280 Node: Debugging134358 Ref: Debugging-Footnote-1144385 Ref: Debugging-Footnote-2144512 Node: Tutorials on Language Definitions144617 Node: Highlighting C/C++ and C#146982 Ref: Highlighting C/C++ and C#-Footnote-1155804 Ref: Highlighting C/C++ and C#-Footnote-2155994 Ref: Highlighting C/C++ and C#-Footnote-3156082 Ref: Highlighting C/C++ and C#-Footnote-4156207 Node: Highlighting Diff files156504 Node: Pseudo semantic analysis163102 Node: Output Language Definitions168277 Node: File extension170627 Node: Text styles171248 Node: Colors172565 Ref: Colors-Footnote-1175806 Node: Anchors and References175833 Node: One style180030 Node: Style template181318 Node: Line prefix182100 Ref: Line prefix-Footnote-1182820 Node: String translation183086 Ref: String translation-Footnote-1185400 Ref: String translation-Footnote-2185427 Node: Document template185476 Ref: Document template-Footnote-1188586 Ref: Document template-Footnote-2188768 Node: Generating HTML output188795 Ref: Generating HTML output-Footnote-1191415 Node: Generating References191503 Ref: Generating References-Footnote-1194938 Node: Examples194996 Node: Simple example195544 Node: References197876 Ref: test.h:16199066 Ref: test.h:18199103 Ref: test.h:20199144 Ref: test.h:26199305 Ref: test.h:28199367 Ref: test.h:29199444 Ref: test.h:35199689 Ref: test.h:40200008 Ref: test.h:46200668 Ref: test.h:47200725 Ref: test.h:48200780 Ref: test.h:54201283 Ref: test.h:63201815 Ref: test.h:65201977 Ref: test.h:68202103 Ref: test.h:70202337 Ref: test.h:76202836 Node: Line ranges203615 Node: Line ranges (with context)204616 Node: Regex ranges206286 Node: Problems210114 Node: Mailing Lists210933 Node: Concept Index211793  End Tag Table �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/example-u.diff.texinfo���������������������������������������������������0000664�0001750�0001750�00000001147�11675045060�016667� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@c Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite @example diff -ruP source-highlight-2.1.1/source-highlight.spec ... @i{--- source-highlight-2.1.1/source-highlight.spec ...} @i{+++ source-highlight-2.1.2/source-highlight.spec ...} @b{@@@@ -6,8 +6,8 @@@@} Summary: syntax highlighting for source documents Name: source-highlight @i{-Version: 2.1.1} @i{-Release: 2.1.1} @i{+Version: 2.1.2} @i{+Release: 2.1.2} License: GPL Group: Utilities/Console Source: ftp://ftp.gnu.org/gnu/source-highlight/%@{name@}-%@{version@}.tar.gz @end example�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/extreme_comment2.lang.texinfo��������������������������������������������0000664�0001750�0001750�00000000511�11675045061�020253� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@c Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite @example @b{environment} @t{@i{comment}} = @t{'^[[:blank:]]*#[[:blank:]]*if[[:blank:]]+0'} @b{begin} @t{@i{comment}} @b{start} @t{'^[[:blank:]]*#[[:blank:]]*(else|endif)'} @b{exit} @b{end} @b{include} @t{"cpp.lang"} @end example���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/footer.html��������������������������������������������������������������0000644�0001750�0001750�00000001153�11672675561�014660� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������</td> </tr> </table> <hr> This file was generated with the following command: <pre> source-highlight -s cpp -f html -i cmdline.c -o cmdline.c.html --css="cpp2html.css" --header="./header.html" --footer="./footer.html"</pre> and these are <a href="header.html">header.html</a> and <a href="footer.html">footer.html</a>. <br> <tt>--header</tt> and <tt>--footer</tt> options are an idea of Xavier Outhier, for an earlier version of Java2html (now GNU Source-highlight), <a href="http://www.gnu.org/software/src-highlite">http://www.gnu.org/software/src-highlite</a><a href="http://www.gnu.org/software/src-highlite"></a> ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/styleformatterfactory.h.texinfo������������������������������������������0000664�0001750�0001750�00000003540�11675045063�020767� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@c Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite @example @b{struct} StyleFormatterFactory: @b{public} srchilite::FormatterFactory @{ StyleFormatterMap formatterMap; @b{bool} hasFormatter(@b{const} string &key) @b{const} @{ @b{return} formatterMap.find(key) != formatterMap.end(); @} @b{bool} createFormatter(@b{const} string &key, @b{const} string &color, @b{const} string &bgcolor, srchilite::StyleConstantsPtr styleconstants) @{ @b{if} (hasFormatter(key)) @b{return} @b{false}; StyleFormatter *formatter = @b{new} StyleFormatter(key); formatterMap[key] = StyleFormatterPtr(formatter); @b{if} (styleconstants.get()) @{ @b{for} (srchilite::StyleConstantsIterator it = styleconstants->begin(); it != styleconstants->end(); ++it) @{ @b{switch} (*it) @{ @b{case} srchilite::ISBOLD: formatter->bold = @b{true}; @b{break}; @b{case} srchilite::ISITALIC: formatter->italic = @b{true}; @b{break}; @b{case} srchilite::ISUNDERLINE: formatter->underline = @b{true}; @b{break}; @b{case} srchilite::ISFIXED: formatter->fixed = @b{true}; @b{break}; @b{case} srchilite::ISNOTFIXED: formatter->not_fixed = @b{true}; @b{break}; @b{case} srchilite::ISNOREF: @r{@i{// ignore references here}} @b{break}; @} @} @} formatter->color = color; formatter->bgColor = bgcolor; @b{return} @b{true}; @} @}; @end example����������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/css_example.css.texinfo��������������������������������������������������0000664�0001750�0001750�00000000727�11675045062�017162� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@c Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite @example body @{ @b{background-color:} <@i{color} @i{specification}>; @} @b{.selector} @{ @b{color:} <@i{color} @i{specification}>; @b{background-color:} <@i{color} @i{specification}>; @b{font-weight:} @i{bold}; @r{@i{/* this is a comment */}} @b{font-family:} @i{monospace}; @b{font-style:} @i{italic}; @b{text-decoration:} @i{underline}; @} @end example�����������������������������������������source-highlight-3.1.6/doc/sh_night.css�������������������������������������������������������������0000644�0001750�0001750�00000001641�11672675562�015014� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������body { background-color: #000044; color: #dd00ff; font-weight: normal; font-style: normal; } .keyword { color: #ffffff; font-weight: bold; font-style: normal; } .type { color: #f1157c; font-weight: bold; font-style: normal; } .string { color: #ffffff; font-weight: normal; font-style: normal; } .specialchar { color: #82d66d; font-weight: normal; font-style: normal; } .comment { color: #bfbfbf; font-weight: normal; font-style: normal; } .number { color: #8ee119; font-weight: normal; font-style: normal; } .preproc { color: #00bb00; font-weight: normal; font-style: normal; } .symbol { color: #e7ee5c; font-weight: bold; font-style: normal; } .function { color: #ff06cd; font-weight: bold; font-style: normal; } .cbracket { color: #e7ee5c; font-weight: bold; font-style: normal; } �����������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/comment-show.lang.texinfo������������������������������������������������0000664�0001750�0001750�00000001125�11675045061�017420� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@c Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite @example @b{vardef} @t{@i{TODO}} = @t{'(TODO|FIXME)([:]?)'} @b{environment} @t{@i{comment}} @b{delim} @t{"/**"} @t{"*/"} @b{multiline} @b{begin} @t{@i{type}} = @t{'@@[[:alpha:]]+'} @t{@i{todo}} = @t{@i{$TODO}} @b{end} @b{state} @t{@i{cbracket}} @b{delim} @t{"@{"} @t{"@}"} @b{escape} @t{"\\"} @b{multiline} @b{nested} @b{begin} @t{@i{keyword}} = @t{"if|then|else|endif"} @b{end} @t{@i{string}} @b{delim} @t{"<"} @t{">"} @t{@i{string2}} @b{delim} @t{"<<"} @t{">>"} @b{multiline} @end example�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/test_vardecl.cc.texinfo��������������������������������������������������0000664�0001750�0001750�00000000770�11675045062�017131� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@c Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite @example @r{@i{Integer}} i = 10; @r{@i{Boolean}} b; @r{@i{String}} args[]; @b{const} @r{@i{MyType}} args[]; @b{const} @r{@i{My_Type}} args[]; @r{@i{List<Integer>}} mylist; @r{@i{List<List<Integer> >}} mylist; myspace::@r{@i{InputStream}} iStream ; @r{@i{MyType}} *t; @r{@i{MyType}} **t; @b{const} @r{@i{MyType}} &t; @b{if} (argc > 0) @{ @} @r{@i{__mytype}} _i; @b{typedef} @r{@i{_mytype}} __i; @end example��������source-highlight-3.1.6/doc/example-c.diff�����������������������������������������������������������0000644�0001750�0001750�00000001512�11672675561�015200� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������diff -rc2P source-highlight-2.1.1/source-highlight.spec ... *** source-highlight-2.1.1/source-highlight.spec ... --- source-highlight-2.1.2/source-highlight.spec ... *************** *** 7,12 **** Summary: syntax highlighting for source documents Name: source-highlight ! Version: 2.1.1 ! Release: 2.1.1 License: GPL Group: Utilities/Console --- 7,12 ---- Summary: syntax highlighting for source documents Name: source-highlight ! Version: 2.1.2 ! Release: 2.1.2 License: GPL Group: Utilities/Console diff -rc2P source-highlight-2.1.1/src/latex.outlang ... *** source-highlight-2.1.1/src/latex.outlang ... --- source-highlight-2.1.2/src/latex.outlang ... *************** *** 35,37 **** --- 35,38 ---- "--" "-\\/-" "---" "-\\/-\\/-" + "\"" "\"{}" # avoids problems with some inputenc end ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/source-highlight.html����������������������������������������������������0000664�0001750�0001750�00001174544�11676050501�016632� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<html lang="en"> <head> <title>GNU Source-highlight 3.1.6</title> <meta http-equiv="Content-Type" content="text/html"> <meta name="description" content="GNU Source-highlight 3.1.6"> <meta name="generator" content="makeinfo 4.13"> <link title="Top" rel="top" href="#Top"> <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> <!-- This manual is for GNU Source-highlight (version 3.1.6, 24 December 2011), which given a source file, produces a document with syntax highlighting. Copyright (C) 2005-2008 Lorenzo Bettini, `http://www.lorenzobettini.it'. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with the Front-Cover Texts being "A GNU Manual," and with the Back-Cover Texts as in (a) below. A copy of the license is included in the section entitled "GNU Free Documentation License." (a) The FSF's Back-Cover Text is: "You have freedom to copy and modify this GNU Manual, like GNU software. Copies published by the Free Software Foundation raise funds for GNU development." --> <meta http-equiv="Content-Style-Type" content="text/css"> <style type="text/css"><!-- pre.display { font-family:inherit } pre.format { font-family:inherit } pre.smalldisplay { font-family:inherit; font-size:smaller } pre.smallformat { font-family:inherit; font-size:smaller } pre.smallexample { font-size:smaller } pre.smalllisp { font-size:smaller } span.sc { font-variant:small-caps } span.roman { font-family:serif; font-weight:normal; } span.sansserif { font-family:sans-serif; font-weight:normal; } --></style> </head> <body> <h1 class="settitle">GNU Source-highlight 3.1.6</h1> <div class="contents"> <h2>Table of Contents</h2> <ul> <li><a name="toc_Top" href="#Top">GNU Source-highlight</a> <li><a name="toc_Introduction" href="#Introduction">1 Introduction</a> <ul> <li><a href="#Supported-languages">1.1 Supported languages</a> <li><a href="#The-program-source_002dhighlight_002dsettings">1.2 The program <code>source-highlight-settings</code></a> <li><a href="#Notes-on-some-languages">1.3 Notes on some languages</a> <ul> <li><a href="#Fortran">1.3.1 Fortran</a> <li><a href="#Perl">1.3.2 Perl</a> </li></ul> <li><a href="#Using-source_002dhighlight-as-a-simple-formatter">1.4 Using source-highlight as a simple formatter</a> <li><a href="#Related-Software-and-Links">1.5 Related Software and Links</a> </li></ul> <li><a name="toc_Installation" href="#Installation">2 Installation</a> <ul> <li><a href="#Building-with-qmake">2.1 Building with qmake</a> <li><a href="#Download">2.2 Download</a> <li><a href="#Anonymous-Git-Checkout">2.3 Anonymous Git Checkout</a> <li><a href="#What-you-need-to-build-source_002dhighlight">2.4 What you need to build source-highlight</a> <li><a href="#Tips-on-installing-Boost-Regex-library">2.5 Tips on installing Boost Regex library</a> <li><a href="#Patching-from-a-previous-version">2.6 Patching from a previous version</a> <li><a href="#Using-source_002dhighlight-with-less">2.7 Using source-highlight with less</a> <li><a href="#Using-source_002dhighlight-as-a-CGI">2.8 Using source-highlight as a CGI</a> <li><a href="#Building-_002erpm">2.9 Building .rpm</a> </li></ul> <li><a name="toc_Copying" href="#Copying">3 Copying Conditions</a> <li><a name="toc_Simple-Usage" href="#Simple-Usage">4 Simple Usage</a> <ul> <li><a href="#HTML-and-XHTML-output">4.1 HTML and XHTML output</a> <li><a href="#LaTeX-output">4.2 LaTeX output</a> <li><a href="#Texinfo-output">4.3 Texinfo output</a> <li><a href="#DocBook-output">4.4 DocBook output</a> <li><a href="#ANSI-color-escape-sequences">4.5 ANSI color escape sequences</a> <li><a href="#Odf-output">4.6 Odf output</a> </li></ul> <li><a name="toc_Configuration-files" href="#Configuration-files">5 Configuration files</a> <ul> <li><a href="#Output-format-style">5.1 Output format style</a> <li><a href="#Output-format-style-using-CSS">5.2 Output format style using CSS</a> <li><a href="#Default-Styles">5.3 Default Styles</a> <li><a href="#Language-map">5.4 Language map</a> <li><a href="#Language-definition-files">5.5 Language definition files</a> <li><a href="#Output-Language-map">5.6 Output Language map</a> <li><a href="#Output-Language-definition-files">5.7 Output Language definition files</a> <li><a href="#Developing-your-own-definition-files">5.8 Developing your own definition files</a> </li></ul> <li><a name="toc_Invoking-source_002dhighlight" href="#Invoking-source_002dhighlight">6 Invoking <samp><span class="command">source-highlight</span></samp></a> <ul> <li><a href="#How-the-input-language-is-discovered">6.1 How the input language is discovered</a> </li></ul> <li><a name="toc_Language-Definitions" href="#Language-Definitions">7 Language Definitions</a> <ul> <li><a href="#Ways-of-specifying-regular-expressions">7.1 Ways of specifying regular expressions</a> <li><a href="#Simple-definitions">7.2 Simple definitions</a> <li><a href="#Line-wide-definitions">7.3 Line wide definitions</a> <li><a href="#Order-of-definitions">7.4 Order of definitions</a> <li><a href="#Delimited-definitions">7.5 Delimited definitions</a> <li><a href="#Variable-definitions">7.6 Variable definitions</a> <li><a href="#Dynamic-Backreferences">7.7 Dynamic Backreferences</a> <li><a href="#File-inclusion">7.8 File inclusion</a> <li><a href="#State_002fEnvironment-Definitions">7.9 State/Environment Definitions</a> <li><a href="#Explicit-subexpressions-with-names">7.10 Explicit subexpressions with names</a> <li><a href="#Redefinitions-and-Substitutions">7.11 Redefinitions and Substitutions</a> <li><a href="#How-source_002dhighlight-works">7.12 How source-highlight works</a> <li><a href="#Notes-on-regular-expressions">7.13 Notes on regular expressions</a> <li><a href="#The-program-check_002dregexp">7.14 The program <samp><span class="command">check-regexp</span></samp></a> <li><a href="#Listing-Language-Elements">7.15 Listing Language Elements</a> <li><a href="#Concluding-Remarks">7.16 Concluding Remarks</a> <li><a href="#Debugging">7.17 Debugging</a> <li><a href="#Tutorials-on-Language-Definitions">7.18 Tutorials on Language Definitions</a> <ul> <li><a href="#Highlighting-C_002fC_002b_002b-and-C_0023">7.18.1 Highlighting C/C++ and C#</a> <li><a href="#Highlighting-Diff-files">7.18.2 Highlighting Diff files</a> <li><a href="#Pseudo-semantic-analysis">7.18.3 Pseudo semantic analysis</a> </li></ul> </li></ul> <li><a name="toc_Output-Language-Definitions" href="#Output-Language-Definitions">8 Output Language Definitions</a> <ul> <li><a href="#File-extension">8.1 File extension</a> <li><a href="#Text-styles">8.2 Text styles</a> <li><a href="#Colors">8.3 Colors</a> <li><a href="#Anchors-and-References">8.4 Anchors and References</a> <li><a href="#One-style">8.5 One style</a> <li><a href="#Style-template">8.6 Style template</a> <li><a href="#Line-prefix">8.7 Line prefix</a> <li><a href="#String-translation">8.8 String translation</a> <li><a href="#Document-template">8.9 Document template</a> <li><a href="#Generating-HTML-output">8.10 Generating HTML output</a> </li></ul> <li><a name="toc_Generating-References" href="#Generating-References">9 Generating References</a> <li><a name="toc_Examples" href="#Examples">10 Examples</a> <ul> <li><a href="#Simple-example">10.1 Simple example</a> <li><a href="#References">10.2 References</a> <li><a href="#Line-ranges">10.3 Line ranges</a> <li><a href="#Line-ranges-_0028with-context_0029">10.4 Line ranges (with context)</a> <li><a href="#Regex-ranges">10.5 Regex ranges</a> </li></ul> <li><a name="toc_Problems" href="#Problems">11 Reporting Bugs</a> <li><a name="toc_Mailing-Lists" href="#Mailing-Lists">12 Mailing Lists</a> <li><a name="toc_Concept-Index" href="#Concept-Index">Concept Index</a> </li></ul> </div> <div class="node"> <a name="Top"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#Introduction">Introduction</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#dir">(dir)</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#dir">(dir)</a> </div> <h2 class="unnumbered">GNU Source-highlight</h2> <p>GNU Source-highlight, given a source file, produces a document with syntax highlighting. <p>This is Edition 3.1.6 of the Source-highlight manual. <p>This file documents GNU Source-highlight version 3.1.6. <p>This manual is for GNU Source-highlight (version 3.1.6, 24 December 2011), which given a source file, produces a document with syntax highlighting. <p>Copyright &copy; 2005-2008 Lorenzo Bettini, <a href="http://www.lorenzobettini.it">http://www.lorenzobettini.it</a>. <blockquote> Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with the Front-Cover Texts being &ldquo;A GNU Manual,&rdquo; and with the Back-Cover Texts as in (a) below. A copy of the license is included in the section entitled &ldquo;GNU Free Documentation License.&rdquo; <p>(a) The FSF's Back-Cover Text is: &ldquo;You have freedom to copy and modify this GNU Manual, like GNU software. Copies published by the Free Software Foundation raise funds for GNU development.&rdquo; </blockquote> <!-- All the nodes can be updated using the EMACS command --> <!-- texinfo-every-node-update, which is normally bound to C-c C-u C-e. --> <!-- @node Top, Introduction, (dir), (dir) --> <!-- All the menus can be updated with the EMACS command --> <!-- texinfo-all-menus-update, which is normally bound to C-c C-u C-a. --> <ul class="menu"> <li><a accesskey="1" href="#Introduction">Introduction</a>: What's it for? <li><a accesskey="2" href="#Installation">Installation</a>: Download and installation <li><a accesskey="3" href="#Copying">Copying</a>: Licence issues <li><a accesskey="4" href="#Simple-Usage">Simple Usage</a>: Very basic usage <li><a accesskey="5" href="#Configuration-files">Configuration files</a>: Files needed for execution <li><a accesskey="6" href="#Invoking-source_002dhighlight">Invoking source-highlight</a>: How to run <samp><span class="command">source-highlight</span></samp>. <li><a accesskey="7" href="#Language-Definitions">Language Definitions</a>: How to define an input language <li><a accesskey="8" href="#Output-Language-Definitions">Output Language Definitions</a>: How to define an output format <li><a accesskey="9" href="#Generating-References">Generating References</a>: Anchors and cross references <li><a href="#Examples">Examples</a>: Some output examples <li><a href="#Problems">Problems</a>: Reporting bugs. <li><a href="#Mailing-Lists">Mailing Lists</a> <li><a href="#Concept-Index">Concept Index</a>: Index of concepts. </ul> <div class="node"> <a name="Introduction"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#Installation">Installation</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#Top">Top</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a> </div> <h2 class="chapter">1 Introduction</h2> <p><a name="index-introduction-1"></a><a name="index-features-2"></a> GNU Source-highlight, given a source file, produces a document with syntax highlighting. The colors and the styles can be specified (bold, italics, underline) by means of a configuration file, and some other options can be specified at the command line. <p>The program already recognizes many programming languages (e.g., C++, Java, Perl, etc.) and file formats (e.g., log files, ChangeLog, etc.), and some output formats (e.g., HTML, ANSI color escape sequences, LaTeX, etc.). Since version 2.0, it allows you to specify your own input source language via a simple syntax described later in this manual (<a href="#Language-Definitions">Language Definitions</a>). Since version 2.1, it allows you to specify your own output format language via a simple syntax described later in this manual (<a href="#Output-Language-Definitions">Output Language Definitions</a>). Since version 2.2, it is able to generate cross references (e.g., to variable names, field names, etc.) by relying on the program <em>ctags</em>, <a href="http://ctags.sourceforge.net">http://ctags.sourceforge.net</a> (<a href="#Generating-References">Generating References</a>). <p><a name="index-library-3"></a>Since version 3.0, GNU Source-highlight also provides a C++ library (which is used by the main program itself), that can be used by C++ programmers to add highlighting functionalities to their programs. see <a href="source-highlight-info.html#Introduction">Introduction</a>. <ul class="menu"> <li><a accesskey="1" href="#Supported-languages">Supported languages</a> <li><a accesskey="2" href="#The-program-source_002dhighlight_002dsettings">The program source-highlight-settings</a> <li><a accesskey="3" href="#Notes-on-some-languages">Notes on some languages</a> <li><a accesskey="4" href="#Using-source_002dhighlight-as-a-simple-formatter">Using source-highlight as a simple formatter</a> <li><a accesskey="5" href="#Related-Software-and-Links">Related Software and Links</a> </ul> <div class="node"> <a name="Supported-languages"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#The-program-source_002dhighlight_002dsettings">The program source-highlight-settings</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#Introduction">Introduction</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Introduction">Introduction</a> </div> <h3 class="section">1.1 Supported languages</h3> <p>The complete list of languages (indeed, file extensions) natively supported by this version of Source-highlight (3.1.6), as reported by <code>--lang-list</code>, is the following: <pre class="example"> C = cpp.lang H = cpp.lang ac = m4.lang ada = ada.lang adb = ada.lang am = makefile.lang applescript = applescript.lang asm = asm.lang autoconf = m4.lang awk = awk.lang bash = sh.lang bat = bat.lang batch = bat.lang bib = bib.lang bison = bison.lang c = c.lang caml = caml.lang cbl = cobol.lang cc = cpp.lang changelog = changelog.lang clipper = clipper.lang cls = latex.lang cobol = cobol.lang conf = conf.lang cpp = cpp.lang cs = csharp.lang csh = sh.lang csharp = csharp.lang css = css.lang ctp = php.lang d = d.lang desktop = desktop.lang diff = diff.lang dmd = d.lang docbook = xml.lang dtx = latex.lang el = lisp.lang eps = postscript.lang erl = erlang.lang erlang = erlang.lang errors = errors.lang fixed-fortran = fixed-fortran.lang flex = flex.lang fortran = fortran.lang free-fortran = fortran.lang glsl = glsl.lang h = cpp.lang haskell = haskell.lang haxe = haxe.lang hh = cpp.lang hpp = cpp.lang hs = haskell.lang htm = html.lang html = html.lang hx = haxe.lang in = makefile.lang ini = desktop.lang java = java.lang javalog = javalog.lang javascript = javascript.lang js = javascript.lang kcfg = xml.lang kdevelop = xml.lang kidl = xml.lang ksh = sh.lang l = flex.lang lang = langdef.lang langdef = langdef.lang latex = latex.lang ldap = ldap.lang ldif = ldap.lang lex = flex.lang lgt = logtalk.lang lhs = haskell_literate.lang lisp = lisp.lang ll = flex.lang log = log.lang logtalk = logtalk.lang lsm = lsm.lang lua = lua.lang m4 = m4.lang makefile = makefile.lang manifest = manifest.lang mf = manifest.lang ml = caml.lang mli = caml.lang moc = cpp.lang opa = opa.lang outlang = outlang.lang oz = oz.lang pas = pascal.lang pascal = pascal.lang patch = diff.lang pc = pc.lang perl = perl.lang php = php.lang php3 = php.lang php4 = php.lang php5 = php.lang pkgconfig = pc.lang pl = prolog.lang pm = perl.lang po = po.lang postscript = postscript.lang pot = po.lang prg = clipper.lang prolog = prolog.lang properties = properties.lang proto = proto.lang protobuf = proto.lang ps = postscript.lang py = python.lang python = python.lang rb = ruby.lang rc = xml.lang ruby = ruby.lang s = asm.lang scala = scala.lang scheme = scheme.lang scm = scheme.lang scpt = applescript.lang sh = sh.lang shell = sh.lang sig = sml.lang sl = slang.lang slang = slang.lang slsh = slang.lang sml = sml.lang spec = spec.lang sql = sql.lang sty = latex.lang style = style.lang syslog = log.lang tcl = tcl.lang tcsh = sh.lang tex = latex.lang texi = texinfo.lang texinfo = texinfo.lang tk = tcl.lang tml = tml.lang txt = nohilite.lang ui = xml.lang upc = upc.lang vala = vala.lang vbs = vbscript.lang vbscript = vbscript.lang xhtml = xml.lang xml = xml.lang xorg = xorg.lang y = bison.lang yacc = bison.lang yy = bison.lang </pre> <p>The complete list of output formats natively supported by this version of Source-highlight (3.1.6), as reported by <code>--outlang-list</code>, is the following: <pre class="example"> docbook = docbook.outlang esc = esc.outlang html = html.outlang html-css = htmlcss.outlang htmltable = htmltable.outlang javadoc = javadoc.outlang latex = latex.outlang latexcolor = latexcolor.outlang mediawiki = mediawiki.outlang odf = odf.outlang texinfo = texinfo.outlang xhtml = xhtml.outlang xhtml-css = xhtmlcss.outlang xhtmltable = xhtmltable.outlang </pre> <p class="noindent">The meaning of the suffix <code>-css</code> is explained in <a href="#Output-Language-map">Output Language map</a><a rel="footnote" href="#fn-1" name="fnd-1"><sup>1</sup></a>. <p>Please, keep in mind, that I haven't tested personally all these language definitions: I actually checked that the definition files are syntactically correct (with the command line option <code>--check-lang</code> and <code>--check-outlang</code>, <a href="#Invoking-source_002dhighlight">Invoking source-highlight</a>), but I'm not sure their definition actually respects that language syntax (e.g., I've put up together some language definitions by searching for information in the Internet, but I've never programmed in that language). So, if you find that a language definition is not precise, please let me know. Moreover, if you have a program example in a language that's not included in the <samp><span class="file">tests</span></samp> directory, please send it to me so that I can include it in the test suite. <div class="node"> <a name="The-program-source-highlight-settings"></a> <a name="The-program-source_002dhighlight_002dsettings"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#Notes-on-some-languages">Notes on some languages</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#Supported-languages">Supported languages</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Introduction">Introduction</a> </div> <h3 class="section">1.2 The program <code>source-highlight-settings</code></h3> <p><a name="index-source_002dhighlight_002dsettings-4"></a>Since version 3.0, GNU Source-highlight includes also the program <code>source-highlight-settings</code>, which can be used to check whether source-highlight will be able find its language definition files, and other configuration files, and in case, to store the correct settings in a configuration file, in the user home directory. <p><a name="index-source_002dhighlight_002econf-5"></a>In particular, the stored configuration file will be called <samp><span class="file">source-highlight.conf</span></samp> and stored in <samp><span class="file">$HOME/.source-highlight/</span></samp>. <p><a name="index-g_t_0040code_007b_002d_002ddata_002ddir_007d-6"></a>For the moment, this file only stores the default value for the <code>--data-dir</code> option. <p>The user can always override the contents of this configuration file, and the default hardcoded value, by using the environment variable <a name="index-g_t_0040code_007bSOURCE_005fHIGHLIGHT_005fDATADIR_007d-7"></a><code>SOURCE_HIGHLIGHT_DATADIR</code>. <div class="node"> <a name="Notes-on-some-languages"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#Using-source_002dhighlight-as-a-simple-formatter">Using source-highlight as a simple formatter</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#The-program-source_002dhighlight_002dsettings">The program source-highlight-settings</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Introduction">Introduction</a> </div> <h3 class="section">1.3 Notes on some languages</h3> <p>In this section I'd like to go into details on the highlighting of some specific programming languages. These notes might be useful when the highlighted language has some &ldquo;dialects&rdquo; that might require some further specification at the command line (e.g., to select a specific dialect). <ul class="menu"> <li><a accesskey="1" href="#Fortran">Fortran</a> <li><a accesskey="2" href="#Perl">Perl</a> </ul> <div class="node"> <a name="Fortran"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#Perl">Perl</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#Notes-on-some-languages">Notes on some languages</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Notes-on-some-languages">Notes on some languages</a> </div> <h4 class="subsection">1.3.1 Fortran</h4> <p><a name="index-Fortran-8"></a>As Toby White explained to me, Fortran comes into different &ldquo;flavors&rdquo;: a fixed-format, where some characters have a different semantics depending on their column position in the source file, and a free-format where this is not true. For instance, in the former, <code>*</code> and <code>c</code> start a command line, but only if they are specified in the first column (while this is not true in the free-format). <p>By default, the free-format is assumed for Fortran files; if you want to use the fixed-format, you need to specify <code>fortran-fixed</code> at the <code>--src-lang</code> command line option. <div class="node"> <a name="Perl"></a> <p><hr> Previous:&nbsp;<a rel="previous" accesskey="p" href="#Fortran">Fortran</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Notes-on-some-languages">Notes on some languages</a> </div> <h4 class="subsection">1.3.2 Perl</h4> <p><a name="index-Perl-9"></a>Perl syntax forms, especially its regular expression specifications, are quite a nightmare ;-) I tried to specify as much as possible in the <samp><span class="file">perl.lang</span></samp> but some particular regular expressions might not be highlighted correctly. Actually, I never programmed in Perl, so, if you see that some parts of your Perl programs are not highlighted correctly, please do not hesitate to contact me, so that I can improve Perl highlighting. <p><a name="index-g_t_0040code_007b_002d_002dinfer_002dlang_007d-10"></a>Moreover, although the standard extension for Perl files is <code>.pl</code>, since the Prolog language definition was implemented in source-highlight before Perl, this extension is assigned, by default, to Prolog files. However, you can use <code>--infer-lang</code> command line option, so that source-highlight can try to detect the language by inspecting the first lines of the input file (<a href="#How-the-input-language-is-discovered">How the input language is discovered</a>); you can also use <code>--src-lang=perl</code> command line specification to explicitly require Perl highlighting. <div class="node"> <a name="Using-source-highlight-as-a-simple-formatter"></a> <a name="Using-source_002dhighlight-as-a-simple-formatter"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#Related-Software-and-Links">Related Software and Links</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#Notes-on-some-languages">Notes on some languages</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Introduction">Introduction</a> </div> <h3 class="section">1.4 Using source-highlight as a simple formatter</h3> <p>You can also use source-highlight as a simple formatter of input file, i.e., without performing any highlighting<a rel="footnote" href="#fn-2" name="fnd-2"><sup>2</sup></a>. <p><a name="index-nohilite_002elang-11"></a>You can achieve this by using, as the language definition file for input sources the file <samp><span class="file">nohilite.lang</span></samp>, using the command line option <code>--lang-def</code> (<a href="#Invoking-source_002dhighlight">Invoking source-highlight</a>). Since that language definition is empty, no highlighting will be performed; however, source-highlight will transform the input file in the output format. Note, in the input language associations in <a href="#Supported-languages">Supported languages</a>, that <samp><span class="file">nohilite.lang</span></samp> is also associated to txt files. <p>This, for instance, makes source-highlight useful in cases you want to transform a text file into HTML or LaTeX. During the output, in fact, source-highlight will correctly generate characters that have a specific meanings in the output format. <p>For instance, in this Texinfo manual, if I want to insert a @ or a { I have to &ldquo;escape&rdquo; them to make them appear literally since they have a special meaning in Texinfo. The same holds, e.g., for <code>&lt;</code>, <code>&gt;</code> or <code>&amp;</code> in HTML. If you use source-highlight, it will take care of this, automatically for you. This is the Texinfo source of the above sentence: <!-- Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite --> <pre class="example"> For instance, in this Texinfo manual, if I want to insert a @@ or a @{ I have to ``escape'' them to make them appear literally since they have a special meaning in Texinfo. The same holds, e.g., for @code{&lt;}, @code{&gt;} or @code{&amp;} in HTML. If you use source-highlight, it will take care of this, automatically for you. </pre> <p class="noindent">This was processed by source-highlight as a simple text file, without no highlighting; however since it was formatted in Texinfo, all the necessary escaping was automatically performed. This way, it is very easy to insert, in the same document, a code, and its result (as in this example). <p>This is actually the formatting performed by source-highlight; except for the comment, this is basically what you should have written yourself to do all the escaping stuff manually: <!-- Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite --> <pre class="example"> @c Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite @example For instance, in this Texinfo manual, if I want to insert a @@@@ or a @@@{ I have to ``escape'' them to make them appear literally since they have a special meaning in Texinfo. The same holds, e.g., for @@code@{&lt;@}, @@code@{&gt;@} or @@code@{&amp;@} in HTML. If you use source-highlight, it will take care of this, automatically for you. @end example </pre> <p><a name="index-failsafe-12"></a>In case source-highlight does not handle a specific input language, you can still use the option <code>--failsafe</code> (<a href="#Invoking-source_002dhighlight">Invoking source-highlight</a>) and also in that case no highlighting will be performed, but source-highlight will transform the input file in the output format. <p><a name="index-default_002elang-13"></a>Note, however, that if the input language cannot be established, the <samp><span class="file">default.lang</span></samp> will be used: an empty language definition file which you might want to customize. <div class="node"> <a name="Related-Software-and-Links"></a> <p><hr> Previous:&nbsp;<a rel="previous" accesskey="p" href="#Using-source_002dhighlight-as-a-simple-formatter">Using source-highlight as a simple formatter</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Introduction">Introduction</a> </div> <h3 class="section">1.5 Related Software and Links</h3> <p>Here we list some software related to source-highlight in the sense that it uses it as a backend (i.e., provides an interface to source-highlight) or it uses some of its features (e.g., definition files): <ul> <li><a name="index-Source_002dHighlight_002dQt-14"></a><a name="index-Qt-15"></a>Source-highlight-qt is a library for performing syntax highlighting in Qt documents by relying on GNU Source-Highlight library. This library provides an implementation of the qt abstract class QSyntaxHighlighter class, and it deals both with Qt3 and Qt4. <p><a href="http://srchiliteqt.sourceforge.net">http://srchiliteqt.sourceforge.net</a>. <li><a name="index-QSource_002dHighlight-16"></a><a name="index-Qt-17"></a>QSource-Highlight is a Qt4 front-end for GNU Source-Highlight (it relies on the library Source-Highlight-Qt). You can highlight your code on the fly, and have the highlighted output in all the formats supported by source-highlight (e.g., HTML, LaTeX, Texinfo, etc.). You can then copy the formatted output and paste it (e.g., in your blog), or save it to a file. A preview of the highlighted output is available for some output formats (e.g., HTML, XHTML, etc.). <p><a href="http://qsrchilite.sourceforge.net">http://qsrchilite.sourceforge.net</a>. <li><a name="index-SourceHighlightIDE-18"></a><a name="index-KDE-19"></a>SourceHighlightIDE is a small IDE (based on Qt4 and Source-highlight-qt) I wrote for developing and debugging new language definitions for source-highlight: <p><a href="http://srchighliteide.sourceforge.net">http://srchighliteide.sourceforge.net</a>. <li><a name="index-Ksrc2highlight-20"></a><a name="index-KDE-21"></a>Martin Gebert implemented a KDE interface to source-highlight programs (and he did a wonderful job!), and it is called <em>Ksrc2highlight</em>; if you want to test it: <p><a href="http://www.mgebert.de/Ksrc2highlight">http://www.mgebert.de/Ksrc2highlight</a>. <li><a name="index-java2html-22"></a>There's also a Java version of java2html, you can find it at <p><a href="http://www.generationjava.com/projects/Java2Html.shtml">http://www.generationjava.com/projects/Java2Html.shtml</a>. <li>This web site provides a web interface to source-highlight so that you can highlight your code on-line: <p><a href="http://www.alaide.com/outils_colorsyntaxe.php">http://www.alaide.com/outils_colorsyntaxe.php</a> <li><a name="index-SHJS-23"></a>SHJS is a JavaScript program that highlights source code passages in HTML documents. Documents using SHJS are highlighted on the client side by the web browser. SHJS uses language definitions from Source-highlight. <p><a href="http://shjs.sourceforge.net">http://shjs.sourceforge.net</a> <li><a name="index-code2blog-24"></a>Code2blog is a pyGTK front-end to source-highlight for easy conversion from source code to HTML. <p><a href="http://code.google.com/p/code2blog">http://code.google.com/p/code2blog</a> <li><a name="index-Apache-25"></a>Andy Buckley wrote a wrapper around source-highlight, which can be used as an Apache filter to highlight source code in Web pages on the fly. <p><a href="http://www.insectnation.org/projects/filter-src-highlight">http://www.insectnation.org/projects/filter-src-highlight</a> <li><a name="index-RapidWeaver-26"></a>Roger Nilsson wrote a frontend for source-highlight that is used in a popular webdesign app for OSX called RapidWeaver. The frontend is called High-Light and allows users to easily add syntax-colored code inside RapidWeaver. <p><a href="http://nilrogsplace.se/webdesign/rapidweaver/plugins/high-light/index_en.html">http://nilrogsplace.se/webdesign/rapidweaver/plugins/high-light/index_en.html</a> <li><a name="index-Firefox-27"></a>Mauricio Zepeda published in his blog an article with a script to automatically highlight a file and show it in Firefox: <p><a href="http://chillorb.com/?p=122">http://chillorb.com/?p=122</a> <li><a name="index-Wiki-28"></a><a name="index-Ikiwiki-29"></a>Jason Blevins made a plugin for Ikiwiki that enables syntax highlighting of source code fragments and whole files via source-highlight. <p><a href="http://jblevins.org/projects/ikiwiki/code">http://jblevins.org/projects/ikiwiki/code</a> <li><a name="index-Wiki-30"></a><a name="index-Php-31"></a>Pascal Bleser created a PHP extension that uses the GNU source-highlight library directly from PHP, instead of relying on spawning a process or using the source-highlight CGI. <p><a href="http://code.google.com/p/php-source-highlight/">http://code.google.com/p/php-source-highlight/</a> <li><a name="index-SIP-32"></a><a name="index-Python-33"></a><a name="index-PyQt-34"></a>Roberto Alsina made a partial python binding using SIP so that you can use Source-Highlight-Qt in PyQt programs. <p><a href="http://marave.googlecode.com/svn/trunk/marave/highlight/">http://marave.googlecode.com/svn/trunk/marave/highlight/</a> <li><a name="index-Perl-35"></a>A perl binding for source-highlight is available at CPAN: <p><a href="http://search.cpan.org/perldoc?Syntax::SourceHighlight">http://search.cpan.org/perldoc?Syntax::SourceHighlight</a> <li><a name="index-Pastebin-36"></a>Danijel Tasov wrote a pastebin service based on perl source-highlight binding: <p><a href="http://pb.rbfh.de">http://pb.rbfh.de</a> </ul> <div class="node"> <a name="Installation"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#Copying">Copying</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#Introduction">Introduction</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a> </div> <h2 class="chapter">2 Installation</h2> <p><a name="index-installation-37"></a> <a name="index-compilation-38"></a>See the file <samp><span class="file">INSTALL</span></samp> for detailed building and installation instructions; anyway if you're used to compiling Linux software that comes with sources you may simply follow the usual procedure, i.e., untar the file you downloaded in a directory and then: <pre class="example"> cd &lt;source code main directory&gt; ./configure make make install </pre> <p><a name="index-shadow-build-39"></a>We strongly suggest to use shadow builds, thus, create a build directory, say <samp><span class="file">build</span></samp> and run configuration and make in that directory: <pre class="example"> cd &lt;source code main directory&gt; mkdir build cd build ../configure make make install </pre> <p>However, before you do this, please check that you have everything that is needed to build source-highlight, <a href="#What-you-need-to-build-source_002dhighlight">What you need to build source-highlight</a>. <p>Note: unless you specify a different install directory by <code>--prefix</code> option of configure (e.g. <code>./configure --prefix=&lt;your home&gt;</code>), you must be root to run <code>make install</code>. <p>You may want to run <code>./configure --help</code> to see all the possible options that can be passed to the configuration script. <p><a name="index-directories-40"></a>Files will be installed in the following directories: <dl> <dt><code>Executables</code><dd> <code>prefix/bin</code> <br><dt><code>docs and output examples</code><dd> <code>prefix/share/doc/source-highlight</code> <br><dt><code>library examples</code><dd> <code>prefix/share/doc/source-highlight/examples</code> <br><dt><code>library API documentation</code><dd> <code>prefix/share/doc/source-highlight/api</code> <br><dt><code>conf files</code><dd> <code>prefix/share/source-highlight</code> </dl> <p>Default value for prefix is <code>/usr/local</code> but you may change it with <code>--prefix</code> option to configure. For further <code>configure</code> options, you can run <code>configure --help</code>. <p><a name="index-bash-completion-41"></a>Tiziano Muller wrote a bash completion configuration file for source-highlight; this will be installed by default in the directory <code>sysconfdir/bash_completion.d</code>, where <code>sysconfdir</code> defaults to <code>prefix/etc</code>; however, typically, the directory where the bash completion script searches for configuration file is <code>/etc/bash_completion.d</code>. Thus, we suggest you explicitly specify this directory with the configuration script command line option <code>--with-bash-completion</code>. <p><a name="index-library-42"></a><a name="index-g_t_0040code_007b_002d_002dwith_002ddoxygen_007d-43"></a><a name="index-doxygen-44"></a>If you want to build and install the API documentation of Source-highlight library, you need to run <code>configure</code> with the option <code>--with-doxygen</code>, but you need the program <em>Doxygen</em>, <a href="http://www.doxygen.org">http://www.doxygen.org</a>, to build the documentation. The documentation will be installed in the following directory: <dl> <dt><code>Library API documentation</code><dd> <code>prefix/share/doc/source-highlight/api</code> </dl> <p><a name="index-java2html-45"></a><a name="index-cpp2html-46"></a>NOTE: Originally, instead of Source-highlight, there were two separate programs, namely <em>GNU java2html</em> and <em>GNU cpp2html</em>. There are two shell scripts with the same name that will be installed together with Source-highlight in order to facilitate the migration (however their use is not advised and it is deprecated). <ul class="menu"> <li><a accesskey="1" href="#Building-with-qmake">Building with qmake</a> <li><a accesskey="2" href="#Download">Download</a> <li><a accesskey="3" href="#Anonymous-Git-Checkout">Anonymous Git Checkout</a> <li><a accesskey="4" href="#What-you-need-to-build-source_002dhighlight">What you need to build source-highlight</a> <li><a accesskey="5" href="#Tips-on-installing-Boost-Regex-library">Tips on installing Boost Regex library</a> <li><a accesskey="6" href="#Patching-from-a-previous-version">Patching from a previous version</a> <li><a accesskey="7" href="#Using-source_002dhighlight-with-less">Using source-highlight with less</a> <li><a accesskey="8" href="#Using-source_002dhighlight-as-a-CGI">Using source-highlight as a CGI</a> <li><a accesskey="9" href="#Building-_002erpm">Building .rpm</a> </ul> <div class="node"> <a name="Building-with-qmake"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#Download">Download</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#Installation">Installation</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Installation">Installation</a> </div> <h3 class="section">2.1 Building with qmake</h3> <p><a name="index-qmake-47"></a> Since version 3.1.2, Source-highlight can be built also using <code>qmake</code>, the build tool from Qt libraries (<a href="http://qt.nokia.com">http://qt.nokia.com</a>). This was made available to build Source-highlight on Windows based systems without using a Unix shell, and in particular to build Source-highlight <a name="index-MSVC-48"></a>with Microsoft MSVC compiler. You should use this method only if you don't have a Unix shell or if you really need to use the MSVC compiler (e.g., if you want to build Source-highlight library to be used in MSVC based programs). <a name="index-boost-49"></a>You still need the boost regex library, and if you use MSVC, you can find installation packages for this library at <a href="http://www.boostpro.com">http://www.boostpro.com</a>. <p>This build mechanism is still experimental, and, when using MSVC, only a static version of Source-highlight library can be built (not a .dll). <a name="index-MinGW-50"></a>You can also use this method if you have the MinGW compiler, <a href="http://www.mingw.org">http://www.mingw.org</a>, (e.g., the one that comes with Qt Windows distribution) and you don't have <a name="index-msys-51"></a>Msys (<a href="http://www.mingw.org/wiki/MSYS">http://www.mingw.org/wiki/MSYS</a>). Otherwise, you should still use the <code>configure</code> based mechanims. <p>Using <code>qmake</code>, only a few options can be specified during the building (besides the ones you usually use with qmake), and these options can be specified only using environment variables: <dl> <dt><code>BOOST_REGEX</code><dd>By default, <code>boost_regex</code> will be used to link the boost library (i.e., <code>-lboost_regex</code>); if your boost regex library has a different name you must specify this name using this environment variable; e.g., if the library file is called <code>libboost_regex-mt.lib</code> or <code>boost_regex-mt.dll</code> you must set this variable to <code>boost_regex-mt</code>. <br><dt><code>INCPATH</code><dd>Specify the path of the boost header files. <br><dt><code>LIBS</code><dd>Specify the path of the boost lib files. </dl> <p>Please, take into consideration that specifying the boost library include and library paths is completely up to you, using <code>INCPATH</code> and <code>LIBS</code>, if they're not in the system path directories. <p>Also remember to always use the option <code>-recursive</code> when running qmake. <p>If you then want to run <code>make install</code>, you can use the variable <code>INSTALL_ROOT</code> to prefix the installation path, which, otherwise, is the root directory. <div class="node"> <a name="Download"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#Anonymous-Git-Checkout">Anonymous Git Checkout</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#Building-with-qmake">Building with qmake</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Installation">Installation</a> </div> <h3 class="section">2.2 Download</h3> <p><a name="index-download-52"></a> You can download it from GNU's ftp site: <a href="ftp://ftp.gnu.org/gnu/src-highlite">ftp://ftp.gnu.org/gnu/src-highlite</a> or from one of its mirrors (see <a href="http://www.gnu.org/prep/ftp.html">http://www.gnu.org/prep/ftp.html</a>). <p>I do not distribute Windows binaries anymore; since, they can be built by using Cygnus C/C++ compiler, available at <a href="http://www.cygwin.com">http://www.cygwin.com</a>. However, if you don't feel like downloading such compiler or you experience problems with the Boost Regex library (see also <a href="#Tips-on-installing-Boost-Regex-library">Tips on installing Boost Regex library</a>; please also keep in mind that if you don't have these libraries installed, and your C/C++ compiler distribution does not provide a prebuilt package, it might take some time, even hours, to build the Boost libraries from sources), you can request such binaries directly to me, by e-mail (find my e-mail at my home page) and I'll be happy to send them to you. An MS-Windows port of Source-highlight is available from <a href="http://gnuwin32.sourceforge.net">http://gnuwin32.sourceforge.net</a>; however, I don't maintain those binaries personally, and they might be out of date. <p>Archives are digitally signed by me (Lorenzo Bettini) with GNU gpg (<a href="http://www.gnupg.org">http://www.gnupg.org</a>). My GPG public key can be found at my home page (<a href="http://www.lorenzobettini.it">http://www.lorenzobettini.it</a>). <p>You can also get the patches, if they are available for a particular release (see below for patching from a previous version). <div class="node"> <a name="Anonymous-Git-Checkout"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#What-you-need-to-build-source_002dhighlight">What you need to build source-highlight</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#Download">Download</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Installation">Installation</a> </div> <h3 class="section">2.3 Anonymous Git Checkout</h3> <p><a name="index-Git-53"></a>This project's git repository can be checked out through the following clone instruction<a rel="footnote" href="#fn-3" name="fnd-3"><sup>3</sup></a>: <pre class="example"> git clone git://git.savannah.gnu.org/src-highlite.git </pre> <p>Further instructions can be found at the address: <p><a href="http://savannah.gnu.org/projects/src-highlite">http://savannah.gnu.org/projects/src-highlite</a>. <p>And the git repository can also browsed on-line at <p><a href="http://git.savannah.gnu.org/cgit/src-highlite.git">http://git.savannah.gnu.org/cgit/src-highlite.git</a>. <p>Please note that this way you will get the latest development sources of Source-highlight, which may also be unstable. This solution is the best if you intend to correct/extend this program: you should send me patches against the latest git repository sources. <p>If, on the contrary, you want to get the sources of a given release, through git, say, e.g., version X.Y.Z, you must specify the tag <code>rel_X_Y_Z</code>. <p>When you compile the sources that you get from the git repository, before running the <code>configure</code> and <code>make</code> commands, for the first time, you must run the command: <pre class="example"> autoreconf -i </pre> <p class="noindent">This will run the autotools commands in the correct order, and also copy possibly missing files. You should have installed recent versions of <a name="index-automake-54"></a><a name="index-autoconf-55"></a><a name="index-libtool-56"></a><code>automake</code>, <code>autoconf</code> and <code>libtool</code> in order for this to succeed. <p><a name="index-shadow-build-57"></a>We strongly suggest to use shadow builds, thus, create a build directory, say <samp><span class="file">build</span></samp> and run configuration and make in that directory: <pre class="example"> cd &lt;source code main directory&gt; mkdir build cd build ../configure make make install </pre> <p>To summarize, the steps to get the sources from git and make the first build are: <pre class="example"> git clone git://git.savannah.gnu.org/src-highlite.git cd src-highlite autoreconf -i mkdir build cd build ../configure make </pre> <div class="node"> <a name="What-you-need-to-build-source-highlight"></a> <a name="What-you-need-to-build-source_002dhighlight"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#Tips-on-installing-Boost-Regex-library">Tips on installing Boost Regex library</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#Anonymous-Git-Checkout">Anonymous Git Checkout</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Installation">Installation</a> </div> <h3 class="section">2.4 What you need to build source-highlight</h3> <p><a name="index-compilation-requirements-58"></a><a name="index-building-requirements-59"></a> <a name="index-boost-60"></a>Since version 2.0 Source-highlight relies on regular expressions as provided by boost (<a href="http://www.boost.org">http://www.boost.org</a>), so you need to install at least the regex library from boost. <p>Most GNU/Linux distributions provide this library already in a compiled form. If you use your distribution packages, please be sure to install also the development package of the boost libraries. <p>If you experience problems in installing Boost Regex library, or in compiling source-highlight because of this library, please take a look at <a href="#Tips-on-installing-Boost-Regex-library">Tips on installing Boost Regex library</a>. <p>If you want to use a specific version of the Boost regex library (because you have many versions of it), you can use the configure option <code>--with-boost-regex</code> to specify a particular suffix. For instance, <pre class="example"> ./configure --with-boost-regex=boost_regex-gcc-1_31 </pre> <p>Source-highlight has been developed under GNU/Linux, using gcc (C++), and bison (yacc) and flex (lex), and ported under Win32 with Cygwin C/C++compiler, available at <a href="http://www.cygwin.com">http://www.cygwin.com</a>. <p>I use the excellent <a name="index-automake-61"></a><a name="index-autoconf-62"></a><a name="index-libtool-63"></a>GNU Autoconf<a rel="footnote" href="#fn-4" name="fnd-4"><sup>4</sup></a>, GNU Automake<a rel="footnote" href="#fn-5" name="fnd-5"><sup>5</sup></a> and GNU Libtool<a rel="footnote" href="#fn-6" name="fnd-6"><sup>6</sup></a>. <a name="index-gnulib-64"></a>Since version 2.6 I also started to use Gnulib - The GNU Portability Library<a rel="footnote" href="#fn-7" name="fnd-7"><sup>7</sup></a>, &ldquo;a central location for common GNU code, intended to be shared among GNU packages&rdquo; (for instance, I rely on Gnulib for checking for the presence and correctness of <code>getopt_long</code> function). <p>Finally I used <em>GNU gengetopt</em> (<a href="http://www.gnu.org/software/gengetopt">http://www.gnu.org/software/gengetopt</a>), for command line parsing. <p>I started to use also <em>doublecpp</em> (<a href="http://doublecpp.sourceforge.net">http://doublecpp.sourceforge.net</a>) that permits achieving dynamic overloading. <p>Actually, apart from the boost regex library, you don't need the other tools above to build source-highlight (indeed I provide the output sources generated by the above mentioned tools), unless you want to develop source-highlight. <p>However, if you obtained sources through Git, you need some other tools, see <a href="#Anonymous-Git-Checkout">Anonymous Git Checkout</a>. <div class="node"> <a name="Tips-on-installing-Boost-Regex-library"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#Patching-from-a-previous-version">Patching from a previous version</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#What-you-need-to-build-source_002dhighlight">What you need to build source-highlight</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Installation">Installation</a> </div> <h3 class="section">2.5 Tips on installing Boost Regex library</h3> <p><a name="index-Boost-regex-65"></a> If you experience no problem in compiling source-highlight, you can happily skip this section<a rel="footnote" href="#fn-8" name="fnd-8"><sup>8</sup></a> :-) <p>I created this section because many users reported some problems after installing Boost Regex library from sources; other users had problems in compiling source-highlight even if this library was already correctly installed (especially windows users, using cygwin). I hope this section sheds some light in installing/using the Boost Regex library. Please, note that this section does not explain how to compile the Boost libraries (the documentation you'll find on <a href="http://www.boost.org">http://www.boost.org</a> is well done); it explains how to tweak things if you have problems in compiling source-highlight even after a successful installation of Boost libraries. <p>First of all, if your distribution provides packages for the Boost regex library, please be sure to install also the development package of the boost libraries, i.e., those providing also the header files needed to compile a program using these libraries. For instance, on my Debian system I had to install the package <code>libboost-regex-dev</code>, besides the package <code>libboost-regex</code>. <p>If your distribution does not provide these packages then you have to download the sources of Boost libraries from <a href="http://www.boost.org">http://www.boost.org</a> and follow the instructions for compilation and installation. However, I suggest you specify <samp><span class="file">/usr</span></samp> as prefix for installation, instead of relying on the default prefix <samp><span class="file">/usr/local</span></samp> (unless <samp><span class="file">/usr/local/include</span></samp> is already in the inclusion path of your C++ compiler), since this will make things easier when compiling source-highlight. I suggest this, since <samp><span class="file">/usr/include</span></samp> is usually the place where C++ searches for header files during compilation. <p>If you successfully compiled and installed the Boost Regex library, or you installed the package from your distribution, but you STILL experience problems in compiling source-highlight, then you simply have to adjust some things as described in the following. <p>If the <code>./configure</code> command of source-highlight reports this error: <pre class="example"> ERROR! Boost::regex library not installed. </pre> <p class="noindent">then, the compiler cannot find the header files for this library. In this case, check that the directory <samp><span class="file">/usr/include/boost</span></samp> actually exists; if it does not, then probably you'll find a similar directory, e.g., <samp><span class="file">/usr/include/boost-1_33/boost</span></samp>, depending on the version of the library you have installed. Then, all you have to do is to create a symbolic link as follows: <pre class="example"> ln -s /usr/include/boost-1_33/boost /usr/include/boost </pre> <p class="noindent"><a name="index-g_t_0040code_007bCXXFLAGS_007d-66"></a>Alternatively, you might run source-highlight's configure as follows: <pre class="example"> ./configure CXXFLAGS=-I/usr/include/boost-1_33/ </pre> <p>If you install (or build) the Boost Regex library in a non standard path, e.g., somewhere in your home directory, say <samp><span class="file">/home/myhome/boost-1_33</span></samp>, you'll have to update the <code>CXXFLAGS</code> variable accordingly on the <code>configure</code> command line; in this particular case, you might also have to specify the path of actual library files (<code>CXXFLAGS</code> will only specify the path of header files). In particular, you'll have to know where the lib files are within the boost installation (or build directory); for instance, if they are in <samp><span class="file">/home/myhome/boost-1_33/stage/lib</span></samp>, while the header files (i.e., the <samp><span class="file">boost</span></samp> header files directory) are in <samp><span class="file">/home/myhome/boost-1_33</span></samp>, the complete <code>configure</code> command should be <p><a name="index-g_t_0040code_007bLDFLAGS_007d-67"></a> <pre class="example"> ./configure CXXFLAGS=-I/home/myhome/boost-1_33 \ LDFLAGS=-L/home/myhome/boost-1_33/stage/lib </pre> <p>If then <code>./configure</code> command of source-highlight reports this other error: <pre class="example"> ERROR! Boost::regex library is installed, but you must specify the suffix with --with-boost-regex at configure for instance, --with-boost-regex=boost_regex-gcc-1_31 </pre> <p class="noindent">then, there's still another thing to fix: you must find out the exact names of the files of your installed Boost Regex libraries; you can do this by using the command: <pre class="example"> $ ls -l /usr/lib/libboost_regex* </pre> <p class="noindent">that, for instance, on one of my cygwin installation reports: <pre class="example"> -rwxr-x---+ Nov 9 23:29 /usr/lib/libboost_regex-gcc-mt-s-1_33.a -rwxr-x---+ Nov 22 09:22 /usr/lib/libboost_regex-gcc-mt-s.a -rwxr-x---+ Nov 9 23:29 /usr/lib/libboost_regex-gcc-mt-s-1_33.so -rwxr-x---+ Nov 22 09:22 /usr/lib/libboost_regex-gcc-mt-s.so </pre> <p class="noindent">Now, you have all the information to correctly run the source-highlight's configure command: <pre class="example"> ./configure --with-boost-regex=boost_regex-gcc-mt-s-1_33 </pre> <p class="noindent">or, if you solved the first problem in the second way<a rel="footnote" href="#fn-9" name="fnd-9"><sup>9</sup></a>, <pre class="example"> ./configure CXXFLAGS=-I/usr/include/boost-1_33/ \ --with-boost-regex=boost_regex-gcc-mt-s-1_33 </pre> <p>Of course, you have to modify this command according to the names of your Boost Regex library installed files. <p>These instructions managed to let many users, who were experiencing problems, to compile source-highlight If you still have problems, please send me an e-mail. <div class="node"> <a name="Patching-from-a-previous-version"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#Using-source_002dhighlight-with-less">Using source-highlight with less</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#Tips-on-installing-Boost-Regex-library">Tips on installing Boost Regex library</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Installation">Installation</a> </div> <h3 class="section">2.6 Patching from a previous version</h3> <p><a name="index-patching-68"></a> If you downloaded a patch, say <samp><span class="file">source-highlight-1.3-1.3.1-patch.gz</span></samp> (i.e., the patch to go from version 1.3 to version 1.3.1), cd to the directory with sources from the previous version (source-highlight-1.3) and type: <pre class="example"> gunzip -cd ../source-highlight-1.3-1.3.1.patch.gz | patch -p1 </pre> <p>and restart the compilation process (if you had already run configure a simple make should do). <div class="node"> <a name="Using-source-highlight-with-less"></a> <a name="Using-source_002dhighlight-with-less"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#Using-source_002dhighlight-as-a-CGI">Using source-highlight as a CGI</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#Patching-from-a-previous-version">Patching from a previous version</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Installation">Installation</a> </div> <h3 class="section">2.7 Using source-highlight with less</h3> <p>This was suggested by Konstantine Serebriany. The script <samp><span class="file">src-hilite-lesspipe.sh</span></samp> will be installed together with source-highlight. You can use the following environment variables: <pre class="example"> export LESSOPEN="| /path/to/src-hilite-lesspipe.sh %s" export LESS=' -R ' </pre> <p>This way, when you use less to browse a file, if it is a source file handled by source-highlight, it will be automatically highlighted. <div class="node"> <a name="Using-source-highlight-as-a-CGI"></a> <a name="Using-source_002dhighlight-as-a-CGI"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#Building-_002erpm">Building .rpm</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#Using-source_002dhighlight-with-less">Using source-highlight with less</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Installation">Installation</a> </div> <h3 class="section">2.8 Using source-highlight as a CGI</h3> <p><a name="index-CGI-69"></a>CGI support was enabled thanks to Robert Wetzel; I haven't tested it personally. If you want to use source-highlight as a CGI program, you have to use the executable source-highlight-cgi. You can build such executable by issuing <pre class="example"> make source-highlight-cgi </pre> <p class="noindent">in the <samp><span class="file">src</span></samp> directory. <div class="node"> <a name="Building-.rpm"></a> <a name="Building-_002erpm"></a> <p><hr> Previous:&nbsp;<a rel="previous" accesskey="p" href="#Using-source_002dhighlight-as-a-CGI">Using source-highlight as a CGI</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Installation">Installation</a> </div> <h3 class="section">2.9 Building .rpm</h3> <p><a name="index-rpm-70"></a> Christian W. Zuckschwerdt added support for building an .rpm and an .rpm.src. You can issue the following command <pre class="example"> rpmbuild -tb source-highlight-3.1.6.tar.gz </pre> <p>for building an .rpm with binaries and <pre class="example"> rpmbuild -ts source-highlight-3.1.6.tar.gz </pre> <p>for building an .rpm.src with sources. <div class="node"> <a name="Copying"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#Simple-Usage">Simple Usage</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#Installation">Installation</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a> </div> <h2 class="chapter">3 Copying Conditions</h2> <p><a name="index-Copying-conditions-71"></a> GNU Source-highlight is free software; you are free to use, share and modify it under the terms of the GNU General Public License that accompanies this software (see <samp><span class="file">COPYING</span></samp>). <p>GNU <samp><span class="command">source-highlight</span></samp> was written and maintained by Lorenzo Bettini <a href="http://www.lorenzobettini.it">http://www.lorenzobettini.it</a>. <div class="node"> <a name="Simple-Usage"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#Configuration-files">Configuration files</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#Copying">Copying</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a> </div> <h2 class="chapter">4 Simple Usage</h2> <p><a name="index-sample-72"></a> Here are some realistic examples of running <samp><span class="command">source-highlight</span></samp><a rel="footnote" href="#fn-10" name="fnd-10"><sup>10</sup></a>. <p>Source-highlight only does a lexical analysis of the source code, so the program source is assumed to be correct! <p>Here's how to run source-highlight (for this example we will use C/C++ input files, but this is valid also for other source-highlight input languages): <pre class="example"> source-highlight --src-lang cpp --out-format html \ --input <var>&lt;C++ file&gt;</var> \ --output <var>&lt;html file&gt;</var> \ --style-file <var>&lt;style file&gt;</var> \ <var>options</var> </pre> <p>For input files, apart from the <code>-i (--input)</code> option and the standard input redirection, you can simply specify some files at the command line and also use regular expressions (for instance <samp><span class="file">*.java</span></samp>). In this case the name for the output files will be formed using the name of the source file with a .&lt;ext&gt; appended, where &lt;ext&gt; is the extension chosen according to the output format specified (in this example it would be .html). The style file (<a href="#Output-format-style">Output format style</a>) contains information on how to format specific language parts (e.g., keywords in blue and boldface, etc.). <p>IMPORTANT: you must choose one of the above two invocation modes: either you use <code>-i (--input)</code>, <code>-o (--output)</code> (possibly replacing them with standard input/output redirection), or you specify one or many files without <code>-i (--input)</code>; if you try to mix them you'll get an error: <pre class="example"> source-highlight -o main.html main.cpp Please, use one of the two syntaxes for invocation: source-highlight [OPTIONS]... -i input_file -o output_file source-highlight [OPTIONS]... [FILES]... </pre> <p>If <code>STDOUT</code> string is passed as <code>-o (--output)</code> option, then the output is forced to the standard output anyway. <p>If <code>-s (--src-lang)</code> is not specified, the source language is inferred by the extension of the input file or from the file name itself (possibly using also lower case versions); this, of course, does not work with standard input redirection. For further details, see <a href="#How-the-input-language-is-discovered">How the input language is discovered</a>. <p>If <code>-f (--out-format)</code> is not specified, the output will be produced in HTML. <p>If <code>--style-file</code> is not specified, the <samp><span class="file">default.style</span></samp>, which is included in the distribution, will be used (see <a href="#Output-format-style">Output format style</a> for further information). <ul class="menu"> <li><a accesskey="1" href="#HTML-and-XHTML-output">HTML and XHTML output</a> <li><a accesskey="2" href="#LaTeX-output">LaTeX output</a> <li><a accesskey="3" href="#Texinfo-output">Texinfo output</a> <li><a accesskey="4" href="#DocBook-output">DocBook output</a> <li><a accesskey="5" href="#ANSI-color-escape-sequences">ANSI color escape sequences</a> <li><a accesskey="6" href="#Odf-output">Odf output</a> </ul> <div class="node"> <a name="HTML-and-XHTML-output"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#LaTeX-output">LaTeX output</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#Simple-Usage">Simple Usage</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Simple-Usage">Simple Usage</a> </div> <h3 class="section">4.1 HTML and XHTML output</h3> <p><a name="index-HTML-73"></a><a name="index-XHTML-74"></a> The default output format for HTML and XHTML uses fixed width fonts by inserting all the formatted output between <code>&lt;tt&gt;</code> and <code>&lt;/tt&gt;</code>. Thus, for instance, specification for fixed width and not fixed width (see <a href="#Output-format-style">Output format style</a>) will have no effect: every character will have fixed width. If you don't like this default behavior and would like to have not fixed fonts by default (as it happens, e.g., with LaTeX output) you can use the file <samp><span class="file">html_notfixed.outlang</span></samp> with the command line argument <code>--outlang-def</code>. For XHTML output, the corresponding file is <samp><span class="file">xhtml_notfixed.outlang</span></samp> <p>Furthermore, the file <samp><span class="file">htmltable.outlang</span></samp> can be used to generate HTML output enclosed in an HTML table (which will use also a background color if specified in the style file). The file <samp><span class="file">xhtmltable.outlang</span></samp> does the same but for XHTML output. <div class="node"> <a name="LaTeX-output"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#Texinfo-output">Texinfo output</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#HTML-and-XHTML-output">HTML and XHTML output</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Simple-Usage">Simple Usage</a> </div> <h3 class="section">4.2 LaTeX output</h3> <p><a name="index-g_t_0040LaTeX_007b_007d-75"></a> When using LaTeX output format you can choose between monochromatic output (by using <code>-f latex</code>) or colored output (by using <code>-f latexcolor</code>). When using colored output, you need the <code>color</code> package (again this should be present in your system). Of course, you are free to define your own LaTeX output format, see <a href="#Output-Language-Definitions">Output Language Definitions</a>. <div class="node"> <a name="Texinfo-output"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#DocBook-output">DocBook output</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#LaTeX-output">LaTeX output</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Simple-Usage">Simple Usage</a> </div> <h3 class="section">4.3 Texinfo output</h3> <p><a name="index-Texinfo-76"></a> When using the Texinfo output format, you may want to use a dedicated style file, <samp><span class="file">texinfo.style</span></samp>, which comes with the source-highlight distribution, with the option <code>--style-file</code>. For instance, the example in <a href="#Examples">Examples</a> is formatted with this style file. <div class="node"> <a name="DocBook-output"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#ANSI-color-escape-sequences">ANSI color escape sequences</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#Texinfo-output">Texinfo output</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Simple-Usage">Simple Usage</a> </div> <h3 class="section">4.4 DocBook output</h3> <p><a name="index-DocBook-77"></a> DocBook output is generated using the <code>&lt;programlisting&gt;</code> tag. If the <code>--doc</code> command line option is given, an <code>&lt;article&gt;</code> document is generated. <div class="node"> <a name="ANSI-color-escape-sequences"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#Odf-output">Odf output</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#DocBook-output">DocBook output</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Simple-Usage">Simple Usage</a> </div> <h3 class="section">4.5 ANSI color escape sequences</h3> <p><a name="index-ANSI-color-78"></a> If you're using this output format, for instance together with <code>less</code> (see <a href="#Using-source_002dhighlight-with-less">Using source-highlight with less</a>), you may want to use the <samp><span class="file">esc.style</span></samp>, which comes with the source-highlight distribution, with the option <code>--style-file</code>. This should result in a more pleasant coloring output. <div class="node"> <a name="Odf-output"></a> <p><hr> Previous:&nbsp;<a rel="previous" accesskey="p" href="#ANSI-color-escape-sequences">ANSI color escape sequences</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Simple-Usage">Simple Usage</a> </div> <h3 class="section">4.6 Odf output</h3> <p>The ODF language output for GNU source-highlight enables the user to generate color-highlighted ODF output of source code files. Or to generate ODF color-highlighted snippets to be used by ODF back-ends (like asciidoc-odf). We create an <code>.fodt</code> file, which is a Text document that newer versions of LibreOffice can open. <div class="node"> <a name="Configuration-files"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#Invoking-source_002dhighlight">Invoking source-highlight</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#Simple-Usage">Simple Usage</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a> </div> <h2 class="chapter">5 Configuration files</h2> <p><a name="index-configuration-files-79"></a> During execution, source-highlight needs some files where it finds directives on how to recognize the source language (if not specified explicitly with <code>--src-lang</code> or <code>--lang-def</code>), on which output format to use (if not specified explicitly with <code>--out-format</code> or <code>--outlang-def</code>), on how to format specific source elements (e.g., keywords, comments, etc.), and source and output language definitions. These files will be explained in the next sections. <p><a name="index-g_t_0040code_007b_002d_002ddata_002ddir_007d-80"></a>If the directory for such files is not explicitly specified with the command line option <code>--data-dir</code>, these files are searched for in the following order: <ul> <li>the current directory; <li>the installation directory for conf files, see <a href="#Installation">Installation</a> (please keep in mind that this directory is hard-coded into source-highlight during compilation). <li>if the source-highlight command is specified with an explicit path name, the installation directory name is still used, but relative to the explicit path name. </ul> <p>In particular, the user can set the value also with the environment variable <a name="index-g_t_0040code_007bSOURCE_005fHIGHLIGHT_005fDATADIR_007d-81"></a><code>SOURCE_HIGHLIGHT_DATADIR</code> (see also <a href="#The-program-source_002dhighlight_002dsettings">The program source-highlight-settings</a>). <p>If you want to be sure about which file is used during the execution, you can use the command line option <code>--verbose</code>. <ul class="menu"> <li><a accesskey="1" href="#Output-format-style">Output format style</a> <li><a accesskey="2" href="#Output-format-style-using-CSS">Output format style using CSS</a> <li><a accesskey="3" href="#Default-Styles">Default Styles</a> <li><a accesskey="4" href="#Language-map">Language map</a> <li><a accesskey="5" href="#Language-definition-files">Language definition files</a> <li><a accesskey="6" href="#Output-Language-map">Output Language map</a> <li><a accesskey="7" href="#Output-Language-definition-files">Output Language definition files</a> <li><a accesskey="8" href="#Developing-your-own-definition-files">Developing your own definition files</a> </ul> <div class="node"> <a name="Output-format-style"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#Output-format-style-using-CSS">Output format style using CSS</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#Configuration-files">Configuration files</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Configuration-files">Configuration files</a> </div> <h3 class="section">5.1 Output format style</h3> <p><a name="index-output-style-82"></a><a name="index-default_002estyle-83"></a> You must specify your options for syntax highlighting in the file <samp><span class="file">default.style</span></samp><a rel="footnote" href="#fn-11" name="fnd-11"><sup>11</sup></a>. You can specify formatting options for each element defined by a language definition file (you can get the list of such elements, <a name="index-g_t_0040code_007b_002d_002dshow_002dlang_002delements_007d-84"></a>by using <code>--show-lang-elements</code>, see <a href="#Listing-Language-Elements">Listing Language Elements</a>). <p><a name="index-g_t_0040code_007bbgcolor_007d-85"></a><a name="index-background-color-86"></a>Since version 2.6, you can also specify the background color for the output document, using the keyword <code>bgcolor</code> (this might be visible only when the <code>--doc</code> command line option is used). <p>If many elements share the same formatting options, you can specify these elements in the same line, separated by a comma<a rel="footnote" href="#fn-12" name="fnd-12"><sup>12</sup></a>. <p>Here's the <samp><span class="file">default.style</span></samp> that comes with this distribution (this is formatted by using the <samp><span class="file">style.lang</span></samp> that is shown in <a href="#Tutorials-on-Language-Definitions">Tutorials on Language Definitions</a>): <!-- Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite --> <pre class="example"> <b>bgcolor</b> <tt>"white"</tt>; <i>// the background color for documents</i> <i>context</i> <b>gray</b>; <i>// the color for context lines (when specified with line ranges)</i> <i>keyword</i> <b>blue</b> <b>b</b> ; <i>// for language keywords</i> <i>type</i> <b>darkgreen</b> ; <i>// for basic types</i> <i>usertype</i> <b>teal</b> ; <i>// for user defined types</i> <i>string</i> <b>red</b> <b>f</b> ; <i>// for strings and chars</i> <i>regexp</i> <b>orange</b> <b>f</b> ; <i>// for strings and chars</i> <i>specialchar</i> <b>pink</b> <b>f</b> ; <i>// for special chars, e.g., \n, \t, \\</i> <i>comment</i> <b>brown</b> <b>i</b>, <b>noref</b>; <i>// for comments</i> <i>number</i> <b>purple</b> ; <i>// for literal numbers</i> <i>preproc</i> <b>darkblue</b> <b>b</b> ; <i>// for preproc directives (e.g. #include, import)</i> <i>symbol</i> <b>darkred</b> ; <i>// for simbols (e.g. &lt;, &gt;, +)</i> <i>function</i> <b>black</b> <b>b</b>; <i>// for function calls and declarations</i> <i>cbracket</i> <b>red</b>; <i>// for block brackets (e.g. {, })</i> <i>todo</i> <b>bg:cyan</b> <b>b</b>; <i>// for TODO and FIXME</i> <i>code</i> <b>bg:brightgreen</b> <b>b</b>; <i>// for code snippets</i> <i>//Predefined variables and functions (for instance glsl)</i> <i>predef_var</i> <b>darkblue</b> ; <i>predef_func</i> <b>darkblue</b> <b>b</b> ; <i>// for OOP</i> <i>classname</i> <b>teal</b> ; <i>// for class names, e.g., in Java and C++</i> <i>// line numbers</i> <b>linenum</b> <b>black</b> <b>f</b>; <i>// Internet related</i> <i>url</i> <b>blue</b> <b>u</b>, <b>f</b>; <i>// other elements for ChangeLog and Log files</i> <i>date</i> <b>blue</b> <b>b</b> ; <i>time</i>, <i>file</i> <b>darkblue</b> <b>b</b> ; <i>ip</i>, <i>name</i> <b>darkgreen</b> ; <i>// for Prolog, Perl...</i> <i>variable</i> <b>darkgreen</b> ; <i>// explicit for Latex</i> <i>italics</i> <b>darkgreen</b> <b>i</b>; <i>bold</i> <b>darkgreen</b> <b>b</b>; <i>underline</i> <b>darkgreen</b> <b>u</b>; <i>fixed</i> <b>green</b> <b>f</b>; <i>argument</i> <b>darkgreen</b>; <i>optionalargument</i> <b>purple</b>; <i>math</i> <b>orange</b>; <i>bibtex</i> <b>blue</b>; <i>// for diffs</i> <i>oldfile</i> <b>orange</b>; <i>newfile</i> <b>darkgreen</b>; <i>difflines</i> <b>blue</b>; <i>// for css</i> <i>selector</i> <b>purple</b>; <i>property</i> <b>blue</b>; <i>value</i> <b>darkgreen</b> <b>i</b>; <i>// for oz</i> <i>atom</i> <b>orange</b>; <i>meta</i> <b>i</b>; <i>// for file system</i> <i>path</i> <b>orange</b>; <i>// for C (or other language) labels</i> <i>label</i> <b>teal</b> <b>b</b>; <i>// for errors</i> <i>error</i> <b>purple</b>; <i>warning</i> <b>darkgreen</b>; </pre> <p>This file tries to define a style for most elements defined in the language definition files that comes with Source-highlight distribution. <p><a name="index-g_t_0040code_007b_002d_002dstyle_002dfile_007d-87"></a>You can specify your own file (it doesn't have to be named <samp><span class="file">default.style</span></samp>) with the command line option <code>--style-file</code><a rel="footnote" href="#fn-13" name="fnd-13"><sup>13</sup></a>, see <a href="#Invoking-source_002dhighlight">Invoking source-highlight</a>. <p>You can also specify the color of normal text by adding this line <pre class="example"> normal darkblue ; </pre> <p><a name="index-color-88"></a><a name="index-background-color-89"></a>As you might see the syntax of this file is quite straightforward: after the element (or elements, separated by commas) you can specify the color, and the background color<a rel="footnote" href="#fn-14" name="fnd-14"><sup>14</sup></a> by using the prefix <code>bg:</code> (for instance, in the <samp><span class="file">default.style</span></samp> above the background color is specified for the <code>todo</code> element). <p>Note that the background color might not be available for all output formats: it is available for XHTML and LaTeX but not for HTML<a rel="footnote" href="#fn-15" name="fnd-15"><sup>15</sup></a>. <p><a name="index-bold-90"></a><a name="index-italics-91"></a><a name="index-underline-92"></a><a name="index-fixed-93"></a><a name="index-notfixed-94"></a>Then, you can specify further formatting options such as bold, italics, etc.; these are the keywords that can be used: <pre class="example"> b = bold i = italics u = underline f = fixed nf = not fixed noref = no reference information is generated for these elements </pre> <p><a name="index-color-95"></a>Since version 2.2, the color specification is not required. For instance, the <samp><span class="file">texinfo.style</span></samp> is as follows (we avoid colors for Texinfo outputs): <!-- Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite --> <pre class="example"> <i>keyword</i>, <i>type</i> <b>b</b> ; <i>variable</i> <b>f</b>, <b>i</b> ; <i>string</i> <b>f</b> ; <i>regexp</i> <b>f</b> ; <i>comment</i> <b>nf</b>, <b>i</b>, <b>noref</b> ; <i>preproc</i> <b>b</b> ; <i>// line numbers</i> <b>linenum</b> <b>f</b>; <i>// Internet related</i> <i>url</i> <b>f</b>; <i>// for diffs</i> <i>oldfile</i>, <i>newfile</i> <b>i</b>; <i>difflines</i> <b>b</b>; <i>// for css</i> <i>selector</i>, <i>property</i> <b>b</b>; <i>value</i> <b>i</b>; </pre> <p>You may also specify more than on of these options separated by commas, e.g. <pre class="example"> keyword blue u, b ; </pre> <p class="noindent">Please keep in mind that in this case the order of these specified options is kept during the generation of the output; for instance, depending on the specific output format, the sequences <code>u, b</code> and <code>b, u</code> may lead to different results. In particular, the style that comes first is used after the ones that follow. For instance, in the case of HTML, the sequence <code>u, b</code> will lead to the following formatting: <code>&lt;u&gt;&lt;b&gt;...&lt;/b&gt;&lt;/u&gt;</code>. <p><a name="index-noref-96"></a>The <code>noref</code> option specifies that for this element reference information are not generated (see <a href="#Generating-References">Generating References</a>). For instance, this is used for the <code>comment</code> element, since we do not want that elements in a comment are searched for cross-references. <p>These are all possible color logical names handled by source-highlight<a rel="footnote" href="#fn-16" name="fnd-16"><sup>16</sup></a>: <pre class="example"> black red darkred brown yellow cyan blue pink purple orange brightorange green brightgreen darkgreen teal gray darkblue white </pre> <p><a name="index-direct-color-scheme-97"></a>You can also use the direct color scheme for the specific output format, by using double quotes, such as, e.g., <code>"#00FF00"</code> in HTML<a rel="footnote" href="#fn-17" name="fnd-17"><sup>17</sup></a> or even string colors in double quotes<a rel="footnote" href="#fn-18" name="fnd-18"><sup>18</sup></a>, such as <code>"lightblue"</code>. Of course, the double quotes will be discarded during the generation. <p>For instance, this is the <samp><span class="file">syslog.style</span></samp> used in the <samp><span class="file">tests</span></samp> directory. This uses direct color schemes. <!-- Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite --> <pre class="example"> <i>date</i>, <i>keyword</i> <b>yellow</b> <b>b</b> ; <i>time</i> <tt>"#9999FF"</tt> ; <i>ip</i> <tt>"lightblue"</tt> <b>b</b> ; <i>type</i> <b>cyan</b> <b>b</b> ; <i>string</i> <tt>"brown"</tt> <b>b</b> ; <i>comment</i> <b>teal</b> ; <i>number</i> <b>red</b> ; <i>preproc</i> <b>cyan</b> ; <i>symbol</i> <b>green</b> ; <i>function</i> <tt>"#CC66CC"</tt> <b>b</b> ; <i>cbracket</i> <b>green</b> <b>b</b> ; <i>twonumbers</i> <b>green</b> <b>b</b> ; <i>port</i> <b>green</b> <b>b</b> ; <i>webmethod</i> <b>teal</b> ; <i>// foo option</i> <i>foo</i> <b>red</b> <b>b</b> ; <i>// foo entry</i> </pre> <p>Note that, if you use direct color schemes, source-highlight will perform no transformation, and will output exactly the color scheme you specified. For instance, the specification <code>"brown"</code> is different from <code>brown</code>: the former will be output as it is, while the latter will be translated in the corresponding color of the output format (for HTML the visible result is likely to be the same). <p>It is up to you to specify a color scheme string that is handled by the specific output format. Thus, direct color schemes might not be portable in different output formats; for instance, <code>"#00FF00"</code> is valid in HTML but not in LaTeX. <div class="node"> <a name="Output-format-style-using-CSS"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#Default-Styles">Default Styles</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#Output-format-style">Output format style</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Configuration-files">Configuration files</a> </div> <h3 class="section">5.2 Output format style using CSS</h3> <p><a name="index-CSS-98"></a>Since version 2.6 you can specify the output format style also using a limited CSS syntax. Please, note that this has nothing to do with output produced by source-highlight using the <code>--css</code> option. <p><a name="index-g_t_0040code_007b_002d_002dstyle_002dcss_002dfile_007d-99"></a>By using a CSS file as the style file (i.e., passing it to the <code>--style-css-file</code> command line option) you will only specify the output format style using the same syntax of CSS. This means that you can use a css syntax for specifying the output format style independently from the actual output (this is what the output format style is for). Thus, you can use a css file as the output format style also for LaTeX output (just like you would do with a source-highlight output format style, <a href="#Output-format-style">Output format style</a>). <p>This feature is provided basically for code re-use: you can specify the output format style using a css file, and then re-use the same css file as the actual style sheet of other HTML pages (or even output files produced by source-highlight using the <code>--css</code> option). <p>Note that this feature is quite primordial, so only a limited subset of CSS syntax is recognized. In particular, selectors are always intended as CSS class selectors, so they must start with a dot. <code>/* */</code> comments are handled. Properties (and their values) not handled by source-highlight are simply (and silently) discarded). <p>This is an example of CSS specification handled correctly by source-highlight as a style format specification: <!-- Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite --> <pre class="example"> body { <b>background-color:</b> &lt;<i>color</i> <i>specification</i>&gt;; } <b>.selector</b> { <b>color:</b> &lt;<i>color</i> <i>specification</i>&gt;; <b>background-color:</b> &lt;<i>color</i> <i>specification</i>&gt;; <b>font-weight:</b> <i>bold</i>; <i>/* this is a comment */</i> <b>font-family:</b> <i>monospace</i>; <b>font-style:</b> <i>italic</i>; <b>text-decoration:</b> <i>underline</i>; } </pre> <p>Finally, this is the <samp><span class="file">default.css</span></samp> that corresponds to <samp><span class="file">default.style</span></samp> presented in <a href="#Output-format-style">Output format style</a>: <!-- Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite --> <pre class="example"> body { <b>background-color:</b> <i>white</i>; } <i>/* the color for context lines (when specified with line ranges) */</i> <b>.context</b> { <b>color:</b> <i>gray</i>; } <b>.keyword</b> { <b>color:</b> <i>blue</i>; <b>font-weight:</b> <i>bold</i>; } <b>.type</b> { <b>color:</b> <i>darkgreen</i>; } <b>.usertype</b>, <b>.classname</b> { <b>color:</b> <i>teal</i>; } <b>.string</b> { <b>color:</b> <i>red</i>; <b>font-family:</b> <i>monospace</i>; } <b>.regexp</b> { <b>color:</b> <i>orange</i>; } <b>.specialchar</b> { <b>color:</b> <i>pink</i>; <b>font-family:</b> <i>monospace</i>; } <b>.comment</b> { <b>color:</b> <i>brown</i>; <b>font-style:</b> <i>italic</i>; } <b>.number</b> { <b>color:</b> <i>purple</i>; } <b>.preproc</b> { <b>color:</b> <i>darkblue</i>; <b>font-weight:</b> <i>bold</i>; } <b>.symbol</b> { <b>color:</b> <i>darkred</i>; } <b>.function</b> { <b>color:</b> <i>black</i>; <b>font-weight:</b> <i>bold</i>; } <b>.cbracket</b> { <b>color:</b> <i>red</i>; } <b>.todo</b> { <b>font-weight:</b> <i>bold</i>; <b>background-color:</b> <i>cyan</i>; } <i>/* line numbers */</i> <b>.linenum</b> { <b>color:</b> <i>black</i>; <b>font-family:</b> <i>monospace</i>; } <i>/* Internet related */</i> <b>.url</b> { <b>color:</b> <i>blue</i>; <b>text-decoration:</b> <i>underline</i>; <b>font-family:</b> <i>monospace</i>; } <i>/* other elements for ChangeLog and Log files */</i> <b>.date</b> { <b>color:</b> <i>blue</i>; <b>font-weight:</b> <i>bold</i>; } <b>.time</b>, <b>.file</b> { <b>color:</b> <i>darkblue</i>; <b>font-weight:</b> <i>bold</i>; } <b>.ip</b>, <b>.name</b> { <b>color:</b> <i>darkgreen</i>; } <i>/* for Prolog, Perl */</i> <b>.variable</b> { <b>color:</b> <i>darkgreen</i>; } <b>.italics</b> { <b>color:</b> <i>darkgreen</i>; <b>font-style:</b> <i>italic</i>; } <b>.bold</b> { <b>color:</b> <i>darkgreen</i>; <b>font-weight:</b> <i>bold</i>; } <i>/* for LaTeX */</i> <b>.underline</b> { <b>color:</b> <i>darkgreen</i>; <b>text-decoration:</b> <i>underline</i>; } <b>.fixed</b> { <b>color:</b> <i>green</i>; <b>font-family:</b> <i>monospace</i>; } <b>.argument</b>, <b>.optionalargument</b> { <b>color:</b> <i>darkgreen</i>; } <b>.math</b> { <b>color:</b> <i>orange</i>; } <b>.bibtex</b> { <b>color:</b> <i>blue</i>; } <i>/* for diffs */</i> <b>.oldfile</b> { <b>color:</b> <i>orange</i>; } <b>.newfile</b> { <b>color:</b> <i>darkgreen</i>; } <b>.difflines</b> { <b>color:</b> <i>blue</i>; } <i>/* for css */</i> <b>.selector</b> { <b>color:</b> <i>purple</i>; } <b>.property</b> { <b>color:</b> <i>blue</i>; } <b>.value</b> { <b>color:</b> <i>darkgreen</i>; <b>font-style:</b> <i>italic</i>; } <i>/* for Oz */</i> <b>.atom</b> { <b>color:</b> <i>orange</i>; } <b>.meta</b> { <b>font-style:</b> <i>italic</i>; } </pre> <p>If you pass this file to the <code>--style-css-file</code> command line option and you produce an output file, you will get the same result of using <samp><span class="file">default.style</span></samp>. <p>Source-highlight comes with a lot of CSS files that can be used either as standard CSS files for HTML documents, or as style files to pass to <code>--style-css-file</code>. In the documentation installation directory (see <a href="#Installation">Installation</a>) you will find the file <samp><span class="file">style_examples.html</span></samp> which shows many output examples, each one with a different CSS style. <div class="node"> <a name="Default-Styles"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#Language-map">Language map</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#Output-format-style-using-CSS">Output format style using CSS</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Configuration-files">Configuration files</a> </div> <h3 class="section">5.3 Default Styles</h3> <p>This file<a rel="footnote" href="#fn-19" name="fnd-19"><sup>19</sup></a> (the default file is <samp><span class="file">style.defaults</span></samp>) lists the default style for a language element whose output style is not specified in the style file; in particular the following line (comment lines start with <code>#</code>): <pre class="example"> elem1 = elem2 </pre> <p class="noindent">tells that, if the style for an element, say elem1, is not specified in the style file, then elem1 will have the same style of elem2. <p><a name="index-style_002edefaults-100"></a>For instance, this is the <samp><span class="file">style.defaults</span></samp> that comes with Source-highlight: <!-- Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite --> <pre class="example"> # defaults for styles # the format is: # elem1 = elem2 # meaning that if the style for elem1 is not specified, # then it will have the same style as elem2 classname = normal usertype = normal preproc = keyword section = function paren = cbracket attribute = type value = string predef_var = type predef_func = function atom = regexp meta = function path = regexp label = preproc error = string warning = type code = preproc </pre> <p class="noindent">In this case the style for the element <code>preproc</code> will default to the style of the element <code>keyword</code>. <p>This file is useful when you want to create your own style file and you don't want to specify styles for all the elements that will have the same output style in your style (e.g., the default style formats <code>preproc</code> elements differently from keywords, but if in your style you don't specify a style for it, a <code>preproc</code> element will still be formatted as a <code>keyword</code>). <div class="node"> <a name="Language-map"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#Language-definition-files">Language definition files</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#Default-Styles">Default Styles</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Configuration-files">Configuration files</a> </div> <h3 class="section">5.4 Language map</h3> <p><a name="index-language-map-101"></a> This configuration file associates a file extension to a specific language definition file. You can also use such file extension to specify the <code>--src-lang</code> option (see <a href="#Simple-Usage">Simple Usage</a>). Source-highlight comes with such a file, called <samp><span class="file">lang.map</span></samp>. <p>Of course, you can override the settings of this file by writing your own language map file and specify such file with the command line option <code>--lang-map</code>). Moreover, as explained above, if a file <samp><span class="file">lang.map</span></samp> is present in the current directory, such version will be used. The format of such file is quite simple (comment lines start with <code>#</code>): <pre class="example"> extension = language definition file </pre> <p>The default language definition file is shown in <a href="#Introduction">Introduction</a>. <div class="node"> <a name="Language-definition-files"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#Output-Language-map">Output Language map</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#Language-map">Language map</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Configuration-files">Configuration files</a> </div> <h3 class="section">5.5 Language definition files</h3> <p>These files are crucial for source-highlight since they specify the source elements that have to be highlighted. These files also allow to specify your own language definitions in order to deal with a language that is not handled by source-highlight<a rel="footnote" href="#fn-20" name="fnd-20"><sup>20</sup></a>. The syntax for these files is explained in <a href="#Language-Definitions">Language Definitions</a>. <div class="node"> <a name="Output-Language-map"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#Output-Language-definition-files">Output Language definition files</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#Language-definition-files">Language definition files</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Configuration-files">Configuration files</a> </div> <h3 class="section">5.6 Output Language map</h3> <p><a name="index-output-language-map-102"></a> This configuration file associates an output format to a specific output language definition file. You can use the name of that output format to specify the <code>--out-format</code> option (see <a href="#Simple-Usage">Simple Usage</a>). Source-highlight comes with such a file, called <samp><span class="file">outlang.map</span></samp>. <p>Of course, you can override the settings of this file by writing your own output language map file and specify such file with the command line option <code>--outlang-map</code>). Moreover, as explained above, if a file <samp><span class="file">outlang.map</span></samp> is present in the current directory, such version will be used. The format of such file is quite simple: <pre class="example"> output format name = language definition file </pre> <p>The default language definition file is shown in <a href="#Introduction">Introduction</a>. <p>In particular, there is a convention for the output format name in the output language map: the one with <code>-css</code> suffix is the one used when <code>--css</code> command line option is given <div class="node"> <a name="Output-Language-definition-files"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#Developing-your-own-definition-files">Developing your own definition files</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#Output-Language-map">Output Language map</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Configuration-files">Configuration files</a> </div> <h3 class="section">5.7 Output Language definition files</h3> <p>These files are crucial for source-highlight since they specify how the source elements are highlighted. These files also allow to specify your own output format definitions in order to deal with an output format that is not handled by source-highlight<a rel="footnote" href="#fn-21" name="fnd-21"><sup>21</sup></a>. The syntax for these files is explained in <a href="#Output-Language-Definitions">Output Language Definitions</a>. <p>These files are part of source-highlight distribution, but they can also be downloaded, independently, from here: <p><a href="http://www.gnu.org/software/src-highlite/outlang_files/">http://www.gnu.org/software/src-highlite/outlang_files/</a> <div class="node"> <a name="Developing-your-own-definition-files"></a> <p><hr> Previous:&nbsp;<a rel="previous" accesskey="p" href="#Output-Language-definition-files">Output Language definition files</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Configuration-files">Configuration files</a> </div> <h3 class="section">5.8 Developing your own definition files</h3> <p>I encourage those who write new language definitions or correct/modify existing language definitions to send them to me so that they can be added to the source-highlight distribution! <p>Since these files require more explanations (that, however, are not necessary to the standard usage of source-highlight), they are carefully explained in separate parts: <a href="#Language-Definitions">Language Definitions</a> and <a href="#Output-Language-Definitions">Output Language Definitions</a>. <p>These files are part of source-highlight distribution, but they can also be downloaded, independently, from here: <p><a href="http://www.gnu.org/software/src-highlite/lang_files/">http://www.gnu.org/software/src-highlite/lang_files/</a> <div class="node"> <a name="Invoking-source-highlight"></a> <a name="Invoking-source_002dhighlight"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#Language-Definitions">Language Definitions</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#Configuration-files">Configuration files</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a> </div> <h2 class="chapter">6 Invoking <samp><span class="command">source-highlight</span></samp></h2> <p><a name="index-invoking-103"></a><a name="index-version-104"></a><a name="index-options-105"></a><a name="index-usage-106"></a><a name="index-help-107"></a><a name="index-getting-help-108"></a> The format for running the <samp><span class="command">source-highlight</span></samp> program is: <pre class="example"> source-highlight <var>option</var> ... </pre> <p><code>source-highlight</code> supports the following options, shown by the output of <code>source-highlight --detailed-help</code>: <pre class="smallexample"> source-highlight Highlight the syntax of a source file (e.g. Java) into a specific format (e.g. HTML) Usage: [OPTIONS]... &lt; input_file &gt; output_file source-highlight [OPTIONS]... -i input_file -o output_file source-highlight [OPTIONS]... [FILES]... -h, --help Print help and exit --detailed-help Print help, including all details and hidden options, and exit -V, --version Print version and exit -i, --input=filename input file. default std input -o, --output=filename output file. default std output (when the third invocation form is used). If STDOUT is specified, the output is directed to standard output you can simply specify some files at the command line and also use regular expressions (for instance *.java). In this case the name for the output files will be formed using the name of the source file with a .&lt;ext&gt; appended, where &lt;ext&gt; is the extension chosen according to the output format specified (for instance .html). -s, --src-lang=STRING source language (use --lang-list to get the complete list). If not specified, the source language will be guessed from the file extension. --lang-list list all the supported language and associated language definition file --outlang-list list all the supported output language and associated language definition file -f, --out-format=STRING output format (use --outlang-list to get the complete list) (default=`html') -d, --doc create an output file that can be used as a stand alone document (e.g., not to be included in another one) --no-doc cancel the --doc option even if it is implied (e.g., when css is given) -c, --css=filename the external style sheet filename. Implies --doc -T, --title=STRING give a title to the output document. Implies --doc -t, --tab=INT specify tab length. (default=`8') -H, --header=filename file to insert as header -F, --footer=filename file to insert as footer --style-file=filename specify the file containing format options (default=`default.style') --style-css-file=filename specify the file containing format options (in css syntax) --style-defaults=filename specify the file containing defaults for format options (default=`style.defaults') --outlang-def=filename output language definition file --outlang-map=filename output language map file (default=`outlang.map') --data-dir=path directory where language definition files and language maps are searched for. If not specified these files are searched for in the current directory and in the data dir installation directory --output-dir=path output directory --lang-def=filename language definition file --lang-map=filename language map file (default=`lang.map') --show-lang-elements=filename prints the language elements that are defined in the language definition file --infer-lang force to infer source script language (overriding given language specification) Lines: -n, --line-number[=padding] number all output lines, using the specified padding character (default=`0') --line-number-ref[=prefix] number all output lines and generate an anchor, made of the specified prefix + the line number (default=`line') Filtering output: Mode: linerange specifying line ranges --line-range=STRING generate only the lines in the specified range(s) each range can be of the shape: single line (e.g., --line-range=50) full range (e.g., --line-range=2-10) partial range (e.g., --line-range=-30, first 30 lines, --line-range=40- from line 40 to the end --range-separator=STRING the optional separator to be printed among ranges (e.g., "...") --range-context=INT number of (context) lines generated even if not in range The optional --range-context specifies the number of lines that are not in range that will be printed anyway (before and after the lines in range); These lines will be formatted according to the "context" style. Mode: regexrange specifying regular expression delimited ranges --regex-range=STRING generate only the lines within the specified regular expressions when a line containing the specified regular expression is found, then the lines after this one are actually generated, until another line, containing the same regular expression is found (this last line is not generated). More than one regular expression can be specified. reference generation: --gen-references=STRING generate references (possible values="inline", "postline", "postdoc" default=`inline') --ctags-file=filename specify the file generated by ctags that will be used to generate references (default=`tags') --ctags=cmd how to run the ctags command. If this option is not specified, ctags will be executed with the default value. If it is specified with an empty string, ctags will not be executed at all (default=`ctags --excmd=n --tag-relative=yes') testing: -v, --verbose verbose mode on -q, --quiet print no progress information --binary-output write output files in binary mode This is useful for testing purposes, since you may want to make sure that output files are always generated with a final newline character only --statistics print some statistics (i.e., elapsed time) --gen-version put source-highlight version in the generated file (default=on) --check-lang=filename only check the correctness of a language definition file --check-outlang=filename only check the correctness of an output language definition file --failsafe if no language definition is found for the input, it is simply copied to the output -g, --debug-langdef[=type] debug a language definition. In dump mode just dumps all the steps; in interactive, at each step, waits for some input (press ENTER to step) (possible values="interactive", "dump" default=`dump') --show-regex=filename show the regular expression automaton corresponding to a language definition file </pre> <p>Let us explain some options in details (apart from those that should be clear from the <code>--help</code> output itself, and those already explained in <a href="#Simple-Usage">Simple Usage</a>). <!-- Formatting copied from the Texinfo 4.0 manual. --> <dl> <dt><code>--data-dir</code><dd><a name="index-g_t_0040code_007b_002d_002ddata_002ddir_007d-109"></a>Source-highlight, during the execution, will need some files, such as, e.g., language definition files, output format definition files, etc. These files are installed in <code>prefix/share/source-highlight</code> where <code>prefix</code> is chosen at compilation time (see See <a href="#Installation">Installation</a>). Thus, source-highlight should be able to find all the files it needs independently. However, if you want to override this setting, e.g., because you have your own language definition files, or simply because you installed a possible source-highlight binary in a different directory from the one used during the compilation, you can use the command line option <code>--data-dir</code>. <br><dt><code>--doc</code><dt><code>-d</code><dd>If you want a stand alone output document (i.e., an output file that is not thought to be included in another document), specify this option (otherwise you just get some text that you can paste into another document). If you choose this option and do not provide a <code>--title</code>, the your source file name will be used as the title. <br><dt><code>--no-doc</code><dd>The <code>--doc</code> option above is actually implied by other command line options (e.g., <code>--css</code>). If you do not want this (e.g., you want to include the output in an existing document containing the global style sheet), you can disable this by using <code>--no-doc</code>. <br><dt><code>--css</code><dt><code>-c</code><dd>Specify the style sheet file (e.g., a <samp><span class="file">.css</span></samp> for HTML<a rel="footnote" href="#fn-22" name="fnd-22"><sup>22</sup></a>) for the output document. Note that source-highlight will not use this file: it will simply use this file name when generating the output file, so to specify that the output file uses this file as the style sheet (e.g., if the generated HTML relies on this file as the CSS file). <br><dt><code>--tab</code><dt><code>-t</code><dd>With this options, tab characters will be converted into specified number of space characters (tabulation points will be preserved). This option is automatically selected when generating line numbers. <br><dt><code>--style-file</code><dt><code>--style-css-file</code><dd>Specify the file that source-highlight will use to produce (i.e., format) the output (e.g., colors and other styles for each language element). The formats of these files are detailed in <a href="#Output-format-style">Output format style</a> and in <a href="#Output-format-style-using-CSS">Output format style using CSS</a>, respectively. <br><dt><code>--style-defaults</code><dd>Specify the file that contains the default styles for elements whose styles are not found in the style file (see <a href="#Default-Styles">Default Styles</a> for further details). <br><dt><code>--output-dir</code><dd>You can pass to source-highlight more than one input file (see <a href="#Simple-Usage">Simple Usage</a>). In this case you cannot specify the output file name. In such cases the output files will be automatically generated into the directory where you invoked the command from; if you want the output files to be generated into a different directory you can use this option. <br><dt><code>--infer-lang</code><dd><a name="index-language-inference-110"></a><a name="index-g_t_0040code_007b_002d_002dinfer_002dlang_007d-111"></a>Force the inference mechanism for detecting the input language. This is detailed in <a href="#How-the-input-language-is-discovered">How the input language is discovered</a>. <br><dt><code>--line-number</code><dd>Line numbers will be generated in the output, using the (optional) specified padding character<a rel="footnote" href="#fn-23" name="fnd-23"><sup>23</sup></a> (the default padding character is <code>0</code>). <br><dt><code>--line-number-ref</code><dd>As <code>--line-number</code>, this option numbers all the output lines, and, additionally, generates an anchor for each line. The anchor consists of the specified prefix (default is <code>line</code>) and the line number (e.g., <code>line25</code>). For instance, as prefix, if you deal with many files, you can use the file name. Note that some output languages might not support this feature (e.g., <code>esc</code>, since it makes no sense in such case). See <a href="#Anchors-and-References">Anchors and References</a> for defining how to generate an anchor in a specific output language. <p><a name="index-line-ranges-112"></a><a name="index-range-context-113"></a><a name="index-range-separator-114"></a><br><dt><code>--line-range</code><dt><code>--range-context</code><dt><code>--range-separator</code><dd>Since version 2.11, you can specify multiple line ranges: only the lines in the source that are in these ranges will be output. For instance, by specifying <pre class="example"> --line-range="-5","10","20-25","50-" </pre> <p>Only the following lines will be output: the first 5 lines, line 10, lines 20 to 25 and from line 50 to the end of input. (See also the examples in <a href="#Line-ranges">Line ranges</a>). <p>Together with <code>--line-range</code>, you can also specify <code>--range-context</code>: this is the number of lines that will be printed before and after the lines of a range (i.e., the surrounding &ldquo;context&rdquo;). These lines will not be highlighted: they will be printed according to the style <code>context</code>. For instance, extending the previous example, <pre class="example"> --line-range="-5","10","20-25","50-" --range-context=1 </pre> <p>Also the following lines will be output: 6, 9, 11, 19, 26, 49. (See also the examples in <a href="#Line-ranges-_0028with-context_0029">Line ranges (with context)</a>). <p>Finally, you can specify a range separator line string with <code>--range-separator</code> that will be printed between ranges (See also the examples in <a href="#Line-ranges-_0028with-context_0029">Line ranges (with context)</a>). The separator string is preformatted automatically, so, e.g., you don't have to escape special output characters, such as the { } in texinfo output. <p><a name="index-regex-ranges-115"></a><br><dt><code>--regex-range</code><dd> Ranges can be expressed also using regular expressions, with the command line option <code>--regex-range</code>. In this case the beginning of the range will be detected by a line containing (in any point) a string matching the specified regular expression; the end will be detected by a line containing a string matching the same regular expression that started the range. This feature is very useful when we want to document some code (e.g., in this very manual) by showing only specific parts, that are delimited in a ad-hoc way in the source code (e.g., with specific comment patterns). You can see some usage examples in See <a href="#Regex-ranges">Regex ranges</a>. <p>The specified strings (this option accepts multiple occurrences) must be valid regular expressions (thus you must escape special characters accordingly), otherwise you will get an error. <p>Furthermore, <code>--line-range</code> and <code>--regex-range</code> cannot coexist in the same command line. <br><dt><code>--failsafe</code><dd><a name="index-failsafe-116"></a>If no language specification is found, an error will be printed and the program exits. With this option, instead, in such situations, the input is simply formatted in the output format. This is useful when <samp><span class="command">source-highlight</span></samp> is used with many input files, and it is also used in the <samp><span class="file">src-hilite-lesspipe.sh</span></samp> script. Actually I failed to find a good reason why one should not always use this option. So my suggestion is to always use it when you run source-highlight (and indeed, in the future, this option might become the default one). See also <a href="#Using-source_002dhighlight-with-less">Using source-highlight with less</a>, <a href="#Using-source_002dhighlight-as-a-simple-formatter">Using source-highlight as a simple formatter</a>. <p><a name="index-default_002elang-117"></a>When using <code>--failsafe</code>, if no input language can be established, source-highlight will use the input language definition file <samp><span class="file">default.lang</span></samp>, which is an empty file. You might want to customize such file, though. <br><dt><code>--debug-lang</code><br><dt><code>--show-regex</code><dd>Allows to debug a language definition file, <a href="#Debugging">Debugging</a>. </dl> <p>The other command line options dealing with references are explained in more details in <a href="#Generating-References">Generating References</a>. <ul class="menu"> <li><a accesskey="1" href="#How-the-input-language-is-discovered">How the input language is discovered</a> </ul> <div class="node"> <a name="How-the-input-language-is-discovered"></a> <p><hr> Previous:&nbsp;<a rel="previous" accesskey="p" href="#Invoking-source_002dhighlight">Invoking source-highlight</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Invoking-source_002dhighlight">Invoking source-highlight</a> </div> <h3 class="section">6.1 How the input language is discovered</h3> <p>As already explained, <a href="#Simple-Usage">Simple Usage</a>, source-highlight uses a language definition file according the language specified with the option <code>--src-lang</code>, or <code>--lang-def</code>, or by using the input file extension. <p>Since version 2.5, source-highlight can use an inference mechanism to deduce the input language. For the moment, it can detect script languages based on the &ldquo;sha-bang&rdquo; mechanism, i.e., when the first line of a script contains a line such as, e.g., <pre class="example"> #!/bin/sh </pre> <p>It detects script languages specified by using the <code>env</code> program<a rel="footnote" href="#fn-24" name="fnd-24"><sup>24</sup></a>: <pre class="example"> #!/usr/bin/env perl </pre> <p>It recognizes the Emacs convention, of declaring the Emacs major mode using the format <code>-*- lang -*-</code>. <p>For instance, a script starting as the following one: <pre class="example"> #!/bin/bash # -*- Tcl -*- </pre> <p class="noindent">will be interpreted as a Tcl script, and not as bash script. <p>Finally, it recognizes <code>&lt;?</code> specifications (e.g., <code>&lt;?php</code> and <code>&lt;?xml</code>) and <code>&lt;!doctype</code> (in that case, it infers it is an xml file)<a rel="footnote" href="#fn-25" name="fnd-25"><sup>25</sup></a>. <p>This inference mechanism is performed, by default, in case the input language is neither explicitly specified nor found in the language map file by using the input file extension or the filename itself, possibly also the lowercase version (the input file may also have no extension at all, but, for instance, a <samp><span class="file">ChangeLog</span></samp> input file will be highlighted using <samp><span class="file">changelog.lang</span></samp>). <p><a name="index-g_t_0040code_007b_002d_002dinfer_002dlang_007d-118"></a>Furthermore, this mechanism can be given priority with the command line option <code>--infer-lang</code>. For instance, this is used in the script <samp><span class="file">src-hilite-lesspipe.sh</span></samp> (<a href="#Using-source_002dhighlight-with-less">Using source-highlight with less</a>) when running source-highlight, in order to avoid the problem of formatting a Perl script as a Prolog program (since the extension <samp><span class="file">.pl</span></samp> is associated to Prolog programs in the language map file, <a href="#Perl">Perl</a>). <div class="node"> <a name="Language-Definitions"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#Output-Language-Definitions">Output Language Definitions</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#Invoking-source_002dhighlight">Invoking source-highlight</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a> </div> <h2 class="chapter">7 Language Definitions</h2> <p><a name="index-language-definition-119"></a> Since version 2.0 source-highlight uses a specific syntax to specify source language elements (e.g., keywords, strings, comments, etc.). Before version 2.0, language elements were scanned through Flex. This had the drawback of writing a new flex file to deal with a new language; even worse, a new language could not be added &ldquo;dynamically&rdquo;: you had to recompile the whole source-highlight program. <p>Instead, now, language elements are specified in a file, loaded dynamically, through a (hopefully) simple syntax. Then, these definitions are used internally to create, on-the-fly, regular expressions that are used to highlight the elements (see also <a href="#How-source_002dhighlight-works">How source-highlight works</a>). In particular, we use the regular expressions provided by the Boost library (see <a href="#Installation">Installation</a>). Thus, when writing a language definition file you will surely have to deal with regular expressions. Don't be scared: for most of the languages you may never have to deal with difficult regular expressions, and you can also specify language keywords (such as, e.g., &ldquo;if&rdquo;, &ldquo;while&rdquo;, etc., see <a href="#Simple-definitions">Simple definitions</a>); moreover, for defining delimited language elements you will not have to write a regular expression, but just the delimiters (see <a href="#Delimited-definitions">Delimited definitions</a>). However, there might be some language definitions that may require heavy use of more involved regular expressions (e.g., Perl, just to mention one). <p>Of course, we use the Boost regex library regular expression syntax. We refer to Boost documentation for such syntax, <a href="http://www.boost.org/libs/regex/doc/syntax.html">http://www.boost.org/libs/regex/doc/syntax.html</a>, however, in <a href="#Notes-on-regular-expressions">Notes on regular expressions</a>, we provide some notes on regular expressions that might be helpful for those who never dealt with them. By default, Boost regex library uses Perl regular expression syntax, and, at the moment, this is the only syntax supported by source-highlight. <p>Here, we see such syntax in details, by relying on many examples. This allows a user to easily modify an existing language definition and create a new one. These files have, typically, extension <samp><span class="file">.lang</span></samp>. <p>Each definition basically associates a regular expression to a language element and defines a name for the language element. Such name will be used to associate a particular style (e.g., bold face, color, etc.) when highlighting such elements. You cannot use names that are the same of keywords used in the language definition syntax (e.g., <code>start</code>, as shown later, is a reserved word). <p>Comments can be given by using <code>#</code>; the rest of the line is considered as a comment. <p>Source-highlight will scan each line of the input file separately. So a regular expression that tries to match new line characters is destined to fail. However, the language definition syntax provides means to deal with multiple lines (see <a href="#Delimited-definitions">Delimited definitions</a> and <a href="#State_002fEnvironment-Definitions">State/Environment Definitions</a>). <ul class="menu"> <li><a accesskey="1" href="#Ways-of-specifying-regular-expressions">Ways of specifying regular expressions</a> <li><a accesskey="2" href="#Simple-definitions">Simple definitions</a> <li><a accesskey="3" href="#Line-wide-definitions">Line wide definitions</a> <li><a accesskey="4" href="#Order-of-definitions">Order of definitions</a> <li><a accesskey="5" href="#Delimited-definitions">Delimited definitions</a> <li><a accesskey="6" href="#Variable-definitions">Variable definitions</a> <li><a accesskey="7" href="#Dynamic-Backreferences">Dynamic Backreferences</a> <li><a accesskey="8" href="#File-inclusion">File inclusion</a>: Include the contents of another file <li><a accesskey="9" href="#State_002fEnvironment-Definitions">State/Environment Definitions</a> <li><a href="#Explicit-subexpressions-with-names">Explicit subexpressions with names</a> <li><a href="#Redefinitions-and-Substitutions">Redefinitions and Substitutions</a> <li><a href="#How-source_002dhighlight-works">How source-highlight works</a> <li><a href="#Notes-on-regular-expressions">Notes on regular expressions</a> <li><a href="#The-program-check_002dregexp">The program check-regexp</a> <li><a href="#Listing-Language-Elements">Listing Language Elements</a> <li><a href="#Concluding-Remarks">Concluding Remarks</a> <li><a href="#Debugging">Debugging</a>: Debug a language definition file <li><a href="#Tutorials-on-Language-Definitions">Tutorials on Language Definitions</a> </ul> <div class="node"> <a name="Ways-of-specifying-regular-expressions"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#Simple-definitions">Simple definitions</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#Language-Definitions">Language Definitions</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Language-Definitions">Language Definitions</a> </div> <h3 class="section">7.1 Ways of specifying regular expressions</h3> <p>Before getting into details of language definition syntax, it is crucial to describe the 3 possible ways of specifying a regular expression string. These 3 different ways, basically differ in the way they handle regular expression special characters, such, e.g., parenthesis. For this reason, one mechanism can be more powerful than another one, but it could also require more attention; furthermore, there can be situations where you're forced to use only one mechanism, since the other ones cannot accomplish the required goal. <a name="index-g_t_0040code_007b_0022expression_0022_007d-120"></a> <dl><dt><code>"expression"</code><dd> If you use double quotes (note, <code>"</code> and not <code>``</code> or <code>''</code>) to specify a regular expression, then basically all the characters, but the alternation symbol, i.e., the pipe symbol <code>|</code>, are considered literally, and thus will be automatically escaped (e.g., a dot <code>.</code> is interpreted as the character <code>.</code> not as the regular expression wild card). Thus, for instance, if you specify <pre class="example"> "my(regular)ex.pre$$ion{*}" </pre> <p class="noindent">source-highlight will automatically transform it into <pre class="example"> my\(regular\)ex\.pre\$\$ion\{\*\} </pre> <p>The special character <code>|</code>, unless it is meant to separate two alternatives (<a href="#Simple-definitions">Simple definitions</a>), must be escaped with the character <code>\</code>, e.g., <code>\|</code>. Also the character <code>\</code>, if it is intended literally, must be escaped, e.g., <code>\\</code>. <p><a name="index-g_t_0040code_007b_0027expression_0027_007d-121"></a><br><dt><code>'expression'</code><dd> If you want to enjoy (almost) the full power of regular expressions, you need to use single quoted strings (<code>'</code>), instead of double quoted strings. This way, you can specify special characters with their intended meaning. <p>However, marked subexpressions are automatically transformed in non marked subexpressions, i.e., the parts in the expression of the shape <code>(...)</code> will be transformed into <code>(?:...)</code> (as explained in <a href="#Notes-on-regular-expressions">Notes on regular expressions</a>, <code>(?:...)</code> lexically groups part of a regular expression, without generating a marked sub-expression). <p>Thus, for instance, if you specify <pre class="example"> 'my(regular)ex.pre$ion*' </pre> <p class="noindent">source-highlight will automatically transform it into <pre class="example"> my(?:regular)ex.pre$ion* </pre> <p>Since marked subexpressions cannot be specified with this syntax, then <em>backreferences</em> (see <a href="#Notes-on-regular-expressions">Notes on regular expressions</a>) are not allowed. <p><a name="index-g_t_0040code_007b_0060expression_0060_007d-122"></a><br><dt><code>`expression`</code><dd> <a name="index-marked-subexpressions-123"></a><a name="index-backreference-124"></a><a name="index-backtick-125"></a>This syntax<a rel="footnote" href="#fn-26" name="fnd-26"><sup>26</sup></a> (note the difference, this one uses the <em>backtick</em> <code>`</code> while the previous one uses <code>'</code>) for specifying a regular expression was introduced to overcome the limitations of the other two syntaxes. With this syntax, the marked subexpressions are not transformed, and so you can use regular expressions mechanisms that rely on marked subexpressions, such as <em>backreferences</em> and <em>conditionals</em> (see <a href="#Notes-on-regular-expressions">Notes on regular expressions</a>). <p>This syntax is also crucial for highlighting specific program parts of some programming languages, such as, e.g., Perl regular expressions (e.g., in substitution expressions) that can be expressed in many forms, in particular, separators for the part to be replaced and the part to replace which can be any non alphanumerical characters<a rel="footnote" href="#fn-27" name="fnd-27"><sup>27</sup></a>, for instance, <pre class="example"> s/foo/bar/g s|foo|bar|g s#foo#bar#g s@foo@bar@g </pre> <p>Using this syntax, and backreferences, we can easily define a single language element to deal with these expressions (without specifying all the cases for each possible non alphanumerical character): <pre class="example"> regexp = `s([^[:alnum:][:blank:]]).*\1.*\1[ixsmogce]*` </pre> </dl> <p>Since version 2.11, in all kinds of regular expression specification, you can insert newline characters, which will simply be ignored. Thus, e.g., the file: <!-- Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite --> <pre class="example"> <i># test_newlines.lang</i> <i># test that newlines in expressions are simply discarded</i> <i>keyword</i> = <tt>"foo</tt> <tt>|</tt> <tt>lang"</tt> (<i>keyword</i>,<i>normal</i>,<i>classname</i>) = <tt>`(\&lt;struct)</tt> <tt>([[:blank:]]+)</tt> <tt>([[:alnum:]_]+)`</tt> <i>preproc</i> = <tt>'^[[:blank:]]*</tt> <tt>#([[:blank:]]*</tt> <tt>[[:word:]]*)'</tt> </pre> <p class="noindent">and the file: <!-- Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite --> <pre class="example"> <i># test_nonewlines.lang</i> <i># test that newlines in expressions are simply discarded</i> <i># see the corresponding test_newlines.lang</i> <i>keyword</i> = <tt>"foo|lang"</tt> (<i>keyword</i>,<i>normal</i>,<i>classname</i>) = <tt>`(\&lt;struct)([[:blank:]]+)([[:alnum:]_]+)`</tt> <i>preproc</i> = <tt>'^[[:blank:]]*#([[:blank:]]*[[:word:]]*)'</tt> </pre> <p class="noindent">are equivalent. However, the former is surely more readable. <p>Note however, that space characters are NOT ignored in regular expression definitions. <div class="node"> <a name="Simple-definitions"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#Line-wide-definitions">Line wide definitions</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#Ways-of-specifying-regular-expressions">Ways of specifying regular expressions</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Language-Definitions">Language Definitions</a> </div> <h3 class="section">7.2 Simple definitions</h3> <p><a name="index-simple-language-definition-126"></a> The simplest way to specify language elements is to list the possible alternatives. This is the case, for instance, for keywords. For instance, in <samp><span class="file">java.lang</span></samp> you have: <pre class="example"> keyword = "abstract|assert|break|case|catch|class|const", "continue|default|do|else|extends|false|final", "finally|for|goto|if|implements|instanceof|interface" keyword = "native|new|null|private|protected|public|return", "static|strictfp|super|switch|synchronized|throw", "throws|true|this|transient|try|volatile|while" </pre> <p>You can separate quoted definitions with commas. Alternatively, within a quoted definition, alternatives can be separated with the pipe symbol <code>|</code>. The above definition defines the language element <code>keyword</code>. Each time an element is found in the source file, it is highlighted with the style for the element with the same name in the output format style file (note that all elements shown in the example are taken from the language definition files that come with source-highlight and there is a style for each of such elements, see <a href="#Configuration-files">Configuration files</a>). If such an element is not specified in the output format style file, it is simply not highlighted (actually, it is highlighted with style <code>normal</code>, <a href="#Configuration-files">Configuration files</a>) (so pay attention to typos :-). <p>From the above example you may have noted that language element definitions are cumulative, so the second <code>keyword</code> definition does not replace the first one. (Indeed, in some cases you may want to actually redefine a language element; this is possible as explained in <a href="#Redefinitions-and-Substitutions">Redefinitions and Substitutions</a>). <p>Note that words specified in double quotes have to match exactly in a source file, and they must be isolated (not surrounded by anything but spaces). Thus for instance <code>class</code> is matched as a keyword, but in <code>my_class</code> the substring <code>class</code> is not matched as keyword. From the point of view of regular expressions a string such as <code>class</code> in a double quote simple definition is intended as <code>\&lt;(class)\&gt;</code>. <p>Special characters have to be escaped with the character <code>\</code>. So for instance if you want to specify the character <code>|</code>, which is normally used to separate alternatives in double quoted strings, you have to specify <code>\|</code>. <p>As explained in <a href="#Ways-of-specifying-regular-expressions">Ways of specifying regular expressions</a>, definitions in double quotes are interpreted literally (thus, e.g., a dot <code>.</code> is interpreted as the character <code>.</code> not as the regular expression wild card). If you want to enjoy the full power of regular expressions to specify a language alternative, you have to use single quoted strings (<code>'</code>), instead of double quoted strings, or strings quoted with backticks (<code>`</code>). <p>For instance, the following is the definition for a preprocessor directive in C/C++: <pre class="example"> preproc = '^[[:blank:]]*#([[:blank:]]*[[:word:]]*)' </pre> <p>Note that the definition <code>'class'</code> is different from <code>"class"</code>, as explained above. Thus, for instance <code>'class'</code> matches also the sub-expression <code>class</code> inside <code>my_class</code>. <p>Furthermore, you are not allowed to specify, in the same list, double quoted strings and single quoted strings: you need to split such list definitions. Thus, for instance, the following definition is wrong: <pre class="example"> preproc = "#define",'^[[:blank:]]*#([[:blank:]]*[[:word:]]*)' </pre> <p>while the following one is correct: <pre class="example"> preproc = "#define" preproc = '^[[:blank:]]*#([[:blank:]]*[[:word:]]*)' </pre> <p><a name="index-nonsensitive-127"></a>Finally, at the end of a list of definitions, one can specify the keyword <code>nonsensitive</code>; in that case, the specified strings will be interpreted in a non case sensitive way. For instance, we use this feature in Pascal language definition, <samp><span class="file">pascal.lang</span></samp> where keywords are parsed in a non sensitive way: <pre class="example"> keyword = "alfa|and|array|begin|case|const|div", "do|downto|else|end|false|file|for|function|get|goto|if|in", "label|mod|new|not|of|or|pack|packed|page|program", "put|procedure|read|readln|record|repeat|reset|rewrite|set", "text|then|to|true|type|unpack|until|var|while|with|writeln|write" nonsensitive </pre> <div class="node"> <a name="Line-wide-definitions"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#Order-of-definitions">Order of definitions</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#Simple-definitions">Simple definitions</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Language-Definitions">Language Definitions</a> </div> <h3 class="section">7.3 Line wide definitions</h3> <p><a name="index-lines-128"></a> It is often useful to define a language element that affects all the remaining characters up to the end of the line. For such definitions, instead of the <code>=</code> you must use the keyword <code>start</code>. For instance, the following is the definition of a single line comment in C++: <pre class="example"> comment start "//" </pre> <p>This means that when the two characters <code>//</code> are encountered in the source file, everything from these characters on, up to the end of the line, will be highlighted according to the style <code>comment</code>. <div class="node"> <a name="Order-of-definitions"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#Delimited-definitions">Delimited definitions</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#Line-wide-definitions">Line wide definitions</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Language-Definitions">Language Definitions</a> </div> <h3 class="section">7.4 Order of definitions</h3> <p><a name="index-definition-order-129"></a> It is important to observe that the order of language definitions is important since it will be used during regular expression matching (this will be detailed in <a href="#How-source_002dhighlight-works">How source-highlight works</a>). You then have to make sure that, if there are definitions that start with same characters, the longest expression is specified first in the file. For instance if you write <pre class="example"> symbol = "/" comment start "//" </pre> <p>The first expression will always be matched first, and the second expression will never be matched. The right order is <pre class="example"> comment start "//" symbol = "/" </pre> <div class="node"> <a name="Delimited-definitions"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#Variable-definitions">Variable definitions</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#Order-of-definitions">Order of definitions</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Language-Definitions">Language Definitions</a> </div> <h3 class="section">7.5 Delimited definitions</h3> <p><a name="index-delimited-definitions-130"></a> Many elements are delimited by specific character sequences. For instance, strings and multiline comments. The syntax for such an element definition is <pre class="example"> &lt;name&gt; delim &lt;left delimited&gt; &lt;right delimiter&gt; \ {escape &lt;escape character&gt;} \ {multiline} {nested} </pre> <p>The <code>escape</code> statement specifies the escape character that may precede one of the delimiters inside the element. This is optional. <p>For instance, this is the definition of C-like strings: <pre class="example"> string delim "\"" "\"" escape "\\" </pre> <p>Note that <code>\</code> is a special characters in definitions so it has to be escaped. If the <code>escape</code> specification was omitted, the C string <code>"write \"hello\" string"</code> would have been highlight incorrectly (it would have been highlighted as the string <code>"write \"</code>, the normal character sequence <code>hello\</code> and the string <code>" string"</code>). <p>The option <code>multiline</code> specifies that the element can spawn multiple lines. For instance, PHP strings are defined as follows: <pre class="example"> string delim "\"" "\"" escape "\\" multiline </pre> <p>The option <code>nested</code> instructs to count possible multiple occurrences of delimited characters and to match relative multiple occurrences (using a stack). For instance, if we wanted to highlight C-like multiline comments in a nested way<a rel="footnote" href="#fn-28" name="fnd-28"><sup>28</sup></a>, we could use the following definition: <pre class="example"> comment delim "/*" "*/" multiline nested </pre> <p>If <code>nested</code> was not used, then the closing <code>*/</code> of the following nested comment would conclude the comment (and the second <code>*/</code> would not be highlighted as a comment): <pre class="example"> /* This is a /* nested comment */ */ </pre> <p>Note that, in order for a delimited language element to be nested, its starting and ending elements must be different; thus, for instance, the following definition is not correct: <pre class="example"> string delim "\"" "\"" nested # WRONG! </pre> <p>As said above, definitions are cumulative, and they are also cumulative even when using different syntactic forms. Thus, for instance, the complete definition for C++-style comments are the following (actually, the definition of C-style comment is more involved, see the file <samp><span class="file">c_comment.lang</span></samp>): <pre class="example"> comment start "//" comment delim "/*" "*/" multiline </pre> <div class="node"> <a name="Variable-definitions"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#Dynamic-Backreferences">Dynamic Backreferences</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#Delimited-definitions">Delimited definitions</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Language-Definitions">Language Definitions</a> </div> <h3 class="section">7.6 Variable definitions</h3> <p><a name="index-variables-131"></a> It is possible to define variables to be re-used in many parts in a language definition file. A variable is defined by using <p><code>vardef</code> &lt;name of the variable&gt; <code>=</code> &lt;list of definitions&gt; <p>Once defined, a variable can be used by prepending the symbol <code>$</code> to its name. For instance, <pre class="example"> vardef FUNCTION = '(?:[[:alpha:]]|_)[[:word:]]*(?=[[:blank:]]*\()' function = $FUNCTION </pre> <p>The capital letters are used only for readability. <p>It is also possible to concatenate variables and expressions, and reuse variables inside further variable definitions: <pre class="example"> vardef basic_time = '[[:digit:]]{2}:[[:digit:]]{2}:[[:digit:]]{2}' vardef time = '\&lt;' + $basic_time + '\&gt;' </pre> <div class="node"> <a name="Dynamic-Backreferences"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#File-inclusion">File inclusion</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#Variable-definitions">Variable definitions</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Language-Definitions">Language Definitions</a> </div> <h3 class="section">7.7 Dynamic Backreferences</h3> <p><a name="index-dynamic-backreference-132"></a> With <em>dynamic backreferences</em> you can refer to a string matched by the regular expression of the first element of a <code>delim</code> specification<a rel="footnote" href="#fn-29" name="fnd-29"><sup>29</sup></a>. I called these backreferences dynamic in order to distinguish them by the backreferences of regular expression syntax, <a href="#Ways-of-specifying-regular-expressions">Ways of specifying regular expressions</a>. This is crucial in cases when the right delimiter depends on a subexpression matched by the left delimiter; for instance, Lua comments can be of the shape <code>--[[ comment ]]</code> or <code>--[=[ comment ]=]</code>, but not <code>--[=[ comment ]]</code> neither <code>--[[ comment ]=]</code> (furthermore, they can be nested)<a rel="footnote" href="#fn-30" name="fnd-30"><sup>30</sup></a>. Thus, the regular expression of the right element depends on the one of the left element. <p>A dynamic backreference is similar to a variable (<a href="#Variable-definitions">Variable definitions</a>), but there's no declaration, and have the shape of <pre class="example"> @{number} </pre> <p class="noindent">where <code>number</code> is the number of the marked subexpression in the left delimiter (source-highlight will actually check that such a marked subexpression exists in the left delimiter). <p>For instance, this is the definition of Lua comments (see also <samp><span class="file">lua.lang</span></samp>): <pre class="example"> environment comment delim `--\[(=*)\[` "]" + @{1} + "]" multiline nested begin include "url.lang" ... end </pre> <p class="noindent">Note how the left delimiter can match an optional <code>=</code>, as a marked subexpression, and the right delimiter refers to that with @{1}. <p>Source-highlight will take care of escaping possible special characters during dynamic backreference substitutions. For instance, suppose that you must substitute <code>|</code> for @{1}, because we matched <code>|</code> with the subexpression <code>[^[:alnum:]]</code> in a delim element like the following one: <pre class="example"> comment delim `([^[:alnum:]])` @{1} </pre> <p class="noindent">Since <code>|</code> is a special character in regular expression syntax source-highlight will actually replace <code>@{1}</code> with <code>\|</code>. <p>IMPORTANT: the right delimiter can only refer to subexpressions of its left delimiter; thus, in case of nested delim element definitions (e.g., in states or environment, <a href="#State_002fEnvironment-Definitions">State/Environment Definitions</a>), the left delimiter acts as a binder and hides possible subexpressions defined in outer delim elements. <p>This is crucial to correctly match nested delimited elements with backreferences: source-highlight will correctly recognize this nested (and syntactically correct) Lua comment: <pre class="example"> --[[ first level comment --[=[ second level --[[ third level ]] ]=] ]] </pre> <div class="node"> <a name="File-inclusion"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#State_002fEnvironment-Definitions">State/Environment Definitions</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#Dynamic-Backreferences">Dynamic Backreferences</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Language-Definitions">Language Definitions</a> </div> <h3 class="section">7.8 File inclusion</h3> <p><a name="index-file-inclusion-133"></a> It is possible to include other language definition files into another file. This is inclusion actually physically includes the contents of the included file into the current file during parsing, at the exact point of inclusion (just like the <code>#include</code> in C/C++). This is useful for re-using definitions in many files. For instance, C++ comment definitions are given in a file <samp><span class="file">c_comment.lang</span></samp>, and this file is included in the Java and C++ definition files. The same happens for number and functions. For instance, the file <samp><span class="file">java.lang</span></samp> contains the following include instructions: <pre class="example"> include "c_comment.lang" include "number.lang" keywords ... include "function.lang" </pre> <p>Note that the order of inclusion is crucial since the order of definition is crucial. If function definition was included before keyword definitions, then the sentence <code>if (exp)</code> would be highlighted as a function invocation (see <a href="#Order-of-definitions">Order of definitions</a> and <a href="#How-source_002dhighlight-works">How source-highlight works</a>). <div class="node"> <a name="State%2fEnvironment-Definitions"></a> <a name="State_002fEnvironment-Definitions"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#Explicit-subexpressions-with-names">Explicit subexpressions with names</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#File-inclusion">File inclusion</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Language-Definitions">Language Definitions</a> </div> <h3 class="section">7.9 State/Environment Definitions</h3> <p><a name="index-states-134"></a><a name="index-environments-135"></a> Sometimes you want some source element to be highlighted only if they are surrounded by other elements. Source-highlight language definitions provides also this feature. <pre class="example"> state|environment &lt;standard definition&gt; begin &lt;other definitions&gt; end </pre> <p>This structure is recursive (so other state/environment definitions can be given within a state/environment). The meaning of a state/environment is that the definitions within the <code>begin ... end</code> are matched only if the definitions that define the state/environment have been matched. When entering a state/environment, however, the definitions given outside the state/environment are not matched. The difference between <code>state</code> and <code>environment</code> is that in the latter, normal parts of the source language (i.e., those that do not match any definition) are highlighted according to the style of the definition that defines the environment. <p>As an example, the following defines the multiline nested C comment, and highlights URL and e-mail addresses only when they appear inside a comment (note that this uses file inclusion): <pre class="example"> environment comment delim "/*" "*/" multiline nested begin include "url.lang" end </pre> <p>Note that we used <code>environment</code> because everything else inside a comment has to be formatted according to the comment style. <p>While for programming language definitions states/environments can be avoided (although they allow to highlight some parts only if inside a specific environment, e.g., URLs inside comments, or documentation tags in Javadoc comments), they are pretty important for highlighting files such as logs and ChangeLog files, since elements have to be highlighted when they appear in a specific position. For instance, for ChangeLog (see <samp><span class="file">changelog.lang</span></samp>), we use a state for highlighting the date, name, e-mail or URL (taken from <samp><span class="file">url.lang</span></samp>): <pre class="example"> state date start '[[:digit:]]{2,4}-?[[:digit:]]{2}-?[[:digit:]]{2}' begin include "url.lang" name = '([[:word:]]|[[:punct:]])+' end </pre> <p>Note that definitions that appear inside a state/environment have the same scope of the expressions that define the environment. While this makes sense for <code>start</code> and <code>delim</code> definitions, it may make less sense for simple definitions (i.e., those that simply lists all possible expressions): in fact, in this case, such expressions do not define a scope. For such definitions, the semantics of state/environment is that the state/environment starts after matching one of the alternatives. And where will it end? In this case you must explicitly exit the environment. For instance, you can say that, when inside a state/environment, a specific language definition, when encountered also exits the environment, with the keyword <code>exit</code> (you can also specify the number of states to exit). You can even exit all the environments with <code>exitall</code>. For instance, the following definition, highlights a non empty string following a web method: <pre class="example"> vardef non_empty = '[^[:blank:]]+' state webmethod = "OPTIONS|GET|HEAD|POST|PUT|DELETE", "TRACE|CONNECT|PROPFIND|MKCOL|COPY|MOVE|LOCK|UNLOCK" begin string = $non_empty exit end </pre> <p>If you ever need such advanced features, you may want to take a look at the <samp><span class="file">log.lang</span></samp> definition file that defines highlighting for several log files (access logs, Apache logs, etc.). Moreover, there might be cases, and the above one is one of such cases, explicit subexpressions with names will be enough (see <a href="#Explicit-subexpressions-with-names">Explicit subexpressions with names</a>). <p>We conclude this section with an interesting example: comments in M4 files can start with the <code>dnl</code> keyword (up to the end of line), e.g., <pre class="example"> dnl @synopsis AC_CTAGS_FLAGS </pre> <p>Now if we want to highlight the <code>dnl</code> as a keyword, and the rest of line as a comment, we cannot simply rely on an environment, since this would highlight all the line with the same style. Moreover, we want to highlight elements starting with <code>@</code> differently, so we actually need a state (this would allow us also to highlight urls inside a comment just like in C++ comments in the example above). Thus, we need to simulate an environment with a state, and we do this for M4 as follows (see the file <samp><span class="file">m4.lang</span></samp>): <pre class="example"> state keyword start "dnl" begin # avoid spaces in front of urls or @[[:alpha:]]+ be captured as prefixes comment = '[[:blank:]]+' include "url.lang" include "html.lang" type = '@[[:alpha:]]+' # everything else is a comment comment = '.+' end </pre> <p>Once entered the state, every isolated space character is highlighted as a comment; then we have rules for URLs and @ elements; then everything else (<code>.+</code>) is highlighted as a comment. <p>One might think that a smarter way would be to have simply the following definition (after all, why bothering highlighting spaces as comments): <pre class="example"> state keyword start "dnl" begin include "url.lang" include "html.lang" type = '@[[:alpha:]]+' comment = '.+' end </pre> <p>Well, with this definition spaces in front of matched URLs or @ elements would be highlighted as normal, being considered as prefixes. This is due to how source-highlight searches for matching rules; we refer to <a href="#How-source_002dhighlight-works">How source-highlight works</a> for further details. <div class="node"> <a name="Explicit-subexpressions-with-names"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#Redefinitions-and-Substitutions">Redefinitions and Substitutions</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#State_002fEnvironment-Definitions">State/Environment Definitions</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Language-Definitions">Language Definitions</a> </div> <h3 class="section">7.10 Explicit subexpressions with names</h3> <p>Often, you need to specify two program elements in the same regular expressions, because they are tightly related, but you also need to highlight them differently. <p>For instance, you might want to highlight the name of a class (or interface) in a class (or interface) definition (e.g., in Java). Thus, you can rely on the preceding <code>class</code> keyword which will then be followed by an identifier. <p>A definition such as <pre class="example"> keyword = '(\&lt;(?:class|interface))([[:blank:]]+)([$[:alnum:]]+)' </pre> <p class="noindent">will not produce a good final result, since the name of the class will be highlighted as a keyword, which is not what you might have wanted: for instance, the class name should be highlighted as a <code>type</code>. <p>Up to version 2.6, the only way to do this was to use state or environments (<a href="#State_002fEnvironment-Definitions">State/Environment Definitions</a>) but this tended to be quite difficult to write. <p>Since version 2.7, you can specify a regular expression with marked subexpressions and bind each of them to a specific language element (the regular expression must be enclosed in <code>`</code>, see <a href="#Ways-of-specifying-regular-expressions">Ways of specifying regular expressions</a>): <pre class="example"> (elem1,...,elemn) = `(subexp1)(...)(subexpn)` </pre> <p>Now, with this syntax, we can accomplish our previous goal: <pre class="example"> (keyword,normal,type) = `(\&lt;(?:class|interface))([[:blank:]]+)([$[:alnum:]]+)` </pre> <p class="noindent">This way, the <code>class</code> (or <code>interface</code>) will be highlighted as a keyword, the separating blank characters are formatted as <code>normal</code>, and the name of the class as a <code>type</code>. <p>Note that the number of element names must be equal to the number of subexpressions in the expression; furthermore, at least in the current version, the expression can contain only marked subexpressions (no character outside is allowed) and no nested subexpressions are allowed. <p>Thus, the following specifications are NOT correct: <pre class="example"> (keyword,symbol) = `(...)(...)(...)` # number of elements doesn't match (keyword,symbol) = `(...(...)...)(...)` # contains nested subexpressions (keyword,symbol) = `...(...)...(...)` # outside characters </pre> <p>This mechanism permits expressing regular expressions for some situation in a much more compact and probably more readable way. For instance, for highlighting ChangeLog parts (the optional <code>*</code> as a symbol, the optional file name and the element specified in parenthesis as a <code>file</code> element, and the rest as <code>normal</code>) such as <pre class="example"> * src/Makefile.am (source_highlight_SOURCES): correctly include changelog_scanner.ll * this is a comment without a file name </pre> <p class="noindent">before version 2.6, we used to use these two language definitions: <pre class="example"> state symbol start '^(?:[[:blank:]]+)\*[[:blank:]]+' begin state file start '[^:]+\:' begin normal start '.' end end state normal start '^(?:[[:blank:]]+)' begin state file start '[^:]+\:' begin normal start '.' end end </pre> <p class="noindent">which can be hard to read after having written them. Now, we can write them more easily (see <samp><span class="file">changelog.lang</span></samp>): <pre class="example"> (normal,symbol,normal,file)= `(^[[:blank:]]+)(\*)([[:blank:]]+)((?:[^:]+\:)?)` (normal,file)= `(^[[:blank:]]+)((?:[^:]+\:)?)` </pre> <p>Since a language element definition using explicit subexpressions with names consists of more than one element, and thus of more than one formatting style, it cannot be used to start an environment (what would the default element be?); while, as seen above, they can be used to start a state. <div class="node"> <a name="Redefinitions-and-Substitutions"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#How-source_002dhighlight-works">How source-highlight works</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#Explicit-subexpressions-with-names">Explicit subexpressions with names</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Language-Definitions">Language Definitions</a> </div> <h3 class="section">7.11 Redefinitions and Substitutions</h3> <p>These two features are useful when you want to define a language by re-using an existing language definition with some changes. Typically you <code>include</code> another language definition file and you redefine/substitute some elements. <p><a name="index-redef-136"></a>When you use <code>redef</code> you erase all the previous definitions of that language elements with the new one. The new language element definition will be placed exactly in the point of the new definition. We use this feature, for instance, when we define the <code>sml</code> language by re-using the <code>caml</code> one: they differ only for the keywords<a rel="footnote" href="#fn-31" name="fnd-31"><sup>31</sup></a>. In fact, the contents of <samp><span class="file">sml.lang</span></samp> is summarized as follows: <pre class="example"> include "caml.lang" redef keyword = "abstraction|abstype|and|andalso..." redef type = "int|byte|boolean|char|long|float|double|short|void" </pre> <p>Since the new language element definition appears in the exact point of the redefinition, this means that such a regular expression will be matched only if all the previous ones (the ones of the included file) cannot be matched. This may lead to unwanted results in some cases (not in the <code>sml</code> case though). In other words the following code <pre class="example"> keyword = "foo" keyword = "bar" type = "int" redef keyword = "myfoo" </pre> <p class="noindent">is equivalent to the following one <pre class="example"> type = "int" keyword = "myfoo" </pre> <p><a name="index-subst-137"></a>If this is not what you want, you can use <code>subst</code>, which is similar to <code>redef</code> apart from that it replaces the previous first definition of that language element in the exact point of that first definition (all other possible definitions are simply erased). That is to say that the following code <pre class="example"> keyword = "foo" keyword = "bar" type = "int" subst keyword = "myfoo" </pre> <p class="noindent">is equivalent to the following one <pre class="example"> keyword = "myfoo" type = "int" </pre> <p>It is up to you to decide which one fits best your needs. We could use this feature to define <code>javascript</code> in terms of <code>java</code>, e.g.: <pre class="example"> include "java.lang" subst keyword = "abstract|break|case|catch|class|if..." </pre> <p class="noindent">Here using <code>redef</code> would have led to the unwanted behavior that <code>if (exp)</code> would have been highlighted as a function call, since the function element definition would have come first (and then matched first) than the redefinition of <code>if</code> as a keyword. Another example is the language definition for C# by reusing the one for C/C++, <a href="#Highlighting-C_002fC_002b_002b-and-C_0023">Highlighting C/C++ and C#</a>. <div class="node"> <a name="How-source-highlight-works"></a> <a name="How-source_002dhighlight-works"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#Notes-on-regular-expressions">Notes on regular expressions</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#Redefinitions-and-Substitutions">Redefinitions and Substitutions</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Language-Definitions">Language Definitions</a> </div> <h3 class="section">7.12 How source-highlight works</h3> <p>As hinted at the beginning of <a href="#Language-Definitions">Language Definitions</a>, source-highlight uses the definitions in the language definition file to internally create, on-the-fly, regular expressions that are used to highlight the tokens of an input file. Here we provide some internal details that are crucial to understand how to write language definition files correctly<a rel="footnote" href="#fn-32" name="fnd-32"><sup>32</sup></a>. <p>First of all, for each element definition an highlighting rule is created by source-highlight (even if they correspond to the same language element); thus, each language definition file will correspond to a list of highlighting rules. For each line of the input file, source-highlight will try to match all these rules against the whole line (more formally, against the part of the line that has not been highlighted yet). It will not stop as soon as an highlighting rule matched, since there might be another rule that matches &ldquo;better&rdquo;. Now, everything basically reduces to the semantics of that <em>better match</em>. <p><a name="index-matching-strategy-138"></a>The strategy used by source-highlight is to select the first matching rule <ul> <li>with empty prefix (or prefix containing only space characters, i.e., spaces or tabs) or <li>with the smallest prefix, </ul> <p><a name="index-prefix-139"></a>where the <em>prefix</em> of a matched rule is the part of the examined string that did not match<a rel="footnote" href="#fn-33" name="fnd-33"><sup>33</sup></a>. Thus, for instance, if we try to match the simple regular expression <code>=</code> against the string <pre class="example"> i = 10; </pre> <p><a name="index-suffix-140"></a>then the prefix is <code>i </code>, including the space. Following the terminology of regular expression, the remaining part that did not match, i.e., <code> 10;</code>, is the <em>suffix</em>. When source-highlight finds a matching rule, according to the above strategy, it formats the matched part (and the prefix as <code>normal</code>), and then it starts again searching for a matching rule on the suffix, until it processed the whole line. <p>Let us explain this strategy a little bit further with an example. Consider the following language definition file: <!-- Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite --> <pre class="example"> <i># an example for explaining the strategy of source-highlight</i> <i>type</i> = <tt>"int"</tt> <i>keyword</i> = <tt>"null"</tt> <i>symbol</i> = <tt>"="</tt> </pre> <p class="noindent">and the following line to be highlighted: <pre class="example"> int i = null </pre> <p>Then source-highlight performs these steps: <ol type=1 start=1> <li>The first matching rule is the one for <code>type</code>; since it has an empty prefix, there's no need to look any further: it highlights <code>int</code> as <code>type</code>; the remaining part to be processed is now <code> i = null</code>; <li>the first matching rule is the one for <code>keyword</code>, with the prefix <code> i = </code>; since the prefix is not empty (nor it contain only spaces), we inspect other rules; <li>the next matching rule is the one for <code>symbol</code>, with prefix <code> i </code>, which is smaller than the one for <code>keyword</code>, and since there are no other matching rules, the one for <code>symbol</code> is better, and we highlight <code>=</code> as symbol; the remaining part to be processed is now <code> null</code>; <li>the first matching rule is the one for <code>keyword</code>, and, since it has a prefix with only spaces, we look no further, and we highlight <code>null</code> as <code>keyword</code>. </ol> <p>We conclude this section by showing the following language definition, which summarizes what we said about the highlighting strategy: <!-- Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite --> <pre class="example"> <i>keyword</i> = <tt>"if|class"</tt> <i>type</i> = <tt>'int'</tt> <i>comment</i> <b>delim</b> <tt>"/*"</tt> <tt>"*/"</tt> <i># thus this won't catch "/* */ /" as a regexp,</i> <i># since comment elem definition comes first</i> <i>regexp</i> = <tt>'/.*/.*/'</tt> <i># this won't match if ( ) as a function,</i> <i># since keyword elem definition comes first</i> <i>function</i> = <tt>'([[:alpha:]]|_)[[:word:]]*[[:blank:]]*\(*[[:blank:]]*\)'</tt> <i># the following order is conceptually wrong,</i> <i># since "//" won't be highlighted as a comment, but as two symbols</i> <i>symbol</i> = <tt>"/"</tt> <i>comment</i> <b>start</b> <tt>"//"</tt> </pre> <div class="node"> <a name="Notes-on-regular-expressions"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#The-program-check_002dregexp">The program check-regexp</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#How-source_002dhighlight-works">How source-highlight works</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Language-Definitions">Language Definitions</a> </div> <h3 class="section">7.13 Notes on regular expressions</h3> <p><a name="index-regular-expressions-141"></a> Although we refer to Boost documentation for such syntax<a rel="footnote" href="#fn-34" name="fnd-34"><sup>34</sup></a>, we want to provide here some explanations of some forms of regular expressions that might be unknown but that are pretty useful in language definitions. <p><a name="index-non_002dmarking-parenthesis-142"></a>Typically, when you need to group sub-expressions with parenthesis, but you don't want the parenthesis to spit out another marked sub-expression, you can use a <em>non-marking parenthesis</em> <code>(?:expression)</code>. This is not necessary in the language definition syntax: even though you use standard parenthesis, source-highlight will transform it into a non-marking parenthesis. <p><a name="index-marked-subexpressions-143"></a>Source-highlight translates possible <em>marked subexpressions</em>, i.e., those enclosed in <code>(</code> and <code>)</code>, into non-marked subexpressions (i.e., those explained above). Since version 2.7, if you specify the expression inside <code>`</code> the marked subexpressions are left as such (see also <a href="#Ways-of-specifying-regular-expressions">Ways of specifying regular expressions</a>). This is useful for <em>backreferences</em> and <em>conditionals</em>. <p><a name="index-backreference-144"></a>An escape character followed by a digit n, where n is in the range 1-9, is a <em>backreference</em> matches the same string that was matched by sub-expression n. For example the expression <code>^(a*).*\1$</code> will match the string: <code>aaabbaaa</code> but not the string <code>aaabba</code>. Backreferences are useful to write compact language elements, such as in the case of Perl's substitution modifiers; thus <pre class="example"> regexp = `s([^[:alnum:][:blank:]]).*\1.*\1[ixsmogce]*` </pre> <p>will match all these forms <pre class="example"> s/foo/bar/g s|foo|bar|g s#foo#bar#g s@foo@bar@g </pre> <p><a name="index-lookahead-asserts-145"></a>A useful regular expression form is the <em>Forward Lookahead Asserts</em> that come in two forms, one for positive forward lookahead asserts, and one for negative lookahead asserts: <dl> <dt><code>(?=abc)</code><dd>matches zero characters only if they are followed by the expression &ldquo;abc&rdquo;. <br><dt><code>(?!abc)</code><dd>matches zero characters only if they are not followed by the expression &ldquo;abc&rdquo;. </dl> <p>For instance, in the definition of a function (<samp><span class="file">function.lang</span></samp>) we use the following regular expression: <pre class="example"> ([[:alpha:]]|_)[[:word:]]*(?=[[:blank:]]*\() </pre> <p class="noindent">Thus after the name of a function we test, with the regular expression <code>(?=\()</code> whether an open parenthesis <code>(</code> can be matched. If it can be matched, however, we leave that part in the input, so that the parenthesis will not be formatted the same way of a function name (see also <a href="#How-source_002dhighlight-works">How source-highlight works</a> to understand better this language element definition). <p>Please, be careful when using such regular expression forms: since part of the input is not actually removed you may end up always scanning the same input part (thus looping) if you do not write the regular expressions well. For instance, consider this language definition <pre class="example"> state foo = '(?=foo)' begin foo = '(?=foo)' end </pre> <p class="noindent">and the following input file: <pre class="example"> hello foo bar </pre> <p class="noindent">As soon as we match the word <code>foo</code> we leave it in the input and we enter a state where we try to match the word <code>foo</code> still leaving it in the input. As you might have guess this will make source-highlight loop forever. Probably one might have wanted to write this language definition: <pre class="example"> state foo = '(?=foo)' begin foo = 'foo' end </pre> <p class="noindent">but a cut-and-paste error had its way ;-) <p><a name="index-lookbehind-asserts-146"></a>You can also use <em>Lookbehind Asserts</em>: <dl> <dt><code>(?&lt;=pattern)</code><dd> consumes zero characters, only if pattern could be matched against the characters preceding the current position (pattern must be of fixed length). <br><dt><code>(?&lt;!pattern)</code><dd> consumes zero characters, only if pattern could not be matched against the characters preceding the current position (pattern must be of fixed length). </dl> <p><a name="index-conditional-expressions-147"></a>Another advanced regular expression mechanism is the one of <em>conditional expressions</em> <dl> <dt><code>(?(condition)yes-pattern|no-pattern)</code><dd>attempts to match yes-pattern if the condition is true, otherwise attempts to match no-pattern. <br><dt><code>(?(condition)yes-pattern)</code><dd>attempts to match yes-pattern if the condition is true, otherwise fails. </dl> <p>Condition may be either a forward lookahead assert, or the index<a rel="footnote" href="#fn-35" name="fnd-35"><sup>35</sup></a> of a marked sub-expression (the condition becomes true if the sub-expression has been matched). For instance, the following expression<a rel="footnote" href="#fn-36" name="fnd-36"><sup>36</sup></a>, that we wrote on more lines to try to make it more readable <pre class="example"> (?: (\() |(\[) |(\{) ) [[:alpha:]]* (?: (?(1) \) |(?:(?(2) \] |(?:\} ))))) </pre> <p>will match <code>(foo)</code>, <code>[foo]</code> and <code>{foo}</code> but not <code>(foo]</code>, <code>{foo]</code> or <code>{foo)</code>. <div class="node"> <a name="The-program-check-regexp"></a> <a name="The-program-check_002dregexp"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#Listing-Language-Elements">Listing Language Elements</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#Notes-on-regular-expressions">Notes on regular expressions</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Language-Definitions">Language Definitions</a> </div> <h3 class="section">7.14 The program <samp><span class="command">check-regexp</span></samp></h3> <p><a name="index-g_t_0040command_007bcheck_002dregexp_007d-148"></a>Since version 2.7, the source-highlight package comes with a small additional program, <samp><span class="command">check-regexp</span></samp>, that permits testing regular expressions on the command line. <p>You simply pass as the first command line argument the regular expression and then the strings you want to try to match (actually, the program searches the string for the given regular expression, so it is not required to match the whole string). It is crucial, in order to avoid shell substitutions, to enclose both the expression and the strings in single quotes. <p>The program then prints some information about the (possibly successful matching). The <code>what[0]</code> part represents the whole match, and <code>what[i]</code> part represents the i-th marked subexpression that matched. The program also prints possible prefix and suffix. <p>Here's an example of output of the program: <pre class="example"> check-regexp '(a+)(.*)\1' 'aabcdaa' 'babbbacc' searching : aabcdaa for the regexp : (a+)(.*)\1 what[0]: aabcdaa what[1]: aa length: 2 what[2]: bcd length: 3 total number of matches: 1 searching : babbbacc for the regexp : (a+)(.*)\1 prefix: b what[0]: abbba what[1]: a length: 1 what[2]: bbb length: 3 suffix: cc total number of matches: 1 </pre> <p>And here's the example of matching parenthesis we saw in <a href="#Notes-on-regular-expressions">Notes on regular expressions</a>: <pre class="smallexample"> check-regexp \ '(?:(\()|(\[)|(\{))[[:alnum:]]*(?:(?(1)\)|(?:(?(2)\]|(?:\})))))' \ '{ciao}' '(foo]' '[hithere]' searching : {ciao} for the regexp : (?:(\()|(\[)|(\{))[[:alnum:]]*(?:(?(1)\)|(?:(?(2)\]|(?:\}))))) what[0]: {ciao} what[3]: { length: 1 total number of matches: 1 searching : (foo] for the regexp : (?:(\()|(\[)|(\{))[[:alnum:]]*(?:(?(1)\)|(?:(?(2)\]|(?:\}))))) total number of matches: 0 searching : [hithere] for the regexp : (?:(\()|(\[)|(\{))[[:alnum:]]*(?:(?(1)\)|(?:(?(2)\]|(?:\}))))) what[0]: [hithere] what[2]: [ length: 1 total number of matches: 1 </pre> <div class="node"> <a name="Listing-Language-Elements"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#Concluding-Remarks">Concluding Remarks</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#The-program-check_002dregexp">The program check-regexp</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Language-Definitions">Language Definitions</a> </div> <h3 class="section">7.15 Listing Language Elements</h3> <p>In order for language definitions to be really useful they must be used in proper combination with formatting styles (see <a href="#Output-format-style">Output format style</a>). However, these different files might not be developed by the same person, or simply some one may want to customize one of these. In order to define good output formatting style files you should be aware of each language element defined by a language definition file. Instead of having to look inside the language definition file itself (and recursively in each included file) you can use the command line <a name="index-g_t_0040code_007b_002d_002dshow_002dlang_002delements_007d-149"></a>option <code>--show-lang-elements</code><a rel="footnote" href="#fn-37" name="fnd-37"><sup>37</sup></a>, that simply prints to the standard output all the language elements that can be highlighted with a specific language definition file. <p>For instance, for <code>cpp.lang</code> you get: <pre class="example"> cbracket classname comment function keyword label normal number preproc specialchar string symbol todo type url usertype </pre> <p>while for <code>log.lang</code> you get: <pre class="example"> cbracket comment date function ip normal number port string symbol time twonumbers webmethod </pre> <div class="node"> <a name="Concluding-Remarks"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#Debugging">Debugging</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#Listing-Language-Elements">Listing Language Elements</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Language-Definitions">Language Definitions</a> </div> <h3 class="section">7.16 Concluding Remarks</h3> <p>By mixing all these features you can unleash your imagination and define highlighting for complex source languages such as Flex and Bison by writing few lines of code and re-use existing ones. For instance, Flex and Bison have their own syntax and lets you write C/C++ code in specific parts of the source language, e.g., the code between the outmost brackets, in the following example, is C++ code, and should be highlighted following C++ language definitions (apart from variables that are prefixed with <code>$</code>): <pre class="example"> globaltags : options { if (...) { setTags( $1 ); } } </pre> <p>This is easy to do (taken from <samp><span class="file">flex.lang</span></samp>): <pre class="example"> state cbracket delim "{" "}" multiline nested begin variable = '\$.' include "cpp.lang" end </pre> <p>Note that, since we used <code>nested</code> we can be sure that the C++ language definitions are not considered anymore when we matched the last closing <code>}</code>. <div class="node"> <a name="Debugging"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#Tutorials-on-Language-Definitions">Tutorials on Language Definitions</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#Concluding-Remarks">Concluding Remarks</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Language-Definitions">Language Definitions</a> </div> <h3 class="section">7.17 Debugging</h3> <p><a name="index-debug-150"></a> When writing a language definition file, it is quite useful to be able to debug it (by using complex regular expressions one may experience unwanted behaviors). Since version 2.1 the command line option <code>--debug-lang</code> is available. When using this option, some additional information are printed to the standard output. <p>Since version 2.5 this option also accepts the a sub specification (see <a href="#Invoking-source_002dhighlight">Invoking source-highlight</a>). When using <code>dump</code> (the default) all the additional information explained below will be dumped without interaction with the user. When using <code>interactive</code>, for each formatted string the program will stop waiting for a command from the user. In this very primordial version of interactive debug, the user will only have to press <code>ENTER</code> to make the program continue until the next formatted string. This way, the programmer will have the chance to step the highlighting of each part of the input file. Moreover, when debugging is enabled, no buffering will be performed by the program, thus each formatted element will be immediately available in the output. For instance, you can use the command <samp><span class="command">tail -f</span></samp> to see the modifications on the output file on-the-fly. <p>When using this command line option the additional information produced has the following format: <pre class="example"> &lt;.lang filename&gt;:&lt;line number&gt; expression: &lt;matched subexpression&gt; formatting: &lt;source file string to be formatted&gt; entering: &lt;next state's id&gt; exiting state, level: &lt;number of states&gt; </pre> <p>The lines starting with <code>entering</code>, <code>exiting</code> and <code>exitingall</code> are related to entering a new state/environment and exiting one and all states/environments (<code>current state</code>, if shown, comes after <code>entering</code> and prints the same state's regular expression but after the substitution of dynamic backreferences, <a href="#Dynamic-Backreferences">Dynamic Backreferences</a>). The first line shows a link to the <samp><span class="file">.lang</span></samp> definition file and the line number, i.e., and the sub-expression that matched and the line starting with <code>formatting</code> shows the source file string that matched with that expression. If a line starting with <code>formatting</code> is not preceded by a line with the link to the sub-expression, it means that no particular regular expression has matched, and thus the style <code>normal</code> will be used to format that string. <p>Consider the following (simplified) Java source file: <!-- Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite --> <pre class="example"> <tt>01:</tt> <i>/*</i> <tt>02:</tt> <i> This is to demonstrate --debug-lang</i> <tt>03:</tt> <tt>http://www.lorenzobettini.it</tt> <tt>04:</tt> <i>*/</i> <tt>05:</tt> <tt>06:</tt> <b>package</b> hello; <tt>07:</tt> <tt>08:</tt> <b>public</b> <b>class</b> Hello { <tt>09:</tt> <i>// just some greetings ;-) /*</i> <tt>10:</tt> <b>int</b> i = 10; <tt>11:</tt> System.out.println(<tt>"Hello World!"</tt>); <tt>12:</tt> } <tt>13:</tt> </pre> <p>Now you can debug the <samp><span class="file">java.lang</span></samp> file by using the <code>--debug-lang</code> command line option. And the output is as follows: <pre class="example"> c_comment.lang:24 expression: "/\*" formatting "/*" as comment entering state: 23 formatting " This is to demonstrate --debug-lang" as default formatting " " as default url.lang:3 expression: "(?:(?:&lt;?)[[:word:]]+://[[:word:]\./\-_]+(?:&gt;?))" formatting "http://www.lorenzobettini.it" as url c_comment.lang:24 expression: "\*/" formatting "*/" as comment exiting state, level: 1 java.lang:1 expression: "\&lt;(?:import|package)\&gt;" formatting "package" as preproc formatting " hello" as default symbols.lang:1 expression: "(?:~|!|%|\^|\*|\(|\)|-|\+|=|\[|\]|\\|:|;|,|\.|/|\?|&amp;|&lt;|&gt;|\|)" formatting ";" as symbol ... omissis ... c_comment.lang:13 expression: "//" formatting "//" as comment entering state: 12 formatting " just some greetings ;-) /*" as default c_comment.lang:13 expression: "\z" formatting "" as comment exiting state, level: 1 ... omissis ... </pre> <p>This should provide enough information to understand how the regular expressions are used and how the states/environments are entered and exited. Please note that the sub-expressions that are shown may differ from the original ones specified in the <samp><span class="file">.lang</span></samp> file. This is due to the preprocessing that is performed by Source-highlight. Moreover, some sub-expressions are not defined at all in the <samp><span class="file">.lang</span></samp> file: for instance, this is the case for line wide definitions, i.e., those that are defined with the keyword <code>start</code>, <a href="#Line-wide-definitions">Line wide definitions</a>. The last lines above, showing <code>expression: "\z"</code>, means that we matched the end of a line. <p>Another useful feature in debugging is the option <code>--show-regex</code> that shows, on the standard output, the regular expression automaton that source-highlight creates. <p>For instance, consider this language definition (<samp><span class="file">comment-show.lang</span></samp>): <!-- Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite --> <pre class="example"> <b>vardef</b> <i>TODO</i> = <tt>'(TODO|FIXME)([:]?)'</tt> <b>environment</b> <i>comment</i> <b>delim</b> <tt>"/**"</tt> <tt>"*/"</tt> <b>multiline</b> <b>begin</b> <i>type</i> = <tt>'@[[:alpha:]]+'</tt> <i>todo</i> = <i>$TODO</i> <b>end</b> <b>state</b> <i>cbracket</i> <b>delim</b> <tt>"{"</tt> <tt>"}"</tt> <b>escape</b> <tt>"\\"</tt> <b>multiline</b> <b>nested</b> <b>begin</b> <i>keyword</i> = <tt>"if|then|else|endif"</tt> <b>end</b> <i>string</i> <b>delim</b> <tt>"&lt;"</tt> <tt>"&gt;"</tt> <i>string2</i> <b>delim</b> <tt>"&lt;&lt;"</tt> <tt>"&gt;&gt;"</tt> <b>multiline</b> </pre> <p class="noindent">If you now execute the following command: <pre class="example"> source-highlight --show-regex=comment-show.lang </pre> <p class="noindent">you will get, on the standard output, the following output<a rel="footnote" href="#fn-38" name="fnd-38"><sup>38</sup></a>: <pre class="smallexample"> <!-- Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite --> <pre class="example"> STATE 1 default: normal rule (comment) "/\*\*" (exit level: 0, next: 2) STATE 2 default: comment rule (comment) "\*/" (exit level: 1, next: 0) rule (type) "(?:\@[[:alpha:]]+)" (exit level: 0, next: 0) rule (todo) "(?:(?:TODO|FIXME)(?:[:]?))" (exit level: 0, next: 0) rule (cbracket) "\{" (exit level: 0, next: 3) STATE 3 default: normal rule (cbracket) "\}" (exit level: 1, next: 0) rule (cbracket) "\\." (exit level: 0, next: 0) rule (cbracket) "\{" (exit level: 0, next: 0, nested) rule (keyword) "\&lt;(?:if|then|else|endif)\&gt;" (exit level: 0, next: 0) rule (string) "&lt;(?:[^&lt;&gt;])*&gt;" (exit level: 0, next: 0) rule (string2) "&lt;&lt;" (exit level: 0, next: 4) STATE 4 default: string2 rule (string2) "&gt;&gt;" (exit level: 1, next: 0) </pre> </pre> <p class="noindent">This shows the states and highlight rules of the regular expression automaton that source-highlight creates and will use to format an input source. <p>Each state is associated a unique number in order to identify it; moreover, the default element of the state is shown (i.e., if none of the state's rule match, then that part is highlighted with the default element style). For instance, in the initial state the default style is normal. Then for each state it shows the rules for that state. For each rule you can see the corresponding element of the rule, the regular expression for the rule and some other information, that we explain in the following. <p>We can see that if we match a <code>/**</code> (it is shown as a string with escaped special characters, <code>/\*\*</code>) we enter a new state, in this case the state 2 (<code>next: 2</code>). This corresponds to the delimited element defining a new environment (<a href="#State_002fEnvironment-Definitions">State/Environment Definitions</a>). The fact that it is actually an environment and not a state<a rel="footnote" href="#fn-39" name="fnd-39"><sup>39</sup></a> can be seen by the fact that the default element is the same of the environment itself. If we match a <code>*/</code>, i.e., the end of the delimited element, we exit one level (<code>exit level: 1</code>) meaning that we go back to state 1. Then we have the state for <code>cbracket</code>, which is not an environment, in fact its default state is normal. The second rule of this state, <code>\\.</code> represents the <code>escape</code> string of the state definition. Since the delimited element is defined as nested, we have a third rule <code>{</code> which has the <code>nested</code> information; thus, if we match it, we simply enter a new instance of state 3 itself. <p>The <code>string</code> and <code>string2</code> show the difference implied by the <code>multiline</code> option: since source-highlight handles a line of input separately, the first delimited definition can be handled with a single regular expression while the multiline version cannot. <p>Note that the states/environments are indented so that it's easier to understand the outer and the inner states. <p>Let us now consider a variation of the previous example: <!-- Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite --> <pre class="example"> <b>vardef</b> <i>TODO</i> = <tt>'(TODO|FIXME)([:]?)'</tt> <b>environment</b> <i>comment</i> <b>delim</b> <tt>"/**"</tt> <tt>"*/"</tt> <b>multiline</b> <b>nested</b> <b>begin</b> <i>type</i> = <tt>'@[[:alpha:]]+'</tt> <i>todo</i> = <i>$TODO</i> <b>end</b> <i>regexp</i> = <tt>`([^[:alnum:]]).*(\1)`</tt> <i>string</i> <b>delim</b> <tt>"&lt;"</tt> <tt>"&gt;"</tt> <i>string2</i> <b>delim</b> <tt>"&lt;&lt;"</tt> <tt>"&gt;&gt;"</tt> <b>multiline</b> (<i>paren</i>,<i>normal</i>,<i>paren</i>) = <tt>`(\[)(.*)(\])`</tt> </pre> <p>and let us see the output of <code>--show-regex</code> <pre class="smallexample"> <!-- Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite --> <pre class="example"> STATE 1 default: normal rule (comment) "/\*\*" (exit level: 0, next: 2) STATE 2 default: comment rule (comment) "\*/" (exit level: 1, next: 0) rule (comment) "/\*\*" (exit level: 0, next: 0, nested) rule (type) "(?:\@[[:alpha:]]+)" (exit level: 0, next: 0) rule (todo) "(?:(?:TODO|FIXME)(?:[:]?))" (exit level: 0, next: 0) rule (regexp) "(?:([^[:alnum:]]).*(\1))" (exit level: 0, next: 0) rule (string) "&lt;(?:[^&lt;&gt;])*&gt;" (exit level: 0, next: 0) rule (string2) "&lt;&lt;" (exit level: 0, next: 3) STATE 3 default: string2 rule (string2) "&gt;&gt;" (exit level: 1, next: 0) rule (paren normal paren) "(\[)(.*)(\])" (exit level: 0, next: 0) </pre> </pre> <p>Since in the rule <code>regexp</code> we used the <code>`</code> regular expression (see <a href="#Ways-of-specifying-regular-expressions">Ways of specifying regular expressions</a>), then, the marked subexpressions are not translated in order to make backreferences work correctly. <p>The last rule uses explicit subexpressions with names (see <a href="#Explicit-subexpressions-with-names">Explicit subexpressions with names</a>); although that expression is made up of different elements, the expression is matched as a whole. <div class="node"> <a name="Tutorials-on-Language-Definitions"></a> <p><hr> Previous:&nbsp;<a rel="previous" accesskey="p" href="#Debugging">Debugging</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Language-Definitions">Language Definitions</a> </div> <h3 class="section">7.18 Tutorials on Language Definitions</h3> <p>Now we provide some examples of language definitions. In the previous sections we have already provided some code snippets, while here we provide complete examples of language definitions that are included in the source-highlight distribution itself. <p>In particular we will first show the language definition for the language definition syntax itself (file <samp><span class="file">langdef.lang</span></samp>). This will be used to highlight the examples of language definitions that we will show in this section (the highlighting will not be visible if you are viewing this manual with the <code>info</code> command). Of course, this example is highlighted itself. <!-- Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite --> <pre class="example"> <i># this is the language definition for the</i> <i># language definition syntax itself</i> <i>comment</i> <b>start</b> <tt>"#"</tt> <i>preproc</i> = <tt>"include"</tt> <i>string</i> <b>delim</b> <tt>"\""</tt> <tt>"\""</tt> <b>escape</b> <tt>"\\"</tt> <b>multiline</b> <i>regexp</i> <b>delim</b> <tt>"'"</tt> <tt>"'"</tt> <b>escape</b> <tt>"\\"</tt> <b>multiline</b> <i>regexp</i> <b>delim</b> <tt>"`"</tt> <tt>"`"</tt> <b>escape</b> <tt>"\\"</tt> <b>multiline</b> <i>keyword</i> = <tt>"state|environment|begin|end|delim|escape|start"</tt>, <tt>"multiline|nested|vardef|exitall|exit"</tt>, <tt>"redef|subst|nonsensitive"</tt> <i>symbol</i> = <tt>"=|+|,|(|)"</tt> <b>vardef</b> <i>ID</i> = <tt>'[[:word:]]+'</tt> <i>variable</i> = <tt>'\$'</tt> + <i>$ID</i> <i>variable</i> = <i>$ID</i> </pre> <p>The style that is used to highlight these examples in Texinfo is <samp><span class="file">texinfo.style</span></samp> that is shown in <a href="#Output-format-style">Output format style</a>. The language definition for the style syntax (file <samp><span class="file">style.lang</span></samp>) is even simpler: <!-- Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite --> <pre class="example"> <i># this is the language definition for the</i> <i># style definition syntax</i> <i>comment</i> <b>start</b> <tt>"//"</tt> <i>string</i> <b>delim</b> <tt>"\""</tt> <tt>"\""</tt> <b>escape</b> <tt>"\\"</tt> <i>keyword</i> = <tt>"bgcolor|purple|orange|brightorange|brightgreen|darkgreen"</tt>, <tt>"green|darkred|red|brown|pink|yellow|cyan"</tt>, <tt>"black|teal|gray|darkblue|blue"</tt>, <tt>"normal|linenum"</tt>, <tt>"noref|nf|f|u|i|b"</tt> <i>keyword</i> = <tt>'bg\:'</tt> <i>symbol</i> = <tt>",|;"</tt> <i>variable</i> = <tt>'[[:word:]]+'</tt> </pre> <p>Note that this definition is pretty simple since the language definition syntax is simple. In the next examples we will see how to use more complex features to highlight more complex language syntaxes. <ul class="menu"> <li><a accesskey="1" href="#Highlighting-C_002fC_002b_002b-and-C_0023">Highlighting C/C++ and C#</a> <li><a accesskey="2" href="#Highlighting-Diff-files">Highlighting Diff files</a> <li><a accesskey="3" href="#Pseudo-semantic-analysis">Pseudo semantic analysis</a> </ul> <div class="node"> <a name="Highlighting-C%2fC++-and-C%23"></a> <a name="Highlighting-C_002fC_002b_002b-and-C_0023"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#Highlighting-Diff-files">Highlighting Diff files</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#Tutorials-on-Language-Definitions">Tutorials on Language Definitions</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Tutorials-on-Language-Definitions">Tutorials on Language Definitions</a> </div> <h4 class="subsection">7.18.1 Highlighting C/C++ and C#</h4> <p>This is the language definition for C, included in the file <samp><span class="file">c.lang</span></samp>: <!-- Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite --> <pre class="example"> <i># definitions for C</i> <b>include</b> <tt>"c_comment.lang"</tt> <i>label</i> = <tt>'^[[:blank:]]*[[:alnum:]]+:[[:blank:]]*\z'</tt> (<i>keyword</i>,<i>normal</i>,<i>classname</i>) = <tt>`(\&lt;struct)([[:blank:]]+)([[:alnum:]_]+)`</tt> <b>state</b> <i>preproc</i> <b>start</b> <tt>'^[[:blank:]]*#(?:[[:blank:]]*include)'</tt> <b>begin</b> <i>string</i> <b>delim</b> <tt>"&lt;"</tt> <tt>"&gt;"</tt> <i>string</i> <b>delim</b> <tt>"\""</tt> <tt>"\""</tt> <b>escape</b> <tt>"\\"</tt> <b>include</b> <tt>"c_comment.lang"</tt> <b>end</b> <i>preproc</i> = <tt>'^[[:blank:]]*#([[:blank:]]*[[:word:]]*)'</tt> <b>include</b> <tt>"number.lang"</tt> <b>include</b> <tt>"c_string.lang"</tt> <i>keyword</i> = <tt>"__asm|__cdecl|__declspec|__export|__far16"</tt>, <tt>"__fastcall|__fortran|__import"</tt>, <tt>"__pascal|__rtti|__stdcall|_asm|_cdecl"</tt>, <tt>"__except|_export|_far16|_fastcall"</tt>, <tt>"__finally|_fortran|_import|_pascal|_stdcall|__thread|__try|asm|auto"</tt>, <tt>"break|case|catch|cdecl|const|continue|default"</tt>, <tt>"do|else|enum|extern|for|goto"</tt>, <tt>"if|pascal"</tt>, <tt>"register|return|sizeof|static"</tt>, <tt>"struct|switch"</tt>, <tt>"typedef|union"</tt>, <tt>"volatile|while"</tt> <i>type</i> = <tt>"bool|char|double|float|int|long"</tt>, <tt>"short|signed|unsigned|void|wchar_t"</tt> <b>include</b> <tt>"symbols.lang"</tt> <i>cbracket</i> = <tt>"{|}"</tt> <b>include</b> <tt>"function.lang"</tt> <b>include</b> <tt>"clike_vardeclaration.lang"</tt> </pre> <p class="noindent">Note that this makes use of lots of <code>include</code>s since these parts are reused in other language definitions (e.g., Java has lots of parts that are in common with C/C++ so we wrote these parts in separate files). In particular the comments definitions: <!-- Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite --> <pre class="example"> <i># c_comment.lang</i> <i># comments with documentation tags</i> <b>environment</b> <i>comment</i> <b>start</b> <tt>"///"</tt> <b>begin</b> <b>include</b> <tt>"url.lang"</tt> <b>include</b> <tt>"html_simple.lang"</tt> <i>type</i> = <tt>'@[[:alpha:]]+'</tt> <b>include</b> <tt>"todo.lang"</tt> <b>end</b> <i>comment</i> <b>start</b> <tt>"//"</tt> <i># comments with documentation tags</i> <b>environment</b> <i>comment</i> <b>delim</b> <tt>"/**"</tt> <tt>"*/"</tt> <b>multiline</b> <b>begin</b> <b>include</b> <tt>"url.lang"</tt> <b>include</b> <tt>"html_simple.lang"</tt> <i>type</i> = <tt>'@[[:alpha:]]+'</tt> <b>include</b> <tt>"todo.lang"</tt> <b>end</b> <i># standard comments</i> <b>environment</b> <i>comment</i> <b>delim</b> <tt>"/*"</tt> <tt>"*/"</tt> <b>multiline</b> <b>begin</b> <b>include</b> <tt>"url.lang"</tt> <b>include</b> <tt>"todo.lang"</tt> <b>end</b> </pre> <p class="noindent">Here we have the definitions for line-wide comments (<code>//</code>) and for multi line comments where we highlight also URL addresses and e-mail addresses (defined in the file <samp><span class="file">url.lang</span></samp> not shown here). Moreover, for comments that are used in automatic documentation generation tools (such as Doxygen or Javadoc), i.e., those that start with <code>/**</code> or <code>///</code>) we also highlight the complete HTML syntax (defined in the file <samp><span class="file">html.lang</span></samp> not shown here). <p>Going back to <samp><span class="file">c.lang</span></samp> we see that we use subexpressions with names (see <a href="#Explicit-subexpressions-with-names">Explicit subexpressions with names</a>) for highlighting the struct name (when preceded by <code>struct</code>, highlighted as a keyword). <p>For preprocessor directives <code>#include</code> we use a state definition since in this case the file included with the <code>&lt;file&gt;</code> syntax must be formatted as strings (and only in this context the <code>&lt;&gt;</code> must be considered as strings, anywhere else they are operators). Since a state erases definitions defined outside the state we must include <samp><span class="file">c_comment.lang</span></samp> again in order to highlight comments also in this context<a rel="footnote" href="#fn-40" name="fnd-40"><sup>40</sup></a>. Then we have a definition of <code>preproc</code> that catches all the other preprocessor directives. <p>The included file <samp><span class="file">number.lang</span></samp> defines the regular expression that catches number constants (not shown here), then we include the file <samp><span class="file">c_string.lang</span></samp> that define strings (again shared by Java): <!-- Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite --> <pre class="example"> <b>vardef</b> <i>SPECIALCHAR</i> = <tt>'\\.'</tt> <b>environment</b> <i>string</i> <b>delim</b> <tt>"\""</tt> <tt>"\""</tt> <b>begin</b> <i>specialchar</i> = <i>$SPECIALCHAR</i> <b>end</b> <b>environment</b> <i>string</i> <b>delim</b> <tt>"'"</tt> <tt>"'"</tt> <b>begin</b> <i>specialchar</i> = <i>$SPECIALCHAR</i> <b>end</b> </pre> <p class="noindent">inside a string we want to highlight in a different way the special characters (such as, e.g., <code>\n</code>, <code>\t</code>, etc.) and in general escaped characters, matched by the regular expression `<code>\\.</code>'. <p>The included file <samp><span class="file">symbols.lang</span></samp> defines all the symbols (shared also by other languages): <!-- Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite --> <pre class="example"> <i>symbol</i> = <tt>"~"</tt>,<tt>"!"</tt>,<tt>"%"</tt>,<tt>"^"</tt>,<tt>"*"</tt>,<tt>"("</tt>,<tt>")"</tt>,<tt>"-"</tt>,<tt>"+"</tt>,<tt>"="</tt>,<tt>"["</tt>, <tt>"]"</tt>,<tt>"\\"</tt>,<tt>":"</tt>,<tt>";"</tt>,<tt>","</tt>,<tt>"."</tt>,<tt>"/"</tt>,<tt>"?"</tt>,<tt>"&amp;"</tt>,<tt>"&lt;"</tt>,<tt>"&gt;"</tt>,<tt>"\|"</tt> </pre> <p class="noindent">This has nothing interesting but the fact that it shows that the character <code>\</code> and <code>|</code> have to be escaped. <p>The included file <samp><span class="file">function.lang</span></samp> defines the regular expression to match a function definition or invocation: <!-- Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite --> <pre class="example"> <b>vardef</b> <i>FUNCTION</i> = <tt>'([[:alpha:]]|_)[[:word:]]*(?=[[:blank:]]*\()'</tt> <i>function</i> = <i>$FUNCTION</i> </pre> <p class="noindent">that shows an example of forward lookahead assert for the opening parenthesis (see <a href="#Notes-on-regular-expressions">Notes on regular expressions</a>). As noted in <a href="#File-inclusion">File inclusion</a>, it is crucial that this file is included after the keyword definition. <p>Finally, <samp><span class="file">c.lang</span></samp> includes the file <samp><span class="file">clike_vardeclaration.lang</span></samp>: <!-- Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite --> <pre class="example"> (<i>usertype</i>,<i>usertype</i>,<i>normal</i>) = <tt>`([[:alpha:]_](?:[^[:punct:][:space:]]|[_])*)</tt> <tt>((?:&lt;.*&gt;)?)</tt> <tt>(\s+(?=[*&amp;]*[[:alpha:]_][^[:punct:][:space:]]*\s*[[:punct:]\[\]]+))`</tt> </pre> <p>This definition, using subexpressions with names (see <a href="#Explicit-subexpressions-with-names">Explicit subexpressions with names</a>), tries<a rel="footnote" href="#fn-41" name="fnd-41"><sup>41</sup></a> to match user types (e.g., struct names) in function parameter and variable declarations. It basically tries to match a type identifier, then a possible template specification<a rel="footnote" href="#fn-42" name="fnd-42"><sup>42</sup></a> and then we have a complete lookahead assert (<a href="#Notes-on-regular-expressions">Notes on regular expressions</a>) that tries to match the variable identifier, possibly with <code>&amp;</code> and <code>*</code> reference and pointer specification, followed by an assignment <code>=</code> or a <code>;</code>, more generally a <code>[:punct:]</code> or <code>[]</code> (for array specifications). This should catch the user types in the correct contexts, as in the following (where we intentionally highlighted <code>usertype</code> in italics): <!-- Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite --> <pre class="example"> <i>Integer</i> i = 10; <i>Boolean</i> b; <i>String</i> args[]; <b>const</b> <i>MyType</i> args[]; <b>const</b> <i>My_Type</i> args[]; <i>List&lt;Integer&gt;</i> mylist; <i>List&lt;List&lt;Integer&gt; &gt;</i> mylist; myspace::<i>InputStream</i> iStream ; <i>MyType</i> *t; <i>MyType</i> **t; <b>const</b> <i>MyType</i> &amp;t; <b>if</b> (argc &gt; 0) { } <i>__mytype</i> _i; <b>typedef</b> <i>_mytype</i> __i; </pre> <p>Note that since for the third group we use a lookahead assert, what is matched is not actually formatted but it is put back in the input stream so that it can be formatted using other rules (e.g., <code>symbol</code> for <code>*</code> and <code>=</code>). <p>Since, at least syntactically, C++ is an extension of C, the language definition for C++, included in the file <samp><span class="file">cpp.lang</span></samp>, relies on <samp><span class="file">c.lang</span></samp><a rel="footnote" href="#fn-43" name="fnd-43"><sup>43</sup></a>: <!-- Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite --> <pre class="example"> <i># definitions for C++</i> <i># most of it is shared with c.lang</i> (<i>keyword</i>,<i>normal</i>,<i>classname</i>) = <tt>`(\&lt;(?:class|struct|typename))([[:blank:]]+)([[:alnum:]_]+)`</tt> <i>keyword</i> = <tt>"class|const_cast|delete"</tt>, <tt>"dynamic_cast|explicit|false|friend"</tt>, <tt>"inline|mutable|namespace|new|operator|private|protected"</tt>, <tt>"public|reinterpret_cast|static_cast"</tt>, <tt>"template|this|throw|true"</tt>, <tt>"try|typeid|typename"</tt>, <tt>"using|virtual"</tt> <b>include</b> <tt>"c.lang"</tt> </pre> <p>In particular, it extends the set of keywords. Moreover, note that we use subexpressions with names (see <a href="#Explicit-subexpressions-with-names">Explicit subexpressions with names</a>) for highlighting the class (or struct) name (when preceded by <code>class</code>, <code>struct</code> or <code>typename</code>, highlighted as a keyword). A similar rule was also present in <samp><span class="file">c.lang</span></samp>, but it concerned only <code>struct</code>. <p>Now that we wrote the language definition for C/C++, writing the one for C# is straightforward, since we only need to add the keyword <code>using</code> as a preprocessor element, and redefine (or better, &ldquo;substitute&rdquo;, <a href="#Redefinitions-and-Substitutions">Redefinitions and Substitutions</a>) the keywords and types: <!-- Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite --> <pre class="example"> <i># definitions for C-sharp</i> <i># by S. HEMMI, updated by L. Bettini.</i> <i>preproc</i> = <tt>"using"</tt> <i>number</i> = <tt>'\&lt;[+-]?((0x[[:xdigit:]]+)|(([[:digit:]]*\.)?</tt> <tt>[[:digit:]]+([eE][+-]?[[:digit:]]+)?))([FfDdMmUulL]+)?\&gt;'</tt> <b>include</b> <tt>"cpp.lang"</tt> <b>subst</b> <i>keyword</i> = <tt>"abstract|event|new|struct"</tt>, <tt>"as|explicit|null|switch"</tt>, <tt>"base|extern|this"</tt>, <tt>"false|operator|throw"</tt>, <tt>"break|finally|out|true"</tt>, <tt>"fixed|override|try"</tt>, <tt>"case|params|typeof"</tt>, <tt>"catch|for|private"</tt>, <tt>"foreach|protected"</tt>, <tt>"checked|goto|public|unchecked"</tt>, <tt>"class|if|readonly|unsafe"</tt>, <tt>"const|implicit|ref"</tt>, <tt>"continue|in|return"</tt>, <tt>"virtual"</tt>, <tt>"default|interface|sealed|volatile"</tt>, <tt>"delegate|internal"</tt>, <tt>"do|is|sizeof|while"</tt>, <tt>"lock|stackalloc"</tt>, <tt>"else|static"</tt>, <tt>"enum|namespace"</tt>, <tt>"get|partial|set"</tt>, <tt>"value|where|yield"</tt> <b>subst</b> <i>type</i> = <tt>"bool|byte|sbyte|char|decimal|double"</tt>, <tt>"float|int|uint|long|ulong|object"</tt>, <tt>"short|ushort|string|void"</tt> </pre> <div class="node"> <a name="Highlighting-Diff-files"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#Pseudo-semantic-analysis">Pseudo semantic analysis</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#Highlighting-C_002fC_002b_002b-and-C_0023">Highlighting C/C++ and C#</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Tutorials-on-Language-Definitions">Tutorials on Language Definitions</a> </div> <h4 class="subsection">7.18.2 Highlighting Diff files</h4> <p>Now we want to highlight files that are generated by <code>diff</code> (typically used to create patches). This program can generate outputs in three different formats (at least at best of my knowledge). <p>With the option <code>-u|--unified</code> the differences among files are shown in the same context, for instance (the examples of the diff files shown here are manually modified so that they can fit in the page width): <!-- Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite --> <pre class="example"> diff -ruP source-highlight-2.1.1/source-highlight.spec ... <i>--- source-highlight-2.1.1/source-highlight.spec ...</i> <i>+++ source-highlight-2.1.2/source-highlight.spec ...</i> <b>@@ -6,8 +6,8 @@</b> Summary: syntax highlighting for source documents Name: source-highlight <i>-Version: 2.1.1</i> <i>-Release: 2.1.1</i> <i>+Version: 2.1.2</i> <i>+Release: 2.1.2</i> License: GPL Group: Utilities/Console Source: ftp://ftp.gnu.org/gnu/source-highlight/%{name}-%{version}.tar.gz </pre> <p>With the option <code>-c--context</code> the differences are shown into two different parts: <!-- Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite --> <pre class="example"> diff -rc2P source-highlight-2.1.1/source-highlight.spec ... <i>*** source-highlight-2.1.1/source-highlight.spec ...</i> <i>--- source-highlight-2.1.2/source-highlight.spec ...</i> <i>***************</i> <i>*** 7,12 ****</i> Summary: syntax highlighting for source documents Name: source-highlight <i>! Version: 2.1.1</i> <i>! Release: 2.1.1</i> License: GPL Group: Utilities/Console <i>--- 7,12 ----</i> Summary: syntax highlighting for source documents Name: source-highlight <i>! Version: 2.1.2</i> <i>! Release: 2.1.2</i> License: GPL Group: Utilities/Console diff -rc2P source-highlight-2.1.1/src/latex.outlang ... <i>*** source-highlight-2.1.1/src/latex.outlang ...</i> <i>--- source-highlight-2.1.2/src/latex.outlang ...</i> <i>***************</i> <i>*** 35,37 ****</i> <i>--- 35,38 ----</i> "--" "-\\/-" "---" "-\\/-\\/-" <i>+ "\"" "\"{}" # avoids problems with some inputenc</i> end </pre> <p>Without options it generates only the essential difference information without any addition context lines: <!-- Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite --> <pre class="example"> diff -rP source-highlight-2.1.1/source-highlight.spec ... <b>9,10c9,10</b> <i>&lt; Version: 2.1.1</i> <i>&lt; Release: 2.1.1</i> --- <i>&gt; Version: 2.1.2</i> <i>&gt; Release: 2.1.2</i> </pre> <p>Summarizing, we would like to be able to handle all these three different syntaxes; note that the first format and the second format have something conflicting: the first one uses the <code>---</code> to indicate the new version of a file while the second format uses it to indicate the old version of a file. Since we want to highlight differently the old parts and the new parts (this is not visible in the Texinfo highlighting due to the lack of enhanced formatting features, but it is visible for instance in HTML output where we use two different colors), this behavior adds some difficulties. Of course, we could define three different language definitions, one for each diff output format. However, we prefer to handle them all in the same file! <p>This is the language definition for diff files: <!-- Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite --> <pre class="example"> <i># language definition for files created with 'diff'</i> <i># diff created with -u option</i> <b>state</b> <i>oldfile</i> = <tt>'(?=^[-]{3})'</tt> <b>begin</b> <i>oldfile</i> <b>start</b> <tt>'^[-]{3}'</tt> <i>oldfile</i> <b>start</b> <tt>'^[-]'</tt> <i>newfile</i> <b>start</b> <tt>'^[+]'</tt> <i>difflines</i> <b>start</b> <tt>'^@@'</tt> <b>end</b> <i># diff created with -c option</i> <b>state</b> <i>oldfile</i> = <tt>'(?=^[*]{3})'</tt> <b>begin</b> <b>environment</b> <i>oldfile</i> = <tt>'^[*]{3}[[:blank:]]+[[:digit:]]'</tt> <b>begin</b> <i>normal</i> <b>start</b> <tt>'^[[:space:]]'</tt> <i>newfile</i> = <tt>'(?=^[-]{3})'</tt> <b>exit</b> <b>end</b> <i>oldfile</i> <b>start</b> <tt>'^[*]{3}'</tt> <b>environment</b> <i>newfile</i> = <tt>'^[-]{3}[[:blank:]]+[[:digit:]]'</tt> <b>begin</b> <i>normal</i> <b>start</b> <tt>'^[[:space:]]'</tt> <i>newfile</i> = <tt>'(?=^[*]{3})'</tt> <b>exit</b> <i>normal</i> <b>start</b> <tt>'^diff'</tt> <b>exit</b> <b>end</b> <i>newfile</i> <b>start</b> <tt>'^[-]{3}'</tt> <b>end</b> <i># otherwise, created without options</i> <b>state</b> <i>difflines</i> = <tt>'(?=^[[:digit:]])'</tt> <b>begin</b> <i>difflines</i> <b>start</b> <tt>'^[[:digit:]]'</tt> <i>oldfile</i> <b>start</b> <tt>'^[&lt;]'</tt> <i>newfile</i> <b>start</b> <tt>'^[&gt;]'</tt> <b>end</b> </pre> <p>Since we can safely assume that when we process a diff file it contains only information created with the same diff command line switch, we define three different states that correspond to the three diff output formats. Note that these states are entered with a simple definition; as noted in <a href="#State_002fEnvironment-Definitions">State/Environment Definitions</a>, this means that no automatic exit means are provided, and since no explicit exit condition is specified, this means that once one of this state is entered it will never be exited. This is consistent with our goal. Of course, the expression that makes us enter a state must be defined correctly, and in particular we first search for an initial <code>---</code> sequence since this is used as the first difference specification by the <code>-u|--unified</code> option, so this is a distinguishing feature to be used to infer which diff format file we are processing. <p>Another interesting thing, is that we use the forward lookahead assert for the opening parenthesis (see <a href="#Notes-on-regular-expressions">Notes on regular expressions</a>), since we only want to see which file format we are processing. Once we entered the right state we can define the regular expressions for the elements of the specific diff file format. <p>For the files created with the option <code>-c|--context</code> we define two inner environments, one for the new file part and one for the old file part (these are delimited by a <code>---</code> or <code>***</code> and line number information). Note that these are environments, so anything that is not matched by any expression is formatted according to the style of the element that defines the environment. Thus, we provide an expression for text that must be formatted as normal. For diff files this corresponds to a line that start with a space or with <code>diff</code> (take a look at the examples above). In particular the latter case can take place only during the new file part. In both environments we must define the exit conditions. In both cases these correspond to the beginning of the complementary part; also in this case we use forward lookahead assertions, since we use it only to exit the environment. The outer definitions for <code>oldfile</code> and <code>newfile</code> are used to match the lines with source file information information. <p>The third state, corresponding to the normal diff output format, should be straightforward by now. <div class="node"> <a name="Pseudo-semantic-analysis"></a> <p><hr> Previous:&nbsp;<a rel="previous" accesskey="p" href="#Highlighting-Diff-files">Highlighting Diff files</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Tutorials-on-Language-Definitions">Tutorials on Language Definitions</a> </div> <h4 class="subsection">7.18.3 Pseudo semantic analysis</h4> <p>Source-highlight, by means of regular expressions can only perform lexical analysis of the input source. In particular, it is based on the assumption that the input source is syntactically correct with respect to the input language. However, by using the language definition syntax and by writing the right regular expression it is possible to simulate some sort of semantic analysis of the input source. <p>For instance, consider the following C (or C++) source file: <!-- Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite --> <pre class="example"> <i>// test special #if 0 treatment</i> <b>int</b> main() { <b>#if</b> 0 <i>// equivalent to a comment</i> <b>int</b> i = 10; printf(<tt>"this should never be executed</tt>\n<tt>"</tt>); <b>return</b> 1; <b>#else</b> printf(<tt>"Hello world!</tt>\n<tt>"</tt>); <b>return</b> 0; <b>#endif</b> printf(<tt>"never reach here!</tt>\n<tt>"</tt>); } </pre> <p class="noindent">It is easy to verify that the code between <code>#if 0</code> and <code>#else</code> will be never executed (indeed it will not even be compiled). Thus, we might want to format it as a comment. <p>We then write another language definition file, based on the file <samp><span class="file">cpp.lang</span></samp>: <!-- Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite --> <pre class="example"> <b>environment</b> <i>comment</i> <b>start</b> <tt>'^[[:blank:]]*#if[[:blank:]]+0'</tt> <b>begin</b> <i>comment</i> <b>start</b> <tt>'^[[:blank:]]*#(else|endif)'</tt> <b>exit</b> <b>end</b> <b>include</b> <tt>"cpp.lang"</tt> </pre> <p class="noindent">We intentionally included an error in this first version: we used the <code>start</code> element to start the environment, but such element has the scope of a single line, thus, it does not have the desired behavior: <!-- Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite --> <pre class="example"> <i>// test special #if 0 treatment</i> <b>int</b> main() { <i>#if 0 // equivalent to a comment</i> <b>int</b> i = 10; printf(<tt>"this should never be executed</tt>\n<tt>"</tt>); <b>return</b> 1; <b>#else</b> printf(<tt>"Hello world!</tt>\n<tt>"</tt>); <b>return</b> 0; <b>#endif</b> printf(<tt>"never reach here!</tt>\n<tt>"</tt>); } </pre> <p>A better solution is the following one: <!-- Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite --> <pre class="example"> <b>environment</b> <i>comment</i> = <tt>'^[[:blank:]]*#[[:blank:]]*if[[:blank:]]+0'</tt> <b>begin</b> <i>comment</i> <b>start</b> <tt>'^[[:blank:]]*#[[:blank:]]*(else|endif)'</tt> <b>exit</b> <b>end</b> <b>include</b> <tt>"cpp.lang"</tt> </pre> <p class="noindent">here we enter the <code>comment</code> environment by not using a delimited element, but simply the regular expression to match <code>#ifdef 0</code>. Then we exit the environment either when we match an <code>#else</code> or a <code>#endif</code>. This seems to work: <!-- Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite --> <pre class="example"> <i>// test special #if 0 treatment</i> <b>int</b> main() { <i>#if 0 // equivalent to a comment</i> <i> int i = 10;</i> <i> printf("this should never be executed\n");</i> <i> return 1;</i> <i>#else</i> printf(<tt>"Hello world!</tt>\n<tt>"</tt>); <b>return</b> 0; <b>#endif</b> printf(<tt>"never reach here!</tt>\n<tt>"</tt>); } </pre> <p>However, it does not work if we consider nested <code>#if...#else</code>; for instance consider the following code, formatted with the previous language definition: <!-- Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite --> <pre class="example"> <i>// test special #if 0 treatment</i> <b>int</b> main() { <i>#if 0 // equivalent to a comment</i> <i> int i = 10;</i> <i> printf("this should never be executed\n");</i> <i># ifdef FOO</i> <i> printf("foo\n");</i> <i># ifndef BAR</i> <i> printf("no bar\n");</i> <i># else</i> <b># endif</b> <b># else</b> printf(<tt>"no foo</tt>\n<tt>"</tt>); <b># endif</b> <i>// FOO</i> <b>return</b> 1; <b>#else</b> printf(<tt>"Hello world!</tt>\n<tt>"</tt>); <b>return</b> 0; <b>#endif</b> printf(<tt>"never reach here!</tt>\n<tt>"</tt>); } </pre> <p class="noindent">The problem is that the previous language definition does not consider nested <code>#if</code> and thus, the first time it matches a <code>#else</code> or an <code>#endif</code> it exits the <code>comment</code> environment. <p>We must then take into account possible nested occurrences. This can be done by using a delimited element with the <code>nested</code> option (<a href="#Delimited-definitions">Delimited definitions</a>): <!-- Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite --> <pre class="example"> <i># treat the preprocess statement</i> <i># #if 0</i> <i># ...</i> <i># #else</i> <i># as a comment</i> <b>environment</b> <i>comment</i> = <tt>'^[[:blank:]]*#[[:blank:]]*if[[:blank:]]+0'</tt> <b>begin</b> <i>comment</i> <b>start</b> <tt>'^[[:blank:]]*#[[:blank:]]*else'</tt> <b>exit</b> <i>comment</i> <b>delim</b> <tt>'^[[:blank:]]*#[[:blank:]]*if'</tt> <tt>'^[[:blank:]]*#[[:blank:]]*endif'</tt> <b>multiline</b> <b>nested</b> <b>end</b> <b>include</b> <tt>"cpp.lang"</tt> </pre> <p class="noindent">This time the right block of code is correctly formatted as a comment: <!-- Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite --> <pre class="example"> <i>// test special #if 0 treatment</i> <b>int</b> main() { <i>#if 0 // equivalent to a comment</i> <i> int i = 10;</i> <i> printf("this should never be executed\n");</i> <i># ifdef FOO</i> <i> printf("foo\n");</i> <i># ifndef BAR</i> <i> printf("no bar\n");</i> <i># else</i> <i># endif</i> <i># else</i> <i> printf("no foo\n");</i> <i># endif // FOO</i> <i> return 1;</i> <i>#else</i> printf(<tt>"Hello world!</tt>\n<tt>"</tt>); <b>return</b> 0; <b>#endif</b> printf(<tt>"never reach here!</tt>\n<tt>"</tt>); } </pre> <p>Note that it is crucial to exit the environment even when we match an <code>#else</code> (not only an <code>#endif</code>, since, this way, we can match again another <code>#ifdef 0</code>; consider, for instance, the following code: <!-- Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite --> <pre class="example"> <i>// test special #if 0 treatment</i> <b>int</b> main() { <i>#if 0 // equivalent to a comment</i> <i> int i = 10;</i> <i> printf("this should never be executed\n");</i> <i> return 1;</i> <i>#else</i> printf(<tt>"Hello world!</tt>\n<tt>"</tt>); <i># if 0 // another one</i> <i> return 1;</i> <i># else</i> <b>return</b> 0; <b># endif</b> <b>#endif</b> printf(<tt>"never reach here!</tt>\n<tt>"</tt>); } </pre> <div class="node"> <a name="Output-Language-Definitions"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#Generating-References">Generating References</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#Language-Definitions">Language Definitions</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a> </div> <h2 class="chapter">8 Output Language Definitions</h2> <p><a name="index-output-language-definition-151"></a> Since version 2.1 source-highlight uses a specific syntax to specify output formats (e.g., how to format in HTML, LaTeX, etc.). Before version 2.1, in order to add a new output format, many C++ classes had to be written. This had the drawback that a new output format could not be added &ldquo;dynamically&rdquo;: you had to recompile the whole source-highlight program. <p>Instead, now, an output format is specified in a file, loaded dynamically, through a (hopefully) simple syntax. Then, these definitions are used internally to create, on-the-fly, text formatters. <p>Here, we see such syntax in details, by relying on many examples. This allows a user to easily modify an existing output format definition and create a new one. These files have, typically, extension <samp><span class="file">.outlang</span></samp>. <p>Each definition basically associates a text style (such as, e.g., bold, italics, colors, etc.) to the representation of that style into the output format (such as, e.g., <code>&lt;b&gt;$text&lt;/b&gt;</code> in HTML). The representation is given in <code>"</code> and you can use the classic escape character <code>\</code> to use the <code>"</code> inside the definition. If you want to specify the ASCII code for a character you can do so by specifying the numeric code in hexadecimal notation preceded by <code>\x</code>, for an example, see <a href="#Style-template">Style template</a>. <p>If no definition is given for a specific style, e.g., bold, then when that style is requested during formatting, the text will be formatted as it is, i.e., the style without the definition is simply ignored. <p>Comments can be given by using <code>#</code>; the rest of the line is considered as a comment. <p>Files can be included in the same way as for language definitions, <a href="#File-inclusion">File inclusion</a>. <p>In any case, if a definition for a style is given more than once, the last definition replaces all the others. <ul class="menu"> <li><a accesskey="1" href="#File-extension">File extension</a>: Specify the output file extension <li><a accesskey="2" href="#Text-styles">Text styles</a>: Bold, Italics, Underline, etc. <li><a accesskey="3" href="#Colors">Colors</a>: Style and definitions for colors <li><a accesskey="4" href="#Anchors-and-References">Anchors and References</a> <li><a accesskey="5" href="#One-style">One style</a> <li><a accesskey="6" href="#Style-template">Style template</a> <li><a accesskey="7" href="#Line-prefix">Line prefix</a> <li><a accesskey="8" href="#String-translation">String translation</a> <li><a accesskey="9" href="#Document-template">Document template</a> <li><a href="#Generating-HTML-output">Generating HTML output</a> </ul> <div class="node"> <a name="File-extension"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#Text-styles">Text styles</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#Output-Language-Definitions">Output Language Definitions</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Output-Language-Definitions">Output Language Definitions</a> </div> <h3 class="section">8.1 File extension</h3> <p>With the line: <pre class="example"> extension "&lt;file extension&gt;" </pre> <p class="noindent">you define the default file extension (without the <code>.</code>) used to generate files formatted according to this output format. This is used when no output file name is specified; if the file extension is not included in the <code>.outlang</code> is not defined, and no output file name is specified, an error will occur. <p>For instance, this is used in <samp><span class="file">html_common.outlang</span></samp>: <pre class="example"> extension "html" </pre> <div class="node"> <a name="Text-styles"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#Colors">Colors</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#File-extension">File extension</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Output-Language-Definitions">Output Language Definitions</a> </div> <h3 class="section">8.2 Text styles</h3> <p><a name="index-bold-152"></a><a name="index-italics-153"></a><a name="index-underline-154"></a><a name="index-fixed-155"></a><a name="index-notfixed-156"></a> These are the text styles that one can define: <pre class="example"> bold italics underline notfixed fixed </pre> <p class="noindent">These, of course, correspond to the ones used to specify the output format style, <a href="#Output-format-style">Output format style</a>. <p>These definitions, for instance, are from the HTML format definition: <pre class="example"> bold "&lt;b&gt;$text&lt;/b&gt;" italics "&lt;i&gt;$text&lt;/i&gt;" underline "&lt;u&gt;$text&lt;/u&gt;" </pre> <p><a name="index-g_t_0024text-157"></a>Inside a definition you use the special variable <code>$text</code> to specify where the actual text to be formatted has to be inserted. For instance, the definition of <code>bold</code> above says that if you need to format the keyword <code>class</code> in bold in HTML, the following text will be generated: <code>&lt;b&gt;class&lt;/b&gt;</code>. This variable is used also when mixing more than one styles recursively, in particular if you want to format in bold and italics (i.e, first bold and then italics, or, in other words, the sequence <code>i, b</code> is used in the the output format style file, see <a href="#Output-format-style">Output format style</a>), then first the text <code>class</code> is substituted for <code>$text</code> into <code>&lt;b&gt;$text&lt;/b&gt;</code> and then the text <code>&lt;b&gt;class&lt;/b&gt;</code> will be substituted for <code>$text</code> into <code>&lt;i&gt;$text&lt;/i&gt;</code>, thus obtaining <code>&lt;i&gt;&lt;b&gt;class&lt;/b&gt;&lt;/i&gt;</code>. <div class="node"> <a name="Colors"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#Anchors-and-References">Anchors and References</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#Text-styles">Text styles</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Output-Language-Definitions">Output Language Definitions</a> </div> <h3 class="section">8.3 Colors</h3> <p><a name="index-colors-158"></a><a name="index-g_t_0024style-159"></a> The definition for using colors during formatting requires the definition for the <code>color</code> style <pre class="example"> color "..." </pre> <p><a name="index-background-color-160"></a>and for the <code>bgcolor</code> style<a rel="footnote" href="#fn-44" name="fnd-44"><sup>44</sup></a>: <pre class="example"> bgcolor "..." </pre> <p>This definition concerns only the background color for a specific highlighted element, i.e., the color specified in the style file with the prefix <code>bg:</code> (see <a href="#Output-format-style">Output format style</a>) or the property <code>background-color</code> specified in a CSS file passed to <code>--style-css-file</code> (see <a href="#Output-format-style-using-CSS">Output format style using CSS</a>). Thus it should not be confused with the background color of the entire output (i.e., the one specified using <code>bgcolor</code> in a style file or the property <code>background-color</code> of the <code>body</code> selector in a CSS). The background color for the entire document is explained in <a href="#Document-template">Document template</a>. <p>Note that the background color might not be available for all output formats. For instance, for HTML we only have: <pre class="example"> color "&lt;font color=\"$style\"&gt;$text&lt;/font&gt;" </pre> <p class="noindent">while for XHTML we have: <pre class="example"> color "&lt;span style=\"color: $style\"&gt;$text&lt;/span&gt;" bgcolor "&lt;span style=\"background-color: $style\"&gt;$text&lt;/span&gt;" </pre> <p>Apart from the variable <code>$text</code> that we already saw, we have also the variable <code>$style</code>, that will be replaced with the actual color. <p>Source-highlight recognizes a number of color constants, see <a href="#Output-format-style">Output format style</a>. <p>You then must associate a color constant to the color definition in the output format, through the <code>colormap</code> definition: <pre class="example"> colormap "color constant" "color representation" "color constant" "color representation" ... default "default color representation" end </pre> <p>The <code>default</code> row (note the absence of <code>"</code>) defines the color to be used in case a color constant is used during formatting, but it is not defined in the output format. <p>For instance, for HTML we have: <pre class="example"> colormap "green" "#33CC00" "red" "#FF0000" "darkred" "#990000" "blue" "#0000FF" "brown" "#9A1900" "pink" "#CC33CC" "yellow" "#FFCC00" "cyan" "#66FFFF" "purple" "#993399" "orange" "#FF6600" "brightorange" "#FF9900" "brightgreen" "#33FF33" "darkgreen" "#009900" "black" "#000000" "teal" "#008080" "gray" "#808080" "darkblue" "#000080" default "#000000" end </pre> <p>If your output format does not handle colors you can simply avoid the definitions of <code>color</code> and <code>colormap</code> and Source-highlight will simply ignore colors. <p>The color is applied after applying the other styles, e.g., bold, italics, etc. <p>Thus, by continuing the example of the previous section, suppose you defined the following output style for keywords: <pre class="example"> keyword blue i, b; </pre> <p class="noindent">then the <code>class</code> text will be replaced to <code>$text</code> variable and the value <code>#0000FF</code> to <code>$style</code> inside the color definition <code>&lt;font color="$style"&gt;$text&lt;/font&gt;</code> obtaining <code>&lt;font color="#0000FF"&gt;class&lt;/font&gt;</code> which will then be replaced to <code>$text</code> in <code>&lt;b&gt;$text&lt;/b&gt;</code> and so on for italics, finally obtaining <p><code>&lt;i&gt;&lt;b&gt;&lt;font color="#0000FF"&gt;class&lt;/font&gt;&lt;/b&gt;&lt;/i&gt;</code>. <div class="node"> <a name="Anchors-and-References"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#One-style">One style</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#Colors">Colors</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Output-Language-Definitions">Output Language Definitions</a> </div> <h3 class="section">8.4 Anchors and References</h3> <p><a name="index-g_t_0024linenum-161"></a> When using the command line option <code>--line-number-ref</code> (<a href="#Invoking-source_002dhighlight">Invoking source-highlight</a>) an anchor is generated in the output file for each line numbering. The style of the anchor is defined by the definition <code>anchor</code>. If this is not defined, the option <code>--line-number-ref</code> has no effect. The <code>$linenum</code> variable will be replaced with the line number, and the <code>$text</code> variable with the actual text. <p>For instance, for HTML we have <pre class="example"> anchor "&lt;a name=\"$linenum\"&gt;$text&lt;/a&gt;" </pre> <p><a name="index-g_t_0024infile-162"></a><a name="index-g_t_0024infilename-163"></a><a name="index-g_t_0024outfile-164"></a>Since version 2.2 source-highlight can also generate references to several elements (e.g., variables, class definitions, etc.), <a href="#Generating-References">Generating References</a>. Also in this case the definition <code>anchor</code> is used; furthermore, the definition of <code>reference</code> is required. In the definition of <code>anchor</code> and <code>reference</code>, apart from the variable <code>$linenum</code>, we also have the variables <code>$infile</code> (the name of the original input file) and <code>$infilename</code> (the name of the original input file without the path) and in the definition of <code>reference</code> we also have the variable <code>$outfile</code> (the name of the file where the anchor is). One can decide how to define an anchor and a reference by using these two variables. For instance, for HTML we have <pre class="example"> reference "&lt;a href=\"$outfile#$linenum\"&gt;$text&lt;/a&gt;" </pre> <p class="noindent">Note, that in this case we use the <code>$outfile</code> since we actually generate a link to another (or possibly the same) output file. <p>On the contrary, for LaTeX, since we do not generate a &ldquo;clickable&rdquo; reference, we refer to the original input file (we use both <code>$infilename</code> and <code>$linenum</code> in both definitions of <code>anchor</code> and <code>reference</code>): <pre class="example"> anchor "\label{$infilename:$linenum}$text" reference "{\hfill $text $\rightarrow$ $infile:$linenum, \ page~\pageref{$infilename:$linenum}}" </pre> <p class="noindent">In particular, we use <code>$infilename</code> for generating the <code>\label</code> and not <code>$infile</code> because the path symbol would &ldquo;disturb&rdquo; LaTeX (while we use the complete file path in the textual information of the reference). <p>This will generate a right aligned reference. Note that it is assumed that when generating references in LaTeX one uses <code>--gen-references=postline</code> or <code>--gen-references=postdoc</code> and not <code>--gen-references=inline</code> (<a href="#Generating-References">Generating References</a>), since it makes no sense to generate an inline reference (or at least I would not know how to generate a nice looking one :-). <p>Furthermore, for Texinfo: <pre class="example"> anchor "@anchor{$infilename:$linenum}$text" reference "@flushright @xref{$infilename:$linenum,$text,$text $infile:$linenum}. @end flushright" </pre> <p class="noindent">Note that using both <code>$infilename</code> (and not <code>$infile</code> for the same reasons) and <code>$linenum</code> also in the definition of <code>anchor</code> somehow ensures that there are no duplicate anchors; this is done for LaTeX and Texinfo but not for HTML because it is assumed that the generated <samp><span class="file">.tex</span></samp> and <samp><span class="file">.texinfo</span></samp> file is included directly in a master file, as it is done in this manual (while, for instance, it is assumed that a separate HTML file is generated for each source and kept separate). If this is not your case you can change the definitions of <code>anchor</code> and <code>reference</code> as you see fit. Some examples of outputs with references in Texinfo are shown in <a href="#Examples">Examples</a>. <p><a name="index-inline_005freference-165"></a><a name="index-postline_005freference-166"></a><a name="index-postdoc_005freference-167"></a>Indeed, one can use three more definitions for <code>reference</code> that corresponds to the three arguments that can be passed to <code>--gen-references</code> command line option (<a href="#Generating-References">Generating References</a>): <code>inline_reference</code>, <code>postline_reference</code> and <code>postdoc_reference</code>. If one of this not defined, then the same definition of <code>reference</code> is used. Having the possibility of specifying different definitions is useful for instance in the case of HTML: the same style for an inline reference is pretty ugly when used also for a postline or postdoc reference: <pre class="smallexample"> postline_reference "&lt;a href=\"$outfile#$linenum\"&gt;$text -&gt; $infile:$linenum&lt;/a&gt;" postdoc_reference "&lt;a href=\"$outfile#$linenum\"&gt;$text -&gt; $infile:$linenum&lt;/a&gt;" reference "&lt;a href=\"$outfile#$linenum\"&gt;$text&lt;/a&gt;" </pre> <div class="node"> <a name="One-style"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#Style-template">Style template</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#Anchors-and-References">Anchors and References</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Output-Language-Definitions">Output Language Definitions</a> </div> <h3 class="section">8.5 One style</h3> <p><a name="index-one-style-168"></a> If the output format you are defining does not have a specific style for bold, italics, ... and for colors you can simply use the definition <code>onestyle</code>, where you can use both <code>$style</code> and <code>$text</code>. This will be used for any style (indeed any other definition such as bold, italics, color will be ignored). Indeed, in this case, it is assumed that the style of each source element is defined in a file with its own syntax, i.e., not with a syntax defined by Source-highlight. (This is the case, for instance, of HTML using CSS style sheets.) Moreover, since the output format style is not used, during formatting the variable <code>$style</code> will be replaced with the name of the element to highlight (e.g., <code>keyword</code>, <code>comment</code>, etc.). <p>For instance, for HTML CSS, we simply have: <pre class="example"> onestyle "&lt;span class=\"$style\"&gt;$text&lt;/span&gt;" </pre> <p class="noindent">In fact, HTML CSS relies on style definitions provided in a separate file (the <samp><span class="file">.css</span></samp> file indeed). Thus, when formatting a <code>keyword</code>, e.g., <code>abstract</code>, we will obtain: <pre class="example"> &lt;span class="keyword"&gt;abstract&lt;/span&gt; </pre> <p class="noindent">Of course, the style for <code>keyword</code> must be defined in the <samp><span class="file">.css</span></samp> file. <div class="node"> <a name="Style-template"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#Line-prefix">Line prefix</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#One-style">One style</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Output-Language-Definitions">Output Language Definitions</a> </div> <h3 class="section">8.6 Style template</h3> <p><a name="index-style-template-169"></a><a name="index-style-separator-170"></a> Some output formats are based on a unique template that where the other styles are composed; during composition the styles can be separated with a specific separator: <pre class="example"> styletemplate "..." styleseparator "..." </pre> <p>This is used, for instance, for the ANSI color escape sequence output format (<samp><span class="file">esc.outlang</span></samp>): <pre class="example"> styletemplate "\x1b[$stylem$text\x1b[m" styleseparator ";" bold "01$style" underline "04$style" italics "$style" color "$style" </pre> <p class="noindent">Note that, since more than one style can be mixed into the style template, <code>bold</code>, <code>underline</code>, ... explicitly use the variable <code>$style</code>. <div class="node"> <a name="Line-prefix"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#String-translation">String translation</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#Style-template">Style template</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Output-Language-Definitions">Output Language Definitions</a> </div> <h3 class="section">8.7 Line prefix</h3> <p>This feature allows you to generate a string as the prefix of each generated line that corresponds to an input line (i.e., this prefix is not generated for other generated output elements, e.g., the lines in the header, footer, etc.). <p>We use this feature in the LaTeX output (<a href="#LaTeX-output">LaTeX output</a>): <pre class="example"> lineprefix "\mbox{}" </pre> <p class="noindent">This way each line in the LaTeX output is prefixed with <code>\mbox{}</code><a rel="footnote" href="#fn-45" name="fnd-45"><sup>45</sup></a>. <p>Another interesting example that uses <code>lineprefix</code> is the javadoc output, see <a href="#Generating-HTML-output">Generating HTML output</a>. <div class="node"> <a name="String-translation"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#Document-template">Document template</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#Line-prefix">Line prefix</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Output-Language-Definitions">Output Language Definitions</a> </div> <h3 class="section">8.8 String translation</h3> <p>Some character sequences that are in the source file may have a special meaning in an output format, so they need some preprocessing (e.g., escaping them). You can specify the translation table with: <pre class="example"> translations "original sequence" "transformed sequence" 'regex' "transformed sequence" ... end </pre> <p class="noindent">The difference between <code>"original sequence"</code> and <code>'regex'</code><a rel="footnote" href="#fn-46" name="fnd-46"><sup>46</sup></a> is that with the former you specify a character sequence that will be matched literally, apart from special characters such as <code>\</code> (which, if needed to be inserted, must be escaped), <code>\n</code> (new line) and <code>\t</code> (tab character). Instead, with the latter, you can specify a regular expression (this is basically the same difference between <code>"</code> and <code>'</code> in language definitions, see <a href="#Simple-definitions">Simple definitions</a>). <p>For instance, for HTML, we have the following translation table: <pre class="example"> translations "&amp;" "&amp;amp;" "&lt;" "&amp;lt;" "&gt;" "&amp;gt;" end </pre> <p>For LaTeX, the translation table is a little bit bigger; here we show only a little part, that shows how to escape special characters (such as <code>\</code>), to translate a new line character and tab character: <pre class="example"> translations "&lt;" "$&lt;$" "&gt;" "$&gt;$" "&amp;" "\\&amp;" "\\" "\\textbackslash{}" "\n" " \\\\\n" " " "\\ " "\t" "\\ \\ \\ \\ \\ \\ \\ \\ " end </pre> <p class="noindent">Note that, since a new character must be translated in LaTeX with <code>\\</code>, we have to escape two <code>\</code> (i.e., <code>\\\\</code>) and then we want to actually insert a new line in the output file <code>\n</code>. <p>For HTML with not fixed font by default, <samp><span class="file">html_notfixed.outlang</span></samp> (see <a href="#HTML-and-XHTML-output">HTML and XHTML output</a>), we need two translate two space sequence (i.e., two adjacent spaces, since in HTML more adjacent spaces are rendered as only one space<a rel="footnote" href="#fn-47" name="fnd-47"><sup>47</sup></a>, while we want them as they are), and we also need to translate a space starting a new line in the source (thus we use the regular expression <code>^ </code>, enclosed in <code>'</code>); thus we have: <pre class="example"> translations "\n" "&lt;br&gt;\n" " " "&amp;nbsp; " '^ ' "&amp;nbsp;" # a space at the beginning of a line "\t" "&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; " end </pre> <div class="node"> <a name="Document-template"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#Generating-HTML-output">Generating HTML output</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#String-translation">String translation</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Output-Language-Definitions">Output Language Definitions</a> </div> <h3 class="section">8.9 Document template</h3> <p>You can define the beginning and the end of an output file, with <p><a name="index-doctemplate-171"></a> <pre class="example"> doctemplate "...beginning..." "...end..." end </pre> <p><a name="index-nodoctemplate-172"></a> <pre class="example"> nodoctemplate "...beginning..." "...end..." end </pre> <p>The first one is used when the <code>--doc</code> command line option is specified, while the second one is used in the other case<a rel="footnote" href="#fn-48" name="fnd-48"><sup>48</sup></a>. <p>For instance, for HTML we have <pre class="example"> nodoctemplate "&lt;!-- Generator: $additional --&gt; $header&lt;pre&gt;&lt;tt&gt;" "&lt;/tt&gt;&lt;/pre&gt;$footer " end </pre> <p class="noindent">Note that in the end part there is an explicit new line. <p>In the definition of the <code>doctemplate</code> and <code>nodoctemplate</code> the following variables can be used and will be replaced during the output generation: <dl> <dt><code>$title</code><dd>the value of the title for the output file (e.g., the one passed with the <code>--title</code> command line option; <br><dt><code>$header</code><dd>the contents of the file specified with the command line option <code>--header</code>; <br><dt><code>$footer</code><dd>the contents of the file specified with the command line option <code>--footer</code>; <br><dt><code>$css</code><dd>the value passed with the command line option <code>--css</code>; <br><dt><code>$additional</code><dd>other additional information. Source-highlight replaces this with its name and its version. <br><dt><code>$docbgcolor<a rel="footnote" href="#fn-49" name="fnd-49"><sup>49</sup></a></code><dd>the background color for the output document. Source-highlight replaces this with the value specified in the <code>bgcolor</code> of the <samp><span class="file">.style</span></samp> file (see <a href="#Output-format-style">Output format style</a>) or in the <code>body</code> selector of the CSS file passed with <code>--style-css-file</code> (see <a href="#Output-format-style-using-CSS">Output format style using CSS</a>). </dl> <p>For instance, for an HTML document with css, (file <samp><span class="file">htmlcss.outlang</span></samp>) we have: <pre class="example"> doctemplate "&lt;!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\"&gt; &lt;html&gt; &lt;head&gt; &lt;meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\"&gt; &lt;meta name=\"GENERATOR\" content=\"$additional\"&gt; &lt;title&gt;$title&lt;/title&gt; &lt;link rel=\"stylesheet\" href=\"$css\" type=\"text/css\"&gt; &lt;/head&gt; &lt;body&gt; $header&lt;pre&gt;&lt;tt&gt;" "&lt;/tt&gt;&lt;/pre&gt; $footer&lt;/body&gt; &lt;/html&gt; " end </pre> <p>For an HTML document with header and footer, (file <samp><span class="file">html.outlang</span></samp>) we have (note the use of <code>$docbgcolor</code>): <pre class="example"> doctemplate "&lt;!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML//EN\"&gt; &lt;html&gt; &lt;head&gt; &lt;meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\"&gt; &lt;meta name=\"GENERATOR\" content=\"$additional\"&gt; &lt;title&gt;$title&lt;/title&gt; &lt;/head&gt; &lt;body bgcolor=\"$docbgcolor\"&gt; $header&lt;pre&gt;&lt;tt&gt;" "&lt;/tt&gt;&lt;/pre&gt; $footer&lt;/body&gt; &lt;/html&gt; " end </pre> <p>And for an HTML table output (file <samp><span class="file">htmltable.outlang</span></samp>): <pre class="example"> doctemplate "&lt;table BGCOLOR=\"$docbgcolor\" NOSAVE &gt; &lt;tr NOSAVE&gt; &lt;td NOSAVE&gt; &lt;pre&gt;&lt;tt&gt;" "&lt;/tt&gt;&lt;/pre&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; " end </pre> <div class="node"> <a name="Generating-HTML-output"></a> <p><hr> Previous:&nbsp;<a rel="previous" accesskey="p" href="#Document-template">Document template</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Output-Language-Definitions">Output Language Definitions</a> </div> <h3 class="section">8.10 Generating HTML output</h3> <p>As a complete example we show the file <samp><span class="file">html_common.outlang</span></samp> which contains the common definitions for the various HTML output formats (<samp><span class="file">html.outlang</span></samp>, <samp><span class="file">htmltable.outlang</span></samp>, etc.): <!-- Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite --> <pre class="example"> <b>include</b> <tt>"html_ref.outlang"</tt> <b>extension</b> <tt>"html"</tt> <b>bold</b> <tt>"&lt;b&gt;$text&lt;/b&gt;"</tt> <b>italics</b> <tt>"&lt;i&gt;$text&lt;/i&gt;"</tt> <b>underline</b> <tt>"&lt;u&gt;$text&lt;/u&gt;"</tt> <b>color</b> <tt>"&lt;font color=\"$style\"&gt;$text&lt;/font&gt;"</tt> <b>colormap</b> <tt>"green"</tt> <tt>"#33CC00"</tt> <tt>"red"</tt> <tt>"#FF0000"</tt> <tt>"darkred"</tt> <tt>"#990000"</tt> <tt>"blue"</tt> <tt>"#0000FF"</tt> <tt>"brown"</tt> <tt>"#9A1900"</tt> <tt>"pink"</tt> <tt>"#CC33CC"</tt> <tt>"yellow"</tt> <tt>"#FFCC00"</tt> <tt>"cyan"</tt> <tt>"#66FFFF"</tt> <tt>"purple"</tt> <tt>"#993399"</tt> <tt>"orange"</tt> <tt>"#FF6600"</tt> <tt>"brightorange"</tt> <tt>"#FF9900"</tt> <tt>"brightgreen"</tt> <tt>"#33FF33"</tt> <tt>"darkgreen"</tt> <tt>"#009900"</tt> <tt>"black"</tt> <tt>"#000000"</tt> <tt>"teal"</tt> <tt>"#008080"</tt> <tt>"gray"</tt> <tt>"#808080"</tt> <tt>"darkblue"</tt> <tt>"#000080"</tt> <tt>"white"</tt> <tt>"#FFFFFF"</tt> <b>default</b> <tt>"#000000"</tt> <b>end</b> <b>translations</b> <tt>"&amp;"</tt> <tt>"&amp;amp;"</tt> <tt>"&lt;"</tt> <tt>"&amp;lt;"</tt> <tt>"&gt;"</tt> <tt>"&amp;gt;"</tt> <b>end</b> </pre> <p>Moreover, this file is also used for generating javadoc output: <!-- Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite --> <pre class="example"> <b>include</b> <tt>"html_common.outlang"</tt> <b>doctemplate</b> <tt>" * &lt;!-- Generated by Source-highlight --&gt;</tt> <tt> * &lt;pre&gt;&lt;tt&gt;</tt> <tt>"</tt> <tt>" * &lt;/tt&gt;&lt;/pre&gt;</tt> <tt>"</tt> <b>end</b> <b>nodoctemplate</b> <tt>" * &lt;!-- Generated by Source-highlight --&gt;</tt> <tt> * &lt;pre&gt;&lt;tt&gt;</tt> <tt>"</tt> <tt>" * &lt;/tt&gt;&lt;/pre&gt;</tt> <tt>"</tt> <b>end</b> <b>lineprefix</b> <tt>" * "</tt> <b>translations</b> <tt>"*/"</tt> <tt>"&amp;#42;/"</tt> <i># this avoids the */ to be interpreted as</i> <i># the end of a comment inside a javadoc comment</i> <b>end</b> </pre> <p>The javadoc output format is useful to format code snippets that have to be included inside a javadoc comment of another Java file<a rel="footnote" href="#fn-50" name="fnd-50"><sup>50</sup></a>. Apart from being formatted nicely in the generated HTML documentation, this also releases the programmer from escaping specific characters in the code snippet (i.e., <code>&amp;</code>, <code>&lt;</code> and <code>&gt;</code>). Note also that it also avoids the sequence <code>*/</code> to be interpreted as the closing of the (javadoc) comment. For instance, if you write this code: <pre class="example"> /** * This is an example of usage * * &lt;pre&gt;&lt;tt&gt; * System.out.println("*/"); * &lt;/tt&gt;&lt;/pre&gt; */ </pre> <p class="noindent">The resulting Java code contains a syntax error. If you use source-highlight to format the code to insert in a javadoc comment you will avoid these problems. <p>An example of a javadoc generated HTML page containing a code snippet formatted with source-highlight can be found in the file <samp><span class="file">SimpleClass-doc.html</span></samp> in the documentation directory. <div class="node"> <a name="Generating-References"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#Examples">Examples</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#Output-Language-Definitions">Output Language Definitions</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a> </div> <h2 class="chapter">9 Generating References</h2> <p><a name="index-reference-173"></a><a name="index-anchor-174"></a><a name="index-ctags-175"></a> Since version 2.2 Source-highlight also produces references to fields, variables, etc. In order to do this it relies on the program <em>Exuberant Ctags</em>, by Darren Hiebert, available at <a href="http://ctags.sourceforge.net">http://ctags.sourceforge.net</a>. Thus, you must install this program if you want Source-highlight to provide this feature. <p>The <code>ctags</code> program generates an index (or &ldquo;tag&rdquo;) file for a variety of language objects found in file(s). This allows these items to be quickly and easily located by a text editor or other utility (as in this case for Source-highlight). A &ldquo;tag&rdquo; signifies a language object for which an index entry is available (or, alternatively, the index entry created for that object)<a rel="footnote" href="#fn-51" name="fnd-51"><sup>51</sup></a>. <p>This means that Source-highlight is able to generate references for a specific source language if and only if <code>ctags</code> handles such language. We refer to the command line options of <code>ctags</code>: <code>--list-maps</code> and <code>--list-languages</code> to find out the associations of file extensions and supported languages. <p>Reference generation is enable by using the command line option <code>--gen-references</code> (<a href="#Invoking-source_002dhighlight">Invoking source-highlight</a>). This option takes an argument that rules how references will be generated: <dl> <dt><code>inline</code><dd>a reference pointer will be generated exactly in the same place of the specific element. This is useful in output formats that naturally supports links, such as HTML, while it is useless for output formats that do not support inline links, such as LaTeX. <br><dt><code>postline</code><dd>if a line of the input source contains elements for which we found references, the list of references will be generated right after the line (see the examples, <a href="#Examples">Examples</a>). <br><dt><code>postdoc</code><dd>All the references will be generated after the whole input file has been generated. </dl> <p>There is an exception: when an element has more than one reference (because a variable is defined in many sources or because a method is overloaded) then if <code>inline</code> is specified, the generation switches to <code>postline</code> for that occurrence. <p>When <code>--gen-references</code> is specified, Source-highlight first invokes <code>ctags</code>. The use can customize this call by using the command line option <code>--ctags</code> (<a href="#Invoking-source_002dhighlight">Invoking source-highlight</a>). In particular, if one does not want <code>ctags</code> to be invoked by Source-highlight (e.g., because the tags file has already been generated) then <code>--ctags</code> must be passed an empty string, <code>""</code>. In this case or when the specified <code>ctags</code> command line generates an alternative output tag file (the default generated file is <samp><span class="file">tags</span></samp>), one must specify the exact tag file with the command line option <code>--ctags-file</code>. <p>Once the tag file is generated, Source-highlight relies on the library <samp><span class="file">readtags</span></samp> provided by the <code>ctags</code> distribution, and included in the Source-highlight sources. <p>Note that if a program element is formatted according to a style that has the option <code>noref</code> (see <a href="#Output-format-style">Output format style</a>) then this element is not considered a tag, and no reference is generated. This is the case, for instance, for a <code>comment</code> element: each string that is generated with the <code>comment</code> style, since this is declared with the option <code>noref</code>, it is not considered a tag (see <a href="#Examples">Examples</a>). <div class="node"> <a name="Examples"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#Problems">Problems</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#Generating-References">Generating References</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a> </div> <h2 class="chapter">10 Examples</h2> <p>Here we provide some examples of sources formatted with Source-highlight using the <code>-f texinfo</code> command line option. Please keep in mind that the highlighting will not be visible in the Info file, but only in the printed manual and in the HTML output (well, at least line numbers are visible everywhere :-). <ul class="menu"> <li><a accesskey="1" href="#Simple-example">Simple example</a> <li><a accesskey="2" href="#References">References</a> <li><a accesskey="3" href="#Line-ranges">Line ranges</a> <li><a accesskey="4" href="#Line-ranges-_0028with-context_0029">Line ranges (with context)</a> <li><a accesskey="5" href="#Regex-ranges">Regex ranges</a> </ul> <div class="node"> <a name="Simple-example"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#References">References</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#Examples">Examples</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Examples">Examples</a> </div> <h3 class="section">10.1 Simple example</h3> <p>The first example is produced by using the command: <pre class="example"> source-highlight -f texinfo -i test.java -o test.java.texinfo -n </pre> <p>and here's the result <!-- Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite --> <pre class="example"> <tt>01:</tt> <i>/*</i> <tt>02:</tt> <i> This is a classical Hello program</i> <tt>03:</tt> <i> to test source-highlight with Java programs.</i> <tt>04:</tt> <tt>05:</tt> <i> to have an html translation type</i> <tt>06:</tt> <tt>07:</tt> <i> source-highlight -s java -f html --input Hello.java --output Hello.html</i> <tt>08:</tt> <i> source-highlight -s java -f html &lt; Hello.java &gt; Hello.html</i> <tt>09:</tt> <tt>10:</tt> <i> or type source-highlight --help for the list of options</i> <tt>11:</tt> <tt>12:</tt> <i> written by</i> <tt>13:</tt> <i> Lorenzo Bettini</i> <tt>14:</tt> <tt>http://www.lorenzobettini.it</tt> <tt>15:</tt> <tt>http://www.gnu.org/software/src-highlite</tt> <tt>16:</tt> <i>*/</i> <tt>17:</tt> <tt>18:</tt> <b>package</b> hello; <tt>19:</tt> <tt>20:</tt> <b>import</b> java.io.* ; <tt>21:</tt> <tt>22:</tt> <i>/**</i> <tt>23:</tt> <i> * </i><b>&lt;p&gt;</b> <tt>24:</tt> <i> * A simple Hello World class, used to demonstrate some</i> <tt>25:</tt> <i> * features of Java source highlighting.</i> <tt>26:</tt> <i> * </i><b>&lt;/p&gt;</b> <tt>27:</tt> <i> * </i>TODO:<i> nothing, just to show an highlighted </i>TODO<i> or </i>FIXME <tt>28:</tt> <i> *</i> <tt>29:</tt> <i> * </i><b>@author</b><i> Lorenzo Bettini</i> <tt>30:</tt> <i> * </i><b>@version</b><i> 2.0</i> <tt>31:</tt> <i> */</i> <i>/// class</i> <tt>32:</tt> <b>public</b> <b>class</b> Hello { <tt>33:</tt> <b>int</b> foo = 1998 ; <tt>34:</tt> <b>int</b> hex_foo = 0xCAFEBABE; <tt>35:</tt> <b>boolean</b> b = <b>false</b>; <tt>36:</tt> Integer i = <b>null</b> ; <tt>37:</tt> <b>char</b> c = <tt>'</tt>\'<tt>'</tt>, d = <tt>'n'</tt>, e = <tt>'</tt>\\<tt>'</tt> ; <tt>38:</tt> String xml = <tt>"&lt;tag attr=</tt>\"<tt>value</tt>\"<tt>&gt;&amp;auml;&lt;/tag&gt;"</tt>, foo2 = <tt>"</tt>\\<tt>"</tt> ; <tt>39:</tt> <tt>40:</tt> <i>/* mymethod */</i> <tt>41:</tt> <b>public</b> <b>void</b> mymethod(<b>int</b> i) { <tt>42:</tt> <i>// just a foo method</i> <tt>43:</tt> } <tt>44:</tt> <i>/* mymethod */</i> <tt>45:</tt> <tt>46:</tt> <i>/* main */</i> <tt>47:</tt> <b>public</b> <b>static</b> <b>void</b> main( String args[] ) { <tt>48:</tt> <i>// just some greetings ;-) /*</i> <tt>49:</tt> System.out.println( <tt>"Hello from java2html :-)"</tt> ) ; <tt>50:</tt> System.out.println( <tt>"</tt>\t<tt>by Lorenzo Bettini"</tt> ) ; <tt>51:</tt> System.out.println( <tt>"</tt>\t<tt>http://www.lorenzobettini.it"</tt> ) ; <tt>52:</tt> <b>if</b> (argc &gt; 0) <tt>53:</tt> String param = argc[0]; <tt>54:</tt> <i>//System.out.println( "bye bye... :-D" ) ; // see you soon</i> <tt>55:</tt> } <tt>56:</tt> <i>/* main */</i> <tt>57:</tt> } <tt>58:</tt> <i>/// class</i> <tt>59:</tt> <tt>60:</tt> <i>// end of file test.java</i> </pre> <div class="node"> <a name="References"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#Line-ranges">Line ranges</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#Simple-example">Simple example</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Examples">Examples</a> </div> <h3 class="section">10.2 References</h3> <p>This example shows the use of <code>--gen-references</code> functionality. In particular, the following output is generated with the command: <pre class="example"> source-highlight -f texinfo -i test.h -o test_ref.h.texinfo -n \ --gen-references=postline </pre> <p>and here's the result (note how the comment line containing the string <code>mysum</code> does not contain references, since it is a <code>comment</code> element, and this element has the option <code>noref</code> in the <samp><span class="file">texinfo.style</span></samp>, see <a href="#Output-format-style">Output format style</a>. The same holds for the <code>_TEXTGEN_H</code> comment in the last comment line). <!-- Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite --> <pre class="example"> <tt>01:</tt> <i>/**</i> <tt>02:</tt> <i>** Copyright (C) 1999-2007 Lorenzo Bettini</i> <tt>03:</tt> <i>** </i> <tt>04:</tt> <tt>http://www.lorenzobettini.it</tt> <tt>05:</tt> <tt>06:</tt> <i> r2 = r2 XOR (1&lt;&lt;10);</i> <tt>07:</tt> <i> cout &lt;&lt; "hello world" &lt;&lt; endl;</i> <tt>08:</tt> <i>** </i> <tt>09:</tt> <i>*/</i> <tt>10:</tt> <tt>11:</tt> <i>// this file also contains the definition of mysum as a #define</i> <tt>12:</tt> <tt>13:</tt> <i>// textgenerator.h : Text Generator class &amp;&amp;</i> <tt>14:</tt> <tt>15:</tt> <b>#ifndef</b> _TEXTGEN_H <div align="right"><i>See <a href="#test_002eh_003a16">_TEXTGEN_H</a>.</i> </div> <tt>16:</tt> <b>#define</b> <a name="test_002eh_003a16"></a>_TEXTGEN_H <tt>17:</tt> <tt>18:</tt> <b>#define</b> <a name="test_002eh_003a18"></a>foo(x) (x + 1) <tt>19:</tt> <tt>20:</tt> <b>#define</b> <a name="test_002eh_003a20"></a>mysum myfunbody <tt>21:</tt> <tt>22:</tt> <b>#include</b> <tt>&lt;iostream.h&gt;</tt> <i>// for cerr</i> <tt>23:</tt> <tt>24:</tt> <b>#include</b> <tt>"genfun.h"</tt> <i>/* for generating functions */</i> <tt>25:</tt> <tt>26:</tt> <b>class</b> <a name="test_002eh_003a26"></a>TextGenerator { <tt>27:</tt> <b>public</b> : <tt>28:</tt> <b>virtual</b> <b>void</b> <a name="test_002eh_003a28"></a>generate( <b>const</b> <b>char</b> *s ) <b>const</b> { (*sout) &lt;&lt; s ; } <tt>29:</tt> <b>virtual</b> <b>void</b> <a name="test_002eh_003a29"></a>generate( <b>const</b> <b>char</b> *s, <b>int</b> start, <b>int</b> end ) <b>const</b> <tt>30:</tt> { <tt>31:</tt> <b>for</b> ( <b>int</b> i = start ; i &lt;= end ; ++i ) <tt>32:</tt> (*sout) &lt;&lt; s[i] ; <tt>33:</tt> <b>return</b> a&lt;p-&gt;b ? a : 3; <tt>34:</tt> } <tt>35:</tt> <b>virtual</b> <b>void</b> <a name="test_002eh_003a35"></a>generateln( <b>const</b> <b>char</b> *s ) <b>const</b> <tt>36:</tt> { <tt>37:</tt> generate( s ) ; <div align="right"><i>See <a href="#test_002eh_003a28">generate</a>.</i> </div> <div align="right"><i>See <a href="#test_002eh_003a29">generate</a>.</i> </div> <tt>38:</tt> (*sout) &lt;&lt; endl ; <tt>39:</tt> } <tt>40:</tt> <b>virtual</b> <b>void</b> <a name="test_002eh_003a40"></a>generateEntire( <b>const</b> <b>char</b> *s ) <b>const</b> <tt>41:</tt> { <tt>42:</tt> startTextGeneration() ; <div align="right"><i>See <a href="#test_002eh_003a46">startTextGeneration</a>.</i> </div> <div align="right"><i>See <a href="#test_002eh_003a70">startTextGeneration</a>.</i> </div> <tt>43:</tt> generate(s) ; <div align="right"><i>See <a href="#test_002eh_003a28">generate</a>.</i> </div> <div align="right"><i>See <a href="#test_002eh_003a29">generate</a>.</i> </div> <tt>44:</tt> endTextGeneration() ; <div align="right"><i>See <a href="#test_002eh_003a47">endTextGeneration</a>.</i> </div> <div align="right"><i>See <a href="#test_002eh_003a76">endTextGeneration</a>.</i> </div> <tt>45:</tt> } <tt>46:</tt> <b>virtual</b> <b>void</b> <a name="test_002eh_003a46"></a>startTextGeneration() <b>const</b> {} <tt>47:</tt> <b>virtual</b> <b>void</b> <a name="test_002eh_003a47"></a>endTextGeneration() <b>const</b> {} <tt>48:</tt> <b>virtual</b> <b>void</b> <a name="test_002eh_003a48"></a>beginText( <b>const</b> <b>char</b> *s ) <b>const</b> <tt>49:</tt> { <tt>50:</tt> startTextGeneration() ; <div align="right"><i>See <a href="#test_002eh_003a46">startTextGeneration</a>.</i> </div> <div align="right"><i>See <a href="#test_002eh_003a70">startTextGeneration</a>.</i> </div> <tt>51:</tt> <b>if</b> ( s ) <tt>52:</tt> generate( s ) ; <div align="right"><i>See <a href="#test_002eh_003a28">generate</a>.</i> </div> <div align="right"><i>See <a href="#test_002eh_003a29">generate</a>.</i> </div> <tt>53:</tt> } <tt>54:</tt> <b>virtual</b> <b>void</b> <a name="test_002eh_003a54"></a>endText( <b>const</b> <b>char</b> *s ) <b>const</b> <tt>55:</tt> { <tt>56:</tt> <b>if</b> ( s ) <tt>57:</tt> generate( s ) ; <div align="right"><i>See <a href="#test_002eh_003a28">generate</a>.</i> </div> <div align="right"><i>See <a href="#test_002eh_003a29">generate</a>.</i> </div> <tt>58:</tt> endTextGeneration() ; <div align="right"><i>See <a href="#test_002eh_003a47">endTextGeneration</a>.</i> </div> <div align="right"><i>See <a href="#test_002eh_003a76">endTextGeneration</a>.</i> </div> <tt>59:</tt> } <tt>60:</tt> } ; <tt>61:</tt> <tt>62:</tt> <i>// Decorator</i> <tt>63:</tt> <b>class</b> <a name="test_002eh_003a63"></a>TextDecorator : <b>public</b> TextGenerator { <div align="right"><i>See <a href="#test_002eh_003a26">TextGenerator</a>.</i> </div> <tt>64:</tt> <b>protected</b> : <tt>65:</tt> TextGenerator *<a name="test_002eh_003a65"></a>decorated ; <div align="right"><i>See <a href="#test_002eh_003a26">TextGenerator</a>.</i> </div> <tt>66:</tt> <tt>67:</tt> <b>public</b> : <tt>68:</tt> <a name="test_002eh_003a68"></a>TextDecorator( TextGenerator *t ) : decorated( t ) {} <div align="right"><i>See <a href="#test_002eh_003a26">TextGenerator</a>.</i> </div> <div align="right"><i>See <a href="#test_002eh_003a65">decorated</a>.</i> </div> <tt>69:</tt> <tt>70:</tt> <b>virtual</b> <b>void</b> <a name="test_002eh_003a70"></a>startTextGeneration() <b>const</b> <tt>71:</tt> { <tt>72:</tt> startDecorate() ; <tt>73:</tt> <b>if</b> ( decorated ) <div align="right"><i>See <a href="#test_002eh_003a65">decorated</a>.</i> </div> <tt>74:</tt> decorated-&gt;startTextGeneration() ; <div align="right"><i>See <a href="#test_002eh_003a46">startTextGeneration</a>.</i> </div> <div align="right"><i>See <a href="#test_002eh_003a65">decorated</a>.</i> </div> <div align="right"><i>See <a href="#test_002eh_003a70">startTextGeneration</a>.</i> </div> <tt>75:</tt> } <tt>76:</tt> <b>virtual</b> <b>void</b> <a name="test_002eh_003a76"></a>endTextGeneration() <b>const</b> <tt>77:</tt> { <tt>78:</tt> <b>if</b> ( decorated ) <div align="right"><i>See <a href="#test_002eh_003a65">decorated</a>.</i> </div> <tt>79:</tt> decorated-&gt;endTextGeneration() ; <div align="right"><i>See <a href="#test_002eh_003a47">endTextGeneration</a>.</i> </div> <div align="right"><i>See <a href="#test_002eh_003a65">decorated</a>.</i> </div> <div align="right"><i>See <a href="#test_002eh_003a76">endTextGeneration</a>.</i> </div> <tt>80:</tt> endDecorate() ; <tt>81:</tt> mysum; <div align="right"><i>See <a href="#test_002eh_003a20">mysum</a>.</i> </div> <tt>82:</tt> } <tt>83:</tt> <tt>84:</tt> <i>// pure virtual functions</i> <tt>85:</tt> <b>virtual</b> <b>void</b> startDecorate() <b>const</b> = 0 ; <tt>86:</tt> <b>virtual</b> <b>void</b> endDecorate() <b>const</b> = 0 ; <tt>87:</tt> } ; <tt>88:</tt> <tt>89:</tt> <b>#endif</b> <i>// _TEXTGEN_H</i> <tt>90:</tt> </pre> <div class="node"> <a name="Line-ranges"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#Line-ranges-_0028with-context_0029">Line ranges (with context)</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#References">References</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Examples">Examples</a> </div> <h3 class="section">10.3 Line ranges</h3> <p><a name="index-line-ranges-176"></a>This is an example that uses <code>--line-range</code> command line option on the input file shown in See <a href="#Simple-example">Simple example</a>: <pre class="example"> source-highlight -f texinfo -i test.java -n \ --line-range="12-18","29-34" </pre> <p>This generates the following output <!-- Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite --> <pre class="example"> <tt>12:</tt> <i> written by</i> <tt>13:</tt> <i> Lorenzo Bettini</i> <tt>14:</tt> <tt>http://www.lorenzobettini.it</tt> <tt>15:</tt> <tt>http://www.gnu.org/software/src-highlite</tt> <tt>16:</tt> <i>*/</i> <tt>17:</tt> <tt>18:</tt> <b>package</b> hello; <tt>29:</tt> <i> * </i><b>@author</b><i> Lorenzo Bettini</i> <tt>30:</tt> <i> * </i><b>@version</b><i> 2.0</i> <tt>31:</tt> <i> */</i> <i>/// class</i> <tt>32:</tt> <b>public</b> <b>class</b> Hello { <tt>33:</tt> <b>int</b> foo = 1998 ; <tt>34:</tt> <b>int</b> hex_foo = 0xCAFEBABE; </pre> <p>Note that, although the specified line ranges span comment environments, the highlighting is respected: the starting of the comment is not printed, but the remaining parts of the comment are correctly highlighted as comment. <div class="node"> <a name="Line-ranges-(with-context)"></a> <a name="Line-ranges-_0028with-context_0029"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#Regex-ranges">Regex ranges</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#Line-ranges">Line ranges</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Examples">Examples</a> </div> <h3 class="section">10.4 Line ranges (with context)</h3> <p><a name="index-line-ranges-177"></a><a name="index-range-context-178"></a><a name="index-range-separator-179"></a>This is an example that uses the command line option <code>--line-range</code> together with the <code>--range-context</code> and <code>--range-separator</code>: <pre class="example"> source-highlight -f texinfo -i test.java -n \ --line-range="12-18","29-34" \ --range-context=2 \ --range-separator="{... not in range ...}" </pre> <p>This generates the following output <!-- Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite --> <pre class="example"> {... not in range ...} <tt>10:</tt> or type source-highlight --help for the list of options <tt>11:</tt> <tt>12:</tt> <i> written by</i> <tt>13:</tt> <i> Lorenzo Bettini</i> <tt>14:</tt> <tt>http://www.lorenzobettini.it</tt> <tt>15:</tt> <tt>http://www.gnu.org/software/src-highlite</tt> <tt>16:</tt> <i>*/</i> <tt>17:</tt> <tt>18:</tt> <b>package</b> hello; <tt>19:</tt> <tt>20:</tt> import java.io.* ; {... not in range ...} <tt>27:</tt> * TODO: nothing, just to show an highlighted TODO or FIXME <tt>28:</tt> * <tt>29:</tt> <i> * </i><b>@author</b><i> Lorenzo Bettini</i> <tt>30:</tt> <i> * </i><b>@version</b><i> 2.0</i> <tt>31:</tt> <i> */</i> <i>/// class</i> <tt>32:</tt> <b>public</b> <b>class</b> Hello { <tt>33:</tt> <b>int</b> foo = 1998 ; <tt>34:</tt> <b>int</b> hex_foo = 0xCAFEBABE; <tt>35:</tt> boolean b = false; <tt>36:</tt> Integer i = null ; {... not in range ...} </pre> <p>Note the two additional 2 lines before and after the ranges (compare it with the output in <a href="#Line-ranges">Line ranges</a>). Note that the (elements of the) context lines are not highlighted. Moreover, the range separator line <code>"{... not in range ...}"</code> is printed between ranges (the separator string is preformatted automatically, so, e.g., you don't have to escape special output characters, such as the { } in texinfo output). <div class="node"> <a name="Regex-ranges"></a> <p><hr> Previous:&nbsp;<a rel="previous" accesskey="p" href="#Line-ranges-_0028with-context_0029">Line ranges (with context)</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Examples">Examples</a> </div> <h3 class="section">10.5 Regex ranges</h3> <p><a name="index-regex-ranges-180"></a>Ranges can be expressed also using regular expressions, with the command line option <code>--regex-range</code>. In this case the beginning of the range will be detected by a line containing (in any point) a string matching the specified regular expression; the end will be detected by a line containing a string matching the same regular expression that started the range. This feature is very useful when we want to document some code (e.g., in this very manual) by showing only specific parts, that are delimited in a ad-hoc way in the source code (e.g., with specific comment patterns). <p>For instance, the following output was produced, starting from the source file shown in See <a href="#Simple-example">Simple example</a>, by specifying: <pre class="example"> --regex-range="/// [[:alpha:]]+" </pre> <p class="noindent">Note that the lines containing <code>/// class</code>, which determine the range, are not shown in the output: <!-- Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite --> <pre class="example"> <tt>32:</tt> <b>public</b> <b>class</b> Hello { <tt>33:</tt> <b>int</b> foo = 1998 ; <tt>34:</tt> <b>int</b> hex_foo = 0xCAFEBABE; <tt>35:</tt> <b>boolean</b> b = <b>false</b>; <tt>36:</tt> Integer i = <b>null</b> ; <tt>37:</tt> <b>char</b> c = <tt>'</tt>\'<tt>'</tt>, d = <tt>'n'</tt>, e = <tt>'</tt>\\<tt>'</tt> ; <tt>38:</tt> String xml = <tt>"&lt;tag attr=</tt>\"<tt>value</tt>\"<tt>&gt;&amp;auml;&lt;/tag&gt;"</tt>, foo2 = <tt>"</tt>\\<tt>"</tt> ; <tt>39:</tt> <tt>40:</tt> <i>/* mymethod */</i> <tt>41:</tt> <b>public</b> <b>void</b> mymethod(<b>int</b> i) { <tt>42:</tt> <i>// just a foo method</i> <tt>43:</tt> } <tt>44:</tt> <i>/* mymethod */</i> <tt>45:</tt> <tt>46:</tt> <i>/* main */</i> <tt>47:</tt> <b>public</b> <b>static</b> <b>void</b> main( String args[] ) { <tt>48:</tt> <i>// just some greetings ;-) /*</i> <tt>49:</tt> System.out.println( <tt>"Hello from java2html :-)"</tt> ) ; <tt>50:</tt> System.out.println( <tt>"</tt>\t<tt>by Lorenzo Bettini"</tt> ) ; <tt>51:</tt> System.out.println( <tt>"</tt>\t<tt>http://www.lorenzobettini.it"</tt> ) ; <tt>52:</tt> <b>if</b> (argc &gt; 0) <tt>53:</tt> String param = argc[0]; <tt>54:</tt> <i>//System.out.println( "bye bye... :-D" ) ; // see you soon</i> <tt>55:</tt> } <tt>56:</tt> <i>/* main */</i> <tt>57:</tt> } </pre> <p>Furthermore, the line numbers are consistent with the lines of the original file. <p>If we want to output only what is included between <code>/* main */</code>, we specify (note that we must escape the special regular expression character <code>*</code>): <pre class="example"> --regex-range="/\* main \*/" </pre> <p class="noindent">and we get: <!-- Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite --> <pre class="example"> <tt>47:</tt> <b>public</b> <b>static</b> <b>void</b> main( String args[] ) { <tt>48:</tt> <i>// just some greetings ;-) /*</i> <tt>49:</tt> System.out.println( <tt>"Hello from java2html :-)"</tt> ) ; <tt>50:</tt> System.out.println( <tt>"</tt>\t<tt>by Lorenzo Bettini"</tt> ) ; <tt>51:</tt> System.out.println( <tt>"</tt>\t<tt>http://www.lorenzobettini.it"</tt> ) ; <tt>52:</tt> <b>if</b> (argc &gt; 0) <tt>53:</tt> String param = argc[0]; <tt>54:</tt> <i>//System.out.println( "bye bye... :-D" ) ; // see you soon</i> <tt>55:</tt> } </pre> <p>If we want to show only the methods, which in the source file are delimited by comment lines containing the method's name, we can specify: <pre class="example"> --regex-range="/\* [[:alpha:]]+ \*/" </pre> <!-- Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite --> <pre class="example"> <tt>41:</tt> <b>public</b> <b>void</b> mymethod(<b>int</b> i) { <tt>42:</tt> <i>// just a foo method</i> <tt>43:</tt> } <tt>47:</tt> <b>public</b> <b>static</b> <b>void</b> main( String args[] ) { <tt>48:</tt> <i>// just some greetings ;-) /*</i> <tt>49:</tt> System.out.println( <tt>"Hello from java2html :-)"</tt> ) ; <tt>50:</tt> System.out.println( <tt>"</tt>\t<tt>by Lorenzo Bettini"</tt> ) ; <tt>51:</tt> System.out.println( <tt>"</tt>\t<tt>http://www.lorenzobettini.it"</tt> ) ; <tt>52:</tt> <b>if</b> (argc &gt; 0) <tt>53:</tt> String param = argc[0]; <tt>54:</tt> <i>//System.out.println( "bye bye... :-D" ) ; // see you soon</i> <tt>55:</tt> } </pre> <p>In this case, we might have also specified: <pre class="example"> --regex-range="/\* main \*/","/\* mymethod \*/" </pre> <p class="noindent">since <code>--regex-range</code> accepts multiple regular expressions. <p>IMPORTANT: the order of regular expression specification is crucial, since they are tested in the same order they are specified at the command line. <div class="node"> <a name="Problems"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#Mailing-Lists">Mailing Lists</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#Examples">Examples</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a> </div> <h2 class="chapter">11 Reporting Bugs</h2> <p><a name="index-bugs-181"></a><a name="index-problems-182"></a> If you find a bug in <samp><span class="command">source-highlight</span></samp>, please send electronic mail to <p><code>bug-source-highlight at gnu dot org</code> <p>Include the version number, which you can find by running &lsquo;<samp><span class="samp">source-highlight&nbsp;--version</span></samp>&rsquo;<!-- /@w -->. Also include in your message the output that the program produced and the output you expected. <p>Even better, please file a bug report at Savannah site: <p><a href="https://savannah.gnu.org/bugs/?group=src-highlite">https://savannah.gnu.org/bugs/?group=src-highlite</a> <p>If you have other questions, comments or suggestions about <samp><span class="command">source-highlight</span></samp>, contact the author via electronic mail (find the address at <a href="http://www.lorenzobettini.it">http://www.lorenzobettini.it</a>). The author will try to help you out, although he may not have time to fix your problems. <div class="node"> <a name="Mailing-Lists"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#Concept-Index">Concept Index</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#Problems">Problems</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a> </div> <h2 class="chapter">12 Mailing Lists</h2> <p><a name="index-mailing-list-183"></a> The following mailing lists are available: <p><code>help-source-highlight at gnu dot org</code> <p>for generic discussions about the program and for asking for help about it (open mailing list), <a href="http://mail.gnu.org/mailman/listinfo/help-source-highlight">http://mail.gnu.org/mailman/listinfo/help-source-highlight</a> <p><code>info-source-highlight at gnu dot org</code> <p>for receiving information about new releases and features (read-only mailing list), <a href="http://mail.gnu.org/mailman/listinfo/info-source-highlight">http://mail.gnu.org/mailman/listinfo/info-source-highlight</a>. <p>If you want to subscribe to a mailing list just go to the URL and follow the instructions, or send me an e-mail and I'll subscribe you. <p>I'll describe new features in new releases also in my blog, at this URL: <p><a href="http://tronprog.blogspot.com/search/label/source-highlight">http://tronprog.blogspot.com/search/label/source-highlight</a> <div class="node"> <a name="Concept-Index"></a> <p><hr> Previous:&nbsp;<a rel="previous" accesskey="p" href="#Mailing-Lists">Mailing Lists</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a> </div> <h2 class="unnumbered">Concept Index</h2> <p><a name="index-tail-recursion-184"></a> <ul class="index-cp" compact> <li><a href="#index-g_t_0040code_007b_0022expression_0022_007d-120"><code>"expression"</code></a>: <a href="#Ways-of-specifying-regular-expressions">Ways of specifying regular expressions</a></li> <li><a href="#index-g_t_0024infile-162">$infile</a>: <a href="#Anchors-and-References">Anchors and References</a></li> <li><a href="#index-g_t_0024infilename-163">$infilename</a>: <a href="#Anchors-and-References">Anchors and References</a></li> <li><a href="#index-g_t_0024linenum-161">$linenum</a>: <a href="#Anchors-and-References">Anchors and References</a></li> <li><a href="#index-g_t_0024outfile-164">$outfile</a>: <a href="#Anchors-and-References">Anchors and References</a></li> <li><a href="#index-g_t_0024style-159">$style</a>: <a href="#Colors">Colors</a></li> <li><a href="#index-g_t_0024text-157">$text</a>: <a href="#Text-styles">Text styles</a></li> <li><a href="#index-g_t_0040code_007b_0027expression_0027_007d-121"><code>'expression'</code></a>: <a href="#Ways-of-specifying-regular-expressions">Ways of specifying regular expressions</a></li> <li><a href="#index-g_t_0040code_007b_002d_002ddata_002ddir_007d-109"><code>--data-dir</code></a>: <a href="#Invoking-source_002dhighlight">Invoking source-highlight</a></li> <li><a href="#index-g_t_0040code_007b_002d_002ddata_002ddir_007d-80"><code>--data-dir</code></a>: <a href="#Configuration-files">Configuration files</a></li> <li><a href="#index-g_t_0040code_007b_002d_002ddata_002ddir_007d-6"><code>--data-dir</code></a>: <a href="#The-program-source_002dhighlight_002dsettings">The program source-highlight-settings</a></li> <li><a href="#index-g_t_0040code_007b_002d_002dinfer_002dlang_007d-118"><code>--infer-lang</code></a>: <a href="#How-the-input-language-is-discovered">How the input language is discovered</a></li> <li><a href="#index-g_t_0040code_007b_002d_002dinfer_002dlang_007d-111"><code>--infer-lang</code></a>: <a href="#Invoking-source_002dhighlight">Invoking source-highlight</a></li> <li><a href="#index-g_t_0040code_007b_002d_002dinfer_002dlang_007d-10"><code>--infer-lang</code></a>: <a href="#Perl">Perl</a></li> <li><a href="#index-g_t_0040code_007b_002d_002dshow_002dlang_002delements_007d-149"><code>--show-lang-elements</code></a>: <a href="#Listing-Language-Elements">Listing Language Elements</a></li> <li><a href="#index-g_t_0040code_007b_002d_002dshow_002dlang_002delements_007d-84"><code>--show-lang-elements</code></a>: <a href="#Output-format-style">Output format style</a></li> <li><a href="#index-g_t_0040code_007b_002d_002dstyle_002dcss_002dfile_007d-99"><code>--style-css-file</code></a>: <a href="#Output-format-style-using-CSS">Output format style using CSS</a></li> <li><a href="#index-g_t_0040code_007b_002d_002dstyle_002dfile_007d-87"><code>--style-file</code></a>: <a href="#Output-format-style">Output format style</a></li> <li><a href="#index-g_t_0040code_007b_002d_002dwith_002ddoxygen_007d-43"><code>--with-doxygen</code></a>: <a href="#Installation">Installation</a></li> <li><a href="#index-g_t_0040code_007b_0060expression_0060_007d-122"><code>`expression`</code></a>: <a href="#Ways-of-specifying-regular-expressions">Ways of specifying regular expressions</a></li> <li><a href="#index-anchor-174">anchor</a>: <a href="#Generating-References">Generating References</a></li> <li><a href="#index-ANSI-color-78">ANSI color</a>: <a href="#ANSI-color-escape-sequences">ANSI color escape sequences</a></li> <li><a href="#index-Apache-25">Apache</a>: <a href="#Related-Software-and-Links">Related Software and Links</a></li> <li><a href="#index-autoconf-62">autoconf</a>: <a href="#What-you-need-to-build-source_002dhighlight">What you need to build source-highlight</a></li> <li><a href="#index-autoconf-55">autoconf</a>: <a href="#Anonymous-Git-Checkout">Anonymous Git Checkout</a></li> <li><a href="#index-automake-61">automake</a>: <a href="#What-you-need-to-build-source_002dhighlight">What you need to build source-highlight</a></li> <li><a href="#index-automake-54">automake</a>: <a href="#Anonymous-Git-Checkout">Anonymous Git Checkout</a></li> <li><a href="#index-background-color-160">background color</a>: <a href="#Colors">Colors</a></li> <li><a href="#index-background-color-86">background color</a>: <a href="#Output-format-style">Output format style</a></li> <li><a href="#index-backreference-144">backreference</a>: <a href="#Notes-on-regular-expressions">Notes on regular expressions</a></li> <li><a href="#index-backreference-124">backreference</a>: <a href="#Ways-of-specifying-regular-expressions">Ways of specifying regular expressions</a></li> <li><a href="#index-backtick-125">backtick</a>: <a href="#Ways-of-specifying-regular-expressions">Ways of specifying regular expressions</a></li> <li><a href="#index-bash-completion-41">bash completion</a>: <a href="#Installation">Installation</a></li> <li><a href="#index-g_t_0040code_007bbgcolor_007d-85"><code>bgcolor</code></a>: <a href="#Output-format-style">Output format style</a></li> <li><a href="#index-bold-152">bold</a>: <a href="#Text-styles">Text styles</a></li> <li><a href="#index-bold-90">bold</a>: <a href="#Output-format-style">Output format style</a></li> <li><a href="#index-boost-60">boost</a>: <a href="#What-you-need-to-build-source_002dhighlight">What you need to build source-highlight</a></li> <li><a href="#index-boost-49">boost</a>: <a href="#Building-with-qmake">Building with qmake</a></li> <li><a href="#index-Boost-regex-65">Boost regex</a>: <a href="#Tips-on-installing-Boost-Regex-library">Tips on installing Boost Regex library</a></li> <li><a href="#index-bugs-181">bugs</a>: <a href="#Problems">Problems</a></li> <li><a href="#index-building-requirements-59">building requirements</a>: <a href="#What-you-need-to-build-source_002dhighlight">What you need to build source-highlight</a></li> <li><a href="#index-CGI-69">CGI</a>: <a href="#Using-source_002dhighlight-as-a-CGI">Using source-highlight as a CGI</a></li> <li><a href="#index-g_t_0040command_007bcheck_002dregexp_007d-148"><samp><span class="command">check-regexp</span></samp></a>: <a href="#The-program-check_002dregexp">The program check-regexp</a></li> <li><a href="#index-code2blog-24">code2blog</a>: <a href="#Related-Software-and-Links">Related Software and Links</a></li> <li><a href="#index-color-88">color</a>: <a href="#Output-format-style">Output format style</a></li> <li><a href="#index-colors-158">colors</a>: <a href="#Colors">Colors</a></li> <li><a href="#index-compilation-38">compilation</a>: <a href="#Installation">Installation</a></li> <li><a href="#index-compilation-requirements-58">compilation requirements</a>: <a href="#What-you-need-to-build-source_002dhighlight">What you need to build source-highlight</a></li> <li><a href="#index-conditional-expressions-147">conditional expressions</a>: <a href="#Notes-on-regular-expressions">Notes on regular expressions</a></li> <li><a href="#index-configuration-files-79">configuration files</a>: <a href="#Configuration-files">Configuration files</a></li> <li><a href="#index-Copying-conditions-71">Copying conditions</a>: <a href="#Copying">Copying</a></li> <li><a href="#index-cpp2html-46">cpp2html</a>: <a href="#Installation">Installation</a></li> <li><a href="#index-CSS-98">CSS</a>: <a href="#Output-format-style-using-CSS">Output format style using CSS</a></li> <li><a href="#index-ctags-175">ctags</a>: <a href="#Generating-References">Generating References</a></li> <li><a href="#index-g_t_0040code_007bCXXFLAGS_007d-66"><code>CXXFLAGS</code></a>: <a href="#Tips-on-installing-Boost-Regex-library">Tips on installing Boost Regex library</a></li> <li><a href="#index-debug-150">debug</a>: <a href="#Debugging">Debugging</a></li> <li><a href="#index-default_002elang-117">default.lang</a>: <a href="#Invoking-source_002dhighlight">Invoking source-highlight</a></li> <li><a href="#index-default_002elang-13">default.lang</a>: <a href="#Using-source_002dhighlight-as-a-simple-formatter">Using source-highlight as a simple formatter</a></li> <li><a href="#index-default_002estyle-83">default.style</a>: <a href="#Output-format-style">Output format style</a></li> <li><a href="#index-definition-order-129">definition order</a>: <a href="#Order-of-definitions">Order of definitions</a></li> <li><a href="#index-delimited-definitions-130">delimited definitions</a>: <a href="#Delimited-definitions">Delimited definitions</a></li> <li><a href="#index-direct-color-scheme-97">direct color scheme</a>: <a href="#Output-format-style">Output format style</a></li> <li><a href="#index-directories-40">directories</a>: <a href="#Installation">Installation</a></li> <li><a href="#index-DocBook-77">DocBook</a>: <a href="#DocBook-output">DocBook output</a></li> <li><a href="#index-doctemplate-171">doctemplate</a>: <a href="#Document-template">Document template</a></li> <li><a href="#index-download-52">download</a>: <a href="#Download">Download</a></li> <li><a href="#index-doxygen-44">doxygen</a>: <a href="#Installation">Installation</a></li> <li><a href="#index-dynamic-backreference-132">dynamic backreference</a>: <a href="#Dynamic-Backreferences">Dynamic Backreferences</a></li> <li><a href="#index-environments-135">environments</a>: <a href="#State_002fEnvironment-Definitions">State/Environment Definitions</a></li> <li><a href="#index-failsafe-116">failsafe</a>: <a href="#Invoking-source_002dhighlight">Invoking source-highlight</a></li> <li><a href="#index-failsafe-12">failsafe</a>: <a href="#Using-source_002dhighlight-as-a-simple-formatter">Using source-highlight as a simple formatter</a></li> <li><a href="#index-features-2">features</a>: <a href="#Introduction">Introduction</a></li> <li><a href="#index-file-inclusion-133">file inclusion</a>: <a href="#File-inclusion">File inclusion</a></li> <li><a href="#index-Firefox-27">Firefox</a>: <a href="#Related-Software-and-Links">Related Software and Links</a></li> <li><a href="#index-fixed-155">fixed</a>: <a href="#Text-styles">Text styles</a></li> <li><a href="#index-fixed-93">fixed</a>: <a href="#Output-format-style">Output format style</a></li> <li><a href="#index-Fortran-8">Fortran</a>: <a href="#Fortran">Fortran</a></li> <li><a href="#index-getting-help-108">getting help</a>: <a href="#Invoking-source_002dhighlight">Invoking source-highlight</a></li> <li><a href="#index-Git-53">Git</a>: <a href="#Anonymous-Git-Checkout">Anonymous Git Checkout</a></li> <li><a href="#index-gnulib-64">gnulib</a>: <a href="#What-you-need-to-build-source_002dhighlight">What you need to build source-highlight</a></li> <li><a href="#index-help-107">help</a>: <a href="#Invoking-source_002dhighlight">Invoking source-highlight</a></li> <li><a href="#index-HTML-73">HTML</a>: <a href="#HTML-and-XHTML-output">HTML and XHTML output</a></li> <li><a href="#index-Ikiwiki-29">Ikiwiki</a>: <a href="#Related-Software-and-Links">Related Software and Links</a></li> <li><a href="#index-inline_005freference-165">inline_reference</a>: <a href="#Anchors-and-References">Anchors and References</a></li> <li><a href="#index-installation-37">installation</a>: <a href="#Installation">Installation</a></li> <li><a href="#index-introduction-1">introduction</a>: <a href="#Introduction">Introduction</a></li> <li><a href="#index-invoking-103">invoking</a>: <a href="#Invoking-source_002dhighlight">Invoking source-highlight</a></li> <li><a href="#index-italics-153">italics</a>: <a href="#Text-styles">Text styles</a></li> <li><a href="#index-italics-91">italics</a>: <a href="#Output-format-style">Output format style</a></li> <li><a href="#index-java2html-45">java2html</a>: <a href="#Installation">Installation</a></li> <li><a href="#index-java2html-22">java2html</a>: <a href="#Related-Software-and-Links">Related Software and Links</a></li> <li><a href="#index-KDE-19">KDE</a>: <a href="#Related-Software-and-Links">Related Software and Links</a></li> <li><a href="#index-Ksrc2highlight-20">Ksrc2highlight</a>: <a href="#Related-Software-and-Links">Related Software and Links</a></li> <li><a href="#index-language-definition-119">language definition</a>: <a href="#Language-Definitions">Language Definitions</a></li> <li><a href="#index-language-inference-110">language inference</a>: <a href="#Invoking-source_002dhighlight">Invoking source-highlight</a></li> <li><a href="#index-language-map-101">language map</a>: <a href="#Language-map">Language map</a></li> <li><a href="#index-g_t_0040LaTeX_007b_007d-75">LaTeX</a>: <a href="#LaTeX-output">LaTeX output</a></li> <li><a href="#index-g_t_0040code_007bLDFLAGS_007d-67"><code>LDFLAGS</code></a>: <a href="#Tips-on-installing-Boost-Regex-library">Tips on installing Boost Regex library</a></li> <li><a href="#index-library-42">library</a>: <a href="#Installation">Installation</a></li> <li><a href="#index-library-3">library</a>: <a href="#Introduction">Introduction</a></li> <li><a href="#index-libtool-63">libtool</a>: <a href="#What-you-need-to-build-source_002dhighlight">What you need to build source-highlight</a></li> <li><a href="#index-libtool-56">libtool</a>: <a href="#Anonymous-Git-Checkout">Anonymous Git Checkout</a></li> <li><a href="#index-line-ranges-177">line ranges</a>: <a href="#Line-ranges-_0028with-context_0029">Line ranges (with context)</a></li> <li><a href="#index-line-ranges-176">line ranges</a>: <a href="#Line-ranges">Line ranges</a></li> <li><a href="#index-line-ranges-112">line ranges</a>: <a href="#Invoking-source_002dhighlight">Invoking source-highlight</a></li> <li><a href="#index-lines-128">lines</a>: <a href="#Line-wide-definitions">Line wide definitions</a></li> <li><a href="#index-lookahead-asserts-145">lookahead asserts</a>: <a href="#Notes-on-regular-expressions">Notes on regular expressions</a></li> <li><a href="#index-lookbehind-asserts-146">lookbehind asserts</a>: <a href="#Notes-on-regular-expressions">Notes on regular expressions</a></li> <li><a href="#index-mailing-list-183">mailing list</a>: <a href="#Mailing-Lists">Mailing Lists</a></li> <li><a href="#index-marked-subexpressions-143">marked subexpressions</a>: <a href="#Notes-on-regular-expressions">Notes on regular expressions</a></li> <li><a href="#index-marked-subexpressions-123">marked subexpressions</a>: <a href="#Ways-of-specifying-regular-expressions">Ways of specifying regular expressions</a></li> <li><a href="#index-matching-strategy-138">matching strategy</a>: <a href="#How-source_002dhighlight-works">How source-highlight works</a></li> <li><a href="#index-MinGW-50">MinGW</a>: <a href="#Building-with-qmake">Building with qmake</a></li> <li><a href="#index-MSVC-48">MSVC</a>: <a href="#Building-with-qmake">Building with qmake</a></li> <li><a href="#index-msys-51">msys</a>: <a href="#Building-with-qmake">Building with qmake</a></li> <li><a href="#index-nodoctemplate-172">nodoctemplate</a>: <a href="#Document-template">Document template</a></li> <li><a href="#index-nohilite_002elang-11">nohilite.lang</a>: <a href="#Using-source_002dhighlight-as-a-simple-formatter">Using source-highlight as a simple formatter</a></li> <li><a href="#index-non_002dmarking-parenthesis-142">non-marking parenthesis</a>: <a href="#Notes-on-regular-expressions">Notes on regular expressions</a></li> <li><a href="#index-nonsensitive-127">nonsensitive</a>: <a href="#Simple-definitions">Simple definitions</a></li> <li><a href="#index-noref-96">noref</a>: <a href="#Output-format-style">Output format style</a></li> <li><a href="#index-notfixed-156">notfixed</a>: <a href="#Text-styles">Text styles</a></li> <li><a href="#index-notfixed-94">notfixed</a>: <a href="#Output-format-style">Output format style</a></li> <li><a href="#index-one-style-168">one style</a>: <a href="#One-style">One style</a></li> <li><a href="#index-options-105">options</a>: <a href="#Invoking-source_002dhighlight">Invoking source-highlight</a></li> <li><a href="#index-output-language-definition-151">output language definition</a>: <a href="#Output-Language-Definitions">Output Language Definitions</a></li> <li><a href="#index-output-language-map-102">output language map</a>: <a href="#Output-Language-map">Output Language map</a></li> <li><a href="#index-output-style-82">output style</a>: <a href="#Output-format-style">Output format style</a></li> <li><a href="#index-Pastebin-36">Pastebin</a>: <a href="#Related-Software-and-Links">Related Software and Links</a></li> <li><a href="#index-patching-68">patching</a>: <a href="#Patching-from-a-previous-version">Patching from a previous version</a></li> <li><a href="#index-Perl-35">Perl</a>: <a href="#Related-Software-and-Links">Related Software and Links</a></li> <li><a href="#index-Perl-9">Perl</a>: <a href="#Perl">Perl</a></li> <li><a href="#index-Php-31">Php</a>: <a href="#Related-Software-and-Links">Related Software and Links</a></li> <li><a href="#index-postdoc_005freference-167">postdoc_reference</a>: <a href="#Anchors-and-References">Anchors and References</a></li> <li><a href="#index-postline_005freference-166">postline_reference</a>: <a href="#Anchors-and-References">Anchors and References</a></li> <li><a href="#index-prefix-139">prefix</a>: <a href="#How-source_002dhighlight-works">How source-highlight works</a></li> <li><a href="#index-problems-182">problems</a>: <a href="#Problems">Problems</a></li> <li><a href="#index-PyQt-34">PyQt</a>: <a href="#Related-Software-and-Links">Related Software and Links</a></li> <li><a href="#index-Python-33">Python</a>: <a href="#Related-Software-and-Links">Related Software and Links</a></li> <li><a href="#index-qmake-47">qmake</a>: <a href="#Building-with-qmake">Building with qmake</a></li> <li><a href="#index-QSource_002dHighlight-16">QSource-Highlight</a>: <a href="#Related-Software-and-Links">Related Software and Links</a></li> <li><a href="#index-Qt-15">Qt</a>: <a href="#Related-Software-and-Links">Related Software and Links</a></li> <li><a href="#index-range-context-178">range context</a>: <a href="#Line-ranges-_0028with-context_0029">Line ranges (with context)</a></li> <li><a href="#index-range-context-113">range context</a>: <a href="#Invoking-source_002dhighlight">Invoking source-highlight</a></li> <li><a href="#index-range-separator-179">range separator</a>: <a href="#Line-ranges-_0028with-context_0029">Line ranges (with context)</a></li> <li><a href="#index-range-separator-114">range separator</a>: <a href="#Invoking-source_002dhighlight">Invoking source-highlight</a></li> <li><a href="#index-RapidWeaver-26">RapidWeaver</a>: <a href="#Related-Software-and-Links">Related Software and Links</a></li> <li><a href="#index-redef-136">redef</a>: <a href="#Redefinitions-and-Substitutions">Redefinitions and Substitutions</a></li> <li><a href="#index-reference-173">reference</a>: <a href="#Generating-References">Generating References</a></li> <li><a href="#index-regex-ranges-180">regex ranges</a>: <a href="#Regex-ranges">Regex ranges</a></li> <li><a href="#index-regex-ranges-115">regex ranges</a>: <a href="#Invoking-source_002dhighlight">Invoking source-highlight</a></li> <li><a href="#index-regular-expressions-141">regular expressions</a>: <a href="#Notes-on-regular-expressions">Notes on regular expressions</a></li> <li><a href="#index-rpm-70">rpm</a>: <a href="#Building-_002erpm">Building .rpm</a></li> <li><a href="#index-sample-72">sample</a>: <a href="#Simple-Usage">Simple Usage</a></li> <li><a href="#index-shadow-build-57">shadow build</a>: <a href="#Anonymous-Git-Checkout">Anonymous Git Checkout</a></li> <li><a href="#index-shadow-build-39">shadow build</a>: <a href="#Installation">Installation</a></li> <li><a href="#index-SHJS-23">SHJS</a>: <a href="#Related-Software-and-Links">Related Software and Links</a></li> <li><a href="#index-simple-language-definition-126">simple language definition</a>: <a href="#Simple-definitions">Simple definitions</a></li> <li><a href="#index-SIP-32">SIP</a>: <a href="#Related-Software-and-Links">Related Software and Links</a></li> <li><a href="#index-Source_002dHighlight_002dQt-14">Source-Highlight-Qt</a>: <a href="#Related-Software-and-Links">Related Software and Links</a></li> <li><a href="#index-source_002dhighlight_002dsettings-4">source-highlight-settings</a>: <a href="#The-program-source_002dhighlight_002dsettings">The program source-highlight-settings</a></li> <li><a href="#index-source_002dhighlight_002econf-5">source-highlight.conf</a>: <a href="#The-program-source_002dhighlight_002dsettings">The program source-highlight-settings</a></li> <li><a href="#index-g_t_0040code_007bSOURCE_005fHIGHLIGHT_005fDATADIR_007d-81"><code>SOURCE_HIGHLIGHT_DATADIR</code></a>: <a href="#Configuration-files">Configuration files</a></li> <li><a href="#index-g_t_0040code_007bSOURCE_005fHIGHLIGHT_005fDATADIR_007d-7"><code>SOURCE_HIGHLIGHT_DATADIR</code></a>: <a href="#The-program-source_002dhighlight_002dsettings">The program source-highlight-settings</a></li> <li><a href="#index-SourceHighlightIDE-18">SourceHighlightIDE</a>: <a href="#Related-Software-and-Links">Related Software and Links</a></li> <li><a href="#index-states-134">states</a>: <a href="#State_002fEnvironment-Definitions">State/Environment Definitions</a></li> <li><a href="#index-style-separator-170">style separator</a>: <a href="#Style-template">Style template</a></li> <li><a href="#index-style-template-169">style template</a>: <a href="#Style-template">Style template</a></li> <li><a href="#index-style_002edefaults-100">style.defaults</a>: <a href="#Default-Styles">Default Styles</a></li> <li><a href="#index-subst-137">subst</a>: <a href="#Redefinitions-and-Substitutions">Redefinitions and Substitutions</a></li> <li><a href="#index-suffix-140">suffix</a>: <a href="#How-source_002dhighlight-works">How source-highlight works</a></li> <li><a href="#index-tail-recursion-184">tail recursion</a>: <a href="#Concept-Index">Concept Index</a></li> <li><a href="#index-Texinfo-76">Texinfo</a>: <a href="#Texinfo-output">Texinfo output</a></li> <li><a href="#index-underline-154">underline</a>: <a href="#Text-styles">Text styles</a></li> <li><a href="#index-underline-92">underline</a>: <a href="#Output-format-style">Output format style</a></li> <li><a href="#index-usage-106">usage</a>: <a href="#Invoking-source_002dhighlight">Invoking source-highlight</a></li> <li><a href="#index-variables-131">variables</a>: <a href="#Variable-definitions">Variable definitions</a></li> <li><a href="#index-version-104">version</a>: <a href="#Invoking-source_002dhighlight">Invoking source-highlight</a></li> <li><a href="#index-Wiki-28">Wiki</a>: <a href="#Related-Software-and-Links">Related Software and Links</a></li> <li><a href="#index-XHTML-74">XHTML</a>: <a href="#HTML-and-XHTML-output">HTML and XHTML output</a></li> </ul> <div class="shortcontents"> <h2>Short Contents</h2> <ul> <li><a href="#toc_Top">GNU Source-highlight</a></li> <li><a href="#toc_Introduction">1 Introduction</a></li> <li><a href="#toc_Installation">2 Installation</a></li> <li><a href="#toc_Copying">3 Copying Conditions</a></li> <li><a href="#toc_Simple-Usage">4 Simple Usage</a></li> <li><a href="#toc_Configuration-files">5 Configuration files</a></li> <li><a href="#toc_Invoking-source_002dhighlight">6 Invoking <samp><span class="command">source-highlight</span></samp></a></li> <li><a href="#toc_Language-Definitions">7 Language Definitions</a></li> <li><a href="#toc_Output-Language-Definitions">8 Output Language Definitions</a></li> <li><a href="#toc_Generating-References">9 Generating References</a></li> <li><a href="#toc_Examples">10 Examples</a></li> <li><a href="#toc_Problems">11 Reporting Bugs</a></li> <li><a href="#toc_Mailing-Lists">12 Mailing Lists</a></li> <li><a href="#toc_Concept-Index">Concept Index</a></li> </ul> </div> <div class="footnote"> <hr> <a name="texinfo-footnotes-in-document"></a><h4>Footnotes</h4><p class="footnote"><small>[<a name="fn-1" href="#fnd-1">1</a>]</small> Up to version 2.9, there were also the suffixes <code>-doc</code> and <code>-css-doc</code>, but this mechanism was quite confusing and complex; hopefully, this new one should be better.</p> <p class="footnote"><small>[<a name="fn-2" href="#fnd-2">2</a>]</small> Although this might have been achieved with previous version, it is an official supported feature since version 2.5.</p> <p class="footnote"><small>[<a name="fn-3" href="#fnd-3">3</a>]</small> Since version 3.1.2 of Source-highlight the CVS repository was dismissed in favor of Git (<a href="http://git-scm.com/">http://git-scm.com/</a>).</p> <p class="footnote"><small>[<a name="fn-4" href="#fnd-4">4</a>]</small> <a href="http://www.gnu.org/software/autoconf">http://www.gnu.org/software/autoconf</a></p> <p class="footnote"><small>[<a name="fn-5" href="#fnd-5">5</a>]</small> <a href="http://www.gnu.org/software/automake">http://www.gnu.org/software/automake</a></p> <p class="footnote"><small>[<a name="fn-6" href="#fnd-6">6</a>]</small> <a href="http://www.gnu.org/software/libtool">http://www.gnu.org/software/libtool</a></p> <p class="footnote"><small>[<a name="fn-7" href="#fnd-7">7</a>]</small> <a href="http://www.gnu.org/software/gnulib">http://www.gnu.org/software/gnulib</a></p> <p class="footnote"><small>[<a name="fn-8" href="#fnd-8">8</a>]</small> Since version 2.11, the <code>configure</code> script should be able to correctly find the boost regex library if it is in the compiler default path.</p> <p class="footnote"><small>[<a name="fn-9" href="#fnd-9">9</a>]</small> Command lines that are too long are split into multiple indented lines separated by a <code>\</code>. Of course these commands are to be given in one line only, anyway.</p> <p class="footnote"><small>[<a name="fn-10" href="#fnd-10">10</a>]</small> Command lines that are too long are split into multiple indented lines separated by a <code>\</code>. Of course these commands are to be given in one line only, anyway.</p> <p class="footnote"><small>[<a name="fn-11" href="#fnd-11">11</a>]</small> Before version 2.1, this file was called <samp><span class="file">tags.j2h</span></samp> which used to be a very obscure name. I hope this name convention is a better one :-).</p> <p class="footnote"><small>[<a name="fn-12" href="#fnd-12">12</a>]</small> Since version 2.6.</p> <p class="footnote"><small>[<a name="fn-13" href="#fnd-13">13</a>]</small> Before version 2.1, this command line option was called <code>--tags-file</code> which used to be a very obscure name. I hope this name convention is a better one :-).</p> <p class="footnote"><small>[<a name="fn-14" href="#fnd-14">14</a>]</small> Since version 2.6.</p> <p class="footnote"><small>[<a name="fn-15" href="#fnd-15">15</a>]</small> Of course, if you use HTML and an external CSS file you will achieve the same result.</p> <p class="footnote"><small>[<a name="fn-16" href="#fnd-16">16</a>]</small> You can see these colors in HTML in the file <samp><span class="file">colors.html</span></samp>.</p> <p class="footnote"><small>[<a name="fn-17" href="#fnd-17">17</a>]</small> Note that, since version 2.2, you must use double quotes.</p> <p class="footnote"><small>[<a name="fn-18" href="#fnd-18">18</a>]</small> Since version 2.6.</p> <p class="footnote"><small>[<a name="fn-19" href="#fnd-19">19</a>]</small> Since version 2.9.</p> <p class="footnote"><small>[<a name="fn-20" href="#fnd-20">20</a>]</small> This is the main difference introduced in version 2.0 with respect the previous version.</p> <p class="footnote"><small>[<a name="fn-21" href="#fnd-21">21</a>]</small> This is the main difference introduced in version 2.1 with respect the the previous version.</p> <p class="footnote"><small>[<a name="fn-22" href="#fnd-22">22</a>]</small> As explained before, originally Source-highlight was thought mainly for generating HTML output, this is why the term <em>css</em> is used for style sheets.</p> <p class="footnote"><small>[<a name="fn-23" href="#fnd-23">23</a>]</small> Padding character can be specified since version 2.8.</p> <p class="footnote"><small>[<a name="fn-24" href="#fnd-24">24</a>]</small> Since version 2.7.</p> <p class="footnote"><small>[<a name="fn-25" href="#fnd-25">25</a>]</small> Since version 3.1.2.</p> <p class="footnote"><small>[<a name="fn-26" href="#fnd-26">26</a>]</small> Since version 2.7.</p> <p class="footnote"><small>[<a name="fn-27" href="#fnd-27">27</a>]</small> This issue concerning Perl regular expression syntax was raised by Elias Pipping, and this also pushed me to deal with this more powerful syntax that permits using backreferences, for instance. Although we're still far from highlighting Perl syntax completely (<a href="#Perl">Perl</a>), I definitely must thank Elias for his precious information about this matter :-)</p> <p class="footnote"><small>[<a name="fn-28" href="#fnd-28">28</a>]</small> As Ed Kelly correctly pointed out, C-style comments are NOT nested; it's a big shame I've been using C++ and Java for years and have always thought they were nested :-)... Thus, in previous versions of source-highlight distributions, C-style comments were (uncorrectly) defined as nested. Thank you Ed, for your feedback!</p> <p class="footnote"><small>[<a name="fn-29" href="#fnd-29">29</a>]</small> Since version 2.8</p> <p class="footnote"><small>[<a name="fn-30" href="#fnd-30">30</a>]</small> I'm grateful to Jurgen Hotzel for rising this issue about Lua comments; this led me to introduce dynamic backreferences.</p> <p class="footnote"><small>[<a name="fn-31" href="#fnd-31">31</a>]</small> At least, to the best of my knowledge :-)</p> <p class="footnote"><small>[<a name="fn-32" href="#fnd-32">32</a>]</small> The strategy used by source-highlight for matching regular expressions changed since version 2.11 (and in version 2.10 the strategy used was not completely conceptually correct and it had a lot of overhead).</p> <p class="footnote"><small>[<a name="fn-33" href="#fnd-33">33</a>]</small> according to the terminology of regular expressions.</p> <p class="footnote"><small>[<a name="fn-34" href="#fnd-34">34</a>]</small> <a href="http://www.boost.org/libs/regex/doc/syntax.html">http://www.boost.org/libs/regex/doc/syntax.html</a></p> <p class="footnote"><small>[<a name="fn-35" href="#fnd-35">35</a>]</small> the index only, without the escape character.</p> <p class="footnote"><small>[<a name="fn-36" href="#fnd-36">36</a>]</small> This expression was provided by John Maddock, the author of the Boost regex library, as a solution of a problem I posted on the boost list, <p><a href="http://thread.gmane.org/gmane.comp.lib.boost.devel/158237/focus=158276">http://thread.gmane.org/gmane.comp.lib.boost.devel/158237/focus=158276</a></p> <p class="footnote"><small>[<a name="fn-37" href="#fnd-37">37</a>]</small> Since version 2.4.</p> <p class="footnote"><small>[<a name="fn-38" href="#fnd-38">38</a>]</small> Up to version 2.9 the output of <code>--show-regex</code> was a little bit more complex to read; hopefully this output is better.</p> <p class="footnote"><small>[<a name="fn-39" href="#fnd-39">39</a>]</small> Please note that this concept of state is different from the concept of &ldquo;state&rdquo; of an automaton.</p> <p class="footnote"><small>[<a name="fn-40" href="#fnd-40">40</a>]</small> As a future extension we might think of providing a way, in the language definition syntax, to define a state/environment that extends the outer contexts instead of overriding them.</p> <p class="footnote"><small>[<a name="fn-41" href="#fnd-41">41</a>]</small> This was not tested extensively and might not catch all the correct situations.</p> <p class="footnote"><small>[<a name="fn-42" href="#fnd-42">42</a>]</small> OK, there are no templates in C, and they are only in C++, but we think it should no harm when highlighting C files.</p> <p class="footnote"><small>[<a name="fn-43" href="#fnd-43">43</a>]</small> Before version 2.9, there was only <samp><span class="file">cpp.lang</span></samp> which was used both for C and C++; however, this way, if you had a C program where you were using a C++ keyword as a variable name&mdash;which of course is correct in C&mdash;that variable was actually highlighted as a keyword and this was not correct.</p> <p class="footnote"><small>[<a name="fn-44" href="#fnd-44">44</a>]</small> Since version 2.6.</p> <p class="footnote"><small>[<a name="fn-45" href="#fnd-45">45</a>]</small> This is a sort of trick to insert spaces at the beginning of a line without using a tabular environment; without the leading <code>\mbox{}</code> these spaces would be ignored. This is the only way I found to achieve this, if you have suggestions, please let me know!</p> <p class="footnote"><small>[<a name="fn-46" href="#fnd-46">46</a>]</small> Since version 2.4.</p> <p class="footnote"><small>[<a name="fn-47" href="#fnd-47">47</a>]</small> Unless they are inside a <code>&lt;tt&gt;...&lt;/tt&gt;</code>.</p> <p class="footnote"><small>[<a name="fn-48" href="#fnd-48">48</a>]</small> Up to version 2.9, there was only <code>doctemplate</code> and for <code>--doc</code> there was a separate <code>.outlang</code> file; I think the present solution is better and reduces the number of files.</p> <p class="footnote"><small>[<a name="fn-49" href="#fnd-49">49</a>]</small> Since version 2.6.</p> <p class="footnote"><small>[<a name="fn-50" href="#fnd-50">50</a>]</small> Although I haven't tested it, I think this will work also for Doxygen comments.</p> <p class="footnote"><small>[<a name="fn-51" href="#fnd-51">51</a>]</small> This description is taken from the ctags man page</p> <hr></div> </body></html> ������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/test_lineranges2.java.texinfo��������������������������������������������0000664�0001750�0001750�00000001642�11675045057�020261� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@c Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite @example @{... not in range ...@} @t{10:} or type source-highlight --help for the list of options @t{11:} @t{12:} @r{@i{ written by}} @t{13:} @r{@i{ Lorenzo Bettini}} @t{14:} @r{@i{ }}@t{http://www.lorenzobettini.it} @t{15:} @r{@i{ }}@t{http://www.gnu.org/software/src-highlite} @t{16:} @r{@i{*/}} @t{17:} @t{18:} @b{package} hello; @t{19:} @t{20:} import java.io.* ; @{... not in range ...@} @t{27:} * TODO: nothing, just to show an highlighted TODO or FIXME @t{28:} * @t{29:} @r{@i{ * }}@b{@@author}@r{@i{ Lorenzo Bettini}} @t{30:} @r{@i{ * }}@b{@@version}@r{@i{ 2.0}} @t{31:} @r{@i{ */}} @r{@i{/// class}} @t{32:} @b{public} @b{class} Hello @{ @t{33:} @b{int} foo = 1998 ; @t{34:} @b{int} hex_foo = 0xCAFEBABE; @t{35:} boolean b = false; @t{36:} Integer i = null ; @{... not in range ...@} @end example����������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/sh_golden.css������������������������������������������������������������0000644�0001750�0001750�00000001647�11672675562�015161� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������body { background-color: #000000; color: #ddbb00; font-weight: normal; font-style: normal; } .keyword { color: #ffed8a; font-weight: bold; font-style: normal; } .type { color: #ffed8a; font-weight: normal; font-style: normal; } .string { color: #ff0000; font-weight: normal; font-style: normal; } .specialchar { color: #ff0000; font-weight: normal; font-style: normal; } .comment { color: #978345; font-weight: normal; font-style: italic; } .number { color: #ffffff; font-weight: normal; font-style: normal; } .preproc { color: #ffddaa; font-weight: normal; font-style: normal; } .symbol { color: #ababab; font-weight: normal; font-style: normal; } .function { color: #ddbb00; font-weight: bold; font-style: normal; } .cbracket { color: #ababab; font-weight: normal; font-style: normal; } �����������������������������������������������������������������������������������������source-highlight-3.1.6/doc/diff.lang.texinfo��������������������������������������������������������0000664�0001750�0001750�00000002454�11675045060�015715� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@c Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite @example @r{@i{# language definition for files created with 'diff'}} @r{@i{# diff created with -u option}} @b{state} @t{@i{oldfile}} = @t{'(?=^[-]@{3@})'} @b{begin} @t{@i{oldfile}} @b{start} @t{'^[-]@{3@}'} @t{@i{oldfile}} @b{start} @t{'^[-]'} @t{@i{newfile}} @b{start} @t{'^[+]'} @t{@i{difflines}} @b{start} @t{'^@@@@'} @b{end} @r{@i{# diff created with -c option}} @b{state} @t{@i{oldfile}} = @t{'(?=^[*]@{3@})'} @b{begin} @b{environment} @t{@i{oldfile}} = @t{'^[*]@{3@}[[:blank:]]+[[:digit:]]'} @b{begin} @t{@i{normal}} @b{start} @t{'^[[:space:]]'} @t{@i{newfile}} = @t{'(?=^[-]@{3@})'} @b{exit} @b{end} @t{@i{oldfile}} @b{start} @t{'^[*]@{3@}'} @b{environment} @t{@i{newfile}} = @t{'^[-]@{3@}[[:blank:]]+[[:digit:]]'} @b{begin} @t{@i{normal}} @b{start} @t{'^[[:space:]]'} @t{@i{newfile}} = @t{'(?=^[*]@{3@})'} @b{exit} @t{@i{normal}} @b{start} @t{'^diff'} @b{exit} @b{end} @t{@i{newfile}} @b{start} @t{'^[-]@{3@}'} @b{end} @r{@i{# otherwise, created without options}} @b{state} @t{@i{difflines}} = @t{'(?=^[[:digit:]])'} @b{begin} @t{@i{difflines}} @b{start} @t{'^[[:digit:]]'} @t{@i{oldfile}} @b{start} @t{'^[<]'} @t{@i{newfile}} @b{start} @t{'^[>]'} @b{end} @end example��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/test_extreme_comment_wrong.texinfo���������������������������������������0000664�0001750�0001750�00000000650�11675045061�021530� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@c Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite @example @r{@i{// test special #if 0 treatment}} @b{int} main() @{ @r{@i{#if 0 // equivalent to a comment}} @b{int} i = 10; printf(@t{"this should never be executed}\n@t{"}); @b{return} 1; @b{#else} printf(@t{"Hello world!}\n@t{"}); @b{return} 0; @b{#endif} printf(@t{"never reach here!}\n@t{"}); @} @end example����������������������������������������������������������������������������������������source-highlight-3.1.6/doc/xhtml.css����������������������������������������������������������������0000644�0001750�0001750�00000000667�11672675562�014354� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������body { color: black; background-color: white; font-family: monospace; } .comment { color: blue; font-style: italic; } .keyword { color: darkred; } .string { color: green; } .type { color: darkgreen; } .number { color: teal; } .preproc { color: red; } .symbol { color: purple; } .function { color: darkblue; } .cbracket { color: gray; } �������������������������������������������������������������������������source-highlight-3.1.6/doc/sh_dull.css��������������������������������������������������������������0000644�0001750�0001750�00000001651�11672675562�014644� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������body { background-color: #bfbfbf; color: #656565; font-weight: normal; font-style: normal; } .keyword { color: #353535; font-weight: bold; font-style: normal; } .type { color: #3241c6; font-weight: normal; font-style: normal; } .string { color: #005599; font-weight: normal; font-style: normal; } .specialchar { color: #005599; font-weight: normal; font-style: normal; } .comment { color: #d11d20; font-weight: normal; font-style: italic; } .number { color: #16930d; font-weight: normal; font-style: normal; } .preproc { color: #000033; font-weight: normal; font-style: normal; } .symbol { color: #222222; font-weight: normal; font-style: normal; } .function { color: #38255c; font-weight: normal; font-style: normal; } .cbracket { color: #222222; font-weight: normal; font-style: normal; } ���������������������������������������������������������������������������������������source-highlight-3.1.6/doc/sh_blacknblue.css��������������������������������������������������������0000644�0001750�0001750�00000001647�11672675562�016013� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������body { background-color: #000000; color: #2346d5; font-weight: normal; font-style: normal; } .keyword { color: #1ededc; font-weight: bold; font-style: normal; } .type { color: #c06cf8; font-weight: bold; font-style: normal; } .string { color: #cfc631; font-weight: normal; font-style: normal; } .specialchar { color: #ccc6c6; font-weight: normal; font-style: normal; } .comment { color: #6fb2c4; font-weight: normal; font-style: italic; } .number { color: #c4ac60; font-weight: normal; font-style: normal; } .preproc { color: #8080ff; font-weight: normal; font-style: normal; } .symbol { color: #ccc6c6; font-weight: normal; font-style: normal; } .function { color: #1c96ed; font-weight: normal; font-style: normal; } .cbracket { color: #ccc6c6; font-weight: normal; font-style: normal; } �����������������������������������������������������������������������������������������source-highlight-3.1.6/doc/index.html���������������������������������������������������������������0000644�0001750�0001750�00000045515�11676047530�014474� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<!DOCTYPE doctype PUBLIC "-//w3c//dtd html 4.0 transitional//en"> <html><head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta name="Author" content="Lorenzo Bettini"><title>GNU Source-highlight - GNU Project - Free Software Foundation (FSF)</title></head> <body style="background-color: rgb(255, 255, 255);"> <h1><a class="mozTocH1" name="mozTocId593827"></a> GNU Source-highlight 3.1.6</h1> <p>by <a href="http://www.lorenzobettini.it">Lorenzo Bettini</a> </p> <p>This program, <i>given a source file, produces a document with syntax highlighting</i>. It also provides a <b>C++ highlight library</b> <font color="red">(new)</font> (since version 3.0).</p> <p> Source-highlight reads source language specifications dynamically, thus it can be easily extended (without recompiling the sources) for handling new languages. It also reads output format specifications dynamically, and thus it can be easily extended (without recompiling the sources) for handling new output formats. The syntax for these specifications is quite easy (take a look at the manual).</p> <p>Source-highlight is a command line program, and it can also be used as a <a href="source-highlight.html#Using-source_002dhighlight-as-a-CGI">CGI</a>.</p> <p>Notice that source-highlight can also be used as a formatter (i.e., without highlighting): you can, for instance, format a txt file in HTML (and it will take care of translating special characters, such as, &lt;, &gt;, &amp;). </p> <p> Since version 2.2, source-highlight can also generate cross references; in order to do this it relies on <i>GNU Ctags</i>, <a href="http://ctags.sourceforge.net">http://ctags.sourceforge.net</a>. </p> <p>These are the output formats already supported:<br> </p> <ul> <li> <i>HTML</i></li> <li> <i>XHTML</i></li> <li> <i>LATEX</i></li> <li> <i>MediaWiki</i>&nbsp; &nbsp; &nbsp;<font color="red">(new)</font></li> <li> <i>ODF</i>&nbsp; &nbsp; &nbsp;<font color="red">(new)</font></li> <li> <i>TEXINFO</i></li> <li><i>ANSI color escape sequences</i> (you can use this feature with less)</li> <li><span style="font-style: italic;">DocBook</span></li> </ul> <p>These are the input languages (or input formats) already supported (in alphabetical order):<br> </p> <ul> <li> <i>Ada</i></li> <li> <i>Asm</i></li> <li> <i>Applescript</i></li> <li> <i>Awk</i></li> <li> <i>Autoconf files</i></li> <li> <i>Bat</i></li> <li> <i>Bib</i></li> <li> <i>Bison</i></li> <li> <i>C/C++</i></li> <li> <i>C#</i></li> <li> <i>CakePhp templates</i></li> <li> <i>Clipper</i></li> <li> <i>Cobol</i></li> <li> <i>Configuration files (generic)</i></li> <li> <i>Caml</i></li> <li> <i>Changelog</i></li> <li> <i>Css</i></li> <li> <i>D</i></li> <li> <i>Diff</i></li> <li> <i>Emacs Lisp</i></li> <li> <i>Erlang</i></li> <li> <i>errors (compiler output)</i></li> <li> <i>Flex</i></li> <li> <i>Fortran</i></li> <li> <i>GLSL</i></li> <li> <i>Haskell</i></li> <li> <i>Haskell literate programming</i></li> <li> <i>Haxe</i></li> <li> <i>Html</i></li> <li> <i>ini files</i></li> <li> <i>Java</i></li> <li> <i>Javalog</i></li> <li> <i>Javascript</i></li> <li> <i>KDE desktop files</i></li> <li> <i>Latex</i></li> <li> <i>Ldap files</i></li> <li> <i>Lisp</i></li> <li> <i>Logtalk</i></li> <li> <i>Log files</i></li> <li> <i>lsm files (Linux Software Map)</i></li> <li> <i>Lua</i></li> <li> <i>Makefile</i></li> <li> <i>Manifest</i></li> <li> <i>M4</i></li> <li> <i>ML</i></li> <li> <i>Opa</i></li> <li> <i>Oz</i></li> <li> <i>Pascal</i></li> <li> <i>Perl</i></li> <li> <i>pkg-config files</i></li> <li> <i>PHP</i></li> <li> <i>Po</i></li> <li> <i>Postscript</i></li> <li> <i>Prolog</i></li> <li> <i>Properties files</i></li> <li> <i>Protobuf (Google's Protocol Buffers)</i></li> <li> <i>Python</i></li> <li> <i>RPM Spec files</i></li> <li> <i>Ruby</i></li> <li> <i>Scala</i></li> <li> <i>Scheme</i></li> <li> <i>Shell</i></li> <li> <i>S-Lang</i></li> <li> <i>Sql</i></li> <li> <i>T/Foswiki TML markup</i>&nbsp; &nbsp; &nbsp;<font color="red">(new)</font></li> <li> <i>Tcl</i></li> <li> <i>Texinfo</i></li> <li> <i>UPC (unified parallel C)</i></li> <li> <i>Vala</i></li> <li> <i>VBscript</i></li> <li> <i>XML</i></li> <li> <i>XOrg conf files</i></li> </ul> <p><font color="#990000">NOTICE: now the name of the program is </font><b><i><font color="#663366">source-highlight</font></i></b><font color="#990000">: there are no two separate programs, namely <i>java2html</i> and <i>cpp2html</i>, anymore.&nbsp; However there are two shell scripts with the same name in order to facilitate the migration (however their use is not advised).</font> </p> <p>GNU Source-highlight is <b><font color="#009900">free software</font></b>. Please see the file <a href="COPYING">COPYING</a> for details. For documentation, please read this file. </p> <p>GNU Source-highlight is a <a href="http://www.gnu.org">GNU</a> program and its main home page is at GNU site: <br> <a href="http://www.gnu.org/software/src-highlite">http://www.gnu.org/software/src-highlite</a> </p> <ol id="mozToc"> <!--mozToc h1 1 h2 2 h3 3 h4 4 h5 5 h6 6--><li><a href="#mozTocId593827"> GNU Source-highlight</a> <ol> <li><a href="#mozTocId705198">On-line Manual</a></li> <li><a href="#mozTocId127780"> Download</a> <ol> <li><a href="#mozTocId637057"> Anonymous Git Checkout</a></li> <li><a href="#Installation">Installation</a></li> </ol> </li> <li><a href="#mozTocId579563"> Changes in this release</a></li> <li><a href="#mozTocId839282">What you need to build source-highlight</a></li> <li><a href="#mozTocId120994">Usage and examples</a></li> <li><a href="#mozTocId323328">Style files</a></li> <li><a href="#mozTocId222354">Related Software and Links</a></li> <li><a href="#mozTocId477197">Credits</a></li> <li><a href="#mozTocId209397"> Feedback</a></li> <li><a href="#mozTocId319277"> TODO</a></li> <li><a href="#mozTocId238205"> Mailing Lists</a></li> </ol> </li> </ol> <br> <h2><a class="mozTocH2" name="mozTocId705198"></a>On-line Manual</h2> This is the <a href="source-highlight.html">complete manual</a> shipped with source-highlight. It details all the file formats used by source-highlight and also contains documentation on how to create your own language definitions. <p> If you want to use source-highlight library inside your C++ programs, you may want to read the <a href="source-highlight-lib.html">manual of the library</a> and the <a href="api/index.html">API documentation</a>. </p><h2><a class="mozTocH2" name="mozTocId127780"></a> Download</h2> You can download it from GNU's ftp site: <br> <a href="ftp://ftp.gnu.org/gnu/src-highlite/">ftp://ftp.gnu.org/gnu/src-highlite/</a> or from one of its mirrors (see <a href="http://www.gnu.org/prep/ftp.html">http://www.gnu.org/prep/ftp.html</a>). <p>I do not distribute Windows binaries anymore; since, they can be built by using Cygnus C/C++ compiler, available at <a href="http://www.cygwin.com">http://www.cygwin.com</a>. However, if you don't feel like downloading such compiler or you experience problems with the Boost Regex library (please also keep in mind that if you don't have these libraries installed, and your C/C++ compiler distribution does not provide a prebuilt package, it might take some time, even hours, to build the Boost libraries from sources), you can request such binaries directly to me, by e-mail (find my e-mail at my home page) and I'll be happy to send them to you. An MS-Windows port of Source-highlight is available from <a href="http://gnuwin32.sourceforge.net">http://gnuwin32.sourceforge.net</a>; however, I don't maintain those binaries personally, and they might be out of date. <br> </p> <p>Language definition files and output language definition files, which are part of source-highlight distribution, can also be downloaded independently from, respectively: </p><ul> <li><a href="http://www.gnu.org/software/src-highlite/lang_files/">http://www.gnu.org/software/src-highlite/lang_files/</a></li> <li><a href="http://www.gnu.org/software/src-highlite/outlang_files/">http://www.gnu.org/software/src-highlite/outlang_files/</a></li> </ul> <p></p> <p> However, note that the files you find at the above urls are tested with the latest version of source-highlight (thus, e.g., they may require features that are not present in an earlier version of source-highlight); </p> <h3><a class="mozTocH3" name="mozTocId637057"></a> Anonymous Git Checkout</h3> This project's git repository can be checked out through the following clone instruction: <pre>git clone git://git.savannah.gnu.org/src-highlite.git</pre> <p>Further instructions can be found at the address: <p><a href="http://savannah.gnu.org/projects/src-highlite">http://savannah.gnu.org/projects/src-highlite</a>. <p>And the git repository can also browsed on-line at <a href="http://git.savannah.gnu.org/cgit/src-highlite.git">http://git.savannah.gnu.org/cgit/src-highlite.git</a>. <p><i>NOTE: Since version 3.1.2 of Source-highlight the CVS repository was dismissed in favor of Git (<a href="http://git-scm.com/">http://git-scm.com/</a>)</i>. <p> Please notice that this way you will get the latest development sources of Source-highlight, which may also be unstable. This solution is the best if you intend to correct/extend this program: you should send me patches against the latest git repository sources.</p> <p>If, on the contrary, you want to get the sources of a given release, through git, say, e.g., version X.Y.Z, you must specify the git tag <tt>rel_X_Y_Z</tt>.</p> <p>When you compile the sources that you get from the git repository, before running the <tt>configure</tt> and <tt>make</tt> commands, you must run the command:</p> <pre>autoreconf -i<br></pre> <p>This will run the autotools commands in the correct order, and also copy possibly missing files. You should have installed recent versions of <tt>automake</tt>, <tt>autoconf</tt> and <tt>libtool</tt> in order for this to succeed.</p> <p> We strongly suggest to use shadow builds, thus, create a build directory, say <tt>build</tt> and run configuration and make in that directory. To summarize, the steps to get the sources from git and make the first build are: <pre> git clone git://git.savannah.gnu.org/src-highlite.git cd src-highlite autoreconf -i mkdir build cd build ../configure make </pre> </p> <h3><a class="mozTocH3" name="Installation"></a> Installation</h3> Please, take a look at the <a href="source-highlight.html#Installation">Installation section of the manual</a>. Since version 3.1.2, also a <a href="source-highlight.html#Building-with-qmake">qmake based building mechanism is available</a>, though discouraged. <h2><a class="mozTocH2" name="mozTocId579563"></a> Changes in this release</h2> <ul> <li> see <a href="NEWS">NEWS</a> file for a summary of new features in this release and</li> <li> see ChangeLog for the complete list of changes sources</li> </ul> You can also find details about new features of source-highlight on my blog, in this area: <a href="http://tronprog.blogspot.com/search/label/source-highlight">http://tronprog.blogspot.com/search/label/source-highlight</a>. <h2><a class="mozTocH2" name="mozTocId839282"></a>What you need to build source-highlight</h2> Since version 2.0 Source-highlight relies on regular expressions as provided by boost (<a href="http://www.boost.org">http://www.boost.org</a>), so you need to install at least the regex library from boost.&nbsp; Most GNU/Linux distributions provide this library already in a compiled form.<br> <h2><a class="mozTocH2" name="mozTocId120994"></a><a href="examples.html">Usage and examples</a></h2> <h2><a class="mozTocH2" name="mozTocId222354"></a>Related Software and Links</h2> <p>Here we list some software related to source-highlight in the sense that it uses it as a backend (i.e., provides an interface to source-highlight) or it uses some of its features (e.g., definition files):</p><ul><li>Source-highlight-qt is a library for performing syntax highlighting in Qt documents by relying on GNU Source-Highlight library. This library provides an implementation of the qt abstract class QSyntaxHighlighter class, and it deals both with Qt3 and Qt4. <p><a href="http://srchiliteqt.sourceforge.net/">http://srchiliteqt.sourceforge.net</a>. </p></li><li>QSource-Highlight is a Qt4 front-end for GNU Source-Highlight (it relies on the library Source-Highlight-Qt). You can highlight your code on the fly, and have the highlighted output in all the formats supported by source-highlight (e.g., HTML, LaTeX, Texinfo, etc.). You can then copy the formatted output and paste it (e.g., in your blog), or save it to a file. A preview of the highlighted output is available for some output formats (e.g., HTML, XHTML, etc.). <p><a href="http://qsrchilite.sourceforge.net/">http://qsrchilite.sourceforge.net</a>.</p></li></ul> <ul> <li>SourceHighlightIDE is a small IDE (for KDE) I wrote for developing and debugging new language definitions for source-highlight: <p><a href="http://srchighliteide.sourceforge.net">http://srchighliteide.sourceforge.net</a>. </p> </li> <li>Martin Gebert implemented a KDE interface to source-highlight programs (and he did a wonderful job!), and it is called <em>Ksrc2highlight</em>; if you want to test it: <p><a href="http://www.mgebert.de/Ksrc2highlight">http://www.mgebert.de/Ksrc2highlight</a>. </p> </li> <li>There's also a Java version of java2html, you can find it at <p><a href="http://www.generationjava.com/projects/Java2Html.shtml">http://www.generationjava.com/projects/Java2Html.shtml</a>. </p> </li> <li>This web site provides a web interface to source-highlight so that you can highlight your code on-line: <p><a href="http://www.alaide.com/outils_colorsyntaxe.php">http://www.alaide.com/outils_colorsyntaxe.php</a> </p> </li> <li>SHJS is a JavaScript program that highlights source code passages in HTML documents. Documents using SHJS are highlighted on the client side by the web browser. SHJS uses language definitions from Source-highlight. <p><a href="http://shjs.sourceforge.net/">http://shjs.sourceforge.net</a> </p> </li> <li>Code2blog is a pyGTK front-end to source-highlight for easy conversion from source code to HTML. <p><a href="http://code.google.com/p/code2blog">http://code.google.com/p/code2blog</a> </p> </li> <li>Andy Buckley wrote a wrapper around source-highlight, which can be used as an Apache filter to highlight source code in Web pages on the fly. <p><a href="http://www.insectnation.org/projects/filter-src-highlight">http://www.insectnation.org/projects/filter-src-highlight</a> </p> </li> <li>Roger Nilsson wrote a frontend for source-highlight that is used in a popular webdesign app for OSX called RapidWeaver. The frontend is called High-Light and allows users to easily add syntax-colored code inside RapidWeaver. <p><a href="http://nilrogsplace.se/webdesign/rapidweaver/plugins/high-light/index_en.html">http://nilrogsplace.se/webdesign/rapidweaver/plugins/high-light/index_en.html</a> </p> </li> <li> Mauricio Zepeda published in his blog an article with a script to automatically highlight a file and show it in Firefox: <p><a href="http://chillorb.com/?p=122">http://chillorb.com/?p=122</a> </p> </li> <li> Jason Blevins made a plugin for Ikiwiki that enables syntax highlighting of source code fragments and whole files via source-highlight. <p><a href="http://jblevins.org/projects/ikiwiki/code">http://jblevins.org/projects/ikiwiki/code</a> </p> </li> <li> Pascal Bleser created a PHP extension that uses the GNU source-highlight library directly from PHP, instead of relying on spawning a process or using the source-highlight CGI. <p><a href="http://code.google.com/p/php-source-highlight/">http://code.google.com/p/php-source-highlight/</a> </p> </li> <li> Roberto Alsina made a partial python binding using SIP so that you can use Source-Highlight-Qt in PyQt programs. <p><a href="http://marave.googlecode.com/svn/trunk/marave/highlight/">http://marave.googlecode.com/svn/trunk/marave/highlight/</a> </p> </li> <li>A perl binding for source-highlight is available at CPAN: <p><a href="http://search.cpan.org/perldoc?Syntax::SourceHighlight">http://search.cpan.org/perldoc?Syntax::SourceHighlight</a> </p> </li> <li><a name="index-Pastebin-36"></a>Danijel Tasov wrote a pastebin service based on perl source-highlight binding: <p><a href="http://pb.rbfh.de">http://pb.rbfh.de</a> </p> </li> </ul> <h2><a class="mozTocH2" name="mozTocId477197"></a>Credits</h2> See CREDITS for detailed contributions and THANKS&nbsp; for a complete list of people that helped me with Source-highlight :-) <h2><a class="mozTocH2" name="mozTocId209397"></a> Feedback</h2> Please tell me if you like this software :-) <p>Actually I want to extend it, so if you have some ideas... <br> The most import one will be to make source-highlight more powerful :-) </p> <p>Please send all bug reports by electronic mail to: <br> <font color="#3333ff">bug-source-highlight at gnu dot org</font> </p> <p> Or, even better, use </p> <p><a href="https://savannah.gnu.org/bugs/?group=src-highlite">https://savannah.gnu.org/bugs/?group=src-highlite</a> </p> <h2><a class="mozTocH2" name="mozTocId319277"></a> TODO</h2> Here's the <a href="TODO.txt">list of TODO stuff</a>, if you'd like to contribute :-) <h2><a class="mozTocH2" name="mozTocId238205"></a> Mailing Lists</h2> The following mailing lists are available: <ul> <li> <font color="#3333ff">help-source-highlight at gnu dot org</font>, for generic discussions about the program and for asking for help about it (open mailing list), <a href="http://mail.gnu.org/mailman/listinfo/help-source-highlight">http://mail.gnu.org/mailman/listinfo/help-source-highlight</a></li> <li> <font color="#3333ff">info-source-highlight at gnu dot org</font>, for receiving information about new releases and features (read-only mailing list), <a href="http://mail.gnu.org/mailman/listinfo/info-source-highlight">http://mail.gnu.org/mailman/listinfo/info-source-highlight</a></li> </ul> if you want to subscribe to a mailing list just go to the URL and follow the instructions, or send me an e-mail and I'll subscribe you. <p>My home page is <a href="http://www.lorenzobettini.it">http://www.lorenzobettini.it</a> </p> <p>source-highlight is free software. See the file COPYING for copying conditions. Anyway I won't get offended if you send me a postcard :-) </p> <p> </p> <hr> <p>Return to <a href="/home.html">GNU's home page</a>. </p> <p>Please send FSF &amp; GNU inquiries &amp; questions to <i><a href="mailto:gnu@gnu.org">gnu@gnu.org</a></i>. There are also <a href="http://www.gnu.org/home.html#ContactInfo">other ways to contact</a> the FSF. </p> <p>Please send comments on these web pages to <i><a href="mailto:webmasters@gnu.org">webmasters@gnu.org</a></i>, send other questions to <i><a href="mailto:gnu@gnu.org">gnu@gnu.org</a></i>.</p> <p>Copyright (C) 2001 Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA </p> <p>Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved. </p> <p>Updated:<!-- hhmts start -->9 Jan 2001 mhw<!-- hhmts end --> <br> </p> <hr> <br> <br> <br> <br> <br> <br> </body></html>�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/extreme_comment.lang.texinfo���������������������������������������������0000664�0001750�0001750�00000000471�11675045060�020175� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@c Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite @example @b{environment} @t{@i{comment}} @b{start} @t{'^[[:blank:]]*#if[[:blank:]]+0'} @b{begin} @t{@i{comment}} @b{start} @t{'^[[:blank:]]*#(else|endif)'} @b{exit} @b{end} @b{include} @t{"cpp.lang"} @end example�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/function.lang.texinfo����������������������������������������������������0000664�0001750�0001750�00000000354�11675045060�016627� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@c Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite @example @b{vardef} @t{@i{FUNCTION}} = @t{'([[:alpha:]]|_)[[:word:]]*(?=[[:blank:]]*\()'} @t{@i{function}} = @t{@i{$FUNCTION}} @end example������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/example-c.diff.texinfo���������������������������������������������������0000664�0001750�0001750�00000001777�11675045060�016656� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@c Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite @example diff -rc2P source-highlight-2.1.1/source-highlight.spec ... @i{*** source-highlight-2.1.1/source-highlight.spec ...} @i{--- source-highlight-2.1.2/source-highlight.spec ...} @i{***************} @i{*** 7,12 ****} Summary: syntax highlighting for source documents Name: source-highlight @i{! Version: 2.1.1} @i{! Release: 2.1.1} License: GPL Group: Utilities/Console @i{--- 7,12 ----} Summary: syntax highlighting for source documents Name: source-highlight @i{! Version: 2.1.2} @i{! Release: 2.1.2} License: GPL Group: Utilities/Console diff -rc2P source-highlight-2.1.1/src/latex.outlang ... @i{*** source-highlight-2.1.1/src/latex.outlang ...} @i{--- source-highlight-2.1.2/src/latex.outlang ...} @i{***************} @i{*** 35,37 ****} @i{--- 35,38 ----} "--" "-\\/-" "---" "-\\/-\\/-" @i{+ "\"" "\"@{@}" # avoids problems with some inputenc} end @end example�source-highlight-3.1.6/doc/source-highlight-lib.info������������������������������������������������0000644�0001750�0001750�00000126373�11675045063�017365� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������This is ../../doc/source-highlight-lib.info, produced by makeinfo version 4.13 from ../../doc/source-highlight-lib.texinfo. This manual is for GNU Source-highlight Library (version 3.1.6, 16 December 2011), which given a source file, produces a document with syntax highlighting. Copyright (C) 2005-2008 Lorenzo Bettini, `http://www.lorenzobettini.it'. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with the Front-Cover Texts being "A GNU Manual," and with the Back-Cover Texts as in (a) below. A copy of the license is included in the section entitled "GNU Free Documentation License." (a) The FSF's Back-Cover Text is: "You have freedom to copy and modify this GNU Manual, like GNU software. Copies published by the Free Software Foundation raise funds for GNU development." INFO-DIR-SECTION C++ Libraries START-INFO-DIR-ENTRY * Source-highlight-lib: (source-highlight-lib). Highlights contents END-INFO-DIR-ENTRY  File: source-highlight-lib.info, Node: Top, Next: Introduction, Prev: (dir), Up: (dir) GNU Source-highlight Library **************************** GNU Source-highlight, given a source file, produces a document with syntax highlighting. This is Edition 3.1.6 of the Source-highlight Library manual. This file documents GNU Source-highlight Library version 3.1.6. This manual is for GNU Source-highlight Library (version 3.1.6, 16 December 2011), which given a source file, produces a document with syntax highlighting. Copyright (C) 2005-2008 Lorenzo Bettini, `http://www.lorenzobettini.it'. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with the Front-Cover Texts being "A GNU Manual," and with the Back-Cover Texts as in (a) below. A copy of the license is included in the section entitled "GNU Free Documentation License." (a) The FSF's Back-Cover Text is: "You have freedom to copy and modify this GNU Manual, like GNU software. Copies published by the Free Software Foundation raise funds for GNU development." * Menu: * Introduction:: What's it for? * Installation:: * Use of GNU Source-highlight Library:: * Main Classes:: * Global instances:: * Problems:: Reporting bugs. * Mailing Lists:: * Concept Index:: Index of concepts.  File: source-highlight-lib.info, Node: Introduction, Next: Installation, Prev: Top, Up: Top 1 Introduction ************** GNU Source-highlight, given a source file, produces a document with syntax highlighting. *note (source-highlight)Introduction:: for a wider introduction about GNU Source-highlight. This file documents the Library provided by GNU Source-highlight, thus its audience is programmers only, who want to use source-highlight features inside their programs, not the users of Source-highlight. This library is part of GNU Source-highlight since version 3.0. However, the main principles of GNU Source-highlight will be given for granted, together with all the notions for writing language definition files, output definition files, and so on. Again, we refer to the documentation of GNU Source-highlight for all these features.  File: source-highlight-lib.info, Node: Installation, Next: Use of GNU Source-highlight Library, Prev: Introduction, Up: Top 2 Installation ************** GNU Source-highlight library is part of GNU Source-highlight, thus it will be installed together with Source-highlight itself; we refer to *note (source-highlight)Installation:: for further instructions on installing GNU Source-highlight. Here we detail only the parts concerning the library. If you want to build and install the API documentation of Source-highlight library, you need to run `configure' with the option `--with-doxygen', but you need the program _Doxygen_, `http://www.doxygen.org', to build the documentation. The documentation will be installed in the following directory: `Library API documentation' `prefix/share/doc/source-highlight/api' `library examples' `prefix/share/doc/source-highlight/examples' `conf files' `prefix/share/source-highlight'  File: source-highlight-lib.info, Node: Use of GNU Source-highlight Library, Next: Main Classes, Prev: Installation, Up: Top 3 Use of GNU Source-highlight Library ************************************* You can use GNU Source-highlight library in your programs, by including its headers and linking to the file `libsource-highlight'.ext(1). All the classes of the library are part of the namespace `srchilite', and all the header files are in the subdirectory `srchilite'. * Menu: * Using Automake and Autotools:: ---------- Footnotes ---------- (1) The extension of course depends on the library being shared or static, e.g., `.so', `.la', `.a', and on the system  File: source-highlight-lib.info, Node: Using Automake and Autotools, Prev: Use of GNU Source-highlight Library, Up: Use of GNU Source-highlight Library 3.1 Using Automake and Autotools ================================ The easiest way to use GNU Source-highlight library in your program is to rely on autotools, i.e., _Automake_, _Autoconf_, etc. In particular, the library is installed with a `pkg-config'(1) configuration file (metadata file), `source-highlight.pc'. pkg-config is a tool for helping compiling applications and libraries. It helps you insert the correct compiler options on the command line so an application can use Source-highlight library simply by running gcc -o test test.c `pkg-config --libs --cflags source-highlight` rather than hard-coding values on where to find the library. Moreover, this will provide also with the correct compiler flags and libraries used by Source-highlight library itself, e.g., Boost Regex library. Note that `pkg-config' searches for `.pc' files in its standard directories. If you installed the library in a non standard directory, you'll need to set the `PKG_CONFIG_PATH' environment variable accordingly. For instance, if I install the library into `/usr/local/lib', the `.pc' file will be installed into `/usr/local/lib/pkgconfig', and then I'll need to call `pkg-config' as follows: PKG_CONFIG_PATH=/usr/local/lib/pkgconfig \ pkg-config --libs --cflags source-highlight In your `configure.ac' you can use the autoconf macro provided by `pkg-config'; here is an example: # Checks for libraries. PKG_CHECK_MODULES(SRCHILITE, [source-highlight >= 3.0]) AC_SUBST(SRCHILITE_CFLAGS) AC_SUBST(SRCHILITE_LIBS) Then, you can use the variables `SRCHILITE_CFLAGS' and `SRCHILITE_LIBS' in your makefiles accordingly. For instance, ... AM_CPPFLAGS = $(SRCHILITE_CFLAGS) ... LDADD = $(SRCHILITE_LIBS) ... ---------- Footnotes ---------- (1) `http://pkg-config.freedesktop.org'.  File: source-highlight-lib.info, Node: Main Classes, Next: Global instances, Prev: Use of GNU Source-highlight Library, Up: Top 4 Main Classes ************** Here we present the main classes of the Source-highlight library, together with some example of use. For the documentation of all the classes (and methods of the classes) we refer to the generated API documentation (see *Note Installation::). You will note that often, methods and constructors of the classes of the libraries do not take a pointer or a reference to a class, say `MyClass', but an object of type `MyClassPtr'; these are _shared pointers_, in particular the ones provided by the Boost libraries (they are typedefs using, e.g., `boost::shared_ptr<MyClass>'). This will avoid dangerous dangling pointers and possible memory leaks in the library. If on the contrary, a method or a constructor in a class of the library takes a standard pointer, say `MyClass *', then that class will NEVER delete such pointer. It is up to the actual owner the object of `MyClass *' to delete the object when it is not needed anymore. The classes of the libraries can raise exceptions if errors are encountered (e.g., an input file cannot be opened, or a language definition file cannot be parsed); the exception classes can be found in the API documentation, and all exception classes inherit from `std::exception' class. * Menu: * SourceHighlight class:: * Customizing Formatting:: * Events and Listeners:: * Settings:: * Utility functions::  File: source-highlight-lib.info, Node: SourceHighlight class, Next: Customizing Formatting, Prev: Main Classes, Up: Main Classes 4.1 SourceHighlight class ========================= The `SourceHighlight' class is the class of the library that basically implements all the functionalities used by the program `source-highlight' itself; thus it highlights an input file generating an output file. It can be configured with many options, and basically it has a get/set methods for all the command line options of `source-highlight' (we refer also to *note (source-highlight)Invoking source-highlight::). For instance, the following example (`source-highlight-console-main.cpp') highlights an input file to the console (the colors are obtained through ANSI color escape sequences (so you need a console program that supports this): #include <iostream> #include "srchilite/sourcehighlight.h" #include "srchilite/langmap.h" using namespace std; #ifndef DATADIR #define DATADIR "" #endif int main(int argc, char *argv[]) { // we highlight to the console, through ANSI escape sequences srchilite::SourceHighlight sourceHighlight("esc.outlang"); // make sure we find the .lang and .outlang files sourceHighlight.setDataDir(DATADIR); // by default we highlight C++ code string inputLang = "cpp.lang"; if (argc > 1) { // we have a file name so we detect the input source language srchilite::LangMap langMap(DATADIR, "lang.map"); string lang = langMap.getMappedFileNameFromFileName(argv[1]); if (lang != "") { inputLang = lang; } // otherwise we default to C++ // output file name is empty => cout sourceHighlight.highlight(argv[1], "", inputLang); } else { // input file name is empty => cin sourceHighlight.highlight("", "", inputLang); } return 0; } Note that if a file name is passed at the command line, the program tries to detect the source language by using a `LangMap' class object, specifying the map file `lang.map', which is the one mapping file extensions to language definition files (e.g., if the file name has extension `.java' it will use the corresponding `java.lang'). Otherwise we assume that we want to highlight a C++ file. All the highlighting is performed by the `highlight' method; since we don't specify an output file name it will output the highlighted result directly to the console. In case we don't have an input filename either, `highlight' method will read from the standard input. Since the highlighting takes place one line per time, you can test the program this way: you'll enter a line on the console and when you press enter, the program will echo the same line highlighted. The `DATADIR' is not even mandatory, provided you installed Source-highlight correctly, or that you set it up, using `source-highlight-settings' program.  File: source-highlight-lib.info, Node: Customizing Formatting, Next: Events and Listeners, Prev: SourceHighlight class, Up: Main Classes 4.2 Customizing Formatting ========================== The formatting of Source-highlight library, i.e., how to actually perform the highlighting, or what to do when we need to highlight something, can be completely customized; the library detects (using regular expressions based on language definition files) that something must be highlighted as, say, a keyword, and you can then do whatever you want with this information. The default formatting strategy is to output an highlighted text using a specific formatting format, but you're free to do whatever you like, if you want. This formatting abstraction is done through `Formatter' class, which basically declares only the abstract `format' method which takes as parameters the string to format, and further (possibly empty) additional parameters, implemented by `FormatterParams' class. Note that the `format' method does not get as an argument how the passed string must be formatted (e.g., as a keyword, as a type, etc.); this information must be stored in the formatter from the start. Indeed, the mapping between a language element and a formatter is performed by `FormatterManager' class. An object of this class must be created by specifying a default formatter object, that will be used when the formatter manager will be queried for a formatter for a specific language element that it is not able to handle (in this it will fall back by returning the default formatter). * Menu: * Completely Customized Formatting:: * Style-based Customized Formatting::  File: source-highlight-lib.info, Node: Completely Customized Formatting, Next: Style-based Customized Formatting, Prev: Customizing Formatting, Up: Customizing Formatting 4.2.1 Completely Customized Formatting -------------------------------------- You can implement a completely customized formatting strategy. For instance, this is a customized formatter (`infoformatter.h') which, when requested to format a string, it simply writes this information specifying which kind of language element it is, and the position in the line (the `start' field in `FormatterParams' class). Note that the language element is stored in a field of the class, and it is set at object creation time. We avoid to write anything if we are requested to format something as `"normal"', or if the string to format is empty. class InfoFormatter: public srchilite::Formatter { /// the language element represented by this formatter std::string elem; public: InfoFormatter(const std::string &elem_ = "normal") : elem(elem_) { } virtual void format(const std::string &s, const srchilite::FormatterParams *params = 0) { // do not print anything if normal or string to format is empty if (elem != "normal" || !s.size()) { std::cout << elem << ": " << s; if (params) std::cout << ", start: " << params->start; std::cout << std::endl; } } }; /// shared pointer for InfoFormatter typedef boost::shared_ptr<InfoFormatter> InfoFormatterPtr; For convenience we also declare a typedef for the shared pointer (since the formatter manager takes only shared pointers to formatters). In order to customize the formatting, there are some more steps to do, and in particular, you cannot use `SourceHighlight' class anymore but you need to use more classes. First of all, you need `LangDefManager' class which takes care of building the regular expressions starting from a language definition file; in order to do this it uses a `HighlightRuleFactory' class object; for the moment, only the implementation based on boost regular expression exists, so you can simply pass an object of `RegexRuleFactory' class. Once you have an object of `LangDefManager' class, you can use the `getHighlightState' method to build the automaton to perform the highlight (in particular the initial state of such automaton, of `HighlightState' class), and you should pass this to an object that can use the automaton to perform the highlighting. To do this, you can use `SourceHighlighter' class whose objects can be used to highlight a line of text, using `highlightParagraph' method. You can then create a `FormatterManager' class object and populate it with your formatters and set it to the `SourceHighlighter' class object. The following example (`infoformatter-main.cpp') shows how to perform these steps; note that we can share the same formatter for different language elements: #include <iostream> #include "srchilite/langdefmanager.h" #include "srchilite/regexrulefactory.h" #include "srchilite/sourcehighlighter.h" #include "srchilite/formattermanager.h" #include "infoformatter.h" using namespace std; #ifndef DATADIR #define DATADIR "" #endif int main() { srchilite::RegexRuleFactory ruleFactory; srchilite::LangDefManager langDefManager(&ruleFactory); // we highlight C++ code for simplicity srchilite::SourceHighlighter highlighter(langDefManager.getHighlightState( DATADIR, "cpp.lang")); srchilite::FormatterManager formatterManager(InfoFormatterPtr( new InfoFormatter)); InfoFormatterPtr keywordFormatter(new InfoFormatter("keyword")); formatterManager.addFormatter("keyword", keywordFormatter); formatterManager.addFormatter("string", InfoFormatterPtr(new InfoFormatter( "string"))); // for "type" we use the same formatter as for "keyword" formatterManager.addFormatter("type", keywordFormatter); formatterManager.addFormatter("comment", InfoFormatterPtr( new InfoFormatter("comment"))); formatterManager.addFormatter("symbol", InfoFormatterPtr(new InfoFormatter( "symbol"))); formatterManager.addFormatter("number", InfoFormatterPtr(new InfoFormatter( "number"))); formatterManager.addFormatter("preproc", InfoFormatterPtr( new InfoFormatter("preproc"))); highlighter.setFormatterManager(&formatterManager); // make sure it uses additional information srchilite::FormatterParams params; highlighter.setFormatterParams(&params); string line; // we now highlight a line a time while (getline(cin, line)) { // reset position counter within a line params.start = 0; highlighter.highlightParagraph(line); } return 0; } Note that, since we highlight a line a time, we must reset the `start' field each time we start to examine a new line. For simplicity this example highlights only C++ code and reads directly from the standard input and writes to the standard output. This is a run of the example reading from the standard input (so each time you insert a line you get the output of your formatters): // this is a comment comment: //, start: 0 comment: this is a comment, start: 2 #include <foobar.h> preproc: #include, start: 0 string: <foobar.h>, start: 9 int abc = 100 + 5; keyword: int, start: 0 symbol: =, start: 8 number: 100, start: 10 symbol: +, start: 14 number: 5, start: 16 symbol: ;, start: 17  File: source-highlight-lib.info, Node: Style-based Customized Formatting, Prev: Completely Customized Formatting, Up: Customizing Formatting 4.2.2 Style-based Customized Formatting --------------------------------------- Source-highlight can rely on style (and css style) files for generating formatting. Usually, the formatters are built according to the output format, specified through `.outlang' files, *note (source-highlight)Output Language Definitions::. However, you can also create your own formatters based on the information of the style file (or css style file). During the parsing of these style files, a `FormatterFactory' class object is used by the library, and you can provide a customized factory (the one that is used by the library is `TextStyleFormatterFactory' class). The only abstract method of `FormatterFactory' class is `createFormatter' method. In order to parse a style file, you can use the static methods of the `StyleFileParser' class, which require the file name of the style file (and possibly the path to search for the style file, otherwise the default one is used), the factory to create formatters, and a reference to a string where the document background color will be stored. The methods are `parseStyleFile' method and `parseCssStyleFile' method. For instance, let's create a customized formatter `styleformatter.h' that simply prints how a language element will be formatted (but no formatting will take place); for the sake of simplicity we will use only public fields: struct StyleFormatter: public srchilite::Formatter { /// the language element represented by this formatter std::string elem; bool bold, italic, underline, fixed, not_fixed; std::string color; std::string bgColor; StyleFormatter(const std::string &elem_ = "normal") : elem(elem_), bold(false), italic(false), underline(false), fixed(false), not_fixed(false) { } virtual void format(const std::string &s, const srchilite::FormatterParams *params = 0) { // do not print anything if normal or string to format is empty if (elem != "normal" || !s.size()) { std::cout << elem << ": \"" << s << "\"" << std::endl; std::cout << "formatted as: " << (bold ? "bold " : "") << (italic ? "italic " : "") << (underline ? "underline " : ""); std::cout << (color.size() ? "color: " + color + " " : ""); std::cout << (bgColor.size() ? "bgcolor: " + bgColor : "") << std::endl; } } }; /// shared pointer for StyleFormatter typedef boost::shared_ptr<StyleFormatter> StyleFormatterPtr; Now, we create a customized factory (file `styleformatterfactory.h'), implementing the method `createFormatter' method. Note that the base class `FormatterFactory' class does not provide any means to store the created formatters, so it's up to the derived classes to store the created formatters somewhere: struct StyleFormatterFactory: public srchilite::FormatterFactory { StyleFormatterMap formatterMap; bool hasFormatter(const string &key) const { return formatterMap.find(key) != formatterMap.end(); } bool createFormatter(const string &key, const string &color, const string &bgcolor, srchilite::StyleConstantsPtr styleconstants) { if (hasFormatter(key)) return false; StyleFormatter *formatter = new StyleFormatter(key); formatterMap[key] = StyleFormatterPtr(formatter); if (styleconstants.get()) { for (srchilite::StyleConstantsIterator it = styleconstants->begin(); it != styleconstants->end(); ++it) { switch (*it) { case srchilite::ISBOLD: formatter->bold = true; break; case srchilite::ISITALIC: formatter->italic = true; break; case srchilite::ISUNDERLINE: formatter->underline = true; break; case srchilite::ISFIXED: formatter->fixed = true; break; case srchilite::ISNOTFIXED: formatter->not_fixed = true; break; case srchilite::ISNOREF: // ignore references here break; } } } formatter->color = color; formatter->bgColor = bgcolor; return true; } }; The `createFormatter' method will be called when parsing a style file to create a formatter corresponding to a specific language element; this method should return false if the creation of a formatter failed (e.g., in this case, if a formatter for a given element had already been created). The method is passed the language element name, the colors for the element as specified in the style file (that can be empty if no color was specified), and a `StyleConstants' enum shared pointer with formatting informations such as, boldface, italics, etc. The factory can use this information to create the customized formatter. Now, we can use this customized formatter factory in our program (file `styleformatter-main.cpp'): #include <iostream> #include "srchilite/langdefmanager.h" #include "srchilite/regexrulefactory.h" #include "srchilite/sourcehighlighter.h" #include "srchilite/formattermanager.h" #include "srchilite/stylefileparser.h" // for parsing style files #include "styleformatterfactory.h" using namespace std; #ifndef DATADIR #define DATADIR "" #endif int main() { srchilite::RegexRuleFactory ruleFactory; srchilite::LangDefManager langDefManager(&ruleFactory); // we highlight C++ code for simplicity srchilite::SourceHighlighter highlighter(langDefManager.getHighlightState( DATADIR, "cpp.lang")); // our factory for our formatters StyleFormatterFactory factory; // the background color for the document (not used here) string docBgColor; // let's parse the default.style and create our formatters srchilite::StyleFileParser::parseStyleFile(DATADIR, "default.style", &factory, docBgColor); // now we need to fill up the formatter manager with our formatters srchilite::FormatterManager formatterManager(StyleFormatterPtr( new StyleFormatter)); for (StyleFormatterMap::const_iterator it = factory.formatterMap.begin(); it != factory.formatterMap.end(); ++it) { formatterManager.addFormatter(it->first, it->second); } highlighter.setFormatterManager(&formatterManager); string line; // we now highlight a line a time while (getline(cin, line)) { highlighter.highlightParagraph(line); } return 0; } Note that, once we created all the formatters with our factory (while parsing the style file `default.style'), we still need to manually set these formatters in the `FormatterManager' class object used by our highlighter. For simplicity this example highlights only C++ code and reads directly from the standard input and writes to the standard output. This is a run of the example reading from the standard input (so each time you insert a line you get the output of your formatters): /// my class TODO: nothing special comment: "///" formatted as: italic color: brown comment: " my class " formatted as: italic color: brown todo: "TODO:" formatted as: bold bgcolor: cyan comment: " nothing special" formatted as: italic color: brown #include <foobar.h> preproc: "#include" formatted as: bold color: darkblue string: "<foobar.h>" formatted as: color: red  File: source-highlight-lib.info, Node: Events and Listeners, Next: Settings, Prev: Customizing Formatting, Up: Main Classes 4.3 Events and Listeners ======================== During the highlighting (and regular expression matching) the library generates events that can be "listened" by using a customized event listener. An event is represented by an object of `HighlightEvent' class, which stores the `HighlightToken' class object and the type (an `HighlightEventType' enum) of the event. A customized listener can be implemented by deriving from `HighlightEventListener' class and by defining the virtual method `notify' method, which, of course, takes an `HighlightEvent' class object as parameter. For instance, `source-highlight' implements the debugging functionalities by using a customized listener, `DebugListener' class, whose method implementation we report here as an example: void DebugListener::notify(const HighlightEvent &event) { switch (event.type) { case HighlightEvent::FORMAT: // print information about the rule if (event.token.rule) { os << event.token.rule->getAdditionalInfo() << endl; os << "expression: \"" << event.token.rule->toString() << "\"" << endl; } // now format the matched strings for (MatchedElements::const_iterator it = event.token.matched.begin(); it != event.token.matched.end(); ++it) { os << "formatting \"" << it->second << "\" as " << it->first << endl; } step(); break; case HighlightEvent::FORMATDEFAULT: os << "formatting \"" << event.token.matched.front().second << "\" as default" << endl; step(); break; case HighlightEvent::ENTERSTATE: os << "entering state: " << event.token.rule->getNextState()->getId() << endl; break; case HighlightEvent::EXITSTATE: int level = event.token.rule->getExitLevel(); os << "exiting state, level: "; if (level < 0) os << "all"; else os << level; os << endl; break; } }  File: source-highlight-lib.info, Node: Settings, Next: Utility functions, Prev: Events and Listeners, Up: Main Classes 4.4 Settings ============ Source-highlight library reads language map files, language definition files, output format definitions, styles, and other files it needs during the execution from a specific directory, which we call _data dir_; the library comes with an hardcoded value for this path, which is based on the `--prefix' value specified at configuration time (in particular, it is `prefix/share/source-highlight'). In particular, the user can set the value also with the environment variable `SOURCE_HIGHLIGHT_DATADIR' (see also the program `source-highlight-settings' which can store settings in a configuration file of the user's home, *note (source-highlight)The program source-highlight-settings::). When running the program `source-highlight' this value can be overridden with the command line option `--data-dir' (*note (source-highlight)Configuration files::). When using the Source-highlight library from a program, one might need to change the value for data dir, dynamically, and in a consistent way, i.e., to have a static and single point where this setting can be set and retrieved. Note that for the moment, the only setting you can manage is the value of data dir. The library provides the `Settings' class for this purpose. Although you can create objects of this class to mainuplate, check and save settings (you may want to look at the source code of the program `source-highlight-settings'), you probably only need the static methods of this class. You can set the global value of data dir with the `setGlobalDataDir' method. The `retrieveDataDir' method retrieves the value for the data dir. If the global value was set with `setGlobalDataDir' method then always returns this global value. Otherwise, it returns the value of the environment variable `SOURCE_HIGHLIGHT_DATADIR' if set. Otherwise, it returns the value read from the configuration file. If also the reading of configuration file fails, then it returns the hardcoded value.  File: source-highlight-lib.info, Node: Utility functions, Prev: Settings, Up: Main Classes 4.5 Utility functions ===================== If you need to get a list of all the files in the data dir with a specific role (e.g., language definition files, style files, etc.) you can use the static methods of the `SourceHighlightUtils' class, which will take care of using the data dir specified in the settings (*note Settings::).  File: source-highlight-lib.info, Node: Global instances, Next: Problems, Prev: Main Classes, Up: Top 4.6 Global instances ==================== The `Instances' class provides access to static instances of some classes that can be used, e.g., to read a language definition file and create the automaton for the highlighting, using `LangDefManager' class, or to access the map of language definition files, using `LangMap' class. This class ensures that these instances use the global settings; in particular, if you change the global settings, you should call the static `reload' method, so that the instances are updated. Using these instances also makes the use of some classes easier; for instance, the beginning part of the `main' of the examples shown in *note Customizing Formatting:: can be written as follows: #include "srchilite/langdefmanager.h" #include "srchilite/instances.h" int main() { // we highlight C++ code for simplicity srchilite::SourceHighlighter highlighter (srchilite::Instances::getLangDefManager().getHighlightState( DATADIR, "cpp.lang")); If you know that you will not use these instances anymore in your application, and it is crucial to recover all the memory used by these instances, you then need to call the static `unload' method, and the memory of these instances will be released.  File: source-highlight-lib.info, Node: Problems, Next: Mailing Lists, Prev: Global instances, Up: Top 5 Reporting Bugs **************** If you find a bug in `source-highlight', please send electronic mail to `bug-source-highlight at gnu dot org' Include the version number, which you can find by running `source-highlight --version'. Also include in your message the output that the program produced and the output you expected. If you have other questions, comments or suggestions about `source-highlight', contact the author via electronic mail (find the address at `http://www.lorenzobettini.it'). The author will try to help you out, although he may not have time to fix your problems.  File: source-highlight-lib.info, Node: Mailing Lists, Next: Concept Index, Prev: Problems, Up: Top 6 Mailing Lists *************** The following mailing lists are available: `help-source-highlight at gnu dot org' for generic discussions about the program and for asking for help about it (open mailing list), `http://mail.gnu.org/mailman/listinfo/help-source-highlight' `info-source-highlight at gnu dot org' for receiving information about new releases and features (read-only mailing list), `http://mail.gnu.org/mailman/listinfo/info-source-highlight'. If you want to subscribe to a mailing list just go to the URL and follow the instructions, or send me an e-mail and I'll subscribe you. I'll describe new features in new releases also in my blog, at this URL: `http://tronprog.blogspot.com/search/label/source-highlight'  File: source-highlight-lib.info, Node: Concept Index, Prev: Mailing Lists, Up: Top Concept Index ************* �[index�] * Menu: * --with-doxygen: Installation. (line 12) * automaton <1>: Global instances. (line 8) * automaton: Completely Customized Formatting. (line 52) * autotools: Using Automake and Autotools. (line 6) * bugs: Problems. (line 6) * createFormatter method: Style-based Customized Formatting. (line 14) * data dir: Settings. (line 8) * DebugListener class: Events and Listeners. (line 17) * doxygen: Installation. (line 12) * features: Introduction. (line 6) * format method: Customizing Formatting. (line 16) * Formatter class: Customizing Formatting. (line 15) * FormatterFactory class: Style-based Customized Formatting. (line 11) * FormatterManager class <1>: Style-based Customized Formatting. (line 183) * FormatterManager class <2>: Completely Customized Formatting. (line 59) * FormatterManager class: Customizing Formatting. (line 22) * FormatterParams class <1>: Completely Customized Formatting. (line 10) * FormatterParams class: Customizing Formatting. (line 18) * getHighlightState method: Completely Customized Formatting. (line 52) * headers: Use of GNU Source-highlight Library. (line 9) * highlight method: SourceHighlight class. (line 63) * HighlightEvent class: Events and Listeners. (line 8) * HighlightEventListener class: Events and Listeners. (line 12) * HighlightEventType enum: Events and Listeners. (line 9) * highlightParagraph method: Completely Customized Formatting. (line 56) * HighlightRuleFactory class: Completely Customized Formatting. (line 48) * HighlightState class: Completely Customized Formatting. (line 53) * HighlightToken class: Events and Listeners. (line 9) * Instances class: Global instances. (line 6) * introduction: Introduction. (line 6) * LangDefManager class <1>: Global instances. (line 8) * LangDefManager class: Completely Customized Formatting. (line 46) * LangMap class <1>: Global instances. (line 9) * LangMap class: SourceHighlight class. (line 57) * libsource-highlight: Use of GNU Source-highlight Library. (line 6) * mailing list: Mailing Lists. (line 6) * namespace: Use of GNU Source-highlight Library. (line 9) * notify method: Events and Listeners. (line 13) * parseCssStyleFile method: Style-based Customized Formatting. (line 22) * parseStyleFile method: Style-based Customized Formatting. (line 21) * pkg-config: Using Automake and Autotools. (line 6) * PKG_CONFIG_PATH: Using Automake and Autotools. (line 22) * problems: Problems. (line 6) * RegexRuleFactory class: Completely Customized Formatting. (line 50) * reload method: Global instances. (line 12) * retrieveDataDir method: Settings. (line 31) * setGlobalDataDir method: Settings. (line 31) * Settings class: Settings. (line 27) * shared pointers: Main Classes. (line 13) * source-highlight <1>: Settings. (line 17) * source-highlight <2>: Events and Listeners. (line 16) * source-highlight: SourceHighlight class. (line 7) * source-highlight-settings <1>: Settings. (line 13) * source-highlight-settings: SourceHighlight class. (line 72) * SOURCE_HIGHLIGHT_DATADIR: Settings. (line 12) * SourceHighlight class <1>: Completely Customized Formatting. (line 43) * SourceHighlight class: SourceHighlight class. (line 6) * SourceHighlighter class: Completely Customized Formatting. (line 55) * SourceHighlightUtils class: Utility functions. (line 8) * start field: Completely Customized Formatting. (line 10) * std::exception class: Main Classes. (line 27) * StyleConstants enum: Style-based Customized Formatting. (line 124) * StyleFileParser class: Style-based Customized Formatting. (line 17) * tail recursion: Concept Index. (line 6) * TextStyleFormatterFactory class: Style-based Customized Formatting. (line 13) * unload method: Global instances. (line 29)  Tag Table: Node: Top1161 Node: Introduction2705 Node: Installation3567 Node: Use of GNU Source-highlight Library4524 Ref: Use of GNU Source-highlight Library-Footnote-15086 Node: Using Automake and Autotools5209 Ref: Using Automake and Autotools-Footnote-17195 Node: Main Classes7240 Node: SourceHighlight class8762 Node: Customizing Formatting11823 Node: Completely Customized Formatting13497 Node: Style-based Customized Formatting19424 Node: Events and Listeners27799 Node: Settings30184 Node: Utility functions32294 Node: Global instances32727 Node: Problems34118 Node: Mailing Lists34831 Node: Concept Index35693  End Tag Table ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/sh_bipolar.css�����������������������������������������������������������0000644�0001750�0001750�00000001645�11672675562�015337� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������body { background-color: #000000; color: #d149a6; font-weight: normal; font-style: normal; } .keyword { color: #ee85e2; font-weight: bold; font-style: normal; } .type { color: #aadd8b; font-weight: bold; font-style: normal; } .string { color: #9ef457; font-weight: normal; font-style: normal; } .specialchar { color: #9ef457; font-weight: normal; font-style: normal; } .comment { color: #35d6e5; font-weight: normal; font-style: italic; } .number { color: #ffffff; font-weight: normal; font-style: normal; } .preproc { color: #07f6bf; font-weight: normal; font-style: normal; } .symbol { color: #348fef; font-weight: normal; font-style: normal; } .function { color: #d51993; font-weight: bold; font-style: normal; } .cbracket { color: #348fef; font-weight: normal; font-style: normal; } �������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/colors.html��������������������������������������������������������������0000644�0001750�0001750�00000002731�11672675561�014666� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<!DOCTYPE html PUBLIC "-//w3c//dtd html 4.0 transitional//en"> <html><head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta name="GENERATOR" content="Mozilla/4.77 [en] (X11; U; Linux 2.4.3-20mdk i686) [Netscape]"> <meta name="Author" content="Lorenzo Bettini"><title>Source-highlight HTML colors</title> </head> <body style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" alink="#ff0000" link="#0000ef" vlink="#51188e"> <font color="#000000">black (#000000)</font> <br> <font style="background-color: black;" bgcolor="#000000" color="#ffffff">white (#FFFFFF)</font> <br> <font color="#ff0000">red (#FF0000)</font> <br> <font color="#990000">darkred (#990000)</font> <br> <font color="#660000">brown (#660000)</font> <br> <font color="#ffcc00">yellow (#FFCC00)</font> <br> <font color="#66ffff">cyan (#66FFFF)</font> <br> <font color="#3333ff">blue (#3333FF)</font> <br> <font color="#cc33cc">pink (#CC33CC)</font> <br> <font color="#993399">purple (#993399)</font> <br> <font color="#ff6600">orange (#FF6600)</font> <br> <font color="#ff9900">brightorange (#FF9900)</font> <br> <font color="#33cc00">green (#33CC00)</font> <br> <font color="#33ff33">brightgreen (#33FF33)</font> <br> <font color="#009900">darkgreen (#009900)</font> <br> <font color="#008080">teal (#008080)</font> <br> <font color="#808080">gray (#808080)</font> <br> <font color="#000080">darkblue (#000080)</font> <p></p> <hr width="100%"><br> <i>Lorenzo Bettini</i> </body></html>���������������������������������������source-highlight-3.1.6/doc/example-n.diff�����������������������������������������������������������0000644�0001750�0001750�00000000223�11672675561�015211� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������diff -rP source-highlight-2.1.1/source-highlight.spec ... 9,10c9,10 < Version: 2.1.1 < Release: 2.1.1 --- > Version: 2.1.2 > Release: 2.1.2�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/sh_the.css���������������������������������������������������������������0000644�0001750�0001750�00000001405�11672675562�014461� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������body { background-color: #ffffff; color: #000000; font-weight: normal; font-style: normal; } .keyword { color: #0000ff; font-weight: normal; font-style: normal; } .type { color: #880088; font-weight: normal; font-style: normal; } .string { color: #000088; font-weight: normal; font-style: normal; } .specialchar { color: #000000; font-weight: normal; font-style: normal; } .comment { color: #00ff00; font-weight: normal; font-style: italic; } .number { color: #ff0000; font-weight: normal; font-style: normal; } .preproc { color: #ff0000; font-weight: normal; font-style: normal; } .function { color: #000000; font-weight: normal; font-style: normal; } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/examples.html������������������������������������������������������������0000644�0001750�0001750�00000021465�11672675561�015210� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<!DOCTYPE doctype PUBLIC "-//w3c//dtd html 4.0 transitional//en"> <html><head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta name="Author" content="Lorenzo Bettini"><title>GNU Source-highlight Examples - GNU Project - Free Software Foundation (FSF)</title></head> <body style="background-color: rgb(255, 255, 255);"> <h1><a class="mozTocH1" name="mozTocId593827"></a> GNU Source-highlight Examples</h1> <p>by <a href="http://www.lorenzobettini.it">Lorenzo Bettini</a> <h2>Usage and examples</h2> source-highlight only does a lexical analysis of the source code, so the program source is assumed to be correct!<br> <br> Finally, there is texinfo documentation.&nbsp; It is also available as an html file, and it is also <a href="source-highlight.html">available on-line</a>.<br> <p>Here we only show some examples of generated files.<br> </p> <p>Here are some links to some of the C and C++ sources of source-highlight colored with source-highlight itself: </p> <blockquote><a href="source-highlight.cc.html">source-highlight.cc.html</a></blockquote> generated with the following command <blockquote> <pre>source-highlight -s cpp -f html --doc source-highlight.cc</pre> </blockquote> And obviously it works with header file as well: <blockquote><a href="cmdline.h.html">cmdline.h.html</a></blockquote> created with the command: <blockquote> <pre>source-highlight -s cpp -f html *.h --css="mono.css"</pre> </blockquote> Here are some examples of Java files processed with source-highlight (in most of them we have used the <a href="Hello.java" hello.java="">Hello.java</a> to make some test). Here's how <a href="Hello1.html">Hello1.html</a>, <a href="Hello2.html">Hello2.html</a>, <a href="Hello3.html">Hello3.html</a>, <a href="Hello4.html">Hello4.html</a>, <a href="Hello5.html">Hello5.html</a>, <a href="Hello_h_f.html">Hello_h_f.html</a>, <a href="Hello_lines.html">Hello_lines.html</a>, <a href="Hello_xhtml.html">Hello_xhtml.html</a>, <a href="Hello_xhtml2.html">Hello_xhtml2.html</a>, <a href="Hello_notfixed.html">Hello_notfixed.html</a> were created: <pre>source-highlight -s java -f html -i Hello.java -o Hello1.html<br>source-highlight -s java -f html --input Hello.java --output Hello2.html --doc<br>source-highlight -s java -f html -i Hello.java -o Hello3.html --title "Happy Java with java2html :-)" --tab 3<br>source-highlight -s java -f html &lt; Hello.java &gt; Hello4.html --title "and what about CSS :-)" --css "Hello.css"<br>source-highlight -s java -f html &lt; Hello.java &gt; Hello5.html --title "Wooo... this is quite dark ;-D" --css "mono-alt.css"<br>source-highlight -s java -f html --doc *.java<br>Processed Hello.java&nbsp;&nbsp; <i>(creates Hello.java.html)<br></i>source-highlight -s java -f html --doc -i Hello.java -o Hello_h_f.html --style-file="default.style" --header="header.html" --footer="footer.html"<br>source-highlight -s java -f html --line-number --doc -i Hello.java -o Hello_lines.html<br>source-highlight -s java -f xhtml --doc -i Hello.java -o Hello_xhtml.html --css xhtml.css<br>source-highlight -s java -f xhtml --doc -i Hello.java -o Hello_xhtml2.html --style-file default.style<br>source-highlight -s java --outlang-def=html_notfixed.outlang -i Hello.java -o Hello_notfixed.html --style-file default.style</pre> Here's another example: <blockquote><a href="Hello_h_f.html">Hello_h_f.html</a></blockquote> Created with the command (notice that this one uses both CSS file and headers and footers): <blockquote> <pre>source-highlight -s java -f html -i Hello.java -o Hello_h_f.html&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; --css="cpp2html.css"<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; --header="./header.html" --footer="./footer.html"</pre> </blockquote> Source-highlight can also generate HTML code to be embedded (i.e., copied and pasted) inside a Javadoc comment (or another kind of comment framework such as Doxygen). &nbsp;This way, when you run javadoc on such a file, the resulting generated html documentation files will have the code snippets highlighted. &nbsp;For instance, consider this piece of code, <a href="UsageExample.html">UsageExample.java</a>, representing an example of usage of the class SimpleClass; we would like to embed this code (formatted) into a javadoc comment of SimpleClass, so we process it with the option <span style="font-family: monospace;">-f javadoc</span> and we copy the result into the comment, as illustrated in <a href="SimpleClass.html">SimpleClass.java</a>. When we process this file with javadoc, we obtain that code formatted in the documentation html file: <a href="SimpleClass-doc.html">SimpleClass-doc.html</a>. &nbsp;Doesn't it look nice :-)<br><br> You can also specify several line ranges, so that you produce an output only with those specific lines of your input file; you can specify a number of lines for the sorrounding context, and the separator of ranges; for instance, this <a href="test_linerange_sep.html">output</a> was produced, starting from this <a href="test.java.html">input</a>, with the following command (note how the context is shown in gray, as specified in the style file):<br><blockquote> <pre>source-highlight -s java -f html <br> --line-range="12-18","29-34" --line-number --range-context=3 --range-separator="&lt;...&gt;" <br> -i test.java -o test_linerange_sep.html</pre></blockquote> <p> Range of output can also be specified using regular expressions: the beginning of the range will be detected by a line containing (in any point) a string matching the specified regular expression; the end will be detected by a line containing a string matching the same regular expression that started the range. This feature is very useful when we want to document some code (e.g., in this very manual) by showing only specific parts, that are delimited in a ad-hoc way in the source code (e.g., with specific comment patterns). for instance, this <a href="test_regexrange4.html">output</a> was produced, starting from this <a href="test.java.html">input</a>, with the following command<br><blockquote> <pre> ssource-highlight -s java -f html --regex-range="/\* [[:alpha:]]+ \*/" --line-number -i test.java -o test_regexrange4.html </pre></blockquote> <p>Here's the output of source-highlight applied to a Prolog program (through the option `<tt>source-highlight -s prolog</tt>`: <a href="test.pl.html">test.pl.html</a>.&nbsp; This one is an highlighted Perl program (through the option `<tt>source-highlight -s prolog</tt>`): <a href="test.pm.html">test.pm.html</a>.&nbsp; Here's an highlighted PHP3 program: <a href="test.php3.html">test.php3.html</a>. And here's a Python program: <a href="test.py.html">test.py.html</a>.&nbsp; This the flex scanner for flex files <a href="flex_scanner.ll.html">flex_scanner.ll.html</a>. This is a Ruby program: <a href="test.rb.html">test.rb.html</a>. This is a Javascript program <a href="test.js.html">test.js.html</a>.&nbsp; This is a Lua test program <a href="test.lua.html">test.lua.html</a>.&nbsp; This is a Caml test program <a href="test.ml.html">test.ml.html</a> and this is an Sml test program <a href="test.sml.html">test.sml.html</a>.&nbsp; <br> <br> Here are some log files formatted using the color file <a href="syslog.style.html">syslog.style</a>: <br> <ul> <li><a href="test.log.html">test.log.html</a>,</li> <li><a href="access.log.html">access.log.html</a>,</li> <li><a href="auth.log.html">auth.log.html</a>,</li> <li><a href="error.log.html">error.log.html</a>,</li> <li><a href="syslog.log.html">syslog.log.html</a>.</li> </ul> <p> This is the language definition file for C/C++: <a href="cpp.lang.html">cpp.lang.html</a>, the one for the log files above, <a href="log.lang.html">log.lang.html</a>, and the language definition file for the language definition syntax itself: <a href="langdef.lang.html">langdef.lang.html</a>. </p> <p> Here's the html output of test.java.html formatted in html itself: <a href="test.htm.html">test.htm.html</a>.<br> <br> and here's the output of test.java.tex formatted in html: <a href="test.java.tex.html">test.java.tex.html</a> </p> <p>These HTML outputs contain cross references, <a href="test_refs.h.html">test_refs.h.html</a>, <a href="test_refs.cpp.html">test_refs.cpp.html</a>, generated with the following command: </p> <blockquote> <pre>source-highlight -s cpp -f html --title="Contains references to tags" <br> --gen-references=inline test_refs.h test_refs.cpp</pre> </blockquote> <h2><a class="mozTocH2" name="mozTocId323328"></a>Style files</h2> <p>Since version 2.6, source-highlight can use CSS style files (limited support) as style files for coloring and formatting the output. Here you can find the output using all these files shipped with source-highlight (these were adapted from those provided by <a href="http://shjs.sourceforge.net">SHJS</a>):</p> <p><a href="style_examples.html">Style examples</a> (huge file). </body></html>�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/comment-show.lang��������������������������������������������������������0000644�0001750�0001750�00000000443�11672675561�015760� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������vardef TODO = '(TODO|FIXME)([:]?)' environment comment delim "/**" "*/" multiline begin type = '@[[:alpha:]]+' todo = $TODO end state cbracket delim "{" "}" escape "\\" multiline nested begin keyword = "if|then|else|endif" end string delim "<" ">" string2 delim "<<" ">>" multiline�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/comment-show.show.texinfo������������������������������������������������0000664�0001750�0001750�00000001621�11675045061�017460� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@c Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite @example STATE 1 default: normal rule (comment) "/\*\*" (exit level: 0, next: 2) STATE 2 default: comment rule (comment) "\*/" (exit level: 1, next: 0) rule (type) "(?:\@@[[:alpha:]]+)" (exit level: 0, next: 0) rule (todo) "(?:(?:TODO|FIXME)(?:[:]?))" (exit level: 0, next: 0) rule (cbracket) "\@{" (exit level: 0, next: 3) STATE 3 default: normal rule (cbracket) "\@}" (exit level: 1, next: 0) rule (cbracket) "\\." (exit level: 0, next: 0) rule (cbracket) "\@{" (exit level: 0, next: 0, nested) rule (keyword) "\<(?:if|then|else|endif)\>" (exit level: 0, next: 0) rule (string) "<(?:[^<>])*>" (exit level: 0, next: 0) rule (string2) "<<" (exit level: 0, next: 4) STATE 4 default: string2 rule (string2) ">>" (exit level: 1, next: 0) @end example���������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/symbols.lang.texinfo�����������������������������������������������������0000664�0001750�0001750�00000000512�11675045060�016466� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@c Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite @example @t{@i{symbol}} = @t{"~"},@t{"!"},@t{"%"},@t{"^"},@t{"*"},@t{"("},@t{")"},@t{"-"},@t{"+"},@t{"="},@t{"["}, @t{"]"},@t{"\\"},@t{":"},@t{";"},@t{","},@t{"."},@t{"/"},@t{"?"},@t{"&"},@t{"<"},@t{">"},@t{"\|"} @end example��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/sh_emacs.css�������������������������������������������������������������0000644�0001750�0001750�00000001403�11672675562�014767� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������body { background-color: #ffffff; color: #000000; font-weight: normal; font-style: normal; } .keyword { color: #9c20ee; font-weight: bold; font-style: normal; } .type { color: #208920; font-weight: normal; font-style: normal; } .string { color: #bd8d8b; font-weight: normal; font-style: normal; } .specialchar { color: #bd8d8b; font-weight: normal; font-style: normal; } .comment { color: #ac2020; font-weight: normal; font-style: italic; } .number { color: #000000; font-weight: normal; font-style: normal; } .preproc { color: #000000; font-weight: normal; font-style: normal; } .function { color: #000000; font-weight: normal; font-style: normal; } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/sh_peachpuff.css���������������������������������������������������������0000644�0001750�0001750�00000001401�11672675562�015636� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������body { background-color: #ffdab9; color: #000000; font-weight: normal; font-style: normal; } .keyword { color: #a52a2a; font-weight: bold; font-style: normal; } .type { color: #2e8b57; font-weight: bold; font-style: normal; } .string { color: #c00058; font-weight: normal; font-style: normal; } .specialchar { color: #6a5acd; font-weight: normal; font-style: normal; } .comment { color: #406090; font-weight: normal; font-style: normal; } .number { color: #c00058; font-weight: normal; font-style: normal; } .preproc { color: #cd00cd; font-weight: normal; font-style: normal; } .function { color: #521cc7; font-weight: normal; font-style: normal; } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/Hello.css����������������������������������������������������������������0000644�0001750�0001750�00000000434�11672675561�014252� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������body { color: black; background-color: white; font-family: monospace } .comment { color: gray; font-style: italic; } .keyword { color: maroon; font-weight: bold; } .string { color: green } .type { color: teal; text-decoration: underline; } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/source-highlight-lib.texinfo���������������������������������������������0000644�0001750�0001750�00000062512�11672675562�020112� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������\input texinfo @c -*-texinfo-*- @c This file uses the @command command introduced in Texinfo 4.0. @c %**start of header @setfilename source-highlight-lib.info @include version-lib.texi @settitle GNU Source-highlight Library @value{VERSION} @finalout @c @setchapternewpage odd @c %**end of header @set myhomepage @uref{http://www.lorenzobettini.it} @set langfilesurl @uref{http://www.gnu.org/software/src-highlite/lang_files/} @set outlangfilesurl @uref{http://www.gnu.org/software/src-highlite/outlang_files/} @set srchilitelib Source-highlight library @macro cind {n} @cindex \n\ \n\ @end macro @macro classname {n} @cindex @code{\n\} class @code{\n\} class @end macro @macro methodname {n} @cindex @code{\n\} method @code{\n\} method @end macro @macro fieldname {n} @cindex @code{\n\} field @code{\n\} field @end macro @macro enumname {n} @cindex @code{\n\} enum @code{\n\} enum @end macro @macro sourcehighlightclass @classname{SourceHighlight} @end macro @macro sourcehighlight @cindex @code{source-highlight} @code{source-highlight} @end macro @macro sourcehighlightsettings @cindex @code{source-highlight-settings} @code{source-highlight-settings} @end macro @copying This manual is for GNU Source-highlight Library (version @value{VERSION}, @value{UPDATED}), which given a source file, produces a document with syntax highlighting. Copyright @copyright{} 2005-2008 Lorenzo Bettini, @value{myhomepage}. @quotation Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with the Front-Cover Texts being ``A GNU Manual,'' and with the Back-Cover Texts as in (a) below. A copy of the license is included in the section entitled ``GNU Free Documentation License.'' (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify this GNU Manual, like GNU software. Copies published by the Free Software Foundation raise funds for GNU development.'' @end quotation @end copying @dircategory C++ Libraries @direntry * Source-highlight-lib: (source-highlight-lib). Highlights contents @end direntry @titlepage @title GNU Source-highlight Library @subtitle given a source file, produces a document with syntax highlighting. @subtitle for GNU Source-highlight Version @value{VERSION} @subtitle updated on @value{UPDATED-MONTH} @author by Lorenzo Bettini, @value{myhomepage} @page @vskip 0pt plus 1filll @insertcopying @end titlepage @contents @ifnottex @node Top, Introduction, (dir), (dir) @top GNU Source-highlight Library GNU Source-highlight, given a source file, produces a document with syntax highlighting. This is Edition @value{EDITION} of the Source-highlight Library manual. This file documents GNU Source-highlight Library version @value{VERSION}. @insertcopying @end ifnottex @c All the nodes can be updated using the EMACS command @c texinfo-every-node-update, which is normally bound to C-c C-u C-e. @c @node Top, Introduction, (dir), (dir) @c All the menus can be updated with the EMACS command @c texinfo-all-menus-update, which is normally bound to C-c C-u C-a. @menu * Introduction:: What's it for? * Installation:: * Use of GNU Source-highlight Library:: * Main Classes:: * Global instances:: * Problems:: Reporting bugs. * Mailing Lists:: * Concept Index:: Index of concepts. @end menu @node Introduction, Installation, Top, Top @chapter Introduction @cindex introduction @cindex features GNU Source-highlight, given a source file, produces a document with syntax highlighting. @inforef{Introduction,,source-highlight} for a wider introduction about GNU Source-highlight. This file documents the Library provided by GNU Source-highlight, thus its audience is programmers only, who want to use source-highlight features inside their programs, not the users of Source-highlight. This library is part of GNU Source-highlight since version 3.0. However, the main principles of GNU Source-highlight will be given for granted, together with all the notions for writing language definition files, output definition files, and so on. Again, we refer to the documentation of GNU Source-highlight for all these features. @node Installation, Use of GNU Source-highlight Library, Introduction, Top @chapter Installation GNU Source-highlight library is part of GNU Source-highlight, thus it will be installed together with Source-highlight itself; we refer to @inforef{Installation,,source-highlight} for further instructions on installing GNU Source-highlight. Here we detail only the parts concerning the library. @cindex @code{--with-doxygen} @cindex doxygen If you want to build and install the API documentation of Source-highlight library, you need to run @code{configure} with the option @code{--with-doxygen}, but you need the program @emph{Doxygen}, @url{http://www.doxygen.org}, to build the documentation. The documentation will be installed in the following directory: @table @code @item Library API documentation @code{prefix/share/doc/source-highlight/api} @item library examples @code{prefix/share/doc/source-highlight/examples} @item conf files @code{prefix/share/source-highlight} @end table @node Use of GNU Source-highlight Library, Main Classes, Installation, Top @chapter Use of GNU Source-highlight Library @cindex libsource-highlight You can use GNU Source-highlight library in your programs, by including its headers and linking to the file @file{libsource-highlight}.ext@footnote{The extension of course depends on the library being shared or static, e.g., @code{.so}, @code{.la}, @code{.a}, and on the system}. @cindex namespace @cindex headers All the classes of the library are part of the namespace @code{srchilite}, and all the header files are in the subdirectory @code{srchilite}. @menu * Using Automake and Autotools:: @end menu @node Using Automake and Autotools, , Use of GNU Source-highlight Library, Use of GNU Source-highlight Library @section Using Automake and Autotools @cindex autotools @cindex pkg-config The easiest way to use GNU Source-highlight library in your program is to rely on autotools, i.e., @emph{Automake}, @emph{Autoconf}, etc. In particular, the library is installed with a @code{pkg-config}@footnote{@url{http://pkg-config.freedesktop.org}.} configuration file (metadata file), @file{source-highlight.pc}. pkg-config is a tool for helping compiling applications and libraries. It helps you insert the correct compiler options on the command line so an application can use @value{srchilitelib} simply by running @example gcc -o test test.c `pkg-config --libs --cflags source-highlight` @end example @noindent rather than hard-coding values on where to find the library. Moreover, this will provide also with the correct compiler flags and libraries used by @value{srchilitelib} itself, e.g., Boost Regex library. @cindex @code{PKG_CONFIG_PATH} Note that @code{pkg-config} searches for @file{.pc} files in its standard directories. If you installed the library in a non standard directory, you'll need to set the @code{PKG_CONFIG_PATH} environment variable accordingly. For instance, if I install the library into @code{/usr/local/lib}, the @file{.pc} file will be installed into @code{/usr/local/lib/pkgconfig}, and then I'll need to call @code{pkg-config} as follows: @example PKG_CONFIG_PATH=/usr/local/lib/pkgconfig \ pkg-config --libs --cflags source-highlight @end example In your @file{configure.ac} you can use the autoconf macro provided by @code{pkg-config}; here is an example: @example # Checks for libraries. PKG_CHECK_MODULES(SRCHILITE, [source-highlight >= 3.0]) AC_SUBST(SRCHILITE_CFLAGS) AC_SUBST(SRCHILITE_LIBS) @end example Then, you can use the variables @code{SRCHILITE_CFLAGS} and @code{SRCHILITE_LIBS} in your makefiles accordingly. For instance, @example ... AM_CPPFLAGS = $(SRCHILITE_CFLAGS) ... LDADD = $(SRCHILITE_LIBS) ... @end example @node Main Classes, Global instances, Use of GNU Source-highlight Library, Top @chapter Main Classes Here we present the main classes of the @value{srchilitelib}, together with some example of use. For the documentation of all the classes (and methods of the classes) we refer to the generated API documentation (see @xref{Installation}). You will note that often, methods and constructors of the classes of the libraries do not take a pointer or a reference to a class, say @code{MyClass}, but an object of type @code{MyClassPtr}; these are @cindex shared pointers @emph{shared pointers}, in particular the ones provided by the Boost libraries (they are typedefs using, e.g., @code{boost::shared_ptr<MyClass>}). This will avoid dangerous dangling pointers and possible memory leaks in the library. If on the contrary, a method or a constructor in a class of the library takes a standard pointer, say @code{MyClass *}, then that class will NEVER delete such pointer. It is up to the actual owner the object of @code{MyClass *} to delete the object when it is not needed anymore. The classes of the libraries can raise exceptions if errors are encountered (e.g., an input file cannot be opened, or a language definition file cannot be parsed); the exception classes can be found in the API documentation, and all exception classes inherit from @classname{std::exception}. @menu * SourceHighlight class:: * Customizing Formatting:: * Events and Listeners:: * Settings:: * Utility functions:: @end menu @node SourceHighlight class, Customizing Formatting, Main Classes, Main Classes @section SourceHighlight class The @sourcehighlightclass{} is the class of the library that basically implements all the functionalities used by the program @sourcehighlight{} itself; thus it highlights an input file generating an output file. It can be configured with many options, and basically it has a get/set methods for all the command line options of @sourcehighlight{} (we refer also to @inforef{Invoking source-highlight,,source-highlight}). For instance, the following example (@file{source-highlight-console-main.cpp}) highlights an input file to the console (the colors are obtained through ANSI color escape sequences (so you need a console program that supports this): @include source-highlight-console-main.cpp.texinfo Note that if a file name is passed at the command line, the program tries to detect the source language by using a @classname{LangMap} object, specifying the map file @file{lang.map}, which is the one mapping file extensions to language definition files (e.g., if the file name has extension @file{.java} it will use the corresponding @file{java.lang}). Otherwise we assume that we want to highlight a C++ file. All the highlighting is performed by the @methodname{highlight}; since we don't specify an output file name it will output the highlighted result directly to the console. In case we don't have an input filename either, @methodname{highlight} will read from the standard input. Since the highlighting takes place one line per time, you can test the program this way: you'll enter a line on the console and when you press enter, the program will echo the same line highlighted. The @code{DATADIR} is not even mandatory, provided you installed Source-highlight correctly, or that you set it up, using @sourcehighlightsettings{} program. @node Customizing Formatting, Events and Listeners, SourceHighlight class, Main Classes @section Customizing Formatting The formatting of @value{srchilitelib}, i.e., how to actually perform the highlighting, or what to do when we need to highlight something, can be completely customized; the library detects (using regular expressions based on language definition files) that something must be highlighted as, say, a keyword, and you can then do whatever you want with this information. The default formatting strategy is to output an highlighted text using a specific formatting format, but you're free to do whatever you like, if you want. This formatting abstraction is done through @classname{Formatter}, which basically declares only the abstract @methodname{format} which takes as parameters the string to format, and further (possibly empty) additional parameters, implemented by @classname{FormatterParams}. Note that the @methodname{format} does not get as an argument how the passed string must be formatted (e.g., as a keyword, as a type, etc.); this information must be stored in the formatter from the start. Indeed, the mapping between a language element and a formatter is performed by @classname{FormatterManager}. An object of this class must be created by specifying a default formatter object, that will be used when the formatter manager will be queried for a formatter for a specific language element that it is not able to handle (in this it will fall back by returning the default formatter). @menu * Completely Customized Formatting:: * Style-based Customized Formatting:: @end menu @node Completely Customized Formatting, Style-based Customized Formatting, Customizing Formatting, Customizing Formatting @subsection Completely Customized Formatting You can implement a completely customized formatting strategy. For instance, this is a customized formatter (@file{infoformatter.h}) which, when requested to format a string, it simply writes this information specifying which kind of language element it is, and the position in the line (the @fieldname{start} in @classname{FormatterParams}). Note that the language element is stored in a field of the class, and it is set at object creation time. We avoid to write anything if we are requested to format something as @code{"normal"}, or if the string to format is empty. @include infoformatter.h.texinfo For convenience we also declare a typedef for the shared pointer (since the formatter manager takes only shared pointers to formatters). In order to customize the formatting, there are some more steps to do, and in particular, you cannot use @classname{SourceHighlight} anymore but you need to use more classes. First of all, you need @classname{LangDefManager} which takes care of building the regular expressions starting from a language definition file; in order to do this it uses a @classname{HighlightRuleFactory} object; for the moment, only the implementation based on boost regular expression exists, so you can simply pass an object of @classname{RegexRuleFactory}. Once you have an object of @classname{LangDefManager}, you can use the @methodname{getHighlightState} to build the @cind{automaton} to perform the highlight (in particular the initial state of such automaton, of @classname{HighlightState}), and you should pass this to an object that can use the automaton to perform the highlighting. To do this, you can use @classname{SourceHighlighter} whose objects can be used to highlight a line of text, using @methodname{highlightParagraph}. You can then create a @classname{FormatterManager} object and populate it with your formatters and set it to the @classname{SourceHighlighter} object. The following example (@file{infoformatter-main.cpp}) shows how to perform these steps; note that we can share the same formatter for different language elements: @include infoformatter-main.cpp.texinfo Note that, since we highlight a line a time, we must reset the @fieldname{start} each time we start to examine a new line. For simplicity this example highlights only C++ code and reads directly from the standard input and writes to the standard output. This is a run of the example reading from the standard input (so each time you insert a line you get the output of your formatters): @example // this is a comment comment: //, start: 0 comment: this is a comment, start: 2 #include <foobar.h> preproc: #include, start: 0 string: <foobar.h>, start: 9 int abc = 100 + 5; keyword: int, start: 0 symbol: =, start: 8 number: 100, start: 10 symbol: +, start: 14 number: 5, start: 16 symbol: ;, start: 17 @end example @node Style-based Customized Formatting, , Completely Customized Formatting, Customizing Formatting @subsection Style-based Customized Formatting Source-highlight can rely on style (and css style) files for generating formatting. Usually, the formatters are built according to the output format, specified through @file{.outlang} files, @inforef{Output Language Definitions,,source-highlight}. However, you can also create your own formatters based on the information of the style file (or css style file). During the parsing of these style files, a @classname{FormatterFactory} object is used by the library, and you can provide a customized factory (the one that is used by the library is @classname{TextStyleFormatterFactory}). The only abstract method of @classname{FormatterFactory} is @methodname{createFormatter}. In order to parse a style file, you can use the static methods of the @classname{StyleFileParser}, which require the file name of the style file (and possibly the path to search for the style file, otherwise the default one is used), the factory to create formatters, and a reference to a string where the document background color will be stored. The methods are @methodname{parseStyleFile} and @methodname{parseCssStyleFile}. For instance, let's create a customized formatter @file{styleformatter.h} that simply prints how a language element will be formatted (but no formatting will take place); for the sake of simplicity we will use only public fields: @include styleformatter.h.texinfo Now, we create a customized factory (file @file{styleformatterfactory.h}), implementing the method @methodname{createFormatter}. Note that the base class @classname{FormatterFactory} does not provide any means to store the created formatters, so it's up to the derived classes to store the created formatters somewhere: @include styleformatterfactory.h.texinfo The @methodname{createFormatter} will be called when parsing a style file to create a formatter corresponding to a specific language element; this method should return false if the creation of a formatter failed (e.g., in this case, if a formatter for a given element had already been created). The method is passed the language element name, the colors for the element as specified in the style file (that can be empty if no color was specified), and a @enumname{StyleConstants} shared pointer with formatting informations such as, boldface, italics, etc. The factory can use this information to create the customized formatter. Now, we can use this customized formatter factory in our program (file @file{styleformatter-main.cpp}): @include styleformatter-main.cpp.texinfo Note that, once we created all the formatters with our factory (while parsing the style file @file{default.style}), we still need to manually set these formatters in the @classname{FormatterManager} object used by our highlighter. For simplicity this example highlights only C++ code and reads directly from the standard input and writes to the standard output. This is a run of the example reading from the standard input (so each time you insert a line you get the output of your formatters): @example /// my class TODO: nothing special comment: "///" formatted as: italic color: brown comment: " my class " formatted as: italic color: brown todo: "TODO:" formatted as: bold bgcolor: cyan comment: " nothing special" formatted as: italic color: brown #include <foobar.h> preproc: "#include" formatted as: bold color: darkblue string: "<foobar.h>" formatted as: color: red @end example @node Events and Listeners, Settings, Customizing Formatting, Main Classes @section Events and Listeners During the highlighting (and regular expression matching) the library generates events that can be ``listened'' by using a customized event listener. An event is represented by an object of @classname{HighlightEvent}, which stores the @classname{HighlightToken} object and the type (an @enumname{HighlightEventType}) of the event. A customized listener can be implemented by deriving from @classname{HighlightEventListener} and by defining the virtual method @methodname{notify}, which, of course, takes an @classname{HighlightEvent} object as parameter. For instance, @sourcehighlight{} implements the debugging functionalities by using a customized listener, @classname{DebugListener}, whose method implementation we report here as an example: @include debuglistener.cpp.texinfo @node Settings, Utility functions, Events and Listeners, Main Classes @section Settings @value{srchilitelib} reads language map files, language definition files, output format definitions, styles, and other files it needs during the execution from a specific directory, which we call @cindex data dir @emph{data dir}; the library comes with an hardcoded value for this path, which is based on the @code{--prefix} value specified at configuration time (in particular, it is @code{prefix/share/source-highlight}). In particular, the user can set the value also with the environment variable @cindex @code{SOURCE_HIGHLIGHT_DATADIR} @code{SOURCE_HIGHLIGHT_DATADIR} (see also the program @sourcehighlightsettings{} which can store settings in a configuration file of the user's home, @inforef{The program source-highlight-settings,,source-highlight}). When running the program @sourcehighlight{} this value can be overridden with the command line option @code{--data-dir} (@inforef{Configuration files,,source-highlight}). When using the @value{srchilitelib} from a program, one might need to change the value for data dir, dynamically, and in a consistent way, i.e., to have a static and single point where this setting can be set and retrieved. Note that for the moment, the only setting you can manage is the value of data dir. The library provides the @classname{Settings} for this purpose. Although you can create objects of this class to mainuplate, check and save settings (you may want to look at the source code of the program @sourcehighlightsettings{}), you probably only need the static methods of this class. You can set the global value of data dir with the @methodname{setGlobalDataDir}. The @methodname{retrieveDataDir} retrieves the value for the data dir. If the global value was set with @methodname{setGlobalDataDir} then always returns this global value. Otherwise, it returns the value of the environment variable @cindex @code{SOURCE_HIGHLIGHT_DATADIR} @code{SOURCE_HIGHLIGHT_DATADIR} if set. Otherwise, it returns the value read from the configuration file. If also the reading of configuration file fails, then it returns the hardcoded value. @node Utility functions, , Settings, Main Classes @section Utility functions If you need to get a list of all the files in the data dir with a specific role (e.g., language definition files, style files, etc.) you can use the static methods of the @classname{SourceHighlightUtils}, which will take care of using the data dir specified in the settings (@ref{Settings}). @node Global instances, Problems, Main Classes, Top @section Global instances The @classname{Instances} provides access to static instances of some classes that can be used, e.g., to read a language definition file and create the @cind{automaton} for the highlighting, using @classname{LangDefManager}, or to access the map of language definition files, using @classname{LangMap}. This class ensures that these instances use the global settings; in particular, if you change the global settings, you should call the static @methodname{reload}, so that the instances are updated. Using these instances also makes the use of some classes easier; for instance, the beginning part of the @code{main} of the examples shown in @ref{Customizing Formatting} can be written as follows: @include instances_example.cpp.texinfo If you know that you will not use these instances anymore in your application, and it is crucial to recover all the memory used by these instances, you then need to call the static @methodname{unload}, and the memory of these instances will be released. @node Problems, Mailing Lists, Global instances, Top @chapter Reporting Bugs @cindex bugs @cindex problems If you find a bug in @command{source-highlight}, please send electronic mail to @code{bug-source-highlight at gnu dot org} Include the version number, which you can find by running @w{@samp{source-highlight --version}}. Also include in your message the output that the program produced and the output you expected.@refill If you have other questions, comments or suggestions about @command{source-highlight}, contact the author via electronic mail (find the address at @value{myhomepage}). The author will try to help you out, although he may not have time to fix your problems. @node Mailing Lists, Concept Index, Problems, Top @chapter Mailing Lists @cindex mailing list The following mailing lists are available: @code{help-source-highlight at gnu dot org} for generic discussions about the program and for asking for help about it (open mailing list), @uref{http://mail.gnu.org/mailman/listinfo/help-source-highlight} @code{info-source-highlight at gnu dot org} for receiving information about new releases and features (read-only mailing list), @uref{http://mail.gnu.org/mailman/listinfo/info-source-highlight}. If you want to subscribe to a mailing list just go to the URL and follow the instructions, or send me an e-mail and I'll subscribe you. I'll describe new features in new releases also in my blog, at this URL: @uref{http://tronprog.blogspot.com/search/label/source-highlight} @node Concept Index, , Mailing Lists, Top @unnumbered Concept Index @cindex tail recursion @printindex cp @shortcontents @bye ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/mono.css�����������������������������������������������������������������0000644�0001750�0001750�00000000453�11672675562�014161� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������BODY { font-weight: normal; background-color: white; } .keyword { color: black; font-weight: bold; text-decoration: underline; } .type { color: black; font-weight: bold; } .string { color: gray; } .comment { color: silver; font-style: italic; } .number { color: black; } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/comment-show2.show.texinfo�����������������������������������������������0000664�0001750�0001750�00000001430�11675045061�017540� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@c Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite @example STATE 1 default: normal rule (comment) "/\*\*" (exit level: 0, next: 2) STATE 2 default: comment rule (comment) "\*/" (exit level: 1, next: 0) rule (comment) "/\*\*" (exit level: 0, next: 0, nested) rule (type) "(?:\@@[[:alpha:]]+)" (exit level: 0, next: 0) rule (todo) "(?:(?:TODO|FIXME)(?:[:]?))" (exit level: 0, next: 0) rule (regexp) "(?:([^[:alnum:]]).*(\1))" (exit level: 0, next: 0) rule (string) "<(?:[^<>])*>" (exit level: 0, next: 0) rule (string2) "<<" (exit level: 0, next: 3) STATE 3 default: string2 rule (string2) ">>" (exit level: 1, next: 0) rule (paren normal paren) "(\[)(.*)(\])" (exit level: 0, next: 0) @end example����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/txt2texinfo.txt.texinfo��������������������������������������������������0000664�0001750�0001750�00000000707�11675045062�017202� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@c Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite @example For instance, in this Texinfo manual, if I want to insert a @@@@ or a @@@{ I have to ``escape'' them to make them appear literally since they have a special meaning in Texinfo. The same holds, e.g., for @@code@{<@}, @@code@{>@} or @@code@{&@} in HTML. If you use source-highlight, it will take care of this, automatically for you. @end example���������������������������������������������������������source-highlight-3.1.6/doc/outlang-list.texinfo�����������������������������������������������������0000664�0001750�0001750�00000000546�11676050501�016504� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������docbook = docbook.outlang esc = esc.outlang html = html.outlang html-css = htmlcss.outlang htmltable = htmltable.outlang javadoc = javadoc.outlang latex = latex.outlang latexcolor = latexcolor.outlang mediawiki = mediawiki.outlang odf = odf.outlang texinfo = texinfo.outlang xhtml = xhtml.outlang xhtml-css = xhtmlcss.outlang xhtmltable = xhtmltable.outlang ����������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/clike_vardeclaration.lang.texinfo����������������������������������������0000664�0001750�0001750�00000000470�11675045060�021146� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@c Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite @example (@t{@i{usertype}},@t{@i{usertype}},@t{@i{normal}}) = @t{`([[:alpha:]_](?:[^[:punct:][:space:]]|[_])*)} @t{((?:<.*>)?)} @t{(\s+(?=[*&]*[[:alpha:]_][^[:punct:][:space:]]*\s*[[:punct:]\[\]]+))`} @end example��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/source-highlight-lib.html������������������������������������������������0000664�0001750�0001750�00000177423�11675377360�017412� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<html lang="en"> <head> <title>GNU Source-highlight Library 3.1.6</title> <meta http-equiv="Content-Type" content="text/html"> <meta name="description" content="GNU Source-highlight Library 3.1.6"> <meta name="generator" content="makeinfo 4.13"> <link title="Top" rel="top" href="#Top"> <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> <!-- This manual is for GNU Source-highlight Library (version 3.1.6, 16 December 2011), which given a source file, produces a document with syntax highlighting. Copyright (C) 2005-2008 Lorenzo Bettini, `http://www.lorenzobettini.it'. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with the Front-Cover Texts being "A GNU Manual," and with the Back-Cover Texts as in (a) below. A copy of the license is included in the section entitled "GNU Free Documentation License." (a) The FSF's Back-Cover Text is: "You have freedom to copy and modify this GNU Manual, like GNU software. Copies published by the Free Software Foundation raise funds for GNU development." --> <meta http-equiv="Content-Style-Type" content="text/css"> <style type="text/css"><!-- pre.display { font-family:inherit } pre.format { font-family:inherit } pre.smalldisplay { font-family:inherit; font-size:smaller } pre.smallformat { font-family:inherit; font-size:smaller } pre.smallexample { font-size:smaller } pre.smalllisp { font-size:smaller } span.sc { font-variant:small-caps } span.roman { font-family:serif; font-weight:normal; } span.sansserif { font-family:sans-serif; font-weight:normal; } --></style> </head> <body> <h1 class="settitle">GNU Source-highlight Library 3.1.6</h1> <div class="contents"> <h2>Table of Contents</h2> <ul> <li><a name="toc_Top" href="#Top">GNU Source-highlight Library</a> <li><a name="toc_Introduction" href="#Introduction">1 Introduction</a> <li><a name="toc_Installation" href="#Installation">2 Installation</a> <li><a name="toc_Use-of-GNU-Source_002dhighlight-Library" href="#Use-of-GNU-Source_002dhighlight-Library">3 Use of GNU Source-highlight Library</a> <ul> <li><a href="#Using-Automake-and-Autotools">3.1 Using Automake and Autotools</a> </li></ul> <li><a name="toc_Main-Classes" href="#Main-Classes">4 Main Classes</a> <ul> <li><a href="#SourceHighlight-class">4.1 SourceHighlight class</a> <li><a href="#Customizing-Formatting">4.2 Customizing Formatting</a> <ul> <li><a href="#Completely-Customized-Formatting">4.2.1 Completely Customized Formatting</a> <li><a href="#Style_002dbased-Customized-Formatting">4.2.2 Style-based Customized Formatting</a> </li></ul> <li><a href="#Events-and-Listeners">4.3 Events and Listeners</a> <li><a href="#Settings">4.4 Settings</a> <li><a href="#Utility-functions">4.5 Utility functions</a> <li><a href="#Global-instances">4.6 Global instances</a> </li></ul> <li><a name="toc_Problems" href="#Problems">5 Reporting Bugs</a> <li><a name="toc_Mailing-Lists" href="#Mailing-Lists">6 Mailing Lists</a> <li><a name="toc_Concept-Index" href="#Concept-Index">Concept Index</a> </li></ul> </div> <div class="node"> <a name="Top"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#Introduction">Introduction</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#dir">(dir)</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#dir">(dir)</a> </div> <h2 class="unnumbered">GNU Source-highlight Library</h2> <p>GNU Source-highlight, given a source file, produces a document with syntax highlighting. <p>This is Edition 3.1.6 of the Source-highlight Library manual. <p>This file documents GNU Source-highlight Library version 3.1.6. <p>This manual is for GNU Source-highlight Library (version 3.1.6, 16 December 2011), which given a source file, produces a document with syntax highlighting. <p>Copyright &copy; 2005-2008 Lorenzo Bettini, <a href="http://www.lorenzobettini.it">http://www.lorenzobettini.it</a>. <blockquote> Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with the Front-Cover Texts being &ldquo;A GNU Manual,&rdquo; and with the Back-Cover Texts as in (a) below. A copy of the license is included in the section entitled &ldquo;GNU Free Documentation License.&rdquo; <p>(a) The FSF's Back-Cover Text is: &ldquo;You have freedom to copy and modify this GNU Manual, like GNU software. Copies published by the Free Software Foundation raise funds for GNU development.&rdquo; </blockquote> <!-- All the nodes can be updated using the EMACS command --> <!-- texinfo-every-node-update, which is normally bound to C-c C-u C-e. --> <!-- @node Top, Introduction, (dir), (dir) --> <!-- All the menus can be updated with the EMACS command --> <!-- texinfo-all-menus-update, which is normally bound to C-c C-u C-a. --> <ul class="menu"> <li><a accesskey="1" href="#Introduction">Introduction</a>: What's it for? <li><a accesskey="2" href="#Installation">Installation</a> <li><a accesskey="3" href="#Use-of-GNU-Source_002dhighlight-Library">Use of GNU Source-highlight Library</a> <li><a accesskey="4" href="#Main-Classes">Main Classes</a> <li><a accesskey="5" href="#Global-instances">Global instances</a> <li><a accesskey="6" href="#Problems">Problems</a>: Reporting bugs. <li><a accesskey="7" href="#Mailing-Lists">Mailing Lists</a> <li><a accesskey="8" href="#Concept-Index">Concept Index</a>: Index of concepts. </ul> <div class="node"> <a name="Introduction"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#Installation">Installation</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#Top">Top</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a> </div> <h2 class="chapter">1 Introduction</h2> <p><a name="index-introduction-1"></a><a name="index-features-2"></a>GNU Source-highlight, given a source file, produces a document with syntax highlighting. see <a href="source-highlight.html#Introduction">Introduction</a> for a wider introduction about GNU Source-highlight. <p>This file documents the Library provided by GNU Source-highlight, thus its audience is programmers only, who want to use source-highlight features inside their programs, not the users of Source-highlight. This library is part of GNU Source-highlight since version 3.0. <p>However, the main principles of GNU Source-highlight will be given for granted, together with all the notions for writing language definition files, output definition files, and so on. Again, we refer to the documentation of GNU Source-highlight for all these features. <div class="node"> <a name="Installation"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#Use-of-GNU-Source_002dhighlight-Library">Use of GNU Source-highlight Library</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#Introduction">Introduction</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a> </div> <h2 class="chapter">2 Installation</h2> <p>GNU Source-highlight library is part of GNU Source-highlight, thus it will be installed together with Source-highlight itself; we refer to see <a href="source-highlight.html#Installation">Installation</a> for further instructions on installing GNU Source-highlight. Here we detail only the parts concerning the library. <p><a name="index-g_t_0040code_007b_002d_002dwith_002ddoxygen_007d-3"></a><a name="index-doxygen-4"></a>If you want to build and install the API documentation of Source-highlight library, you need to run <code>configure</code> with the option <code>--with-doxygen</code>, but you need the program <em>Doxygen</em>, <a href="http://www.doxygen.org">http://www.doxygen.org</a>, to build the documentation. The documentation will be installed in the following directory: <dl> <dt><code>Library API documentation</code><dd> <code>prefix/share/doc/source-highlight/api</code> <br><dt><code>library examples</code><dd> <code>prefix/share/doc/source-highlight/examples</code> <br><dt><code>conf files</code><dd> <code>prefix/share/source-highlight</code> </dl> <div class="node"> <a name="Use-of-GNU-Source-highlight-Library"></a> <a name="Use-of-GNU-Source_002dhighlight-Library"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#Main-Classes">Main Classes</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#Installation">Installation</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a> </div> <h2 class="chapter">3 Use of GNU Source-highlight Library</h2> <p><a name="index-libsource_002dhighlight-5"></a>You can use GNU Source-highlight library in your programs, by including its headers and linking to the file <samp><span class="file">libsource-highlight</span></samp>.ext<a rel="footnote" href="#fn-1" name="fnd-1"><sup>1</sup></a>. <p><a name="index-namespace-6"></a><a name="index-headers-7"></a>All the classes of the library are part of the namespace <code>srchilite</code>, and all the header files are in the subdirectory <code>srchilite</code>. <ul class="menu"> <li><a accesskey="1" href="#Using-Automake-and-Autotools">Using Automake and Autotools</a> </ul> <div class="node"> <a name="Using-Automake-and-Autotools"></a> <p><hr> Previous:&nbsp;<a rel="previous" accesskey="p" href="#Use-of-GNU-Source_002dhighlight-Library">Use of GNU Source-highlight Library</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Use-of-GNU-Source_002dhighlight-Library">Use of GNU Source-highlight Library</a> </div> <h3 class="section">3.1 Using Automake and Autotools</h3> <p><a name="index-autotools-8"></a><a name="index-pkg_002dconfig-9"></a>The easiest way to use GNU Source-highlight library in your program is to rely on autotools, i.e., <em>Automake</em>, <em>Autoconf</em>, etc. In particular, the library is installed with a <code>pkg-config</code><a rel="footnote" href="#fn-2" name="fnd-2"><sup>2</sup></a> configuration file (metadata file), <samp><span class="file">source-highlight.pc</span></samp>. <p>pkg-config is a tool for helping compiling applications and libraries. It helps you insert the correct compiler options on the command line so an application can use Source-highlight library simply by running <pre class="example"> gcc -o test test.c `pkg-config --libs --cflags source-highlight` </pre> <p class="noindent">rather than hard-coding values on where to find the library. Moreover, this will provide also with the correct compiler flags and libraries used by Source-highlight library itself, e.g., Boost Regex library. <p><a name="index-g_t_0040code_007bPKG_005fCONFIG_005fPATH_007d-10"></a>Note that <code>pkg-config</code> searches for <samp><span class="file">.pc</span></samp> files in its standard directories. If you installed the library in a non standard directory, you'll need to set the <code>PKG_CONFIG_PATH</code> environment variable accordingly. For instance, if I install the library into <code>/usr/local/lib</code>, the <samp><span class="file">.pc</span></samp> file will be installed into <code>/usr/local/lib/pkgconfig</code>, and then I'll need to call <code>pkg-config</code> as follows: <pre class="example"> PKG_CONFIG_PATH=/usr/local/lib/pkgconfig \ pkg-config --libs --cflags source-highlight </pre> <p>In your <samp><span class="file">configure.ac</span></samp> you can use the autoconf macro provided by <code>pkg-config</code>; here is an example: <pre class="example"> # Checks for libraries. PKG_CHECK_MODULES(SRCHILITE, [source-highlight &gt;= 3.0]) AC_SUBST(SRCHILITE_CFLAGS) AC_SUBST(SRCHILITE_LIBS) </pre> <p>Then, you can use the variables <code>SRCHILITE_CFLAGS</code> and <code>SRCHILITE_LIBS</code> in your makefiles accordingly. For instance, <pre class="example"> ... AM_CPPFLAGS = $(SRCHILITE_CFLAGS) ... LDADD = $(SRCHILITE_LIBS) ... </pre> <div class="node"> <a name="Main-Classes"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#Global-instances">Global instances</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#Use-of-GNU-Source_002dhighlight-Library">Use of GNU Source-highlight Library</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a> </div> <h2 class="chapter">4 Main Classes</h2> <p>Here we present the main classes of the Source-highlight library, together with some example of use. For the documentation of all the classes (and methods of the classes) we refer to the generated API documentation (see See <a href="#Installation">Installation</a>). <p>You will note that often, methods and constructors of the classes of the libraries do not take a pointer or a reference to a class, say <code>MyClass</code>, but an object of type <code>MyClassPtr</code>; these are <a name="index-shared-pointers-11"></a><em>shared pointers</em>, in particular the ones provided by the Boost libraries (they are typedefs using, e.g., <code>boost::shared_ptr&lt;MyClass&gt;</code>). This will avoid dangerous dangling pointers and possible memory leaks in the library. <p>If on the contrary, a method or a constructor in a class of the library takes a standard pointer, say <code>MyClass *</code>, then that class will NEVER delete such pointer. It is up to the actual owner the object of <code>MyClass *</code> to delete the object when it is not needed anymore. <p>The classes of the libraries can raise exceptions if errors are encountered (e.g., an input file cannot be opened, or a language definition file cannot be parsed); the exception classes can be found in the API documentation, and all exception classes inherit from <a name="index-g_t_0040code_007bstd_003a_003aexception_007d-class-12"></a><code>std::exception</code> class. <ul class="menu"> <li><a accesskey="1" href="#SourceHighlight-class">SourceHighlight class</a> <li><a accesskey="2" href="#Customizing-Formatting">Customizing Formatting</a> <li><a accesskey="3" href="#Events-and-Listeners">Events and Listeners</a> <li><a accesskey="4" href="#Settings">Settings</a> <li><a accesskey="5" href="#Utility-functions">Utility functions</a> </ul> <div class="node"> <a name="SourceHighlight-class"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#Customizing-Formatting">Customizing Formatting</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#Main-Classes">Main Classes</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Main-Classes">Main Classes</a> </div> <h3 class="section">4.1 SourceHighlight class</h3> <p>The <a name="index-g_t_0040code_007bSourceHighlight_007d-class-13"></a><code>SourceHighlight</code> class is the class of the library that basically implements all the functionalities used by the program <a name="index-g_t_0040code_007bsource_002dhighlight_007d-14"></a><code>source-highlight</code> itself; thus it highlights an input file generating an output file. It can be configured with many options, and basically it has a get/set methods for all the command line options of <a name="index-g_t_0040code_007bsource_002dhighlight_007d-15"></a><code>source-highlight</code> (we refer also to see <a href="source-highlight.html#Invoking-source_002dhighlight">Invoking source-highlight</a>). <p>For instance, the following example (<samp><span class="file">source-highlight-console-main.cpp</span></samp>) highlights an input file to the console (the colors are obtained through ANSI color escape sequences (so you need a console program that supports this): <!-- Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite --> <pre class="example"> <b>#include</b> <tt>&lt;iostream&gt;</tt> <b>#include</b> <tt>"srchilite/sourcehighlight.h"</tt> <b>#include</b> <tt>"srchilite/langmap.h"</tt> <b>using</b> <b>namespace</b> std; <b>#ifndef</b> DATADIR <b>#define</b> DATADIR <tt>""</tt> <b>#endif</b> <b>int</b> main(<b>int</b> argc, <b>char</b> *argv[]) { <i>// we highlight to the console, through ANSI escape sequences</i> srchilite::SourceHighlight sourceHighlight(<tt>"esc.outlang"</tt>); <i>// make sure we find the .lang and .outlang files</i> sourceHighlight.setDataDir(DATADIR); <i>// by default we highlight C++ code</i> string inputLang = <tt>"cpp.lang"</tt>; <b>if</b> (argc &gt; 1) { <i>// we have a file name so we detect the input source language</i> srchilite::LangMap langMap(DATADIR, <tt>"lang.map"</tt>); string lang = langMap.getMappedFileNameFromFileName(argv[1]); <b>if</b> (lang != <tt>""</tt>) { inputLang = lang; } <i>// otherwise we default to C++</i> <i>// output file name is empty =&gt; cout</i> sourceHighlight.highlight(argv[1], <tt>""</tt>, inputLang); } <b>else</b> { <i>// input file name is empty =&gt; cin</i> sourceHighlight.highlight(<tt>""</tt>, <tt>""</tt>, inputLang); } <b>return</b> 0; } </pre> <p>Note that if a file name is passed at the command line, the program tries to detect the source language by using a <a name="index-g_t_0040code_007bLangMap_007d-class-16"></a><code>LangMap</code> class object, specifying the map file <samp><span class="file">lang.map</span></samp>, which is the one mapping file extensions to language definition files (e.g., if the file name has extension <samp><span class="file">.java</span></samp> it will use the corresponding <samp><span class="file">java.lang</span></samp>). Otherwise we assume that we want to highlight a C++ file. <p>All the highlighting is performed by the <a name="index-g_t_0040code_007bhighlight_007d-method-17"></a><code>highlight</code> method; since we don't specify an output file name it will output the highlighted result directly to the console. In case we don't have an input filename either, <a name="index-g_t_0040code_007bhighlight_007d-method-18"></a><code>highlight</code> method will read from the standard input. Since the highlighting takes place one line per time, you can test the program this way: you'll enter a line on the console and when you press enter, the program will echo the same line highlighted. <p>The <code>DATADIR</code> is not even mandatory, provided you installed Source-highlight correctly, or that you set it up, using <a name="index-g_t_0040code_007bsource_002dhighlight_002dsettings_007d-19"></a><code>source-highlight-settings</code> program. <div class="node"> <a name="Customizing-Formatting"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#Events-and-Listeners">Events and Listeners</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#SourceHighlight-class">SourceHighlight class</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Main-Classes">Main Classes</a> </div> <h3 class="section">4.2 Customizing Formatting</h3> <p>The formatting of Source-highlight library, i.e., how to actually perform the highlighting, or what to do when we need to highlight something, can be completely customized; the library detects (using regular expressions based on language definition files) that something must be highlighted as, say, a keyword, and you can then do whatever you want with this information. The default formatting strategy is to output an highlighted text using a specific formatting format, but you're free to do whatever you like, if you want. <p>This formatting abstraction is done through <a name="index-g_t_0040code_007bFormatter_007d-class-20"></a><code>Formatter</code> class, which basically declares only the abstract <a name="index-g_t_0040code_007bformat_007d-method-21"></a><code>format</code> method which takes as parameters the string to format, and further (possibly empty) additional parameters, implemented by <a name="index-g_t_0040code_007bFormatterParams_007d-class-22"></a><code>FormatterParams</code> class. Note that the <a name="index-g_t_0040code_007bformat_007d-method-23"></a><code>format</code> method does not get as an argument how the passed string must be formatted (e.g., as a keyword, as a type, etc.); this information must be stored in the formatter from the start. Indeed, the mapping between a language element and a formatter is performed by <a name="index-g_t_0040code_007bFormatterManager_007d-class-24"></a><code>FormatterManager</code> class. An object of this class must be created by specifying a default formatter object, that will be used when the formatter manager will be queried for a formatter for a specific language element that it is not able to handle (in this it will fall back by returning the default formatter). <ul class="menu"> <li><a accesskey="1" href="#Completely-Customized-Formatting">Completely Customized Formatting</a> <li><a accesskey="2" href="#Style_002dbased-Customized-Formatting">Style-based Customized Formatting</a> </ul> <div class="node"> <a name="Completely-Customized-Formatting"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#Style_002dbased-Customized-Formatting">Style-based Customized Formatting</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#Customizing-Formatting">Customizing Formatting</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Customizing-Formatting">Customizing Formatting</a> </div> <h4 class="subsection">4.2.1 Completely Customized Formatting</h4> <p>You can implement a completely customized formatting strategy. For instance, this is a customized formatter (<samp><span class="file">infoformatter.h</span></samp>) which, when requested to format a string, it simply writes this information specifying which kind of language element it is, and the position in the line (the <a name="index-g_t_0040code_007bstart_007d-field-25"></a><code>start</code> field in <a name="index-g_t_0040code_007bFormatterParams_007d-class-26"></a><code>FormatterParams</code> class). Note that the language element is stored in a field of the class, and it is set at object creation time. We avoid to write anything if we are requested to format something as <code>"normal"</code>, or if the string to format is empty. <!-- Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite --> <pre class="example"> <b>class</b> InfoFormatter: <b>public</b> srchilite::Formatter { <i>/// the language element represented by this formatter</i> std::string elem; <b>public</b>: InfoFormatter(<b>const</b> std::string &amp;elem_ = <tt>"normal"</tt>) : elem(elem_) { } <b>virtual</b> <b>void</b> format(<b>const</b> std::string &amp;s, <b>const</b> srchilite::FormatterParams *params = 0) { <i>// do not print anything if normal or string to format is empty</i> <b>if</b> (elem != <tt>"normal"</tt> || !s.size()) { std::cout &lt;&lt; elem &lt;&lt; <tt>": "</tt> &lt;&lt; s; <b>if</b> (params) std::cout &lt;&lt; <tt>", start: "</tt> &lt;&lt; params-&gt;start; std::cout &lt;&lt; std::endl; } } }; <i>/// shared pointer for InfoFormatter</i> <b>typedef</b> boost::shared_ptr&lt;InfoFormatter&gt; InfoFormatterPtr; </pre> <p>For convenience we also declare a typedef for the shared pointer (since the formatter manager takes only shared pointers to formatters). <p>In order to customize the formatting, there are some more steps to do, and in particular, you cannot use <a name="index-g_t_0040code_007bSourceHighlight_007d-class-27"></a><code>SourceHighlight</code> class anymore but you need to use more classes. <p>First of all, you need <a name="index-g_t_0040code_007bLangDefManager_007d-class-28"></a><code>LangDefManager</code> class which takes care of building the regular expressions starting from a language definition file; in order to do this it uses a <a name="index-g_t_0040code_007bHighlightRuleFactory_007d-class-29"></a><code>HighlightRuleFactory</code> class object; for the moment, only the implementation based on boost regular expression exists, so you can simply pass an object of <a name="index-g_t_0040code_007bRegexRuleFactory_007d-class-30"></a><code>RegexRuleFactory</code> class. Once you have an object of <a name="index-g_t_0040code_007bLangDefManager_007d-class-31"></a><code>LangDefManager</code> class, you can use the <a name="index-g_t_0040code_007bgetHighlightState_007d-method-32"></a><code>getHighlightState</code> method to build the <a name="index-automaton-33"></a>automaton to perform the highlight (in particular the initial state of such automaton, of <a name="index-g_t_0040code_007bHighlightState_007d-class-34"></a><code>HighlightState</code> class), and you should pass this to an object that can use the automaton to perform the highlighting. To do this, you can use <a name="index-g_t_0040code_007bSourceHighlighter_007d-class-35"></a><code>SourceHighlighter</code> class whose objects can be used to highlight a line of text, using <a name="index-g_t_0040code_007bhighlightParagraph_007d-method-36"></a><code>highlightParagraph</code> method. <p>You can then create a <a name="index-g_t_0040code_007bFormatterManager_007d-class-37"></a><code>FormatterManager</code> class object and populate it with your formatters and set it to the <a name="index-g_t_0040code_007bSourceHighlighter_007d-class-38"></a><code>SourceHighlighter</code> class object. The following example (<samp><span class="file">infoformatter-main.cpp</span></samp>) shows how to perform these steps; note that we can share the same formatter for different language elements: <!-- Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite --> <pre class="example"> <b>#include</b> <tt>&lt;iostream&gt;</tt> <b>#include</b> <tt>"srchilite/langdefmanager.h"</tt> <b>#include</b> <tt>"srchilite/regexrulefactory.h"</tt> <b>#include</b> <tt>"srchilite/sourcehighlighter.h"</tt> <b>#include</b> <tt>"srchilite/formattermanager.h"</tt> <b>#include</b> <tt>"infoformatter.h"</tt> <b>using</b> <b>namespace</b> std; <b>#ifndef</b> DATADIR <b>#define</b> DATADIR <tt>""</tt> <b>#endif</b> <b>int</b> main() { srchilite::RegexRuleFactory ruleFactory; srchilite::LangDefManager langDefManager(&amp;ruleFactory); <i>// we highlight C++ code for simplicity</i> srchilite::SourceHighlighter highlighter(langDefManager.getHighlightState( DATADIR, <tt>"cpp.lang"</tt>)); srchilite::FormatterManager formatterManager(InfoFormatterPtr( <b>new</b> InfoFormatter)); InfoFormatterPtr keywordFormatter(<b>new</b> InfoFormatter(<tt>"keyword"</tt>)); formatterManager.addFormatter(<tt>"keyword"</tt>, keywordFormatter); formatterManager.addFormatter(<tt>"string"</tt>, InfoFormatterPtr(<b>new</b> InfoFormatter( <tt>"string"</tt>))); <i>// for "type" we use the same formatter as for "keyword"</i> formatterManager.addFormatter(<tt>"type"</tt>, keywordFormatter); formatterManager.addFormatter(<tt>"comment"</tt>, InfoFormatterPtr( <b>new</b> InfoFormatter(<tt>"comment"</tt>))); formatterManager.addFormatter(<tt>"symbol"</tt>, InfoFormatterPtr(<b>new</b> InfoFormatter( <tt>"symbol"</tt>))); formatterManager.addFormatter(<tt>"number"</tt>, InfoFormatterPtr(<b>new</b> InfoFormatter( <tt>"number"</tt>))); formatterManager.addFormatter(<tt>"preproc"</tt>, InfoFormatterPtr( <b>new</b> InfoFormatter(<tt>"preproc"</tt>))); highlighter.setFormatterManager(&amp;formatterManager); <i>// make sure it uses additional information</i> srchilite::FormatterParams params; highlighter.setFormatterParams(&amp;params); string line; <i>// we now highlight a line a time</i> <b>while</b> (getline(cin, line)) { <i>// reset position counter within a line</i> params.start = 0; highlighter.highlightParagraph(line); } <b>return</b> 0; } </pre> <p>Note that, since we highlight a line a time, we must reset the <a name="index-g_t_0040code_007bstart_007d-field-39"></a><code>start</code> field each time we start to examine a new line. <p>For simplicity this example highlights only C++ code and reads directly from the standard input and writes to the standard output. This is a run of the example reading from the standard input (so each time you insert a line you get the output of your formatters): <pre class="example"> // this is a comment comment: //, start: 0 comment: this is a comment, start: 2 #include &lt;foobar.h&gt; preproc: #include, start: 0 string: &lt;foobar.h&gt;, start: 9 int abc = 100 + 5; keyword: int, start: 0 symbol: =, start: 8 number: 100, start: 10 symbol: +, start: 14 number: 5, start: 16 symbol: ;, start: 17 </pre> <div class="node"> <a name="Style-based-Customized-Formatting"></a> <a name="Style_002dbased-Customized-Formatting"></a> <p><hr> Previous:&nbsp;<a rel="previous" accesskey="p" href="#Completely-Customized-Formatting">Completely Customized Formatting</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Customizing-Formatting">Customizing Formatting</a> </div> <h4 class="subsection">4.2.2 Style-based Customized Formatting</h4> <p>Source-highlight can rely on style (and css style) files for generating formatting. Usually, the formatters are built according to the output format, specified through <samp><span class="file">.outlang</span></samp> files, see <a href="source-highlight.html#Output-Language-Definitions">Output Language Definitions</a>. However, you can also create your own formatters based on the information of the style file (or css style file). During the parsing of these style files, a <a name="index-g_t_0040code_007bFormatterFactory_007d-class-40"></a><code>FormatterFactory</code> class object is used by the library, and you can provide a customized factory (the one that is used by the library is <a name="index-g_t_0040code_007bTextStyleFormatterFactory_007d-class-41"></a><code>TextStyleFormatterFactory</code> class). The only abstract method of <a name="index-g_t_0040code_007bFormatterFactory_007d-class-42"></a><code>FormatterFactory</code> class is <a name="index-g_t_0040code_007bcreateFormatter_007d-method-43"></a><code>createFormatter</code> method. <p>In order to parse a style file, you can use the static methods of the <a name="index-g_t_0040code_007bStyleFileParser_007d-class-44"></a><code>StyleFileParser</code> class, which require the file name of the style file (and possibly the path to search for the style file, otherwise the default one is used), the factory to create formatters, and a reference to a string where the document background color will be stored. The methods are <a name="index-g_t_0040code_007bparseStyleFile_007d-method-45"></a><code>parseStyleFile</code> method and <a name="index-g_t_0040code_007bparseCssStyleFile_007d-method-46"></a><code>parseCssStyleFile</code> method. <p>For instance, let's create a customized formatter <samp><span class="file">styleformatter.h</span></samp> that simply prints how a language element will be formatted (but no formatting will take place); for the sake of simplicity we will use only public fields: <!-- Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite --> <pre class="example"> <b>struct</b> StyleFormatter: <b>public</b> srchilite::Formatter { <i>/// the language element represented by this formatter</i> std::string elem; <b>bool</b> bold, italic, underline, fixed, not_fixed; std::string color; std::string bgColor; StyleFormatter(<b>const</b> std::string &amp;elem_ = <tt>"normal"</tt>) : elem(elem_), bold(<b>false</b>), italic(<b>false</b>), underline(<b>false</b>), fixed(<b>false</b>), not_fixed(<b>false</b>) { } <b>virtual</b> <b>void</b> format(<b>const</b> std::string &amp;s, <b>const</b> srchilite::FormatterParams *params = 0) { <i>// do not print anything if normal or string to format is empty</i> <b>if</b> (elem != <tt>"normal"</tt> || !s.size()) { std::cout &lt;&lt; elem &lt;&lt; <tt>": </tt>\"<tt>"</tt> &lt;&lt; s &lt;&lt; <tt>"</tt>\"<tt>"</tt> &lt;&lt; std::endl; std::cout &lt;&lt; <tt>"formatted as: "</tt> &lt;&lt; (bold ? <tt>"bold "</tt> : <tt>""</tt>) &lt;&lt; (italic ? <tt>"italic "</tt> : <tt>""</tt>) &lt;&lt; (underline ? <tt>"underline "</tt> : <tt>""</tt>); std::cout &lt;&lt; (color.size() ? <tt>"color: "</tt> + color + <tt>" "</tt> : <tt>""</tt>); std::cout &lt;&lt; (bgColor.size() ? <tt>"bgcolor: "</tt> + bgColor : <tt>""</tt>) &lt;&lt; std::endl; } } }; <i>/// shared pointer for StyleFormatter</i> <b>typedef</b> boost::shared_ptr&lt;StyleFormatter&gt; StyleFormatterPtr; </pre> <p>Now, we create a customized factory (file <samp><span class="file">styleformatterfactory.h</span></samp>), implementing the method <a name="index-g_t_0040code_007bcreateFormatter_007d-method-47"></a><code>createFormatter</code> method. Note that the base class <a name="index-g_t_0040code_007bFormatterFactory_007d-class-48"></a><code>FormatterFactory</code> class does not provide any means to store the created formatters, so it's up to the derived classes to store the created formatters somewhere: <!-- Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite --> <pre class="example"> <b>struct</b> StyleFormatterFactory: <b>public</b> srchilite::FormatterFactory { StyleFormatterMap formatterMap; <b>bool</b> hasFormatter(<b>const</b> string &amp;key) <b>const</b> { <b>return</b> formatterMap.find(key) != formatterMap.end(); } <b>bool</b> createFormatter(<b>const</b> string &amp;key, <b>const</b> string &amp;color, <b>const</b> string &amp;bgcolor, srchilite::StyleConstantsPtr styleconstants) { <b>if</b> (hasFormatter(key)) <b>return</b> <b>false</b>; StyleFormatter *formatter = <b>new</b> StyleFormatter(key); formatterMap[key] = StyleFormatterPtr(formatter); <b>if</b> (styleconstants.get()) { <b>for</b> (srchilite::StyleConstantsIterator it = styleconstants-&gt;begin(); it != styleconstants-&gt;end(); ++it) { <b>switch</b> (*it) { <b>case</b> srchilite::ISBOLD: formatter-&gt;bold = <b>true</b>; <b>break</b>; <b>case</b> srchilite::ISITALIC: formatter-&gt;italic = <b>true</b>; <b>break</b>; <b>case</b> srchilite::ISUNDERLINE: formatter-&gt;underline = <b>true</b>; <b>break</b>; <b>case</b> srchilite::ISFIXED: formatter-&gt;fixed = <b>true</b>; <b>break</b>; <b>case</b> srchilite::ISNOTFIXED: formatter-&gt;not_fixed = <b>true</b>; <b>break</b>; <b>case</b> srchilite::ISNOREF: <i>// ignore references here</i> <b>break</b>; } } } formatter-&gt;color = color; formatter-&gt;bgColor = bgcolor; <b>return</b> <b>true</b>; } }; </pre> <p>The <a name="index-g_t_0040code_007bcreateFormatter_007d-method-49"></a><code>createFormatter</code> method will be called when parsing a style file to create a formatter corresponding to a specific language element; this method should return false if the creation of a formatter failed (e.g., in this case, if a formatter for a given element had already been created). The method is passed the language element name, the colors for the element as specified in the style file (that can be empty if no color was specified), and a <a name="index-g_t_0040code_007bStyleConstants_007d-enum-50"></a><code>StyleConstants</code> enum shared pointer with formatting informations such as, boldface, italics, etc. The factory can use this information to create the customized formatter. <p>Now, we can use this customized formatter factory in our program (file <samp><span class="file">styleformatter-main.cpp</span></samp>): <!-- Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite --> <pre class="example"> <b>#include</b> <tt>&lt;iostream&gt;</tt> <b>#include</b> <tt>"srchilite/langdefmanager.h"</tt> <b>#include</b> <tt>"srchilite/regexrulefactory.h"</tt> <b>#include</b> <tt>"srchilite/sourcehighlighter.h"</tt> <b>#include</b> <tt>"srchilite/formattermanager.h"</tt> <b>#include</b> <tt>"srchilite/stylefileparser.h"</tt> <i>// for parsing style files</i> <b>#include</b> <tt>"styleformatterfactory.h"</tt> <b>using</b> <b>namespace</b> std; <b>#ifndef</b> DATADIR <b>#define</b> DATADIR <tt>""</tt> <b>#endif</b> <b>int</b> main() { srchilite::RegexRuleFactory ruleFactory; srchilite::LangDefManager langDefManager(&amp;ruleFactory); <i>// we highlight C++ code for simplicity</i> srchilite::SourceHighlighter highlighter(langDefManager.getHighlightState( DATADIR, <tt>"cpp.lang"</tt>)); <i>// our factory for our formatters</i> StyleFormatterFactory factory; <i>// the background color for the document (not used here)</i> string docBgColor; <i>// let's parse the default.style and create our formatters</i> srchilite::StyleFileParser::parseStyleFile(DATADIR, <tt>"default.style"</tt>, &amp;factory, docBgColor); <i>// now we need to fill up the formatter manager with our formatters</i> srchilite::FormatterManager formatterManager(StyleFormatterPtr( <b>new</b> StyleFormatter)); <b>for</b> (StyleFormatterMap::const_iterator it = factory.formatterMap.begin(); it != factory.formatterMap.end(); ++it) { formatterManager.addFormatter(it-&gt;first, it-&gt;second); } highlighter.setFormatterManager(&amp;formatterManager); string line; <i>// we now highlight a line a time</i> <b>while</b> (getline(cin, line)) { highlighter.highlightParagraph(line); } <b>return</b> 0; } </pre> <p>Note that, once we created all the formatters with our factory (while parsing the style file <samp><span class="file">default.style</span></samp>), we still need to manually set these formatters in the <a name="index-g_t_0040code_007bFormatterManager_007d-class-51"></a><code>FormatterManager</code> class object used by our highlighter. <p>For simplicity this example highlights only C++ code and reads directly from the standard input and writes to the standard output. This is a run of the example reading from the standard input (so each time you insert a line you get the output of your formatters): <pre class="example"> /// my class TODO: nothing special comment: "///" formatted as: italic color: brown comment: " my class " formatted as: italic color: brown todo: "TODO:" formatted as: bold bgcolor: cyan comment: " nothing special" formatted as: italic color: brown #include &lt;foobar.h&gt; preproc: "#include" formatted as: bold color: darkblue string: "&lt;foobar.h&gt;" formatted as: color: red </pre> <div class="node"> <a name="Events-and-Listeners"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#Settings">Settings</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#Customizing-Formatting">Customizing Formatting</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Main-Classes">Main Classes</a> </div> <h3 class="section">4.3 Events and Listeners</h3> <p>During the highlighting (and regular expression matching) the library generates events that can be &ldquo;listened&rdquo; by using a customized event listener. An event is represented by an object of <a name="index-g_t_0040code_007bHighlightEvent_007d-class-52"></a><code>HighlightEvent</code> class, which stores the <a name="index-g_t_0040code_007bHighlightToken_007d-class-53"></a><code>HighlightToken</code> class object and the type (an <a name="index-g_t_0040code_007bHighlightEventType_007d-enum-54"></a><code>HighlightEventType</code> enum) of the event. <p>A customized listener can be implemented by deriving from <a name="index-g_t_0040code_007bHighlightEventListener_007d-class-55"></a><code>HighlightEventListener</code> class and by defining the virtual method <a name="index-g_t_0040code_007bnotify_007d-method-56"></a><code>notify</code> method, which, of course, takes an <a name="index-g_t_0040code_007bHighlightEvent_007d-class-57"></a><code>HighlightEvent</code> class object as parameter. <p>For instance, <a name="index-g_t_0040code_007bsource_002dhighlight_007d-58"></a><code>source-highlight</code> implements the debugging functionalities by using a customized listener, <a name="index-g_t_0040code_007bDebugListener_007d-class-59"></a><code>DebugListener</code> class, whose method implementation we report here as an example: <!-- Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite --> <pre class="example"> <b>void</b> DebugListener::notify(<b>const</b> HighlightEvent &amp;event) { <b>switch</b> (event.type) { <b>case</b> HighlightEvent::FORMAT: <i>// print information about the rule</i> <b>if</b> (event.token.rule) { os &lt;&lt; event.token.rule-&gt;getAdditionalInfo() &lt;&lt; endl; os &lt;&lt; <tt>"expression: </tt>\"<tt>"</tt> &lt;&lt; event.token.rule-&gt;toString() &lt;&lt; <tt>"</tt>\"<tt>"</tt> &lt;&lt; endl; } <i>// now format the matched strings</i> <b>for</b> (MatchedElements::const_iterator it = event.token.matched.begin(); it != event.token.matched.end(); ++it) { os &lt;&lt; <tt>"formatting </tt>\"<tt>"</tt> &lt;&lt; it-&gt;second &lt;&lt; <tt>"</tt>\"<tt> as "</tt> &lt;&lt; it-&gt;first &lt;&lt; endl; } step(); <b>break</b>; <b>case</b> HighlightEvent::FORMATDEFAULT: os &lt;&lt; <tt>"formatting </tt>\"<tt>"</tt> &lt;&lt; event.token.matched.front().second &lt;&lt; <tt>"</tt>\"<tt> as default"</tt> &lt;&lt; endl; step(); <b>break</b>; <b>case</b> HighlightEvent::ENTERSTATE: os &lt;&lt; <tt>"entering state: "</tt> &lt;&lt; event.token.rule-&gt;getNextState()-&gt;getId() &lt;&lt; endl; <b>break</b>; <b>case</b> HighlightEvent::EXITSTATE: <b>int</b> level = event.token.rule-&gt;getExitLevel(); os &lt;&lt; <tt>"exiting state, level: "</tt>; <b>if</b> (level &lt; 0) os &lt;&lt; <tt>"all"</tt>; <b>else</b> os &lt;&lt; level; os &lt;&lt; endl; <b>break</b>; } } </pre> <div class="node"> <a name="Settings"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#Utility-functions">Utility functions</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#Events-and-Listeners">Events and Listeners</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Main-Classes">Main Classes</a> </div> <h3 class="section">4.4 Settings</h3> <p>Source-highlight library reads language map files, language definition files, output format definitions, styles, and other files it needs during the execution from a specific directory, which we call <a name="index-data-dir-60"></a><em>data dir</em>; the library comes with an hardcoded value for this path, which is based on the <code>--prefix</code> value specified at configuration time (in particular, it is <code>prefix/share/source-highlight</code>). In particular, the user can set the value also with the environment variable <a name="index-g_t_0040code_007bSOURCE_005fHIGHLIGHT_005fDATADIR_007d-61"></a><code>SOURCE_HIGHLIGHT_DATADIR</code> (see also the program <a name="index-g_t_0040code_007bsource_002dhighlight_002dsettings_007d-62"></a><code>source-highlight-settings</code> which can store settings in a configuration file of the user's home, see <a href="source-highlight.html#The-program-source_002dhighlight_002dsettings">The program source-highlight-settings</a>). <p>When running the program <a name="index-g_t_0040code_007bsource_002dhighlight_007d-63"></a><code>source-highlight</code> this value can be overridden with the command line option <code>--data-dir</code> (see <a href="source-highlight.html#Configuration-files">Configuration files</a>). <p>When using the Source-highlight library from a program, one might need to change the value for data dir, dynamically, and in a consistent way, i.e., to have a static and single point where this setting can be set and retrieved. Note that for the moment, the only setting you can manage is the value of data dir. <p>The library provides the <a name="index-g_t_0040code_007bSettings_007d-class-64"></a><code>Settings</code> class for this purpose. Although you can create objects of this class to mainuplate, check and save settings (you may want to look at the source code of the program <a name="index-g_t_0040code_007bsource_002dhighlight_002dsettings_007d-65"></a><code>source-highlight-settings</code>), you probably only need the static methods of this class. You can set the global value of data dir with the <a name="index-g_t_0040code_007bsetGlobalDataDir_007d-method-66"></a><code>setGlobalDataDir</code> method. The <a name="index-g_t_0040code_007bretrieveDataDir_007d-method-67"></a><code>retrieveDataDir</code> method retrieves the value for the data dir. If the global value was set with <a name="index-g_t_0040code_007bsetGlobalDataDir_007d-method-68"></a><code>setGlobalDataDir</code> method then always returns this global value. Otherwise, it returns the value of the environment variable <a name="index-g_t_0040code_007bSOURCE_005fHIGHLIGHT_005fDATADIR_007d-69"></a><code>SOURCE_HIGHLIGHT_DATADIR</code> if set. Otherwise, it returns the value read from the configuration file. If also the reading of configuration file fails, then it returns the hardcoded value. <div class="node"> <a name="Utility-functions"></a> <p><hr> Previous:&nbsp;<a rel="previous" accesskey="p" href="#Settings">Settings</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Main-Classes">Main Classes</a> </div> <h3 class="section">4.5 Utility functions</h3> <p>If you need to get a list of all the files in the data dir with a specific role (e.g., language definition files, style files, etc.) you can use the static methods of the <a name="index-g_t_0040code_007bSourceHighlightUtils_007d-class-70"></a><code>SourceHighlightUtils</code> class, which will take care of using the data dir specified in the settings (<a href="#Settings">Settings</a>). <div class="node"> <a name="Global-instances"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#Problems">Problems</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#Main-Classes">Main Classes</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a> </div> <h3 class="section">4.6 Global instances</h3> <p>The <a name="index-g_t_0040code_007bInstances_007d-class-71"></a><code>Instances</code> class provides access to static instances of some classes that can be used, e.g., to read a language definition file and create the <a name="index-automaton-72"></a>automaton for the highlighting, using <a name="index-g_t_0040code_007bLangDefManager_007d-class-73"></a><code>LangDefManager</code> class, or to access the map of language definition files, using <a name="index-g_t_0040code_007bLangMap_007d-class-74"></a><code>LangMap</code> class. This class ensures that these instances use the global settings; in particular, if you change the global settings, you should call the static <a name="index-g_t_0040code_007breload_007d-method-75"></a><code>reload</code> method, so that the instances are updated. <p>Using these instances also makes the use of some classes easier; for instance, the beginning part of the <code>main</code> of the examples shown in <a href="#Customizing-Formatting">Customizing Formatting</a> can be written as follows: <!-- Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite --> <pre class="example"> <b>#include</b> <tt>"srchilite/langdefmanager.h"</tt> <b>#include</b> <tt>"srchilite/instances.h"</tt> <b>int</b> main() { <i>// we highlight C++ code for simplicity</i> srchilite::SourceHighlighter highlighter (srchilite::Instances::getLangDefManager().getHighlightState( DATADIR, <tt>"cpp.lang"</tt>)); </pre> <p>If you know that you will not use these instances anymore in your application, and it is crucial to recover all the memory used by these instances, you then need to call the static <a name="index-g_t_0040code_007bunload_007d-method-76"></a><code>unload</code> method, and the memory of these instances will be released. <div class="node"> <a name="Problems"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#Mailing-Lists">Mailing Lists</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#Global-instances">Global instances</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a> </div> <h2 class="chapter">5 Reporting Bugs</h2> <p><a name="index-bugs-77"></a><a name="index-problems-78"></a> If you find a bug in <samp><span class="command">source-highlight</span></samp>, please send electronic mail to <p><code>bug-source-highlight at gnu dot org</code> <p>Include the version number, which you can find by running &lsquo;<samp><span class="samp">source-highlight&nbsp;--version</span></samp>&rsquo;<!-- /@w -->. Also include in your message the output that the program produced and the output you expected. <p>If you have other questions, comments or suggestions about <samp><span class="command">source-highlight</span></samp>, contact the author via electronic mail (find the address at <a href="http://www.lorenzobettini.it">http://www.lorenzobettini.it</a>). The author will try to help you out, although he may not have time to fix your problems. <div class="node"> <a name="Mailing-Lists"></a> <p><hr> Next:&nbsp;<a rel="next" accesskey="n" href="#Concept-Index">Concept Index</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="#Problems">Problems</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a> </div> <h2 class="chapter">6 Mailing Lists</h2> <p><a name="index-mailing-list-79"></a> The following mailing lists are available: <p><code>help-source-highlight at gnu dot org</code> <p>for generic discussions about the program and for asking for help about it (open mailing list), <a href="http://mail.gnu.org/mailman/listinfo/help-source-highlight">http://mail.gnu.org/mailman/listinfo/help-source-highlight</a> <p><code>info-source-highlight at gnu dot org</code> <p>for receiving information about new releases and features (read-only mailing list), <a href="http://mail.gnu.org/mailman/listinfo/info-source-highlight">http://mail.gnu.org/mailman/listinfo/info-source-highlight</a>. <p>If you want to subscribe to a mailing list just go to the URL and follow the instructions, or send me an e-mail and I'll subscribe you. <p>I'll describe new features in new releases also in my blog, at this URL: <p><a href="http://tronprog.blogspot.com/search/label/source-highlight">http://tronprog.blogspot.com/search/label/source-highlight</a> <div class="node"> <a name="Concept-Index"></a> <p><hr> Previous:&nbsp;<a rel="previous" accesskey="p" href="#Mailing-Lists">Mailing Lists</a>, Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a> </div> <h2 class="unnumbered">Concept Index</h2> <p><a name="index-tail-recursion-80"></a> <ul class="index-cp" compact> <li><a href="#index-g_t_0040code_007b_002d_002dwith_002ddoxygen_007d-3"><code>--with-doxygen</code></a>: <a href="#Installation">Installation</a></li> <li><a href="#index-automaton-72">automaton</a>: <a href="#Global-instances">Global instances</a></li> <li><a href="#index-automaton-33">automaton</a>: <a href="#Completely-Customized-Formatting">Completely Customized Formatting</a></li> <li><a href="#index-autotools-8">autotools</a>: <a href="#Using-Automake-and-Autotools">Using Automake and Autotools</a></li> <li><a href="#index-bugs-77">bugs</a>: <a href="#Problems">Problems</a></li> <li><a href="#index-g_t_0040code_007bcreateFormatter_007d-method-43"><code>createFormatter</code> method</a>: <a href="#Style_002dbased-Customized-Formatting">Style-based Customized Formatting</a></li> <li><a href="#index-data-dir-60">data dir</a>: <a href="#Settings">Settings</a></li> <li><a href="#index-g_t_0040code_007bDebugListener_007d-class-59"><code>DebugListener</code> class</a>: <a href="#Events-and-Listeners">Events and Listeners</a></li> <li><a href="#index-doxygen-4">doxygen</a>: <a href="#Installation">Installation</a></li> <li><a href="#index-features-2">features</a>: <a href="#Introduction">Introduction</a></li> <li><a href="#index-g_t_0040code_007bformat_007d-method-21"><code>format</code> method</a>: <a href="#Customizing-Formatting">Customizing Formatting</a></li> <li><a href="#index-g_t_0040code_007bFormatter_007d-class-20"><code>Formatter</code> class</a>: <a href="#Customizing-Formatting">Customizing Formatting</a></li> <li><a href="#index-g_t_0040code_007bFormatterFactory_007d-class-40"><code>FormatterFactory</code> class</a>: <a href="#Style_002dbased-Customized-Formatting">Style-based Customized Formatting</a></li> <li><a href="#index-g_t_0040code_007bFormatterManager_007d-class-51"><code>FormatterManager</code> class</a>: <a href="#Style_002dbased-Customized-Formatting">Style-based Customized Formatting</a></li> <li><a href="#index-g_t_0040code_007bFormatterManager_007d-class-37"><code>FormatterManager</code> class</a>: <a href="#Completely-Customized-Formatting">Completely Customized Formatting</a></li> <li><a href="#index-g_t_0040code_007bFormatterManager_007d-class-24"><code>FormatterManager</code> class</a>: <a href="#Customizing-Formatting">Customizing Formatting</a></li> <li><a href="#index-g_t_0040code_007bFormatterParams_007d-class-26"><code>FormatterParams</code> class</a>: <a href="#Completely-Customized-Formatting">Completely Customized Formatting</a></li> <li><a href="#index-g_t_0040code_007bFormatterParams_007d-class-22"><code>FormatterParams</code> class</a>: <a href="#Customizing-Formatting">Customizing Formatting</a></li> <li><a href="#index-g_t_0040code_007bgetHighlightState_007d-method-32"><code>getHighlightState</code> method</a>: <a href="#Completely-Customized-Formatting">Completely Customized Formatting</a></li> <li><a href="#index-headers-7">headers</a>: <a href="#Use-of-GNU-Source_002dhighlight-Library">Use of GNU Source-highlight Library</a></li> <li><a href="#index-g_t_0040code_007bhighlight_007d-method-17"><code>highlight</code> method</a>: <a href="#SourceHighlight-class">SourceHighlight class</a></li> <li><a href="#index-g_t_0040code_007bHighlightEvent_007d-class-52"><code>HighlightEvent</code> class</a>: <a href="#Events-and-Listeners">Events and Listeners</a></li> <li><a href="#index-g_t_0040code_007bHighlightEventListener_007d-class-55"><code>HighlightEventListener</code> class</a>: <a href="#Events-and-Listeners">Events and Listeners</a></li> <li><a href="#index-g_t_0040code_007bHighlightEventType_007d-enum-54"><code>HighlightEventType</code> enum</a>: <a href="#Events-and-Listeners">Events and Listeners</a></li> <li><a href="#index-g_t_0040code_007bhighlightParagraph_007d-method-36"><code>highlightParagraph</code> method</a>: <a href="#Completely-Customized-Formatting">Completely Customized Formatting</a></li> <li><a href="#index-g_t_0040code_007bHighlightRuleFactory_007d-class-29"><code>HighlightRuleFactory</code> class</a>: <a href="#Completely-Customized-Formatting">Completely Customized Formatting</a></li> <li><a href="#index-g_t_0040code_007bHighlightState_007d-class-34"><code>HighlightState</code> class</a>: <a href="#Completely-Customized-Formatting">Completely Customized Formatting</a></li> <li><a href="#index-g_t_0040code_007bHighlightToken_007d-class-53"><code>HighlightToken</code> class</a>: <a href="#Events-and-Listeners">Events and Listeners</a></li> <li><a href="#index-g_t_0040code_007bInstances_007d-class-71"><code>Instances</code> class</a>: <a href="#Global-instances">Global instances</a></li> <li><a href="#index-introduction-1">introduction</a>: <a href="#Introduction">Introduction</a></li> <li><a href="#index-g_t_0040code_007bLangDefManager_007d-class-73"><code>LangDefManager</code> class</a>: <a href="#Global-instances">Global instances</a></li> <li><a href="#index-g_t_0040code_007bLangDefManager_007d-class-28"><code>LangDefManager</code> class</a>: <a href="#Completely-Customized-Formatting">Completely Customized Formatting</a></li> <li><a href="#index-g_t_0040code_007bLangMap_007d-class-74"><code>LangMap</code> class</a>: <a href="#Global-instances">Global instances</a></li> <li><a href="#index-g_t_0040code_007bLangMap_007d-class-16"><code>LangMap</code> class</a>: <a href="#SourceHighlight-class">SourceHighlight class</a></li> <li><a href="#index-libsource_002dhighlight-5">libsource-highlight</a>: <a href="#Use-of-GNU-Source_002dhighlight-Library">Use of GNU Source-highlight Library</a></li> <li><a href="#index-mailing-list-79">mailing list</a>: <a href="#Mailing-Lists">Mailing Lists</a></li> <li><a href="#index-namespace-6">namespace</a>: <a href="#Use-of-GNU-Source_002dhighlight-Library">Use of GNU Source-highlight Library</a></li> <li><a href="#index-g_t_0040code_007bnotify_007d-method-56"><code>notify</code> method</a>: <a href="#Events-and-Listeners">Events and Listeners</a></li> <li><a href="#index-g_t_0040code_007bparseCssStyleFile_007d-method-46"><code>parseCssStyleFile</code> method</a>: <a href="#Style_002dbased-Customized-Formatting">Style-based Customized Formatting</a></li> <li><a href="#index-g_t_0040code_007bparseStyleFile_007d-method-45"><code>parseStyleFile</code> method</a>: <a href="#Style_002dbased-Customized-Formatting">Style-based Customized Formatting</a></li> <li><a href="#index-pkg_002dconfig-9">pkg-config</a>: <a href="#Using-Automake-and-Autotools">Using Automake and Autotools</a></li> <li><a href="#index-g_t_0040code_007bPKG_005fCONFIG_005fPATH_007d-10"><code>PKG_CONFIG_PATH</code></a>: <a href="#Using-Automake-and-Autotools">Using Automake and Autotools</a></li> <li><a href="#index-problems-78">problems</a>: <a href="#Problems">Problems</a></li> <li><a href="#index-g_t_0040code_007bRegexRuleFactory_007d-class-30"><code>RegexRuleFactory</code> class</a>: <a href="#Completely-Customized-Formatting">Completely Customized Formatting</a></li> <li><a href="#index-g_t_0040code_007breload_007d-method-75"><code>reload</code> method</a>: <a href="#Global-instances">Global instances</a></li> <li><a href="#index-g_t_0040code_007bretrieveDataDir_007d-method-67"><code>retrieveDataDir</code> method</a>: <a href="#Settings">Settings</a></li> <li><a href="#index-g_t_0040code_007bsetGlobalDataDir_007d-method-66"><code>setGlobalDataDir</code> method</a>: <a href="#Settings">Settings</a></li> <li><a href="#index-g_t_0040code_007bSettings_007d-class-64"><code>Settings</code> class</a>: <a href="#Settings">Settings</a></li> <li><a href="#index-shared-pointers-11">shared pointers</a>: <a href="#Main-Classes">Main Classes</a></li> <li><a href="#index-g_t_0040code_007bsource_002dhighlight_007d-63"><code>source-highlight</code></a>: <a href="#Settings">Settings</a></li> <li><a href="#index-g_t_0040code_007bsource_002dhighlight_007d-58"><code>source-highlight</code></a>: <a href="#Events-and-Listeners">Events and Listeners</a></li> <li><a href="#index-g_t_0040code_007bsource_002dhighlight_007d-14"><code>source-highlight</code></a>: <a href="#SourceHighlight-class">SourceHighlight class</a></li> <li><a href="#index-g_t_0040code_007bsource_002dhighlight_002dsettings_007d-62"><code>source-highlight-settings</code></a>: <a href="#Settings">Settings</a></li> <li><a href="#index-g_t_0040code_007bsource_002dhighlight_002dsettings_007d-19"><code>source-highlight-settings</code></a>: <a href="#SourceHighlight-class">SourceHighlight class</a></li> <li><a href="#index-g_t_0040code_007bSOURCE_005fHIGHLIGHT_005fDATADIR_007d-61"><code>SOURCE_HIGHLIGHT_DATADIR</code></a>: <a href="#Settings">Settings</a></li> <li><a href="#index-g_t_0040code_007bSourceHighlight_007d-class-27"><code>SourceHighlight</code> class</a>: <a href="#Completely-Customized-Formatting">Completely Customized Formatting</a></li> <li><a href="#index-g_t_0040code_007bSourceHighlight_007d-class-13"><code>SourceHighlight</code> class</a>: <a href="#SourceHighlight-class">SourceHighlight class</a></li> <li><a href="#index-g_t_0040code_007bSourceHighlighter_007d-class-35"><code>SourceHighlighter</code> class</a>: <a href="#Completely-Customized-Formatting">Completely Customized Formatting</a></li> <li><a href="#index-g_t_0040code_007bSourceHighlightUtils_007d-class-70"><code>SourceHighlightUtils</code> class</a>: <a href="#Utility-functions">Utility functions</a></li> <li><a href="#index-g_t_0040code_007bstart_007d-field-25"><code>start</code> field</a>: <a href="#Completely-Customized-Formatting">Completely Customized Formatting</a></li> <li><a href="#index-g_t_0040code_007bstd_003a_003aexception_007d-class-12"><code>std::exception</code> class</a>: <a href="#Main-Classes">Main Classes</a></li> <li><a href="#index-g_t_0040code_007bStyleConstants_007d-enum-50"><code>StyleConstants</code> enum</a>: <a href="#Style_002dbased-Customized-Formatting">Style-based Customized Formatting</a></li> <li><a href="#index-g_t_0040code_007bStyleFileParser_007d-class-44"><code>StyleFileParser</code> class</a>: <a href="#Style_002dbased-Customized-Formatting">Style-based Customized Formatting</a></li> <li><a href="#index-tail-recursion-80">tail recursion</a>: <a href="#Concept-Index">Concept Index</a></li> <li><a href="#index-g_t_0040code_007bTextStyleFormatterFactory_007d-class-41"><code>TextStyleFormatterFactory</code> class</a>: <a href="#Style_002dbased-Customized-Formatting">Style-based Customized Formatting</a></li> <li><a href="#index-g_t_0040code_007bunload_007d-method-76"><code>unload</code> method</a>: <a href="#Global-instances">Global instances</a></li> </ul> <div class="shortcontents"> <h2>Short Contents</h2> <ul> <li><a href="#toc_Top">GNU Source-highlight Library</a></li> <li><a href="#toc_Introduction">1 Introduction</a></li> <li><a href="#toc_Installation">2 Installation</a></li> <li><a href="#toc_Use-of-GNU-Source_002dhighlight-Library">3 Use of GNU Source-highlight Library</a></li> <li><a href="#toc_Main-Classes">4 Main Classes</a></li> <li><a href="#toc_Problems">5 Reporting Bugs</a></li> <li><a href="#toc_Mailing-Lists">6 Mailing Lists</a></li> <li><a href="#toc_Concept-Index">Concept Index</a></li> </ul> </div> <div class="footnote"> <hr> <a name="texinfo-footnotes-in-document"></a><h4>Footnotes</h4><p class="footnote"><small>[<a name="fn-1" href="#fnd-1">1</a>]</small> The extension of course depends on the library being shared or static, e.g., <code>.so</code>, <code>.la</code>, <code>.a</code>, and on the system</p> <p class="footnote"><small>[<a name="fn-2" href="#fnd-2">2</a>]</small> <a href="http://pkg-config.freedesktop.org">http://pkg-config.freedesktop.org</a>.</p> <hr></div> </body></html> ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/sh_vim.css���������������������������������������������������������������0000644�0001750�0001750�00000001405�11672675562�014474� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������body { background-color: #ffffff; color: #000000; font-weight: normal; font-style: normal; } .keyword { color: #B26818; font-weight: normal; font-style: normal; } .type { color: #00ff00; font-weight: normal; font-style: normal; } .string { color: #ff0000; font-weight: normal; font-style: normal; } .specialchar { color: #ff22ff; font-weight: normal; font-style: normal; } .comment { color: #0000ff; font-weight: normal; font-style: normal; } .number { color: #ff0000; font-weight: normal; font-style: normal; } .preproc { color: #ff22ff; font-weight: normal; font-style: normal; } .function { color: #000000; font-weight: normal; font-style: normal; } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/test_regexrange1.java.texinfo��������������������������������������������0000664�0001750�0001750�00000002371�11675045057�020260� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@c Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite @example @t{32:} @b{public} @b{class} Hello @{ @t{33:} @b{int} foo = 1998 ; @t{34:} @b{int} hex_foo = 0xCAFEBABE; @t{35:} @b{boolean} b = @b{false}; @t{36:} Integer i = @b{null} ; @t{37:} @b{char} c = @t{'}\'@t{'}, d = @t{'n'}, e = @t{'}\\@t{'} ; @t{38:} String xml = @t{"<tag attr=}\"@t{value}\"@t{>&auml;</tag>"}, foo2 = @t{"}\\@t{"} ; @t{39:} @t{40:} @r{@i{/* mymethod */}} @t{41:} @b{public} @b{void} mymethod(@b{int} i) @{ @t{42:} @r{@i{// just a foo method}} @t{43:} @} @t{44:} @r{@i{/* mymethod */}} @t{45:} @t{46:} @r{@i{/* main */}} @t{47:} @b{public} @b{static} @b{void} main( String args[] ) @{ @t{48:} @r{@i{// just some greetings ;-) /*}} @t{49:} System.out.println( @t{"Hello from java2html :-)"} ) ; @t{50:} System.out.println( @t{"}\t@t{by Lorenzo Bettini"} ) ; @t{51:} System.out.println( @t{"}\t@t{http://www.lorenzobettini.it"} ) ; @t{52:} @b{if} (argc > 0) @t{53:} String param = argc[0]; @t{54:} @r{@i{//System.out.println( "bye bye... :-D" ) ; // see you soon}} @t{55:} @} @t{56:} @r{@i{/* main */}} @t{57:} @} @end example�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/version-lib.texi���������������������������������������������������������0000644�0001750�0001750�00000000145�11675045063�015607� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@set UPDATED 16 December 2011 @set UPDATED-MONTH December 2011 @set EDITION 3.1.6 @set VERSION 3.1.6 ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/infoformatter.h.texinfo��������������������������������������������������0000664�0001750�0001750�00000001655�11675045063�017177� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@c Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite @example @b{class} InfoFormatter: @b{public} srchilite::Formatter @{ @r{@i{/// the language element represented by this formatter}} std::string elem; @b{public}: InfoFormatter(@b{const} std::string &elem_ = @t{"normal"}) : elem(elem_) @{ @} @b{virtual} @b{void} format(@b{const} std::string &s, @b{const} srchilite::FormatterParams *params = 0) @{ @r{@i{// do not print anything if normal or string to format is empty}} @b{if} (elem != @t{"normal"} || !s.size()) @{ std::cout << elem << @t{": "} << s; @b{if} (params) std::cout << @t{", start: "} << params->start; std::cout << std::endl; @} @} @}; @r{@i{/// shared pointer for InfoFormatter}} @b{typedef} boost::shared_ptr<InfoFormatter> InfoFormatterPtr; @end example�����������������������������������������������������������������������������������source-highlight-3.1.6/doc/cpp.langelems.texinfo����������������������������������������������������0000664�0001750�0001750�00000000171�11675045061�016610� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������cbracket classname comment function keyword label normal number preproc specialchar string symbol todo type url usertype �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/sh_ide-kdev.css����������������������������������������������������������0000644�0001750�0001750�00000001403�11672675562�015367� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������body { background-color: #ffffff; color: #000000; font-weight: normal; font-style: normal; } .keyword { color: #600000; font-weight: bold; font-style: normal; } .type { color: #600000; font-weight: normal; font-style: normal; } .string { color: #ff0000; font-weight: normal; font-style: normal; } .specialchar { color: #ff0000; font-weight: normal; font-style: normal; } .comment { color: #bfbfbf; font-weight: normal; font-style: italic; } .number { color: #0000ff; font-weight: normal; font-style: normal; } .preproc { color: #008000; font-weight: normal; font-style: normal; } .function { color: #000000; font-weight: normal; font-style: normal; } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/style.lang.texinfo�������������������������������������������������������0000664�0001750�0001750�00000001212�11675045057�016142� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@c Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite @example @r{@i{# this is the language definition for the}} @r{@i{# style definition syntax}} @t{@i{comment}} @b{start} @t{"//"} @t{@i{string}} @b{delim} @t{"\""} @t{"\""} @b{escape} @t{"\\"} @t{@i{keyword}} = @t{"bgcolor|purple|orange|brightorange|brightgreen|darkgreen"}, @t{"green|darkred|red|brown|pink|yellow|cyan"}, @t{"black|teal|gray|darkblue|blue"}, @t{"normal|linenum"}, @t{"noref|nf|f|u|i|b"} @t{@i{keyword}} = @t{'bg\:'} @t{@i{symbol}} = @t{",|;"} @t{@i{variable}} = @t{'[[:word:]]+'} @end example��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/sh_darkness.css����������������������������������������������������������0000644�0001750�0001750�00000001647�11672675562�015523� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������body { background-color: #000000; color: #ffffff; font-weight: normal; font-style: normal; } .keyword { color: #ffff00; font-weight: bold; font-style: normal; } .type { color: #00ff00; font-weight: normal; font-style: normal; } .string { color: #abab00; font-weight: bold; font-style: normal; } .specialchar { color: #bfbfbf; font-weight: normal; font-style: normal; } .comment { color: #888888; font-weight: normal; font-style: italic; } .number { color: #619de7; font-weight: normal; font-style: normal; } .preproc { color: #1da3cf; font-weight: normal; font-style: normal; } .symbol { color: #ff00ff; font-weight: normal; font-style: normal; } .function { color: #f34627; font-weight: normal; font-style: normal; } .cbracket { color: #ff00ff; font-weight: normal; font-style: normal; } �����������������������������������������������������������������������������������������source-highlight-3.1.6/doc/c.lang.texinfo�����������������������������������������������������������0000664�0001750�0001750�00000002677�11675045060�015236� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@c Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite @example @r{@i{# definitions for C}} @b{include} @t{"c_comment.lang"} @t{@i{label}} = @t{'^[[:blank:]]*[[:alnum:]]+:[[:blank:]]*\z'} (@t{@i{keyword}},@t{@i{normal}},@t{@i{classname}}) = @t{`(\<struct)([[:blank:]]+)([[:alnum:]_]+)`} @b{state} @t{@i{preproc}} @b{start} @t{'^[[:blank:]]*#(?:[[:blank:]]*include)'} @b{begin} @t{@i{string}} @b{delim} @t{"<"} @t{">"} @t{@i{string}} @b{delim} @t{"\""} @t{"\""} @b{escape} @t{"\\"} @b{include} @t{"c_comment.lang"} @b{end} @t{@i{preproc}} = @t{'^[[:blank:]]*#([[:blank:]]*[[:word:]]*)'} @b{include} @t{"number.lang"} @b{include} @t{"c_string.lang"} @t{@i{keyword}} = @t{"__asm|__cdecl|__declspec|__export|__far16"}, @t{"__fastcall|__fortran|__import"}, @t{"__pascal|__rtti|__stdcall|_asm|_cdecl"}, @t{"__except|_export|_far16|_fastcall"}, @t{"__finally|_fortran|_import|_pascal|_stdcall|__thread|__try|asm|auto"}, @t{"break|case|catch|cdecl|const|continue|default"}, @t{"do|else|enum|extern|for|goto"}, @t{"if|pascal"}, @t{"register|return|sizeof|static"}, @t{"struct|switch"}, @t{"typedef|union"}, @t{"volatile|while"} @t{@i{type}} = @t{"bool|char|double|float|int|long"}, @t{"short|signed|unsigned|void|wchar_t"} @b{include} @t{"symbols.lang"} @t{@i{cbracket}} = @t{"@{|@}"} @b{include} @t{"function.lang"} @b{include} @t{"clike_vardeclaration.lang"} @end example�����������������������������������������������������������������source-highlight-3.1.6/doc/instances_example.cpp.texinfo��������������������������������������������0000664�0001750�0001750�00000000647�11675045063�020355� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@c Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite @example @b{#include} @t{"srchilite/langdefmanager.h"} @b{#include} @t{"srchilite/instances.h"} @b{int} main() @{ @r{@i{// we highlight C++ code for simplicity}} srchilite::SourceHighlighter highlighter (srchilite::Instances::getLangDefManager().getHighlightState( DATADIR, @t{"cpp.lang"})); @end example�����������������������������������������������������������������������������������������source-highlight-3.1.6/doc/mono-alt.css�������������������������������������������������������������0000644�0001750�0001750�00000000473�11672675562�014741� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������BODY { color: white; font-weight: normal; background-color: black; } .keyword { color: white; font-weight: bold; text-decoration: underline; } .type { color: white; font-weight: bold; } .string { color: silver; } .comment { color: gray; font-style: italic; } .number { color: white; } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/langdef.lang.texinfo�����������������������������������������������������0000664�0001750�0001750�00000001474�11675045057�016414� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@c Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite @example @r{@i{# this is the language definition for the}} @r{@i{# language definition syntax itself}} @t{@i{comment}} @b{start} @t{"#"} @t{@i{preproc}} = @t{"include"} @t{@i{string}} @b{delim} @t{"\""} @t{"\""} @b{escape} @t{"\\"} @b{multiline} @t{@i{regexp}} @b{delim} @t{"'"} @t{"'"} @b{escape} @t{"\\"} @b{multiline} @t{@i{regexp}} @b{delim} @t{"`"} @t{"`"} @b{escape} @t{"\\"} @b{multiline} @t{@i{keyword}} = @t{"state|environment|begin|end|delim|escape|start"}, @t{"multiline|nested|vardef|exitall|exit"}, @t{"redef|subst|nonsensitive"} @t{@i{symbol}} = @t{"=|+|,|(|)"} @b{vardef} @t{@i{ID}} = @t{'[[:word:]]+'} @t{@i{variable}} = @t{'\$'} + @t{@i{$ID}} @t{@i{variable}} = @t{@i{$ID}} @end example����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/sh_ide-codewarrior.css���������������������������������������������������0000644�0001750�0001750�00000001405�11672675562�016760� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������body { background-color: #ffffff; color: #000000; font-weight: normal; font-style: normal; } .keyword { color: #0000b3; font-weight: normal; font-style: normal; } .type { color: #4c73a6; font-weight: normal; font-style: normal; } .string { color: #666666; font-weight: normal; font-style: normal; } .specialchar { color: #666666; font-weight: normal; font-style: normal; } .comment { color: #b30000; font-weight: normal; font-style: normal; } .number { color: #000000; font-weight: normal; font-style: normal; } .preproc { color: #0000b3; font-weight: normal; font-style: normal; } .function { color: #000000; font-weight: normal; font-style: normal; } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/sh_rand01.css������������������������������������������������������������0000644�0001750�0001750�00000001645�11672675562�014774� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������body { background-color: #ffffff; color: #121b28; font-weight: normal; font-style: normal; } .keyword { color: #0a7f6d; font-weight: bold; font-style: normal; } .type { color: #c42638; font-weight: bold; font-style: normal; } .string { color: #2b83ba; font-weight: normal; font-style: normal; } .specialchar { color: #a764cb; font-weight: normal; font-style: normal; } .comment { color: #ababab; font-weight: normal; font-style: italic; } .number { color: #0da344; font-weight: normal; font-style: normal; } .preproc { color: #620ac6; font-weight: normal; font-style: normal; } .symbol { color: #0000de; font-weight: normal; font-style: normal; } .function { color: #000000; font-weight: bold; font-style: normal; } .cbracket { color: #0000de; font-weight: normal; font-style: normal; } �������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/sh_zellner.css�����������������������������������������������������������0000644�0001750�0001750�00000001403�11672675562�015352� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������body { background-color: #ffffff; color: #000000; font-weight: normal; font-style: normal; } .keyword { color: #a52a2a; font-weight: normal; font-style: normal; } .type { color: #0000ff; font-weight: normal; font-style: normal; } .string { color: #ff00ff; font-weight: normal; font-style: normal; } .specialchar { color: #ff00ff; font-weight: normal; font-style: normal; } .comment { color: #ff0000; font-weight: normal; font-style: normal; } .number { color: #ff00ff; font-weight: normal; font-style: normal; } .preproc { color: #a020f0; font-weight: normal; font-style: normal; } .function { color: #000000; font-weight: bold; font-style: normal; } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/gen_style_example.sh.in��������������������������������������������������0000644�0001750�0001750�00000000572�11672675561�017145� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#! @SHELL@ # generate the output of a formatting, using a style file # the output is intended to be inserted in the examples.html SOURCEHIGHLIGHT=@top_builddir@/src/source-highlight for arg in $* do echo "<h2>$arg</h2>"; $SOURCEHIGHLIGHT --tab=8 --input=@srcdir@/Hello.java --style-css=@srcdir@/$arg --data-dir=@top_srcdir@/src --outlang-def=xhtmltable.outlang; done ��������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/sh_ide-msvcpp.css��������������������������������������������������������0000644�0001750�0001750�00000001403�11672675562�015746� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������body { background-color: #ffffff; color: #000000; font-weight: normal; font-style: normal; } .keyword { color: #0000ff; font-weight: bold; font-style: normal; } .type { color: #0000ff; font-weight: normal; font-style: normal; } .string { color: #000000; font-weight: normal; font-style: normal; } .specialchar { color: #000000; font-weight: normal; font-style: normal; } .comment { color: #008000; font-weight: normal; font-style: italic; } .number { color: #000000; font-weight: normal; font-style: normal; } .preproc { color: #0000ff; font-weight: normal; font-style: normal; } .function { color: #000000; font-weight: normal; font-style: normal; } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/debug.java.texinfo�������������������������������������������������������0000664�0001750�0001750�00000000763�11675045057�016102� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@c Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite @example @t{01:} @r{@i{/*}} @t{02:} @r{@i{ This is to demonstrate --debug-lang}} @t{03:} @r{@i{ }}@t{http://www.lorenzobettini.it} @t{04:} @r{@i{*/}} @t{05:} @t{06:} @b{package} hello; @t{07:} @t{08:} @b{public} @b{class} Hello @{ @t{09:} @r{@i{// just some greetings ;-) /*}} @t{10:} @b{int} i = 10; @t{11:} System.out.println(@t{"Hello World!"}); @t{12:} @} @t{13:} @end example�������������source-highlight-3.1.6/doc/sh_nedit.css�������������������������������������������������������������0000644�0001750�0001750�00000001643�11672675562�015010� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������body { background-color: #ffffff; color: #000000; font-weight: normal; font-style: normal; } .keyword { color: #000000; font-weight: bold; font-style: normal; } .type { color: #a52a2a; font-weight: bold; font-style: normal; } .string { color: #006400; font-weight: normal; font-style: normal; } .specialchar { color: #2e8b57; font-weight: normal; font-style: normal; } .comment { color: #000000; font-weight: normal; font-style: italic; } .number { color: #006400; font-weight: normal; font-style: normal; } .preproc { color: #27408b; font-weight: normal; font-style: normal; } .symbol { color: #000000; font-weight: bold; font-style: normal; } .function { color: #000000; font-weight: normal; font-style: normal; } .cbracket { color: #000000; font-weight: bold; font-style: normal; } ���������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/UsageExample.java��������������������������������������������������������0000644�0001750�0001750�00000000465�11672675561�015724� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* this is an example of code to be included in the javadoc documentation of SimpleClass */ import simpleclass.*; // code snippet SimpleClass s = new SimpleClass(150); if (s == null && true) { throw new SimpleClassException("failed to create"); } System.out.println("this is a simple class" + s); �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/test_string_stop.lang.texinfo��������������������������������������������0000664�0001750�0001750�00000001335�11675045062�020416� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@c Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite @example @t{@i{keyword}} = @t{"if|class"} @t{@i{type}} = @t{'int'} @t{@i{comment}} @b{delim} @t{"/*"} @t{"*/"} @r{@i{# thus this won't catch "/* */ /" as a regexp,}} @r{@i{# since comment elem definition comes first}} @t{@i{regexp}} = @t{'/.*/.*/'} @r{@i{# this won't match if ( ) as a function,}} @r{@i{# since keyword elem definition comes first}} @t{@i{function}} = @t{'([[:alpha:]]|_)[[:word:]]*[[:blank:]]*\(*[[:blank:]]*\)'} @r{@i{# the following order is conceptually wrong,}} @r{@i{# since "//" won't be highlighted as a comment, but as two symbols}} @t{@i{symbol}} = @t{"/"} @t{@i{comment}} @b{start} @t{"//"} @end example���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/default.css.texinfo������������������������������������������������������0000664�0001750�0001750�00000004724�11675045062�016304� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@c Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite @example body @{ @b{background-color:} @i{white}; @} @r{@i{/* the color for context lines (when specified with line ranges) */}} @b{.context} @{ @b{color:} @i{gray}; @} @b{.keyword} @{ @b{color:} @i{blue}; @b{font-weight:} @i{bold}; @} @b{.type} @{ @b{color:} @i{darkgreen}; @} @b{.usertype}, @b{.classname} @{ @b{color:} @i{teal}; @} @b{.string} @{ @b{color:} @i{red}; @b{font-family:} @i{monospace}; @} @b{.regexp} @{ @b{color:} @i{orange}; @} @b{.specialchar} @{ @b{color:} @i{pink}; @b{font-family:} @i{monospace}; @} @b{.comment} @{ @b{color:} @i{brown}; @b{font-style:} @i{italic}; @} @b{.number} @{ @b{color:} @i{purple}; @} @b{.preproc} @{ @b{color:} @i{darkblue}; @b{font-weight:} @i{bold}; @} @b{.symbol} @{ @b{color:} @i{darkred}; @} @b{.function} @{ @b{color:} @i{black}; @b{font-weight:} @i{bold}; @} @b{.cbracket} @{ @b{color:} @i{red}; @} @b{.todo} @{ @b{font-weight:} @i{bold}; @b{background-color:} @i{cyan}; @} @r{@i{/* line numbers */}} @b{.linenum} @{ @b{color:} @i{black}; @b{font-family:} @i{monospace}; @} @r{@i{/* Internet related */}} @b{.url} @{ @b{color:} @i{blue}; @b{text-decoration:} @i{underline}; @b{font-family:} @i{monospace}; @} @r{@i{/* other elements for ChangeLog and Log files */}} @b{.date} @{ @b{color:} @i{blue}; @b{font-weight:} @i{bold}; @} @b{.time}, @b{.file} @{ @b{color:} @i{darkblue}; @b{font-weight:} @i{bold}; @} @b{.ip}, @b{.name} @{ @b{color:} @i{darkgreen}; @} @r{@i{/* for Prolog, Perl */}} @b{.variable} @{ @b{color:} @i{darkgreen}; @} @b{.italics} @{ @b{color:} @i{darkgreen}; @b{font-style:} @i{italic}; @} @b{.bold} @{ @b{color:} @i{darkgreen}; @b{font-weight:} @i{bold}; @} @r{@i{/* for LaTeX */}} @b{.underline} @{ @b{color:} @i{darkgreen}; @b{text-decoration:} @i{underline}; @} @b{.fixed} @{ @b{color:} @i{green}; @b{font-family:} @i{monospace}; @} @b{.argument}, @b{.optionalargument} @{ @b{color:} @i{darkgreen}; @} @b{.math} @{ @b{color:} @i{orange}; @} @b{.bibtex} @{ @b{color:} @i{blue}; @} @r{@i{/* for diffs */}} @b{.oldfile} @{ @b{color:} @i{orange}; @} @b{.newfile} @{ @b{color:} @i{darkgreen}; @} @b{.difflines} @{ @b{color:} @i{blue}; @} @r{@i{/* for css */}} @b{.selector} @{ @b{color:} @i{purple}; @} @b{.property} @{ @b{color:} @i{blue}; @} @b{.value} @{ @b{color:} @i{darkgreen}; @b{font-style:} @i{italic}; @} @r{@i{/* for Oz */}} @b{.atom} @{ @b{color:} @i{orange}; @} @b{.meta} @{ @b{font-style:} @i{italic}; @} @end example��������������������������������������������source-highlight-3.1.6/doc/example-u.diff�����������������������������������������������������������0000644�0001750�0001750�00000000714�11672675561�015225� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������diff -ruP source-highlight-2.1.1/source-highlight.spec ... --- source-highlight-2.1.1/source-highlight.spec ... +++ source-highlight-2.1.2/source-highlight.spec ... @@ -6,8 +6,8 @@ Summary: syntax highlighting for source documents Name: source-highlight -Version: 2.1.1 -Release: 2.1.1 +Version: 2.1.2 +Release: 2.1.2 License: GPL Group: Utilities/Console Source: ftp://ftp.gnu.org/gnu/source-highlight/%{name}-%{version}.tar.gz ����������������������������������������������������source-highlight-3.1.6/doc/syslog.style.texinfo�����������������������������������������������������0000664�0001750�0001750�00000001210�11675045057�016537� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@c Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite @example @t{@i{date}}, @t{@i{keyword}} @b{yellow} @b{b} ; @t{@i{time}} @t{"#9999FF"} ; @t{@i{ip}} @t{"lightblue"} @b{b} ; @t{@i{type}} @b{cyan} @b{b} ; @t{@i{string}} @t{"brown"} @b{b} ; @t{@i{comment}} @b{teal} ; @t{@i{number}} @b{red} ; @t{@i{preproc}} @b{cyan} ; @t{@i{symbol}} @b{green} ; @t{@i{function}} @t{"#CC66CC"} @b{b} ; @t{@i{cbracket}} @b{green} @b{b} ; @t{@i{twonumbers}} @b{green} @b{b} ; @t{@i{port}} @b{green} @b{b} ; @t{@i{webmethod}} @b{teal} ; @r{@i{// foo option}} @t{@i{foo}} @b{red} @b{b} ; @r{@i{// foo entry}} @end example����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/check-regexp.1�����������������������������������������������������������0000644�0001750�0001750�00000002277�11672675561�015133� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������.TH CHECK-REGEXP "1" "June 2008" "check-regexp 2.9" "User Commands" .SH NAME check-regexp \- test regular expressions from the command line .SH SYNOPSIS .B check-regexp \fI'regular expression' 'string1' 'string2' \fR... .SH DESCRIPTION check\-regexp (GNU Source\-highlight) .PP You simply pass as the first command line argument the regular expression and then the strings you want to try to match. .br It is crucial, in order to avoid shell substitutions, to enclose both the expression and the strings in single quotes. .sp The program then prints some information about the possibly successful matching. .br In the output the what[0] part represents the whole match, and the what[i] part represents the i-th marked subexpression that matched. .sp The program also prints possible prefix and suffix. .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 \fB\-h\fR, \fB\-\-help\fR Print help and exit .TP \fB\-V\fR, \fB\-\-version\fR Print version and exit .SH AUTHOR check-regexp was written by Lorenzo Bettini <www.lorenzobettini.it>. This man page was written by Cesare Tirabassi <norsetto@ubuntu.com>.���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/test_nonewlines.lang.texinfo���������������������������������������������0000664�0001750�0001750�00000000720�11675045062�020221� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@c Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite @example @r{@i{# test_nonewlines.lang}} @r{@i{# test that newlines in expressions are simply discarded}} @r{@i{# see the corresponding test_newlines.lang}} @t{@i{keyword}} = @t{"foo|lang"} (@t{@i{keyword}},@t{@i{normal}},@t{@i{classname}}) = @t{`(\<struct)([[:blank:]]+)([[:alnum:]_]+)`} @t{@i{preproc}} = @t{'^[[:blank:]]*#([[:blank:]]*[[:word:]]*)'} @end example������������������������������������������������source-highlight-3.1.6/doc/style.defaults.texinfo���������������������������������������������������0000664�0001750�0001750�00000001040�11675045062�017023� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@c Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite @example # defaults for styles # the format is: # elem1 = elem2 # meaning that if the style for elem1 is not specified, # then it will have the same style as elem2 classname = normal usertype = normal preproc = keyword section = function paren = cbracket attribute = type value = string predef_var = type predef_func = function atom = regexp meta = function path = regexp label = preproc error = string warning = type code = preproc @end example������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/test_newlines.lang.texinfo�����������������������������������������������0000664�0001750�0001750�00000000674�11675045062�017674� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@c Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite @example @r{@i{# test_newlines.lang}} @r{@i{# test that newlines in expressions are simply discarded}} @t{@i{keyword}} = @t{"foo} @t{|} @t{lang"} (@t{@i{keyword}},@t{@i{normal}},@t{@i{classname}}) = @t{`(\<struct)} @t{([[:blank:]]+)} @t{([[:alnum:]_]+)`} @t{@i{preproc}} = @t{'^[[:blank:]]*} @t{#([[:blank:]]*} @t{[[:word:]]*)'} @end example��������������������������������������������������������������������source-highlight-3.1.6/doc/test.java.texinfo��������������������������������������������������������0000664�0001750�0001750�00000005007�11675045056�015766� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@c Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite @example @t{01:} @r{@i{/*}} @t{02:} @r{@i{ This is a classical Hello program}} @t{03:} @r{@i{ to test source-highlight with Java programs.}} @t{04:} @r{@i{ }} @t{05:} @r{@i{ to have an html translation type}} @t{06:} @t{07:} @r{@i{ source-highlight -s java -f html --input Hello.java --output Hello.html}} @t{08:} @r{@i{ source-highlight -s java -f html < Hello.java > Hello.html}} @t{09:} @t{10:} @r{@i{ or type source-highlight --help for the list of options}} @t{11:} @t{12:} @r{@i{ written by}} @t{13:} @r{@i{ Lorenzo Bettini}} @t{14:} @r{@i{ }}@t{http://www.lorenzobettini.it} @t{15:} @r{@i{ }}@t{http://www.gnu.org/software/src-highlite} @t{16:} @r{@i{*/}} @t{17:} @t{18:} @b{package} hello; @t{19:} @t{20:} @b{import} java.io.* ; @t{21:} @t{22:} @r{@i{/**}} @t{23:} @r{@i{ * }}@b{<p>} @t{24:} @r{@i{ * A simple Hello World class, used to demonstrate some}} @t{25:} @r{@i{ * features of Java source highlighting.}} @t{26:} @r{@i{ * }}@b{</p>} @t{27:} @r{@i{ * }}TODO:@r{@i{ nothing, just to show an highlighted }}TODO@r{@i{ or }}FIXME @t{28:} @r{@i{ *}} @t{29:} @r{@i{ * }}@b{@@author}@r{@i{ Lorenzo Bettini}} @t{30:} @r{@i{ * }}@b{@@version}@r{@i{ 2.0}} @t{31:} @r{@i{ */}} @r{@i{/// class}} @t{32:} @b{public} @b{class} Hello @{ @t{33:} @b{int} foo = 1998 ; @t{34:} @b{int} hex_foo = 0xCAFEBABE; @t{35:} @b{boolean} b = @b{false}; @t{36:} Integer i = @b{null} ; @t{37:} @b{char} c = @t{'}\'@t{'}, d = @t{'n'}, e = @t{'}\\@t{'} ; @t{38:} String xml = @t{"<tag attr=}\"@t{value}\"@t{>&auml;</tag>"}, foo2 = @t{"}\\@t{"} ; @t{39:} @t{40:} @r{@i{/* mymethod */}} @t{41:} @b{public} @b{void} mymethod(@b{int} i) @{ @t{42:} @r{@i{// just a foo method}} @t{43:} @} @t{44:} @r{@i{/* mymethod */}} @t{45:} @t{46:} @r{@i{/* main */}} @t{47:} @b{public} @b{static} @b{void} main( String args[] ) @{ @t{48:} @r{@i{// just some greetings ;-) /*}} @t{49:} System.out.println( @t{"Hello from java2html :-)"} ) ; @t{50:} System.out.println( @t{"}\t@t{by Lorenzo Bettini"} ) ; @t{51:} System.out.println( @t{"}\t@t{http://www.lorenzobettini.it"} ) ; @t{52:} @b{if} (argc > 0) @t{53:} String param = argc[0]; @t{54:} @r{@i{//System.out.println( "bye bye... :-D" ) ; // see you soon}} @t{55:} @} @t{56:} @r{@i{/* main */}} @t{57:} @} @t{58:} @r{@i{/// class}} @t{59:} @t{60:} @r{@i{// end of file test.java}} @end example�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/csharp.lang.texinfo������������������������������������������������������0000664�0001750�0001750�00000002217�11675045060�016262� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@c Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite @example @r{@i{# definitions for C-sharp}} @r{@i{# by S. HEMMI, updated by L. Bettini.}} @t{@i{preproc}} = @t{"using"} @t{@i{number}} = @t{'\<[+-]?((0x[[:xdigit:]]+)|(([[:digit:]]*\.)?} @t{[[:digit:]]+([eE][+-]?[[:digit:]]+)?))([FfDdMmUulL]+)?\>'} @b{include} @t{"cpp.lang"} @b{subst} @t{@i{keyword}} = @t{"abstract|event|new|struct"}, @t{"as|explicit|null|switch"}, @t{"base|extern|this"}, @t{"false|operator|throw"}, @t{"break|finally|out|true"}, @t{"fixed|override|try"}, @t{"case|params|typeof"}, @t{"catch|for|private"}, @t{"foreach|protected"}, @t{"checked|goto|public|unchecked"}, @t{"class|if|readonly|unsafe"}, @t{"const|implicit|ref"}, @t{"continue|in|return"}, @t{"virtual"}, @t{"default|interface|sealed|volatile"}, @t{"delegate|internal"}, @t{"do|is|sizeof|while"}, @t{"lock|stackalloc"}, @t{"else|static"}, @t{"enum|namespace"}, @t{"get|partial|set"}, @t{"value|where|yield"} @b{subst} @t{@i{type}} = @t{"bool|byte|sbyte|char|decimal|double"}, @t{"float|int|uint|long|ulong|object"}, @t{"short|ushort|string|void"} @end example���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/SimpleClass-doc.html�����������������������������������������������������0000644�0001750�0001750�00000021725�11672675561�016353� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc (build 1.5.0_01) on Fri Sep 30 19:46:57 CEST 2005 --> <TITLE> SimpleClass </TITLE> <META NAME="keywords" CONTENT="SimpleClass class"> <LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style"> <SCRIPT type="text/javascript"> function windowTitle() { parent.document.title="SimpleClass"; } </SCRIPT> <NOSCRIPT> </NOSCRIPT> </HEAD> <BODY BGCOLOR="white" onload="windowTitle();"> <!-- ========= START OF TOP NAVBAR ======= --> <A NAME="navbar_top"><!-- --></A> <A HREF="#skip-navbar_top" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> &nbsp;PREV CLASS&nbsp; &nbsp;NEXT CLASS</FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="index.html?SimpleClass.html" target="_top"><B>FRAMES</B></A> &nbsp; &nbsp;<A HREF="SimpleClass.html" target="_top"><B>NO FRAMES</B></A> &nbsp; &nbsp;<SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#methods_inherited_from_class_java.lang.Object">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;METHOD</FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_top"></A> <!-- ========= END OF TOP NAVBAR ========= --> <HR> <!-- ======== START OF CLASS DATA ======== --> <H2> Class SimpleClass</H2> <PRE> java.lang.Object <IMG SRC="./resources/inherit.gif" ALT="extended by "><B>SimpleClass</B> </PRE> <HR> <DL> <DT><PRE>public class <B>SimpleClass</B><DT>extends java.lang.Object</DL> </PRE> <P> This is a simple class that demonstrate the use of source-highlight to produce javadoc embeddable code: <!-- Generated by Source-highlight --> <pre><tt> <i><font color="#9A1900">/* </font></i> <i><font color="#9A1900"> this is an example of code to be included</font></i> <i><font color="#9A1900"> in the javadoc documentation of SimpleClass</font></i> <i><font color="#9A1900">&#42;/</font></i> <b><font color="#000080">import</font></b> simpleclass<font color="#990000">.*;</font> <i><font color="#9A1900">// code snippet</font></i> SimpleClass s <font color="#990000">=</font> <b><font color="#0000FF">new</font></b> <b><font color="#000000">SimpleClass</font></b><font color="#990000">(</font><font color="#993399">150</font><font color="#990000">);</font> <b><font color="#0000FF">if</font></b> <font color="#990000">(</font>s <font color="#990000">==</font> <b><font color="#0000FF">null</font></b> <font color="#990000">&amp;&amp;</font> <b><font color="#0000FF">true</font></b><font color="#990000">)</font> <font color="#FF0000">{</font> <b><font color="#0000FF">throw</font></b> <b><font color="#0000FF">new</font></b> <b><font color="#000000">SimpleClassException</font></b><font color="#990000">(</font><font color="#FF0000">"failed to create"</font><font color="#990000">);</font> <font color="#FF0000">}</font> System<font color="#990000">.</font>out<font color="#990000">.</font><b><font color="#000000">println</font></b><font color="#990000">(</font><font color="#FF0000">"this is a simple class"</font> <font color="#990000">+</font> s<font color="#990000">);</font> </tt></pre> The previous example code was formatted with Source-highlight <P> <P> <HR> <P> <!-- ======== CONSTRUCTOR SUMMARY ======== --> <A NAME="constructor_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Constructor Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="SimpleClass.html#SimpleClass()">SimpleClass</A></B>()</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> </TABLE> &nbsp; <!-- ========== METHOD SUMMARY =========== --> <A NAME="method_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Method Summary</B></FONT></TH> </TR> </TABLE> &nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD> </TR> </TABLE> &nbsp; <P> <!-- ========= CONSTRUCTOR DETAIL ======== --> <A NAME="constructor_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> <B>Constructor Detail</B></FONT></TH> </TR> </TABLE> <A NAME="SimpleClass()"><!-- --></A><H3> SimpleClass</H3> <PRE> public <B>SimpleClass</B>()</PRE> <DL> </DL> <!-- ========= END OF CLASS DATA ========= --> <HR> <!-- ======= START OF BOTTOM NAVBAR ====== --> <A NAME="navbar_bottom"><!-- --></A> <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_bottom_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> &nbsp;PREV CLASS&nbsp; &nbsp;NEXT CLASS</FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="index.html?SimpleClass.html" target="_top"><B>FRAMES</B></A> &nbsp; &nbsp;<A HREF="SimpleClass.html" target="_top"><B>NO FRAMES</B></A> &nbsp; &nbsp;<SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#methods_inherited_from_class_java.lang.Object">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;METHOD</FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_bottom"></A> <!-- ======== END OF BOTTOM NAVBAR ======= --> <HR> </BODY> </HTML> �������������������������������������������source-highlight-3.1.6/doc/Makefile.in��������������������������������������������������������������0000664�0001750�0001750�00000201434�11675044676�014547� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Copyright (C) 1999-2009 Lorenzo Bettini <http://www.lorenzobettini.it> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = doc DIST_COMMON = $(source_highlight_TEXINFOS) \ $(source_highlight_lib_TEXINFOS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/gen_style_example.sh.in \ $(srcdir)/shjs_css_transform.sh.in $(srcdir)/stamp-1 \ $(srcdir)/stamp-vti $(srcdir)/version-lib.texi \ $(srcdir)/version.texi ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/gl/m4/00gnulib.m4 \ $(top_srcdir)/gl/m4/ac_prog_doxygen.m4 \ $(top_srcdir)/gl/m4/dirent_h.m4 $(top_srcdir)/gl/m4/dirname.m4 \ $(top_srcdir)/gl/m4/double-slash-root.m4 \ $(top_srcdir)/gl/m4/extensions.m4 \ $(top_srcdir)/gl/m4/getopt.m4 \ $(top_srcdir)/gl/m4/gnulib-common.m4 \ $(top_srcdir)/gl/m4/gnulib-comp.m4 \ $(top_srcdir)/gl/m4/include_next.m4 \ $(top_srcdir)/gl/m4/malloc.m4 $(top_srcdir)/gl/m4/memset.m4 \ $(top_srcdir)/gl/m4/mkdir.m4 $(top_srcdir)/gl/m4/nocrash.m4 \ $(top_srcdir)/gl/m4/ssize_t.m4 $(top_srcdir)/gl/m4/stdbool.m4 \ $(top_srcdir)/gl/m4/stddef_h.m4 \ $(top_srcdir)/gl/m4/stdlib_h.m4 $(top_srcdir)/gl/m4/strdup.m4 \ $(top_srcdir)/gl/m4/string_h.m4 \ $(top_srcdir)/gl/m4/sys_stat_h.m4 \ $(top_srcdir)/gl/m4/time_h.m4 $(top_srcdir)/gl/m4/unistd_h.m4 \ $(top_srcdir)/gl/m4/warn-on-use.m4 \ $(top_srcdir)/gl/m4/wchar_t.m4 \ $(top_srcdir)/m4/ax_boost_base.m4 \ $(top_srcdir)/m4/ax_boost_regex.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = shjs_css_transform.sh gen_style_example.sh CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = INFO_DEPS = $(srcdir)/source-highlight.info \ $(srcdir)/source-highlight-lib.info TEXINFO_TEX = $(top_srcdir)/build-aux/texinfo.tex am__TEXINFO_TEX_DIR = $(top_srcdir)/build-aux DVIS = source-highlight.dvi source-highlight-lib.dvi PDFS = source-highlight.pdf source-highlight-lib.pdf PSS = source-highlight.ps source-highlight-lib.ps HTMLS = source-highlight.html source-highlight-lib.html TEXINFOS = source-highlight.texinfo source-highlight-lib.texinfo TEXI2DVI = texi2dvi TEXI2PDF = $(TEXI2DVI) --pdf --batch MAKEINFOHTML = $(MAKEINFO) --html DVIPS = dvips am__installdirs = "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)" \ "$(DESTDIR)$(source_highlightdatadir)" \ "$(DESTDIR)$(source_highlightdocdir)" am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' man1dir = $(mandir)/man1 NROFF = nroff MANS = $(man_MANS) DATA = $(source_highlightdata_DATA) $(source_highlightdoc_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ABSOLUTEDATADIR = @ABSOLUTEDATADIR@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ ARFLAGS = @ARFLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASH_COMPLETION_DIR = @BASH_COMPLETION_DIR@ BASH_SHELL = @BASH_SHELL@ BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ BOOST_LDFLAGS = @BOOST_LDFLAGS@ BOOST_REGEX_LIB = @BOOST_REGEX_LIB@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHROOT_INPUT_DIR = @CHROOT_INPUT_DIR@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOUBLECPP = @DOUBLECPP@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GENGETOPT = @GENGETOPT@ GETOPT_H = @GETOPT_H@ GNULIB_ALPHASORT = @GNULIB_ALPHASORT@ GNULIB_ATOLL = @GNULIB_ATOLL@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ GNULIB_CHDIR = @GNULIB_CHDIR@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@ GNULIB_DIRFD = @GNULIB_DIRFD@ GNULIB_DUP = @GNULIB_DUP@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ GNULIB_FDATASYNC = @GNULIB_FDATASYNC@ GNULIB_FDOPENDIR = @GNULIB_FDOPENDIR@ GNULIB_FFSL = @GNULIB_FFSL@ GNULIB_FFSLL = @GNULIB_FFSLL@ GNULIB_FSTAT = @GNULIB_FSTAT@ GNULIB_FSTATAT = @GNULIB_FSTATAT@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@ GNULIB_GRANTPT = @GNULIB_GRANTPT@ GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@ GNULIB_LCHMOD = @GNULIB_LCHMOD@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MBTOWC = @GNULIB_MBTOWC@ GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_MKDIRAT = @GNULIB_MKDIRAT@ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ GNULIB_MKFIFO = @GNULIB_MKFIFO@ GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@ GNULIB_MKNOD = @GNULIB_MKNOD@ GNULIB_MKNODAT = @GNULIB_MKNODAT@ GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_MKTIME = @GNULIB_MKTIME@ GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@ GNULIB_OPENDIR = @GNULIB_OPENDIR@ GNULIB_PIPE = @GNULIB_PIPE@ GNULIB_PIPE2 = @GNULIB_PIPE2@ GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PTSNAME = @GNULIB_PTSNAME@ GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PWRITE = @GNULIB_PWRITE@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_READ = @GNULIB_READ@ GNULIB_READDIR = @GNULIB_READDIR@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ GNULIB_REWINDDIR = @GNULIB_REWINDDIR@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SCANDIR = @GNULIB_SCANDIR@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_STAT = @GNULIB_STAT@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRERROR_R = @GNULIB_STRERROR_R@ GNULIB_STRNCAT = @GNULIB_STRNCAT@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRPTIME = @GNULIB_STRPTIME@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOD = @GNULIB_STRTOD@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRTOLL = @GNULIB_STRTOLL@ GNULIB_STRTOULL = @GNULIB_STRTOULL@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@ GNULIB_TIMEGM = @GNULIB_TIMEGM@ GNULIB_TIME_R = @GNULIB_TIME_R@ GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@ GNULIB_UNSETENV = @GNULIB_UNSETENV@ GNULIB_USLEEP = @GNULIB_USLEEP@ GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@ GNULIB_WCTOMB = @GNULIB_WCTOMB@ GNULIB_WRITE = @GNULIB_WRITE@ GNULIB__EXIT = @GNULIB__EXIT@ GREP = @GREP@ HAVE_ALPHASORT = @HAVE_ALPHASORT@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ HAVE_CHOWN = @HAVE_CHOWN@ HAVE_CLOSEDIR = @HAVE_CLOSEDIR@ HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@ HAVE_DECL_FDOPENDIR = @HAVE_DECL_FDOPENDIR@ HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ HAVE_DIRENT_H = @HAVE_DIRENT_H@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHDIR = @HAVE_FCHDIR@ HAVE_FCHMODAT = @HAVE_FCHMODAT@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FDATASYNC = @HAVE_FDATASYNC@ HAVE_FDOPENDIR = @HAVE_FDOPENDIR@ HAVE_FFSL = @HAVE_FFSL@ HAVE_FFSLL = @HAVE_FFSLL@ HAVE_FSTATAT = @HAVE_FSTATAT@ HAVE_FSYNC = @HAVE_FSYNC@ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ HAVE_FUTIMENS = @HAVE_FUTIMENS@ HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ HAVE_GETGROUPS = @HAVE_GETGROUPS@ HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ HAVE_GETLOGIN = @HAVE_GETLOGIN@ HAVE_GETOPT_H = @HAVE_GETOPT_H@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GRANTPT = @HAVE_GRANTPT@ HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LCHOWN = @HAVE_LCHOWN@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ HAVE_LSTAT = @HAVE_LSTAT@ HAVE_MBSLEN = @HAVE_MBSLEN@ HAVE_MEMCHR = @HAVE_MEMCHR@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_MKDIRAT = @HAVE_MKDIRAT@ HAVE_MKDTEMP = @HAVE_MKDTEMP@ HAVE_MKFIFO = @HAVE_MKFIFO@ HAVE_MKFIFOAT = @HAVE_MKFIFOAT@ HAVE_MKNOD = @HAVE_MKNOD@ HAVE_MKNODAT = @HAVE_MKNODAT@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMP = @HAVE_MKSTEMP@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ HAVE_NANOSLEEP = @HAVE_NANOSLEEP@ HAVE_OPENDIR = @HAVE_OPENDIR@ HAVE_OS_H = @HAVE_OS_H@ HAVE_PIPE = @HAVE_PIPE@ HAVE_PIPE2 = @HAVE_PIPE2@ HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@ HAVE_PREAD = @HAVE_PREAD@ HAVE_PTSNAME = @HAVE_PTSNAME@ HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ HAVE_PWRITE = @HAVE_PWRITE@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_READDIR = @HAVE_READDIR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ HAVE_REALPATH = @HAVE_REALPATH@ HAVE_REWINDDIR = @HAVE_REWINDDIR@ HAVE_RPMATCH = @HAVE_RPMATCH@ HAVE_SCANDIR = @HAVE_SCANDIR@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@ HAVE_SLEEP = @HAVE_SLEEP@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRPTIME = @HAVE_STRPTIME@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ HAVE_TIMEGM = @HAVE_TIMEGM@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ HAVE_USLEEP = @HAVE_USLEEP@ HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE__BOOL = @HAVE__BOOL@ HAVE__EXIT = @HAVE__EXIT@ HELP2MAN = @HELP2MAN@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBRARY_NAMESPACE = @LIBRARY_NAMESPACE@ LIBRARY_VERSION = @LIBRARY_VERSION@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@ NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ NEXT_DIRENT_H = @NEXT_DIRENT_H@ NEXT_GETOPT_H = @NEXT_GETOPT_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PRAGMA_COLUMNS = @PRAGMA_COLUMNS@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ RANLIB = @RANLIB@ REPLACE_CALLOC = @REPLACE_CALLOC@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ REPLACE_CHOWN = @REPLACE_CHOWN@ REPLACE_CLOSE = @REPLACE_CLOSE@ REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@ REPLACE_DIRFD = @REPLACE_DIRFD@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@ REPLACE_FSTAT = @REPLACE_FSTAT@ REPLACE_FSTATAT = @REPLACE_FSTATAT@ REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_LSTAT = @REPLACE_LSTAT@ REPLACE_MALLOC = @REPLACE_MALLOC@ REPLACE_MBTOWC = @REPLACE_MBTOWC@ REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKDIR = @REPLACE_MKDIR@ REPLACE_MKFIFO = @REPLACE_MKFIFO@ REPLACE_MKNOD = @REPLACE_MKNOD@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OPENDIR = @REPLACE_OPENDIR@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_PWRITE = @REPLACE_PWRITE@ REPLACE_READ = @REPLACE_READ@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_REALLOC = @REPLACE_REALLOC@ REPLACE_REALPATH = @REPLACE_REALPATH@ REPLACE_RMDIR = @REPLACE_RMDIR@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_STAT = @REPLACE_STAT@ REPLACE_STPNCPY = @REPLACE_STPNCPY@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRERROR_R = @REPLACE_STRERROR_R@ REPLACE_STRNCAT = @REPLACE_STRNCAT@ REPLACE_STRNDUP = @REPLACE_STRNDUP@ REPLACE_STRNLEN = @REPLACE_STRNLEN@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ REPLACE_UNLINK = @REPLACE_UNLINK@ REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ REPLACE_UNSETENV = @REPLACE_UNSETENV@ REPLACE_USLEEP = @REPLACE_USLEEP@ REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@ REPLACE_WCTOMB = @REPLACE_WCTOMB@ REPLACE_WRITE = @REPLACE_WRITE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STRIP = @STRIP@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TAR = @TAR@ TEXI2HTML = @TEXI2HTML@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ VALGRIND = @VALGRIND@ VERSION = @VERSION@ YACC = @YACC@ YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bash_completiondir = @bash_completiondir@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ gltests_WITNESS = @gltests_WITNESS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ source_highlightdatadir = @source_highlightdatadir@ source_highlightdocdir = @source_highlightdocdir@ source_highlightlibdocdir = @source_highlightlibdocdir@ source_highlightlibexampledir = @source_highlightlibexampledir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ STD_STYLE = --style-file $(top_srcdir)/src/default.style DATADIR_OPTION = --data-dir $(top_srcdir)/src/ SRCHILITEEXE = $(top_builddir)/src/$(PACKAGE)$(EXEEXT) SRCHILITEPROG = $(SRCHILITEEXE) $(DATADIR_OPTION) SRCHILITETEXINFO = $(SRCHILITEPROG) -f texinfo --output-dir=$(top_builddir)/doc/ --style-file=$(top_srcdir)/src/texinfo.style JAVA2HTML_PROG = $(SRCHILITEPROG) -s java -f html PROGNAME = $(JAVA2HTML_PROG) $(STD_STYLE) CPP2HTML = $(SRCHILITEPROG) -s cpp -f html $(STD_STYLE) CPP2HTML_WREFS = $(CPP2HTML) --title="Contains references to tags" --gen-references=inline --ctags="ctags --excmd=n --tag-relative=yes -o my_test_ref.tags" CHANGELOG2HTML = $(SRCHILITEPROG) -s changelog -f html $(STD_STYLE) FLEX2HTML = $(SRCHILITEPROG) -s flex -f html $(STD_STYLE) OUTPUT_HERE = --output-dir=$(top_builddir)/doc info_TEXINFOS = source-highlight.texinfo source-highlight-lib.texinfo source_highlight_TEXINFOS = $(GENERATEDINFOS) $(DISTRIBUTEDINFOS) source_highlight_lib_TEXINFOS = $(EXAMPLEINFOS) SUFFIXES = .txt .txt.texinfo .txt.texinfo.texinfo .lang .lang.texinfo .diff .diff.texinfo .css .css.texinfo .show.texinfo .defaults .defaults.texinfo .cpp .cpp.texinfo LANG2TEXINFO = $(SRCHILITEEXE) --data-dir=$(top_srcdir)/src/ -f texinfo --style-file=$(top_srcdir)/src/texinfo.style -o $@ # end of maintainer mode AM_MAKEINFOHTMLFLAGS = --no-split # for including generated texinfo files AM_MAKEINFOFLAGS = -I$(srcdir) # these are distributed since they might depend on other programs DISTRIBUTEDINFOS = help-output.texinfo test_ref.h.texinfo GENERATEDINFOS = lang-list.texinfo outlang-list.texinfo \ test.java.texinfo test_lineranges1.java.texinfo \ test_lineranges2.java.texinfo test_regexrange1.java.texinfo \ test_regexrange_main.java.texinfo \ test_regexrange_methods.java.texinfo debug.java.texinfo \ default.style.texinfo texinfo.style.texinfo \ syslog.style.texinfo langdef.lang.texinfo style.lang.texinfo \ cpp.lang.texinfo c.lang.texinfo csharp.lang.texinfo \ c_comment.lang.texinfo clike_vardeclaration.lang.texinfo \ c_string.lang.texinfo symbols.lang.texinfo \ function.lang.texinfo example-u.diff.texinfo \ example-c.diff.texinfo example-n.diff.texinfo \ diff.lang.texinfo test_extreme_comment.cpp.texinfo \ extreme_comment.lang.texinfo \ test_extreme_comment_wrong.texinfo \ extreme_comment2.lang.texinfo test_extreme_comment_1.texinfo \ test_extreme_comment_wrong2.texinfo \ extreme_comment3.lang.texinfo test_extreme_comment_2.texinfo \ test_extreme_comment_3.texinfo comment-show.show.texinfo \ comment-show2.show.texinfo comment-show.lang.texinfo \ comment-show2.lang.texinfo html_common.outlang.texinfo \ javadoc.outlang.texinfo cpp.langelems.texinfo \ log.langelems.texinfo txt2texinfo.txt.texinfo \ txt2texinfo.txt.texinfo.texinfo css_example.css.texinfo \ default.css.texinfo style.defaults.texinfo \ test_string_stop.lang.texinfo strategy_example.lang.texinfo \ test_vardecl.cc.texinfo test_nonewlines.lang.texinfo \ test_newlines.lang.texinfo EXAMPLEINFOS = source-highlight-console-main.cpp.texinfo infoformatter.h.texinfo infoformatter-main.cpp.texinfo debuglistener.cpp.texinfo styleformatter.h.texinfo styleformatterfactory.h.texinfo styleformatter-main.cpp.texinfo instances_example.cpp.texinfo CSS_FILES = default.css \ Hello.css Hello2.css mono-alt.css mono.css cpp2html.css \ xhtml.css \ sh_acid.css sh_golden.css sh_night.css \ sh_berries-dark.css sh_greenlcd.css sh_pablo.css \ sh_berries-light.css sh_ide-anjuta.css sh_peachpuff.css \ sh_bipolar.css sh_ide-codewarrior.css sh_print.css \ sh_blacknblue.css sh_ide-devcpp.css sh_rand01.css \ sh_bright.css sh_ide-eclipse.css sh_the.css \ sh_contrast.css sh_ide-kdev.css sh_typical.css \ sh_darkblue.css sh_ide-msvcpp.css sh_vampire.css \ sh_darkness.css sh_kwrite.css sh_vim-dark.css \ sh_desert.css sh_matlab.css sh_vim.css \ sh_dull.css sh_navy.css sh_whatis.css \ sh_easter.css sh_nedit.css sh_whitengrey.css \ sh_emacs.css sh_neon.css sh_zellner.css EXTRA_DIST = colors.html source-highlight.html source-highlight-lib.html \ Hello.java \ header.html footer.html \ gpl.texinfo flex_scanner.ll \ example-u.diff example-c.diff example-n.diff \ source-highlight.1 source-highlight-settings.1 check-regexp.1 index.html examples.html \ comment-show.lang comment-show2.lang \ SimpleClass.java SimpleClass-doc.html UsageExample.java \ txt2texinfo.txt \ $(DISTRIBUTEDINFOS) $(CSS_FILES) \ style_examples_footer.html style_examples_header.html \ css_example.css \ strategy_example.lang \ highlight_type.style \ instances_example.cpp source_highlightdoc_DATA = colors.html source-highlight.html \ Hello.java Hello1.html Hello2.html Hello3.html Hello4.html Hello5.html \ Hello.java.html Hello_h_f.html Hello_lines.html Hello_xhtml.html \ Hello_xhtml2.html Hello_notfixed.html \ $(CSS_FILES) \ source-highlight.cc.html \ cmdline.h.html \ flex_scanner.ll.html \ header.html footer.html \ langdef.lang.html \ index.html examples.html \ SimpleClass.java SimpleClass.html SimpleClass-doc.html \ UsageExample.java UsageExample.html \ style_examples.html source_highlightdata_DATA = $(CSS_FILES) # man page man_MANS = source-highlight.1 source-highlight-settings.1 check-regexp.1 BUILD_HELLO1 = $(PROGNAME) -i $(srcdir)/Hello.java -o Hello1.html BUILD_HELLO2 = $(PROGNAME) --input $(srcdir)/Hello.java --output Hello2.html --doc BUILD_HELLO3 = $(PROGNAME) -i $(srcdir)/Hello.java -o Hello3.html --title "Happy Java with java2html :-)" --tab 3 BUILD_HELLO4 = $(PROGNAME) < $(srcdir)/Hello.java > Hello4.html --title "and what about CSS :-)" --css "Hello.css" BUILD_HELLO5 = $(PROGNAME) < $(srcdir)/Hello.java > Hello5.html --title "Wooo... this is quite dark ;-D" --css "mono-alt.css" BUILD_HELLO_HTML = $(PROGNAME) --doc $(OUTPUT_HERE) $(srcdir)/Hello.java BUILD_HELLO_W_HEADER_FOOTER = $(JAVA2HTML_PROG) --css="cpp2html.css" --doc -i $(srcdir)/Hello.java -o Hello_h_f.html --header="$(srcdir)/header.html" --footer="$(srcdir)/footer.html" BUILD_HELLO_LINES = $(PROGNAME) --line-number --doc -i $(srcdir)/Hello.java -o Hello_lines.html BUILD_HELLO_XHTML = $(SRCHILITEPROG) -s java -f xhtml --doc -i $(srcdir)/Hello.java -o Hello_xhtml.html --css $(srcdir)/xhtml.css BUILD_HELLO_XHTML2 = $(SRCHILITEPROG) -s java -f xhtml --doc -i $(srcdir)/Hello.java -o Hello_xhtml2.html $(STD_STYLE) BUILD_HELLO_HTMLNOTFIXED = $(SRCHILITEPROG) -s java --outlang-def=$(srcdir)/../src/html_notfixed.outlang -i $(srcdir)/Hello.java -o Hello_notfixed.html HTML_GENERATED_FILES = Hello1.html Hello2.html Hello3.html Hello4.html \ Hello5.html Hello.java.html Hello_h_f.html source-highlight.cc.html \ cmdline.h.html Hello_lines.html Hello_xhtml.html Hello_xhtml2.html \ flex_scanner.ll.html SimpleClass.html \ UsageExample.html Hello_notfixed.html \ style_examples.html DISTCLEANFILES = $(HTML_GENERATED_FILES) langdef.lang.html MAINTAINERCLEANFILES = $(GENERATEDINFOS) tags all: all-am .SUFFIXES: .SUFFIXES: .txt .txt.texinfo .txt.texinfo.texinfo .lang .lang.texinfo .diff .diff.texinfo .css .css.texinfo .show.texinfo .defaults .defaults.texinfo .cpp .cpp.texinfo .dvi .html .info .pdf .ps .texinfo $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu doc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): shjs_css_transform.sh: $(top_builddir)/config.status $(srcdir)/shjs_css_transform.sh.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ gen_style_example.sh: $(top_builddir)/config.status $(srcdir)/gen_style_example.sh.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs .texinfo.info: restore=: && backupdir="$(am__leading_dot)am$$$$" && \ am__cwd=`pwd` && $(am__cd) $(srcdir) && \ rm -rf $$backupdir && mkdir $$backupdir && \ if ($(MAKEINFO) --version) >/dev/null 2>&1; then \ for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \ if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \ done; \ else :; fi && \ cd "$$am__cwd"; \ if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ -o $@ $<; \ then \ rc=0; \ $(am__cd) $(srcdir); \ else \ rc=$$?; \ $(am__cd) $(srcdir) && \ $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \ fi; \ rm -rf $$backupdir; exit $$rc .texinfo.dvi: TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \ $(TEXI2DVI) $< .texinfo.pdf: TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \ $(TEXI2PDF) $< .texinfo.html: rm -rf $(@:.html=.htp) if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ -o $(@:.html=.htp) $<; \ then \ rm -rf $@; \ if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \ mv $(@:.html=) $@; else mv $(@:.html=.htp) $@; fi; \ else \ if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \ rm -rf $(@:.html=); else rm -Rf $(@:.html=.htp) $@; fi; \ exit 1; \ fi $(srcdir)/source-highlight.info: source-highlight.texinfo $(srcdir)/version.texi $(source_highlight_TEXINFOS) source-highlight.dvi: source-highlight.texinfo $(srcdir)/version.texi $(source_highlight_TEXINFOS) source-highlight.pdf: source-highlight.texinfo $(srcdir)/version.texi $(source_highlight_TEXINFOS) source-highlight.html: source-highlight.texinfo $(srcdir)/version.texi $(source_highlight_TEXINFOS) $(srcdir)/version.texi: @MAINTAINER_MODE_TRUE@ $(srcdir)/stamp-vti $(srcdir)/stamp-vti: source-highlight.texinfo $(top_srcdir)/configure @(dir=.; test -f ./source-highlight.texinfo || dir=$(srcdir); \ set `$(SHELL) $(top_srcdir)/build-aux/mdate-sh $$dir/source-highlight.texinfo`; \ echo "@set UPDATED $$1 $$2 $$3"; \ echo "@set UPDATED-MONTH $$2 $$3"; \ echo "@set EDITION $(VERSION)"; \ echo "@set VERSION $(VERSION)") > vti.tmp @cmp -s vti.tmp $(srcdir)/version.texi \ || (echo "Updating $(srcdir)/version.texi"; \ cp vti.tmp $(srcdir)/version.texi) -@rm -f vti.tmp @cp $(srcdir)/version.texi $@ mostlyclean-vti: -rm -f vti.tmp maintainer-clean-vti: @MAINTAINER_MODE_TRUE@ -rm -f $(srcdir)/stamp-vti $(srcdir)/version.texi $(srcdir)/source-highlight-lib.info: source-highlight-lib.texinfo $(srcdir)/version-lib.texi $(source_highlight_lib_TEXINFOS) source-highlight-lib.dvi: source-highlight-lib.texinfo $(srcdir)/version-lib.texi $(source_highlight_lib_TEXINFOS) source-highlight-lib.pdf: source-highlight-lib.texinfo $(srcdir)/version-lib.texi $(source_highlight_lib_TEXINFOS) source-highlight-lib.html: source-highlight-lib.texinfo $(srcdir)/version-lib.texi $(source_highlight_lib_TEXINFOS) $(srcdir)/version-lib.texi: @MAINTAINER_MODE_TRUE@ $(srcdir)/stamp-1 $(srcdir)/stamp-1: source-highlight-lib.texinfo $(top_srcdir)/configure @(dir=.; test -f ./source-highlight-lib.texinfo || dir=$(srcdir); \ set `$(SHELL) $(top_srcdir)/build-aux/mdate-sh $$dir/source-highlight-lib.texinfo`; \ echo "@set UPDATED $$1 $$2 $$3"; \ echo "@set UPDATED-MONTH $$2 $$3"; \ echo "@set EDITION $(VERSION)"; \ echo "@set VERSION $(VERSION)") > 1.tmp @cmp -s 1.tmp $(srcdir)/version-lib.texi \ || (echo "Updating $(srcdir)/version-lib.texi"; \ cp 1.tmp $(srcdir)/version-lib.texi) -@rm -f 1.tmp @cp $(srcdir)/version-lib.texi $@ mostlyclean-1: -rm -f 1.tmp maintainer-clean-1: @MAINTAINER_MODE_TRUE@ -rm -f $(srcdir)/stamp-1 $(srcdir)/version-lib.texi .dvi.ps: TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ $(DVIPS) -o $@ $< uninstall-dvi-am: @$(NORMAL_UNINSTALL) @list='$(DVIS)'; test -n "$(dvidir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(dvidir)/$$f'"; \ rm -f "$(DESTDIR)$(dvidir)/$$f"; \ done uninstall-html-am: @$(NORMAL_UNINSTALL) @list='$(HTMLS)'; test -n "$(htmldir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " rm -rf '$(DESTDIR)$(htmldir)/$$f'"; \ rm -rf "$(DESTDIR)$(htmldir)/$$f"; \ done uninstall-info-am: @$(PRE_UNINSTALL) @if test -d '$(DESTDIR)$(infodir)' && \ (install-info --version && \ install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \ list='$(INFO_DEPS)'; \ for file in $$list; do \ relfile=`echo "$$file" | sed 's|^.*/||'`; \ echo " install-info --info-dir='$(DESTDIR)$(infodir)' --remove '$(DESTDIR)$(infodir)/$$relfile'"; \ if install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \ then :; else test ! -f "$(DESTDIR)$(infodir)/$$relfile" || exit 1; fi; \ done; \ else :; fi @$(NORMAL_UNINSTALL) @list='$(INFO_DEPS)'; \ for file in $$list; do \ relfile=`echo "$$file" | sed 's|^.*/||'`; \ relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \ (if test -d "$(DESTDIR)$(infodir)" && cd "$(DESTDIR)$(infodir)"; then \ echo " cd '$(DESTDIR)$(infodir)' && rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]"; \ rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \ else :; fi); \ done uninstall-pdf-am: @$(NORMAL_UNINSTALL) @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(pdfdir)/$$f'"; \ rm -f "$(DESTDIR)$(pdfdir)/$$f"; \ done uninstall-ps-am: @$(NORMAL_UNINSTALL) @list='$(PSS)'; test -n "$(psdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(psdir)/$$f'"; \ rm -f "$(DESTDIR)$(psdir)/$$f"; \ done dist-info: $(INFO_DEPS) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ list='$(INFO_DEPS)'; \ for base in $$list; do \ case $$base in \ $(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \ esac; \ if test -f $$base; then d=.; else d=$(srcdir); fi; \ base_i=`echo "$$base" | sed 's|\.info$$||;s|$$|.i|'`; \ for file in $$d/$$base $$d/$$base-[0-9] $$d/$$base-[0-9][0-9] $$d/$$base_i[0-9] $$d/$$base_i[0-9][0-9]; do \ if test -f $$file; then \ relfile=`expr "$$file" : "$$d/\(.*\)"`; \ test -f "$(distdir)/$$relfile" || \ cp -p $$file "$(distdir)/$$relfile"; \ else :; fi; \ done; \ done mostlyclean-aminfo: -rm -rf source-highlight.aux source-highlight.cp source-highlight.cps \ source-highlight.fn source-highlight.fns source-highlight.ky \ source-highlight.kys source-highlight.log \ source-highlight.pg source-highlight.pgs \ source-highlight.tmp source-highlight.toc \ source-highlight.tp source-highlight.tps source-highlight.vr \ source-highlight.vrs source-highlight-lib.aux \ source-highlight-lib.cp source-highlight-lib.cps \ source-highlight-lib.fn source-highlight-lib.fns \ source-highlight-lib.ky source-highlight-lib.kys \ source-highlight-lib.log source-highlight-lib.pg \ source-highlight-lib.pgs source-highlight-lib.tmp \ source-highlight-lib.toc source-highlight-lib.tp \ source-highlight-lib.tps source-highlight-lib.vr \ source-highlight-lib.vrs clean-aminfo: -test -z "source-highlight.dvi source-highlight.pdf source-highlight.ps \ source-highlight.html source-highlight-lib.dvi \ source-highlight-lib.pdf source-highlight-lib.ps \ source-highlight-lib.html" \ || rm -rf source-highlight.dvi source-highlight.pdf source-highlight.ps \ source-highlight.html source-highlight-lib.dvi \ source-highlight-lib.pdf source-highlight-lib.ps \ source-highlight-lib.html maintainer-clean-aminfo: @list='$(INFO_DEPS)'; for i in $$list; do \ i_i=`echo "$$i" | sed 's|\.info$$||;s|$$|.i|'`; \ echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \ rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \ done install-man1: $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" @list=''; test -n "$(man1dir)" || exit 0; \ { for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ done; } uninstall-man1: @$(NORMAL_UNINSTALL) @list=''; test -n "$(man1dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ test -z "$$files" || { \ echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(man1dir)" && rm -f $$files; } install-source_highlightdataDATA: $(source_highlightdata_DATA) @$(NORMAL_INSTALL) test -z "$(source_highlightdatadir)" || $(MKDIR_P) "$(DESTDIR)$(source_highlightdatadir)" @list='$(source_highlightdata_DATA)'; test -n "$(source_highlightdatadir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(source_highlightdatadir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(source_highlightdatadir)" || exit $$?; \ done uninstall-source_highlightdataDATA: @$(NORMAL_UNINSTALL) @list='$(source_highlightdata_DATA)'; test -n "$(source_highlightdatadir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(source_highlightdatadir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(source_highlightdatadir)" && rm -f $$files install-source_highlightdocDATA: $(source_highlightdoc_DATA) @$(NORMAL_INSTALL) test -z "$(source_highlightdocdir)" || $(MKDIR_P) "$(DESTDIR)$(source_highlightdocdir)" @list='$(source_highlightdoc_DATA)'; test -n "$(source_highlightdocdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(source_highlightdocdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(source_highlightdocdir)" || exit $$?; \ done uninstall-source_highlightdocDATA: @$(NORMAL_UNINSTALL) @list='$(source_highlightdoc_DATA)'; test -n "$(source_highlightdocdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(source_highlightdocdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(source_highlightdocdir)" && rm -f $$files tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @list='$(MANS)'; if test -n "$$list"; then \ list=`for p in $$list; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ if test -n "$$list" && \ grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ echo " typically \`make maintainer-clean' will remove them" >&2; \ exit 1; \ else :; fi; \ else :; fi @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-info check-am: all-am check: check-am all-am: Makefile $(INFO_DEPS) $(MANS) $(DATA) installdirs: for dir in "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(source_highlightdatadir)" "$(DESTDIR)$(source_highlightdocdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-aminfo clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: $(DVIS) html: html-am html-am: $(HTMLS) info: info-am info-am: $(INFO_DEPS) install-data-am: install-info-am install-man \ install-source_highlightdataDATA \ install-source_highlightdocDATA install-dvi: install-dvi-am install-dvi-am: $(DVIS) @$(NORMAL_INSTALL) test -z "$(dvidir)" || $(MKDIR_P) "$(DESTDIR)$(dvidir)" @list='$(DVIS)'; test -n "$(dvidir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(dvidir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(dvidir)" || exit $$?; \ done install-exec-am: install-html: install-html-am install-html-am: $(HTMLS) @$(NORMAL_INSTALL) test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)" @list='$(HTMLS)'; list2=; test -n "$(htmldir)" || list=; \ for p in $$list; do \ if test -f "$$p" || test -d "$$p"; then d=; else d="$(srcdir)/"; fi; \ $(am__strip_dir) \ if test -d "$$d$$p"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)/$$f'"; \ $(MKDIR_P) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \ echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \ $(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f" || exit $$?; \ else \ list2="$$list2 $$d$$p"; \ fi; \ done; \ test -z "$$list2" || { echo "$$list2" | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(htmldir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)" || exit $$?; \ done; } install-info: install-info-am install-info-am: $(INFO_DEPS) @$(NORMAL_INSTALL) test -z "$(infodir)" || $(MKDIR_P) "$(DESTDIR)$(infodir)" @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \ for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ esac; \ if test -f $$file; then d=.; else d=$(srcdir); fi; \ file_i=`echo "$$file" | sed 's|\.info$$||;s|$$|.i|'`; \ for ifile in $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9] \ $$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \ if test -f $$ifile; then \ echo "$$ifile"; \ else : ; fi; \ done; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(infodir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(infodir)" || exit $$?; done @$(POST_INSTALL) @if (install-info --version && \ install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \ list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \ for file in $$list; do \ relfile=`echo "$$file" | sed 's|^.*/||'`; \ echo " install-info --info-dir='$(DESTDIR)$(infodir)' '$(DESTDIR)$(infodir)/$$relfile'";\ install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$relfile" || :;\ done; \ else : ; fi install-man: install-man1 install-pdf: install-pdf-am install-pdf-am: $(PDFS) @$(NORMAL_INSTALL) test -z "$(pdfdir)" || $(MKDIR_P) "$(DESTDIR)$(pdfdir)" @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pdfdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pdfdir)" || exit $$?; done install-ps: install-ps-am install-ps-am: $(PSS) @$(NORMAL_INSTALL) test -z "$(psdir)" || $(MKDIR_P) "$(DESTDIR)$(psdir)" @list='$(PSS)'; test -n "$(psdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(psdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(psdir)" || exit $$?; done installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-1 \ maintainer-clean-aminfo maintainer-clean-generic \ maintainer-clean-vti mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-1 mostlyclean-aminfo mostlyclean-generic \ mostlyclean-libtool mostlyclean-vti pdf: pdf-am pdf-am: $(PDFS) ps: ps-am ps-am: $(PSS) uninstall-am: uninstall-dvi-am uninstall-html-am uninstall-info-am \ uninstall-man uninstall-pdf-am uninstall-ps-am \ uninstall-source_highlightdataDATA \ uninstall-source_highlightdocDATA uninstall-man: uninstall-man1 .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-aminfo clean-generic \ clean-libtool dist-info distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-man1 install-pdf install-pdf-am install-ps \ install-ps-am install-source_highlightdataDATA \ install-source_highlightdocDATA install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-1 maintainer-clean-aminfo \ maintainer-clean-generic maintainer-clean-vti mostlyclean \ mostlyclean-1 mostlyclean-aminfo mostlyclean-generic \ mostlyclean-libtool mostlyclean-vti pdf pdf-am ps ps-am \ uninstall uninstall-am uninstall-dvi-am uninstall-html-am \ uninstall-info-am uninstall-man uninstall-man1 \ uninstall-pdf-am uninstall-ps-am \ uninstall-source_highlightdataDATA \ uninstall-source_highlightdocDATA #source-highlight.texinfo: $(GENERATEDINFOS) $(DISTRIBUTEDINFOS) lang-list.texinfo: $(top_srcdir)/src/lang.map $(SRCHILITEEXE) --data-dir=$(top_srcdir)/src/ --lang-list | sed -e 's/@/@@/' > $@ outlang-list.texinfo: $(top_srcdir)/src/outlang.map $(SRCHILITEEXE) --data-dir=$(top_srcdir)/src/ --outlang-list | sed -e 's/@/@@/' > $@ test.java.texinfo: $(top_srcdir)/tests/test.java $(SRCHILITEEXE) --data-dir=$(top_srcdir)/src/ -f texinfo -i $(top_srcdir)/tests/test.java --style-file=$(top_srcdir)/src/texinfo.style -n > $@ test_lineranges1.java.texinfo: $(top_srcdir)/tests/test.java $(SRCHILITEEXE) --data-dir=$(top_srcdir)/src/ -f texinfo -i $(top_srcdir)/tests/test.java --style-file=$(top_srcdir)/src/texinfo.style --line-range="12-18","29-34" -n > $@ test_lineranges2.java.texinfo: $(top_srcdir)/tests/test.java $(SRCHILITEEXE) --data-dir=$(top_srcdir)/src/ -f texinfo -i $(top_srcdir)/tests/test.java --style-file=$(top_srcdir)/src/texinfo.style --line-range="12-18","29-34" -n --range-context=2 --range-separator="{... not in range ...}" > $@ test_regexrange1.java.texinfo: $(top_srcdir)/tests/test.java $(SRCHILITEEXE) --data-dir=$(top_srcdir)/src/ -f texinfo -i $(top_srcdir)/tests/test.java --style-file=$(top_srcdir)/src/texinfo.style --regex-range="/// [[:alpha:]]+" -n > $@ test_regexrange_main.java.texinfo: $(top_srcdir)/tests/test.java $(SRCHILITEEXE) --data-dir=$(top_srcdir)/src/ -f texinfo -i $(top_srcdir)/tests/test.java --style-file=$(top_srcdir)/src/texinfo.style --regex-range="/\* main \*/" -n > $@ test_regexrange_methods.java.texinfo: $(top_srcdir)/tests/test.java $(SRCHILITEEXE) --data-dir=$(top_srcdir)/src/ -f texinfo -i $(top_srcdir)/tests/test.java --style-file=$(top_srcdir)/src/texinfo.style --regex-range="/\* [[:alpha:]]+ \*/" -n > $@ test_vardecl.cc.texinfo: $(top_srcdir)/tests/test_vardecl.cc $(SRCHILITEEXE) --data-dir=$(top_srcdir)/src/ -f texinfo -i $(top_srcdir)/tests/test_vardecl.cc --style-file=$(srcdir)/highlight_type.style > $@ debug.java.texinfo: $(top_srcdir)/tests/debug.java $(SRCHILITEEXE) --data-dir=$(top_srcdir)/src/ -f texinfo -i $(top_srcdir)/tests/debug.java --style-file=$(top_srcdir)/src/texinfo.style -n > $@ cpp.langelems.texinfo: $(top_srcdir)/src/cpp.lang $(top_srcdir)/src/c.lang $(SRCHILITEEXE) --data-dir=$(top_srcdir)/src/ --show-lang-elements=$(top_srcdir)/src/cpp.lang > $@ log.langelems.texinfo: $(top_srcdir)/src/log.lang $(SRCHILITEEXE) --data-dir=$(top_srcdir)/src/ --show-lang-elements=$(top_srcdir)/src/log.lang > $@ .txt.txt.texinfo: $(SRCHILITEEXE) --data-dir=$(top_srcdir)/src/ -f texinfo -i $< --style-file=$(top_srcdir)/src/texinfo.style -o $@ style.defaults.texinfo: $(top_srcdir)/src/style.defaults $(SRCHILITEEXE) --data-dir=$(top_srcdir)/src/ -f texinfo -i $(top_srcdir)/src/style.defaults --style-file=$(top_srcdir)/src/texinfo.style -o $@ --lang-def=nohilite.lang .txt.texinfo.txt.texinfo.texinfo: $(SRCHILITEEXE) --data-dir=$(top_srcdir)/src/ -f texinfo -i $< --style-file=$(top_srcdir)/src/texinfo.style -o $@ --lang-def=nohilite.lang html_common.outlang.texinfo: $(top_srcdir)/src/html_common.outlang $(SRCHILITEEXE) --data-dir=$(top_srcdir)/src/ -f texinfo -i $(top_srcdir)/src/html_common.outlang --style-file=$(top_srcdir)/src/texinfo.style -o $@ javadoc.outlang.texinfo: $(top_srcdir)/src/javadoc.outlang $(SRCHILITEEXE) --data-dir=$(top_srcdir)/src/ -f texinfo -i $(top_srcdir)/src/javadoc.outlang --style-file=$(top_srcdir)/src/texinfo.style -o $@ test_newlines.lang.texinfo: $(top_srcdir)/tests/test_newlines.lang $(LANG2TEXINFO) -i $(top_srcdir)/tests/test_newlines.lang test_nonewlines.lang.texinfo: $(top_srcdir)/tests/test_nonewlines.lang $(LANG2TEXINFO) -i $(top_srcdir)/tests/test_nonewlines.lang test_string_stop.lang.texinfo: $(top_srcdir)/tests/test_string_stop.lang $(LANG2TEXINFO) -i $(top_srcdir)/tests/test_string_stop.lang langdef.lang.texinfo: $(top_srcdir)/src/langdef.lang $(LANG2TEXINFO) -i $(top_srcdir)/src/langdef.lang style.lang.texinfo: $(top_srcdir)/src/style.lang $(LANG2TEXINFO) -i $(top_srcdir)/src/style.lang cpp.lang.texinfo: $(top_srcdir)/src/cpp.lang $(LANG2TEXINFO) -i $(top_srcdir)/src/cpp.lang c.lang.texinfo: $(top_srcdir)/src/c.lang $(LANG2TEXINFO) -i $(top_srcdir)/src/c.lang csharp.lang.texinfo: $(top_srcdir)/src/csharp.lang $(LANG2TEXINFO) -i $(top_srcdir)/src/csharp.lang c_comment.lang.texinfo: $(top_srcdir)/src/c_comment.lang $(LANG2TEXINFO) -i $(top_srcdir)/src/c_comment.lang clike_vardeclaration.lang.texinfo: $(top_srcdir)/src/clike_vardeclaration.lang $(LANG2TEXINFO) -i $(top_srcdir)/src/clike_vardeclaration.lang c_string.lang.texinfo: $(top_srcdir)/src/c_string.lang $(LANG2TEXINFO) -i $(top_srcdir)/src/c_string.lang symbols.lang.texinfo: $(top_srcdir)/src/symbols.lang $(LANG2TEXINFO) -i $(top_srcdir)/src/symbols.lang function.lang.texinfo: $(top_srcdir)/src/function.lang $(LANG2TEXINFO) -i $(top_srcdir)/src/function.lang diff.lang.texinfo: $(top_srcdir)/src/diff.lang $(LANG2TEXINFO) -i $(top_srcdir)/src/diff.lang extreme_comment.lang.texinfo: $(top_srcdir)/src/extreme_comment.lang $(LANG2TEXINFO) -i $(top_srcdir)/src/extreme_comment.lang extreme_comment2.lang.texinfo: $(top_srcdir)/src/extreme_comment2.lang $(LANG2TEXINFO) -i $(top_srcdir)/src/extreme_comment2.lang extreme_comment3.lang.texinfo: $(top_srcdir)/src/extreme_comment3.lang $(LANG2TEXINFO) -i $(top_srcdir)/src/extreme_comment3.lang extreme_comment4.lang.texinfo: $(top_srcdir)/src/extreme_comment4.lang $(LANG2TEXINFO) -i $(top_srcdir)/src/extreme_comment4.lang .lang.lang.texinfo: $(SRCHILITEEXE) --data-dir=$(top_srcdir)/src/ -f texinfo -i $< --style-file=$(top_srcdir)/src/texinfo.style -o $@ default.style.texinfo: $(top_srcdir)/src/default.style $(SRCHILITEEXE) --data-dir=$(top_srcdir)/src/ -f texinfo -i $(top_srcdir)/src/default.style --style-file=$(top_srcdir)/src/texinfo.style -o $@ texinfo.style.texinfo: $(top_srcdir)/src/texinfo.style $(SRCHILITEEXE) --data-dir=$(top_srcdir)/src/ -f texinfo -i $(top_srcdir)/src/texinfo.style --style-file=$(top_srcdir)/src/texinfo.style -o $@ syslog.style.texinfo: $(top_srcdir)/tests/syslog.style $(SRCHILITEEXE) --data-dir=$(top_srcdir)/src/ -f texinfo -i $(top_srcdir)/tests/syslog.style --style-file=$(top_srcdir)/src/texinfo.style -o $@ .diff.diff.texinfo: $(SRCHILITEEXE) --data-dir=$(top_srcdir)/src/ -f texinfo -i $< --style-file=$(top_srcdir)/src/texinfo.style -o $@ .cpp.cpp.texinfo: $(SRCHILITEEXE) --data-dir=$(top_srcdir)/src/ -f texinfo -i $< --style-file=$(top_srcdir)/src/texinfo.style -o $@ .css.css.texinfo: $(SRCHILITEEXE) --data-dir=$(top_srcdir)/src/ -f texinfo -i $< --style-file=$(top_srcdir)/src/texinfo.style -o $@ default.css.texinfo: $(top_srcdir)/src/default.css $(SRCHILITEEXE) --data-dir=$(top_srcdir)/src/ -f texinfo -i $(top_srcdir)/src/default.css --style-file=$(top_srcdir)/src/texinfo.style -o $@ test_extreme_comment.cpp.texinfo: $(top_srcdir)/tests/test_extreme_comment.cpp $(SRCHILITEEXE) --data-dir=$(top_srcdir)/src/ -f texinfo -i $(top_srcdir)/tests/test_extreme_comment.cpp --style-file=$(top_srcdir)/src/texinfo.style -o $@ test_extreme_comment_wrong.texinfo: $(top_srcdir)/tests/test_extreme_comment.cpp $(SRCHILITEEXE) --data-dir=$(top_srcdir)/src/ -f texinfo -i $(top_srcdir)/tests/test_extreme_comment.cpp --style-file=$(top_srcdir)/src/texinfo.style -o $@ --lang-def=extreme_comment.lang test_extreme_comment_1.texinfo: $(top_srcdir)/tests/test_extreme_comment.cpp $(SRCHILITEEXE) --data-dir=$(top_srcdir)/src/ -f texinfo -i $(top_srcdir)/tests/test_extreme_comment.cpp --style-file=$(top_srcdir)/src/texinfo.style -o $@ --lang-def=extreme_comment2.lang test_extreme_comment_wrong2.texinfo: $(top_srcdir)/tests/test_extreme_comment2.cpp $(SRCHILITEEXE) --data-dir=$(top_srcdir)/src/ -f texinfo -i $(top_srcdir)/tests/test_extreme_comment2.cpp --style-file=$(top_srcdir)/src/texinfo.style -o $@ --lang-def=extreme_comment2.lang test_extreme_comment_2.texinfo: $(top_srcdir)/tests/test_extreme_comment2.cpp $(SRCHILITEEXE) --data-dir=$(top_srcdir)/src/ -f texinfo -i $(top_srcdir)/tests/test_extreme_comment2.cpp --style-file=$(top_srcdir)/src/texinfo.style -o $@ --lang-def=extreme_comment3.lang test_extreme_comment_3.texinfo: $(top_srcdir)/tests/test_extreme_comment3.cpp $(SRCHILITEEXE) --data-dir=$(top_srcdir)/src/ -f texinfo -i $(top_srcdir)/tests/test_extreme_comment3.cpp --style-file=$(top_srcdir)/src/texinfo.style -o $@ --lang-def=extreme_comment3.lang source-highlight-console-main.cpp.texinfo: $(top_srcdir)/lib/examples/source-highlight-console-main.cpp $(SRCHILITETEXINFO) $(top_srcdir)/lib/examples/source-highlight-console-main.cpp --regex-range="//> TEXINFO" debuglistener.cpp.texinfo: $(top_srcdir)/lib/srchilite/debuglistener.cpp $(SRCHILITETEXINFO) $(top_srcdir)/lib/srchilite/debuglistener.cpp --regex-range="//> TEXINFO" infoformatter.h.texinfo: $(top_srcdir)/lib/examples/infoformatter.h $(SRCHILITETEXINFO) $(top_srcdir)/lib/examples/infoformatter.h --regex-range="//> TEXINFO" styleformatter.h.texinfo: $(top_srcdir)/lib/examples/infoformatter.h $(SRCHILITETEXINFO) $(top_srcdir)/lib/examples/infoformatter.h --regex-range="//> TEXINFO" infoformatter-main.cpp.texinfo: $(top_srcdir)/lib/examples/infoformatter-main.cpp $(SRCHILITETEXINFO) $(top_srcdir)/lib/examples/infoformatter-main.cpp --regex-range="//> TEXINFO" styleformatter-main.cpp.texinfo: $(top_srcdir)/lib/examples/styleformatter-main.cpp $(SRCHILITETEXINFO) $(top_srcdir)/lib/examples/styleformatter-main.cpp --regex-range="//> TEXINFO" styleformatter.h.texinfo: $(top_srcdir)/lib/examples/styleformatter.h $(SRCHILITETEXINFO) $(top_srcdir)/lib/examples/styleformatter.h --regex-range="//> TEXINFO" styleformatterfactory.h.texinfo: $(top_srcdir)/lib/examples/styleformatterfactory.h $(SRCHILITETEXINFO) $(top_srcdir)/lib/examples/styleformatterfactory.h --regex-range="//> TEXINFO" .lang.show.texinfo: $(SRCHILITEEXE) --show-regex=$< | $(SRCHILITEPROG) -f texinfo --style-file=$(top_srcdir)/src/texinfo.style --lang-def=nohilite.lang > $@ # $(SRCHILITEEXE) --show-regex=$< > $@ # sed -itesttmp -e 's/@/@@/g' $@ && rm -f *testtmp # the following rules have to do only with maintainance of the package # help-output.texinfo: $(top_srcdir)/src/lib/cmdline.ggo # $(SRCHILITEEXE) --help | sed -e 's/@/@@/' > $@ @MAINTAINER_MODE_TRUE@@NO_GENGETOPT_TRUE@$(top_srcdir)/doc/help-output.texinfo: $(top_srcdir)/src/cmdline.ggo @MAINTAINER_MODE_TRUE@@NO_GENGETOPT_TRUE@ touch $@ @MAINTAINER_MODE_TRUE@@NO_GENGETOPT_FALSE@$(top_srcdir)/doc/help-output.texinfo: $(top_srcdir)/src/cmdline.ggo @MAINTAINER_MODE_TRUE@@NO_GENGETOPT_FALSE@ $(GENGETOPT) --show-detailed-help -i $(top_srcdir)/src/cmdline.ggo --set-package="source-highlight" --set-version="" > $@ @MAINTAINER_MODE_TRUE@$(top_srcdir)/doc/test_ref.h.texinfo: $(top_srcdir)/tests/test.h @MAINTAINER_MODE_TRUE@ $(SRCHILITEEXE) --data-dir=$(top_srcdir)/src/ -f texinfo -i $(top_srcdir)/tests/test.h --style-file=$(top_srcdir)/src/texinfo.style -n --gen-references=postline > $@ # the dependence on config.h is to ensure the correct version number # in the generated man file @MAINTAINER_MODE_TRUE@@NO_HELP2MAN_TRUE@source-highlight.1: $(top_srcdir)/src/cmdline.ggo $(top_builddir)/config.h @MAINTAINER_MODE_TRUE@@NO_HELP2MAN_TRUE@ touch $@ @MAINTAINER_MODE_TRUE@@NO_HELP2MAN_FALSE@source-highlight.1: $(top_srcdir)/src/cmdline.ggo $(top_builddir)/config.h @MAINTAINER_MODE_TRUE@@NO_HELP2MAN_FALSE@ $(HELP2MAN) -n "convert source code to syntax highlighted document" $(SRCHILITEEXE) > $@ # note that $(srcdir) actually points to doc dir langdef.lang.html: $(top_srcdir)/src/langdef.lang $(SRCHILITEPROG) $(STD_STYLE) -i $(top_srcdir)/src/langdef.lang -o langdef.lang.html source-highlight.cc.html: $(top_srcdir)/src/source-highlight.cc $(CPP2HTML) --doc $(OUTPUT_HERE) $(top_srcdir)/src/source-highlight.cc #ChangeLog.html: $(top_srcdir)/ChangeLog # $(CHANGELOG2HTML) --doc $(OUTPUT_HERE) $(top_srcdir)/ChangeLog flex_scanner.ll.html: $(srcdir)/flex_scanner.ll $(FLEX2HTML) --doc $(OUTPUT_HERE) $(srcdir)/flex_scanner.ll # cmdline.c.html: $(top_srcdir)/src/lib/cmdline.c # $(CPP2HTML) --doc $(OUTPUT_HERE) --css="$(srcdir)/cpp2html.css" --header="$(srcdir)/header.html" --footer="$(srcdir)/footer.html" $(top_srcdir)/src/lib/cmdline.c cmdline.h.html: $(top_srcdir)/src/cmdline.h $(CPP2HTML) --doc $(OUTPUT_HERE) --css="$(srcdir)/mono.css" $(top_srcdir)/src/cmdline.h #BUILD_REFS = $(CPP2HTML_WREFS) --ctags-file=my_test_ref.tags --line-number $(srcdir)/test_refs.h $(srcdir)/test_refs.cpp SimpleClass.html: $(srcdir)/SimpleClass.java $(PROGNAME) --input $(srcdir)/SimpleClass.java --output SimpleClass.html --doc UsageExample.html: $(srcdir)/UsageExample.java $(PROGNAME) --input $(srcdir)/UsageExample.java --output UsageExample.html --doc Hello1.html: $(srcdir)/Hello.java $(BUILD_HELLO1) Hello2.html: $(srcdir)/Hello.java $(BUILD_HELLO2) Hello3.html: $(srcdir)/Hello.java $(BUILD_HELLO3) Hello4.html: $(srcdir)/Hello.java $(BUILD_HELLO4) Hello5.html: $(srcdir)/Hello.java $(BUILD_HELLO5) Hello.java.html: $(srcdir)/Hello.java $(BUILD_HELLO_HTML) Hello_h_f.html: $(srcdir)/Hello.java header.html footer.html $(BUILD_HELLO_W_HEADER_FOOTER) Hello_lines.html: $(srcdir)/Hello.java $(BUILD_HELLO_LINES) Hello_xhtml.html: $(srcdir)/Hello.java $(BUILD_HELLO_XHTML) Hello_xhtml2.html: $(srcdir)/Hello.java $(BUILD_HELLO_XHTML2) Hello_notfixed.html: $(srcdir)/Hello.java $(BUILD_HELLO_HTMLNOTFIXED) style_examples.html: $(srcdir)/Hello.java cat $(srcdir)/style_examples_header.html > style_examples.html #./gen_style_example.sh default.css >> style_examples.html for style in $(CSS_FILES); do \ ./gen_style_example.sh $$style >> style_examples.html ; \ done ; \ cat $(srcdir)/style_examples_footer.html >> style_examples.html check: $(BUILD_HELLO1) $(BUILD_HELLO2) $(BUILD_HELLO3) $(BUILD_HELLO4) $(BUILD_HELLO5) $(BUILD_HELLO_HTML) $(BUILD_HELLO_W_HEADER_FOOTER) $(BUILD_HELLO_LINES) $(BUILD_HELLO_XHTML) $(BUILD_HELLO_XHTML2) $(BUILD_HELLO_HTMLNOTFIXED) html-clean: rm -f $(HTML_GENERATED_FILES) texinfo-clean: rm -f $(GENERATEDINFOS) $(EXAMPLEINFOS) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/shjs_css_transform.sh.in�������������������������������������������������0000644�0001750�0001750�00000000367�11672675562�017356� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#! @SHELL@ # transform a css file taken from SHJS (http://shjs.sourceforge.net) # into a css style file compatible with source-highlight for arg in $* do sed -f shjs_css_transform.sed $arg > transform.temp mv -f transform.temp $arg done �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/style_examples_header.html�����������������������������������������������0000644�0001750�0001750�00000001151�11672675562�017727� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta name="GENERATOR" content="GNU source-highlight 2.6rc by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite"> <title>Source-highlight style examples</title> </head> <body> <h1>Source-highlight style examples</h1> <p>These are the outputs (in XHTML, with command line option <tt>--outlang-def=xhtmltable.outlang</tt>) produced with several CSS style files shipped with source-highlight (with command line option <tt>--style-css-file</tt> </p>�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/test_extreme_comment_wrong2.texinfo��������������������������������������0000664�0001750�0001750�00000001174�11675045061�021614� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@c Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite @example @r{@i{// test special #if 0 treatment}} @b{int} main() @{ @r{@i{#if 0 // equivalent to a comment}} @r{@i{ int i = 10;}} @r{@i{ printf("this should never be executed\n");}} @r{@i{# ifdef FOO}} @r{@i{ printf("foo\n");}} @r{@i{# ifndef BAR}} @r{@i{ printf("no bar\n");}} @r{@i{# else}} @b{# endif} @b{# else} printf(@t{"no foo}\n@t{"}); @b{# endif} @r{@i{// FOO}} @b{return} 1; @b{#else} printf(@t{"Hello world!}\n@t{"}); @b{return} 0; @b{#endif} printf(@t{"never reach here!}\n@t{"}); @} @end example����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/stamp-1������������������������������������������������������������������0000644�0001750�0001750�00000000145�11675045063�013670� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@set UPDATED 16 December 2011 @set UPDATED-MONTH December 2011 @set EDITION 3.1.6 @set VERSION 3.1.6 ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/default.style.texinfo����������������������������������������������������0000664�0001750�0001750�00000005133�11675045057�016653� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@c Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite @example @b{bgcolor} @t{"white"}; @r{@i{// the background color for documents}} @t{@i{context}} @b{gray}; @r{@i{// the color for context lines (when specified with line ranges)}} @t{@i{keyword}} @b{blue} @b{b} ; @r{@i{// for language keywords}} @t{@i{type}} @b{darkgreen} ; @r{@i{// for basic types}} @t{@i{usertype}} @b{teal} ; @r{@i{// for user defined types}} @t{@i{string}} @b{red} @b{f} ; @r{@i{// for strings and chars}} @t{@i{regexp}} @b{orange} @b{f} ; @r{@i{// for strings and chars}} @t{@i{specialchar}} @b{pink} @b{f} ; @r{@i{// for special chars, e.g., \n, \t, \\}} @t{@i{comment}} @b{brown} @b{i}, @b{noref}; @r{@i{// for comments}} @t{@i{number}} @b{purple} ; @r{@i{// for literal numbers}} @t{@i{preproc}} @b{darkblue} @b{b} ; @r{@i{// for preproc directives (e.g. #include, import)}} @t{@i{symbol}} @b{darkred} ; @r{@i{// for simbols (e.g. <, >, +)}} @t{@i{function}} @b{black} @b{b}; @r{@i{// for function calls and declarations}} @t{@i{cbracket}} @b{red}; @r{@i{// for block brackets (e.g. @{, @})}} @t{@i{todo}} @b{bg:cyan} @b{b}; @r{@i{// for TODO and FIXME}} @t{@i{code}} @b{bg:brightgreen} @b{b}; @r{@i{// for code snippets}} @r{@i{//Predefined variables and functions (for instance glsl)}} @t{@i{predef_var}} @b{darkblue} ; @t{@i{predef_func}} @b{darkblue} @b{b} ; @r{@i{// for OOP}} @t{@i{classname}} @b{teal} ; @r{@i{// for class names, e.g., in Java and C++}} @r{@i{// line numbers}} @b{linenum} @b{black} @b{f}; @r{@i{// Internet related}} @t{@i{url}} @b{blue} @b{u}, @b{f}; @r{@i{// other elements for ChangeLog and Log files}} @t{@i{date}} @b{blue} @b{b} ; @t{@i{time}}, @t{@i{file}} @b{darkblue} @b{b} ; @t{@i{ip}}, @t{@i{name}} @b{darkgreen} ; @r{@i{// for Prolog, Perl...}} @t{@i{variable}} @b{darkgreen} ; @r{@i{// explicit for Latex}} @t{@i{italics}} @b{darkgreen} @b{i}; @t{@i{bold}} @b{darkgreen} @b{b}; @t{@i{underline}} @b{darkgreen} @b{u}; @t{@i{fixed}} @b{green} @b{f}; @t{@i{argument}} @b{darkgreen}; @t{@i{optionalargument}} @b{purple}; @t{@i{math}} @b{orange}; @t{@i{bibtex}} @b{blue}; @r{@i{// for diffs}} @t{@i{oldfile}} @b{orange}; @t{@i{newfile}} @b{darkgreen}; @t{@i{difflines}} @b{blue}; @r{@i{// for css}} @t{@i{selector}} @b{purple}; @t{@i{property}} @b{blue}; @t{@i{value}} @b{darkgreen} @b{i}; @r{@i{// for oz}} @t{@i{atom}} @b{orange}; @t{@i{meta}} @b{i}; @r{@i{// for file system}} @t{@i{path}} @b{orange}; @r{@i{// for C (or other language) labels}} @t{@i{label}} @b{teal} @b{b}; @r{@i{// for errors}} @t{@i{error}} @b{purple}; @t{@i{warning}} @b{darkgreen}; @end example�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/sh_pablo.css�������������������������������������������������������������0000644�0001750�0001750�00000001647�11672675562�015006� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������body { background-color: #000000; color: #ffffff; font-weight: normal; font-style: normal; } .keyword { color: #c0c000; font-weight: bold; font-style: normal; } .type { color: #00c000; font-weight: bold; font-style: normal; } .string { color: #00ffff; font-weight: normal; font-style: normal; } .specialchar { color: #0000ff; font-weight: normal; font-style: normal; } .comment { color: #808080; font-weight: normal; font-style: normal; } .number { color: #00ffff; font-weight: normal; font-style: normal; } .preproc { color: #00ff00; font-weight: normal; font-style: normal; } .symbol { color: #ff0000; font-weight: normal; font-style: normal; } .function { color: #ff22b9; font-weight: normal; font-style: normal; } .cbracket { color: #ff0000; font-weight: normal; font-style: normal; } �����������������������������������������������������������������������������������������source-highlight-3.1.6/doc/cpp.lang.texinfo���������������������������������������������������������0000664�0001750�0001750�00000001165�11675045057�015573� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@c Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite @example @r{@i{# definitions for C++}} @r{@i{# most of it is shared with c.lang}} (@t{@i{keyword}},@t{@i{normal}},@t{@i{classname}}) = @t{`(\<(?:class|struct|typename))([[:blank:]]+)([[:alnum:]_]+)`} @t{@i{keyword}} = @t{"class|const_cast|delete"}, @t{"dynamic_cast|explicit|false|friend"}, @t{"inline|mutable|namespace|new|operator|private|protected"}, @t{"public|reinterpret_cast|static_cast"}, @t{"template|this|throw|true"}, @t{"try|typeid|typename"}, @t{"using|virtual"} @b{include} @t{"c.lang"} @end example�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/sh_easter.css������������������������������������������������������������0000644�0001750�0001750�00000001647�11672675562�015174� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������body { background-color: #ffff80; color: #2C7B34; font-weight: normal; font-style: normal; } .keyword { color: #1d45d6; font-weight: bold; font-style: normal; } .type { color: #ed0f55; font-weight: bold; font-style: normal; } .string { color: #ca4be3; font-weight: normal; font-style: normal; } .specialchar { color: #ca4be3; font-weight: normal; font-style: normal; } .comment { color: #24c815; font-weight: normal; font-style: italic; } .number { color: #e11a70; font-weight: normal; font-style: normal; } .preproc { color: #1583b1; font-weight: normal; font-style: normal; } .symbol { color: #fa4700; font-weight: normal; font-style: normal; } .function { color: #1d45d6; font-weight: normal; font-style: normal; } .cbracket { color: #fa4700; font-weight: normal; font-style: normal; } �����������������������������������������������������������������������������������������source-highlight-3.1.6/doc/Hello2.css���������������������������������������������������������������0000644�0001750�0001750�00000000421�11672675561�014330� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������BODY { font-weight: normal; background-color: #E0E0E0; } .keyword { color: brown; font-weight: bold; } .type { color: brown; font-weight: bold; } .string { color: darkgreen; } .comment { color: navy; font-style: italic; } .number { color: blue; } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/texinfo.style.texinfo����������������������������������������������������0000664�0001750�0001750�00000001064�11675045057�016702� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@c Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite @example @t{@i{keyword}}, @t{@i{type}} @b{b} ; @t{@i{variable}} @b{f}, @b{i} ; @t{@i{string}} @b{f} ; @t{@i{regexp}} @b{f} ; @t{@i{comment}} @b{nf}, @b{i}, @b{noref} ; @t{@i{preproc}} @b{b} ; @r{@i{// line numbers}} @b{linenum} @b{f}; @r{@i{// Internet related}} @t{@i{url}} @b{f}; @r{@i{// for diffs}} @t{@i{oldfile}}, @t{@i{newfile}} @b{i}; @t{@i{difflines}} @b{b}; @r{@i{// for css}} @t{@i{selector}}, @t{@i{property}} @b{b}; @t{@i{value}} @b{i}; @end example����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/sh_greenlcd.css����������������������������������������������������������0000644�0001750�0001750�00000001651�11672675562�015467� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������body { background-color: #003400; color: #00bb00; font-weight: normal; font-style: normal; } .keyword { color: #00ed00; font-weight: bold; font-style: normal; } .type { color: #00ed00; font-weight: normal; font-style: normal; } .string { color: #dfdfdf; font-weight: normal; font-style: normal; } .specialchar { color: #dfdfdf; font-weight: normal; font-style: normal; } .comment { color: #888888; font-weight: normal; font-style: italic; } .number { color: #ffffff; font-weight: normal; font-style: normal; } .preproc { color: #bfbfbf; font-weight: normal; font-style: normal; } .symbol { color: #2fe7a9; font-weight: normal; font-style: normal; } .function { color: #c0ff73; font-weight: normal; font-style: normal; } .cbracket { color: #2fe7a9; font-weight: normal; font-style: normal; } ���������������������������������������������������������������������������������������source-highlight-3.1.6/doc/sh_darkblue.css����������������������������������������������������������0000644�0001750�0001750�00000001645�11672675562�015500� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������body { background-color: #000040; color: #C7C7C7; font-weight: normal; font-style: normal; } .keyword { color: #ffff60; font-weight: normal; font-style: normal; } .type { color: #60ff60; font-weight: normal; font-style: normal; } .string { color: #ffa0a0; font-weight: normal; font-style: normal; } .specialchar { color: #ffa500; font-weight: normal; font-style: normal; } .comment { color: #80a0ff; font-weight: normal; font-style: normal; } .number { color: #42cad9; font-weight: normal; font-style: normal; } .preproc { color: #ff80ff; font-weight: normal; font-style: normal; } .symbol { color: #d8e91b; font-weight: bold; font-style: normal; } .function { color: #ffffff; font-weight: bold; font-style: normal; } .cbracket { color: #d8e91b; font-weight: bold; font-style: normal; } �������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/flex_scanner.ll����������������������������������������������������������0000644�0001750�0001750�00000013203�11672675561�015473� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������%{ #include "genfun.h" #if 0 #define PUSH(s) \ yy_push_state(s); \ generateNewLine(); \ generate_normal("<!-- PUSH " #s " -->"); \ generateNewLine(); #define POP(s) \ yy_pop_state(); \ generateNewLine(); \ generate_normal("<!-- POP " #s " -->"); \ generateNewLine(); #else #define PUSH(s) yy_push_state(s); #define POP(s) yy_pop_state(); #endif #define TRIMNORMAL(n)\ do{ if(yyleng > n){\ yytext[yyleng - n]= '\0';\ generate_normal(yytext);\ }}while(0) %} %option stack nomain yylineno noyywrap nounput %option prefix="flex_scanner_" %x verbatim_code options name_def sc_decl in_string sect2 pattern %x comment sect2prolog start_cond sect3 NL \r?\n OPTWS [[:blank:]]* WS [[:blank:]] NOT_WS [^[:blank:]\r\n] NAME [[:alpha:]_][[:alnum:]_-]* LEXOPT [aceknopr] REGEXOP [\*\.\+\?\/\^\(\|\)\]\[] NUMESCSEQ \\(([0-7]{1,3})|x([[:xdigit:]]{1,2})) CCL1 alnum|alpha|ascii|blank|cntrl|digit|graph CCL2 lower|print|punct|space|upper|xdigit CCL {CCL1}|{CCL2} %% int bracelevel=0; <INITIAL>{ ^"%{" generatePreProc(yytext); PUSH(verbatim_code); ^"%"[sx] generatePreProc(yytext); PUSH(sc_decl); ^"%option" generatePreProc(yytext); PUSH(options); ^"%array" | ^"%pointer" | ^"%"{LEXOPT} generatePreProc(yytext); ^{NAME} generateFunction(yytext); PUSH(name_def); ^"%%" generatePreProc(yytext); BEGIN(sect2); "/*" startComment(yytext); PUSH(comment); {NL} generateNewLine(); [^\n_[:alpha:]%\/]+ generate_normal(yytext); . generate_normal(yytext); } <verbatim_code>{ ^"%}" generatePreProc(yytext); POP(verbatim_code); [^\r\n%]+ generate_normal(yytext); [%\r] generate_normal(yytext); {NL} generateNewLine(); } <options>{ {WS}+ generate_normal(yytext); {NAME} generateKeyWord(yytext); "=" generateSymbol(yytext); \"[^\"\n]*\" { startString("\""); if(yyleng> 2){ yytext[yyleng-1] = '\0'; generateString(yytext+1); } endString("\""); } {NL} generateNewLine(); POP(options); . generate_normal(yytext); } <sc_decl>{ {WS}+ generate_normal(yytext); {NAME} generateFunction(yytext); {NL} generateNewLine(); POP(sc_decl); . generate_normal(yytext); } <name_def>{ {WS}+ generate_normal(yytext); {NL} generateNewLine(); yy_set_bol(1);POP(name_def); . yyless(0); PUSH(pattern); } <pattern>{ {WS}+ generate_normal(yytext); POP(pattern); {NL} { yy_set_bol(1); yyless(0); POP(pattern); } "{"{NAME}"}" { generateSymbol("{"); yytext[yyleng-1] = '\0'; generateFunction(yytext+1); generateSymbol("}"); } "\"" startString(yytext); PUSH(in_string); {REGEXOP} generateSymbol(yytext); "<<EOF>>" generateKeyWord(yytext); "[:"({CCL})":]" { generateSymbol("[:"); yytext[yyleng-2] = '\0'; generateKeyWord(yytext+2); generateSymbol(":]"); } {NUMESCSEQ} generateNumber(yytext); \\[^\n] generatePreProc(yytext); . generate_normal(yytext); } <in_string>{ "\"" endString(yytext); POP(in_string); {NUMESCSEQ} generateNumber(yytext); \\[^\n] generatePreProc(yytext); {NL} generateNewLine(); POP(in_string); /* actually an error */ . generateString(yytext); } <comment>{ "*/" endComment(yytext); POP(comment); [^*\n]+ generateComment(yytext); "*" generateComment(yytext); {NL} generateNewLine(); } <sect2prolog>{ ^"%{".* ++bracelevel; generatePreProc(yytext); ^"%}".* --bracelevel; generatePreProc(yytext); ^{WS}.+ generate_normal(yytext); ^{NOT_WS}.* { if ( bracelevel <= 0 ) { yyless( 0 ); yy_set_bol( 1 ); BEGIN(sect2); } else generate_normal(yytext); } {NL} generateNewLine(); .+ generate_normal(yytext); } <sect2>{ "<" generatePreProc(yytext); PUSH(start_cond); "/*" startComment(yytext); PUSH(comment); {WS}+ generate_normal(yytext); ^"%%" generatePreProc(yytext); BEGIN(sect3); {NL} generateNewLine(); \} generate_normal(yytext); . yyless(0); PUSH(pattern); } <start_cond>{ ">" generatePreProc(yytext); POP(start_cond); "," generate_normal(yytext); {NAME}|"*" generateFunction(yytext); {NL} generateNewLine(); [^[:alpha:]_\n,>\*]+ generate_normal(yytext); } <sect3>{ {NL} generateNewLine(); .+ generate_normal(yytext); } %% /* vim:set ft=flex expandtab cindent tabstop=4 softtabstop=4 shiftwidth=4 textwidth=0: */ ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/instances_example.cpp����������������������������������������������������0000644�0001750�0001750�00000000417�11672675562�016705� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#include "srchilite/langdefmanager.h" #include "srchilite/instances.h" int main() { // we highlight C++ code for simplicity srchilite::SourceHighlighter highlighter (srchilite::Instances::getLangDefManager().getHighlightState( DATADIR, "cpp.lang")); �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/sh_whatis.css������������������������������������������������������������0000644�0001750�0001750�00000001647�11672675562�015210� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������body { background-color: #000000; color: #00ff00; font-weight: normal; font-style: normal; } .keyword { color: #fa5a03; font-weight: bold; font-style: normal; } .type { color: #ffffff; font-weight: bold; font-style: normal; } .string { color: #ffbb00; font-weight: normal; font-style: normal; } .specialchar { color: #ffbb00; font-weight: normal; font-style: normal; } .comment { color: #ff0000; font-weight: normal; font-style: normal; } .number { color: #ffff00; font-weight: normal; font-style: normal; } .preproc { color: #bfbfbf; font-weight: normal; font-style: normal; } .symbol { color: #00ffff; font-weight: normal; font-style: normal; } .function { color: #e721d3; font-weight: normal; font-style: normal; } .cbracket { color: #00ffff; font-weight: normal; font-style: normal; } �����������������������������������������������������������������������������������������source-highlight-3.1.6/doc/sh_whitengrey.css��������������������������������������������������������0000644�0001750�0001750�00000001403�11672675562�016064� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������body { background-color: #ffffff; color: #696969; font-weight: normal; font-style: normal; } .keyword { color: #696969; font-weight: bold; font-style: normal; } .type { color: #696969; font-weight: normal; font-style: normal; } .string { color: #008800; font-weight: normal; font-style: normal; } .specialchar { color: #008800; font-weight: normal; font-style: normal; } .comment { color: #1326a2; font-weight: normal; font-style: italic; } .number { color: #bb00ff; font-weight: normal; font-style: normal; } .preproc { color: #470000; font-weight: normal; font-style: normal; } .function { color: #000000; font-weight: normal; font-style: normal; } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/test_ref.h.texinfo�������������������������������������������������������0000644�0001750�0001750�00000015173�11675045062�016130� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@c Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite @example @t{01:} @r{@i{/**}} @t{02:} @r{@i{** Copyright (C) 1999-2007 Lorenzo Bettini}} @t{03:} @r{@i{** }} @t{04:} @r{@i{ }}@t{http://www.lorenzobettini.it} @t{05:} @r{@i{ }} @t{06:} @r{@i{ r2 = r2 XOR (1<<10);}} @t{07:} @r{@i{ cout << "hello world" << endl;}} @t{08:} @r{@i{** }} @t{09:} @r{@i{*/}} @t{10:} @t{11:} @r{@i{// this file also contains the definition of mysum as a #define}} @t{12:} @t{13:} @r{@i{// textgenerator.h : Text Generator class &&}} @t{14:} @t{15:} @b{#ifndef} _TEXTGEN_H @flushright @r{@i{@xref{test.h:16,_TEXTGEN_H,_TEXTGEN_H ../../tests/test.h:16}.}} @end flushright @t{16:} @b{#define} @anchor{test.h:16}_TEXTGEN_H @t{17:} @t{18:} @b{#define} @anchor{test.h:18}foo(x) (x + 1) @t{19:} @t{20:} @b{#define} @anchor{test.h:20}mysum myfunbody @t{21:} @t{22:} @b{#include} @t{<iostream.h>} @r{@i{// for cerr}} @t{23:} @t{24:} @b{#include} @t{"genfun.h"} @r{@i{/* for generating functions */}} @t{25:} @t{26:} @b{class} @anchor{test.h:26}TextGenerator @{ @t{27:} @b{public} : @t{28:} @b{virtual} @b{void} @anchor{test.h:28}generate( @b{const} @b{char} *s ) @b{const} @{ (*sout) << s ; @} @t{29:} @b{virtual} @b{void} @anchor{test.h:29}generate( @b{const} @b{char} *s, @b{int} start, @b{int} end ) @b{const} @t{30:} @{ @t{31:} @b{for} ( @b{int} i = start ; i <= end ; ++i ) @t{32:} (*sout) << s[i] ; @t{33:} @b{return} a<p->b ? a : 3; @t{34:} @} @t{35:} @b{virtual} @b{void} @anchor{test.h:35}generateln( @b{const} @b{char} *s ) @b{const} @t{36:} @{ @t{37:} generate( s ) ; @flushright @r{@i{@xref{test.h:28,generate,generate ../../tests/test.h:28}.}} @end flushright @flushright @r{@i{@xref{test.h:29,generate,generate ../../tests/test.h:29}.}} @end flushright @t{38:} (*sout) << endl ; @t{39:} @} @t{40:} @b{virtual} @b{void} @anchor{test.h:40}generateEntire( @b{const} @b{char} *s ) @b{const} @t{41:} @{ @t{42:} startTextGeneration() ; @flushright @r{@i{@xref{test.h:46,startTextGeneration,startTextGeneration ../../tests/test.h:46}.}} @end flushright @flushright @r{@i{@xref{test.h:70,startTextGeneration,startTextGeneration ../../tests/test.h:70}.}} @end flushright @t{43:} generate(s) ; @flushright @r{@i{@xref{test.h:28,generate,generate ../../tests/test.h:28}.}} @end flushright @flushright @r{@i{@xref{test.h:29,generate,generate ../../tests/test.h:29}.}} @end flushright @t{44:} endTextGeneration() ; @flushright @r{@i{@xref{test.h:47,endTextGeneration,endTextGeneration ../../tests/test.h:47}.}} @end flushright @flushright @r{@i{@xref{test.h:76,endTextGeneration,endTextGeneration ../../tests/test.h:76}.}} @end flushright @t{45:} @} @t{46:} @b{virtual} @b{void} @anchor{test.h:46}startTextGeneration() @b{const} @{@} @t{47:} @b{virtual} @b{void} @anchor{test.h:47}endTextGeneration() @b{const} @{@} @t{48:} @b{virtual} @b{void} @anchor{test.h:48}beginText( @b{const} @b{char} *s ) @b{const} @t{49:} @{ @t{50:} startTextGeneration() ; @flushright @r{@i{@xref{test.h:46,startTextGeneration,startTextGeneration ../../tests/test.h:46}.}} @end flushright @flushright @r{@i{@xref{test.h:70,startTextGeneration,startTextGeneration ../../tests/test.h:70}.}} @end flushright @t{51:} @b{if} ( s ) @t{52:} generate( s ) ; @flushright @r{@i{@xref{test.h:28,generate,generate ../../tests/test.h:28}.}} @end flushright @flushright @r{@i{@xref{test.h:29,generate,generate ../../tests/test.h:29}.}} @end flushright @t{53:} @} @t{54:} @b{virtual} @b{void} @anchor{test.h:54}endText( @b{const} @b{char} *s ) @b{const} @t{55:} @{ @t{56:} @b{if} ( s ) @t{57:} generate( s ) ; @flushright @r{@i{@xref{test.h:28,generate,generate ../../tests/test.h:28}.}} @end flushright @flushright @r{@i{@xref{test.h:29,generate,generate ../../tests/test.h:29}.}} @end flushright @t{58:} endTextGeneration() ; @flushright @r{@i{@xref{test.h:47,endTextGeneration,endTextGeneration ../../tests/test.h:47}.}} @end flushright @flushright @r{@i{@xref{test.h:76,endTextGeneration,endTextGeneration ../../tests/test.h:76}.}} @end flushright @t{59:} @} @t{60:} @} ; @t{61:} @t{62:} @r{@i{// Decorator}} @t{63:} @b{class} @anchor{test.h:63}TextDecorator : @b{public} TextGenerator @{ @flushright @r{@i{@xref{test.h:26,TextGenerator,TextGenerator ../../tests/test.h:26}.}} @end flushright @t{64:} @b{protected} : @t{65:} TextGenerator *@anchor{test.h:65}decorated ; @flushright @r{@i{@xref{test.h:26,TextGenerator,TextGenerator ../../tests/test.h:26}.}} @end flushright @t{66:} @t{67:} @b{public} : @t{68:} @anchor{test.h:68}TextDecorator( TextGenerator *t ) : decorated( t ) @{@} @flushright @r{@i{@xref{test.h:26,TextGenerator,TextGenerator ../../tests/test.h:26}.}} @end flushright @flushright @r{@i{@xref{test.h:65,decorated,decorated ../../tests/test.h:65}.}} @end flushright @t{69:} @t{70:} @b{virtual} @b{void} @anchor{test.h:70}startTextGeneration() @b{const} @t{71:} @{ @t{72:} startDecorate() ; @t{73:} @b{if} ( decorated ) @flushright @r{@i{@xref{test.h:65,decorated,decorated ../../tests/test.h:65}.}} @end flushright @t{74:} decorated->startTextGeneration() ; @flushright @r{@i{@xref{test.h:46,startTextGeneration,startTextGeneration ../../tests/test.h:46}.}} @end flushright @flushright @r{@i{@xref{test.h:65,decorated,decorated ../../tests/test.h:65}.}} @end flushright @flushright @r{@i{@xref{test.h:70,startTextGeneration,startTextGeneration ../../tests/test.h:70}.}} @end flushright @t{75:} @} @t{76:} @b{virtual} @b{void} @anchor{test.h:76}endTextGeneration() @b{const} @t{77:} @{ @t{78:} @b{if} ( decorated ) @flushright @r{@i{@xref{test.h:65,decorated,decorated ../../tests/test.h:65}.}} @end flushright @t{79:} decorated->endTextGeneration() ; @flushright @r{@i{@xref{test.h:47,endTextGeneration,endTextGeneration ../../tests/test.h:47}.}} @end flushright @flushright @r{@i{@xref{test.h:65,decorated,decorated ../../tests/test.h:65}.}} @end flushright @flushright @r{@i{@xref{test.h:76,endTextGeneration,endTextGeneration ../../tests/test.h:76}.}} @end flushright @t{80:} endDecorate() ; @t{81:} mysum; @flushright @r{@i{@xref{test.h:20,mysum,mysum ../../tests/test.h:20}.}} @end flushright @t{82:} @} @t{83:} @t{84:} @r{@i{// pure virtual functions}} @t{85:} @b{virtual} @b{void} startDecorate() @b{const} = 0 ; @t{86:} @b{virtual} @b{void} endDecorate() @b{const} = 0 ; @t{87:} @} ; @t{88:} @t{89:} @b{#endif} @r{@i{// _TEXTGEN_H}} @t{90:} @end example�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/extreme_comment3.lang.texinfo��������������������������������������������0000664�0001750�0001750�00000001110�11675045061�020250� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@c Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite @example @r{@i{# treat the preprocess statement}} @r{@i{# #if 0}} @r{@i{# ...}} @r{@i{# #else}} @r{@i{# as a comment}} @b{environment} @t{@i{comment}} = @t{'^[[:blank:]]*#[[:blank:]]*if[[:blank:]]+0'} @b{begin} @t{@i{comment}} @b{start} @t{'^[[:blank:]]*#[[:blank:]]*else'} @b{exit} @t{@i{comment}} @b{delim} @t{'^[[:blank:]]*#[[:blank:]]*if'} @t{'^[[:blank:]]*#[[:blank:]]*endif'} @b{multiline} @b{nested} @b{end} @b{include} @t{"cpp.lang"} @end example��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/sh_print.css�������������������������������������������������������������0000644�0001750�0001750�00000001515�11672675562�015037� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������body { background-color: #ffffff; color: #000000; font-weight: normal; font-style: normal; } .keyword { color: #000000; font-weight: bold; font-style: normal; } .type { color: #000000; font-weight: bold; font-style: normal; } .string { color: #000000; font-weight: normal; font-style: normal; } .specialchar { color: #000000; font-weight: normal; font-style: normal; } .comment { color: #666666; font-weight: normal; font-style: italic; } .number { color: #000000; font-weight: normal; font-style: normal; } .preproc { color: #000000; font-weight: bold; font-style: normal; } .symbol { color: #000000; font-weight: bold; font-style: normal; } .cbracket { color: #000000; font-weight: bold; font-style: normal; } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/version.texi�������������������������������������������������������������0000644�0001750�0001750�00000000145�11675377205�015051� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@set UPDATED 24 December 2011 @set UPDATED-MONTH December 2011 @set EDITION 3.1.6 @set VERSION 3.1.6 ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/comment-show2.lang�������������������������������������������������������0000644�0001750�0001750�00000000414�11672675561�016040� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������vardef TODO = '(TODO|FIXME)([:]?)' environment comment delim "/**" "*/" multiline nested begin type = '@[[:alpha:]]+' todo = $TODO end regexp = `([^[:alnum:]]).*(\1)` string delim "<" ">" string2 delim "<<" ">>" multiline (paren,normal,paren) = `(\[)(.*)(\])`����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/Hello.java���������������������������������������������������������������0000644�0001750�0001750�00000002410�11672675561�014377� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* This is a classical Hello program to test source-highlight with Java programs. to have an html translation type source-highlight -s java -f html --input Hello.java --output Hello.html source-highlight -s java -f html < Hello.java > Hello.html or type source-highlight --help for the list of options written by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite */ package hello; import java.io.* ; /** * <p> * A simple Hello World class, used to demonstrate some * features of Java source highlighting. * </p> * TODO: nothing, just to show an highlighted TODO or FIXME * * @author Lorenzo Bettini * @version 2.0 */ public class Hello { int foo = 1998 ; int hex_foo = 0xCAFEBABE; boolean b = false; Integer i = null ; char c = '\'', d = 'n', e = '\\' ; String xml = "<tag attr=\"value\">&auml;</tag>", foo2 = "\\" ; public static void main( String args[] ) { // just some greetings ;-) /* System.out.println( "Hello from java2html :-)" ) ; System.out.println( "\tby Lorenzo Bettini" ) ; System.out.println( "\thttp://www.lorenzobettini.it" ) ; if (argc > 0) String param = argc[0]; //System.out.println( "bye bye... :-D" ) ; // see you soon } } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/sh_contrast.css����������������������������������������������������������0000644�0001750�0001750�00000001641�11672675562�015540� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������body { background-color: #ed6104; color: #0000ff; font-weight: normal; font-style: normal; } .keyword { color: #ffffff; font-weight: bold; font-style: normal; } .type { color: #ffffff; font-weight: bold; font-style: normal; } .string { color: #11f80c; font-weight: normal; font-style: normal; } .specialchar { color: #11f80c; font-weight: normal; font-style: normal; } .comment { color: #000000; font-weight: normal; font-style: normal; } .number { color: #971ad8; font-weight: normal; font-style: normal; } .preproc { color: #7b44e0; font-weight: normal; font-style: normal; } .symbol { color: #dedede; font-weight: bold; font-style: normal; } .function { color: #fff700; font-weight: bold; font-style: normal; } .cbracket { color: #dedede; font-weight: bold; font-style: normal; } �����������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/strategy_example.lang����������������������������������������������������0000644�0001750�0001750�00000000147�11672675562�016717� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# an example for explaining the strategy of source-highlight type = "int" keyword = "null" symbol = "="�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/cpp2html.css�������������������������������������������������������������0000644�0001750�0001750�00000000723�11672675561�014741� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������BODY { font-weight: normal; background-color: #E0E0E0; } .keyword { color: brown; font-weight: bold; } .string { color: darkgreen; } .comment { color: navy; font-style: italic; } .number { color: blue; } .type { color: teal; text-decoration: underline; } .preproc { color: darkred; } .function { color: black; text-weight: bold; } .normal { color: purple; } .symbol { color: black; } .cbracket { color: black; } ���������������������������������������������source-highlight-3.1.6/doc/styleformatter.h.texinfo�������������������������������������������������0000664�0001750�0001750�00000002665�11675045063�017406� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@c Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite @example @b{struct} StyleFormatter: @b{public} srchilite::Formatter @{ @r{@i{/// the language element represented by this formatter}} std::string elem; @b{bool} bold, italic, underline, fixed, not_fixed; std::string color; std::string bgColor; StyleFormatter(@b{const} std::string &elem_ = @t{"normal"}) : elem(elem_), bold(@b{false}), italic(@b{false}), underline(@b{false}), fixed(@b{false}), not_fixed(@b{false}) @{ @} @b{virtual} @b{void} format(@b{const} std::string &s, @b{const} srchilite::FormatterParams *params = 0) @{ @r{@i{// do not print anything if normal or string to format is empty}} @b{if} (elem != @t{"normal"} || !s.size()) @{ std::cout << elem << @t{": }\"@t{"} << s << @t{"}\"@t{"} << std::endl; std::cout << @t{"formatted as: "} << (bold ? @t{"bold "} : @t{""}) << (italic ? @t{"italic "} : @t{""}) << (underline ? @t{"underline "} : @t{""}); std::cout << (color.size() ? @t{"color: "} + color + @t{" "} : @t{""}); std::cout << (bgColor.size() ? @t{"bgcolor: "} + bgColor : @t{""}) << std::endl; @} @} @}; @r{@i{/// shared pointer for StyleFormatter}} @b{typedef} boost::shared_ptr<StyleFormatter> StyleFormatterPtr; @end example���������������������������������������������������������������������������source-highlight-3.1.6/doc/source-highlight.1�������������������������������������������������������0000664�0001750�0001750�00000015456�11675045064�016030� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.40.4. .TH SOURCE-HIGHLIGHT "1" "December 2011" "Source-highlight 3.1.6 (library: 4:0:0)" "User Commands" .SH NAME Source-highlight \- convert source code to syntax highlighted document .SH SYNOPSIS .B source-highlight [\fIOPTIONS\fR]... \fI< input_file > output_file\fR .SH DESCRIPTION GNU source\-highlight 3.1.6 .PP Highlight the syntax of a source file (e.g. Java) into a specific format (e.g. HTML) .IP source\-highlight [OPTIONS]... \fB\-i\fR input_file \fB\-o\fR output_file source\-highlight [OPTIONS]... [FILES]... .TP \fB\-h\fR, \fB\-\-help\fR Print help and exit .TP \fB\-\-detailed\-help\fR Print help, including all details and hidden options, and exit .TP \fB\-V\fR, \fB\-\-version\fR Print version and exit .TP \fB\-i\fR, \fB\-\-input\fR=\fIfilename\fR input file. default std input .TP \fB\-o\fR, \fB\-\-output\fR=\fIfilename\fR output file. default std output (when the third invocation form is used). If STDOUT is specified, the output is directed to standard output .PP you can simply specify some files at the command line and also use regular expressions (for instance *.java). In this case the name for the output files will be formed using the name of the source file with a .<ext> appended, where <ext> is the extension chosen according to the output format specified (for instance .html). .TP \fB\-s\fR, \fB\-\-src\-lang\fR=\fISTRING\fR source language (use \fB\-\-lang\-list\fR to get the complete list). If not specified, the source language will be guessed from the file extension. .TP \fB\-\-lang\-list\fR list all the supported language and associated language definition file .TP \fB\-\-outlang\-list\fR list all the supported output language and associated language definition file .TP \fB\-f\fR, \fB\-\-out\-format\fR=\fISTRING\fR output format (use \fB\-\-outlang\-list\fR to get the complete list) (default=`html') .TP \fB\-d\fR, \fB\-\-doc\fR create an output file that can be used as a stand alone document (e.g., not to be included in another one) .TP \fB\-\-no\-doc\fR cancel the \fB\-\-doc\fR option even if it is implied (e.g., when css is given) .TP \fB\-c\fR, \fB\-\-css\fR=\fIfilename\fR the external style sheet filename. Implies \fB\-\-doc\fR .TP \fB\-T\fR, \fB\-\-title\fR=\fISTRING\fR give a title to the output document. Implies \fB\-\-doc\fR .TP \fB\-t\fR, \fB\-\-tab\fR=\fIINT\fR specify tab length. (default=`8') .TP \fB\-H\fR, \fB\-\-header\fR=\fIfilename\fR file to insert as header .TP \fB\-F\fR, \fB\-\-footer\fR=\fIfilename\fR file to insert as footer .TP \fB\-\-style\-file\fR=\fIfilename\fR specify the file containing format options (default=`default.style') .TP \fB\-\-style\-css\-file\fR=\fIfilename\fR specify the file containing format options (in css syntax) .TP \fB\-\-style\-defaults\fR=\fIfilename\fR specify the file containing defaults for format options (default=`style.defaults') .TP \fB\-\-outlang\-def\fR=\fIfilename\fR output language definition file .TP \fB\-\-outlang\-map\fR=\fIfilename\fR output language map file (default=`outlang.map') .TP \fB\-\-data\-dir\fR=\fIpath\fR directory where language definition files and language maps are searched for. If not specified these files are searched for in the current directory and in the data dir installation directory .TP \fB\-\-output\-dir\fR=\fIpath\fR output directory .TP \fB\-\-lang\-def\fR=\fIfilename\fR language definition file .TP \fB\-\-lang\-map\fR=\fIfilename\fR language map file (default=`lang.map') .TP \fB\-\-show\-lang\-elements\fR=\fIfilename\fR prints the language elements that are defined .IP in the language definition file .TP \fB\-\-infer\-lang\fR force to infer source script language (overriding given language specification) .SS "Lines:" .TP \fB\-n\fR, \fB\-\-line\-number\fR[=\fIpadding\fR] number all output lines, using the specified padding character (default=`0') .TP \fB\-\-line\-number\-ref\fR[=\fIprefix\fR] number all output lines and generate an anchor, .IP made of the specified prefix + the line number (default=`line') .PP Filtering output: .IP Mode: linerange .IP specifying line ranges .TP \fB\-\-line\-range\fR=\fISTRING\fR generate only the lines in the specified range(s) .TP \fB\-\-range\-separator\fR=\fISTRING\fR the optional separator to be printed among ranges (e.g., "...") .TP \fB\-\-range\-context\fR=\fIINT\fR number of (context) lines generated even if not in range .IP Mode: regexrange .IP specifying regular expression delimited ranges .TP \fB\-\-regex\-range\fR=\fISTRING\fR generate only the lines within the specified regular expressions .SS "reference generation:" .TP \fB\-\-gen\-references\fR=\fISTRING\fR generate references (possible values="inline", "postline", "postdoc" default=`inline') .TP \fB\-\-ctags\-file\fR=\fIfilename\fR specify the file generated by ctags that will be used to generate references (default=`tags') .TP \fB\-\-ctags\fR=\fIcmd\fR how to run the ctags command. If this option is not specified, ctags will be executed with the default value. If it is specified with an empty string, ctags will not be executed at all (default=`ctags \fB\-\-excmd\fR=\fIn\fR \fB\-\-tag\-relative\fR=\fIyes\fR') .SS "testing:" .TP \fB\-v\fR, \fB\-\-verbose\fR verbose mode on .TP \fB\-q\fR, \fB\-\-quiet\fR print no progress information .TP \fB\-\-binary\-output\fR write output files in binary mode .TP \fB\-\-statistics\fR print some statistics (i.e., elapsed time) .TP \fB\-\-gen\-version\fR put source\-highlight version in the generated file (default=on) .TP \fB\-\-check\-lang\fR=\fIfilename\fR only check the correctness of a language definition file .TP \fB\-\-check\-outlang\fR=\fIfilename\fR only check the correctness of an output language definition file .TP \fB\-\-failsafe\fR if no language definition is found for the input, it is simply copied to the output .TP \fB\-g\fR, \fB\-\-debug\-langdef\fR[=\fItype\fR] debug a language definition. In dump mode just dumps all the steps; in interactive, at each step, waits for some input (press ENTER to step) (possible values="interactive", "dump" default=`dump') .TP \fB\-\-show\-regex\fR=\fIfilename\fR show the regular expression automaton corresponding to a language definition file .PP Maintained by Lorenzo Bettini <http://www.lorenzobettini.it> .SH "REPORTING BUGS" Report bugs to <bug\-source\-highlight at gnu.org> .SH COPYRIGHT Copyright \(co 1999\-2008 Lorenzo Bettini <http://www.lorenzobettini.it> This program comes with ABSOLUTELY NO WARRANTY. .br This is free software; you may redistribute copies of the program under the terms of the GNU General Public License. For more information about these matters, see the file named COPYING. .SH "SEE ALSO" The full documentation for .B Source-highlight is maintained as a Texinfo manual. If the .B info and .B Source-highlight programs are properly installed at your site, the command .IP .B info Source-highlight .PP should give you access to the complete manual. ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/sh_kwrite.css������������������������������������������������������������0000644�0001750�0001750�00000001403�11672675562�015204� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������body { background-color: #ffffff; color: #000000; font-weight: normal; font-style: normal; } .keyword { color: #000000; font-weight: bold; font-style: normal; } .type { color: #830000; font-weight: normal; font-style: normal; } .string { color: #ff0000; font-weight: normal; font-style: normal; } .specialchar { color: #ff00ff; font-weight: normal; font-style: normal; } .comment { color: #838183; font-weight: normal; font-style: italic; } .number { color: #2928ff; font-weight: normal; font-style: normal; } .preproc { color: #008200; font-weight: normal; font-style: normal; } .function { color: #010181; font-weight: normal; font-style: normal; } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/test_regexrange_main.java.texinfo����������������������������������������0000664�0001750�0001750�00000001201�11675045057�021172� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@c Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite @example @t{47:} @b{public} @b{static} @b{void} main( String args[] ) @{ @t{48:} @r{@i{// just some greetings ;-) /*}} @t{49:} System.out.println( @t{"Hello from java2html :-)"} ) ; @t{50:} System.out.println( @t{"}\t@t{by Lorenzo Bettini"} ) ; @t{51:} System.out.println( @t{"}\t@t{http://www.lorenzobettini.it"} ) ; @t{52:} @b{if} (argc > 0) @t{53:} String param = argc[0]; @t{54:} @r{@i{//System.out.println( "bye bye... :-D" ) ; // see you soon}} @t{55:} @} @end example�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/highlight_type.style�����������������������������������������������������0000644�0001750�0001750�00000000450�11672675562�016566� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// modified so that types are highlighted keyword, type b ; variable f, i ; usertype nf, i ; string f ; regexp f ; comment nf, i, noref ; preproc b ; // line numbers linenum f; // Internet related url f; // for diffs oldfile, newfile i; difflines b; // for css selector, property b; value i;������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/sh_ide-anjuta.css��������������������������������������������������������0000644�0001750�0001750�00000001403�11672675562�015720� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������body { background-color: #ffffff; color: #000000; font-weight: normal; font-style: normal; } .keyword { color: #000080; font-weight: bold; font-style: normal; } .type { color: #000080; font-weight: normal; font-style: normal; } .string { color: #ddbb00; font-weight: normal; font-style: normal; } .specialchar { color: #ddbb00; font-weight: normal; font-style: normal; } .comment { color: #ff0000; font-weight: normal; font-style: italic; } .number { color: #008800; font-weight: normal; font-style: normal; } .preproc { color: #678000; font-weight: normal; font-style: normal; } .function { color: #000000; font-weight: normal; font-style: normal; } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/sh_berries-light.css�����������������������������������������������������0000644�0001750�0001750�00000001647�11672675562�016451� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������body { background-color: #d7ffff; color: #47406d; font-weight: normal; font-style: normal; } .keyword { color: #2cae1e; font-weight: bold; font-style: normal; } .type { color: #8b51c0; font-weight: normal; font-style: normal; } .string { color: #5f81b3; font-weight: normal; font-style: normal; } .specialchar { color: #5f81b3; font-weight: normal; font-style: normal; } .comment { color: #9c3caf; font-weight: normal; font-style: italic; } .number { color: #20755a; font-weight: normal; font-style: normal; } .preproc { color: #0628cb; font-weight: normal; font-style: normal; } .symbol { color: #d2073b; font-weight: normal; font-style: normal; } .function { color: #901164; font-weight: bold; font-style: normal; } .cbracket { color: #d2073b; font-weight: normal; font-style: normal; } �����������������������������������������������������������������������������������������source-highlight-3.1.6/doc/gpl.texinfo��������������������������������������������������������������0000644�0001750�0001750�00000043712�11672675561�014663� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@setfilename gpl.info @unnumbered GNU GENERAL PUBLIC LICENSE @center Version 2, June 1991 @display Copyright @copyright{} 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. @end display @unnumberedsec 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. @iftex @unnumberedsec TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION @end iftex @ifinfo @center TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION @end ifinfo @enumerate @item 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. @item 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. @item 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: @enumerate a @item You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. @item 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. @item 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.) @end enumerate 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. @item 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: @enumerate a @item 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, @item 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, @item 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.) @end enumerate 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. @item 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. @item 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. @item 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. @item 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. @item 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. @item 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. @item 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. @iftex @heading NO WARRANTY @end iftex @ifinfo @center NO WARRANTY @end ifinfo @item 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. @item 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 enumerate @iftex @heading END OF TERMS AND CONDITIONS @end iftex @ifinfo @center END OF TERMS AND CONDITIONS @end ifinfo @page @unnumberedsec 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. @smallexample @var{one line to give the program's name and an idea of what it does.} Copyright (C) @var{year} @var{name of author} 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 @end smallexample 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: @smallexample Gnomovision version 69, Copyright (C) @var{year} @var{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. @end smallexample The hypothetical commands @samp{show w} and @samp{show c} should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than @samp{show w} and @samp{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: @smallexample @group Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. @var{signature of Ty Coon}, 1 April 1989 Ty Coon, President of Vice @end group @end smallexample 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. ������������������������������������������������������source-highlight-3.1.6/doc/test_extreme_comment.cpp.texinfo�����������������������������������������0000664�0001750�0001750�00000000654�11675045060�021100� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@c Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite @example @r{@i{// test special #if 0 treatment}} @b{int} main() @{ @b{#if} 0 @r{@i{// equivalent to a comment}} @b{int} i = 10; printf(@t{"this should never be executed}\n@t{"}); @b{return} 1; @b{#else} printf(@t{"Hello world!}\n@t{"}); @b{return} 0; @b{#endif} printf(@t{"never reach here!}\n@t{"}); @} @end example������������������������������������������������������������������������������������source-highlight-3.1.6/doc/default.css��������������������������������������������������������������0000644�0001750�0001750�00000002710�11672675561�014632� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������body { background-color: white; } .keyword { color: blue; font-weight: bold; } .type, .classname { color: darkgreen; } .string { color: red; font-family: monospace; } .regexp { color: orange; } .specialchar { color: pink; font-family: monospace; } .comment { color: brown; font-style: italic; } .number { color: purple; } .preproc { color: darkblue; font-weight: bold; } .symbol { color: darkred; } .function { color: black; font-weight: bold; } .cbracket { color: red; } .todo { font-weight: bold; background-color: cyan; } /* line numbers */ .linenum { color: black; font-family: monospace; } /* Internet related */ .url { color: blue; text-decoration: underline; font-family: monospace; } /* other elements for ChangeLog and Log files */ .date { color: blue; font-weight: bold; } .time, .file { color: darkblue; font-weight: bold; } .ip, .name { color: darkgreen; } /* for Prolog, Perl */ .variable { color: darkgreen; } .italics { color: darkgreen; font-style: italic; } .bold { color: darkgreen; font-weight: bold; } /* for LaTeX */ .underline { color: darkgreen; text-decoration: underline; } .fixed { color: green; font-family: monospace; } .argument, .optionalargument { color: darkgreen; } .math { color: orange; } .bibtex { color: blue; } /* for diffs */ .oldfile { color: orange; } .newfile { color: darkgreen; } .difflines { color: blue; } /* for css */ .selector { color: purple; } .property { color: blue; } .value { color: darkgreen; font-style: italic; }��������������������������������������������������������source-highlight-3.1.6/doc/test_extreme_comment_3.texinfo�������������������������������������������0000664�0001750�0001750�00000001007�11675045061�020533� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@c Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite @example @r{@i{// test special #if 0 treatment}} @b{int} main() @{ @r{@i{#if 0 // equivalent to a comment}} @r{@i{ int i = 10;}} @r{@i{ printf("this should never be executed\n");}} @r{@i{ return 1;}} @r{@i{#else}} printf(@t{"Hello world!}\n@t{"}); @r{@i{# if 0 // another one}} @r{@i{ return 1;}} @r{@i{# else}} @b{return} 0; @b{# endif} @b{#endif} printf(@t{"never reach here!}\n@t{"}); @} @end example�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/test_lineranges1.java.texinfo��������������������������������������������0000664�0001750�0001750�00000001133�11675045056�020252� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@c Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite @example @t{12:} @r{@i{ written by}} @t{13:} @r{@i{ Lorenzo Bettini}} @t{14:} @r{@i{ }}@t{http://www.lorenzobettini.it} @t{15:} @r{@i{ }}@t{http://www.gnu.org/software/src-highlite} @t{16:} @r{@i{*/}} @t{17:} @t{18:} @b{package} hello; @t{29:} @r{@i{ * }}@b{@@author}@r{@i{ Lorenzo Bettini}} @t{30:} @r{@i{ * }}@b{@@version}@r{@i{ 2.0}} @t{31:} @r{@i{ */}} @r{@i{/// class}} @t{32:} @b{public} @b{class} Hello @{ @t{33:} @b{int} foo = 1998 ; @t{34:} @b{int} hex_foo = 0xCAFEBABE; @end example�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/source-highlight-console-main.cpp.texinfo��������������������������������0000664�0001750�0001750�00000002464�11675045063�022501� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@c Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite @example @b{#include} @t{<iostream>} @b{#include} @t{"srchilite/sourcehighlight.h"} @b{#include} @t{"srchilite/langmap.h"} @b{using} @b{namespace} std; @b{#ifndef} DATADIR @b{#define} DATADIR @t{""} @b{#endif} @b{int} main(@b{int} argc, @b{char} *argv[]) @{ @r{@i{// we highlight to the console, through ANSI escape sequences}} srchilite::SourceHighlight sourceHighlight(@t{"esc.outlang"}); @r{@i{// make sure we find the .lang and .outlang files}} sourceHighlight.setDataDir(DATADIR); @r{@i{// by default we highlight C++ code}} string inputLang = @t{"cpp.lang"}; @b{if} (argc > 1) @{ @r{@i{// we have a file name so we detect the input source language}} srchilite::LangMap langMap(DATADIR, @t{"lang.map"}); string lang = langMap.getMappedFileNameFromFileName(argv[1]); @b{if} (lang != @t{""}) @{ inputLang = lang; @} @r{@i{// otherwise we default to C++}} @r{@i{// output file name is empty => cout}} sourceHighlight.highlight(argv[1], @t{""}, inputLang); @} @b{else} @{ @r{@i{// input file name is empty => cin}} sourceHighlight.highlight(@t{""}, @t{""}, inputLang); @} @b{return} 0; @} @end example������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/javadoc.outlang.texinfo��������������������������������������������������0000664�0001750�0001750�00000001105�11675045061�017135� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@c Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite @example @b{include} @t{"html_common.outlang"} @b{doctemplate} @t{" * <!-- Generated by Source-highlight -->} @t{ * <pre><tt>} @t{"} @t{" * </tt></pre>} @t{"} @b{end} @b{nodoctemplate} @t{" * <!-- Generated by Source-highlight -->} @t{ * <pre><tt>} @t{"} @t{" * </tt></pre>} @t{"} @b{end} @b{lineprefix} @t{" * "} @b{translations} @t{"*/"} @t{"&#42;/"} @r{@i{# this avoids the */ to be interpreted as}} @r{@i{# the end of a comment inside a javadoc comment}} @b{end} @end example�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/source-highlight.texinfo�������������������������������������������������0000644�0001750�0001750�00000512666�11675377167�017363� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������\input texinfo @c -*-texinfo-*- @c This file uses the @command command introduced in Texinfo 4.0. @c %**start of header @setfilename source-highlight.info @include version.texi @settitle GNU Source-highlight @value{VERSION} @finalout @c @setchapternewpage odd @c %**end of header @set myhomepage @uref{http://www.lorenzobettini.it} @set langfilesurl @uref{http://www.gnu.org/software/src-highlite/lang_files/} @set outlangfilesurl @uref{http://www.gnu.org/software/src-highlite/outlang_files/} @set srchilite Source-highlight @set srchilitelib Source-highlight library @copying This manual is for GNU Source-highlight (version @value{VERSION}, @value{UPDATED}), which given a source file, produces a document with syntax highlighting. Copyright @copyright{} 2005-2008 Lorenzo Bettini, @value{myhomepage}. @quotation Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with the Front-Cover Texts being ``A GNU Manual,'' and with the Back-Cover Texts as in (a) below. A copy of the license is included in the section entitled ``GNU Free Documentation License.'' (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify this GNU Manual, like GNU software. Copies published by the Free Software Foundation raise funds for GNU development.'' @end quotation @end copying @dircategory Utilities @direntry * Source-highlight: (source-highlight). Highlights contents @end direntry @titlepage @title GNU Source-highlight @subtitle given a source file, produces a document with syntax highlighting. @subtitle for GNU Source-highlight Version @value{VERSION} @subtitle updated on @value{UPDATED-MONTH} @author by Lorenzo Bettini, @value{myhomepage} @page @vskip 0pt plus 1filll @insertcopying @end titlepage @contents @ifnottex @node Top, Introduction, (dir), (dir) @top GNU Source-highlight GNU Source-highlight, given a source file, produces a document with syntax highlighting. This is Edition @value{EDITION} of the Source-highlight manual. This file documents GNU Source-highlight version @value{VERSION}. @insertcopying @end ifnottex @c All the nodes can be updated using the EMACS command @c texinfo-every-node-update, which is normally bound to C-c C-u C-e. @c @node Top, Introduction, (dir), (dir) @c All the menus can be updated with the EMACS command @c texinfo-all-menus-update, which is normally bound to C-c C-u C-a. @menu * Introduction:: What's it for? * Installation:: Download and installation * Copying:: Licence issues * Simple Usage:: Very basic usage * Configuration files:: Files needed for execution * Invoking source-highlight:: How to run @command{source-highlight}. * Language Definitions:: How to define an input language * Output Language Definitions:: How to define an output format * Generating References:: Anchors and cross references * Examples:: Some output examples * Problems:: Reporting bugs. * Mailing Lists:: * Concept Index:: Index of concepts. @end menu @node Introduction, Installation, Top, Top @chapter Introduction @cindex introduction @cindex features GNU Source-highlight, given a source file, produces a document with syntax highlighting. The colors and the styles can be specified (bold, italics, underline) by means of a configuration file, and some other options can be specified at the command line. The program already recognizes many programming languages (e.g., C++, Java, Perl, etc.) and file formats (e.g., log files, ChangeLog, etc.), and some output formats (e.g., HTML, ANSI color escape sequences, @LaTeX{}, etc.). Since version 2.0, it allows you to specify your own input source language via a simple syntax described later in this manual (@ref{Language Definitions}). Since version 2.1, it allows you to specify your own output format language via a simple syntax described later in this manual (@ref{Output Language Definitions}). Since version 2.2, it is able to generate cross references (e.g., to variable names, field names, etc.) by relying on the program @emph{ctags}, @url{http://ctags.sourceforge.net} (@ref{Generating References}). @cindex library Since version 3.0, GNU Source-highlight also provides a C++ library (which is used by the main program itself), that can be used by C++ programmers to add highlighting functionalities to their programs. @inforef{Introduction,,source-highlight-info}. @menu * Supported languages:: * The program source-highlight-settings:: * Notes on some languages:: * Using source-highlight as a simple formatter:: * Related Software and Links:: @end menu @node Supported languages, The program source-highlight-settings, Introduction, Introduction @section Supported languages The complete list of languages (indeed, file extensions) natively supported by this version of Source-highlight (@value{VERSION}), as reported by @code{--lang-list}, is the following: @example @include lang-list.texinfo @end example The complete list of output formats natively supported by this version of Source-highlight (@value{VERSION}), as reported by @code{--outlang-list}, is the following: @example @include outlang-list.texinfo @end example @noindent The meaning of the suffix @code{-css} is explained in @ref{Output Language map}@footnote{Up to version 2.9, there were also the suffixes @code{-doc} and @code{-css-doc}, but this mechanism was quite confusing and complex; hopefully, this new one should be better.}. Please, keep in mind, that I haven't tested personally all these language definitions: I actually checked that the definition files are syntactically correct (with the command line option @code{--check-lang} and @code{--check-outlang}, @ref{Invoking source-highlight}), but I'm not sure their definition actually respects that language syntax (e.g., I've put up together some language definitions by searching for information in the Internet, but I've never programmed in that language). So, if you find that a language definition is not precise, please let me know. Moreover, if you have a program example in a language that's not included in the @file{tests} directory, please send it to me so that I can include it in the test suite. @node The program source-highlight-settings, Notes on some languages, Supported languages, Introduction @section The program @code{source-highlight-settings} @cindex source-highlight-settings Since version 3.0, GNU Source-highlight includes also the program @code{source-highlight-settings}, which can be used to check whether source-highlight will be able find its language definition files, and other configuration files, and in case, to store the correct settings in a configuration file, in the user home directory. @cindex source-highlight.conf In particular, the stored configuration file will be called @file{source-highlight.conf} and stored in @file{$HOME/.source-highlight/}. @cindex @code{--data-dir} For the moment, this file only stores the default value for the @code{--data-dir} option. The user can always override the contents of this configuration file, and the default hardcoded value, by using the environment variable @cindex @code{SOURCE_HIGHLIGHT_DATADIR} @code{SOURCE_HIGHLIGHT_DATADIR}. @node Notes on some languages, Using source-highlight as a simple formatter, The program source-highlight-settings, Introduction @section Notes on some languages In this section I'd like to go into details on the highlighting of some specific programming languages. These notes might be useful when the highlighted language has some ``dialects'' that might require some further specification at the command line (e.g., to select a specific dialect). @menu * Fortran:: * Perl:: @end menu @node Fortran, Perl, Notes on some languages, Notes on some languages @subsection Fortran @cindex Fortran As Toby White explained to me, Fortran comes into different ``flavors'': a fixed-format, where some characters have a different semantics depending on their column position in the source file, and a free-format where this is not true. For instance, in the former, @code{*} and @code{c} start a command line, but only if they are specified in the first column (while this is not true in the free-format). By default, the free-format is assumed for Fortran files; if you want to use the fixed-format, you need to specify @code{fortran-fixed} at the @code{--src-lang} command line option. @node Perl, , Fortran, Notes on some languages @subsection Perl @cindex Perl Perl syntax forms, especially its regular expression specifications, are quite a nightmare ;-) I tried to specify as much as possible in the @file{perl.lang} but some particular regular expressions might not be highlighted correctly. Actually, I never programmed in Perl, so, if you see that some parts of your Perl programs are not highlighted correctly, please do not hesitate to contact me, so that I can improve Perl highlighting. @cindex @code{--infer-lang} Moreover, although the standard extension for Perl files is @code{.pl}, since the Prolog language definition was implemented in source-highlight before Perl, this extension is assigned, by default, to Prolog files. However, you can use @code{--infer-lang} command line option, so that source-highlight can try to detect the language by inspecting the first lines of the input file (@ref{How the input language is discovered}); you can also use @code{--src-lang=perl} command line specification to explicitly require Perl highlighting. @node Using source-highlight as a simple formatter, Related Software and Links, Notes on some languages, Introduction @section Using source-highlight as a simple formatter You can also use source-highlight as a simple formatter of input file, i.e., without performing any highlighting@footnote{Although this might have been achieved with previous version, it is an official supported feature since version 2.5.}. @cindex nohilite.lang You can achieve this by using, as the language definition file for input sources the file @file{nohilite.lang}, using the command line option @code{--lang-def} (@ref{Invoking source-highlight}). Since that language definition is empty, no highlighting will be performed; however, source-highlight will transform the input file in the output format. Note, in the input language associations in @ref{Supported languages}, that @file{nohilite.lang} is also associated to txt files. This, for instance, makes source-highlight useful in cases you want to transform a text file into HTML or @LaTeX{}. During the output, in fact, source-highlight will correctly generate characters that have a specific meanings in the output format. @include txt2texinfo.txt This is the Texinfo source of the above sentence: @include txt2texinfo.txt.texinfo @noindent This was processed by source-highlight as a simple text file, without no highlighting; however since it was formatted in Texinfo, all the necessary escaping was automatically performed. This way, it is very easy to insert, in the same document, a code, and its result (as in this example). This is actually the formatting performed by source-highlight; except for the comment, this is basically what you should have written yourself to do all the escaping stuff manually: @include txt2texinfo.txt.texinfo.texinfo @cindex failsafe In case source-highlight does not handle a specific input language, you can still use the option @code{--failsafe} (@ref{Invoking source-highlight}) and also in that case no highlighting will be performed, but source-highlight will transform the input file in the output format. @cindex default.lang Note, however, that if the input language cannot be established, the @file{default.lang} will be used: an empty language definition file which you might want to customize. @node Related Software and Links, , Using source-highlight as a simple formatter, Introduction @section Related Software and Links Here we list some software related to source-highlight in the sense that it uses it as a backend (i.e., provides an interface to source-highlight) or it uses some of its features (e.g., definition files): @itemize @item @cindex Source-Highlight-Qt @cindex Qt Source-highlight-qt is a library for performing syntax highlighting in Qt documents by relying on GNU Source-Highlight library. This library provides an implementation of the qt abstract class QSyntaxHighlighter class, and it deals both with Qt3 and Qt4. @uref{http://srchiliteqt.sourceforge.net}. @item @cindex QSource-Highlight @cindex Qt QSource-Highlight is a Qt4 front-end for GNU Source-Highlight (it relies on the library Source-Highlight-Qt). You can highlight your code on the fly, and have the highlighted output in all the formats supported by source-highlight (e.g., HTML, LaTeX, Texinfo, etc.). You can then copy the formatted output and paste it (e.g., in your blog), or save it to a file. A preview of the highlighted output is available for some output formats (e.g., HTML, XHTML, etc.). @uref{http://qsrchilite.sourceforge.net}. @item @cindex SourceHighlightIDE @cindex KDE SourceHighlightIDE is a small IDE (based on Qt4 and Source-highlight-qt) I wrote for developing and debugging new language definitions for source-highlight: @uref{http://srchighliteide.sourceforge.net}. @item @cindex Ksrc2highlight @cindex KDE Martin Gebert implemented a KDE interface to source-highlight programs (and he did a wonderful job!), and it is called @emph{Ksrc2highlight}; if you want to test it: @uref{http://www.mgebert.de/Ksrc2highlight}. @item @cindex java2html There's also a Java version of java2html, you can find it at @uref{http://www.generationjava.com/projects/Java2Html.shtml}. @item This web site provides a web interface to source-highlight so that you can highlight your code on-line: @uref{http://www.alaide.com/outils_colorsyntaxe.php} @item @cindex SHJS SHJS is a JavaScript program that highlights source code passages in HTML documents. Documents using SHJS are highlighted on the client side by the web browser. SHJS uses language definitions from Source-highlight. @uref{http://shjs.sourceforge.net} @item @cindex code2blog Code2blog is a pyGTK front-end to source-highlight for easy conversion from source code to HTML. @uref{http://code.google.com/p/code2blog} @item @cindex Apache Andy Buckley wrote a wrapper around source-highlight, which can be used as an Apache filter to highlight source code in Web pages on the fly. @uref{http://www.insectnation.org/projects/filter-src-highlight} @item @cindex RapidWeaver Roger Nilsson wrote a frontend for source-highlight that is used in a popular webdesign app for OSX called RapidWeaver. The frontend is called High-Light and allows users to easily add syntax-colored code inside RapidWeaver. @uref{http://nilrogsplace.se/webdesign/rapidweaver/plugins/high-light/index_en.html} @item @cindex Firefox Mauricio Zepeda published in his blog an article with a script to automatically highlight a file and show it in Firefox: @uref{http://chillorb.com/?p=122} @item @cindex Wiki @cindex Ikiwiki Jason Blevins made a plugin for Ikiwiki that enables syntax highlighting of source code fragments and whole files via source-highlight. @uref{http://jblevins.org/projects/ikiwiki/code} @item @cindex Wiki @cindex Php Pascal Bleser created a PHP extension that uses the GNU source-highlight library directly from PHP, instead of relying on spawning a process or using the source-highlight CGI. @uref{http://code.google.com/p/php-source-highlight/} @item @cindex SIP @cindex Python @cindex PyQt Roberto Alsina made a partial python binding using SIP so that you can use Source-Highlight-Qt in PyQt programs. @uref{http://marave.googlecode.com/svn/trunk/marave/highlight/} @item @cindex Perl A perl binding for source-highlight is available at CPAN: @uref{http://search.cpan.org/perldoc?Syntax::SourceHighlight} @item @cindex Pastebin Danijel Tasov wrote a pastebin service based on perl source-highlight binding: @uref{http://pb.rbfh.de} @end itemize @node Installation, Copying, Introduction, Top @chapter Installation @cindex installation @cindex compilation See the file @file{INSTALL} for detailed building and installation instructions; anyway if you're used to compiling Linux software that comes with sources you may simply follow the usual procedure, i.e., untar the file you downloaded in a directory and then: @example cd <source code main directory> ./configure make make install @end example @cindex shadow build We strongly suggest to use shadow builds, thus, create a build directory, say @file{build} and run configuration and make in that directory: @example cd <source code main directory> mkdir build cd build ../configure make make install @end example However, before you do this, please check that you have everything that is needed to build source-highlight, @ref{What you need to build source-highlight}. Note: unless you specify a different install directory by @code{--prefix} option of configure (e.g. @code{./configure --prefix=<your home>}), you must be root to run @code{make install}. You may want to run @code{./configure --help} to see all the possible options that can be passed to the configuration script. @cindex directories Files will be installed in the following directories: @table @code @item Executables @code{prefix/bin} @item docs and output examples @code{prefix/share/doc/source-highlight} @item library examples @code{prefix/share/doc/source-highlight/examples} @item library API documentation @code{prefix/share/doc/source-highlight/api} @item conf files @code{prefix/share/source-highlight} @end table Default value for prefix is @code{/usr/local} but you may change it with @code{--prefix} option to configure. For further @code{configure} options, you can run @code{configure --help}. @cindex bash completion Tiziano Muller wrote a bash completion configuration file for source-highlight; this will be installed by default in the directory @code{sysconfdir/bash_completion.d}, where @code{sysconfdir} defaults to @code{prefix/etc}; however, typically, the directory where the bash completion script searches for configuration file is @code{/etc/bash_completion.d}. Thus, we suggest you explicitly specify this directory with the configuration script command line option @code{--with-bash-completion}. @cindex library @cindex @code{--with-doxygen} @cindex doxygen If you want to build and install the API documentation of Source-highlight library, you need to run @code{configure} with the option @code{--with-doxygen}, but you need the program @emph{Doxygen}, @url{http://www.doxygen.org}, to build the documentation. The documentation will be installed in the following directory: @table @code @item Library API documentation @code{prefix/share/doc/source-highlight/api} @end table @cindex java2html @cindex cpp2html NOTE: Originally, instead of Source-highlight, there were two separate programs, namely @emph{GNU java2html} and @emph{GNU cpp2html}. There are two shell scripts with the same name that will be installed together with Source-highlight in order to facilitate the migration (however their use is not advised and it is deprecated). @menu * Building with qmake:: * Download:: * Anonymous Git Checkout:: * What you need to build source-highlight:: * Tips on installing Boost Regex library:: * Patching from a previous version:: * Using source-highlight with less:: * Using source-highlight as a CGI:: * Building .rpm:: @end menu @node Building with qmake, Download, Installation, Installation @section Building with qmake @cindex qmake Since version 3.1.2, @value{srchilite} can be built also using @code{qmake}, the build tool from Qt libraries (@uref{http://qt.nokia.com}). This was made available to build @value{srchilite} on Windows based systems without using a Unix shell, and in particular to build @value{srchilite} @cindex MSVC with Microsoft MSVC compiler. You should use this method only if you don't have a Unix shell or if you really need to use the MSVC compiler (e.g., if you want to build @value{srchilitelib} to be used in MSVC based programs). @cindex boost You still need the boost regex library, and if you use MSVC, you can find installation packages for this library at @url{http://www.boostpro.com}. This build mechanism is still experimental, and, when using MSVC, only a static version of @value{srchilitelib} can be built (not a .dll). @cindex MinGW You can also use this method if you have the MinGW compiler, @uref{http://www.mingw.org}, (e.g., the one that comes with Qt Windows distribution) and you don't have @cindex msys Msys (@uref{http://www.mingw.org/wiki/MSYS}). Otherwise, you should still use the @code{configure} based mechanims. Using @code{qmake}, only a few options can be specified during the building (besides the ones you usually use with qmake), and these options can be specified only using environment variables: @table @code @item BOOST_REGEX By default, @code{boost_regex} will be used to link the boost library (i.e., @code{-lboost_regex}); if your boost regex library has a different name you must specify this name using this environment variable; e.g., if the library file is called @code{libboost_regex-mt.lib} or @code{boost_regex-mt.dll} you must set this variable to @code{boost_regex-mt}. @item INCPATH Specify the path of the boost header files. @item LIBS Specify the path of the boost lib files. @end table Please, take into consideration that specifying the boost library include and library paths is completely up to you, using @code{INCPATH} and @code{LIBS}, if they're not in the system path directories. Also remember to always use the option @code{-recursive} when running qmake. If you then want to run @code{make install}, you can use the variable @code{INSTALL_ROOT} to prefix the installation path, which, otherwise, is the root directory. @node Download, Anonymous Git Checkout, Building with qmake, Installation @section Download @cindex download You can download it from GNU's ftp site: @uref{ftp://ftp.gnu.org/gnu/src-highlite} or from one of its mirrors (see @uref{http://www.gnu.org/prep/ftp.html}). I do not distribute Windows binaries anymore; since, they can be built by using Cygnus C/C++ compiler, available at @uref{http://www.cygwin.com}. However, if you don't feel like downloading such compiler or you experience problems with the Boost Regex library (see also @ref{Tips on installing Boost Regex library}; please also keep in mind that if you don't have these libraries installed, and your C/C++ compiler distribution does not provide a prebuilt package, it might take some time, even hours, to build the Boost libraries from sources), you can request such binaries directly to me, by e-mail (find my e-mail at my home page) and I'll be happy to send them to you. An MS-Windows port of Source-highlight is available from @uref{http://gnuwin32.sourceforge.net}; however, I don't maintain those binaries personally, and they might be out of date. Archives are digitally signed by me (Lorenzo Bettini) with GNU gpg (@uref{http://www.gnupg.org}). My GPG public key can be found at my home page (@value{myhomepage}). You can also get the patches, if they are available for a particular release (see below for patching from a previous version). @node Anonymous Git Checkout, What you need to build source-highlight, Download, Installation @section Anonymous Git Checkout @cindex Git This project's git repository can be checked out through the following clone instruction@footnote{Since version 3.1.2 of Source-highlight the CVS repository was dismissed in favor of Git (@uref{http://git-scm.com/}).}: @example git clone git://git.savannah.gnu.org/src-highlite.git @end example Further instructions can be found at the address: @uref{http://savannah.gnu.org/projects/src-highlite}. And the git repository can also browsed on-line at @uref{http://git.savannah.gnu.org/cgit/src-highlite.git}. Please note that this way you will get the latest development sources of Source-highlight, which may also be unstable. This solution is the best if you intend to correct/extend this program: you should send me patches against the latest git repository sources. If, on the contrary, you want to get the sources of a given release, through git, say, e.g., version X.Y.Z, you must specify the tag @code{rel_X_Y_Z}. When you compile the sources that you get from the git repository, before running the @code{configure} and @code{make} commands, for the first time, you must run the command: @example autoreconf -i @end example @noindent This will run the autotools commands in the correct order, and also copy possibly missing files. You should have installed recent versions of @cindex automake @cindex autoconf @cindex libtool @code{automake}, @code{autoconf} and @code{libtool} in order for this to succeed. @cindex shadow build We strongly suggest to use shadow builds, thus, create a build directory, say @file{build} and run configuration and make in that directory: @example cd <source code main directory> mkdir build cd build ../configure make make install @end example To summarize, the steps to get the sources from git and make the first build are: @example git clone git://git.savannah.gnu.org/src-highlite.git cd src-highlite autoreconf -i mkdir build cd build ../configure make @end example @node What you need to build source-highlight, Tips on installing Boost Regex library, Anonymous Git Checkout, Installation @section What you need to build source-highlight @cindex compilation requirements @cindex building requirements @cindex boost Since version 2.0 Source-highlight relies on regular expressions as provided by boost (@uref{http://www.boost.org}), so you need to install at least the regex library from boost. Most GNU/Linux distributions provide this library already in a compiled form. If you use your distribution packages, please be sure to install also the development package of the boost libraries. If you experience problems in installing Boost Regex library, or in compiling source-highlight because of this library, please take a look at @ref{Tips on installing Boost Regex library}. If you want to use a specific version of the Boost regex library (because you have many versions of it), you can use the configure option @code{--with-boost-regex} to specify a particular suffix. For instance, @example ./configure --with-boost-regex=boost_regex-gcc-1_31 @end example Source-highlight has been developed under GNU/Linux, using gcc (C++), and bison (yacc) and flex (lex), and ported under Win32 with Cygwin C/C++compiler, available at @uref{http://www.cygwin.com}. I use the excellent @cindex automake @cindex autoconf @cindex libtool GNU Autoconf@footnote{@uref{http://www.gnu.org/software/autoconf}}, GNU Automake@footnote{@uref{http://www.gnu.org/software/automake}} and GNU Libtool@footnote{@uref{http://www.gnu.org/software/libtool}}. @cindex gnulib Since version 2.6 I also started to use Gnulib - The GNU Portability Library@footnote{@uref{http://www.gnu.org/software/gnulib}}, ``a central location for common GNU code, intended to be shared among GNU packages'' (for instance, I rely on Gnulib for checking for the presence and correctness of @code{getopt_long} function). Finally I used @emph{GNU gengetopt} (@uref{http://www.gnu.org/software/gengetopt}), for command line parsing. I started to use also @emph{doublecpp} (@uref{http://doublecpp.sourceforge.net}) that permits achieving dynamic overloading. Actually, apart from the boost regex library, you don't need the other tools above to build source-highlight (indeed I provide the output sources generated by the above mentioned tools), unless you want to develop source-highlight. However, if you obtained sources through Git, you need some other tools, see @ref{Anonymous Git Checkout}. @node Tips on installing Boost Regex library, Patching from a previous version, What you need to build source-highlight, Installation @section Tips on installing Boost Regex library @cindex Boost regex If you experience no problem in compiling source-highlight, you can happily skip this section@footnote{Since version 2.11, the @code{configure} script should be able to correctly find the boost regex library if it is in the compiler default path.} :-) I created this section because many users reported some problems after installing Boost Regex library from sources; other users had problems in compiling source-highlight even if this library was already correctly installed (especially windows users, using cygwin). I hope this section sheds some light in installing/using the Boost Regex library. Please, note that this section does not explain how to compile the Boost libraries (the documentation you'll find on @uref{http://www.boost.org} is well done); it explains how to tweak things if you have problems in compiling source-highlight even after a successful installation of Boost libraries. First of all, if your distribution provides packages for the Boost regex library, please be sure to install also the development package of the boost libraries, i.e., those providing also the header files needed to compile a program using these libraries. For instance, on my Debian system I had to install the package @code{libboost-regex-dev}, besides the package @code{libboost-regex}. If your distribution does not provide these packages then you have to download the sources of Boost libraries from @uref{http://www.boost.org} and follow the instructions for compilation and installation. However, I suggest you specify @file{/usr} as prefix for installation, instead of relying on the default prefix @file{/usr/local} (unless @file{/usr/local/include} is already in the inclusion path of your C++ compiler), since this will make things easier when compiling source-highlight. I suggest this, since @file{/usr/include} is usually the place where C++ searches for header files during compilation. If you successfully compiled and installed the Boost Regex library, or you installed the package from your distribution, but you STILL experience problems in compiling source-highlight, then you simply have to adjust some things as described in the following. If the @code{./configure} command of source-highlight reports this error: @example ERROR! Boost::regex library not installed. @end example @noindent then, the compiler cannot find the header files for this library. In this case, check that the directory @file{/usr/include/boost} actually exists; if it does not, then probably you'll find a similar directory, e.g., @file{/usr/include/boost-1_33/boost}, depending on the version of the library you have installed. Then, all you have to do is to create a symbolic link as follows: @example ln -s /usr/include/boost-1_33/boost /usr/include/boost @end example @noindent @cindex @code{CXXFLAGS} Alternatively, you might run source-highlight's configure as follows: @example ./configure CXXFLAGS=-I/usr/include/boost-1_33/ @end example If you install (or build) the Boost Regex library in a non standard path, e.g., somewhere in your home directory, say @file{/home/myhome/boost-1_33}, you'll have to update the @code{CXXFLAGS} variable accordingly on the @code{configure} command line; in this particular case, you might also have to specify the path of actual library files (@code{CXXFLAGS} will only specify the path of header files). In particular, you'll have to know where the lib files are within the boost installation (or build directory); for instance, if they are in @file{/home/myhome/boost-1_33/stage/lib}, while the header files (i.e., the @file{boost} header files directory) are in @file{/home/myhome/boost-1_33}, the complete @code{configure} command should be @cindex @code{LDFLAGS} @example ./configure CXXFLAGS=-I/home/myhome/boost-1_33 \ LDFLAGS=-L/home/myhome/boost-1_33/stage/lib @end example If then @code{./configure} command of source-highlight reports this other error: @example ERROR! Boost::regex library is installed, but you must specify the suffix with --with-boost-regex at configure for instance, --with-boost-regex=boost_regex-gcc-1_31 @end example @noindent then, there's still another thing to fix: you must find out the exact names of the files of your installed Boost Regex libraries; you can do this by using the command: @example $ ls -l /usr/lib/libboost_regex* @end example @noindent that, for instance, on one of my cygwin installation reports: @example -rwxr-x---+ Nov 9 23:29 /usr/lib/libboost_regex-gcc-mt-s-1_33.a -rwxr-x---+ Nov 22 09:22 /usr/lib/libboost_regex-gcc-mt-s.a -rwxr-x---+ Nov 9 23:29 /usr/lib/libboost_regex-gcc-mt-s-1_33.so -rwxr-x---+ Nov 22 09:22 /usr/lib/libboost_regex-gcc-mt-s.so @end example @noindent Now, you have all the information to correctly run the source-highlight's configure command: @example ./configure --with-boost-regex=boost_regex-gcc-mt-s-1_33 @end example @noindent or, if you solved the first problem in the second way@footnote{Command lines that are too long are split into multiple indented lines separated by a @code{\}. Of course these commands are to be given in one line only, anyway.}, @example ./configure CXXFLAGS=-I/usr/include/boost-1_33/ \ --with-boost-regex=boost_regex-gcc-mt-s-1_33 @end example Of course, you have to modify this command according to the names of your Boost Regex library installed files. These instructions managed to let many users, who were experiencing problems, to compile source-highlight If you still have problems, please send me an e-mail. @node Patching from a previous version, Using source-highlight with less, Tips on installing Boost Regex library, Installation @section Patching from a previous version @cindex patching If you downloaded a patch, say @file{source-highlight-1.3-1.3.1-patch.gz} (i.e., the patch to go from version 1.3 to version 1.3.1), cd to the directory with sources from the previous version (source-highlight-1.3) and type: @example gunzip -cd ../source-highlight-1.3-1.3.1.patch.gz | patch -p1 @end example and restart the compilation process (if you had already run configure a simple make should do). @node Using source-highlight with less, Using source-highlight as a CGI, Patching from a previous version, Installation @section Using source-highlight with less This was suggested by Konstantine Serebriany. The script @file{src-hilite-lesspipe.sh} will be installed together with source-highlight. You can use the following environment variables: @example export LESSOPEN="| /path/to/src-hilite-lesspipe.sh %s" export LESS=' -R ' @end example This way, when you use less to browse a file, if it is a source file handled by source-highlight, it will be automatically highlighted. @node Using source-highlight as a CGI, Building .rpm, Using source-highlight with less, Installation @section Using source-highlight as a CGI @cindex CGI CGI support was enabled thanks to Robert Wetzel; I haven't tested it personally. If you want to use source-highlight as a CGI program, you have to use the executable source-highlight-cgi. You can build such executable by issuing @example make source-highlight-cgi @end example @noindent in the @file{src} directory. @node Building .rpm, , Using source-highlight as a CGI, Installation @section Building .rpm @cindex rpm Christian W. Zuckschwerdt added support for building an .rpm and an .rpm.src. You can issue the following command @example rpmbuild -tb source-highlight-@value{VERSION}.tar.gz @end example for building an .rpm with binaries and @example rpmbuild -ts source-highlight-@value{VERSION}.tar.gz @end example for building an .rpm.src with sources. @node Copying, Simple Usage, Installation, Top @chapter Copying Conditions @cindex Copying conditions GNU Source-highlight is free software; you are free to use, share and modify it under the terms of the GNU General Public License that accompanies this software (see @file{COPYING}). GNU @command{source-highlight} was written and maintained by Lorenzo Bettini @value{myhomepage}. @node Simple Usage, Configuration files, Copying, Top @chapter Simple Usage @cindex sample Here are some realistic examples of running @command{source-highlight}@footnote{Command lines that are too long are split into multiple indented lines separated by a @code{\}. Of course these commands are to be given in one line only, anyway.}. Source-highlight only does a lexical analysis of the source code, so the program source is assumed to be correct! Here's how to run source-highlight (for this example we will use C/C++ input files, but this is valid also for other source-highlight input languages): @example source-highlight --src-lang cpp --out-format html \ --input @var{<C++ file>} \ --output @var{<html file>} \ --style-file @var{<style file>} \ @var{options} @end example For input files, apart from the @code{-i (--input)} option and the standard input redirection, you can simply specify some files at the command line and also use regular expressions (for instance @file{*.java}). In this case the name for the output files will be formed using the name of the source file with a .<ext> appended, where <ext> is the extension chosen according to the output format specified (in this example it would be .html). The style file (@ref{Output format style}) contains information on how to format specific language parts (e.g., keywords in blue and boldface, etc.). IMPORTANT: you must choose one of the above two invocation modes: either you use @code{-i (--input)}, @code{-o (--output)} (possibly replacing them with standard input/output redirection), or you specify one or many files without @code{-i (--input)}; if you try to mix them you'll get an error: @example source-highlight -o main.html main.cpp Please, use one of the two syntaxes for invocation: source-highlight [OPTIONS]... -i input_file -o output_file source-highlight [OPTIONS]... [FILES]... @end example If @code{STDOUT} string is passed as @code{-o (--output)} option, then the output is forced to the standard output anyway. If @code{-s (--src-lang)} is not specified, the source language is inferred by the extension of the input file or from the file name itself (possibly using also lower case versions); this, of course, does not work with standard input redirection. For further details, see @ref{How the input language is discovered}. If @code{-f (--out-format)} is not specified, the output will be produced in HTML. If @code{--style-file} is not specified, the @file{default.style}, which is included in the distribution, will be used (see @ref{Output format style} for further information). @menu * HTML and XHTML output:: * LaTeX output:: * Texinfo output:: * DocBook output:: * ANSI color escape sequences:: * Odf output:: @end menu @node HTML and XHTML output, LaTeX output, Simple Usage, Simple Usage @section HTML and XHTML output @cindex HTML @cindex XHTML The default output format for HTML and XHTML uses fixed width fonts by inserting all the formatted output between @code{<tt>} and @code{</tt>}. Thus, for instance, specification for fixed width and not fixed width (see @ref{Output format style}) will have no effect: every character will have fixed width. If you don't like this default behavior and would like to have not fixed fonts by default (as it happens, e.g., with @LaTeX{} output) you can use the file @file{html_notfixed.outlang} with the command line argument @code{--outlang-def}. For XHTML output, the corresponding file is @file{xhtml_notfixed.outlang} Furthermore, the file @file{htmltable.outlang} can be used to generate HTML output enclosed in an HTML table (which will use also a background color if specified in the style file). The file @file{xhtmltable.outlang} does the same but for XHTML output. @node LaTeX output, Texinfo output, HTML and XHTML output, Simple Usage @section @LaTeX{} output @cindex @LaTeX{} When using @LaTeX{} output format you can choose between monochromatic output (by using @code{-f latex}) or colored output (by using @code{-f latexcolor}). When using colored output, you need the @code{color} package (again this should be present in your system). Of course, you are free to define your own @LaTeX{} output format, see @ref{Output Language Definitions}. @node Texinfo output, DocBook output, LaTeX output, Simple Usage @section Texinfo output @cindex Texinfo When using the Texinfo output format, you may want to use a dedicated style file, @file{texinfo.style}, which comes with the source-highlight distribution, with the option @code{--style-file}. For instance, the example in @ref{Examples} is formatted with this style file. @node DocBook output, ANSI color escape sequences, Texinfo output, Simple Usage @section DocBook output @cindex DocBook DocBook output is generated using the @code{<programlisting>} tag. If the @code{--doc} command line option is given, an @code{<article>} document is generated. @node ANSI color escape sequences, Odf output, DocBook output, Simple Usage @section ANSI color escape sequences @cindex ANSI color If you're using this output format, for instance together with @code{less} (see @ref{Using source-highlight with less}), you may want to use the @file{esc.style}, which comes with the source-highlight distribution, with the option @code{--style-file}. This should result in a more pleasant coloring output. @node Odf output, , ANSI color escape sequences, Simple Usage @section Odf output The ODF language output for GNU source-highlight enables the user to generate color-highlighted ODF output of source code files. Or to generate ODF color-highlighted snippets to be used by ODF back-ends (like asciidoc-odf). We create an @code{.fodt} file, which is a Text document that newer versions of LibreOffice can open. @node Configuration files, Invoking source-highlight, Simple Usage, Top @chapter Configuration files @cindex configuration files During execution, source-highlight needs some files where it finds directives on how to recognize the source language (if not specified explicitly with @code{--src-lang} or @code{--lang-def}), on which output format to use (if not specified explicitly with @code{--out-format} or @code{--outlang-def}), on how to format specific source elements (e.g., keywords, comments, etc.), and source and output language definitions. These files will be explained in the next sections. @cindex @code{--data-dir} If the directory for such files is not explicitly specified with the command line option @code{--data-dir}, these files are searched for in the following order: @itemize @item the current directory; @item the installation directory for conf files, see @ref{Installation} (please keep in mind that this directory is hard-coded into source-highlight during compilation). @item if the source-highlight command is specified with an explicit path name, the installation directory name is still used, but relative to the explicit path name. @end itemize In particular, the user can set the value also with the environment variable @cindex @code{SOURCE_HIGHLIGHT_DATADIR} @code{SOURCE_HIGHLIGHT_DATADIR} (see also @ref{The program source-highlight-settings}). If you want to be sure about which file is used during the execution, you can use the command line option @code{--verbose}. @menu * Output format style:: * Output format style using CSS:: * Default Styles:: * Language map:: * Language definition files:: * Output Language map:: * Output Language definition files:: * Developing your own definition files:: @end menu @node Output format style, Output format style using CSS, Configuration files, Configuration files @section Output format style @cindex output style @cindex default.style You must specify your options for syntax highlighting in the file @file{default.style}@footnote{Before version 2.1, this file was called @file{tags.j2h} which used to be a very obscure name. I hope this name convention is a better one :-).}. You can specify formatting options for each element defined by a language definition file (you can get the list of such elements, @cindex @code{--show-lang-elements} by using @code{--show-lang-elements}, see @ref{Listing Language Elements}). @cindex @code{bgcolor} @cindex background color Since version 2.6, you can also specify the background color for the output document, using the keyword @code{bgcolor} (this might be visible only when the @code{--doc} command line option is used). If many elements share the same formatting options, you can specify these elements in the same line, separated by a comma@footnote{Since version 2.6.}. Here's the @file{default.style} that comes with this distribution (this is formatted by using the @file{style.lang} that is shown in @ref{Tutorials on Language Definitions}): @include default.style.texinfo This file tries to define a style for most elements defined in the language definition files that comes with Source-highlight distribution. @cindex @code{--style-file} You can specify your own file (it doesn't have to be named @file{default.style}) with the command line option @code{--style-file}@footnote{Before version 2.1, this command line option was called @code{--tags-file} which used to be a very obscure name. I hope this name convention is a better one :-).}, see @ref{Invoking source-highlight}. You can also specify the color of normal text by adding this line @example normal darkblue ; @end example @cindex color @cindex background color As you might see the syntax of this file is quite straightforward: after the element (or elements, separated by commas) you can specify the color, and the background color@footnote{Since version 2.6.} by using the prefix @code{bg:} (for instance, in the @file{default.style} above the background color is specified for the @code{todo} element). Note that the background color might not be available for all output formats: it is available for XHTML and @LaTeX{} but not for HTML@footnote{Of course, if you use HTML and an external CSS file you will achieve the same result.}. @cindex bold @cindex italics @cindex underline @cindex fixed @cindex notfixed Then, you can specify further formatting options such as bold, italics, etc.; these are the keywords that can be used: @example b = bold i = italics u = underline f = fixed nf = not fixed noref = no reference information is generated for these elements @end example @cindex color Since version 2.2, the color specification is not required. For instance, the @file{texinfo.style} is as follows (we avoid colors for Texinfo outputs): @include texinfo.style.texinfo You may also specify more than on of these options separated by commas, e.g. @example keyword blue u, b ; @end example @noindent Please keep in mind that in this case the order of these specified options is kept during the generation of the output; for instance, depending on the specific output format, the sequences @code{u, b} and @code{b, u} may lead to different results. In particular, the style that comes first is used after the ones that follow. For instance, in the case of HTML, the sequence @code{u, b} will lead to the following formatting: @code{<u><b>...</b></u>}. @cindex noref The @code{noref} option specifies that for this element reference information are not generated (see @ref{Generating References}). For instance, this is used for the @code{comment} element, since we do not want that elements in a comment are searched for cross-references. These are all possible color logical names handled by source-highlight@footnote{You can see these colors in HTML in the file @file{colors.html}.}: @example black red darkred brown yellow cyan blue pink purple orange brightorange green brightgreen darkgreen teal gray darkblue white @end example @cindex direct color scheme You can also use the direct color scheme for the specific output format, by using double quotes, such as, e.g., @code{"#00FF00"} in HTML@footnote{Note that, since version 2.2, you must use double quotes.} or even string colors in double quotes@footnote{Since version 2.6.}, such as @code{"lightblue"}. Of course, the double quotes will be discarded during the generation. For instance, this is the @file{syslog.style} used in the @file{tests} directory. This uses direct color schemes. @include syslog.style.texinfo Note that, if you use direct color schemes, source-highlight will perform no transformation, and will output exactly the color scheme you specified. For instance, the specification @code{"brown"} is different from @code{brown}: the former will be output as it is, while the latter will be translated in the corresponding color of the output format (for HTML the visible result is likely to be the same). It is up to you to specify a color scheme string that is handled by the specific output format. Thus, direct color schemes might not be portable in different output formats; for instance, @code{"#00FF00"} is valid in HTML but not in @LaTeX{}. @node Output format style using CSS, Default Styles, Output format style, Configuration files @section Output format style using CSS @cindex CSS Since version 2.6 you can specify the output format style also using a limited CSS syntax. Please, note that this has nothing to do with output produced by source-highlight using the @code{--css} option. @cindex @code{--style-css-file} By using a CSS file as the style file (i.e., passing it to the @code{--style-css-file} command line option) you will only specify the output format style using the same syntax of CSS. This means that you can use a css syntax for specifying the output format style independently from the actual output (this is what the output format style is for). Thus, you can use a css file as the output format style also for @LaTeX{} output (just like you would do with a source-highlight output format style, @ref{Output format style}). This feature is provided basically for code re-use: you can specify the output format style using a css file, and then re-use the same css file as the actual style sheet of other HTML pages (or even output files produced by source-highlight using the @code{--css} option). Note that this feature is quite primordial, so only a limited subset of CSS syntax is recognized. In particular, selectors are always intended as CSS class selectors, so they must start with a dot. @code{/* */} comments are handled. Properties (and their values) not handled by source-highlight are simply (and silently) discarded). This is an example of CSS specification handled correctly by source-highlight as a style format specification: @include css_example.css.texinfo Finally, this is the @file{default.css} that corresponds to @file{default.style} presented in @ref{Output format style}: @include default.css.texinfo If you pass this file to the @code{--style-css-file} command line option and you produce an output file, you will get the same result of using @file{default.style}. Source-highlight comes with a lot of CSS files that can be used either as standard CSS files for HTML documents, or as style files to pass to @code{--style-css-file}. In the documentation installation directory (see @ref{Installation}) you will find the file @file{style_examples.html} which shows many output examples, each one with a different CSS style. @node Default Styles, Language map, Output format style using CSS, Configuration files @section Default Styles This file@footnote{Since version 2.9.} (the default file is @file{style.defaults}) lists the default style for a language element whose output style is not specified in the style file; in particular the following line (comment lines start with @code{#}): @example elem1 = elem2 @end example @noindent tells that, if the style for an element, say elem1, is not specified in the style file, then elem1 will have the same style of elem2. @cindex style.defaults For instance, this is the @file{style.defaults} that comes with Source-highlight: @include style.defaults.texinfo @noindent In this case the style for the element @code{preproc} will default to the style of the element @code{keyword}. This file is useful when you want to create your own style file and you don't want to specify styles for all the elements that will have the same output style in your style (e.g., the default style formats @code{preproc} elements differently from keywords, but if in your style you don't specify a style for it, a @code{preproc} element will still be formatted as a @code{keyword}). @node Language map, Language definition files, Default Styles, Configuration files @section Language map @cindex language map This configuration file associates a file extension to a specific language definition file. You can also use such file extension to specify the @code{--src-lang} option (see @ref{Simple Usage}). Source-highlight comes with such a file, called @file{lang.map}. Of course, you can override the settings of this file by writing your own language map file and specify such file with the command line option @code{--lang-map}). Moreover, as explained above, if a file @file{lang.map} is present in the current directory, such version will be used. The format of such file is quite simple (comment lines start with @code{#}): @example extension = language definition file @end example The default language definition file is shown in @ref{Introduction}. @node Language definition files, Output Language map, Language map, Configuration files @section Language definition files These files are crucial for source-highlight since they specify the source elements that have to be highlighted. These files also allow to specify your own language definitions in order to deal with a language that is not handled by source-highlight@footnote{This is the main difference introduced in version 2.0 with respect the previous version.}. The syntax for these files is explained in @ref{Language Definitions}. @node Output Language map, Output Language definition files, Language definition files, Configuration files @section Output Language map @cindex output language map This configuration file associates an output format to a specific output language definition file. You can use the name of that output format to specify the @code{--out-format} option (see @ref{Simple Usage}). Source-highlight comes with such a file, called @file{outlang.map}. Of course, you can override the settings of this file by writing your own output language map file and specify such file with the command line option @code{--outlang-map}). Moreover, as explained above, if a file @file{outlang.map} is present in the current directory, such version will be used. The format of such file is quite simple: @example output format name = language definition file @end example The default language definition file is shown in @ref{Introduction}. In particular, there is a convention for the output format name in the output language map: the one with @code{-css} suffix is the one used when @code{--css} command line option is given @node Output Language definition files, Developing your own definition files, Output Language map, Configuration files @section Output Language definition files These files are crucial for source-highlight since they specify how the source elements are highlighted. These files also allow to specify your own output format definitions in order to deal with an output format that is not handled by source-highlight@footnote{This is the main difference introduced in version 2.1 with respect the the previous version.}. The syntax for these files is explained in @ref{Output Language Definitions}. These files are part of source-highlight distribution, but they can also be downloaded, independently, from here: @value{outlangfilesurl} @node Developing your own definition files, , Output Language definition files, Configuration files @section Developing your own definition files I encourage those who write new language definitions or correct/modify existing language definitions to send them to me so that they can be added to the source-highlight distribution! Since these files require more explanations (that, however, are not necessary to the standard usage of source-highlight), they are carefully explained in separate parts: @ref{Language Definitions} and @ref{Output Language Definitions}. These files are part of source-highlight distribution, but they can also be downloaded, independently, from here: @value{langfilesurl} @node Invoking source-highlight, Language Definitions, Configuration files, Top @chapter Invoking @command{source-highlight} @cindex invoking @cindex version @cindex options @cindex usage @cindex help @cindex getting help The format for running the @command{source-highlight} program is: @example source-highlight @var{option} @dots{} @end example @code{source-highlight} supports the following options, shown by the output of @code{source-highlight --detailed-help}: @smallexample @include help-output.texinfo @end smallexample Let us explain some options in details (apart from those that should be clear from the @code{--help} output itself, and those already explained in @ref{Simple Usage}). @c Formatting copied from the Texinfo 4.0 manual. @table @code @item --data-dir @cindex @code{--data-dir} Source-highlight, during the execution, will need some files, such as, e.g., language definition files, output format definition files, etc. These files are installed in @code{prefix/share/source-highlight} where @code{prefix} is chosen at compilation time (see @xref{Installation}). Thus, source-highlight should be able to find all the files it needs independently. However, if you want to override this setting, e.g., because you have your own language definition files, or simply because you installed a possible source-highlight binary in a different directory from the one used during the compilation, you can use the command line option @code{--data-dir}. @item --doc @itemx -d If you want a stand alone output document (i.e., an output file that is not thought to be included in another document), specify this option (otherwise you just get some text that you can paste into another document). If you choose this option and do not provide a @code{--title}, the your source file name will be used as the title. @item --no-doc The @code{--doc} option above is actually implied by other command line options (e.g., @code{--css}). If you do not want this (e.g., you want to include the output in an existing document containing the global style sheet), you can disable this by using @code{--no-doc}. @item --css @itemx -c Specify the style sheet file (e.g., a @file{.css} for HTML@footnote{As explained before, originally Source-highlight was thought mainly for generating HTML output, this is why the term @emph{css} is used for style sheets.}) for the output document. Note that source-highlight will not use this file: it will simply use this file name when generating the output file, so to specify that the output file uses this file as the style sheet (e.g., if the generated HTML relies on this file as the CSS file). @item --tab @itemx -t With this options, tab characters will be converted into specified number of space characters (tabulation points will be preserved). This option is automatically selected when generating line numbers. @item --style-file @itemx --style-css-file Specify the file that source-highlight will use to produce (i.e., format) the output (e.g., colors and other styles for each language element). The formats of these files are detailed in @ref{Output format style} and in @ref{Output format style using CSS}, respectively. @item --style-defaults Specify the file that contains the default styles for elements whose styles are not found in the style file (see @ref{Default Styles} for further details). @item --output-dir You can pass to source-highlight more than one input file (see @ref{Simple Usage}). In this case you cannot specify the output file name. In such cases the output files will be automatically generated into the directory where you invoked the command from; if you want the output files to be generated into a different directory you can use this option. @item --infer-lang @cindex language inference @cindex @code{--infer-lang} Force the inference mechanism for detecting the input language. This is detailed in @ref{How the input language is discovered}. @item --line-number Line numbers will be generated in the output, using the (optional) specified padding character@footnote{Padding character can be specified since version 2.8.} (the default padding character is @code{0}). @item --line-number-ref As @code{--line-number}, this option numbers all the output lines, and, additionally, generates an anchor for each line. The anchor consists of the specified prefix (default is @code{line}) and the line number (e.g., @code{line25}). For instance, as prefix, if you deal with many files, you can use the file name. Note that some output languages might not support this feature (e.g., @code{esc}, since it makes no sense in such case). See @ref{Anchors and References} for defining how to generate an anchor in a specific output language. @cindex line ranges @cindex range context @cindex range separator @item --line-range @itemx --range-context @itemx --range-separator Since version 2.11, you can specify multiple line ranges: only the lines in the source that are in these ranges will be output. For instance, by specifying @example --line-range="-5","10","20-25","50-" @end example Only the following lines will be output: the first 5 lines, line 10, lines 20 to 25 and from line 50 to the end of input. (See also the examples in @ref{Line ranges}). Together with @code{--line-range}, you can also specify @code{--range-context}: this is the number of lines that will be printed before and after the lines of a range (i.e., the surrounding ``context''). These lines will not be highlighted: they will be printed according to the style @code{context}. For instance, extending the previous example, @example --line-range="-5","10","20-25","50-" --range-context=1 @end example Also the following lines will be output: 6, 9, 11, 19, 26, 49. (See also the examples in @ref{Line ranges (with context)}). Finally, you can specify a range separator line string with @code{--range-separator} that will be printed between ranges (See also the examples in @ref{Line ranges (with context)}). The separator string is preformatted automatically, so, e.g., you don't have to escape special output characters, such as the @{ @} in texinfo output. @cindex regex ranges @item --regex-range Ranges can be expressed also using regular expressions, with the command line option @code{--regex-range}. In this case the beginning of the range will be detected by a line containing (in any point) a string matching the specified regular expression; the end will be detected by a line containing a string matching the same regular expression that started the range. This feature is very useful when we want to document some code (e.g., in this very manual) by showing only specific parts, that are delimited in a ad-hoc way in the source code (e.g., with specific comment patterns). You can see some usage examples in @xref{Regex ranges}. The specified strings (this option accepts multiple occurrences) must be valid regular expressions (thus you must escape special characters accordingly), otherwise you will get an error. Furthermore, @code{--line-range} and @code{--regex-range} cannot coexist in the same command line. @item --failsafe @cindex failsafe If no language specification is found, an error will be printed and the program exits. With this option, instead, in such situations, the input is simply formatted in the output format. This is useful when @command{source-highlight} is used with many input files, and it is also used in the @file{src-hilite-lesspipe.sh} script. Actually I failed to find a good reason why one should not always use this option. So my suggestion is to always use it when you run source-highlight (and indeed, in the future, this option might become the default one). See also @ref{Using source-highlight with less}, @ref{Using source-highlight as a simple formatter}. @cindex default.lang When using @code{--failsafe}, if no input language can be established, source-highlight will use the input language definition file @file{default.lang}, which is an empty file. You might want to customize such file, though. @item --debug-lang @item --show-regex Allows to debug a language definition file, @ref{Debugging}. @end table The other command line options dealing with references are explained in more details in @ref{Generating References}. @menu * How the input language is discovered:: @end menu @node How the input language is discovered, , Invoking source-highlight, Invoking source-highlight @section How the input language is discovered As already explained, @ref{Simple Usage}, source-highlight uses a language definition file according the language specified with the option @code{--src-lang}, or @code{--lang-def}, or by using the input file extension. Since version 2.5, source-highlight can use an inference mechanism to deduce the input language. For the moment, it can detect script languages based on the ``sha-bang'' mechanism, i.e., when the first line of a script contains a line such as, e.g., @example #!/bin/sh @end example It detects script languages specified by using the @code{env} program@footnote{Since version 2.7.}: @example #!/usr/bin/env perl @end example It recognizes the Emacs convention, of declaring the Emacs major mode using the format @code{-*- lang -*-}. For instance, a script starting as the following one: @example #!/bin/bash # -*- Tcl -*- @end example @noindent will be interpreted as a Tcl script, and not as bash script. Finally, it recognizes @code{<?} specifications (e.g., @code{<?php} and @code{<?xml}) and @code{<!doctype} (in that case, it infers it is an xml file)@footnote{Since version 3.1.2.}. This inference mechanism is performed, by default, in case the input language is neither explicitly specified nor found in the language map file by using the input file extension or the filename itself, possibly also the lowercase version (the input file may also have no extension at all, but, for instance, a @file{ChangeLog} input file will be highlighted using @file{changelog.lang}). @cindex @code{--infer-lang} Furthermore, this mechanism can be given priority with the command line option @code{--infer-lang}. For instance, this is used in the script @file{src-hilite-lesspipe.sh} (@ref{Using source-highlight with less}) when running source-highlight, in order to avoid the problem of formatting a Perl script as a Prolog program (since the extension @file{.pl} is associated to Prolog programs in the language map file, @ref{Perl}). @node Language Definitions, Output Language Definitions, Invoking source-highlight, Top @chapter Language Definitions @cindex language definition Since version 2.0 source-highlight uses a specific syntax to specify source language elements (e.g., keywords, strings, comments, etc.). Before version 2.0, language elements were scanned through Flex. This had the drawback of writing a new flex file to deal with a new language; even worse, a new language could not be added ``dynamically'': you had to recompile the whole source-highlight program. Instead, now, language elements are specified in a file, loaded dynamically, through a (hopefully) simple syntax. Then, these definitions are used internally to create, on-the-fly, regular expressions that are used to highlight the elements (see also @ref{How source-highlight works}). In particular, we use the regular expressions provided by the Boost library (see @ref{Installation}). Thus, when writing a language definition file you will surely have to deal with regular expressions. Don't be scared: for most of the languages you may never have to deal with difficult regular expressions, and you can also specify language keywords (such as, e.g., ``if'', ``while'', etc., see @ref{Simple definitions}); moreover, for defining delimited language elements you will not have to write a regular expression, but just the delimiters (see @ref{Delimited definitions}). However, there might be some language definitions that may require heavy use of more involved regular expressions (e.g., Perl, just to mention one). Of course, we use the Boost regex library regular expression syntax. We refer to Boost documentation for such syntax, @uref{http://www.boost.org/libs/regex/doc/syntax.html}, however, in @ref{Notes on regular expressions}, we provide some notes on regular expressions that might be helpful for those who never dealt with them. By default, Boost regex library uses Perl regular expression syntax, and, at the moment, this is the only syntax supported by source-highlight. Here, we see such syntax in details, by relying on many examples. This allows a user to easily modify an existing language definition and create a new one. These files have, typically, extension @file{.lang}. Each definition basically associates a regular expression to a language element and defines a name for the language element. Such name will be used to associate a particular style (e.g., bold face, color, etc.) when highlighting such elements. You cannot use names that are the same of keywords used in the language definition syntax (e.g., @code{start}, as shown later, is a reserved word). Comments can be given by using @code{#}; the rest of the line is considered as a comment. Source-highlight will scan each line of the input file separately. So a regular expression that tries to match new line characters is destined to fail. However, the language definition syntax provides means to deal with multiple lines (see @ref{Delimited definitions} and @ref{State/Environment Definitions}). @menu * Ways of specifying regular expressions:: * Simple definitions:: * Line wide definitions:: * Order of definitions:: * Delimited definitions:: * Variable definitions:: * Dynamic Backreferences:: * File inclusion:: Include the contents of another file * State/Environment Definitions:: * Explicit subexpressions with names:: * Redefinitions and Substitutions:: * How source-highlight works:: * Notes on regular expressions:: * The program check-regexp:: * Listing Language Elements:: * Concluding Remarks:: * Debugging:: Debug a language definition file * Tutorials on Language Definitions:: @end menu @node Ways of specifying regular expressions, Simple definitions, Language Definitions, Language Definitions @section Ways of specifying regular expressions Before getting into details of language definition syntax, it is crucial to describe the 3 possible ways of specifying a regular expression string. These 3 different ways, basically differ in the way they handle regular expression special characters, such, e.g., parenthesis. For this reason, one mechanism can be more powerful than another one, but it could also require more attention; furthermore, there can be situations where you're forced to use only one mechanism, since the other ones cannot accomplish the required goal. @table @code @cindex @code{"expression"} @item "expression" If you use double quotes (note, @code{"} and not @code{``} or @code{''}) to specify a regular expression, then basically all the characters, but the alternation symbol, i.e., the pipe symbol @code{|}, are considered literally, and thus will be automatically escaped (e.g., a dot @code{.} is interpreted as the character @code{.} not as the regular expression wild card). Thus, for instance, if you specify @example "my(regular)ex.pre$$ion@{*@}" @end example @noindent source-highlight will automatically transform it into @example my\(regular\)ex\.pre\$\$ion\@{\*\@} @end example The special character @code{|}, unless it is meant to separate two alternatives (@ref{Simple definitions}), must be escaped with the character @code{\}, e.g., @code{\|}. Also the character @code{\}, if it is intended literally, must be escaped, e.g., @code{\\}. @cindex @code{'expression'} @item 'expression' If you want to enjoy (almost) the full power of regular expressions, you need to use single quoted strings (@code{'}), instead of double quoted strings. This way, you can specify special characters with their intended meaning. However, marked subexpressions are automatically transformed in non marked subexpressions, i.e., the parts in the expression of the shape @code{(...)} will be transformed into @code{(?:...)} (as explained in @ref{Notes on regular expressions}, @code{(?:...)} lexically groups part of a regular expression, without generating a marked sub-expression). Thus, for instance, if you specify @example 'my(regular)ex.pre$ion*' @end example @noindent source-highlight will automatically transform it into @example my(?:regular)ex.pre$ion* @end example Since marked subexpressions cannot be specified with this syntax, then @emph{backreferences} (see @ref{Notes on regular expressions}) are not allowed. @cindex @code{`expression`} @item `expression` @cindex marked subexpressions @cindex backreference @cindex backtick This syntax@footnote{Since version 2.7.} (note the difference, this one uses the @emph{backtick} @code{`} while the previous one uses @code{'}) for specifying a regular expression was introduced to overcome the limitations of the other two syntaxes. With this syntax, the marked subexpressions are not transformed, and so you can use regular expressions mechanisms that rely on marked subexpressions, such as @emph{backreferences} and @emph{conditionals} (see @ref{Notes on regular expressions}). This syntax is also crucial for highlighting specific program parts of some programming languages, such as, e.g., Perl regular expressions (e.g., in substitution expressions) that can be expressed in many forms, in particular, separators for the part to be replaced and the part to replace which can be any non alphanumerical characters@footnote{This issue concerning Perl regular expression syntax was raised by Elias Pipping, and this also pushed me to deal with this more powerful syntax that permits using backreferences, for instance. Although we're still far from highlighting Perl syntax completely (@ref{Perl}), I definitely must thank Elias for his precious information about this matter :-)}, for instance, @example s/foo/bar/g s|foo|bar|g s#foo#bar#g s@@foo@@bar@@g @end example Using this syntax, and backreferences, we can easily define a single language element to deal with these expressions (without specifying all the cases for each possible non alphanumerical character): @example regexp = `s([^[:alnum:][:blank:]]).*\1.*\1[ixsmogce]*` @end example @end table Since version 2.11, in all kinds of regular expression specification, you can insert newline characters, which will simply be ignored. Thus, e.g., the file: @include test_newlines.lang.texinfo @noindent and the file: @include test_nonewlines.lang.texinfo @noindent are equivalent. However, the former is surely more readable. Note however, that space characters are NOT ignored in regular expression definitions. @node Simple definitions, Line wide definitions, Ways of specifying regular expressions, Language Definitions @section Simple definitions @cindex simple language definition The simplest way to specify language elements is to list the possible alternatives. This is the case, for instance, for keywords. For instance, in @file{java.lang} you have: @example keyword = "abstract|assert|break|case|catch|class|const", "continue|default|do|else|extends|false|final", "finally|for|goto|if|implements|instanceof|interface" keyword = "native|new|null|private|protected|public|return", "static|strictfp|super|switch|synchronized|throw", "throws|true|this|transient|try|volatile|while" @end example You can separate quoted definitions with commas. Alternatively, within a quoted definition, alternatives can be separated with the pipe symbol @code{|}. The above definition defines the language element @code{keyword}. Each time an element is found in the source file, it is highlighted with the style for the element with the same name in the output format style file (note that all elements shown in the example are taken from the language definition files that come with source-highlight and there is a style for each of such elements, see @ref{Configuration files}). If such an element is not specified in the output format style file, it is simply not highlighted (actually, it is highlighted with style @code{normal}, @ref{Configuration files}) (so pay attention to typos :-). From the above example you may have noted that language element definitions are cumulative, so the second @code{keyword} definition does not replace the first one. (Indeed, in some cases you may want to actually redefine a language element; this is possible as explained in @ref{Redefinitions and Substitutions}). Note that words specified in double quotes have to match exactly in a source file, and they must be isolated (not surrounded by anything but spaces). Thus for instance @code{class} is matched as a keyword, but in @code{my_class} the substring @code{class} is not matched as keyword. From the point of view of regular expressions a string such as @code{class} in a double quote simple definition is intended as @code{\<(class)\>}. Special characters have to be escaped with the character @code{\}. So for instance if you want to specify the character @code{|}, which is normally used to separate alternatives in double quoted strings, you have to specify @code{\|}. As explained in @ref{Ways of specifying regular expressions}, definitions in double quotes are interpreted literally (thus, e.g., a dot @code{.} is interpreted as the character @code{.} not as the regular expression wild card). If you want to enjoy the full power of regular expressions to specify a language alternative, you have to use single quoted strings (@code{'}), instead of double quoted strings, or strings quoted with backticks (@code{`}). For instance, the following is the definition for a preprocessor directive in C/C++: @example preproc = '^[[:blank:]]*#([[:blank:]]*[[:word:]]*)' @end example Note that the definition @code{'class'} is different from @code{"class"}, as explained above. Thus, for instance @code{'class'} matches also the sub-expression @code{class} inside @code{my_class}. Furthermore, you are not allowed to specify, in the same list, double quoted strings and single quoted strings: you need to split such list definitions. Thus, for instance, the following definition is wrong: @example preproc = "#define",'^[[:blank:]]*#([[:blank:]]*[[:word:]]*)' @end example while the following one is correct: @example preproc = "#define" preproc = '^[[:blank:]]*#([[:blank:]]*[[:word:]]*)' @end example @cindex nonsensitive Finally, at the end of a list of definitions, one can specify the keyword @code{nonsensitive}; in that case, the specified strings will be interpreted in a non case sensitive way. For instance, we use this feature in Pascal language definition, @file{pascal.lang} where keywords are parsed in a non sensitive way: @example keyword = "alfa|and|array|begin|case|const|div", "do|downto|else|end|false|file|for|function|get|goto|if|in", "label|mod|new|not|of|or|pack|packed|page|program", "put|procedure|read|readln|record|repeat|reset|rewrite|set", "text|then|to|true|type|unpack|until|var|while|with|writeln|write" nonsensitive @end example @node Line wide definitions, Order of definitions, Simple definitions, Language Definitions @section Line wide definitions @cindex lines It is often useful to define a language element that affects all the remaining characters up to the end of the line. For such definitions, instead of the @code{=} you must use the keyword @code{start}. For instance, the following is the definition of a single line comment in C++: @example comment start "//" @end example This means that when the two characters @code{//} are encountered in the source file, everything from these characters on, up to the end of the line, will be highlighted according to the style @code{comment}. @node Order of definitions, Delimited definitions, Line wide definitions, Language Definitions @section Order of definitions @cindex definition order It is important to observe that the order of language definitions is important since it will be used during regular expression matching (this will be detailed in @ref{How source-highlight works}). You then have to make sure that, if there are definitions that start with same characters, the longest expression is specified first in the file. For instance if you write @example symbol = "/" comment start "//" @end example The first expression will always be matched first, and the second expression will never be matched. The right order is @example comment start "//" symbol = "/" @end example @node Delimited definitions, Variable definitions, Order of definitions, Language Definitions @section Delimited definitions @cindex delimited definitions Many elements are delimited by specific character sequences. For instance, strings and multiline comments. The syntax for such an element definition is @example <name> delim <left delimited> <right delimiter> \ @{escape <escape character>@} \ @{multiline@} @{nested@} @end example The @code{escape} statement specifies the escape character that may precede one of the delimiters inside the element. This is optional. For instance, this is the definition of C-like strings: @example string delim "\"" "\"" escape "\\" @end example Note that @code{\} is a special characters in definitions so it has to be escaped. If the @code{escape} specification was omitted, the C string @code{"write \"hello\" string"} would have been highlight incorrectly (it would have been highlighted as the string @code{"write \"}, the normal character sequence @code{hello\} and the string @code{" string"}). The option @code{multiline} specifies that the element can spawn multiple lines. For instance, PHP strings are defined as follows: @example string delim "\"" "\"" escape "\\" multiline @end example The option @code{nested} instructs to count possible multiple occurrences of delimited characters and to match relative multiple occurrences (using a stack). For instance, if we wanted to highlight C-like multiline comments in a nested way@footnote{As Ed Kelly correctly pointed out, C-style comments are NOT nested; it's a big shame I've been using C++ and Java for years and have always thought they were nested :-)... Thus, in previous versions of source-highlight distributions, C-style comments were (uncorrectly) defined as nested. Thank you Ed, for your feedback!}, we could use the following definition: @example comment delim "/*" "*/" multiline nested @end example If @code{nested} was not used, then the closing @code{*/} of the following nested comment would conclude the comment (and the second @code{*/} would not be highlighted as a comment): @example /* This is a /* nested comment */ */ @end example Note that, in order for a delimited language element to be nested, its starting and ending elements must be different; thus, for instance, the following definition is not correct: @example string delim "\"" "\"" nested # WRONG! @end example As said above, definitions are cumulative, and they are also cumulative even when using different syntactic forms. Thus, for instance, the complete definition for C++-style comments are the following (actually, the definition of C-style comment is more involved, see the file @file{c_comment.lang}): @example comment start "//" comment delim "/*" "*/" multiline @end example @node Variable definitions, Dynamic Backreferences, Delimited definitions, Language Definitions @section Variable definitions @cindex variables It is possible to define variables to be re-used in many parts in a language definition file. A variable is defined by using @code{vardef} <name of the variable> @code{=} <list of definitions> Once defined, a variable can be used by prepending the symbol @code{$} to its name. For instance, @example vardef FUNCTION = '(?:[[:alpha:]]|_)[[:word:]]*(?=[[:blank:]]*\()' function = $FUNCTION @end example The capital letters are used only for readability. It is also possible to concatenate variables and expressions, and reuse variables inside further variable definitions: @example vardef basic_time = '[[:digit:]]@{2@}:[[:digit:]]@{2@}:[[:digit:]]@{2@}' vardef time = '\<' + $basic_time + '\>' @end example @node Dynamic Backreferences, File inclusion, Variable definitions, Language Definitions @section Dynamic Backreferences @cindex dynamic backreference With @emph{dynamic backreferences} you can refer to a string matched by the regular expression of the first element of a @code{delim} specification@footnote{Since version 2.8}. I called these backreferences dynamic in order to distinguish them by the backreferences of regular expression syntax, @ref{Ways of specifying regular expressions}. This is crucial in cases when the right delimiter depends on a subexpression matched by the left delimiter; for instance, Lua comments can be of the shape @code{--[[ comment ]]} or @code{--[=[ comment ]=]}, but not @code{--[=[ comment ]]} neither @code{--[[ comment ]=]} (furthermore, they can be nested)@footnote{I'm grateful to Jurgen Hotzel for rising this issue about Lua comments; this led me to introduce dynamic backreferences.}. Thus, the regular expression of the right element depends on the one of the left element. A dynamic backreference is similar to a variable (@ref{Variable definitions}), but there's no declaration, and have the shape of @example @@@{number@} @end example @noindent where @code{number} is the number of the marked subexpression in the left delimiter (source-highlight will actually check that such a marked subexpression exists in the left delimiter). For instance, this is the definition of Lua comments (see also @file{lua.lang}): @example environment comment delim `--\[(=*)\[` "]" + @@@{1@} + "]" multiline nested begin include "url.lang" ... end @end example @noindent Note how the left delimiter can match an optional @code{=}, as a marked subexpression, and the right delimiter refers to that with @@@{1@}. Source-highlight will take care of escaping possible special characters during dynamic backreference substitutions. For instance, suppose that you must substitute @code{|} for @@@{1@}, because we matched @code{|} with the subexpression @code{[^[:alnum:]]} in a delim element like the following one: @example comment delim `([^[:alnum:]])` @@@{1@} @end example @noindent Since @code{|} is a special character in regular expression syntax source-highlight will actually replace @code{@@@{1@}} with @code{\|}. IMPORTANT: the right delimiter can only refer to subexpressions of its left delimiter; thus, in case of nested delim element definitions (e.g., in states or environment, @ref{State/Environment Definitions}), the left delimiter acts as a binder and hides possible subexpressions defined in outer delim elements. This is crucial to correctly match nested delimited elements with backreferences: source-highlight will correctly recognize this nested (and syntactically correct) Lua comment: @example --[[ first level comment --[=[ second level --[[ third level ]] ]=] ]] @end example @node File inclusion, State/Environment Definitions, Dynamic Backreferences, Language Definitions @section File inclusion @cindex file inclusion It is possible to include other language definition files into another file. This is inclusion actually physically includes the contents of the included file into the current file during parsing, at the exact point of inclusion (just like the @code{#include} in C/C++). This is useful for re-using definitions in many files. For instance, C++ comment definitions are given in a file @file{c_comment.lang}, and this file is included in the Java and C++ definition files. The same happens for number and functions. For instance, the file @file{java.lang} contains the following include instructions: @example include "c_comment.lang" include "number.lang" keywords ... include "function.lang" @end example Note that the order of inclusion is crucial since the order of definition is crucial. If function definition was included before keyword definitions, then the sentence @code{if (exp)} would be highlighted as a function invocation (see @ref{Order of definitions} and @ref{How source-highlight works}). @node State/Environment Definitions, Explicit subexpressions with names, File inclusion, Language Definitions @section State/Environment Definitions @cindex states @cindex environments Sometimes you want some source element to be highlighted only if they are surrounded by other elements. Source-highlight language definitions provides also this feature. @example state|environment <standard definition> begin <other definitions> end @end example This structure is recursive (so other state/environment definitions can be given within a state/environment). The meaning of a state/environment is that the definitions within the @code{begin ... end} are matched only if the definitions that define the state/environment have been matched. When entering a state/environment, however, the definitions given outside the state/environment are not matched. The difference between @code{state} and @code{environment} is that in the latter, normal parts of the source language (i.e., those that do not match any definition) are highlighted according to the style of the definition that defines the environment. As an example, the following defines the multiline nested C comment, and highlights URL and e-mail addresses only when they appear inside a comment (note that this uses file inclusion): @example environment comment delim "/*" "*/" multiline nested begin include "url.lang" end @end example Note that we used @code{environment} because everything else inside a comment has to be formatted according to the comment style. While for programming language definitions states/environments can be avoided (although they allow to highlight some parts only if inside a specific environment, e.g., URLs inside comments, or documentation tags in Javadoc comments), they are pretty important for highlighting files such as logs and ChangeLog files, since elements have to be highlighted when they appear in a specific position. For instance, for ChangeLog (see @file{changelog.lang}), we use a state for highlighting the date, name, e-mail or URL (taken from @file{url.lang}): @example state date start '[[:digit:]]@{2,4@}-?[[:digit:]]@{2@}-?[[:digit:]]@{2@}' begin include "url.lang" name = '([[:word:]]|[[:punct:]])+' end @end example Note that definitions that appear inside a state/environment have the same scope of the expressions that define the environment. While this makes sense for @code{start} and @code{delim} definitions, it may make less sense for simple definitions (i.e., those that simply lists all possible expressions): in fact, in this case, such expressions do not define a scope. For such definitions, the semantics of state/environment is that the state/environment starts after matching one of the alternatives. And where will it end? In this case you must explicitly exit the environment. For instance, you can say that, when inside a state/environment, a specific language definition, when encountered also exits the environment, with the keyword @code{exit} (you can also specify the number of states to exit). You can even exit all the environments with @code{exitall}. For instance, the following definition, highlights a non empty string following a web method: @example vardef non_empty = '[^[:blank:]]+' state webmethod = "OPTIONS|GET|HEAD|POST|PUT|DELETE", "TRACE|CONNECT|PROPFIND|MKCOL|COPY|MOVE|LOCK|UNLOCK" begin string = $non_empty exit end @end example If you ever need such advanced features, you may want to take a look at the @file{log.lang} definition file that defines highlighting for several log files (access logs, Apache logs, etc.). Moreover, there might be cases, and the above one is one of such cases, explicit subexpressions with names will be enough (see @ref{Explicit subexpressions with names}). We conclude this section with an interesting example: comments in M4 files can start with the @code{dnl} keyword (up to the end of line), e.g., @example dnl @@synopsis AC_CTAGS_FLAGS @end example Now if we want to highlight the @code{dnl} as a keyword, and the rest of line as a comment, we cannot simply rely on an environment, since this would highlight all the line with the same style. Moreover, we want to highlight elements starting with @code{@@} differently, so we actually need a state (this would allow us also to highlight urls inside a comment just like in C++ comments in the example above). Thus, we need to simulate an environment with a state, and we do this for M4 as follows (see the file @file{m4.lang}): @example state keyword start "dnl" begin # avoid spaces in front of urls or @@[[:alpha:]]+ be captured as prefixes comment = '[[:blank:]]+' include "url.lang" include "html.lang" type = '@@[[:alpha:]]+' # everything else is a comment comment = '.+' end @end example Once entered the state, every isolated space character is highlighted as a comment; then we have rules for URLs and @@ elements; then everything else (@code{.+}) is highlighted as a comment. One might think that a smarter way would be to have simply the following definition (after all, why bothering highlighting spaces as comments): @example state keyword start "dnl" begin include "url.lang" include "html.lang" type = '@@[[:alpha:]]+' comment = '.+' end @end example Well, with this definition spaces in front of matched URLs or @@ elements would be highlighted as normal, being considered as prefixes. This is due to how source-highlight searches for matching rules; we refer to @ref{How source-highlight works} for further details. @node Explicit subexpressions with names, Redefinitions and Substitutions, State/Environment Definitions, Language Definitions @section Explicit subexpressions with names Often, you need to specify two program elements in the same regular expressions, because they are tightly related, but you also need to highlight them differently. For instance, you might want to highlight the name of a class (or interface) in a class (or interface) definition (e.g., in Java). Thus, you can rely on the preceding @code{class} keyword which will then be followed by an identifier. A definition such as @example keyword = '(\<(?:class|interface))([[:blank:]]+)([$[:alnum:]]+)' @end example @noindent will not produce a good final result, since the name of the class will be highlighted as a keyword, which is not what you might have wanted: for instance, the class name should be highlighted as a @code{type}. Up to version 2.6, the only way to do this was to use state or environments (@ref{State/Environment Definitions}) but this tended to be quite difficult to write. Since version 2.7, you can specify a regular expression with marked subexpressions and bind each of them to a specific language element (the regular expression must be enclosed in @code{`}, see @ref{Ways of specifying regular expressions}): @example (elem1,...,elemn) = `(subexp1)(...)(subexpn)` @end example Now, with this syntax, we can accomplish our previous goal: @example (keyword,normal,type) = `(\<(?:class|interface))([[:blank:]]+)([$[:alnum:]]+)` @end example @noindent This way, the @code{class} (or @code{interface}) will be highlighted as a keyword, the separating blank characters are formatted as @code{normal}, and the name of the class as a @code{type}. Note that the number of element names must be equal to the number of subexpressions in the expression; furthermore, at least in the current version, the expression can contain only marked subexpressions (no character outside is allowed) and no nested subexpressions are allowed. Thus, the following specifications are NOT correct: @example (keyword,symbol) = `(...)(...)(...)` # number of elements doesn't match (keyword,symbol) = `(...(...)...)(...)` # contains nested subexpressions (keyword,symbol) = `...(...)...(...)` # outside characters @end example This mechanism permits expressing regular expressions for some situation in a much more compact and probably more readable way. For instance, for highlighting ChangeLog parts (the optional @code{*} as a symbol, the optional file name and the element specified in parenthesis as a @code{file} element, and the rest as @code{normal}) such as @example * src/Makefile.am (source_highlight_SOURCES): correctly include changelog_scanner.ll * this is a comment without a file name @end example @noindent before version 2.6, we used to use these two language definitions: @example state symbol start '^(?:[[:blank:]]+)\*[[:blank:]]+' begin state file start '[^:]+\:' begin normal start '.' end end state normal start '^(?:[[:blank:]]+)' begin state file start '[^:]+\:' begin normal start '.' end end @end example @noindent which can be hard to read after having written them. Now, we can write them more easily (see @file{changelog.lang}): @example (normal,symbol,normal,file)= `(^[[:blank:]]+)(\*)([[:blank:]]+)((?:[^:]+\:)?)` (normal,file)= `(^[[:blank:]]+)((?:[^:]+\:)?)` @end example Since a language element definition using explicit subexpressions with names consists of more than one element, and thus of more than one formatting style, it cannot be used to start an environment (what would the default element be?); while, as seen above, they can be used to start a state. @node Redefinitions and Substitutions, How source-highlight works, Explicit subexpressions with names, Language Definitions @section Redefinitions and Substitutions These two features are useful when you want to define a language by re-using an existing language definition with some changes. Typically you @code{include} another language definition file and you redefine/substitute some elements. @cindex redef When you use @code{redef} you erase all the previous definitions of that language elements with the new one. The new language element definition will be placed exactly in the point of the new definition. We use this feature, for instance, when we define the @code{sml} language by re-using the @code{caml} one: they differ only for the keywords@footnote{At least, to the best of my knowledge :-)}. In fact, the contents of @file{sml.lang} is summarized as follows: @example include "caml.lang" redef keyword = "abstraction|abstype|and|andalso..." redef type = "int|byte|boolean|char|long|float|double|short|void" @end example Since the new language element definition appears in the exact point of the redefinition, this means that such a regular expression will be matched only if all the previous ones (the ones of the included file) cannot be matched. This may lead to unwanted results in some cases (not in the @code{sml} case though). In other words the following code @example keyword = "foo" keyword = "bar" type = "int" redef keyword = "myfoo" @end example @noindent is equivalent to the following one @example type = "int" keyword = "myfoo" @end example @cindex subst If this is not what you want, you can use @code{subst}, which is similar to @code{redef} apart from that it replaces the previous first definition of that language element in the exact point of that first definition (all other possible definitions are simply erased). That is to say that the following code @example keyword = "foo" keyword = "bar" type = "int" subst keyword = "myfoo" @end example @noindent is equivalent to the following one @example keyword = "myfoo" type = "int" @end example It is up to you to decide which one fits best your needs. We could use this feature to define @code{javascript} in terms of @code{java}, e.g.: @example include "java.lang" subst keyword = "abstract|break|case|catch|class|if..." @end example @noindent Here using @code{redef} would have led to the unwanted behavior that @code{if (exp)} would have been highlighted as a function call, since the function element definition would have come first (and then matched first) than the redefinition of @code{if} as a keyword. Another example is the language definition for C# by reusing the one for C/C++, @ref{Highlighting C/C++ and C#}. @node How source-highlight works, Notes on regular expressions, Redefinitions and Substitutions, Language Definitions @section How source-highlight works As hinted at the beginning of @ref{Language Definitions}, source-highlight uses the definitions in the language definition file to internally create, on-the-fly, regular expressions that are used to highlight the tokens of an input file. Here we provide some internal details that are crucial to understand how to write language definition files correctly@footnote{The strategy used by source-highlight for matching regular expressions changed since version 2.11 (and in version 2.10 the strategy used was not completely conceptually correct and it had a lot of overhead).}. First of all, for each element definition an highlighting rule is created by source-highlight (even if they correspond to the same language element); thus, each language definition file will correspond to a list of highlighting rules. For each line of the input file, source-highlight will try to match all these rules against the whole line (more formally, against the part of the line that has not been highlighted yet). It will not stop as soon as an highlighting rule matched, since there might be another rule that matches ``better''. Now, everything basically reduces to the semantics of that @emph{better match}. @cindex matching strategy The strategy used by source-highlight is to select the first matching rule @itemize @item with empty prefix (or prefix containing only space characters, i.e., spaces or tabs) or @item with the smallest prefix, @end itemize @cindex prefix where the @emph{prefix} of a matched rule is the part of the examined string that did not match@footnote{according to the terminology of regular expressions.}. Thus, for instance, if we try to match the simple regular expression @code{=} against the string @example i = 10; @end example @cindex suffix then the prefix is @code{i }, including the space. Following the terminology of regular expression, the remaining part that did not match, i.e., @code{ 10;}, is the @emph{suffix}. When source-highlight finds a matching rule, according to the above strategy, it formats the matched part (and the prefix as @code{normal}), and then it starts again searching for a matching rule on the suffix, until it processed the whole line. Let us explain this strategy a little bit further with an example. Consider the following language definition file: @include strategy_example.lang.texinfo @noindent and the following line to be highlighted: @example int i = null @end example Then source-highlight performs these steps: @enumerate @item The first matching rule is the one for @code{type}; since it has an empty prefix, there's no need to look any further: it highlights @code{int} as @code{type}; the remaining part to be processed is now @code{ i = null}; @item the first matching rule is the one for @code{keyword}, with the prefix @code{ i = }; since the prefix is not empty (nor it contain only spaces), we inspect other rules; @item the next matching rule is the one for @code{symbol}, with prefix @code{ i }, which is smaller than the one for @code{keyword}, and since there are no other matching rules, the one for @code{symbol} is better, and we highlight @code{=} as symbol; the remaining part to be processed is now @code{ null}; @item the first matching rule is the one for @code{keyword}, and, since it has a prefix with only spaces, we look no further, and we highlight @code{null} as @code{keyword}. @end enumerate We conclude this section by showing the following language definition, which summarizes what we said about the highlighting strategy: @include test_string_stop.lang.texinfo @node Notes on regular expressions, The program check-regexp, How source-highlight works, Language Definitions @section Notes on regular expressions @cindex regular expressions Although we refer to Boost documentation for such syntax@footnote{@uref{http://www.boost.org/libs/regex/doc/syntax.html}}, we want to provide here some explanations of some forms of regular expressions that might be unknown but that are pretty useful in language definitions. @cindex non-marking parenthesis Typically, when you need to group sub-expressions with parenthesis, but you don't want the parenthesis to spit out another marked sub-expression, you can use a @emph{non-marking parenthesis} @code{(?:expression)}. This is not necessary in the language definition syntax: even though you use standard parenthesis, source-highlight will transform it into a non-marking parenthesis. @cindex marked subexpressions Source-highlight translates possible @emph{marked subexpressions}, i.e., those enclosed in @code{(} and @code{)}, into non-marked subexpressions (i.e., those explained above). Since version 2.7, if you specify the expression inside @code{`} the marked subexpressions are left as such (see also @ref{Ways of specifying regular expressions}). This is useful for @emph{backreferences} and @emph{conditionals}. @cindex backreference An escape character followed by a digit n, where n is in the range 1-9, is a @emph{backreference} matches the same string that was matched by sub-expression n. For example the expression @code{^(a*).*\1$} will match the string: @code{aaabbaaa} but not the string @code{aaabba}. Backreferences are useful to write compact language elements, such as in the case of Perl's substitution modifiers; thus @example regexp = `s([^[:alnum:][:blank:]]).*\1.*\1[ixsmogce]*` @end example will match all these forms @example s/foo/bar/g s|foo|bar|g s#foo#bar#g s@@foo@@bar@@g @end example @cindex lookahead asserts A useful regular expression form is the @emph{Forward Lookahead Asserts} that come in two forms, one for positive forward lookahead asserts, and one for negative lookahead asserts: @table @code @item (?=abc) matches zero characters only if they are followed by the expression ``abc''. @item (?!abc) matches zero characters only if they are not followed by the expression ``abc''. @end table For instance, in the definition of a function (@file{function.lang}) we use the following regular expression: @example ([[:alpha:]]|_)[[:word:]]*(?=[[:blank:]]*\() @end example @noindent Thus after the name of a function we test, with the regular expression @code{(?=\()} whether an open parenthesis @code{(} can be matched. If it can be matched, however, we leave that part in the input, so that the parenthesis will not be formatted the same way of a function name (see also @ref{How source-highlight works} to understand better this language element definition). Please, be careful when using such regular expression forms: since part of the input is not actually removed you may end up always scanning the same input part (thus looping) if you do not write the regular expressions well. For instance, consider this language definition @example state foo = '(?=foo)' begin foo = '(?=foo)' end @end example @noindent and the following input file: @example hello foo bar @end example @noindent As soon as we match the word @code{foo} we leave it in the input and we enter a state where we try to match the word @code{foo} still leaving it in the input. As you might have guess this will make source-highlight loop forever. Probably one might have wanted to write this language definition: @example state foo = '(?=foo)' begin foo = 'foo' end @end example @noindent but a cut-and-paste error had its way ;-) @cindex lookbehind asserts You can also use @emph{Lookbehind Asserts}: @table @code @item (?<=pattern) consumes zero characters, only if pattern could be matched against the characters preceding the current position (pattern must be of fixed length). @item (?<!pattern) consumes zero characters, only if pattern could not be matched against the characters preceding the current position (pattern must be of fixed length). @end table @cindex conditional expressions Another advanced regular expression mechanism is the one of @emph{conditional expressions} @table @code @item (?(condition)yes-pattern|no-pattern) attempts to match yes-pattern if the condition is true, otherwise attempts to match no-pattern. @item (?(condition)yes-pattern) attempts to match yes-pattern if the condition is true, otherwise fails. @end table Condition may be either a forward lookahead assert, or the index@footnote{the index only, without the escape character.} of a marked sub-expression (the condition becomes true if the sub-expression has been matched). For instance, the following expression@footnote{This expression was provided by John Maddock, the author of the Boost regex library, as a solution of a problem I posted on the boost list, @uref{http://thread.gmane.org/gmane.comp.lib.boost.devel/158237/focus=158276}}, that we wrote on more lines to try to make it more readable @example (?: (\() |(\[) |(\@{) ) [[:alpha:]]* (?: (?(1) \) |(?:(?(2) \] |(?:\@} ))))) @end example will match @code{(foo)}, @code{[foo]} and @code{@{foo@}} but not @code{(foo]}, @code{@{foo]} or @code{@{foo)}. @node The program check-regexp, Listing Language Elements, Notes on regular expressions, Language Definitions @section The program @command{check-regexp} @cindex @command{check-regexp} Since version 2.7, the source-highlight package comes with a small additional program, @command{check-regexp}, that permits testing regular expressions on the command line. You simply pass as the first command line argument the regular expression and then the strings you want to try to match (actually, the program searches the string for the given regular expression, so it is not required to match the whole string). It is crucial, in order to avoid shell substitutions, to enclose both the expression and the strings in single quotes. The program then prints some information about the (possibly successful matching). The @code{what[0]} part represents the whole match, and @code{what[i]} part represents the i-th marked subexpression that matched. The program also prints possible prefix and suffix. Here's an example of output of the program: @example check-regexp '(a+)(.*)\1' 'aabcdaa' 'babbbacc' searching : aabcdaa for the regexp : (a+)(.*)\1 what[0]: aabcdaa what[1]: aa length: 2 what[2]: bcd length: 3 total number of matches: 1 searching : babbbacc for the regexp : (a+)(.*)\1 prefix: b what[0]: abbba what[1]: a length: 1 what[2]: bbb length: 3 suffix: cc total number of matches: 1 @end example And here's the example of matching parenthesis we saw in @ref{Notes on regular expressions}: @smallexample check-regexp \ '(?:(\()|(\[)|(\@{))[[:alnum:]]*(?:(?(1)\)|(?:(?(2)\]|(?:\@})))))' \ '@{ciao@}' '(foo]' '[hithere]' searching : @{ciao@} for the regexp : (?:(\()|(\[)|(\@{))[[:alnum:]]*(?:(?(1)\)|(?:(?(2)\]|(?:\@}))))) what[0]: @{ciao@} what[3]: @{ length: 1 total number of matches: 1 searching : (foo] for the regexp : (?:(\()|(\[)|(\@{))[[:alnum:]]*(?:(?(1)\)|(?:(?(2)\]|(?:\@}))))) total number of matches: 0 searching : [hithere] for the regexp : (?:(\()|(\[)|(\@{))[[:alnum:]]*(?:(?(1)\)|(?:(?(2)\]|(?:\@}))))) what[0]: [hithere] what[2]: [ length: 1 total number of matches: 1 @end smallexample @node Listing Language Elements, Concluding Remarks, The program check-regexp, Language Definitions @section Listing Language Elements In order for language definitions to be really useful they must be used in proper combination with formatting styles (see @ref{Output format style}). However, these different files might not be developed by the same person, or simply some one may want to customize one of these. In order to define good output formatting style files you should be aware of each language element defined by a language definition file. Instead of having to look inside the language definition file itself (and recursively in each included file) you can use the command line @cindex @code{--show-lang-elements} option @code{--show-lang-elements}@footnote{Since version 2.4.}, that simply prints to the standard output all the language elements that can be highlighted with a specific language definition file. For instance, for @code{cpp.lang} you get: @example @include cpp.langelems.texinfo @end example while for @code{log.lang} you get: @example @include log.langelems.texinfo @end example @node Concluding Remarks, Debugging, Listing Language Elements, Language Definitions @section Concluding Remarks By mixing all these features you can unleash your imagination and define highlighting for complex source languages such as Flex and Bison by writing few lines of code and re-use existing ones. For instance, Flex and Bison have their own syntax and lets you write C/C++ code in specific parts of the source language, e.g., the code between the outmost brackets, in the following example, is C++ code, and should be highlighted following C++ language definitions (apart from variables that are prefixed with @code{$}): @example globaltags : options @{ if (...) @{ setTags( $1 ); @} @} @end example This is easy to do (taken from @file{flex.lang}): @example state cbracket delim "@{" "@}" multiline nested begin variable = '\$.' include "cpp.lang" end @end example Note that, since we used @code{nested} we can be sure that the C++ language definitions are not considered anymore when we matched the last closing @code{@}}. @node Debugging, Tutorials on Language Definitions, Concluding Remarks, Language Definitions @section Debugging @cindex debug When writing a language definition file, it is quite useful to be able to debug it (by using complex regular expressions one may experience unwanted behaviors). Since version 2.1 the command line option @code{--debug-lang} is available. When using this option, some additional information are printed to the standard output. Since version 2.5 this option also accepts the a sub specification (see @ref{Invoking source-highlight}). When using @code{dump} (the default) all the additional information explained below will be dumped without interaction with the user. When using @code{interactive}, for each formatted string the program will stop waiting for a command from the user. In this very primordial version of interactive debug, the user will only have to press @code{ENTER} to make the program continue until the next formatted string. This way, the programmer will have the chance to step the highlighting of each part of the input file. Moreover, when debugging is enabled, no buffering will be performed by the program, thus each formatted element will be immediately available in the output. For instance, you can use the command @command{tail -f} to see the modifications on the output file on-the-fly. When using this command line option the additional information produced has the following format: @example <.lang filename>:<line number> expression: <matched subexpression> formatting: <source file string to be formatted> entering: <next state's id> exiting state, level: <number of states> @end example The lines starting with @code{entering}, @code{exiting} and @code{exitingall} are related to entering a new state/environment and exiting one and all states/environments (@code{current state}, if shown, comes after @code{entering} and prints the same state's regular expression but after the substitution of dynamic backreferences, @ref{Dynamic Backreferences}). The first line shows a link to the @file{.lang} definition file and the line number, i.e., and the sub-expression that matched and the line starting with @code{formatting} shows the source file string that matched with that expression. If a line starting with @code{formatting} is not preceded by a line with the link to the sub-expression, it means that no particular regular expression has matched, and thus the style @code{normal} will be used to format that string. Consider the following (simplified) Java source file: @include debug.java.texinfo Now you can debug the @file{java.lang} file by using the @code{--debug-lang} command line option. And the output is as follows: @example c_comment.lang:24 expression: "/\*" formatting "/*" as comment entering state: 23 formatting " This is to demonstrate --debug-lang" as default formatting " " as default url.lang:3 expression: "(?:(?:<?)[[:word:]]+://[[:word:]\./\-_]+(?:>?))" formatting "http://www.lorenzobettini.it" as url c_comment.lang:24 expression: "\*/" formatting "*/" as comment exiting state, level: 1 java.lang:1 expression: "\<(?:import|package)\>" formatting "package" as preproc formatting " hello" as default symbols.lang:1 expression: "(?:~|!|%|\^|\*|\(|\)|-|\+|=|\[|\]|\\|:|;|,|\.|/|\?|&|<|>|\|)" formatting ";" as symbol ... omissis ... c_comment.lang:13 expression: "//" formatting "//" as comment entering state: 12 formatting " just some greetings ;-) /*" as default c_comment.lang:13 expression: "\z" formatting "" as comment exiting state, level: 1 ... omissis ... @end example This should provide enough information to understand how the regular expressions are used and how the states/environments are entered and exited. Please note that the sub-expressions that are shown may differ from the original ones specified in the @file{.lang} file. This is due to the preprocessing that is performed by Source-highlight. Moreover, some sub-expressions are not defined at all in the @file{.lang} file: for instance, this is the case for line wide definitions, i.e., those that are defined with the keyword @code{start}, @ref{Line wide definitions}. The last lines above, showing @code{expression: "\z"}, means that we matched the end of a line. Another useful feature in debugging is the option @code{--show-regex} that shows, on the standard output, the regular expression automaton that source-highlight creates. For instance, consider this language definition (@file{comment-show.lang}): @include comment-show.lang.texinfo @noindent If you now execute the following command: @example source-highlight --show-regex=comment-show.lang @end example @noindent you will get, on the standard output, the following output@footnote{Up to version 2.9 the output of @code{--show-regex} was a little bit more complex to read; hopefully this output is better.}: @smallexample @include comment-show.show.texinfo @end smallexample @noindent This shows the states and highlight rules of the regular expression automaton that source-highlight creates and will use to format an input source. Each state is associated a unique number in order to identify it; moreover, the default element of the state is shown (i.e., if none of the state's rule match, then that part is highlighted with the default element style). For instance, in the initial state the default style is normal. Then for each state it shows the rules for that state. For each rule you can see the corresponding element of the rule, the regular expression for the rule and some other information, that we explain in the following. We can see that if we match a @code{/**} (it is shown as a string with escaped special characters, @code{/\*\*}) we enter a new state, in this case the state 2 (@code{next: 2}). This corresponds to the delimited element defining a new environment (@ref{State/Environment Definitions}). The fact that it is actually an environment and not a state@footnote{Please note that this concept of state is different from the concept of ``state'' of an automaton.} can be seen by the fact that the default element is the same of the environment itself. If we match a @code{*/}, i.e., the end of the delimited element, we exit one level (@code{exit level: 1}) meaning that we go back to state 1. Then we have the state for @code{cbracket}, which is not an environment, in fact its default state is normal. The second rule of this state, @code{\\.} represents the @code{escape} string of the state definition. Since the delimited element is defined as nested, we have a third rule @code{@{} which has the @code{nested} information; thus, if we match it, we simply enter a new instance of state 3 itself. The @code{string} and @code{string2} show the difference implied by the @code{multiline} option: since source-highlight handles a line of input separately, the first delimited definition can be handled with a single regular expression while the multiline version cannot. Note that the states/environments are indented so that it's easier to understand the outer and the inner states. Let us now consider a variation of the previous example: @include comment-show2.lang.texinfo and let us see the output of @code{--show-regex} @smallexample @include comment-show2.show.texinfo @end smallexample Since in the rule @code{regexp} we used the @code{`} regular expression (see @ref{Ways of specifying regular expressions}), then, the marked subexpressions are not translated in order to make backreferences work correctly. The last rule uses explicit subexpressions with names (see @ref{Explicit subexpressions with names}); although that expression is made up of different elements, the expression is matched as a whole. @node Tutorials on Language Definitions, , Debugging, Language Definitions @section Tutorials on Language Definitions Now we provide some examples of language definitions. In the previous sections we have already provided some code snippets, while here we provide complete examples of language definitions that are included in the source-highlight distribution itself. In particular we will first show the language definition for the language definition syntax itself (file @file{langdef.lang}). This will be used to highlight the examples of language definitions that we will show in this section (the highlighting will not be visible if you are viewing this manual with the @code{info} command). Of course, this example is highlighted itself. @include langdef.lang.texinfo The style that is used to highlight these examples in Texinfo is @file{texinfo.style} that is shown in @ref{Output format style}. The language definition for the style syntax (file @file{style.lang}) is even simpler: @include style.lang.texinfo Note that this definition is pretty simple since the language definition syntax is simple. In the next examples we will see how to use more complex features to highlight more complex language syntaxes. @menu * Highlighting C/C++ and C#:: * Highlighting Diff files:: * Pseudo semantic analysis:: @end menu @node Highlighting C/C++ and C#, Highlighting Diff files, Tutorials on Language Definitions, Tutorials on Language Definitions @subsection Highlighting C/C++ and C# This is the language definition for C, included in the file @file{c.lang}: @include c.lang.texinfo @noindent Note that this makes use of lots of @code{include}s since these parts are reused in other language definitions (e.g., Java has lots of parts that are in common with C/C++ so we wrote these parts in separate files). In particular the comments definitions: @include c_comment.lang.texinfo @noindent Here we have the definitions for line-wide comments (@code{//}) and for multi line comments where we highlight also URL addresses and e-mail addresses (defined in the file @file{url.lang} not shown here). Moreover, for comments that are used in automatic documentation generation tools (such as Doxygen or Javadoc), i.e., those that start with @code{/**} or @code{///}) we also highlight the complete HTML syntax (defined in the file @file{html.lang} not shown here). Going back to @file{c.lang} we see that we use subexpressions with names (see @ref{Explicit subexpressions with names}) for highlighting the struct name (when preceded by @code{struct}, highlighted as a keyword). For preprocessor directives @code{#include} we use a state definition since in this case the file included with the @code{<file>} syntax must be formatted as strings (and only in this context the @code{<>} must be considered as strings, anywhere else they are operators). Since a state erases definitions defined outside the state we must include @file{c_comment.lang} again in order to highlight comments also in this context@footnote{As a future extension we might think of providing a way, in the language definition syntax, to define a state/environment that extends the outer contexts instead of overriding them.}. Then we have a definition of @code{preproc} that catches all the other preprocessor directives. The included file @file{number.lang} defines the regular expression that catches number constants (not shown here), then we include the file @file{c_string.lang} that define strings (again shared by Java): @include c_string.lang.texinfo @noindent inside a string we want to highlight in a different way the special characters (such as, e.g., @code{\n}, @code{\t}, etc.) and in general escaped characters, matched by the regular expression `@code{\\.}'. The included file @file{symbols.lang} defines all the symbols (shared also by other languages): @include symbols.lang.texinfo @noindent This has nothing interesting but the fact that it shows that the character @code{\} and @code{|} have to be escaped. The included file @file{function.lang} defines the regular expression to match a function definition or invocation: @include function.lang.texinfo @noindent that shows an example of forward lookahead assert for the opening parenthesis (see @ref{Notes on regular expressions}). As noted in @ref{File inclusion}, it is crucial that this file is included after the keyword definition. Finally, @file{c.lang} includes the file @file{clike_vardeclaration.lang}: @include clike_vardeclaration.lang.texinfo This definition, using subexpressions with names (see @ref{Explicit subexpressions with names}), tries@footnote{This was not tested extensively and might not catch all the correct situations.} to match user types (e.g., struct names) in function parameter and variable declarations. It basically tries to match a type identifier, then a possible template specification@footnote{OK, there are no templates in C, and they are only in C++, but we think it should no harm when highlighting C files.} and then we have a complete lookahead assert (@ref{Notes on regular expressions}) that tries to match the variable identifier, possibly with @code{&} and @code{*} reference and pointer specification, followed by an assignment @code{=} or a @code{;}, more generally a @code{[:punct:]} or @code{[]} (for array specifications). This should catch the user types in the correct contexts, as in the following (where we intentionally highlighted @code{usertype} in italics): @include test_vardecl.cc.texinfo Note that since for the third group we use a lookahead assert, what is matched is not actually formatted but it is put back in the input stream so that it can be formatted using other rules (e.g., @code{symbol} for @code{*} and @code{=}). Since, at least syntactically, C++ is an extension of C, the language definition for C++, included in the file @file{cpp.lang}, relies on @file{c.lang}@footnote{Before version 2.9, there was only @file{cpp.lang} which was used both for C and C++; however, this way, if you had a C program where you were using a C++ keyword as a variable name---which of course is correct in C---that variable was actually highlighted as a keyword and this was not correct.}: @include cpp.lang.texinfo In particular, it extends the set of keywords. Moreover, note that we use subexpressions with names (see @ref{Explicit subexpressions with names}) for highlighting the class (or struct) name (when preceded by @code{class}, @code{struct} or @code{typename}, highlighted as a keyword). A similar rule was also present in @file{c.lang}, but it concerned only @code{struct}. Now that we wrote the language definition for C/C++, writing the one for C# is straightforward, since we only need to add the keyword @code{using} as a preprocessor element, and redefine (or better, ``substitute'', @ref{Redefinitions and Substitutions}) the keywords and types: @include csharp.lang.texinfo @node Highlighting Diff files, Pseudo semantic analysis, Highlighting C/C++ and C#, Tutorials on Language Definitions @subsection Highlighting Diff files Now we want to highlight files that are generated by @code{diff} (typically used to create patches). This program can generate outputs in three different formats (at least at best of my knowledge). With the option @code{-u|--unified} the differences among files are shown in the same context, for instance (the examples of the diff files shown here are manually modified so that they can fit in the page width): @include example-u.diff.texinfo With the option @code{-c--context} the differences are shown into two different parts: @include example-c.diff.texinfo Without options it generates only the essential difference information without any addition context lines: @include example-n.diff.texinfo Summarizing, we would like to be able to handle all these three different syntaxes; note that the first format and the second format have something conflicting: the first one uses the @code{---} to indicate the new version of a file while the second format uses it to indicate the old version of a file. Since we want to highlight differently the old parts and the new parts (this is not visible in the Texinfo highlighting due to the lack of enhanced formatting features, but it is visible for instance in HTML output where we use two different colors), this behavior adds some difficulties. Of course, we could define three different language definitions, one for each diff output format. However, we prefer to handle them all in the same file! This is the language definition for diff files: @include diff.lang.texinfo Since we can safely assume that when we process a diff file it contains only information created with the same diff command line switch, we define three different states that correspond to the three diff output formats. Note that these states are entered with a simple definition; as noted in @ref{State/Environment Definitions}, this means that no automatic exit means are provided, and since no explicit exit condition is specified, this means that once one of this state is entered it will never be exited. This is consistent with our goal. Of course, the expression that makes us enter a state must be defined correctly, and in particular we first search for an initial @code{---} sequence since this is used as the first difference specification by the @code{-u|--unified} option, so this is a distinguishing feature to be used to infer which diff format file we are processing. Another interesting thing, is that we use the forward lookahead assert for the opening parenthesis (see @ref{Notes on regular expressions}), since we only want to see which file format we are processing. Once we entered the right state we can define the regular expressions for the elements of the specific diff file format. For the files created with the option @code{-c|--context} we define two inner environments, one for the new file part and one for the old file part (these are delimited by a @code{---} or @code{***} and line number information). Note that these are environments, so anything that is not matched by any expression is formatted according to the style of the element that defines the environment. Thus, we provide an expression for text that must be formatted as normal. For diff files this corresponds to a line that start with a space or with @code{diff} (take a look at the examples above). In particular the latter case can take place only during the new file part. In both environments we must define the exit conditions. In both cases these correspond to the beginning of the complementary part; also in this case we use forward lookahead assertions, since we use it only to exit the environment. The outer definitions for @code{oldfile} and @code{newfile} are used to match the lines with source file information information. The third state, corresponding to the normal diff output format, should be straightforward by now. @node Pseudo semantic analysis, , Highlighting Diff files, Tutorials on Language Definitions @subsection Pseudo semantic analysis Source-highlight, by means of regular expressions can only perform lexical analysis of the input source. In particular, it is based on the assumption that the input source is syntactically correct with respect to the input language. However, by using the language definition syntax and by writing the right regular expression it is possible to simulate some sort of semantic analysis of the input source. For instance, consider the following C (or C++) source file: @include test_extreme_comment.cpp.texinfo @noindent It is easy to verify that the code between @code{#if 0} and @code{#else} will be never executed (indeed it will not even be compiled). Thus, we might want to format it as a comment. We then write another language definition file, based on the file @file{cpp.lang}: @include extreme_comment.lang.texinfo @noindent We intentionally included an error in this first version: we used the @code{start} element to start the environment, but such element has the scope of a single line, thus, it does not have the desired behavior: @include test_extreme_comment_wrong.texinfo A better solution is the following one: @include extreme_comment2.lang.texinfo @noindent here we enter the @code{comment} environment by not using a delimited element, but simply the regular expression to match @code{#ifdef 0}. Then we exit the environment either when we match an @code{#else} or a @code{#endif}. This seems to work: @include test_extreme_comment_1.texinfo However, it does not work if we consider nested @code{#if...#else}; for instance consider the following code, formatted with the previous language definition: @include test_extreme_comment_wrong2.texinfo @noindent The problem is that the previous language definition does not consider nested @code{#if} and thus, the first time it matches a @code{#else} or an @code{#endif} it exits the @code{comment} environment. We must then take into account possible nested occurrences. This can be done by using a delimited element with the @code{nested} option (@ref{Delimited definitions}): @include extreme_comment3.lang.texinfo @noindent This time the right block of code is correctly formatted as a comment: @include test_extreme_comment_2.texinfo Note that it is crucial to exit the environment even when we match an @code{#else} (not only an @code{#endif}, since, this way, we can match again another @code{#ifdef 0}; consider, for instance, the following code: @include test_extreme_comment_3.texinfo @node Output Language Definitions, Generating References, Language Definitions, Top @chapter Output Language Definitions @cindex output language definition Since version 2.1 source-highlight uses a specific syntax to specify output formats (e.g., how to format in HTML, @LaTeX{}, etc.). Before version 2.1, in order to add a new output format, many C++ classes had to be written. This had the drawback that a new output format could not be added ``dynamically'': you had to recompile the whole source-highlight program. Instead, now, an output format is specified in a file, loaded dynamically, through a (hopefully) simple syntax. Then, these definitions are used internally to create, on-the-fly, text formatters. Here, we see such syntax in details, by relying on many examples. This allows a user to easily modify an existing output format definition and create a new one. These files have, typically, extension @file{.outlang}. Each definition basically associates a text style (such as, e.g., bold, italics, colors, etc.) to the representation of that style into the output format (such as, e.g., @code{<b>$text</b>} in HTML). The representation is given in @code{"} and you can use the classic escape character @code{\} to use the @code{"} inside the definition. If you want to specify the ASCII code for a character you can do so by specifying the numeric code in hexadecimal notation preceded by @code{\x}, for an example, see @ref{Style template}. If no definition is given for a specific style, e.g., bold, then when that style is requested during formatting, the text will be formatted as it is, i.e., the style without the definition is simply ignored. Comments can be given by using @code{#}; the rest of the line is considered as a comment. Files can be included in the same way as for language definitions, @ref{File inclusion}. In any case, if a definition for a style is given more than once, the last definition replaces all the others. @menu * File extension:: Specify the output file extension * Text styles:: Bold, Italics, Underline, etc. * Colors:: Style and definitions for colors * Anchors and References:: * One style:: * Style template:: * Line prefix:: * String translation:: * Document template:: * Generating HTML output:: @end menu @node File extension, Text styles, Output Language Definitions, Output Language Definitions @section File extension With the line: @example extension "<file extension>" @end example @noindent you define the default file extension (without the @code{.}) used to generate files formatted according to this output format. This is used when no output file name is specified; if the file extension is not included in the @code{.outlang} is not defined, and no output file name is specified, an error will occur. For instance, this is used in @file{html_common.outlang}: @example extension "html" @end example @node Text styles, Colors, File extension, Output Language Definitions @section Text styles @cindex bold @cindex italics @cindex underline @cindex fixed @cindex notfixed These are the text styles that one can define: @example bold italics underline notfixed fixed @end example @noindent These, of course, correspond to the ones used to specify the output format style, @ref{Output format style}. These definitions, for instance, are from the HTML format definition: @example bold "<b>$text</b>" italics "<i>$text</i>" underline "<u>$text</u>" @end example @cindex $text @noindent Inside a definition you use the special variable @code{$text} to specify where the actual text to be formatted has to be inserted. For instance, the definition of @code{bold} above says that if you need to format the keyword @code{class} in bold in HTML, the following text will be generated: @code{<b>class</b>}. This variable is used also when mixing more than one styles recursively, in particular if you want to format in bold and italics (i.e, first bold and then italics, or, in other words, the sequence @code{i, b} is used in the the output format style file, see @ref{Output format style}), then first the text @code{class} is substituted for @code{$text} into @code{<b>$text</b>} and then the text @code{<b>class</b>} will be substituted for @code{$text} into @code{<i>$text</i>}, thus obtaining @code{<i><b>class</b></i>}. @node Colors, Anchors and References, Text styles, Output Language Definitions @section Colors @cindex colors @cindex $style The definition for using colors during formatting requires the definition for the @code{color} style @example color "..." @end example @cindex background color @noindent and for the @code{bgcolor} style@footnote{Since version 2.6.}: @example bgcolor "..." @end example This definition concerns only the background color for a specific highlighted element, i.e., the color specified in the style file with the prefix @code{bg:} (see @ref{Output format style}) or the property @code{background-color} specified in a CSS file passed to @code{--style-css-file} (see @ref{Output format style using CSS}). Thus it should not be confused with the background color of the entire output (i.e., the one specified using @code{bgcolor} in a style file or the property @code{background-color} of the @code{body} selector in a CSS). The background color for the entire document is explained in @ref{Document template}. Note that the background color might not be available for all output formats. For instance, for HTML we only have: @example color "<font color=\"$style\">$text</font>" @end example @noindent while for XHTML we have: @example color "<span style=\"color: $style\">$text</span>" bgcolor "<span style=\"background-color: $style\">$text</span>" @end example Apart from the variable @code{$text} that we already saw, we have also the variable @code{$style}, that will be replaced with the actual color. Source-highlight recognizes a number of color constants, see @ref{Output format style}. You then must associate a color constant to the color definition in the output format, through the @code{colormap} definition: @example colormap "color constant" "color representation" "color constant" "color representation" ... default "default color representation" end @end example The @code{default} row (note the absence of @code{"}) defines the color to be used in case a color constant is used during formatting, but it is not defined in the output format. For instance, for HTML we have: @example colormap "green" "#33CC00" "red" "#FF0000" "darkred" "#990000" "blue" "#0000FF" "brown" "#9A1900" "pink" "#CC33CC" "yellow" "#FFCC00" "cyan" "#66FFFF" "purple" "#993399" "orange" "#FF6600" "brightorange" "#FF9900" "brightgreen" "#33FF33" "darkgreen" "#009900" "black" "#000000" "teal" "#008080" "gray" "#808080" "darkblue" "#000080" default "#000000" end @end example If your output format does not handle colors you can simply avoid the definitions of @code{color} and @code{colormap} and Source-highlight will simply ignore colors. The color is applied after applying the other styles, e.g., bold, italics, etc. Thus, by continuing the example of the previous section, suppose you defined the following output style for keywords: @example keyword blue i, b; @end example @noindent then the @code{class} text will be replaced to @code{$text} variable and the value @code{#0000FF} to @code{$style} inside the color definition @code{<font color="$style">$text</font>} obtaining @code{<font color="#0000FF">class</font>} which will then be replaced to @code{$text} in @code{<b>$text</b>} and so on for italics, finally obtaining @code{<i><b><font color="#0000FF">class</font></b></i>}. @node Anchors and References, One style, Colors, Output Language Definitions @section Anchors and References @cindex $linenum When using the command line option @code{--line-number-ref} (@ref{Invoking source-highlight}) an anchor is generated in the output file for each line numbering. The style of the anchor is defined by the definition @code{anchor}. If this is not defined, the option @code{--line-number-ref} has no effect. The @code{$linenum} variable will be replaced with the line number, and the @code{$text} variable with the actual text. For instance, for HTML we have @example anchor "<a name=\"$linenum\">$text</a>" @end example @cindex $infile @cindex $infilename @cindex $outfile Since version 2.2 source-highlight can also generate references to several elements (e.g., variables, class definitions, etc.), @ref{Generating References}. Also in this case the definition @code{anchor} is used; furthermore, the definition of @code{reference} is required. In the definition of @code{anchor} and @code{reference}, apart from the variable @code{$linenum}, we also have the variables @code{$infile} (the name of the original input file) and @code{$infilename} (the name of the original input file without the path) and in the definition of @code{reference} we also have the variable @code{$outfile} (the name of the file where the anchor is). One can decide how to define an anchor and a reference by using these two variables. For instance, for HTML we have @example reference "<a href=\"$outfile#$linenum\">$text</a>" @end example @noindent Note, that in this case we use the @code{$outfile} since we actually generate a link to another (or possibly the same) output file. On the contrary, for @LaTeX{}, since we do not generate a ``clickable'' reference, we refer to the original input file (we use both @code{$infilename} and @code{$linenum} in both definitions of @code{anchor} and @code{reference}): @example anchor "\label@{$infilename:$linenum@}$text" reference "@{\hfill $text $\rightarrow$ $infile:$linenum, \ page~\pageref@{$infilename:$linenum@}@}" @end example @noindent In particular, we use @code{$infilename} for generating the @code{\label} and not @code{$infile} because the path symbol would ``disturb'' @LaTeX{} (while we use the complete file path in the textual information of the reference). This will generate a right aligned reference. Note that it is assumed that when generating references in @LaTeX{} one uses @code{--gen-references=postline} or @code{--gen-references=postdoc} and not @code{--gen-references=inline} (@ref{Generating References}), since it makes no sense to generate an inline reference (or at least I would not know how to generate a nice looking one :-). Furthermore, for Texinfo: @example anchor "@@anchor@{$infilename:$linenum@}$text" reference "@@flushright @@xref@{$infilename:$linenum,$text,$text $infile:$linenum@}. @@end flushright" @end example @noindent Note that using both @code{$infilename} (and not @code{$infile} for the same reasons) and @code{$linenum} also in the definition of @code{anchor} somehow ensures that there are no duplicate anchors; this is done for @LaTeX{} and Texinfo but not for HTML because it is assumed that the generated @file{.tex} and @file{.texinfo} file is included directly in a master file, as it is done in this manual (while, for instance, it is assumed that a separate HTML file is generated for each source and kept separate). If this is not your case you can change the definitions of @code{anchor} and @code{reference} as you see fit. Some examples of outputs with references in Texinfo are shown in @ref{Examples}. @cindex inline_reference @cindex postline_reference @cindex postdoc_reference Indeed, one can use three more definitions for @code{reference} that corresponds to the three arguments that can be passed to @code{--gen-references} command line option (@ref{Generating References}): @code{inline_reference}, @code{postline_reference} and @code{postdoc_reference}. If one of this not defined, then the same definition of @code{reference} is used. Having the possibility of specifying different definitions is useful for instance in the case of HTML: the same style for an inline reference is pretty ugly when used also for a postline or postdoc reference: @smallexample postline_reference "<a href=\"$outfile#$linenum\">$text -> $infile:$linenum</a>" postdoc_reference "<a href=\"$outfile#$linenum\">$text -> $infile:$linenum</a>" reference "<a href=\"$outfile#$linenum\">$text</a>" @end smallexample @node One style, Style template, Anchors and References, Output Language Definitions @section One style @cindex one style If the output format you are defining does not have a specific style for bold, italics, ... and for colors you can simply use the definition @code{onestyle}, where you can use both @code{$style} and @code{$text}. This will be used for any style (indeed any other definition such as bold, italics, color will be ignored). Indeed, in this case, it is assumed that the style of each source element is defined in a file with its own syntax, i.e., not with a syntax defined by Source-highlight. (This is the case, for instance, of HTML using CSS style sheets.) Moreover, since the output format style is not used, during formatting the variable @code{$style} will be replaced with the name of the element to highlight (e.g., @code{keyword}, @code{comment}, etc.). For instance, for HTML CSS, we simply have: @example onestyle "<span class=\"$style\">$text</span>" @end example @noindent In fact, HTML CSS relies on style definitions provided in a separate file (the @file{.css} file indeed). Thus, when formatting a @code{keyword}, e.g., @code{abstract}, we will obtain: @example <span class="keyword">abstract</span> @end example @noindent Of course, the style for @code{keyword} must be defined in the @file{.css} file. @node Style template, Line prefix, One style, Output Language Definitions @section Style template @cindex style template @cindex style separator Some output formats are based on a unique template that where the other styles are composed; during composition the styles can be separated with a specific separator: @example styletemplate "..." styleseparator "..." @end example This is used, for instance, for the ANSI color escape sequence output format (@file{esc.outlang}): @example styletemplate "\x1b[$stylem$text\x1b[m" styleseparator ";" bold "01$style" underline "04$style" italics "$style" color "$style" @end example @noindent Note that, since more than one style can be mixed into the style template, @code{bold}, @code{underline}, ... explicitly use the variable @code{$style}. @node Line prefix, String translation, Style template, Output Language Definitions @section Line prefix This feature allows you to generate a string as the prefix of each generated line that corresponds to an input line (i.e., this prefix is not generated for other generated output elements, e.g., the lines in the header, footer, etc.). We use this feature in the @LaTeX{} output (@ref{LaTeX output}): @example lineprefix "\mbox@{@}" @end example @noindent This way each line in the @LaTeX{} output is prefixed with @code{\mbox@{@}}@footnote{This is a sort of trick to insert spaces at the beginning of a line without using a tabular environment; without the leading @code{\mbox@{@}} these spaces would be ignored. This is the only way I found to achieve this, if you have suggestions, please let me know!}. Another interesting example that uses @code{lineprefix} is the javadoc output, see @ref{Generating HTML output}. @node String translation, Document template, Line prefix, Output Language Definitions @section String translation Some character sequences that are in the source file may have a special meaning in an output format, so they need some preprocessing (e.g., escaping them). You can specify the translation table with: @example translations "original sequence" "transformed sequence" 'regex' "transformed sequence" ... end @end example @noindent The difference between @code{"original sequence"} and @code{'regex'}@footnote{Since version 2.4.} is that with the former you specify a character sequence that will be matched literally, apart from special characters such as @code{\} (which, if needed to be inserted, must be escaped), @code{\n} (new line) and @code{\t} (tab character). Instead, with the latter, you can specify a regular expression (this is basically the same difference between @code{"} and @code{'} in language definitions, see @ref{Simple definitions}). For instance, for HTML, we have the following translation table: @example translations "&" "&amp;" "<" "&lt;" ">" "&gt;" end @end example For @LaTeX{}, the translation table is a little bit bigger; here we show only a little part, that shows how to escape special characters (such as @code{\}), to translate a new line character and tab character: @example translations "<" "$<$" ">" "$>$" "&" "\\&" "\\" "\\textbackslash@{@}" "\n" " \\\\\n" " " "\\ " "\t" "\\ \\ \\ \\ \\ \\ \\ \\ " end @end example @noindent Note that, since a new character must be translated in @LaTeX{} with @code{\\}, we have to escape two @code{\} (i.e., @code{\\\\}) and then we want to actually insert a new line in the output file @code{\n}. For HTML with not fixed font by default, @file{html_notfixed.outlang} (see @ref{HTML and XHTML output}), we need two translate two space sequence (i.e., two adjacent spaces, since in HTML more adjacent spaces are rendered as only one space@footnote{Unless they are inside a @code{<tt>...</tt>}.}, while we want them as they are), and we also need to translate a space starting a new line in the source (thus we use the regular expression @code{^ }, enclosed in @code{'}); thus we have: @example translations "\n" "<br>\n" " " "&nbsp; " '^ ' "&nbsp;" # a space at the beginning of a line "\t" "&nbsp; &nbsp; &nbsp; &nbsp; " end @end example @node Document template, Generating HTML output, String translation, Output Language Definitions @section Document template You can define the beginning and the end of an output file, with @cindex doctemplate @example doctemplate "...beginning..." "...end..." end @end example @cindex nodoctemplate @example nodoctemplate "...beginning..." "...end..." end @end example The first one is used when the @code{--doc} command line option is specified, while the second one is used in the other case@footnote{Up to version 2.9, there was only @code{doctemplate} and for @code{--doc} there was a separate @code{.outlang} file; I think the present solution is better and reduces the number of files.}. For instance, for HTML we have @example nodoctemplate "<!-- Generator: $additional --> $header<pre><tt>" "</tt></pre>$footer " end @end example @noindent Note that in the end part there is an explicit new line. In the definition of the @code{doctemplate} and @code{nodoctemplate} the following variables can be used and will be replaced during the output generation: @table @code @item $title the value of the title for the output file (e.g., the one passed with the @code{--title} command line option; @item $header the contents of the file specified with the command line option @code{--header}; @item $footer the contents of the file specified with the command line option @code{--footer}; @item $css the value passed with the command line option @code{--css}; @item $additional other additional information. Source-highlight replaces this with its name and its version. @item $docbgcolor@footnote{Since version 2.6.} the background color for the output document. Source-highlight replaces this with the value specified in the @code{bgcolor} of the @file{.style} file (see @ref{Output format style}) or in the @code{body} selector of the CSS file passed with @code{--style-css-file} (see @ref{Output format style using CSS}). @end table For instance, for an HTML document with css, (file @file{htmlcss.outlang}) we have: @example doctemplate "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\"> <html> <head> <meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\"> <meta name=\"GENERATOR\" content=\"$additional\"> <title>$title</title> <link rel=\"stylesheet\" href=\"$css\" type=\"text/css\"> </head> <body> $header<pre><tt>" "</tt></pre> $footer</body> </html> " end @end example For an HTML document with header and footer, (file @file{html.outlang}) we have (note the use of @code{$docbgcolor}): @example doctemplate "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML//EN\"> <html> <head> <meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\"> <meta name=\"GENERATOR\" content=\"$additional\"> <title>$title</title> </head> <body bgcolor=\"$docbgcolor\"> $header<pre><tt>" "</tt></pre> $footer</body> </html> " end @end example And for an HTML table output (file @file{htmltable.outlang}): @example doctemplate "<table BGCOLOR=\"$docbgcolor\" NOSAVE > <tr NOSAVE> <td NOSAVE> <pre><tt>" "</tt></pre> </td> </tr> </table> " end @end example @node Generating HTML output, , Document template, Output Language Definitions @section Generating HTML output As a complete example we show the file @file{html_common.outlang} which contains the common definitions for the various HTML output formats (@file{html.outlang}, @file{htmltable.outlang}, etc.): @include html_common.outlang.texinfo Moreover, this file is also used for generating javadoc output: @include javadoc.outlang.texinfo The javadoc output format is useful to format code snippets that have to be included inside a javadoc comment of another Java file@footnote{Although I haven't tested it, I think this will work also for Doxygen comments.}. Apart from being formatted nicely in the generated HTML documentation, this also releases the programmer from escaping specific characters in the code snippet (i.e., @code{&}, @code{<} and @code{>}). Note also that it also avoids the sequence @code{*/} to be interpreted as the closing of the (javadoc) comment. For instance, if you write this code: @example /** * This is an example of usage * * <pre><tt> * System.out.println("*/"); * </tt></pre> */ @end example @noindent The resulting Java code contains a syntax error. If you use source-highlight to format the code to insert in a javadoc comment you will avoid these problems. An example of a javadoc generated HTML page containing a code snippet formatted with source-highlight can be found in the file @file{SimpleClass-doc.html} in the documentation directory. @node Generating References, Examples, Output Language Definitions, Top @chapter Generating References @cindex reference @cindex anchor @cindex ctags Since version 2.2 Source-highlight also produces references to fields, variables, etc. In order to do this it relies on the program @emph{Exuberant Ctags}, by Darren Hiebert, available at @url{http://ctags.sourceforge.net}. Thus, you must install this program if you want Source-highlight to provide this feature. The @code{ctags} program generates an index (or ``tag'') file for a variety of language objects found in file(s). This allows these items to be quickly and easily located by a text editor or other utility (as in this case for Source-highlight). A ``tag'' signifies a language object for which an index entry is available (or, alternatively, the index entry created for that object)@footnote{This description is taken from the ctags man page}. This means that Source-highlight is able to generate references for a specific source language if and only if @code{ctags} handles such language. We refer to the command line options of @code{ctags}: @code{--list-maps} and @code{--list-languages} to find out the associations of file extensions and supported languages. Reference generation is enable by using the command line option @code{--gen-references} (@ref{Invoking source-highlight}). This option takes an argument that rules how references will be generated: @table @code @item inline a reference pointer will be generated exactly in the same place of the specific element. This is useful in output formats that naturally supports links, such as HTML, while it is useless for output formats that do not support inline links, such as @LaTeX{}. @item postline if a line of the input source contains elements for which we found references, the list of references will be generated right after the line (see the examples, @ref{Examples}). @item postdoc All the references will be generated after the whole input file has been generated. @end table There is an exception: when an element has more than one reference (because a variable is defined in many sources or because a method is overloaded) then if @code{inline} is specified, the generation switches to @code{postline} for that occurrence. When @code{--gen-references} is specified, Source-highlight first invokes @code{ctags}. The use can customize this call by using the command line option @code{--ctags} (@ref{Invoking source-highlight}). In particular, if one does not want @code{ctags} to be invoked by Source-highlight (e.g., because the tags file has already been generated) then @code{--ctags} must be passed an empty string, @code{""}. In this case or when the specified @code{ctags} command line generates an alternative output tag file (the default generated file is @file{tags}), one must specify the exact tag file with the command line option @code{--ctags-file}. Once the tag file is generated, Source-highlight relies on the library @file{readtags} provided by the @code{ctags} distribution, and included in the Source-highlight sources. Note that if a program element is formatted according to a style that has the option @code{noref} (see @ref{Output format style}) then this element is not considered a tag, and no reference is generated. This is the case, for instance, for a @code{comment} element: each string that is generated with the @code{comment} style, since this is declared with the option @code{noref}, it is not considered a tag (see @ref{Examples}). @node Examples, Problems, Generating References, Top @chapter Examples Here we provide some examples of sources formatted with Source-highlight using the @code{-f texinfo} command line option. Please keep in mind that the highlighting will not be visible in the Info file, but only in the printed manual and in the HTML output (well, at least line numbers are visible everywhere :-). @menu * Simple example:: * References:: * Line ranges:: * Line ranges (with context):: * Regex ranges:: @end menu @node Simple example, References, Examples, Examples @section Simple example The first example is produced by using the command: @example source-highlight -f texinfo -i test.java -o test.java.texinfo -n @end example and here's the result @include test.java.texinfo @node References, Line ranges, Simple example, Examples @section References This example shows the use of @code{--gen-references} functionality. In particular, the following output is generated with the command: @example source-highlight -f texinfo -i test.h -o test_ref.h.texinfo -n \ --gen-references=postline @end example and here's the result (note how the comment line containing the string @code{mysum} does not contain references, since it is a @code{comment} element, and this element has the option @code{noref} in the @file{texinfo.style}, see @ref{Output format style}. The same holds for the @code{_TEXTGEN_H} comment in the last comment line). @include test_ref.h.texinfo @node Line ranges, Line ranges (with context), References, Examples @section Line ranges @cindex line ranges This is an example that uses @code{--line-range} command line option on the input file shown in @xref{Simple example}: @example source-highlight -f texinfo -i test.java -n \ --line-range="12-18","29-34" @end example This generates the following output @include test_lineranges1.java.texinfo Note that, although the specified line ranges span comment environments, the highlighting is respected: the starting of the comment is not printed, but the remaining parts of the comment are correctly highlighted as comment. @node Line ranges (with context), Regex ranges, Line ranges, Examples @section Line ranges (with context) @cindex line ranges @cindex range context @cindex range separator This is an example that uses the command line option @code{--line-range} together with the @code{--range-context} and @code{--range-separator}: @example source-highlight -f texinfo -i test.java -n \ --line-range="12-18","29-34" \ --range-context=2 \ --range-separator="@{... not in range ...@}" @end example This generates the following output @include test_lineranges2.java.texinfo Note the two additional 2 lines before and after the ranges (compare it with the output in @ref{Line ranges}). Note that the (elements of the) context lines are not highlighted. Moreover, the range separator line @code{"@{... not in range ...@}"} is printed between ranges (the separator string is preformatted automatically, so, e.g., you don't have to escape special output characters, such as the @{ @} in texinfo output). @node Regex ranges, , Line ranges (with context), Examples @section Regex ranges @cindex regex ranges Ranges can be expressed also using regular expressions, with the command line option @code{--regex-range}. In this case the beginning of the range will be detected by a line containing (in any point) a string matching the specified regular expression; the end will be detected by a line containing a string matching the same regular expression that started the range. This feature is very useful when we want to document some code (e.g., in this very manual) by showing only specific parts, that are delimited in a ad-hoc way in the source code (e.g., with specific comment patterns). For instance, the following output was produced, starting from the source file shown in @xref{Simple example}, by specifying: @example --regex-range="/// [[:alpha:]]+" @end example @noindent Note that the lines containing @code{/// class}, which determine the range, are not shown in the output: @include test_regexrange1.java.texinfo Furthermore, the line numbers are consistent with the lines of the original file. If we want to output only what is included between @code{/* main */}, we specify (note that we must escape the special regular expression character @code{*}): @example --regex-range="/\* main \*/" @end example @noindent and we get: @include test_regexrange_main.java.texinfo If we want to show only the methods, which in the source file are delimited by comment lines containing the method's name, we can specify: @example --regex-range="/\* [[:alpha:]]+ \*/" @end example @include test_regexrange_methods.java.texinfo In this case, we might have also specified: @example --regex-range="/\* main \*/","/\* mymethod \*/" @end example @noindent since @code{--regex-range} accepts multiple regular expressions. IMPORTANT: the order of regular expression specification is crucial, since they are tested in the same order they are specified at the command line. @node Problems, Mailing Lists, Examples, Top @chapter Reporting Bugs @cindex bugs @cindex problems If you find a bug in @command{source-highlight}, please send electronic mail to @code{bug-source-highlight at gnu dot org} Include the version number, which you can find by running @w{@samp{source-highlight --version}}. Also include in your message the output that the program produced and the output you expected.@refill Even better, please file a bug report at Savannah site: @uref{https://savannah.gnu.org/bugs/?group=src-highlite} If you have other questions, comments or suggestions about @command{source-highlight}, contact the author via electronic mail (find the address at @value{myhomepage}). The author will try to help you out, although he may not have time to fix your problems. @node Mailing Lists, Concept Index, Problems, Top @chapter Mailing Lists @cindex mailing list The following mailing lists are available: @code{help-source-highlight at gnu dot org} for generic discussions about the program and for asking for help about it (open mailing list), @uref{http://mail.gnu.org/mailman/listinfo/help-source-highlight} @code{info-source-highlight at gnu dot org} for receiving information about new releases and features (read-only mailing list), @uref{http://mail.gnu.org/mailman/listinfo/info-source-highlight}. If you want to subscribe to a mailing list just go to the URL and follow the instructions, or send me an e-mail and I'll subscribe you. I'll describe new features in new releases also in my blog, at this URL: @uref{http://tronprog.blogspot.com/search/label/source-highlight} @node Concept Index, , Mailing Lists, Top @unnumbered Concept Index @cindex tail recursion @printindex cp @shortcontents @bye ��������������������������������������������������������������������������source-highlight-3.1.6/doc/sh_acid.css��������������������������������������������������������������0000644�0001750�0001750�00000001635�11672675562�014606� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������body { background-color: #eeeeee; color: #000000; font-weight: normal; font-style: normal; } .keyword { color: #bb7977; font-weight: bold; font-style: normal; } .type { color: #8080c0; font-weight: bold; font-style: normal; } .string { color: #a68500; font-weight: normal; font-style: normal; } .specialchar { color: #ff00ff; font-weight: bold; font-style: normal; } .comment { color: #ff8000; font-weight: normal; font-style: normal; } .number { color: #800080; font-weight: bold; font-style: normal; } .preproc { color: #0080c0; font-weight: bold; font-style: normal; } .symbol { color: #ff0080; font-weight: bold; font-style: normal; } .function { color: #004466; font-weight: normal; font-style: normal; } .cbracket { color: #ff0080; font-weight: bold; font-style: normal; } ���������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/test_extreme_comment_1.texinfo�������������������������������������������0000664�0001750�0001750�00000000664�11675045061�020541� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@c Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite @example @r{@i{// test special #if 0 treatment}} @b{int} main() @{ @r{@i{#if 0 // equivalent to a comment}} @r{@i{ int i = 10;}} @r{@i{ printf("this should never be executed\n");}} @r{@i{ return 1;}} @r{@i{#else}} printf(@t{"Hello world!}\n@t{"}); @b{return} 0; @b{#endif} printf(@t{"never reach here!}\n@t{"}); @} @end example����������������������������������������������������������������������������source-highlight-3.1.6/doc/strategy_example.lang.texinfo��������������������������������������������0000664�0001750�0001750�00000000412�11675045062�020354� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@c Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite @example @r{@i{# an example for explaining the strategy of source-highlight}} @t{@i{type}} = @t{"int"} @t{@i{keyword}} = @t{"null"} @t{@i{symbol}} = @t{"="} @end example������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/sh_berries-dark.css������������������������������������������������������0000644�0001750�0001750�00000001647�11672675562�016263� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������body { background-color: #80bfff; color: #400080; font-weight: normal; font-style: normal; } .keyword { color: #3f2bf0; font-weight: bold; font-style: normal; } .type { color: #3f2bf0; font-weight: normal; font-style: normal; } .string { color: #c40000; font-weight: normal; font-style: normal; } .specialchar { color: #77379a; font-weight: normal; font-style: normal; } .comment { color: #df0959; font-weight: normal; font-style: italic; } .number { color: #20755a; font-weight: normal; font-style: normal; } .preproc { color: #0628cb; font-weight: normal; font-style: normal; } .symbol { color: #000000; font-weight: normal; font-style: normal; } .function { color: #901164; font-weight: bold; font-style: normal; } .cbracket { color: #000000; font-weight: normal; font-style: normal; } �����������������������������������������������������������������������������������������source-highlight-3.1.6/doc/sh_desert.css������������������������������������������������������������0000644�0001750�0001750�00000001647�11672675562�015177� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������body { background-color: #af947e; color: #fffdec; font-weight: normal; font-style: normal; } .keyword { color: #fef8bc; font-weight: bold; font-style: normal; } .type { color: #fef8bc; font-weight: normal; font-style: normal; } .string { color: #f6f647; font-weight: normal; font-style: normal; } .specialchar { color: #f6f647; font-weight: normal; font-style: normal; } .comment { color: #a00000; font-weight: normal; font-style: italic; } .number { color: #3e3f25; font-weight: normal; font-style: normal; } .preproc { color: #833914; font-weight: normal; font-style: normal; } .symbol { color: #66574f; font-weight: normal; font-style: normal; } .function { color: #f3d266; font-weight: bold; font-style: normal; } .cbracket { color: #66574f; font-weight: normal; font-style: normal; } �����������������������������������������������������������������������������������������source-highlight-3.1.6/doc/sh_bright.css������������������������������������������������������������0000644�0001750�0001750�00000001651�11672675562�015163� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������body { background-color: #ffffff; color: #401e7a; font-weight: normal; font-style: normal; } .keyword { color: #ff3030; font-weight: bold; font-style: normal; } .type { color: #f7b92c; font-weight: normal; font-style: normal; } .string { color: #1861a7; font-weight: normal; font-style: normal; } .specialchar { color: #1861a7; font-weight: normal; font-style: normal; } .comment { color: #38ad24; font-weight: normal; font-style: normal; } .number { color: #32ba06; font-weight: normal; font-style: normal; } .preproc { color: #5374b0; font-weight: normal; font-style: normal; } .symbol { color: #3030ee; font-weight: normal; font-style: normal; } .function { color: #d11ced; font-weight: normal; font-style: normal; } .cbracket { color: #3030ee; font-weight: normal; font-style: normal; } ���������������������������������������������������������������������������������������source-highlight-3.1.6/doc/sh_ide-eclipse.css�������������������������������������������������������0000644�0001750�0001750�00000001401�11672675562�016060� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������body { background-color: #ffffff; color: #000000; font-weight: normal; font-style: normal; } .keyword { color: #7f0055; font-weight: bold; font-style: normal; } .type { color: #7f0055; font-weight: bold; font-style: normal; } .string { color: #0000ff; font-weight: normal; font-style: normal; } .specialchar { color: #0000ff; font-weight: normal; font-style: normal; } .comment { color: #717ab3; font-weight: normal; font-style: normal; } .number { color: #000000; font-weight: normal; font-style: normal; } .preproc { color: #3f5fbf; font-weight: normal; font-style: normal; } .function { color: #000000; font-weight: normal; font-style: normal; } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/html_common.outlang.texinfo����������������������������������������������0000664�0001750�0001750�00000001657�11675045061�020056� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@c Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite @example @b{include} @t{"html_ref.outlang"} @b{extension} @t{"html"} @b{bold} @t{"<b>$text</b>"} @b{italics} @t{"<i>$text</i>"} @b{underline} @t{"<u>$text</u>"} @b{color} @t{"<font color=\"$style\">$text</font>"} @b{colormap} @t{"green"} @t{"#33CC00"} @t{"red"} @t{"#FF0000"} @t{"darkred"} @t{"#990000"} @t{"blue"} @t{"#0000FF"} @t{"brown"} @t{"#9A1900"} @t{"pink"} @t{"#CC33CC"} @t{"yellow"} @t{"#FFCC00"} @t{"cyan"} @t{"#66FFFF"} @t{"purple"} @t{"#993399"} @t{"orange"} @t{"#FF6600"} @t{"brightorange"} @t{"#FF9900"} @t{"brightgreen"} @t{"#33FF33"} @t{"darkgreen"} @t{"#009900"} @t{"black"} @t{"#000000"} @t{"teal"} @t{"#008080"} @t{"gray"} @t{"#808080"} @t{"darkblue"} @t{"#000080"} @t{"white"} @t{"#FFFFFF"} @b{default} @t{"#000000"} @b{end} @b{translations} @t{"&"} @t{"&amp;"} @t{"<"} @t{"&lt;"} @t{">"} @t{"&gt;"} @b{end} @end example���������������������������������������������������������������������������������source-highlight-3.1.6/doc/comment-show2.lang.texinfo�����������������������������������������������0000664�0001750�0001750�00000001054�11675045061�017503� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@c Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite @example @b{vardef} @t{@i{TODO}} = @t{'(TODO|FIXME)([:]?)'} @b{environment} @t{@i{comment}} @b{delim} @t{"/**"} @t{"*/"} @b{multiline} @b{nested} @b{begin} @t{@i{type}} = @t{'@@[[:alpha:]]+'} @t{@i{todo}} = @t{@i{$TODO}} @b{end} @t{@i{regexp}} = @t{`([^[:alnum:]]).*(\1)`} @t{@i{string}} @b{delim} @t{"<"} @t{">"} @t{@i{string2}} @b{delim} @t{"<<"} @t{">>"} @b{multiline} (@t{@i{paren}},@t{@i{normal}},@t{@i{paren}}) = @t{`(\[)(.*)(\])`} @end example������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/test_regexrange_methods.java.texinfo�������������������������������������0000664�0001750�0001750�00000001364�11675045057�021723� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@c Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite @example @t{41:} @b{public} @b{void} mymethod(@b{int} i) @{ @t{42:} @r{@i{// just a foo method}} @t{43:} @} @t{47:} @b{public} @b{static} @b{void} main( String args[] ) @{ @t{48:} @r{@i{// just some greetings ;-) /*}} @t{49:} System.out.println( @t{"Hello from java2html :-)"} ) ; @t{50:} System.out.println( @t{"}\t@t{by Lorenzo Bettini"} ) ; @t{51:} System.out.println( @t{"}\t@t{http://www.lorenzobettini.it"} ) ; @t{52:} @b{if} (argc > 0) @t{53:} String param = argc[0]; @t{54:} @r{@i{//System.out.println( "bye bye... :-D" ) ; // see you soon}} @t{55:} @} @end example����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/txt2texinfo.txt.texinfo.texinfo������������������������������������������0000664�0001750�0001750�00000001133�11675045062�020647� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@c Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite @example @@c Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite @@example For instance, in this Texinfo manual, if I want to insert a @@@@@@@@ or a @@@@@@@{ I have to ``escape'' them to make them appear literally since they have a special meaning in Texinfo. The same holds, e.g., for @@@@code@@@{<@@@}, @@@@code@@@{>@@@} or @@@@code@@@{&@@@} in HTML. If you use source-highlight, it will take care of this, automatically for you. @@end example @end example�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/c_comment.lang.texinfo���������������������������������������������������0000664�0001750�0001750�00000001556�11675045060�016753� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@c Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite @example @r{@i{# c_comment.lang}} @r{@i{# comments with documentation tags}} @b{environment} @t{@i{comment}} @b{start} @t{"///"} @b{begin} @b{include} @t{"url.lang"} @b{include} @t{"html_simple.lang"} @t{@i{type}} = @t{'@@[[:alpha:]]+'} @b{include} @t{"todo.lang"} @b{end} @t{@i{comment}} @b{start} @t{"//"} @r{@i{# comments with documentation tags}} @b{environment} @t{@i{comment}} @b{delim} @t{"/**"} @t{"*/"} @b{multiline} @b{begin} @b{include} @t{"url.lang"} @b{include} @t{"html_simple.lang"} @t{@i{type}} = @t{'@@[[:alpha:]]+'} @b{include} @t{"todo.lang"} @b{end} @r{@i{# standard comments}} @b{environment} @t{@i{comment}} @b{delim} @t{"/*"} @t{"*/"} @b{multiline} @b{begin} @b{include} @t{"url.lang"} @b{include} @t{"todo.lang"} @b{end} @end example��������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/infoformatter-main.cpp.texinfo�������������������������������������������0000664�0001750�0001750�00000004214�11675045063�020446� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@c Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite @example @b{#include} @t{<iostream>} @b{#include} @t{"srchilite/langdefmanager.h"} @b{#include} @t{"srchilite/regexrulefactory.h"} @b{#include} @t{"srchilite/sourcehighlighter.h"} @b{#include} @t{"srchilite/formattermanager.h"} @b{#include} @t{"infoformatter.h"} @b{using} @b{namespace} std; @b{#ifndef} DATADIR @b{#define} DATADIR @t{""} @b{#endif} @b{int} main() @{ srchilite::RegexRuleFactory ruleFactory; srchilite::LangDefManager langDefManager(&ruleFactory); @r{@i{// we highlight C++ code for simplicity}} srchilite::SourceHighlighter highlighter(langDefManager.getHighlightState( DATADIR, @t{"cpp.lang"})); srchilite::FormatterManager formatterManager(InfoFormatterPtr( @b{new} InfoFormatter)); InfoFormatterPtr keywordFormatter(@b{new} InfoFormatter(@t{"keyword"})); formatterManager.addFormatter(@t{"keyword"}, keywordFormatter); formatterManager.addFormatter(@t{"string"}, InfoFormatterPtr(@b{new} InfoFormatter( @t{"string"}))); @r{@i{// for "type" we use the same formatter as for "keyword"}} formatterManager.addFormatter(@t{"type"}, keywordFormatter); formatterManager.addFormatter(@t{"comment"}, InfoFormatterPtr( @b{new} InfoFormatter(@t{"comment"}))); formatterManager.addFormatter(@t{"symbol"}, InfoFormatterPtr(@b{new} InfoFormatter( @t{"symbol"}))); formatterManager.addFormatter(@t{"number"}, InfoFormatterPtr(@b{new} InfoFormatter( @t{"number"}))); formatterManager.addFormatter(@t{"preproc"}, InfoFormatterPtr( @b{new} InfoFormatter(@t{"preproc"}))); highlighter.setFormatterManager(&formatterManager); @r{@i{// make sure it uses additional information}} srchilite::FormatterParams params; highlighter.setFormatterParams(&params); string line; @r{@i{// we now highlight a line a time}} @b{while} (getline(cin, line)) @{ @r{@i{// reset position counter within a line}} params.start = 0; highlighter.highlightParagraph(line); @} @b{return} 0; @} @end example������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/stamp-vti����������������������������������������������������������������0000644�0001750�0001750�00000000145�11675377205�014340� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@set UPDATED 24 December 2011 @set UPDATED-MONTH December 2011 @set EDITION 3.1.6 @set VERSION 3.1.6 ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/SimpleClass.java���������������������������������������������������������0000644�0001750�0001750�00000003407�11672675561�015562� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/** * This is a simple class that demonstrate the * use of source-highlight to produce javadoc * embeddable code: * * <!-- Generated by Source-highlight --> * <pre><tt> * <i><font color="#9A1900">/* </font></i> * <i><font color="#9A1900"> this is an example of code to be included</font></i> * <i><font color="#9A1900"> in the javadoc documentation of SimpleClass</font></i> * <i><font color="#9A1900">&#42;/</font></i> * <b><font color="#000080">import</font></b> simpleclass<font color="#990000">.*;</font> * * <i><font color="#9A1900">// code snippet</font></i> * SimpleClass s <font color="#990000">=</font> <b><font color="#0000FF">new</font></b> <b><font color="#000000">SimpleClass</font></b><font color="#990000">(</font><font color="#993399">150</font><font color="#990000">);</font> * <b><font color="#0000FF">if</font></b> <font color="#990000">(</font>s <font color="#990000">==</font> <b><font color="#0000FF">null</font></b> <font color="#990000">&amp;&amp;</font> <b><font color="#0000FF">true</font></b><font color="#990000">)</font> <font color="#FF0000">{</font> * <b><font color="#0000FF">throw</font></b> <b><font color="#0000FF">new</font></b> <b><font color="#000000">SimpleClassException</font></b><font color="#990000">(</font><font color="#FF0000">"failed to create"</font><font color="#990000">);</font> * <font color="#FF0000">}</font> * System<font color="#990000">.</font>out<font color="#990000">.</font><b><font color="#000000">println</font></b><font color="#990000">(</font><font color="#FF0000">"this is a simple class"</font> <font color="#990000">+</font> s<font color="#990000">);</font> * </tt></pre> * * The previous example code was formatted with Source-highlight */ public class SimpleClass { // nothing interesting :-) } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/sh_neon.css��������������������������������������������������������������0000644�0001750�0001750�00000001643�11672675562�014644� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������body { background-color: #000000; color: #ffffff; font-weight: normal; font-style: normal; } .keyword { color: #00ffff; font-weight: bold; font-style: normal; } .type { color: #ffff00; font-weight: normal; font-style: normal; } .string { color: #cd00ff; font-weight: normal; font-style: normal; } .specialchar { color: #cd00ff; font-weight: normal; font-style: normal; } .comment { color: #00ff00; font-weight: normal; font-style: italic; } .number { color: #ff00ff; font-weight: normal; font-style: normal; } .preproc { color: #ffbb00; font-weight: normal; font-style: normal; } .symbol { color: #ee5896; font-weight: bold; font-style: normal; } .function { color: #ffffff; font-weight: bold; font-style: normal; } .cbracket { color: #ee5896; font-weight: bold; font-style: normal; } ���������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/Makefile.am��������������������������������������������������������������0000644�0001750�0001750�00000052026�11672675561�014535� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Copyright (C) 1999-2009 Lorenzo Bettini <http://www.lorenzobettini.it> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. STD_STYLE = --style-file $(top_srcdir)/src/default.style DATADIR_OPTION = --data-dir $(top_srcdir)/src/ SRCHILITEEXE = $(top_builddir)/src/$(PACKAGE)$(EXEEXT) SRCHILITEPROG = $(SRCHILITEEXE) $(DATADIR_OPTION) SRCHILITETEXINFO = $(SRCHILITEPROG) -f texinfo --output-dir=$(top_builddir)/doc/ --style-file=$(top_srcdir)/src/texinfo.style JAVA2HTML_PROG = $(SRCHILITEPROG) -s java -f html PROGNAME = $(JAVA2HTML_PROG) $(STD_STYLE) CPP2HTML = $(SRCHILITEPROG) -s cpp -f html $(STD_STYLE) CPP2HTML_WREFS = $(CPP2HTML) --title="Contains references to tags" --gen-references=inline --ctags="ctags --excmd=n --tag-relative=yes -o my_test_ref.tags" CHANGELOG2HTML = $(SRCHILITEPROG) -s changelog -f html $(STD_STYLE) FLEX2HTML = $(SRCHILITEPROG) -s flex -f html $(STD_STYLE) OUTPUT_HERE = --output-dir=$(top_builddir)/doc info_TEXINFOS = source-highlight.texinfo source-highlight-lib.texinfo source_highlight_TEXINFOS = $(GENERATEDINFOS) $(DISTRIBUTEDINFOS) source_highlight_lib_TEXINFOS = $(EXAMPLEINFOS) SUFFIXES = .txt .txt.texinfo .txt.texinfo.texinfo .lang .lang.texinfo .diff .diff.texinfo .css .css.texinfo .show.texinfo .defaults .defaults.texinfo .cpp .cpp.texinfo #source-highlight.texinfo: $(GENERATEDINFOS) $(DISTRIBUTEDINFOS) lang-list.texinfo: $(top_srcdir)/src/lang.map $(SRCHILITEEXE) --data-dir=$(top_srcdir)/src/ --lang-list | sed -e 's/@/@@/' > $@ outlang-list.texinfo: $(top_srcdir)/src/outlang.map $(SRCHILITEEXE) --data-dir=$(top_srcdir)/src/ --outlang-list | sed -e 's/@/@@/' > $@ test.java.texinfo: $(top_srcdir)/tests/test.java $(SRCHILITEEXE) --data-dir=$(top_srcdir)/src/ -f texinfo -i $(top_srcdir)/tests/test.java --style-file=$(top_srcdir)/src/texinfo.style -n > $@ test_lineranges1.java.texinfo: $(top_srcdir)/tests/test.java $(SRCHILITEEXE) --data-dir=$(top_srcdir)/src/ -f texinfo -i $(top_srcdir)/tests/test.java --style-file=$(top_srcdir)/src/texinfo.style --line-range="12-18","29-34" -n > $@ test_lineranges2.java.texinfo: $(top_srcdir)/tests/test.java $(SRCHILITEEXE) --data-dir=$(top_srcdir)/src/ -f texinfo -i $(top_srcdir)/tests/test.java --style-file=$(top_srcdir)/src/texinfo.style --line-range="12-18","29-34" -n --range-context=2 --range-separator="{... not in range ...}" > $@ test_regexrange1.java.texinfo: $(top_srcdir)/tests/test.java $(SRCHILITEEXE) --data-dir=$(top_srcdir)/src/ -f texinfo -i $(top_srcdir)/tests/test.java --style-file=$(top_srcdir)/src/texinfo.style --regex-range="/// [[:alpha:]]+" -n > $@ test_regexrange_main.java.texinfo: $(top_srcdir)/tests/test.java $(SRCHILITEEXE) --data-dir=$(top_srcdir)/src/ -f texinfo -i $(top_srcdir)/tests/test.java --style-file=$(top_srcdir)/src/texinfo.style --regex-range="/\* main \*/" -n > $@ test_regexrange_methods.java.texinfo: $(top_srcdir)/tests/test.java $(SRCHILITEEXE) --data-dir=$(top_srcdir)/src/ -f texinfo -i $(top_srcdir)/tests/test.java --style-file=$(top_srcdir)/src/texinfo.style --regex-range="/\* [[:alpha:]]+ \*/" -n > $@ test_vardecl.cc.texinfo: $(top_srcdir)/tests/test_vardecl.cc $(SRCHILITEEXE) --data-dir=$(top_srcdir)/src/ -f texinfo -i $(top_srcdir)/tests/test_vardecl.cc --style-file=$(srcdir)/highlight_type.style > $@ debug.java.texinfo: $(top_srcdir)/tests/debug.java $(SRCHILITEEXE) --data-dir=$(top_srcdir)/src/ -f texinfo -i $(top_srcdir)/tests/debug.java --style-file=$(top_srcdir)/src/texinfo.style -n > $@ cpp.langelems.texinfo: $(top_srcdir)/src/cpp.lang $(top_srcdir)/src/c.lang $(SRCHILITEEXE) --data-dir=$(top_srcdir)/src/ --show-lang-elements=$(top_srcdir)/src/cpp.lang > $@ log.langelems.texinfo: $(top_srcdir)/src/log.lang $(SRCHILITEEXE) --data-dir=$(top_srcdir)/src/ --show-lang-elements=$(top_srcdir)/src/log.lang > $@ .txt.txt.texinfo: $(SRCHILITEEXE) --data-dir=$(top_srcdir)/src/ -f texinfo -i $< --style-file=$(top_srcdir)/src/texinfo.style -o $@ style.defaults.texinfo: $(top_srcdir)/src/style.defaults $(SRCHILITEEXE) --data-dir=$(top_srcdir)/src/ -f texinfo -i $(top_srcdir)/src/style.defaults --style-file=$(top_srcdir)/src/texinfo.style -o $@ --lang-def=nohilite.lang .txt.texinfo.txt.texinfo.texinfo: $(SRCHILITEEXE) --data-dir=$(top_srcdir)/src/ -f texinfo -i $< --style-file=$(top_srcdir)/src/texinfo.style -o $@ --lang-def=nohilite.lang html_common.outlang.texinfo: $(top_srcdir)/src/html_common.outlang $(SRCHILITEEXE) --data-dir=$(top_srcdir)/src/ -f texinfo -i $(top_srcdir)/src/html_common.outlang --style-file=$(top_srcdir)/src/texinfo.style -o $@ javadoc.outlang.texinfo: $(top_srcdir)/src/javadoc.outlang $(SRCHILITEEXE) --data-dir=$(top_srcdir)/src/ -f texinfo -i $(top_srcdir)/src/javadoc.outlang --style-file=$(top_srcdir)/src/texinfo.style -o $@ LANG2TEXINFO = $(SRCHILITEEXE) --data-dir=$(top_srcdir)/src/ -f texinfo --style-file=$(top_srcdir)/src/texinfo.style -o $@ test_newlines.lang.texinfo: $(top_srcdir)/tests/test_newlines.lang $(LANG2TEXINFO) -i $(top_srcdir)/tests/test_newlines.lang test_nonewlines.lang.texinfo: $(top_srcdir)/tests/test_nonewlines.lang $(LANG2TEXINFO) -i $(top_srcdir)/tests/test_nonewlines.lang test_string_stop.lang.texinfo: $(top_srcdir)/tests/test_string_stop.lang $(LANG2TEXINFO) -i $(top_srcdir)/tests/test_string_stop.lang langdef.lang.texinfo: $(top_srcdir)/src/langdef.lang $(LANG2TEXINFO) -i $(top_srcdir)/src/langdef.lang style.lang.texinfo: $(top_srcdir)/src/style.lang $(LANG2TEXINFO) -i $(top_srcdir)/src/style.lang cpp.lang.texinfo: $(top_srcdir)/src/cpp.lang $(LANG2TEXINFO) -i $(top_srcdir)/src/cpp.lang c.lang.texinfo: $(top_srcdir)/src/c.lang $(LANG2TEXINFO) -i $(top_srcdir)/src/c.lang csharp.lang.texinfo: $(top_srcdir)/src/csharp.lang $(LANG2TEXINFO) -i $(top_srcdir)/src/csharp.lang c_comment.lang.texinfo: $(top_srcdir)/src/c_comment.lang $(LANG2TEXINFO) -i $(top_srcdir)/src/c_comment.lang clike_vardeclaration.lang.texinfo: $(top_srcdir)/src/clike_vardeclaration.lang $(LANG2TEXINFO) -i $(top_srcdir)/src/clike_vardeclaration.lang c_string.lang.texinfo: $(top_srcdir)/src/c_string.lang $(LANG2TEXINFO) -i $(top_srcdir)/src/c_string.lang symbols.lang.texinfo: $(top_srcdir)/src/symbols.lang $(LANG2TEXINFO) -i $(top_srcdir)/src/symbols.lang function.lang.texinfo: $(top_srcdir)/src/function.lang $(LANG2TEXINFO) -i $(top_srcdir)/src/function.lang diff.lang.texinfo: $(top_srcdir)/src/diff.lang $(LANG2TEXINFO) -i $(top_srcdir)/src/diff.lang extreme_comment.lang.texinfo: $(top_srcdir)/src/extreme_comment.lang $(LANG2TEXINFO) -i $(top_srcdir)/src/extreme_comment.lang extreme_comment2.lang.texinfo: $(top_srcdir)/src/extreme_comment2.lang $(LANG2TEXINFO) -i $(top_srcdir)/src/extreme_comment2.lang extreme_comment3.lang.texinfo: $(top_srcdir)/src/extreme_comment3.lang $(LANG2TEXINFO) -i $(top_srcdir)/src/extreme_comment3.lang extreme_comment4.lang.texinfo: $(top_srcdir)/src/extreme_comment4.lang $(LANG2TEXINFO) -i $(top_srcdir)/src/extreme_comment4.lang .lang.lang.texinfo: $(SRCHILITEEXE) --data-dir=$(top_srcdir)/src/ -f texinfo -i $< --style-file=$(top_srcdir)/src/texinfo.style -o $@ default.style.texinfo: $(top_srcdir)/src/default.style $(SRCHILITEEXE) --data-dir=$(top_srcdir)/src/ -f texinfo -i $(top_srcdir)/src/default.style --style-file=$(top_srcdir)/src/texinfo.style -o $@ texinfo.style.texinfo: $(top_srcdir)/src/texinfo.style $(SRCHILITEEXE) --data-dir=$(top_srcdir)/src/ -f texinfo -i $(top_srcdir)/src/texinfo.style --style-file=$(top_srcdir)/src/texinfo.style -o $@ syslog.style.texinfo: $(top_srcdir)/tests/syslog.style $(SRCHILITEEXE) --data-dir=$(top_srcdir)/src/ -f texinfo -i $(top_srcdir)/tests/syslog.style --style-file=$(top_srcdir)/src/texinfo.style -o $@ .diff.diff.texinfo: $(SRCHILITEEXE) --data-dir=$(top_srcdir)/src/ -f texinfo -i $< --style-file=$(top_srcdir)/src/texinfo.style -o $@ .cpp.cpp.texinfo: $(SRCHILITEEXE) --data-dir=$(top_srcdir)/src/ -f texinfo -i $< --style-file=$(top_srcdir)/src/texinfo.style -o $@ .css.css.texinfo: $(SRCHILITEEXE) --data-dir=$(top_srcdir)/src/ -f texinfo -i $< --style-file=$(top_srcdir)/src/texinfo.style -o $@ default.css.texinfo: $(top_srcdir)/src/default.css $(SRCHILITEEXE) --data-dir=$(top_srcdir)/src/ -f texinfo -i $(top_srcdir)/src/default.css --style-file=$(top_srcdir)/src/texinfo.style -o $@ test_extreme_comment.cpp.texinfo: $(top_srcdir)/tests/test_extreme_comment.cpp $(SRCHILITEEXE) --data-dir=$(top_srcdir)/src/ -f texinfo -i $(top_srcdir)/tests/test_extreme_comment.cpp --style-file=$(top_srcdir)/src/texinfo.style -o $@ test_extreme_comment_wrong.texinfo: $(top_srcdir)/tests/test_extreme_comment.cpp $(SRCHILITEEXE) --data-dir=$(top_srcdir)/src/ -f texinfo -i $(top_srcdir)/tests/test_extreme_comment.cpp --style-file=$(top_srcdir)/src/texinfo.style -o $@ --lang-def=extreme_comment.lang test_extreme_comment_1.texinfo: $(top_srcdir)/tests/test_extreme_comment.cpp $(SRCHILITEEXE) --data-dir=$(top_srcdir)/src/ -f texinfo -i $(top_srcdir)/tests/test_extreme_comment.cpp --style-file=$(top_srcdir)/src/texinfo.style -o $@ --lang-def=extreme_comment2.lang test_extreme_comment_wrong2.texinfo: $(top_srcdir)/tests/test_extreme_comment2.cpp $(SRCHILITEEXE) --data-dir=$(top_srcdir)/src/ -f texinfo -i $(top_srcdir)/tests/test_extreme_comment2.cpp --style-file=$(top_srcdir)/src/texinfo.style -o $@ --lang-def=extreme_comment2.lang test_extreme_comment_2.texinfo: $(top_srcdir)/tests/test_extreme_comment2.cpp $(SRCHILITEEXE) --data-dir=$(top_srcdir)/src/ -f texinfo -i $(top_srcdir)/tests/test_extreme_comment2.cpp --style-file=$(top_srcdir)/src/texinfo.style -o $@ --lang-def=extreme_comment3.lang test_extreme_comment_3.texinfo: $(top_srcdir)/tests/test_extreme_comment3.cpp $(SRCHILITEEXE) --data-dir=$(top_srcdir)/src/ -f texinfo -i $(top_srcdir)/tests/test_extreme_comment3.cpp --style-file=$(top_srcdir)/src/texinfo.style -o $@ --lang-def=extreme_comment3.lang source-highlight-console-main.cpp.texinfo: $(top_srcdir)/lib/examples/source-highlight-console-main.cpp $(SRCHILITETEXINFO) $(top_srcdir)/lib/examples/source-highlight-console-main.cpp --regex-range="//> TEXINFO" debuglistener.cpp.texinfo: $(top_srcdir)/lib/srchilite/debuglistener.cpp $(SRCHILITETEXINFO) $(top_srcdir)/lib/srchilite/debuglistener.cpp --regex-range="//> TEXINFO" infoformatter.h.texinfo: $(top_srcdir)/lib/examples/infoformatter.h $(SRCHILITETEXINFO) $(top_srcdir)/lib/examples/infoformatter.h --regex-range="//> TEXINFO" styleformatter.h.texinfo: $(top_srcdir)/lib/examples/infoformatter.h $(SRCHILITETEXINFO) $(top_srcdir)/lib/examples/infoformatter.h --regex-range="//> TEXINFO" infoformatter-main.cpp.texinfo: $(top_srcdir)/lib/examples/infoformatter-main.cpp $(SRCHILITETEXINFO) $(top_srcdir)/lib/examples/infoformatter-main.cpp --regex-range="//> TEXINFO" styleformatter-main.cpp.texinfo: $(top_srcdir)/lib/examples/styleformatter-main.cpp $(SRCHILITETEXINFO) $(top_srcdir)/lib/examples/styleformatter-main.cpp --regex-range="//> TEXINFO" styleformatter.h.texinfo: $(top_srcdir)/lib/examples/styleformatter.h $(SRCHILITETEXINFO) $(top_srcdir)/lib/examples/styleformatter.h --regex-range="//> TEXINFO" styleformatterfactory.h.texinfo: $(top_srcdir)/lib/examples/styleformatterfactory.h $(SRCHILITETEXINFO) $(top_srcdir)/lib/examples/styleformatterfactory.h --regex-range="//> TEXINFO" .lang.show.texinfo: $(SRCHILITEEXE) --show-regex=$< | $(SRCHILITEPROG) -f texinfo --style-file=$(top_srcdir)/src/texinfo.style --lang-def=nohilite.lang > $@ # $(SRCHILITEEXE) --show-regex=$< > $@ # sed -itesttmp -e 's/@/@@/g' $@ && rm -f *testtmp # the following rules have to do only with maintainance of the package if MAINTAINER_MODE # help-output.texinfo: $(top_srcdir)/src/lib/cmdline.ggo # $(SRCHILITEEXE) --help | sed -e 's/@/@@/' > $@ if NO_GENGETOPT $(top_srcdir)/doc/help-output.texinfo: $(top_srcdir)/src/cmdline.ggo touch $@ else $(top_srcdir)/doc/help-output.texinfo: $(top_srcdir)/src/cmdline.ggo $(GENGETOPT) --show-detailed-help -i $(top_srcdir)/src/cmdline.ggo --set-package="source-highlight" --set-version="" > $@ endif $(top_srcdir)/doc/test_ref.h.texinfo: $(top_srcdir)/tests/test.h $(SRCHILITEEXE) --data-dir=$(top_srcdir)/src/ -f texinfo -i $(top_srcdir)/tests/test.h --style-file=$(top_srcdir)/src/texinfo.style -n --gen-references=postline > $@ # the dependence on config.h is to ensure the correct version number # in the generated man file if NO_HELP2MAN source-highlight.1: $(top_srcdir)/src/cmdline.ggo $(top_builddir)/config.h touch $@ else source-highlight.1: $(top_srcdir)/src/cmdline.ggo $(top_builddir)/config.h $(HELP2MAN) -n "convert source code to syntax highlighted document" $(SRCHILITEEXE) > $@ endif # end of maintainer mode endif AM_MAKEINFOHTMLFLAGS=--no-split # for including generated texinfo files AM_MAKEINFOFLAGS=-I$(srcdir) # these are distributed since they might depend on other programs DISTRIBUTEDINFOS = help-output.texinfo test_ref.h.texinfo GENERATEDINFOS = lang-list.texinfo outlang-list.texinfo test.java.texinfo test_lineranges1.java.texinfo test_lineranges2.java.texinfo test_regexrange1.java.texinfo test_regexrange_main.java.texinfo test_regexrange_methods.java.texinfo debug.java.texinfo default.style.texinfo texinfo.style.texinfo syslog.style.texinfo langdef.lang.texinfo style.lang.texinfo cpp.lang.texinfo c.lang.texinfo csharp.lang.texinfo c_comment.lang.texinfo clike_vardeclaration.lang.texinfo c_string.lang.texinfo symbols.lang.texinfo function.lang.texinfo example-u.diff.texinfo example-c.diff.texinfo example-n.diff.texinfo diff.lang.texinfo test_extreme_comment.cpp.texinfo extreme_comment.lang.texinfo test_extreme_comment_wrong.texinfo extreme_comment2.lang.texinfo test_extreme_comment_1.texinfo test_extreme_comment_wrong2.texinfo extreme_comment3.lang.texinfo test_extreme_comment_2.texinfo test_extreme_comment_3.texinfo comment-show.show.texinfo comment-show2.show.texinfo comment-show.lang.texinfo comment-show2.lang.texinfo html_common.outlang.texinfo javadoc.outlang.texinfo cpp.langelems.texinfo log.langelems.texinfo txt2texinfo.txt.texinfo txt2texinfo.txt.texinfo.texinfo css_example.css.texinfo default.css.texinfo style.defaults.texinfo test_string_stop.lang.texinfo strategy_example.lang.texinfo test_vardecl.cc.texinfo test_nonewlines.lang.texinfo test_newlines.lang.texinfo EXAMPLEINFOS = source-highlight-console-main.cpp.texinfo infoformatter.h.texinfo infoformatter-main.cpp.texinfo debuglistener.cpp.texinfo styleformatter.h.texinfo styleformatterfactory.h.texinfo styleformatter-main.cpp.texinfo instances_example.cpp.texinfo CSS_FILES = default.css \ Hello.css Hello2.css mono-alt.css mono.css cpp2html.css \ xhtml.css \ sh_acid.css sh_golden.css sh_night.css \ sh_berries-dark.css sh_greenlcd.css sh_pablo.css \ sh_berries-light.css sh_ide-anjuta.css sh_peachpuff.css \ sh_bipolar.css sh_ide-codewarrior.css sh_print.css \ sh_blacknblue.css sh_ide-devcpp.css sh_rand01.css \ sh_bright.css sh_ide-eclipse.css sh_the.css \ sh_contrast.css sh_ide-kdev.css sh_typical.css \ sh_darkblue.css sh_ide-msvcpp.css sh_vampire.css \ sh_darkness.css sh_kwrite.css sh_vim-dark.css \ sh_desert.css sh_matlab.css sh_vim.css \ sh_dull.css sh_navy.css sh_whatis.css \ sh_easter.css sh_nedit.css sh_whitengrey.css \ sh_emacs.css sh_neon.css sh_zellner.css EXTRA_DIST = colors.html source-highlight.html source-highlight-lib.html \ Hello.java \ header.html footer.html \ gpl.texinfo flex_scanner.ll \ example-u.diff example-c.diff example-n.diff \ source-highlight.1 source-highlight-settings.1 check-regexp.1 index.html examples.html \ comment-show.lang comment-show2.lang \ SimpleClass.java SimpleClass-doc.html UsageExample.java \ txt2texinfo.txt \ $(DISTRIBUTEDINFOS) $(CSS_FILES) \ style_examples_footer.html style_examples_header.html \ css_example.css \ strategy_example.lang \ highlight_type.style \ instances_example.cpp source_highlightdoc_DATA = colors.html source-highlight.html \ Hello.java Hello1.html Hello2.html Hello3.html Hello4.html Hello5.html \ Hello.java.html Hello_h_f.html Hello_lines.html Hello_xhtml.html \ Hello_xhtml2.html Hello_notfixed.html \ $(CSS_FILES) \ source-highlight.cc.html \ cmdline.h.html \ flex_scanner.ll.html \ header.html footer.html \ langdef.lang.html \ index.html examples.html \ SimpleClass.java SimpleClass.html SimpleClass-doc.html \ UsageExample.java UsageExample.html \ style_examples.html source_highlightdata_DATA = $(CSS_FILES) # man page man_MANS = source-highlight.1 source-highlight-settings.1 check-regexp.1 # note that $(srcdir) actually points to doc dir langdef.lang.html: $(top_srcdir)/src/langdef.lang $(SRCHILITEPROG) $(STD_STYLE) -i $(top_srcdir)/src/langdef.lang -o langdef.lang.html source-highlight.cc.html: $(top_srcdir)/src/source-highlight.cc $(CPP2HTML) --doc $(OUTPUT_HERE) $(top_srcdir)/src/source-highlight.cc #ChangeLog.html: $(top_srcdir)/ChangeLog # $(CHANGELOG2HTML) --doc $(OUTPUT_HERE) $(top_srcdir)/ChangeLog flex_scanner.ll.html: $(srcdir)/flex_scanner.ll $(FLEX2HTML) --doc $(OUTPUT_HERE) $(srcdir)/flex_scanner.ll # cmdline.c.html: $(top_srcdir)/src/lib/cmdline.c # $(CPP2HTML) --doc $(OUTPUT_HERE) --css="$(srcdir)/cpp2html.css" --header="$(srcdir)/header.html" --footer="$(srcdir)/footer.html" $(top_srcdir)/src/lib/cmdline.c cmdline.h.html: $(top_srcdir)/src/cmdline.h $(CPP2HTML) --doc $(OUTPUT_HERE) --css="$(srcdir)/mono.css" $(top_srcdir)/src/cmdline.h BUILD_HELLO1 = $(PROGNAME) -i $(srcdir)/Hello.java -o Hello1.html BUILD_HELLO2 = $(PROGNAME) --input $(srcdir)/Hello.java --output Hello2.html --doc BUILD_HELLO3 = $(PROGNAME) -i $(srcdir)/Hello.java -o Hello3.html --title "Happy Java with java2html :-)" --tab 3 BUILD_HELLO4 = $(PROGNAME) < $(srcdir)/Hello.java > Hello4.html --title "and what about CSS :-)" --css "Hello.css" BUILD_HELLO5 = $(PROGNAME) < $(srcdir)/Hello.java > Hello5.html --title "Wooo... this is quite dark ;-D" --css "mono-alt.css" BUILD_HELLO_HTML = $(PROGNAME) --doc $(OUTPUT_HERE) $(srcdir)/Hello.java BUILD_HELLO_W_HEADER_FOOTER = $(JAVA2HTML_PROG) --css="cpp2html.css" --doc -i $(srcdir)/Hello.java -o Hello_h_f.html --header="$(srcdir)/header.html" --footer="$(srcdir)/footer.html" BUILD_HELLO_LINES = $(PROGNAME) --line-number --doc -i $(srcdir)/Hello.java -o Hello_lines.html BUILD_HELLO_XHTML = $(SRCHILITEPROG) -s java -f xhtml --doc -i $(srcdir)/Hello.java -o Hello_xhtml.html --css $(srcdir)/xhtml.css BUILD_HELLO_XHTML2 = $(SRCHILITEPROG) -s java -f xhtml --doc -i $(srcdir)/Hello.java -o Hello_xhtml2.html $(STD_STYLE) BUILD_HELLO_HTMLNOTFIXED = $(SRCHILITEPROG) -s java --outlang-def=$(srcdir)/../src/html_notfixed.outlang -i $(srcdir)/Hello.java -o Hello_notfixed.html #BUILD_REFS = $(CPP2HTML_WREFS) --ctags-file=my_test_ref.tags --line-number $(srcdir)/test_refs.h $(srcdir)/test_refs.cpp SimpleClass.html: $(srcdir)/SimpleClass.java $(PROGNAME) --input $(srcdir)/SimpleClass.java --output SimpleClass.html --doc UsageExample.html: $(srcdir)/UsageExample.java $(PROGNAME) --input $(srcdir)/UsageExample.java --output UsageExample.html --doc Hello1.html: $(srcdir)/Hello.java $(BUILD_HELLO1) Hello2.html: $(srcdir)/Hello.java $(BUILD_HELLO2) Hello3.html: $(srcdir)/Hello.java $(BUILD_HELLO3) Hello4.html: $(srcdir)/Hello.java $(BUILD_HELLO4) Hello5.html: $(srcdir)/Hello.java $(BUILD_HELLO5) Hello.java.html: $(srcdir)/Hello.java $(BUILD_HELLO_HTML) Hello_h_f.html: $(srcdir)/Hello.java header.html footer.html $(BUILD_HELLO_W_HEADER_FOOTER) Hello_lines.html: $(srcdir)/Hello.java $(BUILD_HELLO_LINES) Hello_xhtml.html: $(srcdir)/Hello.java $(BUILD_HELLO_XHTML) Hello_xhtml2.html: $(srcdir)/Hello.java $(BUILD_HELLO_XHTML2) Hello_notfixed.html: $(srcdir)/Hello.java $(BUILD_HELLO_HTMLNOTFIXED) style_examples.html: $(srcdir)/Hello.java cat $(srcdir)/style_examples_header.html > style_examples.html #./gen_style_example.sh default.css >> style_examples.html for style in $(CSS_FILES); do \ ./gen_style_example.sh $$style >> style_examples.html ; \ done ; \ cat $(srcdir)/style_examples_footer.html >> style_examples.html check: $(BUILD_HELLO1) $(BUILD_HELLO2) $(BUILD_HELLO3) $(BUILD_HELLO4) $(BUILD_HELLO5) $(BUILD_HELLO_HTML) $(BUILD_HELLO_W_HEADER_FOOTER) $(BUILD_HELLO_LINES) $(BUILD_HELLO_XHTML) $(BUILD_HELLO_XHTML2) $(BUILD_HELLO_HTMLNOTFIXED) HTML_GENERATED_FILES = Hello1.html Hello2.html Hello3.html Hello4.html \ Hello5.html Hello.java.html Hello_h_f.html source-highlight.cc.html \ cmdline.h.html Hello_lines.html Hello_xhtml.html Hello_xhtml2.html \ flex_scanner.ll.html SimpleClass.html \ UsageExample.html Hello_notfixed.html \ style_examples.html html-clean: rm -f $(HTML_GENERATED_FILES) texinfo-clean: rm -f $(GENERATEDINFOS) $(EXAMPLEINFOS) DISTCLEANFILES = $(HTML_GENERATED_FILES) langdef.lang.html MAINTAINERCLEANFILES = $(GENERATEDINFOS) tags ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/txt2texinfo.txt����������������������������������������������������������0000644�0001750�0001750�00000000503�11672675562�015532� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������For instance, in this Texinfo manual, if I want to insert a @@ or a @{ I have to ``escape'' them to make them appear literally since they have a special meaning in Texinfo. The same holds, e.g., for @code{<}, @code{>} or @code{&} in HTML. If you use source-highlight, it will take care of this, automatically for you.���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/source-highlight-settings.1����������������������������������������������0000644�0001750�0001750�00000003133�11672675562�017662� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������.TH SOURCE-HIGHLIGHT-SETTINGS "1" "May 2009" "Source-highlight-settings" "User Commands" .SH NAME Source-highlight-settings \- utility that can be used to write a configuration file for GNU Source\-highlight (and its library) .SH SYNOPSIS .B source-highlight-settings .SH DESCRIPTION Since version 3.0, GNU Source\-highlight includes also the utility source\-highlight\-settings, which can be used to check whether source\-highlight will be able to find its language definition files, and other configuration files, and in case, to store the correct settings in a configuration file, in the user home directory. .PP In particular, the stored configuration file will be called source\-highlight.conf and will be stored in $HOME/.source\-highlight/. .PP For the moment, this file only stores the default value for the \-\-data\-dir option. .PP This utility is part of GNU Source-highlight, maintained by: .br Lorenzo Bettini <http://www.lorenzobettini.it> .SH "REPORTING BUGS" Report bugs to <bug\-source\-highlight at gnu.org> .SH COPYRIGHT Copyright \(co 1999-2009 Lorenzo Bettini <http://www.lorenzobettini.it> This program comes with ABSOLUTELY NO WARRANTY. .br This is free software; you may redistribute copies of the program under the terms of the GNU General Public License. For more information about these matters, see the file named COPYING. .SH "SEE ALSO" The full documentation for .B source-highlight is maintained as a Texinfo manual. If the .B info and .B source-highlight programs are properly installed at your site, the command .IP .B info source-highlight .PP should give you access to the complete manual. �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/style_examples_footer.html�����������������������������������������������0000644�0001750�0001750�00000000020�11672675562�017767� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������</body> </html> ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/example-n.diff.texinfo���������������������������������������������������0000664�0001750�0001750�00000000436�11675045060�016660� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@c Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite @example diff -rP source-highlight-2.1.1/source-highlight.spec ... @b{9,10c9,10} @i{< Version: 2.1.1} @i{< Release: 2.1.1} --- @i{> Version: 2.1.2} @i{> Release: 2.1.2} @end example����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/styleformatter-main.cpp.texinfo������������������������������������������0000664�0001750�0001750�00000003450�11675045063�020654� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@c Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite @example @b{#include} @t{<iostream>} @b{#include} @t{"srchilite/langdefmanager.h"} @b{#include} @t{"srchilite/regexrulefactory.h"} @b{#include} @t{"srchilite/sourcehighlighter.h"} @b{#include} @t{"srchilite/formattermanager.h"} @b{#include} @t{"srchilite/stylefileparser.h"} @r{@i{// for parsing style files}} @b{#include} @t{"styleformatterfactory.h"} @b{using} @b{namespace} std; @b{#ifndef} DATADIR @b{#define} DATADIR @t{""} @b{#endif} @b{int} main() @{ srchilite::RegexRuleFactory ruleFactory; srchilite::LangDefManager langDefManager(&ruleFactory); @r{@i{// we highlight C++ code for simplicity}} srchilite::SourceHighlighter highlighter(langDefManager.getHighlightState( DATADIR, @t{"cpp.lang"})); @r{@i{// our factory for our formatters}} StyleFormatterFactory factory; @r{@i{// the background color for the document (not used here)}} string docBgColor; @r{@i{// let's parse the default.style and create our formatters}} srchilite::StyleFileParser::parseStyleFile(DATADIR, @t{"default.style"}, &factory, docBgColor); @r{@i{// now we need to fill up the formatter manager with our formatters}} srchilite::FormatterManager formatterManager(StyleFormatterPtr( @b{new} StyleFormatter)); @b{for} (StyleFormatterMap::const_iterator it = factory.formatterMap.begin(); it != factory.formatterMap.end(); ++it) @{ formatterManager.addFormatter(it->first, it->second); @} highlighter.setFormatterManager(&formatterManager); string line; @r{@i{// we now highlight a line a time}} @b{while} (getline(cin, line)) @{ highlighter.highlightParagraph(line); @} @b{return} 0; @} @end example������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/sh_vim-dark.css����������������������������������������������������������0000644�0001750�0001750�00000001405�11672675562�015413� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������body { background-color: #000000; color: #ffffff; font-weight: normal; font-style: normal; } .keyword { color: #B26818; font-weight: normal; font-style: normal; } .type { color: #00ff00; font-weight: normal; font-style: normal; } .string { color: #ff0000; font-weight: normal; font-style: normal; } .specialchar { color: #ff22ff; font-weight: normal; font-style: normal; } .comment { color: #0000ff; font-weight: normal; font-style: normal; } .number { color: #ff0000; font-weight: normal; font-style: normal; } .preproc { color: #ff22ff; font-weight: normal; font-style: normal; } .function { color: #ffffff; font-weight: normal; font-style: normal; } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/lang-list.texinfo��������������������������������������������������������0000664�0001750�0001750�00000005231�11675045056�015760� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������C = cpp.lang H = cpp.lang ac = m4.lang ada = ada.lang adb = ada.lang am = makefile.lang applescript = applescript.lang asm = asm.lang autoconf = m4.lang awk = awk.lang bash = sh.lang bat = bat.lang batch = bat.lang bib = bib.lang bison = bison.lang c = c.lang caml = caml.lang cbl = cobol.lang cc = cpp.lang changelog = changelog.lang clipper = clipper.lang cls = latex.lang cobol = cobol.lang conf = conf.lang cpp = cpp.lang cs = csharp.lang csh = sh.lang csharp = csharp.lang css = css.lang ctp = php.lang d = d.lang desktop = desktop.lang diff = diff.lang dmd = d.lang docbook = xml.lang dtx = latex.lang el = lisp.lang eps = postscript.lang erl = erlang.lang erlang = erlang.lang errors = errors.lang fixed-fortran = fixed-fortran.lang flex = flex.lang fortran = fortran.lang free-fortran = fortran.lang glsl = glsl.lang h = cpp.lang haskell = haskell.lang haxe = haxe.lang hh = cpp.lang hpp = cpp.lang hs = haskell.lang htm = html.lang html = html.lang hx = haxe.lang in = makefile.lang ini = desktop.lang java = java.lang javalog = javalog.lang javascript = javascript.lang js = javascript.lang kcfg = xml.lang kdevelop = xml.lang kidl = xml.lang ksh = sh.lang l = flex.lang lang = langdef.lang langdef = langdef.lang latex = latex.lang ldap = ldap.lang ldif = ldap.lang lex = flex.lang lgt = logtalk.lang lhs = haskell_literate.lang lisp = lisp.lang ll = flex.lang log = log.lang logtalk = logtalk.lang lsm = lsm.lang lua = lua.lang m4 = m4.lang makefile = makefile.lang manifest = manifest.lang mf = manifest.lang ml = caml.lang mli = caml.lang moc = cpp.lang opa = opa.lang outlang = outlang.lang oz = oz.lang pas = pascal.lang pascal = pascal.lang patch = diff.lang pc = pc.lang perl = perl.lang php = php.lang php3 = php.lang php4 = php.lang php5 = php.lang pkgconfig = pc.lang pl = prolog.lang pm = perl.lang po = po.lang postscript = postscript.lang pot = po.lang prg = clipper.lang prolog = prolog.lang properties = properties.lang proto = proto.lang protobuf = proto.lang ps = postscript.lang py = python.lang python = python.lang rb = ruby.lang rc = xml.lang ruby = ruby.lang s = asm.lang scala = scala.lang scheme = scheme.lang scm = scheme.lang scpt = applescript.lang sh = sh.lang shell = sh.lang sig = sml.lang sl = slang.lang slang = slang.lang slsh = slang.lang sml = sml.lang spec = spec.lang sql = sql.lang sty = latex.lang style = style.lang syslog = log.lang tcl = tcl.lang tcsh = sh.lang tex = latex.lang texi = texinfo.lang texinfo = texinfo.lang tk = tcl.lang tml = tml.lang txt = nohilite.lang ui = xml.lang upc = upc.lang vala = vala.lang vbs = vbscript.lang vbscript = vbscript.lang xhtml = xml.lang xml = xml.lang xorg = xorg.lang y = bison.lang yacc = bison.lang yy = bison.lang �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/test_extreme_comment_2.texinfo�������������������������������������������0000664�0001750�0001750�00000001210�11675045061�020526� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@c Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite @example @r{@i{// test special #if 0 treatment}} @b{int} main() @{ @r{@i{#if 0 // equivalent to a comment}} @r{@i{ int i = 10;}} @r{@i{ printf("this should never be executed\n");}} @r{@i{# ifdef FOO}} @r{@i{ printf("foo\n");}} @r{@i{# ifndef BAR}} @r{@i{ printf("no bar\n");}} @r{@i{# else}} @r{@i{# endif}} @r{@i{# else}} @r{@i{ printf("no foo\n");}} @r{@i{# endif // FOO}} @r{@i{ return 1;}} @r{@i{#else}} printf(@t{"Hello world!}\n@t{"}); @b{return} 0; @b{#endif} printf(@t{"never reach here!}\n@t{"}); @} @end example����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/doc/sh_vampire.css�����������������������������������������������������������0000644�0001750�0001750�00000001647�11672675562�015354� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������body { background-color: #000000; color: #ff0000; font-weight: normal; font-style: normal; } .keyword { color: #ffffff; font-weight: bold; font-style: normal; } .type { color: #F35E1E; font-weight: bold; font-style: normal; } .string { color: #bb00ff; font-weight: normal; font-style: normal; } .specialchar { color: #ffffff; font-weight: normal; font-style: normal; } .comment { color: #ababab; font-weight: normal; font-style: italic; } .number { color: #bb00ff; font-weight: normal; font-style: normal; } .preproc { color: #ababab; font-weight: normal; font-style: normal; } .symbol { color: #F3E651; font-weight: normal; font-style: normal; } .function { color: #7bc710; font-weight: normal; font-style: normal; } .cbracket { color: #F3E651; font-weight: normal; font-style: normal; } �����������������������������������������������������������������������������������������source-highlight-3.1.6/doc/debuglistener.cpp.texinfo������������������������������������������������0000664�0001750�0001750�00000003026�11675045063�017501� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������@c Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite @example @b{void} DebugListener::notify(@b{const} HighlightEvent &event) @{ @b{switch} (event.type) @{ @b{case} HighlightEvent::FORMAT: @r{@i{// print information about the rule}} @b{if} (event.token.rule) @{ os << event.token.rule->getAdditionalInfo() << endl; os << @t{"expression: }\"@t{"} << event.token.rule->toString() << @t{"}\"@t{"} << endl; @} @r{@i{// now format the matched strings}} @b{for} (MatchedElements::const_iterator it = event.token.matched.begin(); it != event.token.matched.end(); ++it) @{ os << @t{"formatting }\"@t{"} << it->second << @t{"}\"@t{ as "} << it->first << endl; @} step(); @b{break}; @b{case} HighlightEvent::FORMATDEFAULT: os << @t{"formatting }\"@t{"} << event.token.matched.front().second << @t{"}\"@t{ as default"} << endl; step(); @b{break}; @b{case} HighlightEvent::ENTERSTATE: os << @t{"entering state: "} << event.token.rule->getNextState()->getId() << endl; @b{break}; @b{case} HighlightEvent::EXITSTATE: @b{int} level = event.token.rule->getExitLevel(); os << @t{"exiting state, level: "}; @b{if} (level < 0) os << @t{"all"}; @b{else} os << level; os << endl; @b{break}; @} @} @end example����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/NEWS�������������������������������������������������������������������������0000644�0001750�0001750�00000051263�11676047503�012426� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight -- History of visible changes. Copyright (C) 1999-2011 Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite See the end for copying conditions. Please send source-highlight bug reports to bug-source-highlight at gnu.org Version 3.1.6 * language definition file for T/Foswiki TML markup (thanks to Paul W. Harvey) * new output format: ODF (e.g. for LibreOffice or to generate ODF color-highlighted snippets to be used by ODF back-ends, like asciidoc-odf). Thanks to Dag Wieers. * new output format: MediaWiki thanks to Abe Skolnik Version 3.1.5 * boost m4 macro finds boost in lib64 * boost m4 macro files are not installed * updated php lang definition with new php 5 keywords * language definition for Scheme (thanks to Orlando Hill) * language definition for Po files (thanks to Mikel Olasagasti) * language definition for Opa (thanks to Valentin Gatien-Baron) * language definition for Javalog (thanks to Mark Silberbauer) * language definition for UPC (thanks to Viraj Sinha) * fixed a bug in scala.lang dealing with keywords * updated sql.lang (thanks to Xavier-Emmanuel Vincent) * Emacs lisp files highlighted as Lisp (thanks to Xavier-Emmanuel Vincent) * improved logtalk.lang (thanks to Paulo Moura) * embed inputlang in the output file (thanks to Masatake Yamato) * highlight _ in variable declarations (thanks to Masatake Yamato) * correctly highlight for less when filenames contain spaces Version 3.1.4 * fixed compilation problems for Sun CC * php handles embedded html * html handles embedded css and javascript * Google's Protocol Buffers language definition added (thanks to Joel Smith) * CakePhp template files highlighted as php * haskell literate programming highlighting * vala language definition (thanks to Luca Bruno) * lisp language definition (thanks to Michael McDermott) Version 3.1.3 * --tab option is correcly handled * install script with the executable bit * bash is highlighted Version 3.1.2 * infer language for files starting with <? and <!doctype * language definition for manifest files, asm, applescript, vbscript, awk, bat, clipper, cobol, D, Erlang * lang def file for compiler output errors * style for label and path * label element recognized in C/C++ * qmake based build system available * searches for home directory also on windows * improved logtalk.lang * improved email regular expression in url.lang Version 3.1.1 * access to static global LangDefManager, LangMaps is provided through the class Instances * mechanism for setting a global data dir value (e.g., to ensure consistency in a library) and for checking settings * library utility functions to retrieve .lang and .outlang files * fixed default output format to "html.outlang" not "html.lang" * SourceHighlight class return the output file extension * the background color for the document is kept empty if it is not specified in the style file * SourceHighlight.setLineNumberDigits: to explicitly set the number of digits for line numbers * utils.h file is installed in the header directory * white is a standard color in style files * language definition file for Texinfo * language definition file for Haskell (thanks to Sergey Astanin) Version 3.1 * library utility functions to retrieve .style and .css files * fixed library manual link in index.html * doxyfile is now distributed * better formatting for < and > in latex output * doxygen documentation can be built even when building in a separate directory * added man page for source-highlight-settings * language definition for Oz, thanks to David Bremners Version 3.0 * provides a library for highlighting that can be used by other programs. * --regex-range (highlight only specified lines of an input file, according to specific regular expressions describing the delimiting lines). * deal with HTML5 features (thanks to Simon Pieters) * use --docdir for documentation directory * --binary-output command line option to write output files in binary mode * Added the program source-highlight-settings to write a configuration file for source-highlight (and its library) in the user home directory. * languange definition for generic configuration files * languange definition for pkg-config files * the input language is now discovered also using the whole file name (besides the file extension if any) * in .lang files one can specify the exit level Version 2.11.1 * fixed an installation bug in non-root mode (thanks to Britton Kerin) * fortran.lang improved with new keywords from Fortran 90 through Fortran 2003 (thanks to Jason Blevins) * javascript.lang improved (thanks to gnombat) * added keywords to caml language definition * Ada language definition file (thanks to Reto Buerki) * lang and outlang files can also be downloaded independently from the source-highlight site Version 2.11 * optimized the procedure for finding the best matching expression * improved boost regex library search in configure script * fixed regexp element in javascript lang definition * highlight types used in variable/parameter declarations in C++ and Java * fixed language def files for properties and desktop files * newline chars can be inserted (and ignored) in regular expression specifications * --line-range (highlight only specified lines of an input file, --range-context to specify the number of surrounding context lines, --range-separator the separator line between ranges) * language definition for Xorg configuration files * language definition for Scala (thanks to Dean Wampler) * bash completion file for source-highlight (thanks to Tiziano Muller) Version 2.10 * formatting is applied even when generating anchors and references * noref is handled also for output languages using onestyle (e.g., xhtml) * improved fortran highlighting * improved python highlighting * fixed title in docbook output * language definition for ldap files (e.g., ldiff files) * language definition for autoconf files * improved m4 language definition * improved logtalk language definition * url.lang handles ~ in urls * language definition for glsl.lang (provided by Cesare Tirabassi) Version 2.9 * language definition for C (not C++) files * language definition for properties files * language definition for KDE desktop and ini files * language definition for lsm files (Linux Software Map) * language definition for rpm spec files * language definition for Haxe files (thanks to Jos Hirth) * style.defaults for associating a style for an element (whose style is not specified) to the style of another element * highlight some KDE programming files (e.g., .rc, .kcfg, etc.) * correctly highlight for less when filenames contain paths * fixed a bug in file inclusion of langdef files * fixed compilation problems for fileutil.cc (thanks to Adrian Reber) * xml elements are correctly recognized when containing . (thanks to Toby White) * references for xhtml output files Version 2.8 * lang definition for slang (by John E. Davis) * correctly handle words in ' and ` regular expression strings * the right delimiter of a delim element can refer to marked subexpressions in the left delimiter * fixed the definition of C-style comments which are not nested * improved perl syntax highlighting * javascript regular expression highlighting * padding character for line numbers can be specified (thanks to Roger Nilsson) * removed non standard % make rules Version 2.7 * fixed language association for log files. * use standard sed arguments * check that the ctags program supports the options used by source-highlight and disable ctags tests if it does not * removed some memory leaks from scanners and parsers * fixed regular expression highlighting strings in perl (thanks to Elias Pipping) * regexp language element * infer script languages also checking for the env specification * improved error reporting for lang definition files * ` ` syntax for regular expressions that permits backreferences and conditionals * explicit naming for subexpressions syntax * added a program, check-regexp, for checking regular expressions on the command line * fix html tag definitions * fix ruby regexp definition * --doc option and references for docbook output * xhtml output with non fixed font Version 2.6 * language definition for makefiles * language definition for css files * language definition for m4 files * fixed some problems in xml.lang * fixed some problems in sh.lang * the ctags found during configure is correctly used in makefiles * --quiet option showing no progress information (thanks to C. Michael Pilato) * handle direct color specifications in double quotes in style files * in style files can specify formatting options for more than one element on the same line * accept css specifications as style specifications (limited support) * handle background color for some output formats (e.g., xhtml) * in style files the background color (for the entire output) can be specified * fixed a problem in configure script on some BSD systems (thanks to Thomas Klausner) Version 2.5 * fixed lang.map for php files * fixed url.lang * --debug-langdef can be interactive * nohilite.lang that does not perform any highlighting, but only formats the input file into the output format (dealing with output format special characters) * default.lang to which source-highlight falls back when no input language is specified or available * infer script languages * --header and --footer options do not require --doc option * --statistics print elapsed time * highlight cls, dtx and sty LaTeX files * language definition for Tcl * language definition for Sql * language definition for bibtex * infer language of script files Version 2.4 * language definition for C# (thanks to Hemmi Shigeru) * language definition for XML (thanks to Andy Buckley) * language definition for shell scripts (thanks to Dirk Jagdmann) * fixed language definition for HTML (tags with numbers are highlighted, e.g., <h1>) * updated language definition for logtalk (thanks to Paulo Moura) * produces the list of elements of a language definition file (--show-lang-elements) * output format definition for HTML where fonts by default are not fixed width. * bug fix in url regular expressions * bug fix with nonsensitive keywords (thanks to Andrea Ercolino) * improved documentation concerning installation of Boost regex library Version 2.3 * the regex automaton is printed on the standard output (instead of the standard error) * language definition for postscript * DocBook output format * fixed bug in .map files with \r characters * fixed expression for email Version 2.2 * fixed a bug that sigsegv when more than one input file is provided * fixed a compilation error with gcc 4.0 * generate references using ctags * fixed a bug with LaTeX output of " with some inputencs and with latexcolor * handle direct color specifications independently from HTML * fixed conversion of hexadecimal characters in output language definitions * fixed compilation error with regex 1.33 * include man page * language definition for diff output * fixed bugs in generation of the regular expression automaton * extended documentation with some tutorials on input language definitions * generate more compact output (reduced size) * in LaTeX output longtable is not used anymore Version 2.1 * Included obsolete man page. * output language format specifications are read at run-time so that new output languages can be easily added dynamically (without recompiling the sources) by using a simple syntax. * "fixed" and "notfixed" styles can be specified. * fixed the handling of end-of-line (processed only once) * LaTeX output * TeXinfo output * debug of a language definition * tags.j2h files are now called style files. * renamed --tags-file option in --style-file * allows to specify a prefix for the generated line number anchors * --header and --footer do not imply --doc * language definition for LogTalk (thanks to Paulo Moura) and LaTeX Version 2.0 * Language specifications are read at run-time, so that new languages can be easily added dynamically (without recompiling the sources) by using a simple syntax. * "nonsensitive" for simple definitions * cgi version not built automatically * failsafe option to simply output the input file when no language definition is found * functionalities with less improved. Version 1.11.1 * fixed compilations problems on some Unix compilers Version 1.11 * errors in tags error files are reported more correctly and make the program exit * more tag options added * "linenum" tag for specifying the style of line numbers Version 1.10 * Added scanner for log files (also for iptables and apache logs) thanks to Jan Tatarik * Fixed some bugs in the perl scanner (thanks to Geir Nilsen) * configure checks for ios_base * check for the right ar to use, fixes problems under Sun compilers (thanks to Paul Townsend) Version 1.9 * --no-doc option added to cancel the --doc option even if it is implied (e.g., when css is given) (as suggested by Keith Lea and Grant McLean) * deal with \r correctly * added scanner for language LUA (thanks to Marc Cote') * added scanner for CAML and SML (with the help of Jean-Baptiste Rouquier and James Riely) * fixed a bug in C++ scanner concerning tabs after # (reported by Don Stauffer). * If not specified, the source language will be guessed from the input file extension. * Added src-hilite-lesspipe.sh a script that can be used with less in order to higlight the files processed with less (suggested by Konstantine Serebriany) * fixed a bug in perl scanning when \" is used in regular expressions (reported by Geir Nilsen) * html attribute values are generated in quotes (bug fixed by Patrick Wagstrom) * can generate anchors for line numbers (thanks to Oliver Fischer) Version 1.8 * scanner for Javascript * new output format: ESC ascii code (e.g. for less, with the help of Konstantine Serebriany). * tab character are correctly handled by --tab option is given (thanks to Don Stauffer). * presence of getopt_long is handled in a cleaner way. * some changes in how changelog files are highlighted * =head =cut sections in perl sources are correctly handled (reported by Grant McLean) * added Java keywords true and false Version 1.7 * scanner for Ruby programming language (thanks to Noritsugu Nakamura). * fixed explicit rules in Makefiles that generated errors with some versions of non-GNU makes. Version 1.6.3 * Fixed problems in compilation in systems that do not provide getopt_long and yywrap (reported by Jackie Goodwin). * Added .spec file for generating .rpm and .rpm.src (thanks to Christian W. Zuckschwerdt). Version 1.6.2 * compliant to C++ standard headers (iostream etc.), no more backward compatibility warnings with gcc 3.2 (Thanks to Maurizio Loreti for the report). Version 1.6.1 * fixed a bug in the configure phase that used to make the compilation fail with compilers not providing the function getop_long (reported by Horacio Montenegro). Version 1.6 * scanners for flex and ChangeLog added by John Millaway * default to stdout when no --output is given along with the -i option and when --output="STDOUT" (as suggested by Hugh S. Myers) * fixed a problem with string comments in Python scanner * a separate executable is built, source-highlight-cgi, that can be used as a CGI program Version 1.5.1 * xhtml doctype generated correctly (thanks to Christian W. Zuckschwerdt and Josh Ghiloni) reported by Martin Gebert * Anonymous CVS Access is now available http://savannah.gnu.org/projects/src-highlite Version 1.5 * xhtml output format is now handled (thanks to Christian W. Zuckschwerdt and Josh Ghiloni) * assert is now recognized as a Java keyword (thanks to Fabio Calefato) * a scanner for Python has been written by Martin Gebert. * when in Php3 strings can span more than one lines and line numbers are correctly formatted. Version 1.4 * fixed compilation error with some compilers due to headers istream.h and ostream.h (thanks to Dan barthel) * a scanner for Php3 has been written by Alain Barbet. * reading from stdin does not kill line numbers (notified by Keith Robertson) * line number count is correctly reset when handling multiple files (bug fixed) * for Java sources, if, while, and other keywords that use '(' ')' are now correctly highlighted as keywords instead of as functions (reported by Manuel Kauers and Fabio Calefato) * tabs are correctly handled for Prolog and Perl sources (reported by Martin Gebert) Version 1.3 * now there is only one program, namely source-highlight, that accepts a command line option, --src-lang or -s, specifying the source language (for the moment java, cpp and prolog). Previous programs, java2html and cpp2html are provided as shell scripts, just for compatibility, but their use is not advised. * --out-format, -f, command line option added for specifying the output format (for the moment only html is accepted). Though only html is handled, this option is required. * a scanner for Prolog has been written by Martin Gebert. This scanner is still to be considered beta, and actually it was written for Visual Prolog, so it should be tested against other Prolog dialects. * a scanner for Perl has been written by Alain Barbet. * Correctly check whether it is possible to write to a file (notified by Martin) * --tab option is correctly handled even for C/C++ files (bug fixed, notified by Martin) * Added option --line-number (-n) in order to print line numbers (as suggested by Ed Scott and Andre Charbonneau). * Man page added. Version 1.2.1 * Fixed a problem of compilation for gcc 3.0 (thanks to Alexios Zavras and Bruno Schweizer) * much more recent versions of getopt.h, getopt.c, getopt1.c are provided (the previous ones were very very old!), that do not rely on alloca anymore. Version 1.2 * Added normal text decoration (specify "normal" in tags.j2h) (suggested by Bernie Boudet). * fixed a bug for multiple input files (notified by Christian Paulsen) Version 1.1 * Included some standard headers; otherwise gcc 2.96 didn't compile (thanks to Arto Viitanen). * fixed bug (seg.fault) with foreign character (thanks to Martin Gebert). * --output-dir added to specify the output directory. * --enable-input-chroot configure option to hardcode the path to prepend for input files (useful when the programs are built for CGI, as suggested by Robert Wetzel). Version 1.0 * This is the first release of source-highlight, but it includes already existing programs (cpp2html and java2html), so the changes are related to these programs. * CGI support enabled (thanks to Robert Wetzel); I haven't tested it personally yet, so you may ask him directly. * newline handled correctly according to HTML specifications (again thanks to Robert Wetzel). * Added preprocessor highlighting [preproc], symbol (+,-,^, etc.) highlighting [symbol], curly bracket highlighting [cbracket], function highlighting [function] (thanks to Geurt Vos). * for tags.j2h, added support to enter direct RGB color values (#rrggbb) and colors teal, gray, and darkblue added (thanks to Geurt Vos). * green, darkgreen and brightgreen handled correctly (thanks to Martin Gebert). ------------------------------------------------------- Copying information: Copyright (C) 1999-2008 Lorenzo Bettini Lorenzo Bettini http://www.lorenzobettini.it Permission is granted to anyone to make or distribute verbatim copies of this document as received, in any medium, provided that the copyright notice and this permission notice are preserved, thus giving the recipient permission to redistribute in turn. Permission is granted to distribute modified versions of this document, or of portions of it, under the above conditions, provided also that they carry prominent notices stating who last changed them. ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/gl/��������������������������������������������������������������������������0000775�0001750�0001750�00000000000�11676051670�012404� 5����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/gl/unistd.in.h���������������������������������������������������������������0000664�0001750�0001750�00000143526�11672675562�014433� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Substitute for and wrapper around <unistd.h>. Copyright (C) 2003-2011 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ /* Special invocation convention: - On mingw, several headers, including <winsock2.h>, include <unistd.h>, but we need to ensure that both the system <unistd.h> and <winsock2.h> are completely included before we replace gethostname. */ #if @GNULIB_GETHOSTNAME@ && @UNISTD_H_HAVE_WINSOCK2_H@ \ && !defined _GL_WINSOCK2_H_WITNESS && defined _WINSOCK2_H /* <unistd.h> is being indirectly included for the first time from <winsock2.h>; avoid declaring any overrides. */ # if @HAVE_UNISTD_H@ # @INCLUDE_NEXT@ @NEXT_UNISTD_H@ # else # error unexpected; report this to bug-gnulib@gnu.org # endif # define _GL_WINSOCK2_H_WITNESS /* Normal invocation. */ #elif !defined _@GUARD_PREFIX@_UNISTD_H /* The include_next requires a split double-inclusion guard. */ #if @HAVE_UNISTD_H@ # @INCLUDE_NEXT@ @NEXT_UNISTD_H@ #endif /* Get all possible declarations of gethostname(). */ #if @GNULIB_GETHOSTNAME@ && @UNISTD_H_HAVE_WINSOCK2_H@ \ && !defined _GL_INCLUDING_WINSOCK2_H # define _GL_INCLUDING_WINSOCK2_H # include <winsock2.h> # undef _GL_INCLUDING_WINSOCK2_H #endif #if !defined _@GUARD_PREFIX@_UNISTD_H && !defined _GL_INCLUDING_WINSOCK2_H #define _@GUARD_PREFIX@_UNISTD_H /* NetBSD 5.0 mis-defines NULL. Also get size_t. */ #include <stddef.h> /* mingw doesn't define the SEEK_* or *_FILENO macros in <unistd.h>. */ /* Cygwin 1.7.1 declares symlinkat in <stdio.h>, not in <unistd.h>. */ /* But avoid namespace pollution on glibc systems. */ #if (!(defined SEEK_CUR && defined SEEK_END && defined SEEK_SET) \ || ((@GNULIB_SYMLINKAT@ || defined GNULIB_POSIXCHECK) \ && defined __CYGWIN__)) \ && ! defined __GLIBC__ # include <stdio.h> #endif /* Cygwin 1.7.1 declares unlinkat in <fcntl.h>, not in <unistd.h>. */ /* But avoid namespace pollution on glibc systems. */ #if (@GNULIB_UNLINKAT@ || defined GNULIB_POSIXCHECK) && defined __CYGWIN__ \ && ! defined __GLIBC__ # include <fcntl.h> #endif /* mingw fails to declare _exit in <unistd.h>. */ /* mingw, MSVC, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */ /* Solaris declares getcwd not only in <unistd.h> but also in <stdlib.h>. */ /* But avoid namespace pollution on glibc systems. */ #ifndef __GLIBC__ # include <stdlib.h> #endif /* Native Windows platforms declare chdir, getcwd, rmdir in <io.h> and/or <direct.h>, not in <unistd.h>. */ #if ((@GNULIB_CHDIR@ || @GNULIB_GETCWD@ || @GNULIB_RMDIR@ \ || defined GNULIB_POSIXCHECK) \ && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)) # include <io.h> /* mingw32, mingw64 */ # include <direct.h> /* mingw64, MSVC 9 */ #endif /* AIX and OSF/1 5.1 declare getdomainname in <netdb.h>, not in <unistd.h>. NonStop Kernel declares gethostname in <netdb.h>, not in <unistd.h>. */ /* But avoid namespace pollution on glibc systems. */ #if ((@GNULIB_GETDOMAINNAME@ && (defined _AIX || defined __osf__)) \ || (@GNULIB_GETHOSTNAME@ && defined __TANDEM)) \ && !defined __GLIBC__ # include <netdb.h> #endif /* MSVC defines off_t in <sys/types.h>. */ #if !@HAVE_UNISTD_H@ /* Get off_t. */ # include <sys/types.h> #endif #if (@GNULIB_READ@ || @GNULIB_WRITE@ \ || @GNULIB_READLINK@ || @GNULIB_READLINKAT@ \ || @GNULIB_PREAD@ || @GNULIB_PWRITE@ || defined GNULIB_POSIXCHECK) /* Get ssize_t. */ # include <sys/types.h> #endif /* Get getopt(), optarg, optind, opterr, optopt. But avoid namespace pollution on glibc systems. */ #if @GNULIB_UNISTD_H_GETOPT@ && !defined __GLIBC__ && !defined _GL_SYSTEM_GETOPT # include <getopt.h> #endif /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ /* Hide some function declarations from <winsock2.h>. */ #if @GNULIB_GETHOSTNAME@ && @UNISTD_H_HAVE_WINSOCK2_H@ # if !defined _@GUARD_PREFIX@_SYS_SOCKET_H # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef socket # define socket socket_used_without_including_sys_socket_h # undef connect # define connect connect_used_without_including_sys_socket_h # undef accept # define accept accept_used_without_including_sys_socket_h # undef bind # define bind bind_used_without_including_sys_socket_h # undef getpeername # define getpeername getpeername_used_without_including_sys_socket_h # undef getsockname # define getsockname getsockname_used_without_including_sys_socket_h # undef getsockopt # define getsockopt getsockopt_used_without_including_sys_socket_h # undef listen # define listen listen_used_without_including_sys_socket_h # undef recv # define recv recv_used_without_including_sys_socket_h # undef send # define send send_used_without_including_sys_socket_h # undef recvfrom # define recvfrom recvfrom_used_without_including_sys_socket_h # undef sendto # define sendto sendto_used_without_including_sys_socket_h # undef setsockopt # define setsockopt setsockopt_used_without_including_sys_socket_h # undef shutdown # define shutdown shutdown_used_without_including_sys_socket_h # else _GL_WARN_ON_USE (socket, "socket() used without including <sys/socket.h>"); _GL_WARN_ON_USE (connect, "connect() used without including <sys/socket.h>"); _GL_WARN_ON_USE (accept, "accept() used without including <sys/socket.h>"); _GL_WARN_ON_USE (bind, "bind() used without including <sys/socket.h>"); _GL_WARN_ON_USE (getpeername, "getpeername() used without including <sys/socket.h>"); _GL_WARN_ON_USE (getsockname, "getsockname() used without including <sys/socket.h>"); _GL_WARN_ON_USE (getsockopt, "getsockopt() used without including <sys/socket.h>"); _GL_WARN_ON_USE (listen, "listen() used without including <sys/socket.h>"); _GL_WARN_ON_USE (recv, "recv() used without including <sys/socket.h>"); _GL_WARN_ON_USE (send, "send() used without including <sys/socket.h>"); _GL_WARN_ON_USE (recvfrom, "recvfrom() used without including <sys/socket.h>"); _GL_WARN_ON_USE (sendto, "sendto() used without including <sys/socket.h>"); _GL_WARN_ON_USE (setsockopt, "setsockopt() used without including <sys/socket.h>"); _GL_WARN_ON_USE (shutdown, "shutdown() used without including <sys/socket.h>"); # endif # endif # if !defined _@GUARD_PREFIX@_SYS_SELECT_H # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef select # define select select_used_without_including_sys_select_h # else _GL_WARN_ON_USE (select, "select() used without including <sys/select.h>"); # endif # endif #endif /* OS/2 EMX lacks these macros. */ #ifndef STDIN_FILENO # define STDIN_FILENO 0 #endif #ifndef STDOUT_FILENO # define STDOUT_FILENO 1 #endif #ifndef STDERR_FILENO # define STDERR_FILENO 2 #endif /* Ensure *_OK macros exist. */ #ifndef F_OK # define F_OK 0 # define X_OK 1 # define W_OK 2 # define R_OK 4 #endif /* Declare overridden functions. */ #if defined GNULIB_POSIXCHECK /* The access() function is a security risk. */ _GL_WARN_ON_USE (access, "the access function is a security risk - " "use the gnulib module faccessat instead"); #endif #if @GNULIB_CHDIR@ _GL_CXXALIAS_SYS (chdir, int, (const char *file) _GL_ARG_NONNULL ((1))); _GL_CXXALIASWARN (chdir); #elif defined GNULIB_POSIXCHECK # undef chdir # if HAVE_RAW_DECL_CHDIR _GL_WARN_ON_USE (chown, "chdir is not always in <unistd.h> - " "use gnulib module chdir for portability"); # endif #endif #if @GNULIB_CHOWN@ /* Change the owner of FILE to UID (if UID is not -1) and the group of FILE to GID (if GID is not -1). Follow symbolic links. Return 0 if successful, otherwise -1 and errno set. See the POSIX:2008 specification <http://pubs.opengroup.org/onlinepubs/9699919799/functions/chown.html. */ # if @REPLACE_CHOWN@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef chown # define chown rpl_chown # endif _GL_FUNCDECL_RPL (chown, int, (const char *file, uid_t uid, gid_t gid) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (chown, int, (const char *file, uid_t uid, gid_t gid)); # else # if !@HAVE_CHOWN@ _GL_FUNCDECL_SYS (chown, int, (const char *file, uid_t uid, gid_t gid) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (chown, int, (const char *file, uid_t uid, gid_t gid)); # endif _GL_CXXALIASWARN (chown); #elif defined GNULIB_POSIXCHECK # undef chown # if HAVE_RAW_DECL_CHOWN _GL_WARN_ON_USE (chown, "chown fails to follow symlinks on some systems and " "doesn't treat a uid or gid of -1 on some systems - " "use gnulib module chown for portability"); # endif #endif #if @GNULIB_CLOSE@ # if @REPLACE_CLOSE@ /* Automatically included by modules that need a replacement for close. */ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef close # define close rpl_close # endif _GL_FUNCDECL_RPL (close, int, (int fd)); _GL_CXXALIAS_RPL (close, int, (int fd)); # else _GL_CXXALIAS_SYS (close, int, (int fd)); # endif _GL_CXXALIASWARN (close); #elif @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ # undef close # define close close_used_without_requesting_gnulib_module_close #elif defined GNULIB_POSIXCHECK # undef close /* Assume close is always declared. */ _GL_WARN_ON_USE (close, "close does not portably work on sockets - " "use gnulib module close for portability"); #endif #if @GNULIB_DUP@ # if @REPLACE_DUP@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define dup rpl_dup # endif _GL_FUNCDECL_RPL (dup, int, (int oldfd)); _GL_CXXALIAS_RPL (dup, int, (int oldfd)); # else _GL_CXXALIAS_SYS (dup, int, (int oldfd)); # endif _GL_CXXALIASWARN (dup); #elif defined GNULIB_POSIXCHECK # undef dup # if HAVE_RAW_DECL_DUP _GL_WARN_ON_USE (dup, "dup is unportable - " "use gnulib module dup for portability"); # endif #endif #if @GNULIB_DUP2@ /* Copy the file descriptor OLDFD into file descriptor NEWFD. Do nothing if NEWFD = OLDFD, otherwise close NEWFD first if it is open. Return newfd if successful, otherwise -1 and errno set. See the POSIX:2008 specification <http://pubs.opengroup.org/onlinepubs/9699919799/functions/dup2.html>. */ # if @REPLACE_DUP2@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define dup2 rpl_dup2 # endif _GL_FUNCDECL_RPL (dup2, int, (int oldfd, int newfd)); _GL_CXXALIAS_RPL (dup2, int, (int oldfd, int newfd)); # else # if !@HAVE_DUP2@ _GL_FUNCDECL_SYS (dup2, int, (int oldfd, int newfd)); # endif _GL_CXXALIAS_SYS (dup2, int, (int oldfd, int newfd)); # endif _GL_CXXALIASWARN (dup2); #elif defined GNULIB_POSIXCHECK # undef dup2 # if HAVE_RAW_DECL_DUP2 _GL_WARN_ON_USE (dup2, "dup2 is unportable - " "use gnulib module dup2 for portability"); # endif #endif #if @GNULIB_DUP3@ /* Copy the file descriptor OLDFD into file descriptor NEWFD, with the specified flags. The flags are a bitmask, possibly including O_CLOEXEC (defined in <fcntl.h>) and O_TEXT, O_BINARY (defined in "binary-io.h"). Close NEWFD first if it is open. Return newfd if successful, otherwise -1 and errno set. See the Linux man page at <http://www.kernel.org/doc/man-pages/online/pages/man2/dup3.2.html>. */ # if @HAVE_DUP3@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define dup3 rpl_dup3 # endif _GL_FUNCDECL_RPL (dup3, int, (int oldfd, int newfd, int flags)); _GL_CXXALIAS_RPL (dup3, int, (int oldfd, int newfd, int flags)); # else _GL_FUNCDECL_SYS (dup3, int, (int oldfd, int newfd, int flags)); _GL_CXXALIAS_SYS (dup3, int, (int oldfd, int newfd, int flags)); # endif _GL_CXXALIASWARN (dup3); #elif defined GNULIB_POSIXCHECK # undef dup3 # if HAVE_RAW_DECL_DUP3 _GL_WARN_ON_USE (dup3, "dup3 is unportable - " "use gnulib module dup3 for portability"); # endif #endif #if @GNULIB_ENVIRON@ # if !@HAVE_DECL_ENVIRON@ /* Set of environment variables and values. An array of strings of the form "VARIABLE=VALUE", terminated with a NULL. */ # if defined __APPLE__ && defined __MACH__ # include <crt_externs.h> # define environ (*_NSGetEnviron ()) # else # ifdef __cplusplus extern "C" { # endif extern char **environ; # ifdef __cplusplus } # endif # endif # endif #elif defined GNULIB_POSIXCHECK # if HAVE_RAW_DECL_ENVIRON static inline char *** rpl_environ (void) { return &environ; } _GL_WARN_ON_USE (rpl_environ, "environ is unportable - " "use gnulib module environ for portability"); # undef environ # define environ (*rpl_environ ()) # endif #endif #if @GNULIB_EUIDACCESS@ /* Like access(), except that it uses the effective user id and group id of the current process. */ # if !@HAVE_EUIDACCESS@ _GL_FUNCDECL_SYS (euidaccess, int, (const char *filename, int mode) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (euidaccess, int, (const char *filename, int mode)); _GL_CXXALIASWARN (euidaccess); # if defined GNULIB_POSIXCHECK /* Like access(), this function is a security risk. */ _GL_WARN_ON_USE (euidaccess, "the euidaccess function is a security risk - " "use the gnulib module faccessat instead"); # endif #elif defined GNULIB_POSIXCHECK # undef euidaccess # if HAVE_RAW_DECL_EUIDACCESS _GL_WARN_ON_USE (euidaccess, "euidaccess is unportable - " "use gnulib module euidaccess for portability"); # endif #endif #if @GNULIB_FACCESSAT@ # if !@HAVE_FACCESSAT@ _GL_FUNCDECL_SYS (faccessat, int, (int fd, char const *file, int mode, int flag) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (faccessat, int, (int fd, char const *file, int mode, int flag)); _GL_CXXALIASWARN (faccessat); #elif defined GNULIB_POSIXCHECK # undef faccessat # if HAVE_RAW_DECL_FACCESSAT _GL_WARN_ON_USE (faccessat, "faccessat is not portable - " "use gnulib module faccessat for portability"); # endif #endif #if @GNULIB_FCHDIR@ /* Change the process' current working directory to the directory on which the given file descriptor is open. Return 0 if successful, otherwise -1 and errno set. See the POSIX:2008 specification <http://pubs.opengroup.org/onlinepubs/9699919799/functions/fchdir.html>. */ # if ! @HAVE_FCHDIR@ _GL_FUNCDECL_SYS (fchdir, int, (int /*fd*/)); /* Gnulib internal hooks needed to maintain the fchdir metadata. */ _GL_EXTERN_C int _gl_register_fd (int fd, const char *filename) _GL_ARG_NONNULL ((2)); _GL_EXTERN_C void _gl_unregister_fd (int fd); _GL_EXTERN_C int _gl_register_dup (int oldfd, int newfd); _GL_EXTERN_C const char *_gl_directory_name (int fd); # else # if !@HAVE_DECL_FCHDIR@ _GL_FUNCDECL_SYS (fchdir, int, (int /*fd*/)); # endif # endif _GL_CXXALIAS_SYS (fchdir, int, (int /*fd*/)); _GL_CXXALIASWARN (fchdir); #elif defined GNULIB_POSIXCHECK # undef fchdir # if HAVE_RAW_DECL_FCHDIR _GL_WARN_ON_USE (fchdir, "fchdir is unportable - " "use gnulib module fchdir for portability"); # endif #endif #if @GNULIB_FCHOWNAT@ # if @REPLACE_FCHOWNAT@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef fchownat # define fchownat rpl_fchownat # endif _GL_FUNCDECL_RPL (fchownat, int, (int fd, char const *file, uid_t owner, gid_t group, int flag) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (fchownat, int, (int fd, char const *file, uid_t owner, gid_t group, int flag)); # else # if !@HAVE_FCHOWNAT@ _GL_FUNCDECL_SYS (fchownat, int, (int fd, char const *file, uid_t owner, gid_t group, int flag) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (fchownat, int, (int fd, char const *file, uid_t owner, gid_t group, int flag)); # endif _GL_CXXALIASWARN (fchownat); #elif defined GNULIB_POSIXCHECK # undef fchownat # if HAVE_RAW_DECL_FCHOWNAT _GL_WARN_ON_USE (fchownat, "fchownat is not portable - " "use gnulib module openat for portability"); # endif #endif #if @GNULIB_FDATASYNC@ /* Synchronize changes to a file. Return 0 if successful, otherwise -1 and errno set. See POSIX:2008 specification <http://pubs.opengroup.org/onlinepubs/9699919799/functions/fdatasync.html>. */ # if !@HAVE_FDATASYNC@ || !@HAVE_DECL_FDATASYNC@ _GL_FUNCDECL_SYS (fdatasync, int, (int fd)); # endif _GL_CXXALIAS_SYS (fdatasync, int, (int fd)); _GL_CXXALIASWARN (fdatasync); #elif defined GNULIB_POSIXCHECK # undef fdatasync # if HAVE_RAW_DECL_FDATASYNC _GL_WARN_ON_USE (fdatasync, "fdatasync is unportable - " "use gnulib module fdatasync for portability"); # endif #endif #if @GNULIB_FSYNC@ /* Synchronize changes, including metadata, to a file. Return 0 if successful, otherwise -1 and errno set. See POSIX:2008 specification <http://pubs.opengroup.org/onlinepubs/9699919799/functions/fsync.html>. */ # if !@HAVE_FSYNC@ _GL_FUNCDECL_SYS (fsync, int, (int fd)); # endif _GL_CXXALIAS_SYS (fsync, int, (int fd)); _GL_CXXALIASWARN (fsync); #elif defined GNULIB_POSIXCHECK # undef fsync # if HAVE_RAW_DECL_FSYNC _GL_WARN_ON_USE (fsync, "fsync is unportable - " "use gnulib module fsync for portability"); # endif #endif #if @GNULIB_FTRUNCATE@ /* Change the size of the file to which FD is opened to become equal to LENGTH. Return 0 if successful, otherwise -1 and errno set. See the POSIX:2008 specification <http://pubs.opengroup.org/onlinepubs/9699919799/functions/ftruncate.html>. */ # if !@HAVE_FTRUNCATE@ _GL_FUNCDECL_SYS (ftruncate, int, (int fd, off_t length)); # endif _GL_CXXALIAS_SYS (ftruncate, int, (int fd, off_t length)); _GL_CXXALIASWARN (ftruncate); #elif defined GNULIB_POSIXCHECK # undef ftruncate # if HAVE_RAW_DECL_FTRUNCATE _GL_WARN_ON_USE (ftruncate, "ftruncate is unportable - " "use gnulib module ftruncate for portability"); # endif #endif #if @GNULIB_GETCWD@ /* Get the name of the current working directory, and put it in SIZE bytes of BUF. Return BUF if successful, or NULL if the directory couldn't be determined or SIZE was too small. See the POSIX:2008 specification <http://pubs.opengroup.org/onlinepubs/9699919799/functions/getcwd.html>. Additionally, the gnulib module 'getcwd' guarantees the following GNU extension: If BUF is NULL, an array is allocated with 'malloc'; the array is SIZE bytes long, unless SIZE == 0, in which case it is as big as necessary. */ # if @REPLACE_GETCWD@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define getcwd rpl_getcwd # endif _GL_FUNCDECL_RPL (getcwd, char *, (char *buf, size_t size)); _GL_CXXALIAS_RPL (getcwd, char *, (char *buf, size_t size)); # else /* Need to cast, because on mingw, the second parameter is int size. */ _GL_CXXALIAS_SYS_CAST (getcwd, char *, (char *buf, size_t size)); # endif _GL_CXXALIASWARN (getcwd); #elif defined GNULIB_POSIXCHECK # undef getcwd # if HAVE_RAW_DECL_GETCWD _GL_WARN_ON_USE (getcwd, "getcwd is unportable - " "use gnulib module getcwd for portability"); # endif #endif #if @GNULIB_GETDOMAINNAME@ /* Return the NIS domain name of the machine. WARNING! The NIS domain name is unrelated to the fully qualified host name of the machine. It is also unrelated to email addresses. WARNING! The NIS domain name is usually the empty string or "(none)" when not using NIS. Put up to LEN bytes of the NIS domain name into NAME. Null terminate it if the name is shorter than LEN. If the NIS domain name is longer than LEN, set errno = EINVAL and return -1. Return 0 if successful, otherwise set errno and return -1. */ # if @REPLACE_GETDOMAINNAME@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef getdomainname # define getdomainname rpl_getdomainname # endif _GL_FUNCDECL_RPL (getdomainname, int, (char *name, size_t len) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (getdomainname, int, (char *name, size_t len)); # else # if !@HAVE_DECL_GETDOMAINNAME@ _GL_FUNCDECL_SYS (getdomainname, int, (char *name, size_t len) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (getdomainname, int, (char *name, size_t len)); # endif _GL_CXXALIASWARN (getdomainname); #elif defined GNULIB_POSIXCHECK # undef getdomainname # if HAVE_RAW_DECL_GETDOMAINNAME _GL_WARN_ON_USE (getdomainname, "getdomainname is unportable - " "use gnulib module getdomainname for portability"); # endif #endif #if @GNULIB_GETDTABLESIZE@ /* Return the maximum number of file descriptors in the current process. In POSIX, this is same as sysconf (_SC_OPEN_MAX). */ # if !@HAVE_GETDTABLESIZE@ _GL_FUNCDECL_SYS (getdtablesize, int, (void)); # endif _GL_CXXALIAS_SYS (getdtablesize, int, (void)); _GL_CXXALIASWARN (getdtablesize); #elif defined GNULIB_POSIXCHECK # undef getdtablesize # if HAVE_RAW_DECL_GETDTABLESIZE _GL_WARN_ON_USE (getdtablesize, "getdtablesize is unportable - " "use gnulib module getdtablesize for portability"); # endif #endif #if @GNULIB_GETGROUPS@ /* Return the supplemental groups that the current process belongs to. It is unspecified whether the effective group id is in the list. If N is 0, return the group count; otherwise, N describes how many entries are available in GROUPS. Return -1 and set errno if N is not 0 and not large enough. Fails with ENOSYS on some systems. */ # if @REPLACE_GETGROUPS@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef getgroups # define getgroups rpl_getgroups # endif _GL_FUNCDECL_RPL (getgroups, int, (int n, gid_t *groups)); _GL_CXXALIAS_RPL (getgroups, int, (int n, gid_t *groups)); # else # if !@HAVE_GETGROUPS@ _GL_FUNCDECL_SYS (getgroups, int, (int n, gid_t *groups)); # endif _GL_CXXALIAS_SYS (getgroups, int, (int n, gid_t *groups)); # endif _GL_CXXALIASWARN (getgroups); #elif defined GNULIB_POSIXCHECK # undef getgroups # if HAVE_RAW_DECL_GETGROUPS _GL_WARN_ON_USE (getgroups, "getgroups is unportable - " "use gnulib module getgroups for portability"); # endif #endif #if @GNULIB_GETHOSTNAME@ /* Return the standard host name of the machine. WARNING! The host name may or may not be fully qualified. Put up to LEN bytes of the host name into NAME. Null terminate it if the name is shorter than LEN. If the host name is longer than LEN, set errno = EINVAL and return -1. Return 0 if successful, otherwise set errno and return -1. */ # if @UNISTD_H_HAVE_WINSOCK2_H@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef gethostname # define gethostname rpl_gethostname # endif _GL_FUNCDECL_RPL (gethostname, int, (char *name, size_t len) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (gethostname, int, (char *name, size_t len)); # else # if !@HAVE_GETHOSTNAME@ _GL_FUNCDECL_SYS (gethostname, int, (char *name, size_t len) _GL_ARG_NONNULL ((1))); # endif /* Need to cast, because on Solaris 10 and OSF/1 5.1 systems, the second parameter is int len. */ _GL_CXXALIAS_SYS_CAST (gethostname, int, (char *name, size_t len)); # endif _GL_CXXALIASWARN (gethostname); #elif @UNISTD_H_HAVE_WINSOCK2_H@ # undef gethostname # define gethostname gethostname_used_without_requesting_gnulib_module_gethostname #elif defined GNULIB_POSIXCHECK # undef gethostname # if HAVE_RAW_DECL_GETHOSTNAME _GL_WARN_ON_USE (gethostname, "gethostname is unportable - " "use gnulib module gethostname for portability"); # endif #endif #if @GNULIB_GETLOGIN@ /* Returns the user's login name, or NULL if it cannot be found. Upon error, returns NULL with errno set. See <http://www.opengroup.org/susv3xsh/getlogin.html>. Most programs don't need to use this function, because the information is available through environment variables: ${LOGNAME-$USER} on Unix platforms, $USERNAME on native Windows platforms. */ # if !@HAVE_GETLOGIN@ _GL_FUNCDECL_SYS (getlogin, char *, (void)); # endif _GL_CXXALIAS_SYS (getlogin, char *, (void)); _GL_CXXALIASWARN (getlogin); #elif defined GNULIB_POSIXCHECK # undef getlogin # if HAVE_RAW_DECL_GETLOGIN _GL_WARN_ON_USE (getlogin, "getlogin is unportable - " "use gnulib module getlogin for portability"); # endif #endif #if @GNULIB_GETLOGIN_R@ /* Copies the user's login name to NAME. The array pointed to by NAME has room for SIZE bytes. Returns 0 if successful. Upon error, an error number is returned, or -1 in the case that the login name cannot be found but no specific error is provided (this case is hopefully rare but is left open by the POSIX spec). See <http://www.opengroup.org/susv3xsh/getlogin.html>. Most programs don't need to use this function, because the information is available through environment variables: ${LOGNAME-$USER} on Unix platforms, $USERNAME on native Windows platforms. */ # if @REPLACE_GETLOGIN_R@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define getlogin_r rpl_getlogin_r # endif _GL_FUNCDECL_RPL (getlogin_r, int, (char *name, size_t size) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (getlogin_r, int, (char *name, size_t size)); # else # if !@HAVE_DECL_GETLOGIN_R@ _GL_FUNCDECL_SYS (getlogin_r, int, (char *name, size_t size) _GL_ARG_NONNULL ((1))); # endif /* Need to cast, because on Solaris 10 systems, the second argument is int size. */ _GL_CXXALIAS_SYS_CAST (getlogin_r, int, (char *name, size_t size)); # endif _GL_CXXALIASWARN (getlogin_r); #elif defined GNULIB_POSIXCHECK # undef getlogin_r # if HAVE_RAW_DECL_GETLOGIN_R _GL_WARN_ON_USE (getlogin_r, "getlogin_r is unportable - " "use gnulib module getlogin_r for portability"); # endif #endif #if @GNULIB_GETPAGESIZE@ # if @REPLACE_GETPAGESIZE@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define getpagesize rpl_getpagesize # endif _GL_FUNCDECL_RPL (getpagesize, int, (void)); _GL_CXXALIAS_RPL (getpagesize, int, (void)); # else # if !@HAVE_GETPAGESIZE@ # if !defined getpagesize /* This is for POSIX systems. */ # if !defined _gl_getpagesize && defined _SC_PAGESIZE # if ! (defined __VMS && __VMS_VER < 70000000) # define _gl_getpagesize() sysconf (_SC_PAGESIZE) # endif # endif /* This is for older VMS. */ # if !defined _gl_getpagesize && defined __VMS # ifdef __ALPHA # define _gl_getpagesize() 8192 # else # define _gl_getpagesize() 512 # endif # endif /* This is for BeOS. */ # if !defined _gl_getpagesize && @HAVE_OS_H@ # include <OS.h> # if defined B_PAGE_SIZE # define _gl_getpagesize() B_PAGE_SIZE # endif # endif /* This is for AmigaOS4.0. */ # if !defined _gl_getpagesize && defined __amigaos4__ # define _gl_getpagesize() 2048 # endif /* This is for older Unix systems. */ # if !defined _gl_getpagesize && @HAVE_SYS_PARAM_H@ # include <sys/param.h> # ifdef EXEC_PAGESIZE # define _gl_getpagesize() EXEC_PAGESIZE # else # ifdef NBPG # ifndef CLSIZE # define CLSIZE 1 # endif # define _gl_getpagesize() (NBPG * CLSIZE) # else # ifdef NBPC # define _gl_getpagesize() NBPC # endif # endif # endif # endif # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define getpagesize() _gl_getpagesize () # else # if !GNULIB_defined_getpagesize_function static inline int getpagesize () { return _gl_getpagesize (); } # define GNULIB_defined_getpagesize_function 1 # endif # endif # endif # endif /* Need to cast, because on Cygwin 1.5.x systems, the return type is size_t. */ _GL_CXXALIAS_SYS_CAST (getpagesize, int, (void)); # endif # if @HAVE_DECL_GETPAGESIZE@ _GL_CXXALIASWARN (getpagesize); # endif #elif defined GNULIB_POSIXCHECK # undef getpagesize # if HAVE_RAW_DECL_GETPAGESIZE _GL_WARN_ON_USE (getpagesize, "getpagesize is unportable - " "use gnulib module getpagesize for portability"); # endif #endif #if @GNULIB_GETUSERSHELL@ /* Return the next valid login shell on the system, or NULL when the end of the list has been reached. */ # if !@HAVE_DECL_GETUSERSHELL@ _GL_FUNCDECL_SYS (getusershell, char *, (void)); # endif _GL_CXXALIAS_SYS (getusershell, char *, (void)); _GL_CXXALIASWARN (getusershell); #elif defined GNULIB_POSIXCHECK # undef getusershell # if HAVE_RAW_DECL_GETUSERSHELL _GL_WARN_ON_USE (getusershell, "getusershell is unportable - " "use gnulib module getusershell for portability"); # endif #endif #if @GNULIB_GETUSERSHELL@ /* Rewind to pointer that is advanced at each getusershell() call. */ # if !@HAVE_DECL_GETUSERSHELL@ _GL_FUNCDECL_SYS (setusershell, void, (void)); # endif _GL_CXXALIAS_SYS (setusershell, void, (void)); _GL_CXXALIASWARN (setusershell); #elif defined GNULIB_POSIXCHECK # undef setusershell # if HAVE_RAW_DECL_SETUSERSHELL _GL_WARN_ON_USE (setusershell, "setusershell is unportable - " "use gnulib module getusershell for portability"); # endif #endif #if @GNULIB_GETUSERSHELL@ /* Free the pointer that is advanced at each getusershell() call and associated resources. */ # if !@HAVE_DECL_GETUSERSHELL@ _GL_FUNCDECL_SYS (endusershell, void, (void)); # endif _GL_CXXALIAS_SYS (endusershell, void, (void)); _GL_CXXALIASWARN (endusershell); #elif defined GNULIB_POSIXCHECK # undef endusershell # if HAVE_RAW_DECL_ENDUSERSHELL _GL_WARN_ON_USE (endusershell, "endusershell is unportable - " "use gnulib module getusershell for portability"); # endif #endif #if @GNULIB_GROUP_MEMBER@ /* Determine whether group id is in calling user's group list. */ # if !@HAVE_GROUP_MEMBER@ _GL_FUNCDECL_SYS (group_member, int, (gid_t gid)); # endif _GL_CXXALIAS_SYS (group_member, int, (gid_t gid)); _GL_CXXALIASWARN (group_member); #elif defined GNULIB_POSIXCHECK # undef group_member # if HAVE_RAW_DECL_GROUP_MEMBER _GL_WARN_ON_USE (group_member, "group_member is unportable - " "use gnulib module group-member for portability"); # endif #endif #if @GNULIB_LCHOWN@ /* Change the owner of FILE to UID (if UID is not -1) and the group of FILE to GID (if GID is not -1). Do not follow symbolic links. Return 0 if successful, otherwise -1 and errno set. See the POSIX:2008 specification <http://pubs.opengroup.org/onlinepubs/9699919799/functions/lchown.html>. */ # if @REPLACE_LCHOWN@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef lchown # define lchown rpl_lchown # endif _GL_FUNCDECL_RPL (lchown, int, (char const *file, uid_t owner, gid_t group) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (lchown, int, (char const *file, uid_t owner, gid_t group)); # else # if !@HAVE_LCHOWN@ _GL_FUNCDECL_SYS (lchown, int, (char const *file, uid_t owner, gid_t group) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (lchown, int, (char const *file, uid_t owner, gid_t group)); # endif _GL_CXXALIASWARN (lchown); #elif defined GNULIB_POSIXCHECK # undef lchown # if HAVE_RAW_DECL_LCHOWN _GL_WARN_ON_USE (lchown, "lchown is unportable to pre-POSIX.1-2001 systems - " "use gnulib module lchown for portability"); # endif #endif #if @GNULIB_LINK@ /* Create a new hard link for an existing file. Return 0 if successful, otherwise -1 and errno set. See POSIX:2008 specification <http://pubs.opengroup.org/onlinepubs/9699919799/functions/link.html>. */ # if @REPLACE_LINK@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define link rpl_link # endif _GL_FUNCDECL_RPL (link, int, (const char *path1, const char *path2) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (link, int, (const char *path1, const char *path2)); # else # if !@HAVE_LINK@ _GL_FUNCDECL_SYS (link, int, (const char *path1, const char *path2) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (link, int, (const char *path1, const char *path2)); # endif _GL_CXXALIASWARN (link); #elif defined GNULIB_POSIXCHECK # undef link # if HAVE_RAW_DECL_LINK _GL_WARN_ON_USE (link, "link is unportable - " "use gnulib module link for portability"); # endif #endif #if @GNULIB_LINKAT@ /* Create a new hard link for an existing file, relative to two directories. FLAG controls whether symlinks are followed. Return 0 if successful, otherwise -1 and errno set. */ # if @REPLACE_LINKAT@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef linkat # define linkat rpl_linkat # endif _GL_FUNCDECL_RPL (linkat, int, (int fd1, const char *path1, int fd2, const char *path2, int flag) _GL_ARG_NONNULL ((2, 4))); _GL_CXXALIAS_RPL (linkat, int, (int fd1, const char *path1, int fd2, const char *path2, int flag)); # else # if !@HAVE_LINKAT@ _GL_FUNCDECL_SYS (linkat, int, (int fd1, const char *path1, int fd2, const char *path2, int flag) _GL_ARG_NONNULL ((2, 4))); # endif _GL_CXXALIAS_SYS (linkat, int, (int fd1, const char *path1, int fd2, const char *path2, int flag)); # endif _GL_CXXALIASWARN (linkat); #elif defined GNULIB_POSIXCHECK # undef linkat # if HAVE_RAW_DECL_LINKAT _GL_WARN_ON_USE (linkat, "linkat is unportable - " "use gnulib module linkat for portability"); # endif #endif #if @GNULIB_LSEEK@ /* Set the offset of FD relative to SEEK_SET, SEEK_CUR, or SEEK_END. Return the new offset if successful, otherwise -1 and errno set. See the POSIX:2008 specification <http://pubs.opengroup.org/onlinepubs/9699919799/functions/lseek.html>. */ # if @REPLACE_LSEEK@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define lseek rpl_lseek # endif _GL_FUNCDECL_RPL (lseek, off_t, (int fd, off_t offset, int whence)); _GL_CXXALIAS_RPL (lseek, off_t, (int fd, off_t offset, int whence)); # else _GL_CXXALIAS_SYS (lseek, off_t, (int fd, off_t offset, int whence)); # endif _GL_CXXALIASWARN (lseek); #elif defined GNULIB_POSIXCHECK # undef lseek # if HAVE_RAW_DECL_LSEEK _GL_WARN_ON_USE (lseek, "lseek does not fail with ESPIPE on pipes on some " "systems - use gnulib module lseek for portability"); # endif #endif #if @GNULIB_PIPE@ /* Create a pipe, defaulting to O_BINARY mode. Store the read-end as fd[0] and the write-end as fd[1]. Return 0 upon success, or -1 with errno set upon failure. */ # if !@HAVE_PIPE@ _GL_FUNCDECL_SYS (pipe, int, (int fd[2]) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (pipe, int, (int fd[2])); _GL_CXXALIASWARN (pipe); #elif defined GNULIB_POSIXCHECK # undef pipe # if HAVE_RAW_DECL_PIPE _GL_WARN_ON_USE (pipe, "pipe is unportable - " "use gnulib module pipe-posix for portability"); # endif #endif #if @GNULIB_PIPE2@ /* Create a pipe, applying the given flags when opening the read-end of the pipe and the write-end of the pipe. The flags are a bitmask, possibly including O_CLOEXEC (defined in <fcntl.h>) and O_TEXT, O_BINARY (defined in "binary-io.h"). Store the read-end as fd[0] and the write-end as fd[1]. Return 0 upon success, or -1 with errno set upon failure. See also the Linux man page at <http://www.kernel.org/doc/man-pages/online/pages/man2/pipe2.2.html>. */ # if @HAVE_PIPE2@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define pipe2 rpl_pipe2 # endif _GL_FUNCDECL_RPL (pipe2, int, (int fd[2], int flags) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (pipe2, int, (int fd[2], int flags)); # else _GL_FUNCDECL_SYS (pipe2, int, (int fd[2], int flags) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_SYS (pipe2, int, (int fd[2], int flags)); # endif _GL_CXXALIASWARN (pipe2); #elif defined GNULIB_POSIXCHECK # undef pipe2 # if HAVE_RAW_DECL_PIPE2 _GL_WARN_ON_USE (pipe2, "pipe2 is unportable - " "use gnulib module pipe2 for portability"); # endif #endif #if @GNULIB_PREAD@ /* Read at most BUFSIZE bytes from FD into BUF, starting at OFFSET. Return the number of bytes placed into BUF if successful, otherwise set errno and return -1. 0 indicates EOF. See the POSIX:2008 specification <http://pubs.opengroup.org/onlinepubs/9699919799/functions/pread.html>. */ # if @REPLACE_PREAD@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef pread # define pread rpl_pread # endif _GL_FUNCDECL_RPL (pread, ssize_t, (int fd, void *buf, size_t bufsize, off_t offset) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (pread, ssize_t, (int fd, void *buf, size_t bufsize, off_t offset)); # else # if !@HAVE_PREAD@ _GL_FUNCDECL_SYS (pread, ssize_t, (int fd, void *buf, size_t bufsize, off_t offset) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (pread, ssize_t, (int fd, void *buf, size_t bufsize, off_t offset)); # endif _GL_CXXALIASWARN (pread); #elif defined GNULIB_POSIXCHECK # undef pread # if HAVE_RAW_DECL_PREAD _GL_WARN_ON_USE (pread, "pread is unportable - " "use gnulib module pread for portability"); # endif #endif #if @GNULIB_PWRITE@ /* Write at most BUFSIZE bytes from BUF into FD, starting at OFFSET. Return the number of bytes written if successful, otherwise set errno and return -1. 0 indicates nothing written. See the POSIX:2008 specification <http://pubs.opengroup.org/onlinepubs/9699919799/functions/pwrite.html>. */ # if @REPLACE_PWRITE@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef pwrite # define pwrite rpl_pwrite # endif _GL_FUNCDECL_RPL (pwrite, ssize_t, (int fd, const void *buf, size_t bufsize, off_t offset) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (pwrite, ssize_t, (int fd, const void *buf, size_t bufsize, off_t offset)); # else # if !@HAVE_PWRITE@ _GL_FUNCDECL_SYS (pwrite, ssize_t, (int fd, const void *buf, size_t bufsize, off_t offset) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (pwrite, ssize_t, (int fd, const void *buf, size_t bufsize, off_t offset)); # endif _GL_CXXALIASWARN (pwrite); #elif defined GNULIB_POSIXCHECK # undef pwrite # if HAVE_RAW_DECL_PWRITE _GL_WARN_ON_USE (pwrite, "pwrite is unportable - " "use gnulib module pwrite for portability"); # endif #endif #if @GNULIB_READ@ /* Read up to COUNT bytes from file descriptor FD into the buffer starting at BUF. See the POSIX:2008 specification <http://pubs.opengroup.org/onlinepubs/9699919799/functions/read.html>. */ # if @REPLACE_READ@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef read # define read rpl_read # endif _GL_FUNCDECL_RPL (read, ssize_t, (int fd, void *buf, size_t count) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (read, ssize_t, (int fd, void *buf, size_t count)); # else /* Need to cast, because on mingw, the third parameter is unsigned int count and the return type is 'int'. */ _GL_CXXALIAS_SYS_CAST (read, ssize_t, (int fd, void *buf, size_t count)); # endif _GL_CXXALIASWARN (read); #endif #if @GNULIB_READLINK@ /* Read the contents of the symbolic link FILE and place the first BUFSIZE bytes of it into BUF. Return the number of bytes placed into BUF if successful, otherwise -1 and errno set. See the POSIX:2008 specification <http://pubs.opengroup.org/onlinepubs/9699919799/functions/readlink.html>. */ # if @REPLACE_READLINK@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define readlink rpl_readlink # endif _GL_FUNCDECL_RPL (readlink, ssize_t, (const char *file, char *buf, size_t bufsize) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (readlink, ssize_t, (const char *file, char *buf, size_t bufsize)); # else # if !@HAVE_READLINK@ _GL_FUNCDECL_SYS (readlink, ssize_t, (const char *file, char *buf, size_t bufsize) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (readlink, ssize_t, (const char *file, char *buf, size_t bufsize)); # endif _GL_CXXALIASWARN (readlink); #elif defined GNULIB_POSIXCHECK # undef readlink # if HAVE_RAW_DECL_READLINK _GL_WARN_ON_USE (readlink, "readlink is unportable - " "use gnulib module readlink for portability"); # endif #endif #if @GNULIB_READLINKAT@ # if !@HAVE_READLINKAT@ _GL_FUNCDECL_SYS (readlinkat, ssize_t, (int fd, char const *file, char *buf, size_t len) _GL_ARG_NONNULL ((2, 3))); # endif _GL_CXXALIAS_SYS (readlinkat, ssize_t, (int fd, char const *file, char *buf, size_t len)); _GL_CXXALIASWARN (readlinkat); #elif defined GNULIB_POSIXCHECK # undef readlinkat # if HAVE_RAW_DECL_READLINKAT _GL_WARN_ON_USE (readlinkat, "readlinkat is not portable - " "use gnulib module readlinkat for portability"); # endif #endif #if @GNULIB_RMDIR@ /* Remove the directory DIR. */ # if @REPLACE_RMDIR@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define rmdir rpl_rmdir # endif _GL_FUNCDECL_RPL (rmdir, int, (char const *name) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (rmdir, int, (char const *name)); # else _GL_CXXALIAS_SYS (rmdir, int, (char const *name)); # endif _GL_CXXALIASWARN (rmdir); #elif defined GNULIB_POSIXCHECK # undef rmdir # if HAVE_RAW_DECL_RMDIR _GL_WARN_ON_USE (rmdir, "rmdir is unportable - " "use gnulib module rmdir for portability"); # endif #endif #if @GNULIB_SETHOSTNAME@ /* Set the host name of the machine. The host name may or may not be fully qualified. Put LEN bytes of NAME into the host name. Return 0 if successful, otherwise, set errno and return -1. Platforms with no ability to set the hostname return -1 and set errno = ENOSYS. */ # if !@HAVE_SETHOSTNAME@ || !@HAVE_DECL_SETHOSTNAME@ _GL_FUNCDECL_SYS (sethostname, int, (const char *name, size_t len) _GL_ARG_NONNULL ((1))); # endif /* Need to cast, because on Solaris 11 2011-10, MacOS X 10.5, IRIX 6.5 and FreeBSD 6.4 the second parameter is int. On Solaris 11 2011-10, the first parameter is not const. */ _GL_CXXALIAS_SYS_CAST (sethostname, int, (const char *name, size_t len)); _GL_CXXALIASWARN (sethostname); #elif defined GNULIB_POSIXCHECK # undef sethostname # if HAVE_RAW_DECL_SETHOSTNAME _GL_WARN_ON_USE (sethostname, "sethostname is unportable - " "use gnulib module sethostname for portability"); # endif #endif #if @GNULIB_SLEEP@ /* Pause the execution of the current thread for N seconds. Returns the number of seconds left to sleep. See the POSIX:2008 specification <http://pubs.opengroup.org/onlinepubs/9699919799/functions/sleep.html>. */ # if @REPLACE_SLEEP@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef sleep # define sleep rpl_sleep # endif _GL_FUNCDECL_RPL (sleep, unsigned int, (unsigned int n)); _GL_CXXALIAS_RPL (sleep, unsigned int, (unsigned int n)); # else # if !@HAVE_SLEEP@ _GL_FUNCDECL_SYS (sleep, unsigned int, (unsigned int n)); # endif _GL_CXXALIAS_SYS (sleep, unsigned int, (unsigned int n)); # endif _GL_CXXALIASWARN (sleep); #elif defined GNULIB_POSIXCHECK # undef sleep # if HAVE_RAW_DECL_SLEEP _GL_WARN_ON_USE (sleep, "sleep is unportable - " "use gnulib module sleep for portability"); # endif #endif #if @GNULIB_SYMLINK@ # if @REPLACE_SYMLINK@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef symlink # define symlink rpl_symlink # endif _GL_FUNCDECL_RPL (symlink, int, (char const *contents, char const *file) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (symlink, int, (char const *contents, char const *file)); # else # if !@HAVE_SYMLINK@ _GL_FUNCDECL_SYS (symlink, int, (char const *contents, char const *file) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (symlink, int, (char const *contents, char const *file)); # endif _GL_CXXALIASWARN (symlink); #elif defined GNULIB_POSIXCHECK # undef symlink # if HAVE_RAW_DECL_SYMLINK _GL_WARN_ON_USE (symlink, "symlink is not portable - " "use gnulib module symlink for portability"); # endif #endif #if @GNULIB_SYMLINKAT@ # if !@HAVE_SYMLINKAT@ _GL_FUNCDECL_SYS (symlinkat, int, (char const *contents, int fd, char const *file) _GL_ARG_NONNULL ((1, 3))); # endif _GL_CXXALIAS_SYS (symlinkat, int, (char const *contents, int fd, char const *file)); _GL_CXXALIASWARN (symlinkat); #elif defined GNULIB_POSIXCHECK # undef symlinkat # if HAVE_RAW_DECL_SYMLINKAT _GL_WARN_ON_USE (symlinkat, "symlinkat is not portable - " "use gnulib module symlinkat for portability"); # endif #endif #if @GNULIB_TTYNAME_R@ /* Store at most BUFLEN characters of the pathname of the terminal FD is open on in BUF. Return 0 on success, otherwise an error number. */ # if @REPLACE_TTYNAME_R@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef ttyname_r # define ttyname_r rpl_ttyname_r # endif _GL_FUNCDECL_RPL (ttyname_r, int, (int fd, char *buf, size_t buflen) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (ttyname_r, int, (int fd, char *buf, size_t buflen)); # else # if !@HAVE_DECL_TTYNAME_R@ _GL_FUNCDECL_SYS (ttyname_r, int, (int fd, char *buf, size_t buflen) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (ttyname_r, int, (int fd, char *buf, size_t buflen)); # endif _GL_CXXALIASWARN (ttyname_r); #elif defined GNULIB_POSIXCHECK # undef ttyname_r # if HAVE_RAW_DECL_TTYNAME_R _GL_WARN_ON_USE (ttyname_r, "ttyname_r is not portable - " "use gnulib module ttyname_r for portability"); # endif #endif #if @GNULIB_UNLINK@ # if @REPLACE_UNLINK@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef unlink # define unlink rpl_unlink # endif _GL_FUNCDECL_RPL (unlink, int, (char const *file) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (unlink, int, (char const *file)); # else _GL_CXXALIAS_SYS (unlink, int, (char const *file)); # endif _GL_CXXALIASWARN (unlink); #elif defined GNULIB_POSIXCHECK # undef unlink # if HAVE_RAW_DECL_UNLINK _GL_WARN_ON_USE (unlink, "unlink is not portable - " "use gnulib module unlink for portability"); # endif #endif #if @GNULIB_UNLINKAT@ # if @REPLACE_UNLINKAT@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef unlinkat # define unlinkat rpl_unlinkat # endif _GL_FUNCDECL_RPL (unlinkat, int, (int fd, char const *file, int flag) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (unlinkat, int, (int fd, char const *file, int flag)); # else # if !@HAVE_UNLINKAT@ _GL_FUNCDECL_SYS (unlinkat, int, (int fd, char const *file, int flag) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (unlinkat, int, (int fd, char const *file, int flag)); # endif _GL_CXXALIASWARN (unlinkat); #elif defined GNULIB_POSIXCHECK # undef unlinkat # if HAVE_RAW_DECL_UNLINKAT _GL_WARN_ON_USE (unlinkat, "unlinkat is not portable - " "use gnulib module openat for portability"); # endif #endif #if @GNULIB_USLEEP@ /* Pause the execution of the current thread for N microseconds. Returns 0 on completion, or -1 on range error. See the POSIX:2001 specification <http://www.opengroup.org/susv3xsh/usleep.html>. */ # if @REPLACE_USLEEP@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef usleep # define usleep rpl_usleep # endif _GL_FUNCDECL_RPL (usleep, int, (useconds_t n)); _GL_CXXALIAS_RPL (usleep, int, (useconds_t n)); # else # if !@HAVE_USLEEP@ _GL_FUNCDECL_SYS (usleep, int, (useconds_t n)); # endif _GL_CXXALIAS_SYS (usleep, int, (useconds_t n)); # endif _GL_CXXALIASWARN (usleep); #elif defined GNULIB_POSIXCHECK # undef usleep # if HAVE_RAW_DECL_USLEEP _GL_WARN_ON_USE (usleep, "usleep is unportable - " "use gnulib module usleep for portability"); # endif #endif #if @GNULIB_WRITE@ /* Write up to COUNT bytes starting at BUF to file descriptor FD. See the POSIX:2008 specification <http://pubs.opengroup.org/onlinepubs/9699919799/functions/write.html>. */ # if @REPLACE_WRITE@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef write # define write rpl_write # endif _GL_FUNCDECL_RPL (write, ssize_t, (int fd, const void *buf, size_t count) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (write, ssize_t, (int fd, const void *buf, size_t count)); # else /* Need to cast, because on mingw, the third parameter is unsigned int count and the return type is 'int'. */ _GL_CXXALIAS_SYS_CAST (write, ssize_t, (int fd, const void *buf, size_t count)); # endif _GL_CXXALIASWARN (write); #endif #endif /* _@GUARD_PREFIX@_UNISTD_H */ #endif /* _@GUARD_PREFIX@_UNISTD_H */ ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/gl/getopt.c������������������������������������������������������������������0000664�0001750�0001750�00000117504�11672675562�014012� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Getopt for GNU. NOTE: getopt is part of the C library, so if you don't know what "Keep this file name-space clean" means, talk to drepper@gnu.org before changing it! Copyright (C) 1987-1996, 1998-2004, 2006, 2008-2011 Free Software Foundation, Inc. This file is part of the GNU C Library. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef _LIBC # include <config.h> #endif #include "getopt.h" #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #ifdef _LIBC # include <libintl.h> #else # include "gettext.h" # define _(msgid) gettext (msgid) #endif #if defined _LIBC && defined USE_IN_LIBIO # include <wchar.h> #endif /* This version of `getopt' appears to the caller like standard Unix `getopt' but it behaves differently for the user, since it allows the user to intersperse the options with the other arguments. As `getopt_long' works, it permutes the elements of ARGV so that, when it is done, all the options precede everything else. Thus all application programs are extended to handle flexible argument order. Using `getopt' or setting the environment variable POSIXLY_CORRECT disables permutation. Then the behavior is completely standard. GNU application programs can use a third alternative mode in which they can distinguish the relative order of options and other arguments. */ #include "getopt_int.h" /* For communication from `getopt' to the caller. When `getopt' finds an option that takes an argument, the argument value is returned here. Also, when `ordering' is RETURN_IN_ORDER, each non-option ARGV-element is returned here. */ char *optarg; /* Index in ARGV of the next element to be scanned. This is used for communication to and from the caller and for communication between successive calls to `getopt'. On entry to `getopt', zero means this is the first call; initialize. When `getopt' returns -1, this is the index of the first of the non-option elements that the caller should itself scan. Otherwise, `optind' communicates from one call to the next how much of ARGV has been scanned so far. */ /* 1003.2 says this must be 1 before any call. */ int optind = 1; /* Callers store zero here to inhibit the error message for unrecognized options. */ int opterr = 1; /* Set to an option character which was unrecognized. This must be initialized on some systems to avoid linking in the system's own getopt implementation. */ int optopt = '?'; /* Keep a global copy of all internal members of getopt_data. */ static struct _getopt_data getopt_data; #if defined HAVE_DECL_GETENV && !HAVE_DECL_GETENV extern char *getenv (); #endif #ifdef _LIBC /* Stored original parameters. XXX This is no good solution. We should rather copy the args so that we can compare them later. But we must not use malloc(3). */ extern int __libc_argc; extern char **__libc_argv; /* Bash 2.0 gives us an environment variable containing flags indicating ARGV elements that should not be considered arguments. */ # ifdef USE_NONOPTION_FLAGS /* Defined in getopt_init.c */ extern char *__getopt_nonoption_flags; # endif # ifdef USE_NONOPTION_FLAGS # define SWAP_FLAGS(ch1, ch2) \ if (d->__nonoption_flags_len > 0) \ { \ char __tmp = __getopt_nonoption_flags[ch1]; \ __getopt_nonoption_flags[ch1] = __getopt_nonoption_flags[ch2]; \ __getopt_nonoption_flags[ch2] = __tmp; \ } # else # define SWAP_FLAGS(ch1, ch2) # endif #else /* !_LIBC */ # define SWAP_FLAGS(ch1, ch2) #endif /* _LIBC */ /* Exchange two adjacent subsequences of ARGV. One subsequence is elements [first_nonopt,last_nonopt) which contains all the non-options that have been skipped so far. The other is elements [last_nonopt,optind), which contains all the options processed since those non-options were skipped. `first_nonopt' and `last_nonopt' are relocated so that they describe the new indices of the non-options in ARGV after they are moved. */ static void exchange (char **argv, struct _getopt_data *d) { int bottom = d->__first_nonopt; int middle = d->__last_nonopt; int top = d->optind; char *tem; /* Exchange the shorter segment with the far end of the longer segment. That puts the shorter segment into the right place. It leaves the longer segment in the right place overall, but it consists of two parts that need to be swapped next. */ #if defined _LIBC && defined USE_NONOPTION_FLAGS /* First make sure the handling of the `__getopt_nonoption_flags' string can work normally. Our top argument must be in the range of the string. */ if (d->__nonoption_flags_len > 0 && top >= d->__nonoption_flags_max_len) { /* We must extend the array. The user plays games with us and presents new arguments. */ char *new_str = malloc (top + 1); if (new_str == NULL) d->__nonoption_flags_len = d->__nonoption_flags_max_len = 0; else { memset (__mempcpy (new_str, __getopt_nonoption_flags, d->__nonoption_flags_max_len), '\0', top + 1 - d->__nonoption_flags_max_len); d->__nonoption_flags_max_len = top + 1; __getopt_nonoption_flags = new_str; } } #endif while (top > middle && middle > bottom) { if (top - middle > middle - bottom) { /* Bottom segment is the short one. */ int len = middle - bottom; register int i; /* Swap it with the top part of the top segment. */ for (i = 0; i < len; i++) { tem = argv[bottom + i]; argv[bottom + i] = argv[top - (middle - bottom) + i]; argv[top - (middle - bottom) + i] = tem; SWAP_FLAGS (bottom + i, top - (middle - bottom) + i); } /* Exclude the moved bottom segment from further swapping. */ top -= len; } else { /* Top segment is the short one. */ int len = top - middle; register int i; /* Swap it with the bottom part of the bottom segment. */ for (i = 0; i < len; i++) { tem = argv[bottom + i]; argv[bottom + i] = argv[middle + i]; argv[middle + i] = tem; SWAP_FLAGS (bottom + i, middle + i); } /* Exclude the moved top segment from further swapping. */ bottom += len; } } /* Update records for the slots the non-options now occupy. */ d->__first_nonopt += (d->optind - d->__last_nonopt); d->__last_nonopt = d->optind; } /* Initialize the internal data when the first call is made. */ static const char * _getopt_initialize (int argc _GL_UNUSED, char **argv _GL_UNUSED, const char *optstring, struct _getopt_data *d, int posixly_correct) { /* Start processing options with ARGV-element 1 (since ARGV-element 0 is the program name); the sequence of previously skipped non-option ARGV-elements is empty. */ d->__first_nonopt = d->__last_nonopt = d->optind; d->__nextchar = NULL; d->__posixly_correct = posixly_correct || !!getenv ("POSIXLY_CORRECT"); /* Determine how to handle the ordering of options and nonoptions. */ if (optstring[0] == '-') { d->__ordering = RETURN_IN_ORDER; ++optstring; } else if (optstring[0] == '+') { d->__ordering = REQUIRE_ORDER; ++optstring; } else if (d->__posixly_correct) d->__ordering = REQUIRE_ORDER; else d->__ordering = PERMUTE; #if defined _LIBC && defined USE_NONOPTION_FLAGS if (!d->__posixly_correct && argc == __libc_argc && argv == __libc_argv) { if (d->__nonoption_flags_max_len == 0) { if (__getopt_nonoption_flags == NULL || __getopt_nonoption_flags[0] == '\0') d->__nonoption_flags_max_len = -1; else { const char *orig_str = __getopt_nonoption_flags; int len = d->__nonoption_flags_max_len = strlen (orig_str); if (d->__nonoption_flags_max_len < argc) d->__nonoption_flags_max_len = argc; __getopt_nonoption_flags = (char *) malloc (d->__nonoption_flags_max_len); if (__getopt_nonoption_flags == NULL) d->__nonoption_flags_max_len = -1; else memset (__mempcpy (__getopt_nonoption_flags, orig_str, len), '\0', d->__nonoption_flags_max_len - len); } } d->__nonoption_flags_len = d->__nonoption_flags_max_len; } else d->__nonoption_flags_len = 0; #endif return optstring; } /* Scan elements of ARGV (whose length is ARGC) for option characters given in OPTSTRING. If an element of ARGV starts with '-', and is not exactly "-" or "--", then it is an option element. The characters of this element (aside from the initial '-') are option characters. If `getopt' is called repeatedly, it returns successively each of the option characters from each of the option elements. If `getopt' finds another option character, it returns that character, updating `optind' and `nextchar' so that the next call to `getopt' can resume the scan with the following option character or ARGV-element. If there are no more option characters, `getopt' returns -1. Then `optind' is the index in ARGV of the first ARGV-element that is not an option. (The ARGV-elements have been permuted so that those that are not options now come last.) OPTSTRING is a string containing the legitimate option characters. If an option character is seen that is not listed in OPTSTRING, return '?' after printing an error message. If you set `opterr' to zero, the error message is suppressed but we still return '?'. If a char in OPTSTRING is followed by a colon, that means it wants an arg, so the following text in the same ARGV-element, or the text of the following ARGV-element, is returned in `optarg'. Two colons mean an option that wants an optional arg; if there is text in the current ARGV-element, it is returned in `optarg', otherwise `optarg' is set to zero. If OPTSTRING starts with `-' or `+', it requests different methods of handling the non-option ARGV-elements. See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above. Long-named options begin with `--' instead of `-'. Their names may be abbreviated as long as the abbreviation is unique or is an exact match for some defined option. If they have an argument, it follows the option name in the same ARGV-element, separated from the option name by a `=', or else the in next ARGV-element. When `getopt' finds a long-named option, it returns 0 if that option's `flag' field is nonzero, the value of the option's `val' field if the `flag' field is zero. The elements of ARGV aren't really const, because we permute them. But we pretend they're const in the prototype to be compatible with other systems. LONGOPTS is a vector of `struct option' terminated by an element containing a name which is zero. LONGIND returns the index in LONGOPT of the long-named option found. It is only valid when a long-named option has been found by the most recent call. If LONG_ONLY is nonzero, '-' as well as '--' can introduce long-named options. */ int _getopt_internal_r (int argc, char **argv, const char *optstring, const struct option *longopts, int *longind, int long_only, struct _getopt_data *d, int posixly_correct) { int print_errors = d->opterr; if (argc < 1) return -1; d->optarg = NULL; if (d->optind == 0 || !d->__initialized) { if (d->optind == 0) d->optind = 1; /* Don't scan ARGV[0], the program name. */ optstring = _getopt_initialize (argc, argv, optstring, d, posixly_correct); d->__initialized = 1; } else if (optstring[0] == '-' || optstring[0] == '+') optstring++; if (optstring[0] == ':') print_errors = 0; /* Test whether ARGV[optind] points to a non-option argument. Either it does not have option syntax, or there is an environment flag from the shell indicating it is not an option. The later information is only used when the used in the GNU libc. */ #if defined _LIBC && defined USE_NONOPTION_FLAGS # define NONOPTION_P (argv[d->optind][0] != '-' || argv[d->optind][1] == '\0' \ || (d->optind < d->__nonoption_flags_len \ && __getopt_nonoption_flags[d->optind] == '1')) #else # define NONOPTION_P (argv[d->optind][0] != '-' || argv[d->optind][1] == '\0') #endif if (d->__nextchar == NULL || *d->__nextchar == '\0') { /* Advance to the next ARGV-element. */ /* Give FIRST_NONOPT & LAST_NONOPT rational values if OPTIND has been moved back by the user (who may also have changed the arguments). */ if (d->__last_nonopt > d->optind) d->__last_nonopt = d->optind; if (d->__first_nonopt > d->optind) d->__first_nonopt = d->optind; if (d->__ordering == PERMUTE) { /* If we have just processed some options following some non-options, exchange them so that the options come first. */ if (d->__first_nonopt != d->__last_nonopt && d->__last_nonopt != d->optind) exchange ((char **) argv, d); else if (d->__last_nonopt != d->optind) d->__first_nonopt = d->optind; /* Skip any additional non-options and extend the range of non-options previously skipped. */ while (d->optind < argc && NONOPTION_P) d->optind++; d->__last_nonopt = d->optind; } /* The special ARGV-element `--' means premature end of options. Skip it like a null option, then exchange with previous non-options as if it were an option, then skip everything else like a non-option. */ if (d->optind != argc && !strcmp (argv[d->optind], "--")) { d->optind++; if (d->__first_nonopt != d->__last_nonopt && d->__last_nonopt != d->optind) exchange ((char **) argv, d); else if (d->__first_nonopt == d->__last_nonopt) d->__first_nonopt = d->optind; d->__last_nonopt = argc; d->optind = argc; } /* If we have done all the ARGV-elements, stop the scan and back over any non-options that we skipped and permuted. */ if (d->optind == argc) { /* Set the next-arg-index to point at the non-options that we previously skipped, so the caller will digest them. */ if (d->__first_nonopt != d->__last_nonopt) d->optind = d->__first_nonopt; return -1; } /* If we have come to a non-option and did not permute it, either stop the scan or describe it to the caller and pass it by. */ if (NONOPTION_P) { if (d->__ordering == REQUIRE_ORDER) return -1; d->optarg = argv[d->optind++]; return 1; } /* We have found another option-ARGV-element. Skip the initial punctuation. */ d->__nextchar = (argv[d->optind] + 1 + (longopts != NULL && argv[d->optind][1] == '-')); } /* Decode the current option-ARGV-element. */ /* Check whether the ARGV-element is a long option. If long_only and the ARGV-element has the form "-f", where f is a valid short option, don't consider it an abbreviated form of a long option that starts with f. Otherwise there would be no way to give the -f short option. On the other hand, if there's a long option "fubar" and the ARGV-element is "-fu", do consider that an abbreviation of the long option, just like "--fu", and not "-f" with arg "u". This distinction seems to be the most useful approach. */ if (longopts != NULL && (argv[d->optind][1] == '-' || (long_only && (argv[d->optind][2] || !strchr (optstring, argv[d->optind][1]))))) { char *nameend; unsigned int namelen; const struct option *p; const struct option *pfound = NULL; struct option_list { const struct option *p; struct option_list *next; } *ambig_list = NULL; int exact = 0; int indfound = -1; int option_index; for (nameend = d->__nextchar; *nameend && *nameend != '='; nameend++) /* Do nothing. */ ; namelen = nameend - d->__nextchar; /* Test all long options for either exact match or abbreviated matches. */ for (p = longopts, option_index = 0; p->name; p++, option_index++) if (!strncmp (p->name, d->__nextchar, namelen)) { if (namelen == (unsigned int) strlen (p->name)) { /* Exact match found. */ pfound = p; indfound = option_index; exact = 1; break; } else if (pfound == NULL) { /* First nonexact match found. */ pfound = p; indfound = option_index; } else if (long_only || pfound->has_arg != p->has_arg || pfound->flag != p->flag || pfound->val != p->val) { /* Second or later nonexact match found. */ struct option_list *newp = malloc (sizeof (*newp)); newp->p = p; newp->next = ambig_list; ambig_list = newp; } } if (ambig_list != NULL && !exact) { if (print_errors) { struct option_list first; first.p = pfound; first.next = ambig_list; ambig_list = &first; #if defined _LIBC && defined USE_IN_LIBIO char *buf = NULL; size_t buflen = 0; FILE *fp = open_memstream (&buf, &buflen); if (fp != NULL) { fprintf (fp, _("%s: option '%s' is ambiguous; possibilities:"), argv[0], argv[d->optind]); do { fprintf (fp, " '--%s'", ambig_list->p->name); ambig_list = ambig_list->next; } while (ambig_list != NULL); fputc_unlocked ('\n', fp); if (__builtin_expect (fclose (fp) != EOF, 1)) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } } #else fprintf (stderr, _("%s: option '%s' is ambiguous; possibilities:"), argv[0], argv[d->optind]); do { fprintf (stderr, " '--%s'", ambig_list->p->name); ambig_list = ambig_list->next; } while (ambig_list != NULL); fputc ('\n', stderr); #endif } d->__nextchar += strlen (d->__nextchar); d->optind++; d->optopt = 0; return '?'; } while (ambig_list != NULL) { struct option_list *pn = ambig_list->next; free (ambig_list); ambig_list = pn; } if (pfound != NULL) { option_index = indfound; d->optind++; if (*nameend) { /* Don't test has_arg with >, because some C compilers don't allow it to be used on enums. */ if (pfound->has_arg) d->optarg = nameend + 1; else { if (print_errors) { #if defined _LIBC && defined USE_IN_LIBIO char *buf; int n; #endif if (argv[d->optind - 1][1] == '-') { /* --option */ #if defined _LIBC && defined USE_IN_LIBIO n = __asprintf (&buf, _("\ %s: option '--%s' doesn't allow an argument\n"), argv[0], pfound->name); #else fprintf (stderr, _("\ %s: option '--%s' doesn't allow an argument\n"), argv[0], pfound->name); #endif } else { /* +option or -option */ #if defined _LIBC && defined USE_IN_LIBIO n = __asprintf (&buf, _("\ %s: option '%c%s' doesn't allow an argument\n"), argv[0], argv[d->optind - 1][0], pfound->name); #else fprintf (stderr, _("\ %s: option '%c%s' doesn't allow an argument\n"), argv[0], argv[d->optind - 1][0], pfound->name); #endif } #if defined _LIBC && defined USE_IN_LIBIO if (n >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #endif } d->__nextchar += strlen (d->__nextchar); d->optopt = pfound->val; return '?'; } } else if (pfound->has_arg == 1) { if (d->optind < argc) d->optarg = argv[d->optind++]; else { if (print_errors) { #if defined _LIBC && defined USE_IN_LIBIO char *buf; if (__asprintf (&buf, _("\ %s: option '--%s' requires an argument\n"), argv[0], pfound->name) >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #else fprintf (stderr, _("%s: option '--%s' requires an argument\n"), argv[0], pfound->name); #endif } d->__nextchar += strlen (d->__nextchar); d->optopt = pfound->val; return optstring[0] == ':' ? ':' : '?'; } } d->__nextchar += strlen (d->__nextchar); if (longind != NULL) *longind = option_index; if (pfound->flag) { *(pfound->flag) = pfound->val; return 0; } return pfound->val; } /* Can't find it as a long option. If this is not getopt_long_only, or the option starts with '--' or is not a valid short option, then it's an error. Otherwise interpret it as a short option. */ if (!long_only || argv[d->optind][1] == '-' || strchr (optstring, *d->__nextchar) == NULL) { if (print_errors) { #if defined _LIBC && defined USE_IN_LIBIO char *buf; int n; #endif if (argv[d->optind][1] == '-') { /* --option */ #if defined _LIBC && defined USE_IN_LIBIO n = __asprintf (&buf, _("%s: unrecognized option '--%s'\n"), argv[0], d->__nextchar); #else fprintf (stderr, _("%s: unrecognized option '--%s'\n"), argv[0], d->__nextchar); #endif } else { /* +option or -option */ #if defined _LIBC && defined USE_IN_LIBIO n = __asprintf (&buf, _("%s: unrecognized option '%c%s'\n"), argv[0], argv[d->optind][0], d->__nextchar); #else fprintf (stderr, _("%s: unrecognized option '%c%s'\n"), argv[0], argv[d->optind][0], d->__nextchar); #endif } #if defined _LIBC && defined USE_IN_LIBIO if (n >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #endif } d->__nextchar = (char *) ""; d->optind++; d->optopt = 0; return '?'; } } /* Look at and handle the next short option-character. */ { char c = *d->__nextchar++; const char *temp = strchr (optstring, c); /* Increment `optind' when we start to process its last character. */ if (*d->__nextchar == '\0') ++d->optind; if (temp == NULL || c == ':' || c == ';') { if (print_errors) { #if defined _LIBC && defined USE_IN_LIBIO char *buf; int n; #endif #if defined _LIBC && defined USE_IN_LIBIO n = __asprintf (&buf, _("%s: invalid option -- '%c'\n"), argv[0], c); #else fprintf (stderr, _("%s: invalid option -- '%c'\n"), argv[0], c); #endif #if defined _LIBC && defined USE_IN_LIBIO if (n >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #endif } d->optopt = c; return '?'; } /* Convenience. Treat POSIX -W foo same as long option --foo */ if (temp[0] == 'W' && temp[1] == ';') { char *nameend; const struct option *p; const struct option *pfound = NULL; int exact = 0; int ambig = 0; int indfound = 0; int option_index; if (longopts == NULL) goto no_longs; /* This is an option that requires an argument. */ if (*d->__nextchar != '\0') { d->optarg = d->__nextchar; /* If we end this ARGV-element by taking the rest as an arg, we must advance to the next element now. */ d->optind++; } else if (d->optind == argc) { if (print_errors) { #if defined _LIBC && defined USE_IN_LIBIO char *buf; if (__asprintf (&buf, _("%s: option requires an argument -- '%c'\n"), argv[0], c) >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #else fprintf (stderr, _("%s: option requires an argument -- '%c'\n"), argv[0], c); #endif } d->optopt = c; if (optstring[0] == ':') c = ':'; else c = '?'; return c; } else /* We already incremented `d->optind' once; increment it again when taking next ARGV-elt as argument. */ d->optarg = argv[d->optind++]; /* optarg is now the argument, see if it's in the table of longopts. */ for (d->__nextchar = nameend = d->optarg; *nameend && *nameend != '='; nameend++) /* Do nothing. */ ; /* Test all long options for either exact match or abbreviated matches. */ for (p = longopts, option_index = 0; p->name; p++, option_index++) if (!strncmp (p->name, d->__nextchar, nameend - d->__nextchar)) { if ((unsigned int) (nameend - d->__nextchar) == strlen (p->name)) { /* Exact match found. */ pfound = p; indfound = option_index; exact = 1; break; } else if (pfound == NULL) { /* First nonexact match found. */ pfound = p; indfound = option_index; } else if (long_only || pfound->has_arg != p->has_arg || pfound->flag != p->flag || pfound->val != p->val) /* Second or later nonexact match found. */ ambig = 1; } if (ambig && !exact) { if (print_errors) { #if defined _LIBC && defined USE_IN_LIBIO char *buf; if (__asprintf (&buf, _("%s: option '-W %s' is ambiguous\n"), argv[0], d->optarg) >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #else fprintf (stderr, _("%s: option '-W %s' is ambiguous\n"), argv[0], d->optarg); #endif } d->__nextchar += strlen (d->__nextchar); d->optind++; return '?'; } if (pfound != NULL) { option_index = indfound; if (*nameend) { /* Don't test has_arg with >, because some C compilers don't allow it to be used on enums. */ if (pfound->has_arg) d->optarg = nameend + 1; else { if (print_errors) { #if defined _LIBC && defined USE_IN_LIBIO char *buf; if (__asprintf (&buf, _("\ %s: option '-W %s' doesn't allow an argument\n"), argv[0], pfound->name) >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #else fprintf (stderr, _("\ %s: option '-W %s' doesn't allow an argument\n"), argv[0], pfound->name); #endif } d->__nextchar += strlen (d->__nextchar); return '?'; } } else if (pfound->has_arg == 1) { if (d->optind < argc) d->optarg = argv[d->optind++]; else { if (print_errors) { #if defined _LIBC && defined USE_IN_LIBIO char *buf; if (__asprintf (&buf, _("\ %s: option '-W %s' requires an argument\n"), argv[0], pfound->name) >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #else fprintf (stderr, _("\ %s: option '-W %s' requires an argument\n"), argv[0], pfound->name); #endif } d->__nextchar += strlen (d->__nextchar); return optstring[0] == ':' ? ':' : '?'; } } else d->optarg = NULL; d->__nextchar += strlen (d->__nextchar); if (longind != NULL) *longind = option_index; if (pfound->flag) { *(pfound->flag) = pfound->val; return 0; } return pfound->val; } no_longs: d->__nextchar = NULL; return 'W'; /* Let the application handle it. */ } if (temp[1] == ':') { if (temp[2] == ':') { /* This is an option that accepts an argument optionally. */ if (*d->__nextchar != '\0') { d->optarg = d->__nextchar; d->optind++; } else d->optarg = NULL; d->__nextchar = NULL; } else { /* This is an option that requires an argument. */ if (*d->__nextchar != '\0') { d->optarg = d->__nextchar; /* If we end this ARGV-element by taking the rest as an arg, we must advance to the next element now. */ d->optind++; } else if (d->optind == argc) { if (print_errors) { #if defined _LIBC && defined USE_IN_LIBIO char *buf; if (__asprintf (&buf, _("\ %s: option requires an argument -- '%c'\n"), argv[0], c) >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #else fprintf (stderr, _("%s: option requires an argument -- '%c'\n"), argv[0], c); #endif } d->optopt = c; if (optstring[0] == ':') c = ':'; else c = '?'; } else /* We already incremented `optind' once; increment it again when taking next ARGV-elt as argument. */ d->optarg = argv[d->optind++]; d->__nextchar = NULL; } } return c; } } int _getopt_internal (int argc, char **argv, const char *optstring, const struct option *longopts, int *longind, int long_only, int posixly_correct) { int result; getopt_data.optind = optind; getopt_data.opterr = opterr; result = _getopt_internal_r (argc, argv, optstring, longopts, longind, long_only, &getopt_data, posixly_correct); optind = getopt_data.optind; optarg = getopt_data.optarg; optopt = getopt_data.optopt; return result; } /* glibc gets a LSB-compliant getopt. Standalone applications get a POSIX-compliant getopt. */ #if _LIBC enum { POSIXLY_CORRECT = 0 }; #else enum { POSIXLY_CORRECT = 1 }; #endif int getopt (int argc, char *const *argv, const char *optstring) { return _getopt_internal (argc, (char **) argv, optstring, (const struct option *) 0, (int *) 0, 0, POSIXLY_CORRECT); } #ifdef _LIBC int __posix_getopt (int argc, char *const *argv, const char *optstring) { return _getopt_internal (argc, argv, optstring, (const struct option *) 0, (int *) 0, 0, 1); } #endif #ifdef TEST /* Compile with -DTEST to make an executable for use in testing the above definition of `getopt'. */ int main (int argc, char **argv) { int c; int digit_optind = 0; while (1) { int this_option_optind = optind ? optind : 1; c = getopt (argc, argv, "abc:d:0123456789"); if (c == -1) break; switch (c) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': if (digit_optind != 0 && digit_optind != this_option_optind) printf ("digits occur in two different argv-elements.\n"); digit_optind = this_option_optind; printf ("option %c\n", c); break; case 'a': printf ("option a\n"); break; case 'b': printf ("option b\n"); break; case 'c': printf ("option c with value '%s'\n", optarg); break; case '?': break; default: printf ("?? getopt returned character code 0%o ??\n", c); } } if (optind < argc) { printf ("non-option ARGV-elements: "); while (optind < argc) printf ("%s ", argv[optind++]); printf ("\n"); } exit (0); } #endif /* TEST */ ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/gl/dirname.h�����������������������������������������������������������������0000664�0001750�0001750�00000002651�11672675562�014130� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Take file names apart into directory and base names. Copyright (C) 1998, 2001, 2003-2006, 2009-2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef DIRNAME_H_ # define DIRNAME_H_ 1 # include <stdbool.h> # include <stddef.h> # include "dosname.h" # ifndef DIRECTORY_SEPARATOR # define DIRECTORY_SEPARATOR '/' # endif # ifndef DOUBLE_SLASH_IS_DISTINCT_ROOT # define DOUBLE_SLASH_IS_DISTINCT_ROOT 0 # endif # if GNULIB_DIRNAME char *base_name (char const *file); char *dir_name (char const *file); # endif char *mdir_name (char const *file); size_t base_len (char const *file) _GL_ATTRIBUTE_PURE; size_t dir_len (char const *file) _GL_ATTRIBUTE_PURE; char *last_component (char const *file) _GL_ATTRIBUTE_PURE; bool strip_trailing_slashes (char *file); #endif /* not DIRNAME_H_ */ ���������������������������������������������������������������������������������������source-highlight-3.1.6/gl/stdlib.in.h���������������������������������������������������������������0000664�0001750�0001750�00000066756�11672675562�014417� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* A GNU-like <stdlib.h>. Copyright (C) 1995, 2001-2004, 2006-2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ #if defined __need_malloc_and_calloc /* Special invocation convention inside glibc header files. */ #@INCLUDE_NEXT@ @NEXT_STDLIB_H@ #else /* Normal invocation convention. */ #ifndef _@GUARD_PREFIX@_STDLIB_H /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT@ @NEXT_STDLIB_H@ #ifndef _@GUARD_PREFIX@_STDLIB_H #define _@GUARD_PREFIX@_STDLIB_H /* NetBSD 5.0 mis-defines NULL. */ #include <stddef.h> /* MirBSD 10 defines WEXITSTATUS in <sys/wait.h>, not in <stdlib.h>. */ #if @GNULIB_SYSTEM_POSIX@ && !defined WEXITSTATUS # include <sys/wait.h> #endif /* Solaris declares getloadavg() in <sys/loadavg.h>. */ #if (@GNULIB_GETLOADAVG@ || defined GNULIB_POSIXCHECK) && @HAVE_SYS_LOADAVG_H@ # include <sys/loadavg.h> #endif #if @GNULIB_RANDOM_R@ /* OSF/1 5.1 declares 'struct random_data' in <random.h>, which is included from <stdlib.h> if _REENTRANT is defined. Include it whenever we need 'struct random_data'. */ # if @HAVE_RANDOM_H@ # include <random.h> # endif # if !@HAVE_STRUCT_RANDOM_DATA@ || !@HAVE_RANDOM_R@ # include <stdint.h> # endif # if !@HAVE_STRUCT_RANDOM_DATA@ /* Define 'struct random_data'. But allow multiple gnulib generated <stdlib.h> replacements to coexist. */ # if !GNULIB_defined_struct_random_data struct random_data { int32_t *fptr; /* Front pointer. */ int32_t *rptr; /* Rear pointer. */ int32_t *state; /* Array of state values. */ int rand_type; /* Type of random number generator. */ int rand_deg; /* Degree of random number generator. */ int rand_sep; /* Distance between front and rear. */ int32_t *end_ptr; /* Pointer behind state table. */ }; # define GNULIB_defined_struct_random_data 1 # endif # endif #endif #if (@GNULIB_MKSTEMP@ || @GNULIB_MKSTEMPS@ || @GNULIB_GETSUBOPT@ || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__ && !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) /* On MacOS X 10.3, only <unistd.h> declares mkstemp. */ /* On MacOS X 10.5, only <unistd.h> declares mkstemps. */ /* On Cygwin 1.7.1, only <unistd.h> declares getsubopt. */ /* But avoid namespace pollution on glibc systems and native Windows. */ # include <unistd.h> #endif /* The definition of _Noreturn is copied here. */ /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ /* Some systems do not define EXIT_*, despite otherwise supporting C89. */ #ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 #endif /* Tandem/NSK and other platforms that define EXIT_FAILURE as -1 interfere with proper operation of xargs. */ #ifndef EXIT_FAILURE # define EXIT_FAILURE 1 #elif EXIT_FAILURE != 1 # undef EXIT_FAILURE # define EXIT_FAILURE 1 #endif #if @GNULIB__EXIT@ /* Terminate the current process with the given return code, without running the 'atexit' handlers. */ # if !@HAVE__EXIT@ _GL_FUNCDECL_SYS (_Exit, _Noreturn void, (int status)); # endif _GL_CXXALIAS_SYS (_Exit, void, (int status)); _GL_CXXALIASWARN (_Exit); #elif defined GNULIB_POSIXCHECK # undef _Exit # if HAVE_RAW_DECL__EXIT _GL_WARN_ON_USE (_Exit, "_Exit is unportable - " "use gnulib module _Exit for portability"); # endif #endif #if @GNULIB_ATOLL@ /* Parse a signed decimal integer. Returns the value of the integer. Errors are not detected. */ # if !@HAVE_ATOLL@ _GL_FUNCDECL_SYS (atoll, long long, (const char *string) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (atoll, long long, (const char *string)); _GL_CXXALIASWARN (atoll); #elif defined GNULIB_POSIXCHECK # undef atoll # if HAVE_RAW_DECL_ATOLL _GL_WARN_ON_USE (atoll, "atoll is unportable - " "use gnulib module atoll for portability"); # endif #endif #if @GNULIB_CALLOC_POSIX@ # if @REPLACE_CALLOC@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef calloc # define calloc rpl_calloc # endif _GL_FUNCDECL_RPL (calloc, void *, (size_t nmemb, size_t size)); _GL_CXXALIAS_RPL (calloc, void *, (size_t nmemb, size_t size)); # else _GL_CXXALIAS_SYS (calloc, void *, (size_t nmemb, size_t size)); # endif _GL_CXXALIASWARN (calloc); #elif defined GNULIB_POSIXCHECK # undef calloc /* Assume calloc is always declared. */ _GL_WARN_ON_USE (calloc, "calloc is not POSIX compliant everywhere - " "use gnulib module calloc-posix for portability"); #endif #if @GNULIB_CANONICALIZE_FILE_NAME@ # if @REPLACE_CANONICALIZE_FILE_NAME@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define canonicalize_file_name rpl_canonicalize_file_name # endif _GL_FUNCDECL_RPL (canonicalize_file_name, char *, (const char *name) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (canonicalize_file_name, char *, (const char *name)); # else # if !@HAVE_CANONICALIZE_FILE_NAME@ _GL_FUNCDECL_SYS (canonicalize_file_name, char *, (const char *name) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (canonicalize_file_name, char *, (const char *name)); # endif _GL_CXXALIASWARN (canonicalize_file_name); #elif defined GNULIB_POSIXCHECK # undef canonicalize_file_name # if HAVE_RAW_DECL_CANONICALIZE_FILE_NAME _GL_WARN_ON_USE (canonicalize_file_name, "canonicalize_file_name is unportable - " "use gnulib module canonicalize-lgpl for portability"); # endif #endif #if @GNULIB_GETLOADAVG@ /* Store max(NELEM,3) load average numbers in LOADAVG[]. The three numbers are the load average of the last 1 minute, the last 5 minutes, and the last 15 minutes, respectively. LOADAVG is an array of NELEM numbers. */ # if !@HAVE_DECL_GETLOADAVG@ _GL_FUNCDECL_SYS (getloadavg, int, (double loadavg[], int nelem) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (getloadavg, int, (double loadavg[], int nelem)); _GL_CXXALIASWARN (getloadavg); #elif defined GNULIB_POSIXCHECK # undef getloadavg # if HAVE_RAW_DECL_GETLOADAVG _GL_WARN_ON_USE (getloadavg, "getloadavg is not portable - " "use gnulib module getloadavg for portability"); # endif #endif #if @GNULIB_GETSUBOPT@ /* Assuming *OPTIONP is a comma separated list of elements of the form "token" or "token=value", getsubopt parses the first of these elements. If the first element refers to a "token" that is member of the given NULL-terminated array of tokens: - It replaces the comma with a NUL byte, updates *OPTIONP to point past the first option and the comma, sets *VALUEP to the value of the element (or NULL if it doesn't contain an "=" sign), - It returns the index of the "token" in the given array of tokens. Otherwise it returns -1, and *OPTIONP and *VALUEP are undefined. For more details see the POSIX:2001 specification. http://www.opengroup.org/susv3xsh/getsubopt.html */ # if !@HAVE_GETSUBOPT@ _GL_FUNCDECL_SYS (getsubopt, int, (char **optionp, char *const *tokens, char **valuep) _GL_ARG_NONNULL ((1, 2, 3))); # endif _GL_CXXALIAS_SYS (getsubopt, int, (char **optionp, char *const *tokens, char **valuep)); _GL_CXXALIASWARN (getsubopt); #elif defined GNULIB_POSIXCHECK # undef getsubopt # if HAVE_RAW_DECL_GETSUBOPT _GL_WARN_ON_USE (getsubopt, "getsubopt is unportable - " "use gnulib module getsubopt for portability"); # endif #endif #if @GNULIB_GRANTPT@ /* Change the ownership and access permission of the slave side of the pseudo-terminal whose master side is specified by FD. */ # if !@HAVE_GRANTPT@ _GL_FUNCDECL_SYS (grantpt, int, (int fd)); # endif _GL_CXXALIAS_SYS (grantpt, int, (int fd)); _GL_CXXALIASWARN (grantpt); #elif defined GNULIB_POSIXCHECK # undef grantpt # if HAVE_RAW_DECL_GRANTPT _GL_WARN_ON_USE (grantpt, "grantpt is not portable - " "use gnulib module grantpt for portability"); # endif #endif /* If _GL_USE_STDLIB_ALLOC is nonzero, the including module does not rely on GNU or POSIX semantics for malloc and realloc (for example, by never specifying a zero size), so it does not need malloc or realloc to be redefined. */ #if @GNULIB_MALLOC_POSIX@ # if @REPLACE_MALLOC@ # if !((defined __cplusplus && defined GNULIB_NAMESPACE) \ || _GL_USE_STDLIB_ALLOC) # undef malloc # define malloc rpl_malloc # endif _GL_FUNCDECL_RPL (malloc, void *, (size_t size)); _GL_CXXALIAS_RPL (malloc, void *, (size_t size)); # else _GL_CXXALIAS_SYS (malloc, void *, (size_t size)); # endif _GL_CXXALIASWARN (malloc); #elif defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC # undef malloc /* Assume malloc is always declared. */ _GL_WARN_ON_USE (malloc, "malloc is not POSIX compliant everywhere - " "use gnulib module malloc-posix for portability"); #endif /* Convert a multibyte character to a wide character. */ #if @GNULIB_MBTOWC@ # if @REPLACE_MBTOWC@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef mbtowc # define mbtowc rpl_mbtowc # endif _GL_FUNCDECL_RPL (mbtowc, int, (wchar_t *pwc, const char *s, size_t n)); _GL_CXXALIAS_RPL (mbtowc, int, (wchar_t *pwc, const char *s, size_t n)); # else _GL_CXXALIAS_SYS (mbtowc, int, (wchar_t *pwc, const char *s, size_t n)); # endif _GL_CXXALIASWARN (mbtowc); #endif #if @GNULIB_MKDTEMP@ /* Create a unique temporary directory from TEMPLATE. The last six characters of TEMPLATE must be "XXXXXX"; they are replaced with a string that makes the directory name unique. Returns TEMPLATE, or a null pointer if it cannot get a unique name. The directory is created mode 700. */ # if !@HAVE_MKDTEMP@ _GL_FUNCDECL_SYS (mkdtemp, char *, (char * /*template*/) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (mkdtemp, char *, (char * /*template*/)); _GL_CXXALIASWARN (mkdtemp); #elif defined GNULIB_POSIXCHECK # undef mkdtemp # if HAVE_RAW_DECL_MKDTEMP _GL_WARN_ON_USE (mkdtemp, "mkdtemp is unportable - " "use gnulib module mkdtemp for portability"); # endif #endif #if @GNULIB_MKOSTEMP@ /* Create a unique temporary file from TEMPLATE. The last six characters of TEMPLATE must be "XXXXXX"; they are replaced with a string that makes the file name unique. The flags are a bitmask, possibly including O_CLOEXEC (defined in <fcntl.h>) and O_TEXT, O_BINARY (defined in "binary-io.h"). The file is then created, with the specified flags, ensuring it didn't exist before. The file is created read-write (mask at least 0600 & ~umask), but it may be world-readable and world-writable (mask 0666 & ~umask), depending on the implementation. Returns the open file descriptor if successful, otherwise -1 and errno set. */ # if !@HAVE_MKOSTEMP@ _GL_FUNCDECL_SYS (mkostemp, int, (char * /*template*/, int /*flags*/) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (mkostemp, int, (char * /*template*/, int /*flags*/)); _GL_CXXALIASWARN (mkostemp); #elif defined GNULIB_POSIXCHECK # undef mkostemp # if HAVE_RAW_DECL_MKOSTEMP _GL_WARN_ON_USE (mkostemp, "mkostemp is unportable - " "use gnulib module mkostemp for portability"); # endif #endif #if @GNULIB_MKOSTEMPS@ /* Create a unique temporary file from TEMPLATE. The last six characters of TEMPLATE before a suffix of length SUFFIXLEN must be "XXXXXX"; they are replaced with a string that makes the file name unique. The flags are a bitmask, possibly including O_CLOEXEC (defined in <fcntl.h>) and O_TEXT, O_BINARY (defined in "binary-io.h"). The file is then created, with the specified flags, ensuring it didn't exist before. The file is created read-write (mask at least 0600 & ~umask), but it may be world-readable and world-writable (mask 0666 & ~umask), depending on the implementation. Returns the open file descriptor if successful, otherwise -1 and errno set. */ # if !@HAVE_MKOSTEMPS@ _GL_FUNCDECL_SYS (mkostemps, int, (char * /*template*/, int /*suffixlen*/, int /*flags*/) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (mkostemps, int, (char * /*template*/, int /*suffixlen*/, int /*flags*/)); _GL_CXXALIASWARN (mkostemps); #elif defined GNULIB_POSIXCHECK # undef mkostemps # if HAVE_RAW_DECL_MKOSTEMPS _GL_WARN_ON_USE (mkostemps, "mkostemps is unportable - " "use gnulib module mkostemps for portability"); # endif #endif #if @GNULIB_MKSTEMP@ /* Create a unique temporary file from TEMPLATE. The last six characters of TEMPLATE must be "XXXXXX"; they are replaced with a string that makes the file name unique. The file is then created, ensuring it didn't exist before. The file is created read-write (mask at least 0600 & ~umask), but it may be world-readable and world-writable (mask 0666 & ~umask), depending on the implementation. Returns the open file descriptor if successful, otherwise -1 and errno set. */ # if @REPLACE_MKSTEMP@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define mkstemp rpl_mkstemp # endif _GL_FUNCDECL_RPL (mkstemp, int, (char * /*template*/) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (mkstemp, int, (char * /*template*/)); # else # if ! @HAVE_MKSTEMP@ _GL_FUNCDECL_SYS (mkstemp, int, (char * /*template*/) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (mkstemp, int, (char * /*template*/)); # endif _GL_CXXALIASWARN (mkstemp); #elif defined GNULIB_POSIXCHECK # undef mkstemp # if HAVE_RAW_DECL_MKSTEMP _GL_WARN_ON_USE (mkstemp, "mkstemp is unportable - " "use gnulib module mkstemp for portability"); # endif #endif #if @GNULIB_MKSTEMPS@ /* Create a unique temporary file from TEMPLATE. The last six characters of TEMPLATE prior to a suffix of length SUFFIXLEN must be "XXXXXX"; they are replaced with a string that makes the file name unique. The file is then created, ensuring it didn't exist before. The file is created read-write (mask at least 0600 & ~umask), but it may be world-readable and world-writable (mask 0666 & ~umask), depending on the implementation. Returns the open file descriptor if successful, otherwise -1 and errno set. */ # if !@HAVE_MKSTEMPS@ _GL_FUNCDECL_SYS (mkstemps, int, (char * /*template*/, int /*suffixlen*/) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (mkstemps, int, (char * /*template*/, int /*suffixlen*/)); _GL_CXXALIASWARN (mkstemps); #elif defined GNULIB_POSIXCHECK # undef mkstemps # if HAVE_RAW_DECL_MKSTEMPS _GL_WARN_ON_USE (mkstemps, "mkstemps is unportable - " "use gnulib module mkstemps for portability"); # endif #endif #if @GNULIB_POSIX_OPENPT@ /* Return an FD open to the master side of a pseudo-terminal. Flags should include O_RDWR, and may also include O_NOCTTY. */ # if !@HAVE_POSIX_OPENPT@ _GL_FUNCDECL_SYS (posix_openpt, int, (int flags)); # endif _GL_CXXALIAS_SYS (posix_openpt, int, (int flags)); _GL_CXXALIASWARN (posix_openpt); #elif defined GNULIB_POSIXCHECK # undef posix_openpt # if HAVE_RAW_DECL_POSIX_OPENPT _GL_WARN_ON_USE (posix_openpt, "posix_openpt is not portable - " "use gnulib module posix_openpt for portability"); # endif #endif #if @GNULIB_PTSNAME@ /* Return the pathname of the pseudo-terminal slave associated with the master FD is open on, or NULL on errors. */ # if !@HAVE_PTSNAME@ _GL_FUNCDECL_SYS (ptsname, char *, (int fd)); # endif _GL_CXXALIAS_SYS (ptsname, char *, (int fd)); _GL_CXXALIASWARN (ptsname); #elif defined GNULIB_POSIXCHECK # undef ptsname # if HAVE_RAW_DECL_PTSNAME _GL_WARN_ON_USE (ptsname, "ptsname is not portable - " "use gnulib module ptsname for portability"); # endif #endif #if @GNULIB_PTSNAME_R@ /* Set the pathname of the pseudo-terminal slave associated with the master FD is open on and return 0, or set errno and return non-zero on errors. */ # if @REPLACE_PTSNAME_R@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef ptsname_r # define ptsname_r rpl_ptsname_r # endif _GL_FUNCDECL_RPL (ptsname_r, int, (int fd, char *buf, size_t len)); _GL_CXXALIAS_RPL (ptsname_r, int, (int fd, char *buf, size_t len)); # else # if !@HAVE_PTSNAME_R@ _GL_FUNCDECL_SYS (ptsname_r, int, (int fd, char *buf, size_t len)); # endif _GL_CXXALIAS_SYS (ptsname_r, int, (int fd, char *buf, size_t len)); # endif _GL_CXXALIASWARN (ptsname_r); #elif defined GNULIB_POSIXCHECK # undef ptsname_r # if HAVE_RAW_DECL_PTSNAME_R _GL_WARN_ON_USE (ptsname_r, "ptsname_r is not portable - " "use gnulib module ptsname_r for portability"); # endif #endif #if @GNULIB_PUTENV@ # if @REPLACE_PUTENV@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef putenv # define putenv rpl_putenv # endif _GL_FUNCDECL_RPL (putenv, int, (char *string) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (putenv, int, (char *string)); # else _GL_CXXALIAS_SYS (putenv, int, (char *string)); # endif _GL_CXXALIASWARN (putenv); #endif #if @GNULIB_RANDOM_R@ # if !@HAVE_RANDOM_R@ # ifndef RAND_MAX # define RAND_MAX 2147483647 # endif # endif #endif #if @GNULIB_RANDOM_R@ # if !@HAVE_RANDOM_R@ _GL_FUNCDECL_SYS (random_r, int, (struct random_data *buf, int32_t *result) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (random_r, int, (struct random_data *buf, int32_t *result)); _GL_CXXALIASWARN (random_r); #elif defined GNULIB_POSIXCHECK # undef random_r # if HAVE_RAW_DECL_RANDOM_R _GL_WARN_ON_USE (random_r, "random_r is unportable - " "use gnulib module random_r for portability"); # endif #endif #if @GNULIB_RANDOM_R@ # if !@HAVE_RANDOM_R@ _GL_FUNCDECL_SYS (srandom_r, int, (unsigned int seed, struct random_data *rand_state) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (srandom_r, int, (unsigned int seed, struct random_data *rand_state)); _GL_CXXALIASWARN (srandom_r); #elif defined GNULIB_POSIXCHECK # undef srandom_r # if HAVE_RAW_DECL_SRANDOM_R _GL_WARN_ON_USE (srandom_r, "srandom_r is unportable - " "use gnulib module random_r for portability"); # endif #endif #if @GNULIB_RANDOM_R@ # if !@HAVE_RANDOM_R@ _GL_FUNCDECL_SYS (initstate_r, int, (unsigned int seed, char *buf, size_t buf_size, struct random_data *rand_state) _GL_ARG_NONNULL ((2, 4))); # endif _GL_CXXALIAS_SYS (initstate_r, int, (unsigned int seed, char *buf, size_t buf_size, struct random_data *rand_state)); _GL_CXXALIASWARN (initstate_r); #elif defined GNULIB_POSIXCHECK # undef initstate_r # if HAVE_RAW_DECL_INITSTATE_R _GL_WARN_ON_USE (initstate_r, "initstate_r is unportable - " "use gnulib module random_r for portability"); # endif #endif #if @GNULIB_RANDOM_R@ # if !@HAVE_RANDOM_R@ _GL_FUNCDECL_SYS (setstate_r, int, (char *arg_state, struct random_data *rand_state) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (setstate_r, int, (char *arg_state, struct random_data *rand_state)); _GL_CXXALIASWARN (setstate_r); #elif defined GNULIB_POSIXCHECK # undef setstate_r # if HAVE_RAW_DECL_SETSTATE_R _GL_WARN_ON_USE (setstate_r, "setstate_r is unportable - " "use gnulib module random_r for portability"); # endif #endif #if @GNULIB_REALLOC_POSIX@ # if @REPLACE_REALLOC@ # if !((defined __cplusplus && defined GNULIB_NAMESPACE) \ || _GL_USE_STDLIB_ALLOC) # undef realloc # define realloc rpl_realloc # endif _GL_FUNCDECL_RPL (realloc, void *, (void *ptr, size_t size)); _GL_CXXALIAS_RPL (realloc, void *, (void *ptr, size_t size)); # else _GL_CXXALIAS_SYS (realloc, void *, (void *ptr, size_t size)); # endif _GL_CXXALIASWARN (realloc); #elif defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC # undef realloc /* Assume realloc is always declared. */ _GL_WARN_ON_USE (realloc, "realloc is not POSIX compliant everywhere - " "use gnulib module realloc-posix for portability"); #endif #if @GNULIB_REALPATH@ # if @REPLACE_REALPATH@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define realpath rpl_realpath # endif _GL_FUNCDECL_RPL (realpath, char *, (const char *name, char *resolved) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (realpath, char *, (const char *name, char *resolved)); # else # if !@HAVE_REALPATH@ _GL_FUNCDECL_SYS (realpath, char *, (const char *name, char *resolved) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (realpath, char *, (const char *name, char *resolved)); # endif _GL_CXXALIASWARN (realpath); #elif defined GNULIB_POSIXCHECK # undef realpath # if HAVE_RAW_DECL_REALPATH _GL_WARN_ON_USE (realpath, "realpath is unportable - use gnulib module " "canonicalize or canonicalize-lgpl for portability"); # endif #endif #if @GNULIB_RPMATCH@ /* Test a user response to a question. Return 1 if it is affirmative, 0 if it is negative, or -1 if not clear. */ # if !@HAVE_RPMATCH@ _GL_FUNCDECL_SYS (rpmatch, int, (const char *response) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (rpmatch, int, (const char *response)); _GL_CXXALIASWARN (rpmatch); #elif defined GNULIB_POSIXCHECK # undef rpmatch # if HAVE_RAW_DECL_RPMATCH _GL_WARN_ON_USE (rpmatch, "rpmatch is unportable - " "use gnulib module rpmatch for portability"); # endif #endif #if @GNULIB_SETENV@ /* Set NAME to VALUE in the environment. If REPLACE is nonzero, overwrite an existing value. */ # if @REPLACE_SETENV@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef setenv # define setenv rpl_setenv # endif _GL_FUNCDECL_RPL (setenv, int, (const char *name, const char *value, int replace) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (setenv, int, (const char *name, const char *value, int replace)); # else # if !@HAVE_DECL_SETENV@ _GL_FUNCDECL_SYS (setenv, int, (const char *name, const char *value, int replace) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (setenv, int, (const char *name, const char *value, int replace)); # endif # if !(@REPLACE_SETENV@ && !@HAVE_DECL_SETENV@) _GL_CXXALIASWARN (setenv); # endif #elif defined GNULIB_POSIXCHECK # undef setenv # if HAVE_RAW_DECL_SETENV _GL_WARN_ON_USE (setenv, "setenv is unportable - " "use gnulib module setenv for portability"); # endif #endif #if @GNULIB_STRTOD@ /* Parse a double from STRING, updating ENDP if appropriate. */ # if @REPLACE_STRTOD@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define strtod rpl_strtod # endif _GL_FUNCDECL_RPL (strtod, double, (const char *str, char **endp) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (strtod, double, (const char *str, char **endp)); # else # if !@HAVE_STRTOD@ _GL_FUNCDECL_SYS (strtod, double, (const char *str, char **endp) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (strtod, double, (const char *str, char **endp)); # endif _GL_CXXALIASWARN (strtod); #elif defined GNULIB_POSIXCHECK # undef strtod # if HAVE_RAW_DECL_STRTOD _GL_WARN_ON_USE (strtod, "strtod is unportable - " "use gnulib module strtod for portability"); # endif #endif #if @GNULIB_STRTOLL@ /* Parse a signed integer whose textual representation starts at STRING. The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0, it may be decimal or octal (with prefix "0") or hexadecimal (with prefix "0x"). If ENDPTR is not NULL, the address of the first byte after the integer is stored in *ENDPTR. Upon overflow, the return value is LLONG_MAX or LLONG_MIN, and errno is set to ERANGE. */ # if !@HAVE_STRTOLL@ _GL_FUNCDECL_SYS (strtoll, long long, (const char *string, char **endptr, int base) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (strtoll, long long, (const char *string, char **endptr, int base)); _GL_CXXALIASWARN (strtoll); #elif defined GNULIB_POSIXCHECK # undef strtoll # if HAVE_RAW_DECL_STRTOLL _GL_WARN_ON_USE (strtoll, "strtoll is unportable - " "use gnulib module strtoll for portability"); # endif #endif #if @GNULIB_STRTOULL@ /* Parse an unsigned integer whose textual representation starts at STRING. The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0, it may be decimal or octal (with prefix "0") or hexadecimal (with prefix "0x"). If ENDPTR is not NULL, the address of the first byte after the integer is stored in *ENDPTR. Upon overflow, the return value is ULLONG_MAX, and errno is set to ERANGE. */ # if !@HAVE_STRTOULL@ _GL_FUNCDECL_SYS (strtoull, unsigned long long, (const char *string, char **endptr, int base) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (strtoull, unsigned long long, (const char *string, char **endptr, int base)); _GL_CXXALIASWARN (strtoull); #elif defined GNULIB_POSIXCHECK # undef strtoull # if HAVE_RAW_DECL_STRTOULL _GL_WARN_ON_USE (strtoull, "strtoull is unportable - " "use gnulib module strtoull for portability"); # endif #endif #if @GNULIB_UNLOCKPT@ /* Unlock the slave side of the pseudo-terminal whose master side is specified by FD, so that it can be opened. */ # if !@HAVE_UNLOCKPT@ _GL_FUNCDECL_SYS (unlockpt, int, (int fd)); # endif _GL_CXXALIAS_SYS (unlockpt, int, (int fd)); _GL_CXXALIASWARN (unlockpt); #elif defined GNULIB_POSIXCHECK # undef unlockpt # if HAVE_RAW_DECL_UNLOCKPT _GL_WARN_ON_USE (unlockpt, "unlockpt is not portable - " "use gnulib module unlockpt for portability"); # endif #endif #if @GNULIB_UNSETENV@ /* Remove the variable NAME from the environment. */ # if @REPLACE_UNSETENV@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef unsetenv # define unsetenv rpl_unsetenv # endif _GL_FUNCDECL_RPL (unsetenv, int, (const char *name) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (unsetenv, int, (const char *name)); # else # if !@HAVE_DECL_UNSETENV@ _GL_FUNCDECL_SYS (unsetenv, int, (const char *name) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (unsetenv, int, (const char *name)); # endif # if !(@REPLACE_UNSETENV@ && !@HAVE_DECL_UNSETENV@) _GL_CXXALIASWARN (unsetenv); # endif #elif defined GNULIB_POSIXCHECK # undef unsetenv # if HAVE_RAW_DECL_UNSETENV _GL_WARN_ON_USE (unsetenv, "unsetenv is unportable - " "use gnulib module unsetenv for portability"); # endif #endif /* Convert a wide character to a multibyte character. */ #if @GNULIB_WCTOMB@ # if @REPLACE_WCTOMB@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef wctomb # define wctomb rpl_wctomb # endif _GL_FUNCDECL_RPL (wctomb, int, (char *s, wchar_t wc)); _GL_CXXALIAS_RPL (wctomb, int, (char *s, wchar_t wc)); # else _GL_CXXALIAS_SYS (wctomb, int, (char *s, wchar_t wc)); # endif _GL_CXXALIASWARN (wctomb); #endif #endif /* _@GUARD_PREFIX@_STDLIB_H */ #endif /* _@GUARD_PREFIX@_STDLIB_H */ #endif ������������������source-highlight-3.1.6/gl/m4/�����������������������������������������������������������������������0000775�0001750�0001750�00000000000�11676051667�012732� 5����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/gl/m4/gnulib-comp.m4���������������������������������������������������������0000664�0001750�0001750�00000024520�11672675562�015335� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# DO NOT EDIT! GENERATED AUTOMATICALLY! # Copyright (C) 2002-2011 Free Software Foundation, Inc. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This file is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this file. If not, see <http://www.gnu.org/licenses/>. # # As a special exception to the GNU General Public License, # this file may be distributed as part of a program that # contains a configuration script generated by Autoconf, under # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. # # This file represents the compiled summary of the specification in # gnulib-cache.m4. It lists the computed macro invocations that need # to be invoked from configure.ac. # In projects that use version control, this file can be treated like # other built files. # This macro should be invoked from ./configure.ac, in the section # "Checks for programs", right after AC_PROG_CC, and certainly before # any checks for libraries, header files, types and library functions. AC_DEFUN([gl_EARLY], [ m4_pattern_forbid([^gl_[A-Z]])dnl the gnulib macro namespace m4_pattern_allow([^gl_ES$])dnl a valid locale name m4_pattern_allow([^gl_LIBOBJS$])dnl a variable m4_pattern_allow([^gl_LTLIBOBJS$])dnl a variable AC_REQUIRE([gl_PROG_AR_RANLIB]) # Code from module dirent: # Code from module dirname-lgpl: # Code from module dosname: # Code from module double-slash-root: # Code from module extensions: AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) # Code from module getopt: # Code from module getopt-gnu: # Code from module getopt-posix: # Code from module gettext-h: # Code from module include_next: # Code from module malloc-posix: # Code from module memset: # Code from module mkdir: # Code from module nocrash: # Code from module progname: # Code from module snippet/_Noreturn: # Code from module snippet/arg-nonnull: # Code from module snippet/c++defs: # Code from module snippet/warn-on-use: # Code from module ssize_t: # Code from module stdbool: # Code from module stddef: # Code from module stdlib: # Code from module strdup: # Code from module string: # Code from module sys_stat: # Code from module time: # Code from module unistd: ]) # This macro should be invoked from ./configure.ac, in the section # "Check for header files, types and library functions". AC_DEFUN([gl_INIT], [ AM_CONDITIONAL([GL_COND_LIBTOOL], [true]) gl_cond_libtool=true gl_m4_base='gl/m4' m4_pushdef([AC_LIBOBJ], m4_defn([gl_LIBOBJ])) m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gl_REPLACE_FUNCS])) m4_pushdef([AC_LIBSOURCES], m4_defn([gl_LIBSOURCES])) m4_pushdef([gl_LIBSOURCES_LIST], []) m4_pushdef([gl_LIBSOURCES_DIR], []) gl_COMMON gl_source_base='gl' gl_DIRENT_H gl_DIRNAME_LGPL gl_DOUBLE_SLASH_ROOT gl_FUNC_GETOPT_GNU if test $REPLACE_GETOPT = 1; then AC_LIBOBJ([getopt]) AC_LIBOBJ([getopt1]) gl_PREREQ_GETOPT dnl Arrange for unistd.h to include getopt.h. GNULIB_GL_UNISTD_H_GETOPT=1 fi AC_SUBST([GNULIB_GL_UNISTD_H_GETOPT]) gl_MODULE_INDICATOR_FOR_TESTS([getopt-gnu]) gl_FUNC_GETOPT_POSIX if test $REPLACE_GETOPT = 1; then AC_LIBOBJ([getopt]) AC_LIBOBJ([getopt1]) gl_PREREQ_GETOPT dnl Arrange for unistd.h to include getopt.h. GNULIB_GL_UNISTD_H_GETOPT=1 fi AC_SUBST([GNULIB_GL_UNISTD_H_GETOPT]) AC_SUBST([LIBINTL]) AC_SUBST([LTLIBINTL]) gl_FUNC_MALLOC_POSIX if test $REPLACE_MALLOC = 1; then AC_LIBOBJ([malloc]) fi gl_STDLIB_MODULE_INDICATOR([malloc-posix]) gl_FUNC_MEMSET if test $ac_cv_func_memset = no; then AC_LIBOBJ([memset]) gl_PREREQ_MEMSET fi gl_FUNC_MKDIR if test $REPLACE_MKDIR = 1; then AC_LIBOBJ([mkdir]) fi AC_CHECK_DECLS([program_invocation_name], [], [], [#include <errno.h>]) AC_CHECK_DECLS([program_invocation_short_name], [], [], [#include <errno.h>]) gt_TYPE_SSIZE_T AM_STDBOOL_H gl_STDDEF_H gl_STDLIB_H gl_FUNC_STRDUP if test $ac_cv_func_strdup = no; then AC_LIBOBJ([strdup]) gl_PREREQ_STRDUP fi gl_STRING_MODULE_INDICATOR([strdup]) gl_HEADER_STRING_H gl_HEADER_SYS_STAT_H AC_PROG_MKDIR_P gl_HEADER_TIME_H gl_UNISTD_H # End of code from modules m4_ifval(gl_LIBSOURCES_LIST, [ m4_syscmd([test ! -d ]m4_defn([gl_LIBSOURCES_DIR])[ || for gl_file in ]gl_LIBSOURCES_LIST[ ; do if test ! -r ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file ; then echo "missing file ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file" >&2 exit 1 fi done])dnl m4_if(m4_sysval, [0], [], [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])]) ]) m4_popdef([gl_LIBSOURCES_DIR]) m4_popdef([gl_LIBSOURCES_LIST]) m4_popdef([AC_LIBSOURCES]) m4_popdef([AC_REPLACE_FUNCS]) m4_popdef([AC_LIBOBJ]) AC_CONFIG_COMMANDS_PRE([ gl_libobjs= gl_ltlibobjs= if test -n "$gl_LIBOBJS"; then # Remove the extension. sed_drop_objext='s/\.o$//;s/\.obj$//' for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do gl_libobjs="$gl_libobjs $i.$ac_objext" gl_ltlibobjs="$gl_ltlibobjs $i.lo" done fi AC_SUBST([gl_LIBOBJS], [$gl_libobjs]) AC_SUBST([gl_LTLIBOBJS], [$gl_ltlibobjs]) ]) gltests_libdeps= gltests_ltlibdeps= m4_pushdef([AC_LIBOBJ], m4_defn([gltests_LIBOBJ])) m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gltests_REPLACE_FUNCS])) m4_pushdef([AC_LIBSOURCES], m4_defn([gltests_LIBSOURCES])) m4_pushdef([gltests_LIBSOURCES_LIST], []) m4_pushdef([gltests_LIBSOURCES_DIR], []) gl_COMMON gl_source_base='tests' changequote(,)dnl gltests_WITNESS=IN_`echo "${PACKAGE-$PACKAGE_TARNAME}" | LC_ALL=C tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ | LC_ALL=C sed -e 's/[^A-Z0-9_]/_/g'`_GNULIB_TESTS changequote([, ])dnl AC_SUBST([gltests_WITNESS]) gl_module_indicator_condition=$gltests_WITNESS m4_pushdef([gl_MODULE_INDICATOR_CONDITION], [$gl_module_indicator_condition]) m4_popdef([gl_MODULE_INDICATOR_CONDITION]) m4_ifval(gltests_LIBSOURCES_LIST, [ m4_syscmd([test ! -d ]m4_defn([gltests_LIBSOURCES_DIR])[ || for gl_file in ]gltests_LIBSOURCES_LIST[ ; do if test ! -r ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file ; then echo "missing file ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file" >&2 exit 1 fi done])dnl m4_if(m4_sysval, [0], [], [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])]) ]) m4_popdef([gltests_LIBSOURCES_DIR]) m4_popdef([gltests_LIBSOURCES_LIST]) m4_popdef([AC_LIBSOURCES]) m4_popdef([AC_REPLACE_FUNCS]) m4_popdef([AC_LIBOBJ]) AC_CONFIG_COMMANDS_PRE([ gltests_libobjs= gltests_ltlibobjs= if test -n "$gltests_LIBOBJS"; then # Remove the extension. sed_drop_objext='s/\.o$//;s/\.obj$//' for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do gltests_libobjs="$gltests_libobjs $i.$ac_objext" gltests_ltlibobjs="$gltests_ltlibobjs $i.lo" done fi AC_SUBST([gltests_LIBOBJS], [$gltests_libobjs]) AC_SUBST([gltests_LTLIBOBJS], [$gltests_ltlibobjs]) ]) ]) # Like AC_LIBOBJ, except that the module name goes # into gl_LIBOBJS instead of into LIBOBJS. AC_DEFUN([gl_LIBOBJ], [ AS_LITERAL_IF([$1], [gl_LIBSOURCES([$1.c])])dnl gl_LIBOBJS="$gl_LIBOBJS $1.$ac_objext" ]) # Like AC_REPLACE_FUNCS, except that the module name goes # into gl_LIBOBJS instead of into LIBOBJS. AC_DEFUN([gl_REPLACE_FUNCS], [ m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl AC_CHECK_FUNCS([$1], , [gl_LIBOBJ($ac_func)]) ]) # Like AC_LIBSOURCES, except the directory where the source file is # expected is derived from the gnulib-tool parameterization, # and alloca is special cased (for the alloca-opt module). # We could also entirely rely on EXTRA_lib..._SOURCES. AC_DEFUN([gl_LIBSOURCES], [ m4_foreach([_gl_NAME], [$1], [ m4_if(_gl_NAME, [alloca.c], [], [ m4_define([gl_LIBSOURCES_DIR], [gl]) m4_append([gl_LIBSOURCES_LIST], _gl_NAME, [ ]) ]) ]) ]) # Like AC_LIBOBJ, except that the module name goes # into gltests_LIBOBJS instead of into LIBOBJS. AC_DEFUN([gltests_LIBOBJ], [ AS_LITERAL_IF([$1], [gltests_LIBSOURCES([$1.c])])dnl gltests_LIBOBJS="$gltests_LIBOBJS $1.$ac_objext" ]) # Like AC_REPLACE_FUNCS, except that the module name goes # into gltests_LIBOBJS instead of into LIBOBJS. AC_DEFUN([gltests_REPLACE_FUNCS], [ m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl AC_CHECK_FUNCS([$1], , [gltests_LIBOBJ($ac_func)]) ]) # Like AC_LIBSOURCES, except the directory where the source file is # expected is derived from the gnulib-tool parameterization, # and alloca is special cased (for the alloca-opt module). # We could also entirely rely on EXTRA_lib..._SOURCES. AC_DEFUN([gltests_LIBSOURCES], [ m4_foreach([_gl_NAME], [$1], [ m4_if(_gl_NAME, [alloca.c], [], [ m4_define([gltests_LIBSOURCES_DIR], [tests]) m4_append([gltests_LIBSOURCES_LIST], _gl_NAME, [ ]) ]) ]) ]) # This macro records the list of files which have been installed by # gnulib-tool and may be removed by future gnulib-tool invocations. AC_DEFUN([gl_FILE_LIST], [ build-aux/snippet/_Noreturn.h build-aux/snippet/arg-nonnull.h build-aux/snippet/c++defs.h build-aux/snippet/warn-on-use.h lib/basename-lgpl.c lib/dirent.in.h lib/dirname-lgpl.c lib/dirname.h lib/dosname.h lib/getopt.c lib/getopt.in.h lib/getopt1.c lib/getopt_int.h lib/gettext.h lib/malloc.c lib/memset.c lib/mkdir.c lib/progname.c lib/progname.h lib/stdbool.in.h lib/stddef.in.h lib/stdlib.in.h lib/strdup.c lib/string.in.h lib/stripslash.c lib/sys_stat.in.h lib/time.in.h lib/unistd.in.h m4/00gnulib.m4 m4/dirent_h.m4 m4/dirname.m4 m4/double-slash-root.m4 m4/extensions.m4 m4/getopt.m4 m4/gnulib-common.m4 m4/include_next.m4 m4/malloc.m4 m4/memset.m4 m4/mkdir.m4 m4/nocrash.m4 m4/ssize_t.m4 m4/stdbool.m4 m4/stddef_h.m4 m4/stdlib_h.m4 m4/strdup.m4 m4/string_h.m4 m4/sys_stat_h.m4 m4/time_h.m4 m4/unistd_h.m4 m4/warn-on-use.m4 m4/wchar_t.m4 ]) ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/gl/m4/sys_stat_h.m4����������������������������������������������������������0000664�0001750�0001750�00000006520�11672675562�015301� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# sys_stat_h.m4 serial 26 -*- Autoconf -*- dnl Copyright (C) 2006-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Eric Blake. dnl Provide a GNU-like <sys/stat.h>. AC_DEFUN([gl_HEADER_SYS_STAT_H], [ AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) dnl For the mkdir substitute. AC_REQUIRE([AC_C_INLINE]) dnl Check for broken stat macros. AC_REQUIRE([AC_HEADER_STAT]) gl_CHECK_NEXT_HEADERS([sys/stat.h]) dnl Ensure the type mode_t gets defined. AC_REQUIRE([AC_TYPE_MODE_T]) dnl Define types that are supposed to be defined in <sys/types.h> or dnl <sys/stat.h>. AC_CHECK_TYPE([nlink_t], [], [AC_DEFINE([nlink_t], [int], [Define to the type of st_nlink in struct stat, or a supertype.])], [#include <sys/types.h> #include <sys/stat.h>]) dnl Check for declarations of anything we want to poison if the dnl corresponding gnulib module is not in use. gl_WARN_ON_USE_PREPARE([[#include <sys/stat.h> ]], [fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat]) ]) # gl_HEADER_SYS_STAT_H AC_DEFUN([gl_SYS_STAT_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) AC_DEFUN([gl_SYS_STAT_H_DEFAULTS], [ AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) dnl for REPLACE_FCHDIR GNULIB_FCHMODAT=0; AC_SUBST([GNULIB_FCHMODAT]) GNULIB_FSTAT=0; AC_SUBST([GNULIB_FSTAT]) GNULIB_FSTATAT=0; AC_SUBST([GNULIB_FSTATAT]) GNULIB_FUTIMENS=0; AC_SUBST([GNULIB_FUTIMENS]) GNULIB_LCHMOD=0; AC_SUBST([GNULIB_LCHMOD]) GNULIB_LSTAT=0; AC_SUBST([GNULIB_LSTAT]) GNULIB_MKDIRAT=0; AC_SUBST([GNULIB_MKDIRAT]) GNULIB_MKFIFO=0; AC_SUBST([GNULIB_MKFIFO]) GNULIB_MKFIFOAT=0; AC_SUBST([GNULIB_MKFIFOAT]) GNULIB_MKNOD=0; AC_SUBST([GNULIB_MKNOD]) GNULIB_MKNODAT=0; AC_SUBST([GNULIB_MKNODAT]) GNULIB_STAT=0; AC_SUBST([GNULIB_STAT]) GNULIB_UTIMENSAT=0; AC_SUBST([GNULIB_UTIMENSAT]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_FCHMODAT=1; AC_SUBST([HAVE_FCHMODAT]) HAVE_FSTATAT=1; AC_SUBST([HAVE_FSTATAT]) HAVE_FUTIMENS=1; AC_SUBST([HAVE_FUTIMENS]) HAVE_LCHMOD=1; AC_SUBST([HAVE_LCHMOD]) HAVE_LSTAT=1; AC_SUBST([HAVE_LSTAT]) HAVE_MKDIRAT=1; AC_SUBST([HAVE_MKDIRAT]) HAVE_MKFIFO=1; AC_SUBST([HAVE_MKFIFO]) HAVE_MKFIFOAT=1; AC_SUBST([HAVE_MKFIFOAT]) HAVE_MKNOD=1; AC_SUBST([HAVE_MKNOD]) HAVE_MKNODAT=1; AC_SUBST([HAVE_MKNODAT]) HAVE_UTIMENSAT=1; AC_SUBST([HAVE_UTIMENSAT]) REPLACE_FSTAT=0; AC_SUBST([REPLACE_FSTAT]) REPLACE_FSTATAT=0; AC_SUBST([REPLACE_FSTATAT]) REPLACE_FUTIMENS=0; AC_SUBST([REPLACE_FUTIMENS]) REPLACE_LSTAT=0; AC_SUBST([REPLACE_LSTAT]) REPLACE_MKDIR=0; AC_SUBST([REPLACE_MKDIR]) REPLACE_MKFIFO=0; AC_SUBST([REPLACE_MKFIFO]) REPLACE_MKNOD=0; AC_SUBST([REPLACE_MKNOD]) REPLACE_STAT=0; AC_SUBST([REPLACE_STAT]) REPLACE_UTIMENSAT=0; AC_SUBST([REPLACE_UTIMENSAT]) ]) ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/gl/m4/time_h.m4��������������������������������������������������������������0000664�0001750�0001750�00000010227�11672675562�014365� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Configure a more-standard replacement for <time.h>. # Copyright (C) 2000-2001, 2003-2007, 2009-2011 Free Software Foundation, Inc. # serial 6 # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # Written by Paul Eggert and Jim Meyering. AC_DEFUN([gl_HEADER_TIME_H], [ dnl Use AC_REQUIRE here, so that the default behavior below is expanded dnl once only, before all statements that occur in other macros. AC_REQUIRE([gl_HEADER_TIME_H_BODY]) ]) AC_DEFUN([gl_HEADER_TIME_H_BODY], [ AC_REQUIRE([AC_C_RESTRICT]) AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) gl_NEXT_HEADERS([time.h]) AC_REQUIRE([gl_CHECK_TYPE_STRUCT_TIMESPEC]) ]) dnl Define HAVE_STRUCT_TIMESPEC if `struct timespec' is declared dnl in time.h, sys/time.h, or pthread.h. AC_DEFUN([gl_CHECK_TYPE_STRUCT_TIMESPEC], [ AC_CHECK_HEADERS_ONCE([sys/time.h]) AC_CACHE_CHECK([for struct timespec in <time.h>], [gl_cv_sys_struct_timespec_in_time_h], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#include <time.h> ]], [[static struct timespec x; x.tv_sec = x.tv_nsec;]])], [gl_cv_sys_struct_timespec_in_time_h=yes], [gl_cv_sys_struct_timespec_in_time_h=no])]) TIME_H_DEFINES_STRUCT_TIMESPEC=0 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then TIME_H_DEFINES_STRUCT_TIMESPEC=1 else AC_CACHE_CHECK([for struct timespec in <sys/time.h>], [gl_cv_sys_struct_timespec_in_sys_time_h], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#include <sys/time.h> ]], [[static struct timespec x; x.tv_sec = x.tv_nsec;]])], [gl_cv_sys_struct_timespec_in_sys_time_h=yes], [gl_cv_sys_struct_timespec_in_sys_time_h=no])]) if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1 else AC_CACHE_CHECK([for struct timespec in <pthread.h>], [gl_cv_sys_struct_timespec_in_pthread_h], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#include <pthread.h> ]], [[static struct timespec x; x.tv_sec = x.tv_nsec;]])], [gl_cv_sys_struct_timespec_in_pthread_h=yes], [gl_cv_sys_struct_timespec_in_pthread_h=no])]) if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1 fi fi fi AC_SUBST([TIME_H_DEFINES_STRUCT_TIMESPEC]) AC_SUBST([SYS_TIME_H_DEFINES_STRUCT_TIMESPEC]) AC_SUBST([PTHREAD_H_DEFINES_STRUCT_TIMESPEC]) ]) AC_DEFUN([gl_TIME_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) AC_DEFUN([gl_HEADER_TIME_H_DEFAULTS], [ GNULIB_MKTIME=0; AC_SUBST([GNULIB_MKTIME]) GNULIB_NANOSLEEP=0; AC_SUBST([GNULIB_NANOSLEEP]) GNULIB_STRPTIME=0; AC_SUBST([GNULIB_STRPTIME]) GNULIB_TIMEGM=0; AC_SUBST([GNULIB_TIMEGM]) GNULIB_TIME_R=0; AC_SUBST([GNULIB_TIME_R]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_DECL_LOCALTIME_R=1; AC_SUBST([HAVE_DECL_LOCALTIME_R]) HAVE_NANOSLEEP=1; AC_SUBST([HAVE_NANOSLEEP]) HAVE_STRPTIME=1; AC_SUBST([HAVE_STRPTIME]) HAVE_TIMEGM=1; AC_SUBST([HAVE_TIMEGM]) dnl If another module says to replace or to not replace, do that. dnl Otherwise, replace only if someone compiles with -DGNULIB_PORTCHECK; dnl this lets maintainers check for portability. REPLACE_LOCALTIME_R=GNULIB_PORTCHECK; AC_SUBST([REPLACE_LOCALTIME_R]) REPLACE_MKTIME=GNULIB_PORTCHECK; AC_SUBST([REPLACE_MKTIME]) REPLACE_NANOSLEEP=GNULIB_PORTCHECK; AC_SUBST([REPLACE_NANOSLEEP]) REPLACE_TIMEGM=GNULIB_PORTCHECK; AC_SUBST([REPLACE_TIMEGM]) ]) �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/gl/m4/stdlib_h.m4������������������������������������������������������������0000664�0001750�0001750�00000012272�11672675562�014712� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# stdlib_h.m4 serial 39 dnl Copyright (C) 2007-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_STDLIB_H], [ AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) gl_NEXT_HEADERS([stdlib.h]) dnl Check for declarations of anything we want to poison if the dnl corresponding gnulib module is not in use, and which is not dnl guaranteed by C89. gl_WARN_ON_USE_PREPARE([[#include <stdlib.h> #if HAVE_SYS_LOADAVG_H # include <sys/loadavg.h> #endif #if HAVE_RANDOM_H # include <random.h> #endif ]], [_Exit atoll canonicalize_file_name getloadavg getsubopt grantpt initstate_r mkdtemp mkostemp mkostemps mkstemp mkstemps posix_openpt ptsname ptsname_r random_r realpath rpmatch setenv setstate_r srandom_r strtod strtoll strtoull unlockpt unsetenv]) ]) AC_DEFUN([gl_STDLIB_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) AC_DEFUN([gl_STDLIB_H_DEFAULTS], [ GNULIB__EXIT=0; AC_SUBST([GNULIB__EXIT]) GNULIB_ATOLL=0; AC_SUBST([GNULIB_ATOLL]) GNULIB_CALLOC_POSIX=0; AC_SUBST([GNULIB_CALLOC_POSIX]) GNULIB_CANONICALIZE_FILE_NAME=0; AC_SUBST([GNULIB_CANONICALIZE_FILE_NAME]) GNULIB_GETLOADAVG=0; AC_SUBST([GNULIB_GETLOADAVG]) GNULIB_GETSUBOPT=0; AC_SUBST([GNULIB_GETSUBOPT]) GNULIB_GRANTPT=0; AC_SUBST([GNULIB_GRANTPT]) GNULIB_MALLOC_POSIX=0; AC_SUBST([GNULIB_MALLOC_POSIX]) GNULIB_MBTOWC=0; AC_SUBST([GNULIB_MBTOWC]) GNULIB_MKDTEMP=0; AC_SUBST([GNULIB_MKDTEMP]) GNULIB_MKOSTEMP=0; AC_SUBST([GNULIB_MKOSTEMP]) GNULIB_MKOSTEMPS=0; AC_SUBST([GNULIB_MKOSTEMPS]) GNULIB_MKSTEMP=0; AC_SUBST([GNULIB_MKSTEMP]) GNULIB_MKSTEMPS=0; AC_SUBST([GNULIB_MKSTEMPS]) GNULIB_POSIX_OPENPT=0; AC_SUBST([GNULIB_POSIX_OPENPT]) GNULIB_PTSNAME=0; AC_SUBST([GNULIB_PTSNAME]) GNULIB_PTSNAME_R=0; AC_SUBST([GNULIB_PTSNAME_R]) GNULIB_PUTENV=0; AC_SUBST([GNULIB_PUTENV]) GNULIB_RANDOM_R=0; AC_SUBST([GNULIB_RANDOM_R]) GNULIB_REALLOC_POSIX=0; AC_SUBST([GNULIB_REALLOC_POSIX]) GNULIB_REALPATH=0; AC_SUBST([GNULIB_REALPATH]) GNULIB_RPMATCH=0; AC_SUBST([GNULIB_RPMATCH]) GNULIB_SETENV=0; AC_SUBST([GNULIB_SETENV]) GNULIB_STRTOD=0; AC_SUBST([GNULIB_STRTOD]) GNULIB_STRTOLL=0; AC_SUBST([GNULIB_STRTOLL]) GNULIB_STRTOULL=0; AC_SUBST([GNULIB_STRTOULL]) GNULIB_SYSTEM_POSIX=0; AC_SUBST([GNULIB_SYSTEM_POSIX]) GNULIB_UNLOCKPT=0; AC_SUBST([GNULIB_UNLOCKPT]) GNULIB_UNSETENV=0; AC_SUBST([GNULIB_UNSETENV]) GNULIB_WCTOMB=0; AC_SUBST([GNULIB_WCTOMB]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE__EXIT=1; AC_SUBST([HAVE__EXIT]) HAVE_ATOLL=1; AC_SUBST([HAVE_ATOLL]) HAVE_CANONICALIZE_FILE_NAME=1; AC_SUBST([HAVE_CANONICALIZE_FILE_NAME]) HAVE_DECL_GETLOADAVG=1; AC_SUBST([HAVE_DECL_GETLOADAVG]) HAVE_GETSUBOPT=1; AC_SUBST([HAVE_GETSUBOPT]) HAVE_GRANTPT=1; AC_SUBST([HAVE_GRANTPT]) HAVE_MKDTEMP=1; AC_SUBST([HAVE_MKDTEMP]) HAVE_MKOSTEMP=1; AC_SUBST([HAVE_MKOSTEMP]) HAVE_MKOSTEMPS=1; AC_SUBST([HAVE_MKOSTEMPS]) HAVE_MKSTEMP=1; AC_SUBST([HAVE_MKSTEMP]) HAVE_MKSTEMPS=1; AC_SUBST([HAVE_MKSTEMPS]) HAVE_POSIX_OPENPT=1; AC_SUBST([HAVE_POSIX_OPENPT]) HAVE_PTSNAME=1; AC_SUBST([HAVE_PTSNAME]) HAVE_PTSNAME_R=1; AC_SUBST([HAVE_PTSNAME_R]) HAVE_RANDOM_H=1; AC_SUBST([HAVE_RANDOM_H]) HAVE_RANDOM_R=1; AC_SUBST([HAVE_RANDOM_R]) HAVE_REALPATH=1; AC_SUBST([HAVE_REALPATH]) HAVE_RPMATCH=1; AC_SUBST([HAVE_RPMATCH]) HAVE_SETENV=1; AC_SUBST([HAVE_SETENV]) HAVE_DECL_SETENV=1; AC_SUBST([HAVE_DECL_SETENV]) HAVE_STRTOD=1; AC_SUBST([HAVE_STRTOD]) HAVE_STRTOLL=1; AC_SUBST([HAVE_STRTOLL]) HAVE_STRTOULL=1; AC_SUBST([HAVE_STRTOULL]) HAVE_STRUCT_RANDOM_DATA=1; AC_SUBST([HAVE_STRUCT_RANDOM_DATA]) HAVE_SYS_LOADAVG_H=0; AC_SUBST([HAVE_SYS_LOADAVG_H]) HAVE_UNLOCKPT=1; AC_SUBST([HAVE_UNLOCKPT]) HAVE_DECL_UNSETENV=1; AC_SUBST([HAVE_DECL_UNSETENV]) REPLACE_CALLOC=0; AC_SUBST([REPLACE_CALLOC]) REPLACE_CANONICALIZE_FILE_NAME=0; AC_SUBST([REPLACE_CANONICALIZE_FILE_NAME]) REPLACE_MALLOC=0; AC_SUBST([REPLACE_MALLOC]) REPLACE_MBTOWC=0; AC_SUBST([REPLACE_MBTOWC]) REPLACE_MKSTEMP=0; AC_SUBST([REPLACE_MKSTEMP]) REPLACE_PTSNAME_R=0; AC_SUBST([REPLACE_PTSNAME_R]) REPLACE_PUTENV=0; AC_SUBST([REPLACE_PUTENV]) REPLACE_REALLOC=0; AC_SUBST([REPLACE_REALLOC]) REPLACE_REALPATH=0; AC_SUBST([REPLACE_REALPATH]) REPLACE_SETENV=0; AC_SUBST([REPLACE_SETENV]) REPLACE_STRTOD=0; AC_SUBST([REPLACE_STRTOD]) REPLACE_UNSETENV=0; AC_SUBST([REPLACE_UNSETENV]) REPLACE_WCTOMB=0; AC_SUBST([REPLACE_WCTOMB]) ]) ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/gl/m4/stdbool.m4�������������������������������������������������������������0000664�0001750�0001750�00000006371�11672675562�014573� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Check for stdbool.h that conforms to C99. dnl Copyright (C) 2002-2006, 2009-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. #serial 5 # Prepare for substituting <stdbool.h> if it is not supported. AC_DEFUN([AM_STDBOOL_H], [ AC_REQUIRE([AC_CHECK_HEADER_STDBOOL]) # Define two additional variables used in the Makefile substitution. if test "$ac_cv_header_stdbool_h" = yes; then STDBOOL_H='' else STDBOOL_H='stdbool.h' fi AC_SUBST([STDBOOL_H]) AM_CONDITIONAL([GL_GENERATE_STDBOOL_H], [test -n "$STDBOOL_H"]) if test "$ac_cv_type__Bool" = yes; then HAVE__BOOL=1 else HAVE__BOOL=0 fi AC_SUBST([HAVE__BOOL]) ]) # AM_STDBOOL_H will be renamed to gl_STDBOOL_H in the future. AC_DEFUN([gl_STDBOOL_H], [AM_STDBOOL_H]) # This version of the macro is needed in autoconf <= 2.68. AC_DEFUN([AC_CHECK_HEADER_STDBOOL], [AC_CACHE_CHECK([for stdbool.h that conforms to C99], [ac_cv_header_stdbool_h], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[ #include <stdbool.h> #ifndef bool "error: bool is not defined" #endif #ifndef false "error: false is not defined" #endif #if false "error: false is not 0" #endif #ifndef true "error: true is not defined" #endif #if true != 1 "error: true is not 1" #endif #ifndef __bool_true_false_are_defined "error: __bool_true_false_are_defined is not defined" #endif struct s { _Bool s: 1; _Bool t; } s; char a[true == 1 ? 1 : -1]; char b[false == 0 ? 1 : -1]; char c[__bool_true_false_are_defined == 1 ? 1 : -1]; char d[(bool) 0.5 == true ? 1 : -1]; /* See body of main program for 'e'. */ char f[(_Bool) 0.0 == false ? 1 : -1]; char g[true]; char h[sizeof (_Bool)]; char i[sizeof s.t]; enum { j = false, k = true, l = false * true, m = true * 256 }; /* The following fails for HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ _Bool n[m]; char o[sizeof n == m * sizeof n[0] ? 1 : -1]; char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; /* Catch a bug in an HP-UX C compiler. See http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html */ _Bool q = true; _Bool *pq = &q; ]], [[ bool e = &s; *pq |= q; *pq |= ! q; /* Refer to every declared value, to avoid compiler optimizations. */ return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l + !m + !n + !o + !p + !q + !pq); ]])], [ac_cv_header_stdbool_h=yes], [ac_cv_header_stdbool_h=no])]) AC_CHECK_TYPES([_Bool]) ]) �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/gl/m4/ssize_t.m4�������������������������������������������������������������0000664�0001750�0001750�00000001463�11672675562�014602� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# ssize_t.m4 serial 5 (gettext-0.18.2) dnl Copyright (C) 2001-2003, 2006, 2010-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. dnl Test whether ssize_t is defined. AC_DEFUN([gt_TYPE_SSIZE_T], [ AC_CACHE_CHECK([for ssize_t], [gt_cv_ssize_t], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#include <sys/types.h>]], [[int x = sizeof (ssize_t *) + sizeof (ssize_t); return !x;]])], [gt_cv_ssize_t=yes], [gt_cv_ssize_t=no])]) if test $gt_cv_ssize_t = no; then AC_DEFINE([ssize_t], [int], [Define as a signed type of the same size as size_t.]) fi ]) �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/gl/m4/memset.m4��������������������������������������������������������������0000664�0001750�0001750�00000000634�11672675562�014413� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# memset.m4 serial 4 dnl Copyright (C) 2002, 2009-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_MEMSET], [ AC_CHECK_FUNCS([memset]) ]) # Prerequisites of lib/memset.c. AC_DEFUN([gl_PREREQ_MEMSET], [ : ]) ����������������������������������������������������������������������������������������������������source-highlight-3.1.6/gl/m4/gnulib-cache.m4��������������������������������������������������������0000664�0001750�0001750�00000003567�11672675562�015452� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Copyright (C) 2002-2011 Free Software Foundation, Inc. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This file is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this file. If not, see <http://www.gnu.org/licenses/>. # # As a special exception to the GNU General Public License, # this file may be distributed as part of a program that # contains a configuration script generated by Autoconf, under # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. # # This file represents the specification of how gnulib-tool is used. # It acts as a cache: It is written and read by gnulib-tool. # In projects that use version control, this file is meant to be put under # version control, like the configure.ac and various Makefile.am files. # Specification in the form of a command-line invocation: # gnulib-tool --import --dir=. --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --no-conditional-dependencies --libtool --macro-prefix=gl dirent getopt memset mkdir progname strdup # Specification in the form of a few gnulib-tool.m4 macro invocations: gl_LOCAL_DIR([]) gl_MODULES([ dirent getopt memset mkdir progname strdup ]) gl_AVOID([]) gl_SOURCE_BASE([gl]) gl_M4_BASE([gl/m4]) gl_PO_BASE([]) gl_DOC_BASE([doc]) gl_TESTS_BASE([tests]) gl_LIB([libgnu]) gl_MAKEFILE_NAME([]) gl_LIBTOOL gl_MACRO_PREFIX([gl]) gl_PO_DOMAIN([]) gl_WITNESS_C_DOMAIN([]) �����������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/gl/m4/stddef_h.m4������������������������������������������������������������0000664�0001750�0001750�00000002755�11672675562�014707� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������dnl A placeholder for POSIX 2008 <stddef.h>, for platforms that have issues. # stddef_h.m4 serial 4 dnl Copyright (C) 2009-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_STDDEF_H], [ AC_REQUIRE([gl_STDDEF_H_DEFAULTS]) AC_REQUIRE([gt_TYPE_WCHAR_T]) STDDEF_H= if test $gt_cv_c_wchar_t = no; then HAVE_WCHAR_T=0 STDDEF_H=stddef.h fi AC_CACHE_CHECK([whether NULL can be used in arbitrary expressions], [gl_cv_decl_null_works], [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stddef.h> int test[2 * (sizeof NULL == sizeof (void *)) -1]; ]])], [gl_cv_decl_null_works=yes], [gl_cv_decl_null_works=no])]) if test $gl_cv_decl_null_works = no; then REPLACE_NULL=1 STDDEF_H=stddef.h fi AC_SUBST([STDDEF_H]) AM_CONDITIONAL([GL_GENERATE_STDDEF_H], [test -n "$STDDEF_H"]) if test -n "$STDDEF_H"; then gl_NEXT_HEADERS([stddef.h]) fi ]) AC_DEFUN([gl_STDDEF_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_STDDEF_H_DEFAULTS]) gl_MODULE_INDICATOR_SET_VARIABLE([$1]) ]) AC_DEFUN([gl_STDDEF_H_DEFAULTS], [ dnl Assume proper GNU behavior unless another module says otherwise. REPLACE_NULL=0; AC_SUBST([REPLACE_NULL]) HAVE_WCHAR_T=1; AC_SUBST([HAVE_WCHAR_T]) ]) �������������������source-highlight-3.1.6/gl/m4/include_next.m4��������������������������������������������������������0000664�0001750�0001750�00000025424�11672675562�015606� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# include_next.m4 serial 23 dnl Copyright (C) 2006-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Paul Eggert and Derek Price. dnl Sets INCLUDE_NEXT and PRAGMA_SYSTEM_HEADER. dnl dnl INCLUDE_NEXT expands to 'include_next' if the compiler supports it, or to dnl 'include' otherwise. dnl dnl INCLUDE_NEXT_AS_FIRST_DIRECTIVE expands to 'include_next' if the compiler dnl supports it in the special case that it is the first include directive in dnl the given file, or to 'include' otherwise. dnl dnl PRAGMA_SYSTEM_HEADER can be used in files that contain #include_next, dnl so as to avoid GCC warnings when the gcc option -pedantic is used. dnl '#pragma GCC system_header' has the same effect as if the file was found dnl through the include search path specified with '-isystem' options (as dnl opposed to the search path specified with '-I' options). Namely, gcc dnl does not warn about some things, and on some systems (Solaris and Interix) dnl __STDC__ evaluates to 0 instead of to 1. The latter is an undesired side dnl effect; we are therefore careful to use 'defined __STDC__' or '1' instead dnl of plain '__STDC__'. dnl dnl PRAGMA_COLUMNS can be used in files that override system header files, so dnl as to avoid compilation errors on HP NonStop systems when the gnulib file dnl is included by a system header file that does a "#pragma COLUMNS 80" (which dnl has the effect of truncating the lines of that file and all files that it dnl includes to 80 columns) and the gnulib file has lines longer than 80 dnl columns. AC_DEFUN([gl_INCLUDE_NEXT], [ AC_LANG_PREPROC_REQUIRE() AC_CACHE_CHECK([whether the preprocessor supports include_next], [gl_cv_have_include_next], [rm -rf conftestd1a conftestd1b conftestd2 mkdir conftestd1a conftestd1b conftestd2 dnl IBM C 9.0, 10.1 (original versions, prior to the 2009-01 updates) on dnl AIX 6.1 support include_next when used as first preprocessor directive dnl in a file, but not when preceded by another include directive. Check dnl for this bug by including <stdio.h>. dnl Additionally, with this same compiler, include_next is a no-op when dnl used in a header file that was included by specifying its absolute dnl file name. Despite these two bugs, include_next is used in the dnl compiler's <math.h>. By virtue of the second bug, we need to use dnl include_next as well in this case. cat <<EOF > conftestd1a/conftest.h #define DEFINED_IN_CONFTESTD1 #include_next <conftest.h> #ifdef DEFINED_IN_CONFTESTD2 int foo; #else #error "include_next doesn't work" #endif EOF cat <<EOF > conftestd1b/conftest.h #define DEFINED_IN_CONFTESTD1 #include <stdio.h> #include_next <conftest.h> #ifdef DEFINED_IN_CONFTESTD2 int foo; #else #error "include_next doesn't work" #endif EOF cat <<EOF > conftestd2/conftest.h #ifndef DEFINED_IN_CONFTESTD1 #error "include_next test doesn't work" #endif #define DEFINED_IN_CONFTESTD2 EOF gl_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2" dnl We intentionally avoid using AC_LANG_SOURCE here. AC_COMPILE_IFELSE([AC_LANG_DEFINES_PROVIDED[#include <conftest.h>]], [gl_cv_have_include_next=yes], [CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2" AC_COMPILE_IFELSE([AC_LANG_DEFINES_PROVIDED[#include <conftest.h>]], [gl_cv_have_include_next=buggy], [gl_cv_have_include_next=no]) ]) CPPFLAGS="$gl_save_CPPFLAGS" rm -rf conftestd1a conftestd1b conftestd2 ]) PRAGMA_SYSTEM_HEADER= if test $gl_cv_have_include_next = yes; then INCLUDE_NEXT=include_next INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next if test -n "$GCC"; then PRAGMA_SYSTEM_HEADER='#pragma GCC system_header' fi else if test $gl_cv_have_include_next = buggy; then INCLUDE_NEXT=include INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next else INCLUDE_NEXT=include INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include fi fi AC_SUBST([INCLUDE_NEXT]) AC_SUBST([INCLUDE_NEXT_AS_FIRST_DIRECTIVE]) AC_SUBST([PRAGMA_SYSTEM_HEADER]) AC_CACHE_CHECK([whether system header files limit the line length], [gl_cv_pragma_columns], [dnl HP NonStop systems, which define __TANDEM, have this misfeature. AC_EGREP_CPP([choke me], [ #ifdef __TANDEM choke me #endif ], [gl_cv_pragma_columns=yes], [gl_cv_pragma_columns=no]) ]) if test $gl_cv_pragma_columns = yes; then PRAGMA_COLUMNS="#pragma COLUMNS 10000" else PRAGMA_COLUMNS= fi AC_SUBST([PRAGMA_COLUMNS]) ]) # gl_CHECK_NEXT_HEADERS(HEADER1 HEADER2 ...) # ------------------------------------------ # For each arg foo.h, if #include_next works, define NEXT_FOO_H to be # '<foo.h>'; otherwise define it to be # '"///usr/include/foo.h"', or whatever other absolute file name is suitable. # Also, if #include_next works as first preprocessing directive in a file, # define NEXT_AS_FIRST_DIRECTIVE_FOO_H to be '<foo.h>'; otherwise define it to # be # '"///usr/include/foo.h"', or whatever other absolute file name is suitable. # That way, a header file with the following line: # #@INCLUDE_NEXT@ @NEXT_FOO_H@ # or # #@INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ @NEXT_AS_FIRST_DIRECTIVE_FOO_H@ # behaves (after sed substitution) as if it contained # #include_next <foo.h> # even if the compiler does not support include_next. # The three "///" are to pacify Sun C 5.8, which otherwise would say # "warning: #include of /usr/include/... may be non-portable". # Use `""', not `<>', so that the /// cannot be confused with a C99 comment. # Note: This macro assumes that the header file is not empty after # preprocessing, i.e. it does not only define preprocessor macros but also # provides some type/enum definitions or function/variable declarations. # # This macro also checks whether each header exists, by invoking # AC_CHECK_HEADERS_ONCE or AC_CHECK_HEADERS on each argument. AC_DEFUN([gl_CHECK_NEXT_HEADERS], [ gl_NEXT_HEADERS_INTERNAL([$1], [check]) ]) # gl_NEXT_HEADERS(HEADER1 HEADER2 ...) # ------------------------------------ # Like gl_CHECK_NEXT_HEADERS, except do not check whether the headers exist. # This is suitable for headers like <stddef.h> that are standardized by C89 # and therefore can be assumed to exist. AC_DEFUN([gl_NEXT_HEADERS], [ gl_NEXT_HEADERS_INTERNAL([$1], [assume]) ]) # The guts of gl_CHECK_NEXT_HEADERS and gl_NEXT_HEADERS. AC_DEFUN([gl_NEXT_HEADERS_INTERNAL], [ AC_REQUIRE([gl_INCLUDE_NEXT]) AC_REQUIRE([AC_CANONICAL_HOST]) m4_if([$2], [check], [AC_CHECK_HEADERS_ONCE([$1]) ]) dnl FIXME: gl_next_header and gl_header_exists must be used unquoted dnl until we can assume autoconf 2.64 or newer. m4_foreach_w([gl_HEADER_NAME], [$1], [AS_VAR_PUSHDEF([gl_next_header], [gl_cv_next_]m4_defn([gl_HEADER_NAME])) if test $gl_cv_have_include_next = yes; then AS_VAR_SET(gl_next_header, ['<'gl_HEADER_NAME'>']) else AC_CACHE_CHECK( [absolute name of <]m4_defn([gl_HEADER_NAME])[>], m4_defn([gl_next_header]), [m4_if([$2], [check], [AS_VAR_PUSHDEF([gl_header_exists], [ac_cv_header_]m4_defn([gl_HEADER_NAME])) if test AS_VAR_GET(gl_header_exists) = yes; then AS_VAR_POPDEF([gl_header_exists]) ]) AC_LANG_CONFTEST( [AC_LANG_SOURCE( [[#include <]]m4_dquote(m4_defn([gl_HEADER_NAME]))[[>]] )]) dnl AIX "xlc -E" and "cc -E" omit #line directives for header dnl files that contain only a #include of other header files and dnl no non-comment tokens of their own. This leads to a failure dnl to detect the absolute name of <dirent.h>, <signal.h>, dnl <poll.h> and others. The workaround is to force preservation dnl of comments through option -C. This ensures all necessary dnl #line directives are present. GCC supports option -C as well. case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; *) gl_absname_cpp="$ac_cpp" ;; esac changequote(,) case "$host_os" in mingw*) dnl For the sake of native Windows compilers (excluding gcc), dnl treat backslash as a directory separator, like /. dnl Actually, these compilers use a double-backslash as dnl directory separator, inside the dnl # line "filename" dnl directives. gl_dirsep_regex='[/\\]' ;; *) gl_dirsep_regex='\/' ;; esac dnl A sed expression that turns a string into a basic regular dnl expression, for use within "/.../". gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' changequote([,]) gl_header_literal_regex=`echo ']m4_defn([gl_HEADER_NAME])[' \ | sed -e "$gl_make_literal_regex_sed"` gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ changequote(,)dnl s|^/[^/]|//&| changequote([,])dnl p q }' dnl eval is necessary to expand gl_absname_cpp. dnl Ultrix and Pyramid sh refuse to redirect output of eval, dnl so use subshell. AS_VAR_SET(gl_next_header, ['"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD | sed -n "$gl_absolute_header_sed"`'"']) m4_if([$2], [check], [else AS_VAR_SET(gl_next_header, ['<'gl_HEADER_NAME'>']) fi ]) ]) fi AC_SUBST( AS_TR_CPP([NEXT_]m4_defn([gl_HEADER_NAME])), [AS_VAR_GET(gl_next_header)]) if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' gl_next_as_first_directive='<'gl_HEADER_NAME'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' gl_next_as_first_directive=AS_VAR_GET(gl_next_header) fi AC_SUBST( AS_TR_CPP([NEXT_AS_FIRST_DIRECTIVE_]m4_defn([gl_HEADER_NAME])), [$gl_next_as_first_directive]) AS_VAR_POPDEF([gl_next_header])]) ]) # Autoconf 2.68 added warnings for our use of AC_COMPILE_IFELSE; # this fallback is safe for all earlier autoconf versions. m4_define_default([AC_LANG_DEFINES_PROVIDED]) ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/gl/m4/wchar_t.m4�������������������������������������������������������������0000664�0001750�0001750�00000001462�11672675562�014550� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# wchar_t.m4 serial 4 (gettext-0.18.2) dnl Copyright (C) 2002-2003, 2008-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. dnl Test whether <stddef.h> has the 'wchar_t' type. dnl Prerequisite: AC_PROG_CC AC_DEFUN([gt_TYPE_WCHAR_T], [ AC_CACHE_CHECK([for wchar_t], [gt_cv_c_wchar_t], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#include <stddef.h> wchar_t foo = (wchar_t)'\0';]], [[]])], [gt_cv_c_wchar_t=yes], [gt_cv_c_wchar_t=no])]) if test $gt_cv_c_wchar_t = yes; then AC_DEFINE([HAVE_WCHAR_T], [1], [Define if you have the 'wchar_t' type.]) fi ]) ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/gl/m4/extensions.m4����������������������������������������������������������0000664�0001750�0001750�00000010736�11672675562�015324� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# serial 10 -*- Autoconf -*- # Enable extensions on systems that normally disable them. # Copyright (C) 2003, 2006-2011 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This definition of AC_USE_SYSTEM_EXTENSIONS is stolen from CVS # Autoconf. Perhaps we can remove this once we can assume Autoconf # 2.62 or later everywhere, but since CVS Autoconf mutates rapidly # enough in this area it's likely we'll need to redefine # AC_USE_SYSTEM_EXTENSIONS for quite some time. # If autoconf reports a warning # warning: AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS # or warning: AC_RUN_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS # the fix is # 1) to ensure that AC_USE_SYSTEM_EXTENSIONS is never directly invoked # but always AC_REQUIREd, # 2) to ensure that for each occurrence of # AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) # or # AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) # the corresponding gnulib module description has 'extensions' among # its dependencies. This will ensure that the gl_USE_SYSTEM_EXTENSIONS # invocation occurs in gl_EARLY, not in gl_INIT. # AC_USE_SYSTEM_EXTENSIONS # ------------------------ # Enable extensions on systems that normally disable them, # typically due to standards-conformance issues. # Remember that #undef in AH_VERBATIM gets replaced with #define by # AC_DEFINE. The goal here is to define all known feature-enabling # macros, then, if reports of conflicts are made, disable macros that # cause problems on some platforms (such as __EXTENSIONS__). AC_DEFUN_ONCE([AC_USE_SYSTEM_EXTENSIONS], [AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl AC_BEFORE([$0], [AC_RUN_IFELSE])dnl AC_REQUIRE([AC_CANONICAL_HOST]) AC_CHECK_HEADER([minix/config.h], [MINIX=yes], [MINIX=]) if test "$MINIX" = yes; then AC_DEFINE([_POSIX_SOURCE], [1], [Define to 1 if you need to in order for `stat' and other things to work.]) AC_DEFINE([_POSIX_1_SOURCE], [2], [Define to 2 if the system does not provide POSIX.1 features except with this defined.]) AC_DEFINE([_MINIX], [1], [Define to 1 if on MINIX.]) fi dnl HP-UX 11.11 defines mbstate_t only if _XOPEN_SOURCE is defined to 500, dnl regardless of whether the flags -Ae or _D_HPUX_SOURCE=1 are already dnl provided. case "$host_os" in hpux*) AC_DEFINE([_XOPEN_SOURCE], [500], [Define to 500 only on HP-UX.]) ;; esac AH_VERBATIM([__EXTENSIONS__], [/* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # undef _ALL_SOURCE #endif /* Enable general extensions on MacOS X. */ #ifndef _DARWIN_C_SOURCE # undef _DARWIN_C_SOURCE #endif /* Enable GNU extensions on systems that have them. */ #ifndef _GNU_SOURCE # undef _GNU_SOURCE #endif /* Enable threading extensions on Solaris. */ #ifndef _POSIX_PTHREAD_SEMANTICS # undef _POSIX_PTHREAD_SEMANTICS #endif /* Enable extensions on HP NonStop. */ #ifndef _TANDEM_SOURCE # undef _TANDEM_SOURCE #endif /* Enable general extensions on Solaris. */ #ifndef __EXTENSIONS__ # undef __EXTENSIONS__ #endif ]) AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__], [ac_cv_safe_to_define___extensions__], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[ # define __EXTENSIONS__ 1 ]AC_INCLUDES_DEFAULT])], [ac_cv_safe_to_define___extensions__=yes], [ac_cv_safe_to_define___extensions__=no])]) test $ac_cv_safe_to_define___extensions__ = yes && AC_DEFINE([__EXTENSIONS__]) AC_DEFINE([_ALL_SOURCE]) AC_DEFINE([_DARWIN_C_SOURCE]) AC_DEFINE([_GNU_SOURCE]) AC_DEFINE([_POSIX_PTHREAD_SEMANTICS]) AC_DEFINE([_TANDEM_SOURCE]) ])# AC_USE_SYSTEM_EXTENSIONS # gl_USE_SYSTEM_EXTENSIONS # ------------------------ # Enable extensions on systems that normally disable them, # typically due to standards-conformance issues. AC_DEFUN_ONCE([gl_USE_SYSTEM_EXTENSIONS], [ dnl Require this macro before AC_USE_SYSTEM_EXTENSIONS. dnl gnulib does not need it. But if it gets required by third-party macros dnl after AC_USE_SYSTEM_EXTENSIONS is required, autoconf 2.62..2.63 emit a dnl warning: "AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS". dnl Note: We can do this only for one of the macros AC_AIX, AC_GNU_SOURCE, dnl AC_MINIX. If people still use AC_AIX or AC_MINIX, they are out of luck. AC_REQUIRE([AC_GNU_SOURCE]) AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) ]) ����������������������������������source-highlight-3.1.6/gl/m4/gnulib-common.m4�������������������������������������������������������0000664�0001750�0001750�00000032760�11672675562�015674� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# gnulib-common.m4 serial 31 dnl Copyright (C) 2007-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # gl_COMMON # is expanded unconditionally through gnulib-tool magic. AC_DEFUN([gl_COMMON], [ dnl Use AC_REQUIRE here, so that the code is expanded once only. AC_REQUIRE([gl_00GNULIB]) AC_REQUIRE([gl_COMMON_BODY]) ]) AC_DEFUN([gl_COMMON_BODY], [ AH_VERBATIM([_Noreturn], [/* The _Noreturn keyword of draft C1X. */ #ifndef _Noreturn # if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \ || 0x5110 <= __SUNPRO_C) # define _Noreturn __attribute__ ((__noreturn__)) # elif defined _MSC_VER && 1200 <= _MSC_VER # define _Noreturn __declspec (noreturn) # else # define _Noreturn # endif #endif ]) AH_VERBATIM([isoc99_inline], [/* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of earlier versions), but does not display it by setting __GNUC_STDC_INLINE__. __APPLE__ && __MACH__ test for MacOS X. __APPLE_CC__ tests for the Apple compiler and its version. __STDC_VERSION__ tests for the C99 mode. */ #if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__ # define __GNUC_STDC_INLINE__ 1 #endif]) AH_VERBATIM([unused_parameter], [/* Define as a marker that can be attached to declarations that might not be used. This helps to reduce warnings, such as from GCC -Wunused-parameter. */ #if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) # define _GL_UNUSED __attribute__ ((__unused__)) #else # define _GL_UNUSED #endif /* The name _UNUSED_PARAMETER_ is an earlier spelling, although the name is a misnomer outside of parameter lists. */ #define _UNUSED_PARAMETER_ _GL_UNUSED /* The __pure__ attribute was added in gcc 2.96. */ #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) # define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) #else # define _GL_ATTRIBUTE_PURE /* empty */ #endif /* The __const__ attribute was added in gcc 2.95. */ #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) # define _GL_ATTRIBUTE_CONST __attribute__ ((__const__)) #else # define _GL_ATTRIBUTE_CONST /* empty */ #endif ]) dnl Preparation for running test programs: dnl Tell glibc to write diagnostics from -D_FORTIFY_SOURCE=2 to stderr, not dnl to /dev/tty, so they can be redirected to log files. Such diagnostics dnl arise e.g., in the macros gl_PRINTF_DIRECTIVE_N, gl_SNPRINTF_DIRECTIVE_N. LIBC_FATAL_STDERR_=1 export LIBC_FATAL_STDERR_ ]) # gl_MODULE_INDICATOR_CONDITION # expands to a C preprocessor expression that evaluates to 1 or 0, depending # whether a gnulib module that has been requested shall be considered present # or not. m4_define([gl_MODULE_INDICATOR_CONDITION], [1]) # gl_MODULE_INDICATOR_SET_VARIABLE([modulename]) # sets the shell variable that indicates the presence of the given module to # a C preprocessor expression that will evaluate to 1. AC_DEFUN([gl_MODULE_INDICATOR_SET_VARIABLE], [ gl_MODULE_INDICATOR_SET_VARIABLE_AUX( [GNULIB_[]m4_translit([[$1]], [abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])], [gl_MODULE_INDICATOR_CONDITION]) ]) # gl_MODULE_INDICATOR_SET_VARIABLE_AUX([variable]) # modifies the shell variable to include the gl_MODULE_INDICATOR_CONDITION. # The shell variable's value is a C preprocessor expression that evaluates # to 0 or 1. AC_DEFUN([gl_MODULE_INDICATOR_SET_VARIABLE_AUX], [ m4_if(m4_defn([gl_MODULE_INDICATOR_CONDITION]), [1], [ dnl Simplify the expression VALUE || 1 to 1. $1=1 ], [gl_MODULE_INDICATOR_SET_VARIABLE_AUX_OR([$1], [gl_MODULE_INDICATOR_CONDITION])]) ]) # gl_MODULE_INDICATOR_SET_VARIABLE_AUX_OR([variable], [condition]) # modifies the shell variable to include the given condition. The shell # variable's value is a C preprocessor expression that evaluates to 0 or 1. AC_DEFUN([gl_MODULE_INDICATOR_SET_VARIABLE_AUX_OR], [ dnl Simplify the expression 1 || CONDITION to 1. if test "$[]$1" != 1; then dnl Simplify the expression 0 || CONDITION to CONDITION. if test "$[]$1" = 0; then $1=$2 else $1="($[]$1 || $2)" fi fi ]) # gl_MODULE_INDICATOR([modulename]) # defines a C macro indicating the presence of the given module # in a location where it can be used. # | Value | Value | # | in lib/ | in tests/ | # --------------------------------------------+---------+-----------+ # Module present among main modules: | 1 | 1 | # --------------------------------------------+---------+-----------+ # Module present among tests-related modules: | 0 | 1 | # --------------------------------------------+---------+-----------+ # Module not present at all: | 0 | 0 | # --------------------------------------------+---------+-----------+ AC_DEFUN([gl_MODULE_INDICATOR], [ AC_DEFINE_UNQUOTED([GNULIB_]m4_translit([[$1]], [abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___]), [gl_MODULE_INDICATOR_CONDITION], [Define to a C preprocessor expression that evaluates to 1 or 0, depending whether the gnulib module $1 shall be considered present.]) ]) # gl_MODULE_INDICATOR_FOR_TESTS([modulename]) # defines a C macro indicating the presence of the given module # in lib or tests. This is useful to determine whether the module # should be tested. # | Value | Value | # | in lib/ | in tests/ | # --------------------------------------------+---------+-----------+ # Module present among main modules: | 1 | 1 | # --------------------------------------------+---------+-----------+ # Module present among tests-related modules: | 1 | 1 | # --------------------------------------------+---------+-----------+ # Module not present at all: | 0 | 0 | # --------------------------------------------+---------+-----------+ AC_DEFUN([gl_MODULE_INDICATOR_FOR_TESTS], [ AC_DEFINE([GNULIB_TEST_]m4_translit([[$1]], [abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___]), [1], [Define to 1 when the gnulib module $1 should be tested.]) ]) # gl_ASSERT_NO_GNULIB_POSIXCHECK # asserts that there will never be a need to #define GNULIB_POSIXCHECK. # and thereby enables an optimization of configure and config.h. # Used by Emacs. AC_DEFUN([gl_ASSERT_NO_GNULIB_POSIXCHECK], [ dnl Override gl_WARN_ON_USE_PREPARE. dnl But hide this definition from 'aclocal'. AC_DEFUN([gl_W][ARN_ON_USE_PREPARE], []) ]) # gl_ASSERT_NO_GNULIB_TESTS # asserts that there will be no gnulib tests in the scope of the configure.ac # and thereby enables an optimization of config.h. # Used by Emacs. AC_DEFUN([gl_ASSERT_NO_GNULIB_TESTS], [ dnl Override gl_MODULE_INDICATOR_FOR_TESTS. AC_DEFUN([gl_MODULE_INDICATOR_FOR_TESTS], []) ]) # Test whether <features.h> exists. # Set HAVE_FEATURES_H. AC_DEFUN([gl_FEATURES_H], [ AC_CHECK_HEADERS_ONCE([features.h]) if test $ac_cv_header_features_h = yes; then HAVE_FEATURES_H=1 else HAVE_FEATURES_H=0 fi AC_SUBST([HAVE_FEATURES_H]) ]) # m4_foreach_w # is a backport of autoconf-2.59c's m4_foreach_w. # Remove this macro when we can assume autoconf >= 2.60. m4_ifndef([m4_foreach_w], [m4_define([m4_foreach_w], [m4_foreach([$1], m4_split(m4_normalize([$2]), [ ]), [$3])])]) # AS_VAR_IF(VAR, VALUE, [IF-MATCH], [IF-NOT-MATCH]) # ---------------------------------------------------- # Backport of autoconf-2.63b's macro. # Remove this macro when we can assume autoconf >= 2.64. m4_ifndef([AS_VAR_IF], [m4_define([AS_VAR_IF], [AS_IF([test x"AS_VAR_GET([$1])" = x""$2], [$3], [$4])])]) # gl_PROG_CC_C99 # Modifies the value of the shell variable CC in an attempt to make $CC # understand ISO C99 source code. # This is like AC_PROG_CC_C99, except that # - AC_PROG_CC_C99 did not exist in Autoconf versions < 2.60, # - AC_PROG_CC_C99 does not mix well with AC_PROG_CC_STDC # <http://lists.gnu.org/archive/html/bug-gnulib/2011-09/msg00367.html>, # but many more packages use AC_PROG_CC_STDC than AC_PROG_CC_C99 # <http://lists.gnu.org/archive/html/bug-gnulib/2011-09/msg00441.html>. # Remaining problems: # - When AC_PROG_CC_STDC is invoked twice, it adds the C99 enabling options # to CC twice # <http://lists.gnu.org/archive/html/bug-gnulib/2011-09/msg00431.html>. # - AC_PROG_CC_STDC is likely to change when C1X is an ISO standard. AC_DEFUN([gl_PROG_CC_C99], [ dnl Change that version number to the minimum Autoconf version that supports dnl mixing AC_PROG_CC_C99 calls with AC_PROG_CC_STDC calls. m4_version_prereq([9.0], [AC_REQUIRE([AC_PROG_CC_C99])], [AC_REQUIRE([AC_PROG_CC_STDC])]) ]) # gl_PROG_AR_RANLIB # Determines the values for AR, ARFLAGS, RANLIB that fit with the compiler. # The user can set the variables AR, ARFLAGS, RANLIB if he wants to override # the values. AC_DEFUN([gl_PROG_AR_RANLIB], [ dnl Minix 3 comes with two toolchains: The Amsterdam Compiler Kit compiler dnl as "cc", and GCC as "gcc". They have different object file formats and dnl library formats. In particular, the GNU binutils programs ar, ranlib dnl produce libraries that work only with gcc, not with cc. AC_REQUIRE([AC_PROG_CC]) AC_CACHE_CHECK([for Minix Amsterdam compiler], [gl_cv_c_amsterdam_compiler], [ AC_EGREP_CPP([Amsterdam], [ #ifdef __ACK__ Amsterdam #endif ], [gl_cv_c_amsterdam_compiler=yes], [gl_cv_c_amsterdam_compiler=no]) ]) if test -z "$AR"; then if test $gl_cv_c_amsterdam_compiler = yes; then AR='cc -c.a' if test -z "$ARFLAGS"; then ARFLAGS='-o' fi else dnl Use the Automake-documented default values for AR and ARFLAGS, dnl but prefer ${host}-ar over ar (useful for cross-compiling). AC_CHECK_TOOL([AR], [ar], [ar]) if test -z "$ARFLAGS"; then ARFLAGS='cru' fi fi else if test -z "$ARFLAGS"; then ARFLAGS='cru' fi fi AC_SUBST([AR]) AC_SUBST([ARFLAGS]) if test -z "$RANLIB"; then if test $gl_cv_c_amsterdam_compiler = yes; then RANLIB=':' else dnl Use the ranlib program if it is available. AC_PROG_RANLIB fi fi AC_SUBST([RANLIB]) ]) # AC_PROG_MKDIR_P # is a backport of autoconf-2.60's AC_PROG_MKDIR_P, with a fix # for interoperability with automake-1.9.6 from autoconf-2.62. # Remove this macro when we can assume autoconf >= 2.62 or # autoconf >= 2.60 && automake >= 1.10. m4_ifdef([AC_PROG_MKDIR_P], [ dnl For automake-1.9.6 && autoconf < 2.62: Ensure MKDIR_P is AC_SUBSTed. m4_define([AC_PROG_MKDIR_P], m4_defn([AC_PROG_MKDIR_P])[ AC_SUBST([MKDIR_P])])], [ dnl For autoconf < 2.60: Backport of AC_PROG_MKDIR_P. AC_DEFUN_ONCE([AC_PROG_MKDIR_P], [AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake MKDIR_P='$(mkdir_p)' AC_SUBST([MKDIR_P])])]) # AC_C_RESTRICT # This definition overrides the AC_C_RESTRICT macro from autoconf 2.60..2.61, # so that mixed use of GNU C and GNU C++ and mixed use of Sun C and Sun C++ # works. # This definition can be removed once autoconf >= 2.62 can be assumed. m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.62]),[-1],[ AC_DEFUN([AC_C_RESTRICT], [AC_CACHE_CHECK([for C/C++ restrict keyword], [ac_cv_c_restrict], [ac_cv_c_restrict=no # The order here caters to the fact that C++ does not require restrict. for ac_kw in __restrict __restrict__ _Restrict restrict; do AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [[typedef int * int_ptr; int foo (int_ptr $ac_kw ip) { return ip[0]; }]], [[int s[1]; int * $ac_kw t = s; t[0] = 0; return foo(t)]])], [ac_cv_c_restrict=$ac_kw]) test "$ac_cv_c_restrict" != no && break done ]) AH_VERBATIM([restrict], [/* Define to the equivalent of the C99 'restrict' keyword, or to nothing if this is not supported. Do not define if restrict is supported directly. */ #undef restrict /* Work around a bug in Sun C++: it does not support _Restrict, even though the corresponding Sun C compiler does, which causes "#define restrict _Restrict" in the previous line. Perhaps some future version of Sun C++ will work with _Restrict; if so, it'll probably define __RESTRICT, just as Sun C does. */ #if defined __SUNPRO_CC && !defined __RESTRICT # define _Restrict #endif]) case $ac_cv_c_restrict in restrict) ;; no) AC_DEFINE([restrict], []) ;; *) AC_DEFINE_UNQUOTED([restrict], [$ac_cv_c_restrict]) ;; esac ]) ]) # gl_BIGENDIAN # is like AC_C_BIGENDIAN, except that it can be AC_REQUIREd. # Note that AC_REQUIRE([AC_C_BIGENDIAN]) does not work reliably because some # macros invoke AC_C_BIGENDIAN with arguments. AC_DEFUN([gl_BIGENDIAN], [ AC_C_BIGENDIAN ]) # gl_CACHE_VAL_SILENT(cache-id, command-to-set-it) # is like AC_CACHE_VAL(cache-id, command-to-set-it), except that it does not # output a spurious "(cached)" mark in the midst of other configure output. # This macro should be used instead of AC_CACHE_VAL when it is not surrounded # by an AC_MSG_CHECKING/AC_MSG_RESULT pair. AC_DEFUN([gl_CACHE_VAL_SILENT], [ saved_as_echo_n="$as_echo_n" as_echo_n=':' AC_CACHE_VAL([$1], [$2]) as_echo_n="$saved_as_echo_n" ]) ����������������source-highlight-3.1.6/gl/m4/warn-on-use.m4���������������������������������������������������������0000664�0001750�0001750�00000004160�11672675562�015272� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# warn-on-use.m4 serial 4 dnl Copyright (C) 2010-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # gl_WARN_ON_USE_PREPARE(INCLUDES, NAMES) # --------------------------------------- # For each whitespace-separated element in the list of NAMES, define # HAVE_RAW_DECL_name if the function has a declaration among INCLUDES # even after being undefined as a macro. # # See warn-on-use.h for some hints on how to poison function names, as # well as ideas on poisoning global variables and macros. NAMES may # include global variables, but remember that only functions work with # _GL_WARN_ON_USE. Typically, INCLUDES only needs to list a single # header, but if the replacement header pulls in other headers because # some systems declare functions in the wrong header, then INCLUDES # should do likewise. # # If you assume C89, then it is generally safe to assume declarations # for functions declared in that standard (such as gets) without # needing gl_WARN_ON_USE_PREPARE. AC_DEFUN([gl_WARN_ON_USE_PREPARE], [ m4_foreach_w([gl_decl], [$2], [AH_TEMPLATE([HAVE_RAW_DECL_]AS_TR_CPP(m4_defn([gl_decl])), [Define to 1 if ]m4_defn([gl_decl])[ is declared even after undefining macros.])])dnl dnl FIXME: gl_Symbol must be used unquoted until we can assume dnl autoconf 2.64 or newer. for gl_func in m4_flatten([$2]); do AS_VAR_PUSHDEF([gl_Symbol], [gl_cv_have_raw_decl_$gl_func])dnl AC_CACHE_CHECK([whether $gl_func is declared without a macro], gl_Symbol, [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([$1], [@%:@undef $gl_func (void) $gl_func;])], [AS_VAR_SET(gl_Symbol, [yes])], [AS_VAR_SET(gl_Symbol, [no])])]) AS_VAR_IF(gl_Symbol, [yes], [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_RAW_DECL_$gl_func]), [1]) dnl shortcut - if the raw declaration exists, then set a cache dnl variable to allow skipping any later AC_CHECK_DECL efforts eval ac_cv_have_decl_$gl_func=yes]) AS_VAR_POPDEF([gl_Symbol])dnl done ]) ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/gl/m4/strdup.m4��������������������������������������������������������������0000664�0001750�0001750�00000001657�11672675562�014450� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# strdup.m4 serial 13 dnl Copyright (C) 2002-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_STRDUP], [ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) AC_CHECK_FUNCS_ONCE([strdup]) AC_CHECK_DECLS_ONCE([strdup]) if test $ac_cv_have_decl_strdup = no; then HAVE_DECL_STRDUP=0 fi ]) AC_DEFUN([gl_FUNC_STRDUP_POSIX], [ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) AC_REQUIRE([gl_CHECK_MALLOC_POSIX]) AC_CHECK_FUNCS_ONCE([strdup]) if test $ac_cv_func_strdup = yes; then if test $gl_cv_func_malloc_posix != yes; then REPLACE_STRDUP=1 fi fi AC_CHECK_DECLS_ONCE([strdup]) if test $ac_cv_have_decl_strdup = no; then HAVE_DECL_STRDUP=0 fi ]) # Prerequisites of lib/strdup.c. AC_DEFUN([gl_PREREQ_STRDUP], [:]) ���������������������������������������������������������������������������������source-highlight-3.1.6/gl/m4/nocrash.m4�������������������������������������������������������������0000664�0001750�0001750�00000010554�11672675562�014560� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# nocrash.m4 serial 3 dnl Copyright (C) 2005, 2009-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Based on libsigsegv, from Bruno Haible and Paolo Bonzini. AC_PREREQ([2.13]) dnl Expands to some code for use in .c programs that will cause the configure dnl test to exit instead of crashing. This is useful to avoid triggering dnl action from a background debugger and to avoid core dumps. dnl Usage: ... dnl ]GL_NOCRASH[ dnl ... dnl int main() { nocrash_init(); ... } AC_DEFUN([GL_NOCRASH],[[ #include <stdlib.h> #if defined __MACH__ && defined __APPLE__ /* Avoid a crash on MacOS X. */ #include <mach/mach.h> #include <mach/mach_error.h> #include <mach/thread_status.h> #include <mach/exception.h> #include <mach/task.h> #include <pthread.h> /* The exception port on which our thread listens. */ static mach_port_t our_exception_port; /* The main function of the thread listening for exceptions of type EXC_BAD_ACCESS. */ static void * mach_exception_thread (void *arg) { /* Buffer for a message to be received. */ struct { mach_msg_header_t head; mach_msg_body_t msgh_body; char data[1024]; } msg; mach_msg_return_t retval; /* Wait for a message on the exception port. */ retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg), our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL); if (retval != MACH_MSG_SUCCESS) abort (); exit (1); } static void nocrash_init (void) { mach_port_t self = mach_task_self (); /* Allocate a port on which the thread shall listen for exceptions. */ if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port) == KERN_SUCCESS) { /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */ if (mach_port_insert_right (self, our_exception_port, our_exception_port, MACH_MSG_TYPE_MAKE_SEND) == KERN_SUCCESS) { /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting for us. */ exception_mask_t mask = EXC_MASK_BAD_ACCESS; /* Create the thread listening on the exception port. */ pthread_attr_t attr; pthread_t thread; if (pthread_attr_init (&attr) == 0 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) { pthread_attr_destroy (&attr); /* Replace the exception port info for these exceptions with our own. Note that we replace the exception port for the entire task, not only for a particular thread. This has the effect that when our exception port gets the message, the thread specific exception port has already been asked, and we don't need to bother about it. See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */ task_set_exception_ports (self, mask, our_exception_port, EXCEPTION_DEFAULT, MACHINE_THREAD_STATE); } } } } #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* Avoid a crash on native Windows. */ #define WIN32_LEAN_AND_MEAN #include <windows.h> #include <winerror.h> static LONG WINAPI exception_filter (EXCEPTION_POINTERS *ExceptionInfo) { switch (ExceptionInfo->ExceptionRecord->ExceptionCode) { case EXCEPTION_ACCESS_VIOLATION: case EXCEPTION_IN_PAGE_ERROR: case EXCEPTION_STACK_OVERFLOW: case EXCEPTION_GUARD_PAGE: case EXCEPTION_PRIV_INSTRUCTION: case EXCEPTION_ILLEGAL_INSTRUCTION: case EXCEPTION_DATATYPE_MISALIGNMENT: case EXCEPTION_ARRAY_BOUNDS_EXCEEDED: case EXCEPTION_NONCONTINUABLE_EXCEPTION: exit (1); } return EXCEPTION_CONTINUE_SEARCH; } static void nocrash_init (void) { SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter); } #else /* Avoid a crash on POSIX systems. */ #include <signal.h> /* A POSIX signal handler. */ static void exception_handler (int sig) { exit (1); } static void nocrash_init (void) { #ifdef SIGSEGV signal (SIGSEGV, exception_handler); #endif #ifdef SIGBUS signal (SIGBUS, exception_handler); #endif } #endif ]]) ����������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/gl/m4/ac_prog_doxygen.m4�����������������������������������������������������0000644�0001750�0001750�00000000205�11672675562�016260� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������AC_DEFUN([AC_PROG_TRY_DOXYGEN],[ AC_REQUIRE([AC_EXEEXT])dnl test -z "$DOXYGEN" &&\ AC_PATH_PROGS([DOXYGEN], [doxygen$EXEEXT])dnl ]) �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/gl/m4/malloc.m4��������������������������������������������������������������0000664�0001750�0001750�00000003755�11672675562�014377� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# malloc.m4 serial 13 dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # gl_FUNC_MALLOC_GNU # ------------------ # Test whether 'malloc (0)' is handled like in GNU libc, and replace malloc if # it is not. AC_DEFUN([gl_FUNC_MALLOC_GNU], [ AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) dnl _AC_FUNC_MALLOC_IF is defined in Autoconf. _AC_FUNC_MALLOC_IF( [AC_DEFINE([HAVE_MALLOC_GNU], [1], [Define to 1 if your system has a GNU libc compatible 'malloc' function, and to 0 otherwise.])], [AC_DEFINE([HAVE_MALLOC_GNU], [0]) REPLACE_MALLOC=1 ]) ]) # gl_FUNC_MALLOC_POSIX # -------------------- # Test whether 'malloc' is POSIX compliant (sets errno to ENOMEM when it # fails), and replace malloc if it is not. AC_DEFUN([gl_FUNC_MALLOC_POSIX], [ AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) AC_REQUIRE([gl_CHECK_MALLOC_POSIX]) if test $gl_cv_func_malloc_posix = yes; then AC_DEFINE([HAVE_MALLOC_POSIX], [1], [Define if the 'malloc' function is POSIX compliant.]) else REPLACE_MALLOC=1 fi ]) # Test whether malloc, realloc, calloc are POSIX compliant, # Set gl_cv_func_malloc_posix to yes or no accordingly. AC_DEFUN([gl_CHECK_MALLOC_POSIX], [ AC_CACHE_CHECK([whether malloc, realloc, calloc are POSIX compliant], [gl_cv_func_malloc_posix], [ dnl It is too dangerous to try to allocate a large amount of memory: dnl some systems go to their knees when you do that. So assume that dnl all Unix implementations of the function are POSIX compliant. AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[]], [[#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ choke me #endif ]])], [gl_cv_func_malloc_posix=yes], [gl_cv_func_malloc_posix=no]) ]) ]) �������������������source-highlight-3.1.6/gl/m4/00gnulib.m4������������������������������������������������������������0000664�0001750�0001750�00000002522�11672675562�014537� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# 00gnulib.m4 serial 2 dnl Copyright (C) 2009-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl This file must be named something that sorts before all other dnl gnulib-provided .m4 files. It is needed until such time as we can dnl assume Autoconf 2.64, with its improved AC_DEFUN_ONCE semantics. # AC_DEFUN_ONCE([NAME], VALUE) # ---------------------------- # Define NAME to expand to VALUE on the first use (whether by direct # expansion, or by AC_REQUIRE), and to nothing on all subsequent uses. # Avoid bugs in AC_REQUIRE in Autoconf 2.63 and earlier. This # definition is slower than the version in Autoconf 2.64, because it # can only use interfaces that existed since 2.59; but it achieves the # same effect. Quoting is necessary to avoid confusing Automake. m4_version_prereq([2.63.263], [], [m4_define([AC][_DEFUN_ONCE], [AC][_DEFUN([$1], [AC_REQUIRE([_gl_DEFUN_ONCE([$1])], [m4_indir([_gl_DEFUN_ONCE([$1])])])])]dnl [AC][_DEFUN([_gl_DEFUN_ONCE([$1])], [$2])])]) # gl_00GNULIB # ----------- # Witness macro that this file has been included. Needed to force # Automake to include this file prior to all other gnulib .m4 files. AC_DEFUN([gl_00GNULIB]) ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/gl/m4/unistd_h.m4������������������������������������������������������������0000664�0001750�0001750�00000021100�11672675562�014725� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# unistd_h.m4 serial 62 dnl Copyright (C) 2006-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Written by Simon Josefsson, Bruno Haible. AC_DEFUN([gl_UNISTD_H], [ dnl Use AC_REQUIRE here, so that the default behavior below is expanded dnl once only, before all statements that occur in other macros. AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) AC_REQUIRE([AC_C_INLINE]) gl_CHECK_NEXT_HEADERS([unistd.h]) if test $ac_cv_header_unistd_h = yes; then HAVE_UNISTD_H=1 else HAVE_UNISTD_H=0 fi AC_SUBST([HAVE_UNISTD_H]) dnl Ensure the type pid_t gets defined. AC_REQUIRE([AC_TYPE_PID_T]) dnl Check for declarations of anything we want to poison if the dnl corresponding gnulib module is not in use. gl_WARN_ON_USE_PREPARE([[ #if HAVE_UNISTD_H # include <unistd.h> #endif /* Some systems declare various items in the wrong headers. */ #if !(defined __GLIBC__ && !defined __UCLIBC__) # include <fcntl.h> # include <stdio.h> # include <stdlib.h> # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ # include <io.h> # endif #endif ]], [chdir chown dup dup2 dup3 environ euidaccess faccessat fchdir fchownat fdatasync fsync ftruncate getcwd getdomainname getdtablesize getgroups gethostname getlogin getlogin_r getpagesize getusershell setusershell endusershell group_member lchown link linkat lseek pipe pipe2 pread pwrite readlink readlinkat rmdir sethostname sleep symlink symlinkat ttyname_r unlink unlinkat usleep]) ]) AC_DEFUN([gl_UNISTD_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) AC_DEFUN([gl_UNISTD_H_DEFAULTS], [ GNULIB_CHDIR=0; AC_SUBST([GNULIB_CHDIR]) GNULIB_CHOWN=0; AC_SUBST([GNULIB_CHOWN]) GNULIB_CLOSE=0; AC_SUBST([GNULIB_CLOSE]) GNULIB_DUP=0; AC_SUBST([GNULIB_DUP]) GNULIB_DUP2=0; AC_SUBST([GNULIB_DUP2]) GNULIB_DUP3=0; AC_SUBST([GNULIB_DUP3]) GNULIB_ENVIRON=0; AC_SUBST([GNULIB_ENVIRON]) GNULIB_EUIDACCESS=0; AC_SUBST([GNULIB_EUIDACCESS]) GNULIB_FACCESSAT=0; AC_SUBST([GNULIB_FACCESSAT]) GNULIB_FCHDIR=0; AC_SUBST([GNULIB_FCHDIR]) GNULIB_FCHOWNAT=0; AC_SUBST([GNULIB_FCHOWNAT]) GNULIB_FDATASYNC=0; AC_SUBST([GNULIB_FDATASYNC]) GNULIB_FSYNC=0; AC_SUBST([GNULIB_FSYNC]) GNULIB_FTRUNCATE=0; AC_SUBST([GNULIB_FTRUNCATE]) GNULIB_GETCWD=0; AC_SUBST([GNULIB_GETCWD]) GNULIB_GETDOMAINNAME=0; AC_SUBST([GNULIB_GETDOMAINNAME]) GNULIB_GETDTABLESIZE=0; AC_SUBST([GNULIB_GETDTABLESIZE]) GNULIB_GETGROUPS=0; AC_SUBST([GNULIB_GETGROUPS]) GNULIB_GETHOSTNAME=0; AC_SUBST([GNULIB_GETHOSTNAME]) GNULIB_GETLOGIN=0; AC_SUBST([GNULIB_GETLOGIN]) GNULIB_GETLOGIN_R=0; AC_SUBST([GNULIB_GETLOGIN_R]) GNULIB_GETPAGESIZE=0; AC_SUBST([GNULIB_GETPAGESIZE]) GNULIB_GETUSERSHELL=0; AC_SUBST([GNULIB_GETUSERSHELL]) GNULIB_GROUP_MEMBER=0; AC_SUBST([GNULIB_GROUP_MEMBER]) GNULIB_LCHOWN=0; AC_SUBST([GNULIB_LCHOWN]) GNULIB_LINK=0; AC_SUBST([GNULIB_LINK]) GNULIB_LINKAT=0; AC_SUBST([GNULIB_LINKAT]) GNULIB_LSEEK=0; AC_SUBST([GNULIB_LSEEK]) GNULIB_PIPE=0; AC_SUBST([GNULIB_PIPE]) GNULIB_PIPE2=0; AC_SUBST([GNULIB_PIPE2]) GNULIB_PREAD=0; AC_SUBST([GNULIB_PREAD]) GNULIB_PWRITE=0; AC_SUBST([GNULIB_PWRITE]) GNULIB_READ=0; AC_SUBST([GNULIB_READ]) GNULIB_READLINK=0; AC_SUBST([GNULIB_READLINK]) GNULIB_READLINKAT=0; AC_SUBST([GNULIB_READLINKAT]) GNULIB_RMDIR=0; AC_SUBST([GNULIB_RMDIR]) GNULIB_SETHOSTNAME=0; AC_SUBST([GNULIB_SETHOSTNAME]) GNULIB_SLEEP=0; AC_SUBST([GNULIB_SLEEP]) GNULIB_SYMLINK=0; AC_SUBST([GNULIB_SYMLINK]) GNULIB_SYMLINKAT=0; AC_SUBST([GNULIB_SYMLINKAT]) GNULIB_TTYNAME_R=0; AC_SUBST([GNULIB_TTYNAME_R]) GNULIB_UNISTD_H_NONBLOCKING=0; AC_SUBST([GNULIB_UNISTD_H_NONBLOCKING]) GNULIB_UNISTD_H_SIGPIPE=0; AC_SUBST([GNULIB_UNISTD_H_SIGPIPE]) GNULIB_UNLINK=0; AC_SUBST([GNULIB_UNLINK]) GNULIB_UNLINKAT=0; AC_SUBST([GNULIB_UNLINKAT]) GNULIB_USLEEP=0; AC_SUBST([GNULIB_USLEEP]) GNULIB_WRITE=0; AC_SUBST([GNULIB_WRITE]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_CHOWN=1; AC_SUBST([HAVE_CHOWN]) HAVE_DUP2=1; AC_SUBST([HAVE_DUP2]) HAVE_DUP3=1; AC_SUBST([HAVE_DUP3]) HAVE_EUIDACCESS=1; AC_SUBST([HAVE_EUIDACCESS]) HAVE_FACCESSAT=1; AC_SUBST([HAVE_FACCESSAT]) HAVE_FCHDIR=1; AC_SUBST([HAVE_FCHDIR]) HAVE_FCHOWNAT=1; AC_SUBST([HAVE_FCHOWNAT]) HAVE_FDATASYNC=1; AC_SUBST([HAVE_FDATASYNC]) HAVE_FSYNC=1; AC_SUBST([HAVE_FSYNC]) HAVE_FTRUNCATE=1; AC_SUBST([HAVE_FTRUNCATE]) HAVE_GETDTABLESIZE=1; AC_SUBST([HAVE_GETDTABLESIZE]) HAVE_GETGROUPS=1; AC_SUBST([HAVE_GETGROUPS]) HAVE_GETHOSTNAME=1; AC_SUBST([HAVE_GETHOSTNAME]) HAVE_GETLOGIN=1; AC_SUBST([HAVE_GETLOGIN]) HAVE_GETPAGESIZE=1; AC_SUBST([HAVE_GETPAGESIZE]) HAVE_GROUP_MEMBER=1; AC_SUBST([HAVE_GROUP_MEMBER]) HAVE_LCHOWN=1; AC_SUBST([HAVE_LCHOWN]) HAVE_LINK=1; AC_SUBST([HAVE_LINK]) HAVE_LINKAT=1; AC_SUBST([HAVE_LINKAT]) HAVE_PIPE=1; AC_SUBST([HAVE_PIPE]) HAVE_PIPE2=1; AC_SUBST([HAVE_PIPE2]) HAVE_PREAD=1; AC_SUBST([HAVE_PREAD]) HAVE_PWRITE=1; AC_SUBST([HAVE_PWRITE]) HAVE_READLINK=1; AC_SUBST([HAVE_READLINK]) HAVE_READLINKAT=1; AC_SUBST([HAVE_READLINKAT]) HAVE_SETHOSTNAME=1; AC_SUBST([HAVE_SETHOSTNAME]) HAVE_SLEEP=1; AC_SUBST([HAVE_SLEEP]) HAVE_SYMLINK=1; AC_SUBST([HAVE_SYMLINK]) HAVE_SYMLINKAT=1; AC_SUBST([HAVE_SYMLINKAT]) HAVE_UNLINKAT=1; AC_SUBST([HAVE_UNLINKAT]) HAVE_USLEEP=1; AC_SUBST([HAVE_USLEEP]) HAVE_DECL_ENVIRON=1; AC_SUBST([HAVE_DECL_ENVIRON]) HAVE_DECL_FCHDIR=1; AC_SUBST([HAVE_DECL_FCHDIR]) HAVE_DECL_FDATASYNC=1; AC_SUBST([HAVE_DECL_FDATASYNC]) HAVE_DECL_GETDOMAINNAME=1; AC_SUBST([HAVE_DECL_GETDOMAINNAME]) HAVE_DECL_GETLOGIN_R=1; AC_SUBST([HAVE_DECL_GETLOGIN_R]) HAVE_DECL_GETPAGESIZE=1; AC_SUBST([HAVE_DECL_GETPAGESIZE]) HAVE_DECL_GETUSERSHELL=1; AC_SUBST([HAVE_DECL_GETUSERSHELL]) HAVE_DECL_SETHOSTNAME=1; AC_SUBST([HAVE_DECL_SETHOSTNAME]) HAVE_DECL_TTYNAME_R=1; AC_SUBST([HAVE_DECL_TTYNAME_R]) HAVE_OS_H=0; AC_SUBST([HAVE_OS_H]) HAVE_SYS_PARAM_H=0; AC_SUBST([HAVE_SYS_PARAM_H]) REPLACE_CHOWN=0; AC_SUBST([REPLACE_CHOWN]) REPLACE_CLOSE=0; AC_SUBST([REPLACE_CLOSE]) REPLACE_DUP=0; AC_SUBST([REPLACE_DUP]) REPLACE_DUP2=0; AC_SUBST([REPLACE_DUP2]) REPLACE_FCHOWNAT=0; AC_SUBST([REPLACE_FCHOWNAT]) REPLACE_GETCWD=0; AC_SUBST([REPLACE_GETCWD]) REPLACE_GETDOMAINNAME=0; AC_SUBST([REPLACE_GETDOMAINNAME]) REPLACE_GETLOGIN_R=0; AC_SUBST([REPLACE_GETLOGIN_R]) REPLACE_GETGROUPS=0; AC_SUBST([REPLACE_GETGROUPS]) REPLACE_GETPAGESIZE=0; AC_SUBST([REPLACE_GETPAGESIZE]) REPLACE_LCHOWN=0; AC_SUBST([REPLACE_LCHOWN]) REPLACE_LINK=0; AC_SUBST([REPLACE_LINK]) REPLACE_LINKAT=0; AC_SUBST([REPLACE_LINKAT]) REPLACE_LSEEK=0; AC_SUBST([REPLACE_LSEEK]) REPLACE_PREAD=0; AC_SUBST([REPLACE_PREAD]) REPLACE_PWRITE=0; AC_SUBST([REPLACE_PWRITE]) REPLACE_READ=0; AC_SUBST([REPLACE_READ]) REPLACE_READLINK=0; AC_SUBST([REPLACE_READLINK]) REPLACE_RMDIR=0; AC_SUBST([REPLACE_RMDIR]) REPLACE_SLEEP=0; AC_SUBST([REPLACE_SLEEP]) REPLACE_SYMLINK=0; AC_SUBST([REPLACE_SYMLINK]) REPLACE_TTYNAME_R=0; AC_SUBST([REPLACE_TTYNAME_R]) REPLACE_UNLINK=0; AC_SUBST([REPLACE_UNLINK]) REPLACE_UNLINKAT=0; AC_SUBST([REPLACE_UNLINKAT]) REPLACE_USLEEP=0; AC_SUBST([REPLACE_USLEEP]) REPLACE_WRITE=0; AC_SUBST([REPLACE_WRITE]) UNISTD_H_HAVE_WINSOCK2_H=0; AC_SUBST([UNISTD_H_HAVE_WINSOCK2_H]) UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0; AC_SUBST([UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS]) ]) ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/gl/m4/dirname.m4�������������������������������������������������������������0000664�0001750�0001750�00000001054�11672675562�014535� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#serial 10 -*- autoconf -*- dnl Copyright (C) 2002-2006, 2009-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_DIRNAME], [ AC_REQUIRE([gl_DIRNAME_LGPL]) ]) AC_DEFUN([gl_DIRNAME_LGPL], [ dnl Prerequisites of lib/dirname.h. AC_REQUIRE([gl_DOUBLE_SLASH_ROOT]) dnl No prerequisites of lib/basename-lgpl.c, lib/dirname-lgpl.c, dnl lib/stripslash.c. ]) ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/gl/m4/string_h.m4������������������������������������������������������������0000664�0001750�0001750�00000012714�11672675562�014740� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Configure a GNU-like replacement for <string.h>. # Copyright (C) 2007-2011 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 21 # Written by Paul Eggert. AC_DEFUN([gl_HEADER_STRING_H], [ dnl Use AC_REQUIRE here, so that the default behavior below is expanded dnl once only, before all statements that occur in other macros. AC_REQUIRE([gl_HEADER_STRING_H_BODY]) ]) AC_DEFUN([gl_HEADER_STRING_H_BODY], [ AC_REQUIRE([AC_C_RESTRICT]) AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) gl_NEXT_HEADERS([string.h]) dnl Check for declarations of anything we want to poison if the dnl corresponding gnulib module is not in use, and which is not dnl guaranteed by C89. gl_WARN_ON_USE_PREPARE([[#include <string.h> ]], [ffsl ffsll memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul strdup strncat strndup strnlen strpbrk strsep strcasestr strtok_r strerror_r strsignal strverscmp]) ]) AC_DEFUN([gl_STRING_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS], [ GNULIB_FFSL=0; AC_SUBST([GNULIB_FFSL]) GNULIB_FFSLL=0; AC_SUBST([GNULIB_FFSLL]) GNULIB_MEMCHR=0; AC_SUBST([GNULIB_MEMCHR]) GNULIB_MEMMEM=0; AC_SUBST([GNULIB_MEMMEM]) GNULIB_MEMPCPY=0; AC_SUBST([GNULIB_MEMPCPY]) GNULIB_MEMRCHR=0; AC_SUBST([GNULIB_MEMRCHR]) GNULIB_RAWMEMCHR=0; AC_SUBST([GNULIB_RAWMEMCHR]) GNULIB_STPCPY=0; AC_SUBST([GNULIB_STPCPY]) GNULIB_STPNCPY=0; AC_SUBST([GNULIB_STPNCPY]) GNULIB_STRCHRNUL=0; AC_SUBST([GNULIB_STRCHRNUL]) GNULIB_STRDUP=0; AC_SUBST([GNULIB_STRDUP]) GNULIB_STRNCAT=0; AC_SUBST([GNULIB_STRNCAT]) GNULIB_STRNDUP=0; AC_SUBST([GNULIB_STRNDUP]) GNULIB_STRNLEN=0; AC_SUBST([GNULIB_STRNLEN]) GNULIB_STRPBRK=0; AC_SUBST([GNULIB_STRPBRK]) GNULIB_STRSEP=0; AC_SUBST([GNULIB_STRSEP]) GNULIB_STRSTR=0; AC_SUBST([GNULIB_STRSTR]) GNULIB_STRCASESTR=0; AC_SUBST([GNULIB_STRCASESTR]) GNULIB_STRTOK_R=0; AC_SUBST([GNULIB_STRTOK_R]) GNULIB_MBSLEN=0; AC_SUBST([GNULIB_MBSLEN]) GNULIB_MBSNLEN=0; AC_SUBST([GNULIB_MBSNLEN]) GNULIB_MBSCHR=0; AC_SUBST([GNULIB_MBSCHR]) GNULIB_MBSRCHR=0; AC_SUBST([GNULIB_MBSRCHR]) GNULIB_MBSSTR=0; AC_SUBST([GNULIB_MBSSTR]) GNULIB_MBSCASECMP=0; AC_SUBST([GNULIB_MBSCASECMP]) GNULIB_MBSNCASECMP=0; AC_SUBST([GNULIB_MBSNCASECMP]) GNULIB_MBSPCASECMP=0; AC_SUBST([GNULIB_MBSPCASECMP]) GNULIB_MBSCASESTR=0; AC_SUBST([GNULIB_MBSCASESTR]) GNULIB_MBSCSPN=0; AC_SUBST([GNULIB_MBSCSPN]) GNULIB_MBSPBRK=0; AC_SUBST([GNULIB_MBSPBRK]) GNULIB_MBSSPN=0; AC_SUBST([GNULIB_MBSSPN]) GNULIB_MBSSEP=0; AC_SUBST([GNULIB_MBSSEP]) GNULIB_MBSTOK_R=0; AC_SUBST([GNULIB_MBSTOK_R]) GNULIB_STRERROR=0; AC_SUBST([GNULIB_STRERROR]) GNULIB_STRERROR_R=0; AC_SUBST([GNULIB_STRERROR_R]) GNULIB_STRSIGNAL=0; AC_SUBST([GNULIB_STRSIGNAL]) GNULIB_STRVERSCMP=0; AC_SUBST([GNULIB_STRVERSCMP]) HAVE_MBSLEN=0; AC_SUBST([HAVE_MBSLEN]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_FFSL=1; AC_SUBST([HAVE_FFSL]) HAVE_FFSLL=1; AC_SUBST([HAVE_FFSLL]) HAVE_MEMCHR=1; AC_SUBST([HAVE_MEMCHR]) HAVE_DECL_MEMMEM=1; AC_SUBST([HAVE_DECL_MEMMEM]) HAVE_MEMPCPY=1; AC_SUBST([HAVE_MEMPCPY]) HAVE_DECL_MEMRCHR=1; AC_SUBST([HAVE_DECL_MEMRCHR]) HAVE_RAWMEMCHR=1; AC_SUBST([HAVE_RAWMEMCHR]) HAVE_STPCPY=1; AC_SUBST([HAVE_STPCPY]) HAVE_STPNCPY=1; AC_SUBST([HAVE_STPNCPY]) HAVE_STRCHRNUL=1; AC_SUBST([HAVE_STRCHRNUL]) HAVE_DECL_STRDUP=1; AC_SUBST([HAVE_DECL_STRDUP]) HAVE_DECL_STRNDUP=1; AC_SUBST([HAVE_DECL_STRNDUP]) HAVE_DECL_STRNLEN=1; AC_SUBST([HAVE_DECL_STRNLEN]) HAVE_STRPBRK=1; AC_SUBST([HAVE_STRPBRK]) HAVE_STRSEP=1; AC_SUBST([HAVE_STRSEP]) HAVE_STRCASESTR=1; AC_SUBST([HAVE_STRCASESTR]) HAVE_DECL_STRTOK_R=1; AC_SUBST([HAVE_DECL_STRTOK_R]) HAVE_DECL_STRERROR_R=1; AC_SUBST([HAVE_DECL_STRERROR_R]) HAVE_DECL_STRSIGNAL=1; AC_SUBST([HAVE_DECL_STRSIGNAL]) HAVE_STRVERSCMP=1; AC_SUBST([HAVE_STRVERSCMP]) REPLACE_MEMCHR=0; AC_SUBST([REPLACE_MEMCHR]) REPLACE_MEMMEM=0; AC_SUBST([REPLACE_MEMMEM]) REPLACE_STPNCPY=0; AC_SUBST([REPLACE_STPNCPY]) REPLACE_STRDUP=0; AC_SUBST([REPLACE_STRDUP]) REPLACE_STRSTR=0; AC_SUBST([REPLACE_STRSTR]) REPLACE_STRCASESTR=0; AC_SUBST([REPLACE_STRCASESTR]) REPLACE_STRCHRNUL=0; AC_SUBST([REPLACE_STRCHRNUL]) REPLACE_STRERROR=0; AC_SUBST([REPLACE_STRERROR]) REPLACE_STRERROR_R=0; AC_SUBST([REPLACE_STRERROR_R]) REPLACE_STRNCAT=0; AC_SUBST([REPLACE_STRNCAT]) REPLACE_STRNDUP=0; AC_SUBST([REPLACE_STRNDUP]) REPLACE_STRNLEN=0; AC_SUBST([REPLACE_STRNLEN]) REPLACE_STRSIGNAL=0; AC_SUBST([REPLACE_STRSIGNAL]) REPLACE_STRTOK_R=0; AC_SUBST([REPLACE_STRTOK_R]) UNDEFINE_STRTOK_R=0; AC_SUBST([UNDEFINE_STRTOK_R]) ]) ����������������������������������������������������source-highlight-3.1.6/gl/m4/getopt.m4��������������������������������������������������������������0000664�0001750�0001750�00000026443�11672675562�014431� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# getopt.m4 serial 39 dnl Copyright (C) 2002-2006, 2008-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # Request a POSIX compliant getopt function. AC_DEFUN([gl_FUNC_GETOPT_POSIX], [ m4_divert_text([DEFAULTS], [gl_getopt_required=POSIX]) AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) dnl Other modules can request the gnulib implementation of the getopt dnl functions unconditionally, by defining gl_REPLACE_GETOPT_ALWAYS. dnl argp.m4 does this. m4_ifdef([gl_REPLACE_GETOPT_ALWAYS], [ gl_GETOPT_IFELSE([], []) REPLACE_GETOPT=1 ], [ REPLACE_GETOPT=0 gl_GETOPT_IFELSE([ REPLACE_GETOPT=1 ], []) ]) if test $REPLACE_GETOPT = 1; then dnl Arrange for getopt.h to be created. gl_GETOPT_SUBSTITUTE_HEADER fi ]) # Request a POSIX compliant getopt function with GNU extensions (such as # options with optional arguments) and the functions getopt_long, # getopt_long_only. AC_DEFUN([gl_FUNC_GETOPT_GNU], [ m4_divert_text([INIT_PREPARE], [gl_getopt_required=GNU]) AC_REQUIRE([gl_FUNC_GETOPT_POSIX]) ]) # emacs' configure.in uses this. AC_DEFUN([gl_GETOPT_IFELSE], [ AC_REQUIRE([gl_GETOPT_CHECK_HEADERS]) AS_IF([test -n "$gl_replace_getopt"], [$1], [$2]) ]) # Determine whether to replace the entire getopt facility. AC_DEFUN([gl_GETOPT_CHECK_HEADERS], [ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_REQUIRE([AC_PROG_AWK]) dnl for awk that supports ENVIRON dnl Persuade Solaris <unistd.h> to declare optarg, optind, opterr, optopt. AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) gl_CHECK_NEXT_HEADERS([getopt.h]) if test $ac_cv_header_getopt_h = yes; then HAVE_GETOPT_H=1 else HAVE_GETOPT_H=0 fi AC_SUBST([HAVE_GETOPT_H]) gl_replace_getopt= dnl Test whether <getopt.h> is available. if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then AC_CHECK_HEADERS([getopt.h], [], [gl_replace_getopt=yes]) fi dnl Test whether the function getopt_long is available. if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then AC_CHECK_FUNCS([getopt_long_only], [], [gl_replace_getopt=yes]) fi dnl mingw's getopt (in libmingwex.a) does weird things when the options dnl strings starts with '+' and it's not the first call. Some internal state dnl is left over from earlier calls, and neither setting optind = 0 nor dnl setting optreset = 1 get rid of this internal state. dnl POSIX is silent on optind vs. optreset, so we allow either behavior. dnl POSIX 2008 does not specify leading '+' behavior, but see dnl http://austingroupbugs.net/view.php?id=191 for a recommendation on dnl the next version of POSIX. For now, we only guarantee leading '+' dnl behavior with getopt-gnu. if test -z "$gl_replace_getopt"; then AC_CACHE_CHECK([whether getopt is POSIX compatible], [gl_cv_func_getopt_posix], [ dnl BSD getopt_long uses an incompatible method to reset option dnl processing. Existence of the optreset variable, in and of dnl itself, is not a reason to replace getopt, but knowledge dnl of the variable is needed to determine how to reset and dnl whether a reset reparses the environment. Solaris dnl supports neither optreset nor optind=0, but keeps no state dnl that needs a reset beyond setting optind=1; detect Solaris dnl by getopt_clip. AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include <unistd.h>]], [[int *p = &optreset; return optreset;]])], [gl_optind_min=1], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[#include <getopt.h>]], [[return !getopt_clip;]])], [gl_optind_min=1], [gl_optind_min=0])]) dnl This test fails on mingw and succeeds on many other platforms. gl_save_CPPFLAGS=$CPPFLAGS CPPFLAGS="$CPPFLAGS -DOPTIND_MIN=$gl_optind_min" AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include <unistd.h> #include <stdlib.h> #include <string.h> int main () { { static char program[] = "program"; static char a[] = "-a"; static char foo[] = "foo"; static char bar[] = "bar"; char *argv[] = { program, a, foo, bar, NULL }; int c; optind = OPTIND_MIN; opterr = 0; c = getopt (4, argv, "ab"); if (!(c == 'a')) return 1; c = getopt (4, argv, "ab"); if (!(c == -1)) return 2; if (!(optind == 2)) return 3; } /* Some internal state exists at this point. */ { static char program[] = "program"; static char donald[] = "donald"; static char p[] = "-p"; static char billy[] = "billy"; static char duck[] = "duck"; static char a[] = "-a"; static char bar[] = "bar"; char *argv[] = { program, donald, p, billy, duck, a, bar, NULL }; int c; optind = OPTIND_MIN; opterr = 0; c = getopt (7, argv, "+abp:q:"); if (!(c == -1)) return 4; if (!(strcmp (argv[0], "program") == 0)) return 5; if (!(strcmp (argv[1], "donald") == 0)) return 6; if (!(strcmp (argv[2], "-p") == 0)) return 7; if (!(strcmp (argv[3], "billy") == 0)) return 8; if (!(strcmp (argv[4], "duck") == 0)) return 9; if (!(strcmp (argv[5], "-a") == 0)) return 10; if (!(strcmp (argv[6], "bar") == 0)) return 11; if (!(optind == 1)) return 12; } /* Detect MacOS 10.5, AIX 7.1 bug. */ { static char program[] = "program"; static char ab[] = "-ab"; char *argv[3] = { program, ab, NULL }; optind = OPTIND_MIN; opterr = 0; if (getopt (2, argv, "ab:") != 'a') return 13; if (getopt (2, argv, "ab:") != '?') return 14; if (optopt != 'b') return 15; if (optind != 2) return 16; } return 0; } ]])], [gl_cv_func_getopt_posix=yes], [gl_cv_func_getopt_posix=no], [case "$host_os" in mingw*) gl_cv_func_getopt_posix="guessing no";; darwin* | aix*) gl_cv_func_getopt_posix="guessing no";; *) gl_cv_func_getopt_posix="guessing yes";; esac ]) CPPFLAGS=$gl_save_CPPFLAGS ]) case "$gl_cv_func_getopt_posix" in *no) gl_replace_getopt=yes ;; esac fi if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then AC_CACHE_CHECK([for working GNU getopt function], [gl_cv_func_getopt_gnu], [# Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the # optstring is necessary for programs like m4 that have POSIX-mandated # semantics for supporting options interspersed with files. # Also, since getopt_long is a GNU extension, we require optind=0. # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT; # so take care to revert to the correct (non-)export state. dnl GNU Coding Standards currently allow awk but not env; besides, env dnl is ambiguous with environment values that contain newlines. gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }' case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in xx) gl_had_POSIXLY_CORRECT=exported ;; x) gl_had_POSIXLY_CORRECT=yes ;; *) gl_had_POSIXLY_CORRECT= ;; esac POSIXLY_CORRECT=1 export POSIXLY_CORRECT AC_RUN_IFELSE( [AC_LANG_PROGRAM([[#include <getopt.h> #include <stddef.h> #include <string.h> ]GL_NOCRASH[ ]], [[ int result = 0; nocrash_init(); /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw, and fails on MacOS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10. */ { static char conftest[] = "conftest"; static char plus[] = "-+"; char *argv[3] = { conftest, plus, NULL }; opterr = 0; if (getopt (2, argv, "+a") != '?') result |= 1; } /* This code succeeds on glibc 2.8, mingw, and fails on MacOS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */ { static char program[] = "program"; static char p[] = "-p"; static char foo[] = "foo"; static char bar[] = "bar"; char *argv[] = { program, p, foo, bar, NULL }; optind = 1; if (getopt (4, argv, "p::") != 'p') result |= 2; else if (optarg != NULL) result |= 4; else if (getopt (4, argv, "p::") != -1) result |= 6; else if (optind != 2) result |= 8; } /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */ { static char program[] = "program"; static char foo[] = "foo"; static char p[] = "-p"; char *argv[] = { program, foo, p, NULL }; optind = 0; if (getopt (3, argv, "-p") != 1) result |= 16; else if (getopt (3, argv, "-p") != 'p') result |= 32; } /* This code fails on glibc 2.11. */ { static char program[] = "program"; static char b[] = "-b"; static char a[] = "-a"; char *argv[] = { program, b, a, NULL }; optind = opterr = 0; if (getopt (3, argv, "+:a:b") != 'b') result |= 64; else if (getopt (3, argv, "+:a:b") != ':') result |= 64; } /* This code dumps core on glibc 2.14. */ { static char program[] = "program"; static char w[] = "-W"; static char dummy[] = "dummy"; char *argv[] = { program, w, dummy, NULL }; optind = opterr = 1; if (getopt (3, argv, "W;") != 'W') result |= 128; } return result; ]])], [gl_cv_func_getopt_gnu=yes], [gl_cv_func_getopt_gnu=no], [dnl Cross compiling. Guess based on host and declarations. case $host_os:$ac_cv_have_decl_optreset in *-gnu*:* | mingw*:*) gl_cv_func_getopt_gnu=no;; *:yes) gl_cv_func_getopt_gnu=no;; *) gl_cv_func_getopt_gnu=yes;; esac ]) case $gl_had_POSIXLY_CORRECT in exported) ;; yes) AS_UNSET([POSIXLY_CORRECT]); POSIXLY_CORRECT=1 ;; *) AS_UNSET([POSIXLY_CORRECT]) ;; esac ]) if test "$gl_cv_func_getopt_gnu" = "no"; then gl_replace_getopt=yes fi fi ]) # emacs' configure.in uses this. AC_DEFUN([gl_GETOPT_SUBSTITUTE_HEADER], [ GETOPT_H=getopt.h AC_DEFINE([__GETOPT_PREFIX], [[rpl_]], [Define to rpl_ if the getopt replacement functions and variables should be used.]) AC_SUBST([GETOPT_H]) ]) # Prerequisites of lib/getopt*. # emacs' configure.in uses this. AC_DEFUN([gl_PREREQ_GETOPT], [ AC_CHECK_DECLS_ONCE([getenv]) ]) �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/gl/m4/dirent_h.m4������������������������������������������������������������0000664�0001750�0001750�00000004766�11672675562�014727� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# dirent_h.m4 serial 16 dnl Copyright (C) 2008-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Written by Bruno Haible. AC_DEFUN([gl_DIRENT_H], [ dnl Use AC_REQUIRE here, so that the default behavior below is expanded dnl once only, before all statements that occur in other macros. AC_REQUIRE([gl_DIRENT_H_DEFAULTS]) dnl <dirent.h> is always overridden, because of GNULIB_POSIXCHECK. gl_CHECK_NEXT_HEADERS([dirent.h]) if test $ac_cv_header_dirent_h = yes; then HAVE_DIRENT_H=1 else HAVE_DIRENT_H=0 fi AC_SUBST([HAVE_DIRENT_H]) dnl Check for declarations of anything we want to poison if the dnl corresponding gnulib module is not in use. gl_WARN_ON_USE_PREPARE([[#include <dirent.h> ]], [alphasort closedir dirfd fdopendir opendir readdir rewinddir scandir]) ]) AC_DEFUN([gl_DIRENT_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_DIRENT_H_DEFAULTS]) gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) AC_DEFUN([gl_DIRENT_H_DEFAULTS], [ AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) dnl for REPLACE_FCHDIR GNULIB_OPENDIR=0; AC_SUBST([GNULIB_OPENDIR]) GNULIB_READDIR=0; AC_SUBST([GNULIB_READDIR]) GNULIB_REWINDDIR=0; AC_SUBST([GNULIB_REWINDDIR]) GNULIB_CLOSEDIR=0; AC_SUBST([GNULIB_CLOSEDIR]) GNULIB_DIRFD=0; AC_SUBST([GNULIB_DIRFD]) GNULIB_FDOPENDIR=0; AC_SUBST([GNULIB_FDOPENDIR]) GNULIB_SCANDIR=0; AC_SUBST([GNULIB_SCANDIR]) GNULIB_ALPHASORT=0; AC_SUBST([GNULIB_ALPHASORT]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_OPENDIR=1; AC_SUBST([HAVE_OPENDIR]) HAVE_READDIR=1; AC_SUBST([HAVE_READDIR]) HAVE_REWINDDIR=1; AC_SUBST([HAVE_REWINDDIR]) HAVE_CLOSEDIR=1; AC_SUBST([HAVE_CLOSEDIR]) HAVE_DECL_DIRFD=1; AC_SUBST([HAVE_DECL_DIRFD]) HAVE_DECL_FDOPENDIR=1;AC_SUBST([HAVE_DECL_FDOPENDIR]) HAVE_FDOPENDIR=1; AC_SUBST([HAVE_FDOPENDIR]) HAVE_SCANDIR=1; AC_SUBST([HAVE_SCANDIR]) HAVE_ALPHASORT=1; AC_SUBST([HAVE_ALPHASORT]) REPLACE_OPENDIR=0; AC_SUBST([REPLACE_OPENDIR]) REPLACE_CLOSEDIR=0; AC_SUBST([REPLACE_CLOSEDIR]) REPLACE_DIRFD=0; AC_SUBST([REPLACE_DIRFD]) REPLACE_FDOPENDIR=0; AC_SUBST([REPLACE_FDOPENDIR]) ]) ����������source-highlight-3.1.6/gl/m4/double-slash-root.m4���������������������������������������������������0000664�0001750�0001750�00000003125�11672675562�016462� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# double-slash-root.m4 serial 4 -*- Autoconf -*- dnl Copyright (C) 2006, 2008-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_DOUBLE_SLASH_ROOT], [ AC_REQUIRE([AC_CANONICAL_HOST]) AC_CACHE_CHECK([whether // is distinct from /], [gl_cv_double_slash_root], [ if test x"$cross_compiling" = xyes ; then # When cross-compiling, there is no way to tell whether // is special # short of a list of hosts. However, the only known hosts to date # that have a distinct // are Apollo DomainOS (too old to port to), # Cygwin, and z/OS. If anyone knows of another system for which // has # special semantics and is distinct from /, please report it to # <bug-gnulib@gnu.org>. case $host in *-cygwin | i370-ibm-openedition) gl_cv_double_slash_root=yes ;; *) # Be optimistic and assume that / and // are the same when we # don't know. gl_cv_double_slash_root='unknown, assuming no' ;; esac else set x `ls -di / // 2>/dev/null` if test "$[2]" = "$[4]" && wc //dev/null >/dev/null 2>&1; then gl_cv_double_slash_root=no else gl_cv_double_slash_root=yes fi fi]) if test "$gl_cv_double_slash_root" = yes; then AC_DEFINE([DOUBLE_SLASH_IS_DISTINCT_ROOT], [1], [Define to 1 if // is a file system root distinct from /.]) fi ]) �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/gl/m4/mkdir.m4���������������������������������������������������������������0000664�0001750�0001750�00000003442�11672675562�014227� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# serial 10 # Copyright (C) 2001, 2003-2004, 2006, 2008-2011 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # On some systems, mkdir ("foo/", 0700) fails because of the trailing slash. # On others, mkdir ("foo/./", 0700) mistakenly succeeds. # On such systems, arrange to use a wrapper function. AC_DEFUN([gl_FUNC_MKDIR], [dnl AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) AC_CHECK_HEADERS_ONCE([unistd.h]) AC_CACHE_CHECK([whether mkdir handles trailing slash], [gl_cv_func_mkdir_trailing_slash_works], [rm -rf conftest.dir AC_RUN_IFELSE([AC_LANG_PROGRAM([[ # include <sys/types.h> # include <sys/stat.h> ]], [return mkdir ("conftest.dir/", 0700);])], [gl_cv_func_mkdir_trailing_slash_works=yes], [gl_cv_func_mkdir_trailing_slash_works=no], [gl_cv_func_mkdir_trailing_slash_works="guessing no"]) rm -rf conftest.dir ] ) if test "$gl_cv_func_mkdir_trailing_slash_works" != yes; then REPLACE_MKDIR=1 fi AC_CACHE_CHECK([whether mkdir handles trailing dot], [gl_cv_func_mkdir_trailing_dot_works], [rm -rf conftest.dir AC_RUN_IFELSE([AC_LANG_PROGRAM([[ # include <sys/types.h> # include <sys/stat.h> ]], [return !mkdir ("conftest.dir/./", 0700);])], [gl_cv_func_mkdir_trailing_dot_works=yes], [gl_cv_func_mkdir_trailing_dot_works=no], [gl_cv_func_mkdir_trailing_dot_works="guessing no"]) rm -rf conftest.dir ] ) if test "$gl_cv_func_mkdir_trailing_dot_works" != yes; then REPLACE_MKDIR=1 AC_DEFINE([FUNC_MKDIR_DOT_BUG], [1], [Define to 1 if mkdir mistakenly creates a directory given with a trailing dot component.]) fi ]) ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/gl/gettext.h�����������������������������������������������������������������0000664�0001750�0001750�00000023424�11672675562�014176� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Convenience header for conditional use of GNU <libintl.h>. Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2011 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _LIBGETTEXT_H #define _LIBGETTEXT_H 1 /* NLS can be disabled through the configure --disable-nls option. */ #if ENABLE_NLS /* Get declarations of GNU message catalog functions. */ # include <libintl.h> /* You can set the DEFAULT_TEXT_DOMAIN macro to specify the domain used by the gettext() and ngettext() macros. This is an alternative to calling textdomain(), and is useful for libraries. */ # ifdef DEFAULT_TEXT_DOMAIN # undef gettext # define gettext(Msgid) \ dgettext (DEFAULT_TEXT_DOMAIN, Msgid) # undef ngettext # define ngettext(Msgid1, Msgid2, N) \ dngettext (DEFAULT_TEXT_DOMAIN, Msgid1, Msgid2, N) # endif #else /* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which chokes if dcgettext is defined as a macro. So include it now, to make later inclusions of <locale.h> a NOP. We don't include <libintl.h> as well because people using "gettext.h" will not include <libintl.h>, and also including <libintl.h> would fail on SunOS 4, whereas <locale.h> is OK. */ #if defined(__sun) # include <locale.h> #endif /* Many header files from the libstdc++ coming with g++ 3.3 or newer include <libintl.h>, which chokes if dcgettext is defined as a macro. So include it now, to make later inclusions of <libintl.h> a NOP. */ #if defined(__cplusplus) && defined(__GNUG__) && (__GNUC__ >= 3) # include <cstdlib> # if (__GLIBC__ >= 2 && !defined __UCLIBC__) || _GLIBCXX_HAVE_LIBINTL_H # include <libintl.h> # endif #endif /* Disabled NLS. The casts to 'const char *' serve the purpose of producing warnings for invalid uses of the value returned from these functions. On pre-ANSI systems without 'const', the config.h file is supposed to contain "#define const". */ # undef gettext # define gettext(Msgid) ((const char *) (Msgid)) # undef dgettext # define dgettext(Domainname, Msgid) ((void) (Domainname), gettext (Msgid)) # undef dcgettext # define dcgettext(Domainname, Msgid, Category) \ ((void) (Category), dgettext (Domainname, Msgid)) # undef ngettext # define ngettext(Msgid1, Msgid2, N) \ ((N) == 1 \ ? ((void) (Msgid2), (const char *) (Msgid1)) \ : ((void) (Msgid1), (const char *) (Msgid2))) # undef dngettext # define dngettext(Domainname, Msgid1, Msgid2, N) \ ((void) (Domainname), ngettext (Msgid1, Msgid2, N)) # undef dcngettext # define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \ ((void) (Category), dngettext (Domainname, Msgid1, Msgid2, N)) # undef textdomain # define textdomain(Domainname) ((const char *) (Domainname)) # undef bindtextdomain # define bindtextdomain(Domainname, Dirname) \ ((void) (Domainname), (const char *) (Dirname)) # undef bind_textdomain_codeset # define bind_textdomain_codeset(Domainname, Codeset) \ ((void) (Domainname), (const char *) (Codeset)) #endif /* Prefer gnulib's setlocale override over libintl's setlocale override. */ #ifdef GNULIB_defined_setlocale # undef setlocale # define setlocale rpl_setlocale #endif /* A pseudo function call that serves as a marker for the automated extraction of messages, but does not call gettext(). The run-time translation is done at a different place in the code. The argument, String, should be a literal string. Concatenated strings and other string expressions won't work. The macro's expansion is not parenthesized, so that it is suitable as initializer for static 'char[]' or 'const char[]' variables. */ #define gettext_noop(String) String /* The separator between msgctxt and msgid in a .mo file. */ #define GETTEXT_CONTEXT_GLUE "\004" /* Pseudo function calls, taking a MSGCTXT and a MSGID instead of just a MSGID. MSGCTXT and MSGID must be string literals. MSGCTXT should be short and rarely need to change. The letter 'p' stands for 'particular' or 'special'. */ #ifdef DEFAULT_TEXT_DOMAIN # define pgettext(Msgctxt, Msgid) \ pgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) #else # define pgettext(Msgctxt, Msgid) \ pgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) #endif #define dpgettext(Domainname, Msgctxt, Msgid) \ pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) #define dcpgettext(Domainname, Msgctxt, Msgid, Category) \ pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, Category) #ifdef DEFAULT_TEXT_DOMAIN # define npgettext(Msgctxt, Msgid, MsgidPlural, N) \ npgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) #else # define npgettext(Msgctxt, Msgid, MsgidPlural, N) \ npgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) #endif #define dnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N) \ npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) #define dcnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N, Category) \ npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, Category) #ifdef __GNUC__ __inline #else #ifdef __cplusplus inline #endif #endif static const char * pgettext_aux (const char *domain, const char *msg_ctxt_id, const char *msgid, int category) { const char *translation = dcgettext (domain, msg_ctxt_id, category); if (translation == msg_ctxt_id) return msgid; else return translation; } #ifdef __GNUC__ __inline #else #ifdef __cplusplus inline #endif #endif static const char * npgettext_aux (const char *domain, const char *msg_ctxt_id, const char *msgid, const char *msgid_plural, unsigned long int n, int category) { const char *translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, category); if (translation == msg_ctxt_id || translation == msgid_plural) return (n == 1 ? msgid : msgid_plural); else return translation; } /* The same thing extended for non-constant arguments. Here MSGCTXT and MSGID can be arbitrary expressions. But for string literals these macros are less efficient than those above. */ #include <string.h> #define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS \ (((__GNUC__ >= 3 || __GNUG__ >= 2) && !defined __STRICT_ANSI__) \ /* || __STDC_VERSION__ >= 199901L */ ) #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS #include <stdlib.h> #endif #define pgettext_expr(Msgctxt, Msgid) \ dcpgettext_expr (NULL, Msgctxt, Msgid, LC_MESSAGES) #define dpgettext_expr(Domainname, Msgctxt, Msgid) \ dcpgettext_expr (Domainname, Msgctxt, Msgid, LC_MESSAGES) #ifdef __GNUC__ __inline #else #ifdef __cplusplus inline #endif #endif static const char * dcpgettext_expr (const char *domain, const char *msgctxt, const char *msgid, int category) { size_t msgctxt_len = strlen (msgctxt) + 1; size_t msgid_len = strlen (msgid) + 1; const char *translation; #if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS char msg_ctxt_id[msgctxt_len + msgid_len]; #else char buf[1024]; char *msg_ctxt_id = (msgctxt_len + msgid_len <= sizeof (buf) ? buf : (char *) malloc (msgctxt_len + msgid_len)); if (msg_ctxt_id != NULL) #endif { memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); msg_ctxt_id[msgctxt_len - 1] = '\004'; memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); translation = dcgettext (domain, msg_ctxt_id, category); #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS if (msg_ctxt_id != buf) free (msg_ctxt_id); #endif if (translation != msg_ctxt_id) return translation; } return msgid; } #define npgettext_expr(Msgctxt, Msgid, MsgidPlural, N) \ dcnpgettext_expr (NULL, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES) #define dnpgettext_expr(Domainname, Msgctxt, Msgid, MsgidPlural, N) \ dcnpgettext_expr (Domainname, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES) #ifdef __GNUC__ __inline #else #ifdef __cplusplus inline #endif #endif static const char * dcnpgettext_expr (const char *domain, const char *msgctxt, const char *msgid, const char *msgid_plural, unsigned long int n, int category) { size_t msgctxt_len = strlen (msgctxt) + 1; size_t msgid_len = strlen (msgid) + 1; const char *translation; #if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS char msg_ctxt_id[msgctxt_len + msgid_len]; #else char buf[1024]; char *msg_ctxt_id = (msgctxt_len + msgid_len <= sizeof (buf) ? buf : (char *) malloc (msgctxt_len + msgid_len)); if (msg_ctxt_id != NULL) #endif { memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); msg_ctxt_id[msgctxt_len - 1] = '\004'; memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, category); #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS if (msg_ctxt_id != buf) free (msg_ctxt_id); #endif if (!(translation == msg_ctxt_id || translation == msgid_plural)) return translation; } return (n == 1 ? msgid : msgid_plural); } #endif /* _LIBGETTEXT_H */ ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/gl/stripslash.c��������������������������������������������������������������0000664�0001750�0001750�00000003041�11672675562�014672� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* stripslash.c -- remove redundant trailing slashes from a file name Copyright (C) 1990, 2001, 2003-2006, 2009-2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include <config.h> #include "dirname.h" /* Remove trailing slashes from FILE. Return true if a trailing slash was removed. This is useful when using file name completion from a shell that adds a "/" after directory names (such as tcsh and bash), because on symlinks to directories, several system calls have different semantics according to whether a trailing slash is present. */ bool strip_trailing_slashes (char *file) { char *base = last_component (file); char *base_lim; bool had_slash; /* last_component returns "" for file system roots, but we need to turn `///' into `/'. */ if (! *base) base = file; base_lim = base + base_len (base); had_slash = (*base_lim != '\0'); *base_lim = '\0'; return had_slash; } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/gl/strdup.c������������������������������������������������������������������0000664�0001750�0001750�00000002601�11672675562�014020� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Copyright (C) 1991, 1996-1998, 2002-2004, 2006-2007, 2009-2011 Free Software Foundation, Inc. This file is part of the GNU C Library. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _LIBC # include <config.h> #endif /* Get specification. */ #include <string.h> #include <stdlib.h> #undef __strdup #ifdef _LIBC # undef strdup #endif #ifndef weak_alias # define __strdup strdup #endif /* Duplicate S, returning an identical malloc'd string. */ char * __strdup (const char *s) { size_t len = strlen (s) + 1; void *new = malloc (len); if (new == NULL) return NULL; return (char *) memcpy (new, s, len); } #ifdef libc_hidden_def libc_hidden_def (__strdup) #endif #ifdef weak_alias weak_alias (__strdup, strdup) #endif �������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/gl/sys_stat.in.h�������������������������������������������������������������0000664�0001750�0001750�00000044140�11672675562�014766� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Provide a more complete sys/stat header file. Copyright (C) 2005-2011 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Written by Eric Blake, Paul Eggert, and Jim Meyering. */ /* This file is supposed to be used on platforms where <sys/stat.h> is incomplete. It is intended to provide definitions and prototypes needed by an application. Start with what the system provides. */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ #if defined __need_system_sys_stat_h /* Special invocation convention. */ #@INCLUDE_NEXT@ @NEXT_SYS_STAT_H@ #else /* Normal invocation convention. */ #ifndef _@GUARD_PREFIX@_SYS_STAT_H /* Get nlink_t. */ #include <sys/types.h> /* Get struct timespec. */ #include <time.h> /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT@ @NEXT_SYS_STAT_H@ #ifndef _@GUARD_PREFIX@_SYS_STAT_H #define _@GUARD_PREFIX@_SYS_STAT_H /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ /* Before doing "#define mkdir rpl_mkdir" below, we need to include all headers that may declare mkdir(). Native Windows platforms declare mkdir in <io.h> and/or <direct.h>, not in <unistd.h>. */ #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ # include <io.h> /* mingw32, mingw64 */ # include <direct.h> /* mingw64, MSVC 9 */ #endif #ifndef S_IFIFO # ifdef _S_IFIFO # define S_IFIFO _S_IFIFO # endif #endif #ifndef S_IFMT # define S_IFMT 0170000 #endif #if STAT_MACROS_BROKEN # undef S_ISBLK # undef S_ISCHR # undef S_ISDIR # undef S_ISFIFO # undef S_ISLNK # undef S_ISNAM # undef S_ISMPB # undef S_ISMPC # undef S_ISNWK # undef S_ISREG # undef S_ISSOCK #endif #ifndef S_ISBLK # ifdef S_IFBLK # define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK) # else # define S_ISBLK(m) 0 # endif #endif #ifndef S_ISCHR # ifdef S_IFCHR # define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR) # else # define S_ISCHR(m) 0 # endif #endif #ifndef S_ISDIR # ifdef S_IFDIR # define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) # else # define S_ISDIR(m) 0 # endif #endif #ifndef S_ISDOOR /* Solaris 2.5 and up */ # define S_ISDOOR(m) 0 #endif #ifndef S_ISFIFO # ifdef S_IFIFO # define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO) # else # define S_ISFIFO(m) 0 # endif #endif #ifndef S_ISLNK # ifdef S_IFLNK # define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK) # else # define S_ISLNK(m) 0 # endif #endif #ifndef S_ISMPB /* V7 */ # ifdef S_IFMPB # define S_ISMPB(m) (((m) & S_IFMT) == S_IFMPB) # define S_ISMPC(m) (((m) & S_IFMT) == S_IFMPC) # else # define S_ISMPB(m) 0 # define S_ISMPC(m) 0 # endif #endif #ifndef S_ISNAM /* Xenix */ # ifdef S_IFNAM # define S_ISNAM(m) (((m) & S_IFMT) == S_IFNAM) # else # define S_ISNAM(m) 0 # endif #endif #ifndef S_ISNWK /* HP/UX */ # ifdef S_IFNWK # define S_ISNWK(m) (((m) & S_IFMT) == S_IFNWK) # else # define S_ISNWK(m) 0 # endif #endif #ifndef S_ISPORT /* Solaris 10 and up */ # define S_ISPORT(m) 0 #endif #ifndef S_ISREG # ifdef S_IFREG # define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) # else # define S_ISREG(m) 0 # endif #endif #ifndef S_ISSOCK # ifdef S_IFSOCK # define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK) # else # define S_ISSOCK(m) 0 # endif #endif #ifndef S_TYPEISMQ # define S_TYPEISMQ(p) 0 #endif #ifndef S_TYPEISTMO # define S_TYPEISTMO(p) 0 #endif #ifndef S_TYPEISSEM # ifdef S_INSEM # define S_TYPEISSEM(p) (S_ISNAM ((p)->st_mode) && (p)->st_rdev == S_INSEM) # else # define S_TYPEISSEM(p) 0 # endif #endif #ifndef S_TYPEISSHM # ifdef S_INSHD # define S_TYPEISSHM(p) (S_ISNAM ((p)->st_mode) && (p)->st_rdev == S_INSHD) # else # define S_TYPEISSHM(p) 0 # endif #endif /* high performance ("contiguous data") */ #ifndef S_ISCTG # define S_ISCTG(p) 0 #endif /* Cray DMF (data migration facility): off line, with data */ #ifndef S_ISOFD # define S_ISOFD(p) 0 #endif /* Cray DMF (data migration facility): off line, with no data */ #ifndef S_ISOFL # define S_ISOFL(p) 0 #endif /* 4.4BSD whiteout */ #ifndef S_ISWHT # define S_ISWHT(m) 0 #endif /* If any of the following are undefined, define them to their de facto standard values. */ #if !S_ISUID # define S_ISUID 04000 #endif #if !S_ISGID # define S_ISGID 02000 #endif /* S_ISVTX is a common extension to POSIX. */ #ifndef S_ISVTX # define S_ISVTX 01000 #endif #if !S_IRUSR && S_IREAD # define S_IRUSR S_IREAD #endif #if !S_IRUSR # define S_IRUSR 00400 #endif #if !S_IRGRP # define S_IRGRP (S_IRUSR >> 3) #endif #if !S_IROTH # define S_IROTH (S_IRUSR >> 6) #endif #if !S_IWUSR && S_IWRITE # define S_IWUSR S_IWRITE #endif #if !S_IWUSR # define S_IWUSR 00200 #endif #if !S_IWGRP # define S_IWGRP (S_IWUSR >> 3) #endif #if !S_IWOTH # define S_IWOTH (S_IWUSR >> 6) #endif #if !S_IXUSR && S_IEXEC # define S_IXUSR S_IEXEC #endif #if !S_IXUSR # define S_IXUSR 00100 #endif #if !S_IXGRP # define S_IXGRP (S_IXUSR >> 3) #endif #if !S_IXOTH # define S_IXOTH (S_IXUSR >> 6) #endif #if !S_IRWXU # define S_IRWXU (S_IRUSR | S_IWUSR | S_IXUSR) #endif #if !S_IRWXG # define S_IRWXG (S_IRGRP | S_IWGRP | S_IXGRP) #endif #if !S_IRWXO # define S_IRWXO (S_IROTH | S_IWOTH | S_IXOTH) #endif /* S_IXUGO is a common extension to POSIX. */ #if !S_IXUGO # define S_IXUGO (S_IXUSR | S_IXGRP | S_IXOTH) #endif #ifndef S_IRWXUGO # define S_IRWXUGO (S_IRWXU | S_IRWXG | S_IRWXO) #endif /* Macros for futimens and utimensat. */ #ifndef UTIME_NOW # define UTIME_NOW (-1) # define UTIME_OMIT (-2) #endif #if @GNULIB_FCHMODAT@ # if !@HAVE_FCHMODAT@ _GL_FUNCDECL_SYS (fchmodat, int, (int fd, char const *file, mode_t mode, int flag) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (fchmodat, int, (int fd, char const *file, mode_t mode, int flag)); _GL_CXXALIASWARN (fchmodat); #elif defined GNULIB_POSIXCHECK # undef fchmodat # if HAVE_RAW_DECL_FCHMODAT _GL_WARN_ON_USE (fchmodat, "fchmodat is not portable - " "use gnulib module openat for portability"); # endif #endif #if @GNULIB_FSTAT@ # if @REPLACE_FSTAT@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef fstat # define fstat rpl_fstat # endif _GL_FUNCDECL_RPL (fstat, int, (int fd, struct stat *buf) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (fstat, int, (int fd, struct stat *buf)); # else _GL_CXXALIAS_SYS (fstat, int, (int fd, struct stat *buf)); # endif _GL_CXXALIASWARN (fstat); #elif defined GNULIB_POSIXCHECK # undef fstat # if HAVE_RAW_DECL_FSTAT _GL_WARN_ON_USE (fstat, "fstat has portability problems - " "use gnulib module fstat for portability"); # endif #endif #if @GNULIB_FSTATAT@ # if @REPLACE_FSTATAT@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef fstatat # define fstatat rpl_fstatat # endif _GL_FUNCDECL_RPL (fstatat, int, (int fd, char const *name, struct stat *st, int flags) _GL_ARG_NONNULL ((2, 3))); _GL_CXXALIAS_RPL (fstatat, int, (int fd, char const *name, struct stat *st, int flags)); # else # if !@HAVE_FSTATAT@ _GL_FUNCDECL_SYS (fstatat, int, (int fd, char const *name, struct stat *st, int flags) _GL_ARG_NONNULL ((2, 3))); # endif _GL_CXXALIAS_SYS (fstatat, int, (int fd, char const *name, struct stat *st, int flags)); # endif _GL_CXXALIASWARN (fstatat); #elif defined GNULIB_POSIXCHECK # undef fstatat # if HAVE_RAW_DECL_FSTATAT _GL_WARN_ON_USE (fstatat, "fstatat is not portable - " "use gnulib module openat for portability"); # endif #endif #if @GNULIB_FUTIMENS@ /* Use the rpl_ prefix also on Solaris <= 9, because on Solaris 9 our futimens implementation relies on futimesat, which on Solaris 10 makes an invocation to futimens that is meant to invoke the libc's futimens(), not gnulib's futimens(). */ # if @REPLACE_FUTIMENS@ || (!@HAVE_FUTIMENS@ && defined __sun) # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef futimens # define futimens rpl_futimens # endif _GL_FUNCDECL_RPL (futimens, int, (int fd, struct timespec const times[2])); _GL_CXXALIAS_RPL (futimens, int, (int fd, struct timespec const times[2])); # else # if !@HAVE_FUTIMENS@ _GL_FUNCDECL_SYS (futimens, int, (int fd, struct timespec const times[2])); # endif _GL_CXXALIAS_SYS (futimens, int, (int fd, struct timespec const times[2])); # endif # if @HAVE_FUTIMENS@ _GL_CXXALIASWARN (futimens); # endif #elif defined GNULIB_POSIXCHECK # undef futimens # if HAVE_RAW_DECL_FUTIMENS _GL_WARN_ON_USE (futimens, "futimens is not portable - " "use gnulib module futimens for portability"); # endif #endif #if @GNULIB_LCHMOD@ /* Change the mode of FILENAME to MODE, without dereferencing it if FILENAME denotes a symbolic link. */ # if !@HAVE_LCHMOD@ /* The lchmod replacement follows symbolic links. Callers should take this into account; lchmod should be applied only to arguments that are known to not be symbolic links. On hosts that lack lchmod, this can lead to race conditions between the check and the invocation of lchmod, but we know of no workarounds that are reliable in general. You might try requesting support for lchmod from your operating system supplier. */ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define lchmod chmod # endif /* Need to cast, because on mingw, the second parameter of chmod is int mode. */ _GL_CXXALIAS_RPL_CAST_1 (lchmod, chmod, int, (const char *filename, mode_t mode)); # else # if 0 /* assume already declared */ _GL_FUNCDECL_SYS (lchmod, int, (const char *filename, mode_t mode) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (lchmod, int, (const char *filename, mode_t mode)); # endif # if @HAVE_LCHMOD@ _GL_CXXALIASWARN (lchmod); # endif #elif defined GNULIB_POSIXCHECK # undef lchmod # if HAVE_RAW_DECL_LCHMOD _GL_WARN_ON_USE (lchmod, "lchmod is unportable - " "use gnulib module lchmod for portability"); # endif #endif #if @GNULIB_LSTAT@ # if ! @HAVE_LSTAT@ /* mingw does not support symlinks, therefore it does not have lstat. But without links, stat does just fine. */ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define lstat stat # endif _GL_CXXALIAS_RPL_1 (lstat, stat, int, (const char *name, struct stat *buf)); # elif @REPLACE_LSTAT@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef lstat # define lstat rpl_lstat # endif _GL_FUNCDECL_RPL (lstat, int, (const char *name, struct stat *buf) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (lstat, int, (const char *name, struct stat *buf)); # else _GL_CXXALIAS_SYS (lstat, int, (const char *name, struct stat *buf)); # endif # if @HAVE_LSTAT@ _GL_CXXALIASWARN (lstat); # endif #elif defined GNULIB_POSIXCHECK # undef lstat # if HAVE_RAW_DECL_LSTAT _GL_WARN_ON_USE (lstat, "lstat is unportable - " "use gnulib module lstat for portability"); # endif #endif #if @REPLACE_MKDIR@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef mkdir # define mkdir rpl_mkdir # endif _GL_FUNCDECL_RPL (mkdir, int, (char const *name, mode_t mode) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode)); #else /* mingw's _mkdir() function has 1 argument, but we pass 2 arguments. Additionally, it declares _mkdir (and depending on compile flags, an alias mkdir), only in the nonstandard includes <direct.h> and <io.h>, which are included above. */ # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ # if !GNULIB_defined_rpl_mkdir static inline int rpl_mkdir (char const *name, mode_t mode) { return _mkdir (name); } # define GNULIB_defined_rpl_mkdir 1 # endif # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define mkdir rpl_mkdir # endif _GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode)); # else _GL_CXXALIAS_SYS (mkdir, int, (char const *name, mode_t mode)); # endif #endif _GL_CXXALIASWARN (mkdir); #if @GNULIB_MKDIRAT@ # if !@HAVE_MKDIRAT@ _GL_FUNCDECL_SYS (mkdirat, int, (int fd, char const *file, mode_t mode) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (mkdirat, int, (int fd, char const *file, mode_t mode)); _GL_CXXALIASWARN (mkdirat); #elif defined GNULIB_POSIXCHECK # undef mkdirat # if HAVE_RAW_DECL_MKDIRAT _GL_WARN_ON_USE (mkdirat, "mkdirat is not portable - " "use gnulib module openat for portability"); # endif #endif #if @GNULIB_MKFIFO@ # if @REPLACE_MKFIFO@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef mkfifo # define mkfifo rpl_mkfifo # endif _GL_FUNCDECL_RPL (mkfifo, int, (char const *file, mode_t mode) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (mkfifo, int, (char const *file, mode_t mode)); # else # if !@HAVE_MKFIFO@ _GL_FUNCDECL_SYS (mkfifo, int, (char const *file, mode_t mode) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (mkfifo, int, (char const *file, mode_t mode)); # endif _GL_CXXALIASWARN (mkfifo); #elif defined GNULIB_POSIXCHECK # undef mkfifo # if HAVE_RAW_DECL_MKFIFO _GL_WARN_ON_USE (mkfifo, "mkfifo is not portable - " "use gnulib module mkfifo for portability"); # endif #endif #if @GNULIB_MKFIFOAT@ # if !@HAVE_MKFIFOAT@ _GL_FUNCDECL_SYS (mkfifoat, int, (int fd, char const *file, mode_t mode) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (mkfifoat, int, (int fd, char const *file, mode_t mode)); _GL_CXXALIASWARN (mkfifoat); #elif defined GNULIB_POSIXCHECK # undef mkfifoat # if HAVE_RAW_DECL_MKFIFOAT _GL_WARN_ON_USE (mkfifoat, "mkfifoat is not portable - " "use gnulib module mkfifoat for portability"); # endif #endif #if @GNULIB_MKNOD@ # if @REPLACE_MKNOD@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef mknod # define mknod rpl_mknod # endif _GL_FUNCDECL_RPL (mknod, int, (char const *file, mode_t mode, dev_t dev) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (mknod, int, (char const *file, mode_t mode, dev_t dev)); # else # if !@HAVE_MKNOD@ _GL_FUNCDECL_SYS (mknod, int, (char const *file, mode_t mode, dev_t dev) _GL_ARG_NONNULL ((1))); # endif /* Need to cast, because on OSF/1 5.1, the third parameter is '...'. */ _GL_CXXALIAS_SYS_CAST (mknod, int, (char const *file, mode_t mode, dev_t dev)); # endif _GL_CXXALIASWARN (mknod); #elif defined GNULIB_POSIXCHECK # undef mknod # if HAVE_RAW_DECL_MKNOD _GL_WARN_ON_USE (mknod, "mknod is not portable - " "use gnulib module mknod for portability"); # endif #endif #if @GNULIB_MKNODAT@ # if !@HAVE_MKNODAT@ _GL_FUNCDECL_SYS (mknodat, int, (int fd, char const *file, mode_t mode, dev_t dev) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (mknodat, int, (int fd, char const *file, mode_t mode, dev_t dev)); _GL_CXXALIASWARN (mknodat); #elif defined GNULIB_POSIXCHECK # undef mknodat # if HAVE_RAW_DECL_MKNODAT _GL_WARN_ON_USE (mknodat, "mknodat is not portable - " "use gnulib module mkfifoat for portability"); # endif #endif #if @GNULIB_STAT@ # if @REPLACE_STAT@ /* We can't use the object-like #define stat rpl_stat, because of struct stat. This means that rpl_stat will not be used if the user does (stat)(a,b). Oh well. */ # undef stat # ifdef _LARGE_FILES /* With _LARGE_FILES defined, AIX (only) defines stat to stat64, so we have to replace stat64() instead of stat(). */ # define stat stat64 # undef stat64 # define stat64(name, st) rpl_stat (name, st) # else /* !_LARGE_FILES */ # define stat(name, st) rpl_stat (name, st) # endif /* !_LARGE_FILES */ _GL_EXTERN_C int stat (const char *name, struct stat *buf) _GL_ARG_NONNULL ((1, 2)); # endif #elif defined GNULIB_POSIXCHECK # undef stat # if HAVE_RAW_DECL_STAT _GL_WARN_ON_USE (stat, "stat is unportable - " "use gnulib module stat for portability"); # endif #endif #if @GNULIB_UTIMENSAT@ /* Use the rpl_ prefix also on Solaris <= 9, because on Solaris 9 our utimensat implementation relies on futimesat, which on Solaris 10 makes an invocation to utimensat that is meant to invoke the libc's utimensat(), not gnulib's utimensat(). */ # if @REPLACE_UTIMENSAT@ || (!@HAVE_UTIMENSAT@ && defined __sun) # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef utimensat # define utimensat rpl_utimensat # endif _GL_FUNCDECL_RPL (utimensat, int, (int fd, char const *name, struct timespec const times[2], int flag) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (utimensat, int, (int fd, char const *name, struct timespec const times[2], int flag)); # else # if !@HAVE_UTIMENSAT@ _GL_FUNCDECL_SYS (utimensat, int, (int fd, char const *name, struct timespec const times[2], int flag) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (utimensat, int, (int fd, char const *name, struct timespec const times[2], int flag)); # endif # if @HAVE_UTIMENSAT@ _GL_CXXALIASWARN (utimensat); # endif #elif defined GNULIB_POSIXCHECK # undef utimensat # if HAVE_RAW_DECL_UTIMENSAT _GL_WARN_ON_USE (utimensat, "utimensat is not portable - " "use gnulib module utimensat for portability"); # endif #endif #endif /* _@GUARD_PREFIX@_SYS_STAT_H */ #endif /* _@GUARD_PREFIX@_SYS_STAT_H */ #endif ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/gl/stdbool.in.h��������������������������������������������������������������0000664�0001750�0001750�00000011660�11672675562�014564� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Copyright (C) 2001-2003, 2006-2011 Free Software Foundation, Inc. Written by Bruno Haible <haible@clisp.cons.org>, 2001. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _GL_STDBOOL_H #define _GL_STDBOOL_H /* ISO C 99 <stdbool.h> for platforms that lack it. */ /* Usage suggestions: Programs that use <stdbool.h> should be aware of some limitations and standards compliance issues. Standards compliance: - <stdbool.h> must be #included before 'bool', 'false', 'true' can be used. - You cannot assume that sizeof (bool) == 1. - Programs should not undefine the macros bool, true, and false, as C99 lists that as an "obsolescent feature". Limitations of this substitute, when used in a C89 environment: - <stdbool.h> must be #included before the '_Bool' type can be used. - You cannot assume that _Bool is a typedef; it might be a macro. - Bit-fields of type 'bool' are not supported. Portable code should use 'unsigned int foo : 1;' rather than 'bool foo : 1;'. - In C99, casts and automatic conversions to '_Bool' or 'bool' are performed in such a way that every nonzero value gets converted to 'true', and zero gets converted to 'false'. This doesn't work with this substitute. With this substitute, only the values 0 and 1 give the expected result when converted to _Bool' or 'bool'. - C99 allows the use of (_Bool)0.0 in constant expressions, but this substitute cannot always provide this property. Also, it is suggested that programs use 'bool' rather than '_Bool'; this isn't required, but 'bool' is more common. */ /* 7.16. Boolean type and values */ /* BeOS <sys/socket.h> already #defines false 0, true 1. We use the same definitions below, but temporarily we have to #undef them. */ #if defined __BEOS__ && !defined __HAIKU__ # include <OS.h> /* defines bool but not _Bool */ # undef false # undef true #endif /* For the sake of symbolic names in gdb, we define true and false as enum constants, not only as macros. It is tempting to write typedef enum { false = 0, true = 1 } _Bool; so that gdb prints values of type 'bool' symbolically. But if we do this, values of type '_Bool' may promote to 'int' or 'unsigned int' (see ISO C 99 6.7.2.2.(4)); however, '_Bool' must promote to 'int' (see ISO C 99 6.3.1.1.(2)). So we add a negative value to the enum; this ensures that '_Bool' promotes to 'int'. */ #if defined __cplusplus || (defined __BEOS__ && !defined __HAIKU__) /* A compiler known to have 'bool'. */ /* If the compiler already has both 'bool' and '_Bool', we can assume they are the same types. */ # if !@HAVE__BOOL@ typedef bool _Bool; # endif #else # if !defined __GNUC__ /* If @HAVE__BOOL@: Some HP-UX cc and AIX IBM C compiler versions have compiler bugs when the built-in _Bool type is used. See http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html Similar bugs are likely with other compilers as well; this file wouldn't be used if <stdbool.h> was working. So we override the _Bool type. If !@HAVE__BOOL@: Need to define _Bool ourselves. As 'signed char' or as an enum type? Use of a typedef, with SunPRO C, leads to a stupid "warning: _Bool is a keyword in ISO C99". Use of an enum type, with IRIX cc, leads to a stupid "warning(1185): enumerated type mixed with another type". Even the existence of an enum type, without a typedef, "Invalid enumerator. (badenum)" with HP-UX cc on Tru64. The only benefit of the enum, debuggability, is not important with these compilers. So use 'signed char' and no enum. */ # define _Bool signed char # else /* With this compiler, trust the _Bool type if the compiler has it. */ # if !@HAVE__BOOL@ typedef enum { _Bool_must_promote_to_int = -1, false = 0, true = 1 } _Bool; # endif # endif #endif #define bool _Bool /* The other macros must be usable in preprocessor directives. */ #define false 0 #define true 1 #define __bool_true_false_are_defined 1 #endif /* _GL_STDBOOL_H */ ��������������������������������������������������������������������������������source-highlight-3.1.6/gl/dirent.in.h���������������������������������������������������������������0000664�0001750�0001750�00000020170�11672675562�014377� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* A GNU-like <dirent.h>. Copyright (C) 2006-2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef _@GUARD_PREFIX@_DIRENT_H #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ /* The include_next requires a split double-inclusion guard. */ #if @HAVE_DIRENT_H@ # @INCLUDE_NEXT@ @NEXT_DIRENT_H@ #endif #ifndef _@GUARD_PREFIX@_DIRENT_H #define _@GUARD_PREFIX@_DIRENT_H /* Get ino_t. Needed on some systems, including glibc 2.8. */ #include <sys/types.h> #if !@HAVE_DIRENT_H@ /* Define types DIR and 'struct dirent'. */ # if !GNULIB_defined_struct_dirent struct dirent { char d_type; char d_name[1]; }; /* Possible values for 'd_type'. */ # define DT_UNKNOWN 0 # define DT_FIFO 1 /* FIFO */ # define DT_CHR 2 /* character device */ # define DT_DIR 4 /* directory */ # define DT_BLK 6 /* block device */ # define DT_REG 8 /* regular file */ # define DT_LNK 10 /* symbolic link */ # define DT_SOCK 12 /* socket */ # define DT_WHT 14 /* whiteout */ typedef struct gl_directory DIR; # define GNULIB_defined_struct_dirent 1 # endif #endif /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ /* Declare overridden functions. */ #if @GNULIB_OPENDIR@ # if @REPLACE_OPENDIR@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef opendir # define opendir rpl_opendir # endif _GL_FUNCDECL_RPL (opendir, DIR *, (const char *dir_name) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (opendir, DIR *, (const char *dir_name)); # else # if !@HAVE_OPENDIR@ _GL_FUNCDECL_SYS (opendir, DIR *, (const char *dir_name) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (opendir, DIR *, (const char *dir_name)); # endif _GL_CXXALIASWARN (opendir); #elif defined GNULIB_POSIXCHECK # undef opendir # if HAVE_RAW_DECL_OPENDIR _GL_WARN_ON_USE (opendir, "opendir is not portable - " "use gnulib module opendir for portability"); # endif #endif #if @GNULIB_READDIR@ # if !@HAVE_READDIR@ _GL_FUNCDECL_SYS (readdir, struct dirent *, (DIR *dirp) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (readdir, struct dirent *, (DIR *dirp)); _GL_CXXALIASWARN (readdir); #elif defined GNULIB_POSIXCHECK # undef readdir # if HAVE_RAW_DECL_READDIR _GL_WARN_ON_USE (readdir, "readdir is not portable - " "use gnulib module readdir for portability"); # endif #endif #if @GNULIB_REWINDDIR@ # if !@HAVE_REWINDDIR@ _GL_FUNCDECL_SYS (rewinddir, void, (DIR *dirp) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (rewinddir, void, (DIR *dirp)); _GL_CXXALIASWARN (rewinddir); #elif defined GNULIB_POSIXCHECK # undef rewinddir # if HAVE_RAW_DECL_REWINDDIR _GL_WARN_ON_USE (rewinddir, "rewinddir is not portable - " "use gnulib module rewinddir for portability"); # endif #endif #if @GNULIB_CLOSEDIR@ # if @REPLACE_CLOSEDIR@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef closedir # define closedir rpl_closedir # endif _GL_FUNCDECL_RPL (closedir, int, (DIR *dirp) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (closedir, int, (DIR *dirp)); # else # if !@HAVE_CLOSEDIR@ _GL_FUNCDECL_SYS (closedir, int, (DIR *dirp) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (closedir, int, (DIR *dirp)); # endif _GL_CXXALIASWARN (closedir); #elif defined GNULIB_POSIXCHECK # undef closedir # if HAVE_RAW_DECL_CLOSEDIR _GL_WARN_ON_USE (closedir, "closedir is not portable - " "use gnulib module closedir for portability"); # endif #endif #if @GNULIB_DIRFD@ /* Return the file descriptor associated with the given directory stream, or -1 if none exists. */ # if @REPLACE_DIRFD@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef dirfd # define dirfd rpl_dirfd # endif _GL_FUNCDECL_RPL (dirfd, int, (DIR *) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (dirfd, int, (DIR *)); # else # if defined __cplusplus && defined GNULIB_NAMESPACE && defined dirfd /* dirfd is defined as a macro and not as a function. Turn it into a function and get rid of the macro. */ static inline int (dirfd) (DIR *dp) { return dirfd (dp); } # undef dirfd # endif # if !(@HAVE_DECL_DIRFD@ || defined dirfd) _GL_FUNCDECL_SYS (dirfd, int, (DIR *) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (dirfd, int, (DIR *)); # endif _GL_CXXALIASWARN (dirfd); #elif defined GNULIB_POSIXCHECK # undef dirfd # if HAVE_RAW_DECL_DIRFD _GL_WARN_ON_USE (dirfd, "dirfd is unportable - " "use gnulib module dirfd for portability"); # endif #endif #if @GNULIB_FDOPENDIR@ /* Open a directory stream visiting the given directory file descriptor. Return NULL and set errno if fd is not visiting a directory. On success, this function consumes fd (it will be implicitly closed either by this function or by a subsequent closedir). */ # if @REPLACE_FDOPENDIR@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef fdopendir # define fdopendir rpl_fdopendir # endif _GL_FUNCDECL_RPL (fdopendir, DIR *, (int fd)); _GL_CXXALIAS_RPL (fdopendir, DIR *, (int fd)); # else # if !@HAVE_FDOPENDIR@ || !@HAVE_DECL_FDOPENDIR@ _GL_FUNCDECL_SYS (fdopendir, DIR *, (int fd)); # endif _GL_CXXALIAS_SYS (fdopendir, DIR *, (int fd)); # endif _GL_CXXALIASWARN (fdopendir); #elif defined GNULIB_POSIXCHECK # undef fdopendir # if HAVE_RAW_DECL_FDOPENDIR _GL_WARN_ON_USE (fdopendir, "fdopendir is unportable - " "use gnulib module fdopendir for portability"); # endif #endif #if @GNULIB_SCANDIR@ /* Scan the directory DIR, calling FILTER on each directory entry. Entries for which FILTER returns nonzero are individually malloc'd, sorted using qsort with CMP, and collected in a malloc'd array in *NAMELIST. Returns the number of entries selected, or -1 on error. */ # if !@HAVE_SCANDIR@ _GL_FUNCDECL_SYS (scandir, int, (const char *dir, struct dirent ***namelist, int (*filter) (const struct dirent *), int (*cmp) (const struct dirent **, const struct dirent **)) _GL_ARG_NONNULL ((1, 2, 4))); # endif /* Need to cast, because on glibc systems, the fourth parameter is int (*cmp) (const void *, const void *). */ _GL_CXXALIAS_SYS_CAST (scandir, int, (const char *dir, struct dirent ***namelist, int (*filter) (const struct dirent *), int (*cmp) (const struct dirent **, const struct dirent **))); _GL_CXXALIASWARN (scandir); #elif defined GNULIB_POSIXCHECK # undef scandir # if HAVE_RAW_DECL_SCANDIR _GL_WARN_ON_USE (scandir, "scandir is unportable - " "use gnulib module scandir for portability"); # endif #endif #if @GNULIB_ALPHASORT@ /* Compare two 'struct dirent' entries alphabetically. */ # if !@HAVE_ALPHASORT@ _GL_FUNCDECL_SYS (alphasort, int, (const struct dirent **, const struct dirent **) _GL_ARG_NONNULL ((1, 2))); # endif /* Need to cast, because on glibc systems, the parameters are (const void *, const void *). */ _GL_CXXALIAS_SYS_CAST (alphasort, int, (const struct dirent **, const struct dirent **)); _GL_CXXALIASWARN (alphasort); #elif defined GNULIB_POSIXCHECK # undef alphasort # if HAVE_RAW_DECL_ALPHASORT _GL_WARN_ON_USE (alphasort, "alphasort is unportable - " "use gnulib module alphasort for portability"); # endif #endif #endif /* _@GUARD_PREFIX@_DIRENT_H */ #endif /* _@GUARD_PREFIX@_DIRENT_H */ ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/gl/Makefile.in���������������������������������������������������������������0000664�0001750�0001750�00000205224�11675044676�014405� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Copyright (C) 2002-2011 Free Software Foundation, Inc. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This file is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this file. If not, see <http://www.gnu.org/licenses/>. # # As a special exception to the GNU General Public License, # this file may be distributed as part of a program that # contains a configuration script generated by Autoconf, under # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. # Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --no-conditional-dependencies --libtool --macro-prefix=gl dirent getopt memset mkdir progname strdup VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = gl DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/gl/m4/00gnulib.m4 \ $(top_srcdir)/gl/m4/ac_prog_doxygen.m4 \ $(top_srcdir)/gl/m4/dirent_h.m4 $(top_srcdir)/gl/m4/dirname.m4 \ $(top_srcdir)/gl/m4/double-slash-root.m4 \ $(top_srcdir)/gl/m4/extensions.m4 \ $(top_srcdir)/gl/m4/getopt.m4 \ $(top_srcdir)/gl/m4/gnulib-common.m4 \ $(top_srcdir)/gl/m4/gnulib-comp.m4 \ $(top_srcdir)/gl/m4/include_next.m4 \ $(top_srcdir)/gl/m4/malloc.m4 $(top_srcdir)/gl/m4/memset.m4 \ $(top_srcdir)/gl/m4/mkdir.m4 $(top_srcdir)/gl/m4/nocrash.m4 \ $(top_srcdir)/gl/m4/ssize_t.m4 $(top_srcdir)/gl/m4/stdbool.m4 \ $(top_srcdir)/gl/m4/stddef_h.m4 \ $(top_srcdir)/gl/m4/stdlib_h.m4 $(top_srcdir)/gl/m4/strdup.m4 \ $(top_srcdir)/gl/m4/string_h.m4 \ $(top_srcdir)/gl/m4/sys_stat_h.m4 \ $(top_srcdir)/gl/m4/time_h.m4 $(top_srcdir)/gl/m4/unistd_h.m4 \ $(top_srcdir)/gl/m4/warn-on-use.m4 \ $(top_srcdir)/gl/m4/wchar_t.m4 \ $(top_srcdir)/m4/ax_boost_base.m4 \ $(top_srcdir)/m4/ax_boost_regex.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) LTLIBRARIES = $(noinst_LTLIBRARIES) am__DEPENDENCIES_1 = am_libgnu_la_OBJECTS = dirname-lgpl.lo basename-lgpl.lo stripslash.lo \ progname.lo libgnu_la_OBJECTS = $(am_libgnu_la_OBJECTS) libgnu_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libgnu_la_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libgnu_la_SOURCES) $(EXTRA_libgnu_la_SOURCES) DIST_SOURCES = $(libgnu_la_SOURCES) $(EXTRA_libgnu_la_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive HEADERS = $(noinst_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ABSOLUTEDATADIR = @ABSOLUTEDATADIR@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ ARFLAGS = @ARFLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASH_COMPLETION_DIR = @BASH_COMPLETION_DIR@ BASH_SHELL = @BASH_SHELL@ BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ BOOST_LDFLAGS = @BOOST_LDFLAGS@ BOOST_REGEX_LIB = @BOOST_REGEX_LIB@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHROOT_INPUT_DIR = @CHROOT_INPUT_DIR@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOUBLECPP = @DOUBLECPP@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GENGETOPT = @GENGETOPT@ GETOPT_H = @GETOPT_H@ GNULIB_ALPHASORT = @GNULIB_ALPHASORT@ GNULIB_ATOLL = @GNULIB_ATOLL@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ GNULIB_CHDIR = @GNULIB_CHDIR@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@ GNULIB_DIRFD = @GNULIB_DIRFD@ GNULIB_DUP = @GNULIB_DUP@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ GNULIB_FDATASYNC = @GNULIB_FDATASYNC@ GNULIB_FDOPENDIR = @GNULIB_FDOPENDIR@ GNULIB_FFSL = @GNULIB_FFSL@ GNULIB_FFSLL = @GNULIB_FFSLL@ GNULIB_FSTAT = @GNULIB_FSTAT@ GNULIB_FSTATAT = @GNULIB_FSTATAT@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@ GNULIB_GRANTPT = @GNULIB_GRANTPT@ GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@ GNULIB_LCHMOD = @GNULIB_LCHMOD@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MBTOWC = @GNULIB_MBTOWC@ GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_MKDIRAT = @GNULIB_MKDIRAT@ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ GNULIB_MKFIFO = @GNULIB_MKFIFO@ GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@ GNULIB_MKNOD = @GNULIB_MKNOD@ GNULIB_MKNODAT = @GNULIB_MKNODAT@ GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_MKTIME = @GNULIB_MKTIME@ GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@ GNULIB_OPENDIR = @GNULIB_OPENDIR@ GNULIB_PIPE = @GNULIB_PIPE@ GNULIB_PIPE2 = @GNULIB_PIPE2@ GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PTSNAME = @GNULIB_PTSNAME@ GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PWRITE = @GNULIB_PWRITE@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_READ = @GNULIB_READ@ GNULIB_READDIR = @GNULIB_READDIR@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ GNULIB_REWINDDIR = @GNULIB_REWINDDIR@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SCANDIR = @GNULIB_SCANDIR@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_STAT = @GNULIB_STAT@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRERROR_R = @GNULIB_STRERROR_R@ GNULIB_STRNCAT = @GNULIB_STRNCAT@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRPTIME = @GNULIB_STRPTIME@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOD = @GNULIB_STRTOD@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRTOLL = @GNULIB_STRTOLL@ GNULIB_STRTOULL = @GNULIB_STRTOULL@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@ GNULIB_TIMEGM = @GNULIB_TIMEGM@ GNULIB_TIME_R = @GNULIB_TIME_R@ GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@ GNULIB_UNSETENV = @GNULIB_UNSETENV@ GNULIB_USLEEP = @GNULIB_USLEEP@ GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@ GNULIB_WCTOMB = @GNULIB_WCTOMB@ GNULIB_WRITE = @GNULIB_WRITE@ GNULIB__EXIT = @GNULIB__EXIT@ GREP = @GREP@ HAVE_ALPHASORT = @HAVE_ALPHASORT@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ HAVE_CHOWN = @HAVE_CHOWN@ HAVE_CLOSEDIR = @HAVE_CLOSEDIR@ HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@ HAVE_DECL_FDOPENDIR = @HAVE_DECL_FDOPENDIR@ HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ HAVE_DIRENT_H = @HAVE_DIRENT_H@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHDIR = @HAVE_FCHDIR@ HAVE_FCHMODAT = @HAVE_FCHMODAT@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FDATASYNC = @HAVE_FDATASYNC@ HAVE_FDOPENDIR = @HAVE_FDOPENDIR@ HAVE_FFSL = @HAVE_FFSL@ HAVE_FFSLL = @HAVE_FFSLL@ HAVE_FSTATAT = @HAVE_FSTATAT@ HAVE_FSYNC = @HAVE_FSYNC@ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ HAVE_FUTIMENS = @HAVE_FUTIMENS@ HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ HAVE_GETGROUPS = @HAVE_GETGROUPS@ HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ HAVE_GETLOGIN = @HAVE_GETLOGIN@ HAVE_GETOPT_H = @HAVE_GETOPT_H@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GRANTPT = @HAVE_GRANTPT@ HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LCHOWN = @HAVE_LCHOWN@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ HAVE_LSTAT = @HAVE_LSTAT@ HAVE_MBSLEN = @HAVE_MBSLEN@ HAVE_MEMCHR = @HAVE_MEMCHR@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_MKDIRAT = @HAVE_MKDIRAT@ HAVE_MKDTEMP = @HAVE_MKDTEMP@ HAVE_MKFIFO = @HAVE_MKFIFO@ HAVE_MKFIFOAT = @HAVE_MKFIFOAT@ HAVE_MKNOD = @HAVE_MKNOD@ HAVE_MKNODAT = @HAVE_MKNODAT@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMP = @HAVE_MKSTEMP@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ HAVE_NANOSLEEP = @HAVE_NANOSLEEP@ HAVE_OPENDIR = @HAVE_OPENDIR@ HAVE_OS_H = @HAVE_OS_H@ HAVE_PIPE = @HAVE_PIPE@ HAVE_PIPE2 = @HAVE_PIPE2@ HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@ HAVE_PREAD = @HAVE_PREAD@ HAVE_PTSNAME = @HAVE_PTSNAME@ HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ HAVE_PWRITE = @HAVE_PWRITE@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_READDIR = @HAVE_READDIR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ HAVE_REALPATH = @HAVE_REALPATH@ HAVE_REWINDDIR = @HAVE_REWINDDIR@ HAVE_RPMATCH = @HAVE_RPMATCH@ HAVE_SCANDIR = @HAVE_SCANDIR@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@ HAVE_SLEEP = @HAVE_SLEEP@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRPTIME = @HAVE_STRPTIME@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ HAVE_TIMEGM = @HAVE_TIMEGM@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ HAVE_USLEEP = @HAVE_USLEEP@ HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE__BOOL = @HAVE__BOOL@ HAVE__EXIT = @HAVE__EXIT@ HELP2MAN = @HELP2MAN@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBRARY_NAMESPACE = @LIBRARY_NAMESPACE@ LIBRARY_VERSION = @LIBRARY_VERSION@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@ NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ NEXT_DIRENT_H = @NEXT_DIRENT_H@ NEXT_GETOPT_H = @NEXT_GETOPT_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PRAGMA_COLUMNS = @PRAGMA_COLUMNS@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ RANLIB = @RANLIB@ REPLACE_CALLOC = @REPLACE_CALLOC@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ REPLACE_CHOWN = @REPLACE_CHOWN@ REPLACE_CLOSE = @REPLACE_CLOSE@ REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@ REPLACE_DIRFD = @REPLACE_DIRFD@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@ REPLACE_FSTAT = @REPLACE_FSTAT@ REPLACE_FSTATAT = @REPLACE_FSTATAT@ REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_LSTAT = @REPLACE_LSTAT@ REPLACE_MALLOC = @REPLACE_MALLOC@ REPLACE_MBTOWC = @REPLACE_MBTOWC@ REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKDIR = @REPLACE_MKDIR@ REPLACE_MKFIFO = @REPLACE_MKFIFO@ REPLACE_MKNOD = @REPLACE_MKNOD@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OPENDIR = @REPLACE_OPENDIR@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_PWRITE = @REPLACE_PWRITE@ REPLACE_READ = @REPLACE_READ@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_REALLOC = @REPLACE_REALLOC@ REPLACE_REALPATH = @REPLACE_REALPATH@ REPLACE_RMDIR = @REPLACE_RMDIR@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_STAT = @REPLACE_STAT@ REPLACE_STPNCPY = @REPLACE_STPNCPY@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRERROR_R = @REPLACE_STRERROR_R@ REPLACE_STRNCAT = @REPLACE_STRNCAT@ REPLACE_STRNDUP = @REPLACE_STRNDUP@ REPLACE_STRNLEN = @REPLACE_STRNLEN@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ REPLACE_UNLINK = @REPLACE_UNLINK@ REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ REPLACE_UNSETENV = @REPLACE_UNSETENV@ REPLACE_USLEEP = @REPLACE_USLEEP@ REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@ REPLACE_WCTOMB = @REPLACE_WCTOMB@ REPLACE_WRITE = @REPLACE_WRITE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STRIP = @STRIP@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TAR = @TAR@ TEXI2HTML = @TEXI2HTML@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ VALGRIND = @VALGRIND@ VERSION = @VERSION@ YACC = @YACC@ YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bash_completiondir = @bash_completiondir@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ gltests_WITNESS = @gltests_WITNESS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ source_highlightdatadir = @source_highlightdatadir@ source_highlightdocdir = @source_highlightdocdir@ source_highlightlibdocdir = @source_highlightlibdocdir@ source_highlightlibexampledir = @source_highlightlibexampledir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = 1.5 gnits SUBDIRS = noinst_HEADERS = noinst_LIBRARIES = noinst_LTLIBRARIES = libgnu.la EXTRA_DIST = m4/gnulib-cache.m4 dirent.in.h dirname.h dosname.h \ getopt.c getopt.in.h getopt1.c getopt_int.h malloc.c memset.c \ mkdir.c $(top_srcdir)/build-aux/snippet/_Noreturn.h \ $(top_srcdir)/build-aux/snippet/arg-nonnull.h \ $(top_srcdir)/build-aux/snippet/c++defs.h \ $(top_srcdir)/build-aux/snippet/warn-on-use.h stdbool.in.h \ stddef.in.h stdlib.in.h strdup.c string.in.h sys_stat.in.h \ time.in.h unistd.in.h # The BUILT_SOURCES created by this Makefile snippet are not used via #include # statements but through direct file reference. Therefore this snippet must be # present in all Makefile.am that need it. This is ensured by the applicability # 'all' defined above. # The BUILT_SOURCES created by this Makefile snippet are not used via #include # statements but through direct file reference. Therefore this snippet must be # present in all Makefile.am that need it. This is ensured by the applicability # 'all' defined above. BUILT_SOURCES = dirent.h $(GETOPT_H) arg-nonnull.h c++defs.h \ warn-on-use.h $(STDBOOL_H) $(STDDEF_H) stdlib.h string.h \ sys/stat.h time.h unistd.h SUFFIXES = MOSTLYCLEANFILES = core *.stackdump dirent.h dirent.h-t getopt.h \ getopt.h-t arg-nonnull.h arg-nonnull.h-t c++defs.h c++defs.h-t \ warn-on-use.h warn-on-use.h-t stdbool.h stdbool.h-t stddef.h \ stddef.h-t stdlib.h stdlib.h-t string.h string.h-t sys/stat.h \ sys/stat.h-t time.h time.h-t unistd.h unistd.h-t MOSTLYCLEANDIRS = sys CLEANFILES = DISTCLEANFILES = MAINTAINERCLEANFILES = AM_CPPFLAGS = AM_CFLAGS = libgnu_la_SOURCES = dirname-lgpl.c basename-lgpl.c stripslash.c \ gettext.h progname.h progname.c libgnu_la_LIBADD = $(gl_LTLIBOBJS) libgnu_la_DEPENDENCIES = $(gl_LTLIBOBJS) EXTRA_libgnu_la_SOURCES = getopt.c getopt1.c malloc.c memset.c mkdir.c \ strdup.c libgnu_la_LDFLAGS = $(AM_LDFLAGS) -no-undefined $(LTLIBINTL) # Because this Makefile snippet defines a variable used by other # gnulib Makefile snippets, it must be present in all Makefile.am that # need it. This is ensured by the applicability 'all' defined above. _NORETURN_H = $(top_srcdir)/build-aux/snippet/_Noreturn.h ARG_NONNULL_H = arg-nonnull.h CXXDEFS_H = c++defs.h WARN_ON_USE_H = warn-on-use.h all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits gl/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnits gl/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libgnu.la: $(libgnu_la_OBJECTS) $(libgnu_la_DEPENDENCIES) $(libgnu_la_LINK) $(libgnu_la_OBJECTS) $(libgnu_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/basename-lgpl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dirname-lgpl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/malloc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memset.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mkdir.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/progname.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strdup.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stripslash.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-recursive all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(HEADERS) installdirs: installdirs-recursive installdirs-am: install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-recursive clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \ clean-noinstLTLIBRARIES mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool mostlyclean-local pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \ ctags-recursive install install-am install-strip \ tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ clean-noinstLIBRARIES clean-noinstLTLIBRARIES ctags \ ctags-recursive distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool mostlyclean-local pdf \ pdf-am ps ps-am tags tags-recursive uninstall uninstall-am # We need the following in order to create <dirent.h> when the system # doesn't have one that works with the given compiler. dirent.h: dirent.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''HAVE_DIRENT_H''@|$(HAVE_DIRENT_H)|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_DIRENT_H''@|$(NEXT_DIRENT_H)|g' \ -e 's/@''GNULIB_OPENDIR''@/$(GNULIB_OPENDIR)/g' \ -e 's/@''GNULIB_READDIR''@/$(GNULIB_READDIR)/g' \ -e 's/@''GNULIB_REWINDDIR''@/$(GNULIB_REWINDDIR)/g' \ -e 's/@''GNULIB_CLOSEDIR''@/$(GNULIB_CLOSEDIR)/g' \ -e 's/@''GNULIB_DIRFD''@/$(GNULIB_DIRFD)/g' \ -e 's/@''GNULIB_FDOPENDIR''@/$(GNULIB_FDOPENDIR)/g' \ -e 's/@''GNULIB_SCANDIR''@/$(GNULIB_SCANDIR)/g' \ -e 's/@''GNULIB_ALPHASORT''@/$(GNULIB_ALPHASORT)/g' \ -e 's/@''HAVE_OPENDIR''@/$(HAVE_OPENDIR)/g' \ -e 's/@''HAVE_READDIR''@/$(HAVE_READDIR)/g' \ -e 's/@''HAVE_REWINDDIR''@/$(HAVE_REWINDDIR)/g' \ -e 's/@''HAVE_CLOSEDIR''@/$(HAVE_CLOSEDIR)/g' \ -e 's|@''HAVE_DECL_DIRFD''@|$(HAVE_DECL_DIRFD)|g' \ -e 's|@''HAVE_DECL_FDOPENDIR''@|$(HAVE_DECL_FDOPENDIR)|g' \ -e 's|@''HAVE_FDOPENDIR''@|$(HAVE_FDOPENDIR)|g' \ -e 's|@''HAVE_SCANDIR''@|$(HAVE_SCANDIR)|g' \ -e 's|@''HAVE_ALPHASORT''@|$(HAVE_ALPHASORT)|g' \ -e 's|@''REPLACE_OPENDIR''@|$(REPLACE_OPENDIR)|g' \ -e 's|@''REPLACE_CLOSEDIR''@|$(REPLACE_CLOSEDIR)|g' \ -e 's|@''REPLACE_DIRFD''@|$(REPLACE_DIRFD)|g' \ -e 's|@''REPLACE_FDOPENDIR''@|$(REPLACE_FDOPENDIR)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/dirent.in.h; \ } > $@-t && \ mv $@-t $@ # We need the following in order to create <getopt.h> when the system # doesn't have one that works with the given compiler. getopt.h: getopt.in.h $(top_builddir)/config.status $(ARG_NONNULL_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''HAVE_GETOPT_H''@|$(HAVE_GETOPT_H)|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_GETOPT_H''@|$(NEXT_GETOPT_H)|g' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ < $(srcdir)/getopt.in.h; \ } > $@-t && \ mv -f $@-t $@ # The arg-nonnull.h that gets inserted into generated .h files is the same as # build-aux/snippet/arg-nonnull.h, except that it has the copyright header cut # off. arg-nonnull.h: $(top_srcdir)/build-aux/snippet/arg-nonnull.h $(AM_V_GEN)rm -f $@-t $@ && \ sed -n -e '/GL_ARG_NONNULL/,$$p' \ < $(top_srcdir)/build-aux/snippet/arg-nonnull.h \ > $@-t && \ mv $@-t $@ # The c++defs.h that gets inserted into generated .h files is the same as # build-aux/snippet/c++defs.h, except that it has the copyright header cut off. c++defs.h: $(top_srcdir)/build-aux/snippet/c++defs.h $(AM_V_GEN)rm -f $@-t $@ && \ sed -n -e '/_GL_CXXDEFS/,$$p' \ < $(top_srcdir)/build-aux/snippet/c++defs.h \ > $@-t && \ mv $@-t $@ # The warn-on-use.h that gets inserted into generated .h files is the same as # build-aux/snippet/warn-on-use.h, except that it has the copyright header cut # off. warn-on-use.h: $(top_srcdir)/build-aux/snippet/warn-on-use.h $(AM_V_GEN)rm -f $@-t $@ && \ sed -n -e '/^.ifndef/,$$p' \ < $(top_srcdir)/build-aux/snippet/warn-on-use.h \ > $@-t && \ mv $@-t $@ # We need the following in order to create <stdbool.h> when the system # doesn't have one that works. @GL_GENERATE_STDBOOL_H_TRUE@stdbool.h: stdbool.in.h $(top_builddir)/config.status @GL_GENERATE_STDBOOL_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \ @GL_GENERATE_STDBOOL_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ @GL_GENERATE_STDBOOL_H_TRUE@ sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' < $(srcdir)/stdbool.in.h; \ @GL_GENERATE_STDBOOL_H_TRUE@ } > $@-t && \ @GL_GENERATE_STDBOOL_H_TRUE@ mv $@-t $@ @GL_GENERATE_STDBOOL_H_FALSE@stdbool.h: $(top_builddir)/config.status @GL_GENERATE_STDBOOL_H_FALSE@ rm -f $@ # We need the following in order to create <stddef.h> when the system # doesn't have one that works with the given compiler. @GL_GENERATE_STDDEF_H_TRUE@stddef.h: stddef.in.h $(top_builddir)/config.status @GL_GENERATE_STDDEF_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \ @GL_GENERATE_STDDEF_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ @GL_GENERATE_STDDEF_H_TRUE@ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ @GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ @GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ @GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ @GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''NEXT_STDDEF_H''@|$(NEXT_STDDEF_H)|g' \ @GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''HAVE_WCHAR_T''@|$(HAVE_WCHAR_T)|g' \ @GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''REPLACE_NULL''@|$(REPLACE_NULL)|g' \ @GL_GENERATE_STDDEF_H_TRUE@ < $(srcdir)/stddef.in.h; \ @GL_GENERATE_STDDEF_H_TRUE@ } > $@-t && \ @GL_GENERATE_STDDEF_H_TRUE@ mv $@-t $@ @GL_GENERATE_STDDEF_H_FALSE@stddef.h: $(top_builddir)/config.status @GL_GENERATE_STDDEF_H_FALSE@ rm -f $@ # We need the following in order to create <stdlib.h> when the system # doesn't have one that works with the given compiler. stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \ $(_NORETURN_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_STDLIB_H''@|$(NEXT_STDLIB_H)|g' \ -e 's/@''GNULIB__EXIT''@/$(GNULIB__EXIT)/g' \ -e 's/@''GNULIB_ATOLL''@/$(GNULIB_ATOLL)/g' \ -e 's/@''GNULIB_CALLOC_POSIX''@/$(GNULIB_CALLOC_POSIX)/g' \ -e 's/@''GNULIB_CANONICALIZE_FILE_NAME''@/$(GNULIB_CANONICALIZE_FILE_NAME)/g' \ -e 's/@''GNULIB_GETLOADAVG''@/$(GNULIB_GETLOADAVG)/g' \ -e 's/@''GNULIB_GETSUBOPT''@/$(GNULIB_GETSUBOPT)/g' \ -e 's/@''GNULIB_GRANTPT''@/$(GNULIB_GRANTPT)/g' \ -e 's/@''GNULIB_MALLOC_POSIX''@/$(GNULIB_MALLOC_POSIX)/g' \ -e 's/@''GNULIB_MBTOWC''@/$(GNULIB_MBTOWC)/g' \ -e 's/@''GNULIB_MKDTEMP''@/$(GNULIB_MKDTEMP)/g' \ -e 's/@''GNULIB_MKOSTEMP''@/$(GNULIB_MKOSTEMP)/g' \ -e 's/@''GNULIB_MKOSTEMPS''@/$(GNULIB_MKOSTEMPS)/g' \ -e 's/@''GNULIB_MKSTEMP''@/$(GNULIB_MKSTEMP)/g' \ -e 's/@''GNULIB_MKSTEMPS''@/$(GNULIB_MKSTEMPS)/g' \ -e 's/@''GNULIB_POSIX_OPENPT''@/$(GNULIB_POSIX_OPENPT)/g' \ -e 's/@''GNULIB_PTSNAME''@/$(GNULIB_PTSNAME)/g' \ -e 's/@''GNULIB_PTSNAME_R''@/$(GNULIB_PTSNAME_R)/g' \ -e 's/@''GNULIB_PUTENV''@/$(GNULIB_PUTENV)/g' \ -e 's/@''GNULIB_RANDOM_R''@/$(GNULIB_RANDOM_R)/g' \ -e 's/@''GNULIB_REALLOC_POSIX''@/$(GNULIB_REALLOC_POSIX)/g' \ -e 's/@''GNULIB_REALPATH''@/$(GNULIB_REALPATH)/g' \ -e 's/@''GNULIB_RPMATCH''@/$(GNULIB_RPMATCH)/g' \ -e 's/@''GNULIB_SETENV''@/$(GNULIB_SETENV)/g' \ -e 's/@''GNULIB_STRTOD''@/$(GNULIB_STRTOD)/g' \ -e 's/@''GNULIB_STRTOLL''@/$(GNULIB_STRTOLL)/g' \ -e 's/@''GNULIB_STRTOULL''@/$(GNULIB_STRTOULL)/g' \ -e 's/@''GNULIB_SYSTEM_POSIX''@/$(GNULIB_SYSTEM_POSIX)/g' \ -e 's/@''GNULIB_UNLOCKPT''@/$(GNULIB_UNLOCKPT)/g' \ -e 's/@''GNULIB_UNSETENV''@/$(GNULIB_UNSETENV)/g' \ -e 's/@''GNULIB_WCTOMB''@/$(GNULIB_WCTOMB)/g' \ < $(srcdir)/stdlib.in.h | \ sed -e 's|@''HAVE__EXIT''@|$(HAVE__EXIT)|g' \ -e 's|@''HAVE_ATOLL''@|$(HAVE_ATOLL)|g' \ -e 's|@''HAVE_CANONICALIZE_FILE_NAME''@|$(HAVE_CANONICALIZE_FILE_NAME)|g' \ -e 's|@''HAVE_DECL_GETLOADAVG''@|$(HAVE_DECL_GETLOADAVG)|g' \ -e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \ -e 's|@''HAVE_GRANTPT''@|$(HAVE_GRANTPT)|g' \ -e 's|@''HAVE_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \ -e 's|@''HAVE_MKOSTEMP''@|$(HAVE_MKOSTEMP)|g' \ -e 's|@''HAVE_MKOSTEMPS''@|$(HAVE_MKOSTEMPS)|g' \ -e 's|@''HAVE_MKSTEMP''@|$(HAVE_MKSTEMP)|g' \ -e 's|@''HAVE_MKSTEMPS''@|$(HAVE_MKSTEMPS)|g' \ -e 's|@''HAVE_POSIX_OPENPT''@|$(HAVE_POSIX_OPENPT)|g' \ -e 's|@''HAVE_PTSNAME''@|$(HAVE_PTSNAME)|g' \ -e 's|@''HAVE_PTSNAME_R''@|$(HAVE_PTSNAME_R)|g' \ -e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \ -e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \ -e 's|@''HAVE_REALPATH''@|$(HAVE_REALPATH)|g' \ -e 's|@''HAVE_RPMATCH''@|$(HAVE_RPMATCH)|g' \ -e 's|@''HAVE_DECL_SETENV''@|$(HAVE_DECL_SETENV)|g' \ -e 's|@''HAVE_STRTOD''@|$(HAVE_STRTOD)|g' \ -e 's|@''HAVE_STRTOLL''@|$(HAVE_STRTOLL)|g' \ -e 's|@''HAVE_STRTOULL''@|$(HAVE_STRTOULL)|g' \ -e 's|@''HAVE_STRUCT_RANDOM_DATA''@|$(HAVE_STRUCT_RANDOM_DATA)|g' \ -e 's|@''HAVE_SYS_LOADAVG_H''@|$(HAVE_SYS_LOADAVG_H)|g' \ -e 's|@''HAVE_UNLOCKPT''@|$(HAVE_UNLOCKPT)|g' \ -e 's|@''HAVE_DECL_UNSETENV''@|$(HAVE_DECL_UNSETENV)|g' \ -e 's|@''REPLACE_CALLOC''@|$(REPLACE_CALLOC)|g' \ -e 's|@''REPLACE_CANONICALIZE_FILE_NAME''@|$(REPLACE_CANONICALIZE_FILE_NAME)|g' \ -e 's|@''REPLACE_MALLOC''@|$(REPLACE_MALLOC)|g' \ -e 's|@''REPLACE_MBTOWC''@|$(REPLACE_MBTOWC)|g' \ -e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \ -e 's|@''REPLACE_PTSNAME_R''@|$(REPLACE_PTSNAME_R)|g' \ -e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \ -e 's|@''REPLACE_REALLOC''@|$(REPLACE_REALLOC)|g' \ -e 's|@''REPLACE_REALPATH''@|$(REPLACE_REALPATH)|g' \ -e 's|@''REPLACE_SETENV''@|$(REPLACE_SETENV)|g' \ -e 's|@''REPLACE_STRTOD''@|$(REPLACE_STRTOD)|g' \ -e 's|@''REPLACE_UNSETENV''@|$(REPLACE_UNSETENV)|g' \ -e 's|@''REPLACE_WCTOMB''@|$(REPLACE_WCTOMB)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _Noreturn/r $(_NORETURN_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ } > $@-t && \ mv $@-t $@ # We need the following in order to create <string.h> when the system # doesn't have one that works with the given compiler. string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_STRING_H''@|$(NEXT_STRING_H)|g' \ -e 's/@''GNULIB_FFSL''@/$(GNULIB_FFSL)/g' \ -e 's/@''GNULIB_FFSLL''@/$(GNULIB_FFSLL)/g' \ -e 's/@''GNULIB_MBSLEN''@/$(GNULIB_MBSLEN)/g' \ -e 's/@''GNULIB_MBSNLEN''@/$(GNULIB_MBSNLEN)/g' \ -e 's/@''GNULIB_MBSCHR''@/$(GNULIB_MBSCHR)/g' \ -e 's/@''GNULIB_MBSRCHR''@/$(GNULIB_MBSRCHR)/g' \ -e 's/@''GNULIB_MBSSTR''@/$(GNULIB_MBSSTR)/g' \ -e 's/@''GNULIB_MBSCASECMP''@/$(GNULIB_MBSCASECMP)/g' \ -e 's/@''GNULIB_MBSNCASECMP''@/$(GNULIB_MBSNCASECMP)/g' \ -e 's/@''GNULIB_MBSPCASECMP''@/$(GNULIB_MBSPCASECMP)/g' \ -e 's/@''GNULIB_MBSCASESTR''@/$(GNULIB_MBSCASESTR)/g' \ -e 's/@''GNULIB_MBSCSPN''@/$(GNULIB_MBSCSPN)/g' \ -e 's/@''GNULIB_MBSPBRK''@/$(GNULIB_MBSPBRK)/g' \ -e 's/@''GNULIB_MBSSPN''@/$(GNULIB_MBSSPN)/g' \ -e 's/@''GNULIB_MBSSEP''@/$(GNULIB_MBSSEP)/g' \ -e 's/@''GNULIB_MBSTOK_R''@/$(GNULIB_MBSTOK_R)/g' \ -e 's/@''GNULIB_MEMCHR''@/$(GNULIB_MEMCHR)/g' \ -e 's/@''GNULIB_MEMMEM''@/$(GNULIB_MEMMEM)/g' \ -e 's/@''GNULIB_MEMPCPY''@/$(GNULIB_MEMPCPY)/g' \ -e 's/@''GNULIB_MEMRCHR''@/$(GNULIB_MEMRCHR)/g' \ -e 's/@''GNULIB_RAWMEMCHR''@/$(GNULIB_RAWMEMCHR)/g' \ -e 's/@''GNULIB_STPCPY''@/$(GNULIB_STPCPY)/g' \ -e 's/@''GNULIB_STPNCPY''@/$(GNULIB_STPNCPY)/g' \ -e 's/@''GNULIB_STRCHRNUL''@/$(GNULIB_STRCHRNUL)/g' \ -e 's/@''GNULIB_STRDUP''@/$(GNULIB_STRDUP)/g' \ -e 's/@''GNULIB_STRNCAT''@/$(GNULIB_STRNCAT)/g' \ -e 's/@''GNULIB_STRNDUP''@/$(GNULIB_STRNDUP)/g' \ -e 's/@''GNULIB_STRNLEN''@/$(GNULIB_STRNLEN)/g' \ -e 's/@''GNULIB_STRPBRK''@/$(GNULIB_STRPBRK)/g' \ -e 's/@''GNULIB_STRSEP''@/$(GNULIB_STRSEP)/g' \ -e 's/@''GNULIB_STRSTR''@/$(GNULIB_STRSTR)/g' \ -e 's/@''GNULIB_STRCASESTR''@/$(GNULIB_STRCASESTR)/g' \ -e 's/@''GNULIB_STRTOK_R''@/$(GNULIB_STRTOK_R)/g' \ -e 's/@''GNULIB_STRERROR''@/$(GNULIB_STRERROR)/g' \ -e 's/@''GNULIB_STRERROR_R''@/$(GNULIB_STRERROR_R)/g' \ -e 's/@''GNULIB_STRSIGNAL''@/$(GNULIB_STRSIGNAL)/g' \ -e 's/@''GNULIB_STRVERSCMP''@/$(GNULIB_STRVERSCMP)/g' \ < $(srcdir)/string.in.h | \ sed -e 's|@''HAVE_FFSL''@|$(HAVE_FFSL)|g' \ -e 's|@''HAVE_FFSLL''@|$(HAVE_FFSLL)|g' \ -e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|g' \ -e 's|@''HAVE_MEMCHR''@|$(HAVE_MEMCHR)|g' \ -e 's|@''HAVE_DECL_MEMMEM''@|$(HAVE_DECL_MEMMEM)|g' \ -e 's|@''HAVE_MEMPCPY''@|$(HAVE_MEMPCPY)|g' \ -e 's|@''HAVE_DECL_MEMRCHR''@|$(HAVE_DECL_MEMRCHR)|g' \ -e 's|@''HAVE_RAWMEMCHR''@|$(HAVE_RAWMEMCHR)|g' \ -e 's|@''HAVE_STPCPY''@|$(HAVE_STPCPY)|g' \ -e 's|@''HAVE_STPNCPY''@|$(HAVE_STPNCPY)|g' \ -e 's|@''HAVE_STRCHRNUL''@|$(HAVE_STRCHRNUL)|g' \ -e 's|@''HAVE_DECL_STRDUP''@|$(HAVE_DECL_STRDUP)|g' \ -e 's|@''HAVE_DECL_STRNDUP''@|$(HAVE_DECL_STRNDUP)|g' \ -e 's|@''HAVE_DECL_STRNLEN''@|$(HAVE_DECL_STRNLEN)|g' \ -e 's|@''HAVE_STRPBRK''@|$(HAVE_STRPBRK)|g' \ -e 's|@''HAVE_STRSEP''@|$(HAVE_STRSEP)|g' \ -e 's|@''HAVE_STRCASESTR''@|$(HAVE_STRCASESTR)|g' \ -e 's|@''HAVE_DECL_STRTOK_R''@|$(HAVE_DECL_STRTOK_R)|g' \ -e 's|@''HAVE_DECL_STRERROR_R''@|$(HAVE_DECL_STRERROR_R)|g' \ -e 's|@''HAVE_DECL_STRSIGNAL''@|$(HAVE_DECL_STRSIGNAL)|g' \ -e 's|@''HAVE_STRVERSCMP''@|$(HAVE_STRVERSCMP)|g' \ -e 's|@''REPLACE_STPNCPY''@|$(REPLACE_STPNCPY)|g' \ -e 's|@''REPLACE_MEMCHR''@|$(REPLACE_MEMCHR)|g' \ -e 's|@''REPLACE_MEMMEM''@|$(REPLACE_MEMMEM)|g' \ -e 's|@''REPLACE_STRCASESTR''@|$(REPLACE_STRCASESTR)|g' \ -e 's|@''REPLACE_STRCHRNUL''@|$(REPLACE_STRCHRNUL)|g' \ -e 's|@''REPLACE_STRDUP''@|$(REPLACE_STRDUP)|g' \ -e 's|@''REPLACE_STRSTR''@|$(REPLACE_STRSTR)|g' \ -e 's|@''REPLACE_STRERROR''@|$(REPLACE_STRERROR)|g' \ -e 's|@''REPLACE_STRERROR_R''@|$(REPLACE_STRERROR_R)|g' \ -e 's|@''REPLACE_STRNCAT''@|$(REPLACE_STRNCAT)|g' \ -e 's|@''REPLACE_STRNDUP''@|$(REPLACE_STRNDUP)|g' \ -e 's|@''REPLACE_STRNLEN''@|$(REPLACE_STRNLEN)|g' \ -e 's|@''REPLACE_STRSIGNAL''@|$(REPLACE_STRSIGNAL)|g' \ -e 's|@''REPLACE_STRTOK_R''@|$(REPLACE_STRTOK_R)|g' \ -e 's|@''UNDEFINE_STRTOK_R''@|$(UNDEFINE_STRTOK_R)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ < $(srcdir)/string.in.h; \ } > $@-t && \ mv $@-t $@ # We need the following in order to create <sys/stat.h> when the system # has one that is incomplete. sys/stat.h: sys_stat.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_at)$(MKDIR_P) sys $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_SYS_STAT_H''@|$(NEXT_SYS_STAT_H)|g' \ -e 's/@''GNULIB_FCHMODAT''@/$(GNULIB_FCHMODAT)/g' \ -e 's/@''GNULIB_FSTAT''@/$(GNULIB_FSTAT)/g' \ -e 's/@''GNULIB_FSTATAT''@/$(GNULIB_FSTATAT)/g' \ -e 's/@''GNULIB_FUTIMENS''@/$(GNULIB_FUTIMENS)/g' \ -e 's/@''GNULIB_LCHMOD''@/$(GNULIB_LCHMOD)/g' \ -e 's/@''GNULIB_LSTAT''@/$(GNULIB_LSTAT)/g' \ -e 's/@''GNULIB_MKDIRAT''@/$(GNULIB_MKDIRAT)/g' \ -e 's/@''GNULIB_MKFIFO''@/$(GNULIB_MKFIFO)/g' \ -e 's/@''GNULIB_MKFIFOAT''@/$(GNULIB_MKFIFOAT)/g' \ -e 's/@''GNULIB_MKNOD''@/$(GNULIB_MKNOD)/g' \ -e 's/@''GNULIB_MKNODAT''@/$(GNULIB_MKNODAT)/g' \ -e 's/@''GNULIB_STAT''@/$(GNULIB_STAT)/g' \ -e 's/@''GNULIB_UTIMENSAT''@/$(GNULIB_UTIMENSAT)/g' \ -e 's|@''HAVE_FCHMODAT''@|$(HAVE_FCHMODAT)|g' \ -e 's|@''HAVE_FSTATAT''@|$(HAVE_FSTATAT)|g' \ -e 's|@''HAVE_FUTIMENS''@|$(HAVE_FUTIMENS)|g' \ -e 's|@''HAVE_LCHMOD''@|$(HAVE_LCHMOD)|g' \ -e 's|@''HAVE_LSTAT''@|$(HAVE_LSTAT)|g' \ -e 's|@''HAVE_MKDIRAT''@|$(HAVE_MKDIRAT)|g' \ -e 's|@''HAVE_MKFIFO''@|$(HAVE_MKFIFO)|g' \ -e 's|@''HAVE_MKFIFOAT''@|$(HAVE_MKFIFOAT)|g' \ -e 's|@''HAVE_MKNOD''@|$(HAVE_MKNOD)|g' \ -e 's|@''HAVE_MKNODAT''@|$(HAVE_MKNODAT)|g' \ -e 's|@''HAVE_UTIMENSAT''@|$(HAVE_UTIMENSAT)|g' \ -e 's|@''REPLACE_FSTAT''@|$(REPLACE_FSTAT)|g' \ -e 's|@''REPLACE_FSTATAT''@|$(REPLACE_FSTATAT)|g' \ -e 's|@''REPLACE_FUTIMENS''@|$(REPLACE_FUTIMENS)|g' \ -e 's|@''REPLACE_LSTAT''@|$(REPLACE_LSTAT)|g' \ -e 's|@''REPLACE_MKDIR''@|$(REPLACE_MKDIR)|g' \ -e 's|@''REPLACE_MKFIFO''@|$(REPLACE_MKFIFO)|g' \ -e 's|@''REPLACE_MKNOD''@|$(REPLACE_MKNOD)|g' \ -e 's|@''REPLACE_STAT''@|$(REPLACE_STAT)|g' \ -e 's|@''REPLACE_UTIMENSAT''@|$(REPLACE_UTIMENSAT)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/sys_stat.in.h; \ } > $@-t && \ mv $@-t $@ # We need the following in order to create <time.h> when the system # doesn't have one that works with the given compiler. time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_TIME_H''@|$(NEXT_TIME_H)|g' \ -e 's/@''GNULIB_MKTIME''@/$(GNULIB_MKTIME)/g' \ -e 's/@''GNULIB_NANOSLEEP''@/$(GNULIB_NANOSLEEP)/g' \ -e 's/@''GNULIB_STRPTIME''@/$(GNULIB_STRPTIME)/g' \ -e 's/@''GNULIB_TIMEGM''@/$(GNULIB_TIMEGM)/g' \ -e 's/@''GNULIB_TIME_R''@/$(GNULIB_TIME_R)/g' \ -e 's|@''HAVE_DECL_LOCALTIME_R''@|$(HAVE_DECL_LOCALTIME_R)|g' \ -e 's|@''HAVE_NANOSLEEP''@|$(HAVE_NANOSLEEP)|g' \ -e 's|@''HAVE_STRPTIME''@|$(HAVE_STRPTIME)|g' \ -e 's|@''HAVE_TIMEGM''@|$(HAVE_TIMEGM)|g' \ -e 's|@''REPLACE_LOCALTIME_R''@|$(REPLACE_LOCALTIME_R)|g' \ -e 's|@''REPLACE_MKTIME''@|$(REPLACE_MKTIME)|g' \ -e 's|@''REPLACE_NANOSLEEP''@|$(REPLACE_NANOSLEEP)|g' \ -e 's|@''REPLACE_TIMEGM''@|$(REPLACE_TIMEGM)|g' \ -e 's|@''PTHREAD_H_DEFINES_STRUCT_TIMESPEC''@|$(PTHREAD_H_DEFINES_STRUCT_TIMESPEC)|g' \ -e 's|@''SYS_TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(SYS_TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \ -e 's|@''TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/time.in.h; \ } > $@-t && \ mv $@-t $@ # We need the following in order to create an empty placeholder for # <unistd.h> when the system doesn't have one. unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_UNISTD_H''@|$(NEXT_UNISTD_H)|g' \ -e 's/@''GNULIB_CHDIR''@/$(GNULIB_CHDIR)/g' \ -e 's/@''GNULIB_CHOWN''@/$(GNULIB_CHOWN)/g' \ -e 's/@''GNULIB_CLOSE''@/$(GNULIB_CLOSE)/g' \ -e 's/@''GNULIB_DUP''@/$(GNULIB_DUP)/g' \ -e 's/@''GNULIB_DUP2''@/$(GNULIB_DUP2)/g' \ -e 's/@''GNULIB_DUP3''@/$(GNULIB_DUP3)/g' \ -e 's/@''GNULIB_ENVIRON''@/$(GNULIB_ENVIRON)/g' \ -e 's/@''GNULIB_EUIDACCESS''@/$(GNULIB_EUIDACCESS)/g' \ -e 's/@''GNULIB_FACCESSAT''@/$(GNULIB_FACCESSAT)/g' \ -e 's/@''GNULIB_FCHDIR''@/$(GNULIB_FCHDIR)/g' \ -e 's/@''GNULIB_FCHOWNAT''@/$(GNULIB_FCHOWNAT)/g' \ -e 's/@''GNULIB_FDATASYNC''@/$(GNULIB_FDATASYNC)/g' \ -e 's/@''GNULIB_FSYNC''@/$(GNULIB_FSYNC)/g' \ -e 's/@''GNULIB_FTRUNCATE''@/$(GNULIB_FTRUNCATE)/g' \ -e 's/@''GNULIB_GETCWD''@/$(GNULIB_GETCWD)/g' \ -e 's/@''GNULIB_GETDOMAINNAME''@/$(GNULIB_GETDOMAINNAME)/g' \ -e 's/@''GNULIB_GETDTABLESIZE''@/$(GNULIB_GETDTABLESIZE)/g' \ -e 's/@''GNULIB_GETGROUPS''@/$(GNULIB_GETGROUPS)/g' \ -e 's/@''GNULIB_GETHOSTNAME''@/$(GNULIB_GETHOSTNAME)/g' \ -e 's/@''GNULIB_GETLOGIN''@/$(GNULIB_GETLOGIN)/g' \ -e 's/@''GNULIB_GETLOGIN_R''@/$(GNULIB_GETLOGIN_R)/g' \ -e 's/@''GNULIB_GETPAGESIZE''@/$(GNULIB_GETPAGESIZE)/g' \ -e 's/@''GNULIB_GETUSERSHELL''@/$(GNULIB_GETUSERSHELL)/g' \ -e 's/@''GNULIB_GROUP_MEMBER''@/$(GNULIB_GROUP_MEMBER)/g' \ -e 's/@''GNULIB_LCHOWN''@/$(GNULIB_LCHOWN)/g' \ -e 's/@''GNULIB_LINK''@/$(GNULIB_LINK)/g' \ -e 's/@''GNULIB_LINKAT''@/$(GNULIB_LINKAT)/g' \ -e 's/@''GNULIB_LSEEK''@/$(GNULIB_LSEEK)/g' \ -e 's/@''GNULIB_PIPE''@/$(GNULIB_PIPE)/g' \ -e 's/@''GNULIB_PIPE2''@/$(GNULIB_PIPE2)/g' \ -e 's/@''GNULIB_PREAD''@/$(GNULIB_PREAD)/g' \ -e 's/@''GNULIB_PWRITE''@/$(GNULIB_PWRITE)/g' \ -e 's/@''GNULIB_READ''@/$(GNULIB_READ)/g' \ -e 's/@''GNULIB_READLINK''@/$(GNULIB_READLINK)/g' \ -e 's/@''GNULIB_READLINKAT''@/$(GNULIB_READLINKAT)/g' \ -e 's/@''GNULIB_RMDIR''@/$(GNULIB_RMDIR)/g' \ -e 's/@''GNULIB_SETHOSTNAME''@/$(GNULIB_SETHOSTNAME)/g' \ -e 's/@''GNULIB_SLEEP''@/$(GNULIB_SLEEP)/g' \ -e 's/@''GNULIB_SYMLINK''@/$(GNULIB_SYMLINK)/g' \ -e 's/@''GNULIB_SYMLINKAT''@/$(GNULIB_SYMLINKAT)/g' \ -e 's/@''GNULIB_TTYNAME_R''@/$(GNULIB_TTYNAME_R)/g' \ -e 's/@''GNULIB_UNISTD_H_GETOPT''@/0$(GNULIB_GL_UNISTD_H_GETOPT)/g' \ -e 's/@''GNULIB_UNISTD_H_NONBLOCKING''@/$(GNULIB_UNISTD_H_NONBLOCKING)/g' \ -e 's/@''GNULIB_UNISTD_H_SIGPIPE''@/$(GNULIB_UNISTD_H_SIGPIPE)/g' \ -e 's/@''GNULIB_UNLINK''@/$(GNULIB_UNLINK)/g' \ -e 's/@''GNULIB_UNLINKAT''@/$(GNULIB_UNLINKAT)/g' \ -e 's/@''GNULIB_USLEEP''@/$(GNULIB_USLEEP)/g' \ -e 's/@''GNULIB_WRITE''@/$(GNULIB_WRITE)/g' \ < $(srcdir)/unistd.in.h | \ sed -e 's|@''HAVE_CHOWN''@|$(HAVE_CHOWN)|g' \ -e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \ -e 's|@''HAVE_DUP3''@|$(HAVE_DUP3)|g' \ -e 's|@''HAVE_EUIDACCESS''@|$(HAVE_EUIDACCESS)|g' \ -e 's|@''HAVE_FACCESSAT''@|$(HAVE_FACCESSAT)|g' \ -e 's|@''HAVE_FCHDIR''@|$(HAVE_FCHDIR)|g' \ -e 's|@''HAVE_FCHOWNAT''@|$(HAVE_FCHOWNAT)|g' \ -e 's|@''HAVE_FDATASYNC''@|$(HAVE_FDATASYNC)|g' \ -e 's|@''HAVE_FSYNC''@|$(HAVE_FSYNC)|g' \ -e 's|@''HAVE_FTRUNCATE''@|$(HAVE_FTRUNCATE)|g' \ -e 's|@''HAVE_GETDTABLESIZE''@|$(HAVE_GETDTABLESIZE)|g' \ -e 's|@''HAVE_GETGROUPS''@|$(HAVE_GETGROUPS)|g' \ -e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \ -e 's|@''HAVE_GETLOGIN''@|$(HAVE_GETLOGIN)|g' \ -e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \ -e 's|@''HAVE_GROUP_MEMBER''@|$(HAVE_GROUP_MEMBER)|g' \ -e 's|@''HAVE_LCHOWN''@|$(HAVE_LCHOWN)|g' \ -e 's|@''HAVE_LINK''@|$(HAVE_LINK)|g' \ -e 's|@''HAVE_LINKAT''@|$(HAVE_LINKAT)|g' \ -e 's|@''HAVE_PIPE''@|$(HAVE_PIPE)|g' \ -e 's|@''HAVE_PIPE2''@|$(HAVE_PIPE2)|g' \ -e 's|@''HAVE_PREAD''@|$(HAVE_PREAD)|g' \ -e 's|@''HAVE_PWRITE''@|$(HAVE_PWRITE)|g' \ -e 's|@''HAVE_READLINK''@|$(HAVE_READLINK)|g' \ -e 's|@''HAVE_READLINKAT''@|$(HAVE_READLINKAT)|g' \ -e 's|@''HAVE_SETHOSTNAME''@|$(HAVE_SETHOSTNAME)|g' \ -e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \ -e 's|@''HAVE_SYMLINK''@|$(HAVE_SYMLINK)|g' \ -e 's|@''HAVE_SYMLINKAT''@|$(HAVE_SYMLINKAT)|g' \ -e 's|@''HAVE_UNLINKAT''@|$(HAVE_UNLINKAT)|g' \ -e 's|@''HAVE_USLEEP''@|$(HAVE_USLEEP)|g' \ -e 's|@''HAVE_DECL_ENVIRON''@|$(HAVE_DECL_ENVIRON)|g' \ -e 's|@''HAVE_DECL_FCHDIR''@|$(HAVE_DECL_FCHDIR)|g' \ -e 's|@''HAVE_DECL_FDATASYNC''@|$(HAVE_DECL_FDATASYNC)|g' \ -e 's|@''HAVE_DECL_GETDOMAINNAME''@|$(HAVE_DECL_GETDOMAINNAME)|g' \ -e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \ -e 's|@''HAVE_DECL_GETPAGESIZE''@|$(HAVE_DECL_GETPAGESIZE)|g' \ -e 's|@''HAVE_DECL_GETUSERSHELL''@|$(HAVE_DECL_GETUSERSHELL)|g' \ -e 's|@''HAVE_DECL_SETHOSTNAME''@|$(HAVE_DECL_SETHOSTNAME)|g' \ -e 's|@''HAVE_DECL_TTYNAME_R''@|$(HAVE_DECL_TTYNAME_R)|g' \ -e 's|@''HAVE_OS_H''@|$(HAVE_OS_H)|g' \ -e 's|@''HAVE_SYS_PARAM_H''@|$(HAVE_SYS_PARAM_H)|g' \ | \ sed -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \ -e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \ -e 's|@''REPLACE_DUP''@|$(REPLACE_DUP)|g' \ -e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \ -e 's|@''REPLACE_FCHOWNAT''@|$(REPLACE_FCHOWNAT)|g' \ -e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \ -e 's|@''REPLACE_GETDOMAINNAME''@|$(REPLACE_GETDOMAINNAME)|g' \ -e 's|@''REPLACE_GETLOGIN_R''@|$(REPLACE_GETLOGIN_R)|g' \ -e 's|@''REPLACE_GETGROUPS''@|$(REPLACE_GETGROUPS)|g' \ -e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \ -e 's|@''REPLACE_LCHOWN''@|$(REPLACE_LCHOWN)|g' \ -e 's|@''REPLACE_LINK''@|$(REPLACE_LINK)|g' \ -e 's|@''REPLACE_LINKAT''@|$(REPLACE_LINKAT)|g' \ -e 's|@''REPLACE_LSEEK''@|$(REPLACE_LSEEK)|g' \ -e 's|@''REPLACE_PREAD''@|$(REPLACE_PREAD)|g' \ -e 's|@''REPLACE_PWRITE''@|$(REPLACE_PWRITE)|g' \ -e 's|@''REPLACE_READ''@|$(REPLACE_READ)|g' \ -e 's|@''REPLACE_READLINK''@|$(REPLACE_READLINK)|g' \ -e 's|@''REPLACE_RMDIR''@|$(REPLACE_RMDIR)|g' \ -e 's|@''REPLACE_SLEEP''@|$(REPLACE_SLEEP)|g' \ -e 's|@''REPLACE_SYMLINK''@|$(REPLACE_SYMLINK)|g' \ -e 's|@''REPLACE_TTYNAME_R''@|$(REPLACE_TTYNAME_R)|g' \ -e 's|@''REPLACE_UNLINK''@|$(REPLACE_UNLINK)|g' \ -e 's|@''REPLACE_UNLINKAT''@|$(REPLACE_UNLINKAT)|g' \ -e 's|@''REPLACE_USLEEP''@|$(REPLACE_USLEEP)|g' \ -e 's|@''REPLACE_WRITE''@|$(REPLACE_WRITE)|g' \ -e 's|@''UNISTD_H_HAVE_WINSOCK2_H''@|$(UNISTD_H_HAVE_WINSOCK2_H)|g' \ -e 's|@''UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS''@|$(UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ } > $@-t && \ mv $@-t $@ mostlyclean-local: mostlyclean-generic @for dir in '' $(MOSTLYCLEANDIRS); do \ if test -n "$$dir" && test -d $$dir; then \ echo "rmdir $$dir"; rmdir $$dir; \ fi; \ done; \ : # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/gl/getopt.in.h���������������������������������������������������������������0000664�0001750�0001750�00000021520�11672675562�014414� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Declarations for getopt. Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2007, 2009-2011 Free Software Foundation, Inc. This file is part of the GNU C Library. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef _@GUARD_PREFIX@_GETOPT_H #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ /* The include_next requires a split double-inclusion guard. We must also inform the replacement unistd.h to not recursively use <getopt.h>; our definitions will be present soon enough. */ #if @HAVE_GETOPT_H@ # define _GL_SYSTEM_GETOPT # @INCLUDE_NEXT@ @NEXT_GETOPT_H@ # undef _GL_SYSTEM_GETOPT #endif #ifndef _@GUARD_PREFIX@_GETOPT_H #ifndef __need_getopt # define _@GUARD_PREFIX@_GETOPT_H 1 #endif /* Standalone applications should #define __GETOPT_PREFIX to an identifier that prefixes the external functions and variables defined in this header. When this happens, include the headers that might declare getopt so that they will not cause confusion if included after this file (if the system had <getopt.h>, we have already included it). Then systematically rename identifiers so that they do not collide with the system functions and variables. Renaming avoids problems with some compilers and linkers. */ #if defined __GETOPT_PREFIX && !defined __need_getopt # if !@HAVE_GETOPT_H@ # include <stdlib.h> # include <stdio.h> # include <unistd.h> # endif # undef __need_getopt # undef getopt # undef getopt_long # undef getopt_long_only # undef optarg # undef opterr # undef optind # undef optopt # undef option # define __GETOPT_CONCAT(x, y) x ## y # define __GETOPT_XCONCAT(x, y) __GETOPT_CONCAT (x, y) # define __GETOPT_ID(y) __GETOPT_XCONCAT (__GETOPT_PREFIX, y) # define getopt __GETOPT_ID (getopt) # define getopt_long __GETOPT_ID (getopt_long) # define getopt_long_only __GETOPT_ID (getopt_long_only) # define optarg __GETOPT_ID (optarg) # define opterr __GETOPT_ID (opterr) # define optind __GETOPT_ID (optind) # define optopt __GETOPT_ID (optopt) # define option __GETOPT_ID (option) # define _getopt_internal __GETOPT_ID (getopt_internal) #endif /* Standalone applications get correct prototypes for getopt_long and getopt_long_only; they declare "char **argv". libc uses prototypes with "char *const *argv" that are incorrect because getopt_long and getopt_long_only can permute argv; this is required for backward compatibility (e.g., for LSB 2.0.1). This used to be `#if defined __GETOPT_PREFIX && !defined __need_getopt', but it caused redefinition warnings if both unistd.h and getopt.h were included, since unistd.h includes getopt.h having previously defined __need_getopt. The only place where __getopt_argv_const is used is in definitions of getopt_long and getopt_long_only below, but these are visible only if __need_getopt is not defined, so it is quite safe to rewrite the conditional as follows: */ #if !defined __need_getopt # if defined __GETOPT_PREFIX # define __getopt_argv_const /* empty */ # else # define __getopt_argv_const const # endif #endif /* If __GNU_LIBRARY__ is not already defined, either we are being used standalone, or this is the first header included in the source file. If we are being used with glibc, we need to include <features.h>, but that does not exist if we are standalone. So: if __GNU_LIBRARY__ is not defined, include <ctype.h>, which will pull in <features.h> for us if it's from glibc. (Why ctype.h? It's guaranteed to exist and it doesn't flood the namespace with stuff the way some other headers do.) */ #if !defined __GNU_LIBRARY__ # include <ctype.h> #endif #ifndef __THROW # ifndef __GNUC_PREREQ # define __GNUC_PREREQ(maj, min) (0) # endif # if defined __cplusplus && __GNUC_PREREQ (2,8) # define __THROW throw () # else # define __THROW # endif #endif /* The definition of _GL_ARG_NONNULL is copied here. */ #ifdef __cplusplus extern "C" { #endif /* For communication from `getopt' to the caller. When `getopt' finds an option that takes an argument, the argument value is returned here. Also, when `ordering' is RETURN_IN_ORDER, each non-option ARGV-element is returned here. */ extern char *optarg; /* Index in ARGV of the next element to be scanned. This is used for communication to and from the caller and for communication between successive calls to `getopt'. On entry to `getopt', zero means this is the first call; initialize. When `getopt' returns -1, this is the index of the first of the non-option elements that the caller should itself scan. Otherwise, `optind' communicates from one call to the next how much of ARGV has been scanned so far. */ extern int optind; /* Callers store zero here to inhibit the error message `getopt' prints for unrecognized options. */ extern int opterr; /* Set to an option character which was unrecognized. */ extern int optopt; #ifndef __need_getopt /* Describe the long-named options requested by the application. The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector of `struct option' terminated by an element containing a name which is zero. The field `has_arg' is: no_argument (or 0) if the option does not take an argument, required_argument (or 1) if the option requires an argument, optional_argument (or 2) if the option takes an optional argument. If the field `flag' is not NULL, it points to a variable that is set to the value given in the field `val' when the option is found, but left unchanged if the option is not found. To have a long-named option do something other than set an `int' to a compiled-in constant, such as set a value from `optarg', set the option's `flag' field to zero and its `val' field to a nonzero value (the equivalent single-letter option character, if there is one). For long options that have a zero `flag' field, `getopt' returns the contents of the `val' field. */ # if !GNULIB_defined_struct_option struct option { const char *name; /* has_arg can't be an enum because some compilers complain about type mismatches in all the code that assumes it is an int. */ int has_arg; int *flag; int val; }; # define GNULIB_defined_struct_option 1 # endif /* Names for the values of the `has_arg' field of `struct option'. */ # define no_argument 0 # define required_argument 1 # define optional_argument 2 #endif /* need getopt */ /* Get definitions and prototypes for functions to process the arguments in ARGV (ARGC of them, minus the program name) for options given in OPTS. Return the option character from OPTS just read. Return -1 when there are no more options. For unrecognized options, or options missing arguments, `optopt' is set to the option letter, and '?' is returned. The OPTS string is a list of characters which are recognized option letters, optionally followed by colons, specifying that that letter takes an argument, to be placed in `optarg'. If a letter in OPTS is followed by two colons, its argument is optional. This behavior is specific to the GNU `getopt'. The argument `--' causes premature termination of argument scanning, explicitly telling `getopt' that there are no more options. If OPTS begins with `-', then non-option arguments are treated as arguments to the option '\1'. This behavior is specific to the GNU `getopt'. If OPTS begins with `+', or POSIXLY_CORRECT is set in the environment, then do not permute arguments. */ extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) __THROW _GL_ARG_NONNULL ((2, 3)); #ifndef __need_getopt extern int getopt_long (int ___argc, char *__getopt_argv_const *___argv, const char *__shortopts, const struct option *__longopts, int *__longind) __THROW _GL_ARG_NONNULL ((2, 3)); extern int getopt_long_only (int ___argc, char *__getopt_argv_const *___argv, const char *__shortopts, const struct option *__longopts, int *__longind) __THROW _GL_ARG_NONNULL ((2, 3)); #endif #ifdef __cplusplus } #endif /* Make sure we later can get all the definitions and declarations. */ #undef __need_getopt #endif /* _@GUARD_PREFIX@_GETOPT_H */ #endif /* _@GUARD_PREFIX@_GETOPT_H */ ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/gl/time.in.h�����������������������������������������������������������������0000664�0001750�0001750�00000021625�11672675562�014056� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* A more-standard <time.h>. Copyright (C) 2007-2011 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ /* Don't get in the way of glibc when it includes time.h merely to declare a few standard symbols, rather than to declare all the symbols. Also, Solaris 8 <time.h> eventually includes itself recursively; if that is happening, just include the system <time.h> without adding our own declarations. */ #if (defined __need_time_t || defined __need_clock_t \ || defined __need_timespec \ || defined _@GUARD_PREFIX@_TIME_H) # @INCLUDE_NEXT@ @NEXT_TIME_H@ #else # define _@GUARD_PREFIX@_TIME_H # @INCLUDE_NEXT@ @NEXT_TIME_H@ /* NetBSD 5.0 mis-defines NULL. */ # include <stddef.h> /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ /* Some systems don't define struct timespec (e.g., AIX 4.1, Ultrix 4.3). Or they define it with the wrong member names or define it in <sys/time.h> (e.g., FreeBSD circa 1997). Stock Mingw does not define it, but the pthreads-win32 library defines it in <pthread.h>. */ # if ! @TIME_H_DEFINES_STRUCT_TIMESPEC@ # if @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ # include <sys/time.h> # elif @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ # include <pthread.h> /* The pthreads-win32 <pthread.h> also defines a couple of broken macros. */ # undef asctime_r # undef ctime_r # undef gmtime_r # undef localtime_r # undef rand_r # undef strtok_r # else # ifdef __cplusplus extern "C" { # endif # if !GNULIB_defined_struct_timespec # undef timespec # define timespec rpl_timespec struct timespec { time_t tv_sec; long int tv_nsec; }; # define GNULIB_defined_struct_timespec 1 # endif # ifdef __cplusplus } # endif # endif # endif # if !GNULIB_defined_struct_time_t_must_be_integral /* Per http://austingroupbugs.net/view.php?id=327, POSIX requires time_t to be an integer type, even though C99 permits floating point. We don't know of any implementation that uses floating point, and it is much easier to write code that doesn't have to worry about that corner case, so we force the issue. */ struct __time_t_must_be_integral { unsigned int __floating_time_t_unsupported : (time_t) 1; }; # define GNULIB_defined_struct_time_t_must_be_integral 1 # endif /* Sleep for at least RQTP seconds unless interrupted, If interrupted, return -1 and store the remaining time into RMTP. See <http://www.opengroup.org/susv3xsh/nanosleep.html>. */ # if @GNULIB_NANOSLEEP@ # if @REPLACE_NANOSLEEP@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define nanosleep rpl_nanosleep # endif _GL_FUNCDECL_RPL (nanosleep, int, (struct timespec const *__rqtp, struct timespec *__rmtp) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (nanosleep, int, (struct timespec const *__rqtp, struct timespec *__rmtp)); # else # if ! @HAVE_NANOSLEEP@ _GL_FUNCDECL_SYS (nanosleep, int, (struct timespec const *__rqtp, struct timespec *__rmtp) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (nanosleep, int, (struct timespec const *__rqtp, struct timespec *__rmtp)); # endif _GL_CXXALIASWARN (nanosleep); # endif /* Return the 'time_t' representation of TP and normalize TP. */ # if @GNULIB_MKTIME@ # if @REPLACE_MKTIME@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define mktime rpl_mktime # endif _GL_FUNCDECL_RPL (mktime, time_t, (struct tm *__tp) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (mktime, time_t, (struct tm *__tp)); # else _GL_CXXALIAS_SYS (mktime, time_t, (struct tm *__tp)); # endif _GL_CXXALIASWARN (mktime); # endif /* Convert TIMER to RESULT, assuming local time and UTC respectively. See <http://www.opengroup.org/susv3xsh/localtime_r.html> and <http://www.opengroup.org/susv3xsh/gmtime_r.html>. */ # if @GNULIB_TIME_R@ # if @REPLACE_LOCALTIME_R@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef localtime_r # define localtime_r rpl_localtime_r # endif _GL_FUNCDECL_RPL (localtime_r, struct tm *, (time_t const *restrict __timer, struct tm *restrict __result) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (localtime_r, struct tm *, (time_t const *restrict __timer, struct tm *restrict __result)); # else # if ! @HAVE_DECL_LOCALTIME_R@ _GL_FUNCDECL_SYS (localtime_r, struct tm *, (time_t const *restrict __timer, struct tm *restrict __result) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (localtime_r, struct tm *, (time_t const *restrict __timer, struct tm *restrict __result)); # endif # if @HAVE_DECL_LOCALTIME_R@ _GL_CXXALIASWARN (localtime_r); # endif # if @REPLACE_LOCALTIME_R@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef gmtime_r # define gmtime_r rpl_gmtime_r # endif _GL_FUNCDECL_RPL (gmtime_r, struct tm *, (time_t const *restrict __timer, struct tm *restrict __result) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (gmtime_r, struct tm *, (time_t const *restrict __timer, struct tm *restrict __result)); # else # if ! @HAVE_DECL_LOCALTIME_R@ _GL_FUNCDECL_SYS (gmtime_r, struct tm *, (time_t const *restrict __timer, struct tm *restrict __result) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (gmtime_r, struct tm *, (time_t const *restrict __timer, struct tm *restrict __result)); # endif # if @HAVE_DECL_LOCALTIME_R@ _GL_CXXALIASWARN (gmtime_r); # endif # endif /* Parse BUF as a time stamp, assuming FORMAT specifies its layout, and store the resulting broken-down time into TM. See <http://www.opengroup.org/susv3xsh/strptime.html>. */ # if @GNULIB_STRPTIME@ # if ! @HAVE_STRPTIME@ _GL_FUNCDECL_SYS (strptime, char *, (char const *restrict __buf, char const *restrict __format, struct tm *restrict __tm) _GL_ARG_NONNULL ((1, 2, 3))); # endif _GL_CXXALIAS_SYS (strptime, char *, (char const *restrict __buf, char const *restrict __format, struct tm *restrict __tm)); _GL_CXXALIASWARN (strptime); # endif /* Convert TM to a time_t value, assuming UTC. */ # if @GNULIB_TIMEGM@ # if @REPLACE_TIMEGM@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef timegm # define timegm rpl_timegm # endif _GL_FUNCDECL_RPL (timegm, time_t, (struct tm *__tm) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (timegm, time_t, (struct tm *__tm)); # else # if ! @HAVE_TIMEGM@ _GL_FUNCDECL_SYS (timegm, time_t, (struct tm *__tm) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (timegm, time_t, (struct tm *__tm)); # endif _GL_CXXALIASWARN (timegm); # endif /* Encourage applications to avoid unsafe functions that can overrun buffers when given outlandish struct tm values. Portable applications should use strftime (or even sprintf) instead. */ # if defined GNULIB_POSIXCHECK # undef asctime _GL_WARN_ON_USE (asctime, "asctime can overrun buffers in some cases - " "better use strftime (or even sprintf) instead"); # endif # if defined GNULIB_POSIXCHECK # undef asctime_r _GL_WARN_ON_USE (asctime, "asctime_r can overrun buffers in some cases - " "better use strftime (or even sprintf) instead"); # endif # if defined GNULIB_POSIXCHECK # undef ctime _GL_WARN_ON_USE (asctime, "ctime can overrun buffers in some cases - " "better use strftime (or even sprintf) instead"); # endif # if defined GNULIB_POSIXCHECK # undef ctime_r _GL_WARN_ON_USE (asctime, "ctime_r can overrun buffers in some cases - " "better use strftime (or even sprintf) instead"); # endif #endif �����������������������������������������������������������������������������������������������������������source-highlight-3.1.6/gl/malloc.c������������������������������������������������������������������0000664�0001750�0001750�00000003043�11672675562�013747� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* malloc() function that is glibc compatible. Copyright (C) 1997-1998, 2006-2007, 2009-2011 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* written by Jim Meyering and Bruno Haible */ #define _GL_USE_STDLIB_ALLOC 1 #include <config.h> /* Only the AC_FUNC_MALLOC macro defines 'malloc' already in config.h. */ #ifdef malloc # define NEED_MALLOC_GNU 1 # undef malloc /* Whereas the gnulib module 'malloc-gnu' defines HAVE_MALLOC_GNU. */ #elif GNULIB_MALLOC_GNU && !HAVE_MALLOC_GNU # define NEED_MALLOC_GNU 1 #endif #include <stdlib.h> #include <errno.h> /* Allocate an N-byte block of memory from the heap. If N is zero, allocate a 1-byte block. */ void * rpl_malloc (size_t n) { void *result; #if NEED_MALLOC_GNU if (n == 0) n = 1; #endif result = malloc (n); #if !HAVE_MALLOC_POSIX if (result == NULL) errno = ENOMEM; #endif return result; } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/gl/mkdir.c�������������������������������������������������������������������0000664�0001750�0001750�00000005216�11672675562�013612� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* On some systems, mkdir ("foo/", 0700) fails because of the trailing slash. On those systems, this wrapper removes the trailing slash. Copyright (C) 2001, 2003, 2006, 2008-2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ /* written by Jim Meyering */ #include <config.h> /* Specification. */ #include <sys/stat.h> #include <errno.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include "dirname.h" /* Disable the definition of mkdir to rpl_mkdir (from the <sys/stat.h> substitute) in this file. Otherwise, we'd get an endless recursion. */ #undef mkdir /* mingw's _mkdir() function has 1 argument, but we pass 2 arguments. Additionally, it declares _mkdir (and depending on compile flags, an alias mkdir), only in the nonstandard includes <direct.h> and <io.h>, which are included in the <sys/stat.h> override. */ #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ # define mkdir(name,mode) _mkdir (name) # define maybe_unused _GL_UNUSED #else # define maybe_unused /* empty */ #endif /* This function is required at least for NetBSD 1.5.2. */ int rpl_mkdir (char const *dir, mode_t mode maybe_unused) { int ret_val; char *tmp_dir; size_t len = strlen (dir); if (len && dir[len - 1] == '/') { tmp_dir = strdup (dir); if (!tmp_dir) { /* Rather than rely on strdup-posix, we set errno ourselves. */ errno = ENOMEM; return -1; } strip_trailing_slashes (tmp_dir); } else { tmp_dir = (char *) dir; } #if FUNC_MKDIR_DOT_BUG /* Additionally, cygwin 1.5 mistakenly creates a directory "d/./". */ { char *last = last_component (tmp_dir); if (*last == '.' && (last[1] == '\0' || (last[1] == '.' && last[2] == '\0'))) { struct stat st; if (stat (tmp_dir, &st) == 0) errno = EEXIST; return -1; } } #endif /* FUNC_MKDIR_DOT_BUG */ ret_val = mkdir (tmp_dir, mode); if (tmp_dir != dir) free (tmp_dir); return ret_val; } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/gl/getopt_int.h��������������������������������������������������������������0000664�0001750�0001750�00000011742�11672675562�014666� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Internal declarations for getopt. Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2004, 2009-2011 Free Software Foundation, Inc. This file is part of the GNU C Library. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef _GETOPT_INT_H #define _GETOPT_INT_H 1 #include <getopt.h> extern int _getopt_internal (int ___argc, char **___argv, const char *__shortopts, const struct option *__longopts, int *__longind, int __long_only, int __posixly_correct); /* Reentrant versions which can handle parsing multiple argument vectors at the same time. */ /* Describe how to deal with options that follow non-option ARGV-elements. If the caller did not specify anything, the default is REQUIRE_ORDER if the environment variable POSIXLY_CORRECT is defined, PERMUTE otherwise. REQUIRE_ORDER means don't recognize them as options; stop option processing when the first non-option is seen. This is what Unix does. This mode of operation is selected by either setting the environment variable POSIXLY_CORRECT, or using `+' as the first character of the list of option characters, or by calling getopt. PERMUTE is the default. We permute the contents of ARGV as we scan, so that eventually all the non-options are at the end. This allows options to be given in any order, even with programs that were not written to expect this. RETURN_IN_ORDER is an option available to programs that were written to expect options and other ARGV-elements in any order and that care about the ordering of the two. We describe each non-option ARGV-element as if it were the argument of an option with character code 1. Using `-' as the first character of the list of option characters selects this mode of operation. The special argument `--' forces an end of option-scanning regardless of the value of `ordering'. In the case of RETURN_IN_ORDER, only `--' can cause `getopt' to return -1 with `optind' != ARGC. */ enum __ord { REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER }; /* Data type for reentrant functions. */ struct _getopt_data { /* These have exactly the same meaning as the corresponding global variables, except that they are used for the reentrant versions of getopt. */ int optind; int opterr; int optopt; char *optarg; /* Internal members. */ /* True if the internal members have been initialized. */ int __initialized; /* The next char to be scanned in the option-element in which the last option character we returned was found. This allows us to pick up the scan where we left off. If this is zero, or a null string, it means resume the scan by advancing to the next ARGV-element. */ char *__nextchar; /* See __ord above. */ enum __ord __ordering; /* If the POSIXLY_CORRECT environment variable is set or getopt was called. */ int __posixly_correct; /* Handle permutation of arguments. */ /* Describe the part of ARGV that contains non-options that have been skipped. `first_nonopt' is the index in ARGV of the first of them; `last_nonopt' is the index after the last of them. */ int __first_nonopt; int __last_nonopt; #if defined _LIBC && defined USE_NONOPTION_FLAGS int __nonoption_flags_max_len; int __nonoption_flags_len; #endif }; /* The initializer is necessary to set OPTIND and OPTERR to their default values and to clear the initialization flag. */ #define _GETOPT_DATA_INITIALIZER { 1, 1 } extern int _getopt_internal_r (int ___argc, char **___argv, const char *__shortopts, const struct option *__longopts, int *__longind, int __long_only, struct _getopt_data *__data, int __posixly_correct); extern int _getopt_long_r (int ___argc, char **___argv, const char *__shortopts, const struct option *__longopts, int *__longind, struct _getopt_data *__data); extern int _getopt_long_only_r (int ___argc, char **___argv, const char *__shortopts, const struct option *__longopts, int *__longind, struct _getopt_data *__data); #endif /* getopt_int.h */ ������������������������������source-highlight-3.1.6/gl/stddef.in.h���������������������������������������������������������������0000664�0001750�0001750�00000005343�11672675562�014370� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* A substitute for POSIX 2008 <stddef.h>, for platforms that have issues. Copyright (C) 2009-2011 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Written by Eric Blake. */ /* * POSIX 2008 <stddef.h> for platforms that have issues. * <http://www.opengroup.org/susv3xbd/stddef.h.html> */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ #if defined __need_wchar_t || defined __need_size_t \ || defined __need_ptrdiff_t || defined __need_NULL \ || defined __need_wint_t /* Special invocation convention inside gcc header files. In particular, gcc provides a version of <stddef.h> that blindly redefines NULL even when __need_wint_t was defined, even though wint_t is not normally provided by <stddef.h>. Hence, we must remember if special invocation has ever been used to obtain wint_t, in which case we need to clean up NULL yet again. */ # if !(defined _@GUARD_PREFIX@_STDDEF_H && defined _GL_STDDEF_WINT_T) # ifdef __need_wint_t # undef _@GUARD_PREFIX@_STDDEF_H # define _GL_STDDEF_WINT_T # endif # @INCLUDE_NEXT@ @NEXT_STDDEF_H@ # endif #else /* Normal invocation convention. */ # ifndef _@GUARD_PREFIX@_STDDEF_H /* The include_next requires a split double-inclusion guard. */ # @INCLUDE_NEXT@ @NEXT_STDDEF_H@ # ifndef _@GUARD_PREFIX@_STDDEF_H # define _@GUARD_PREFIX@_STDDEF_H /* On NetBSD 5.0, the definition of NULL lacks proper parentheses. */ #if @REPLACE_NULL@ # undef NULL # ifdef __cplusplus /* ISO C++ says that the macro NULL must expand to an integer constant expression, hence '((void *) 0)' is not allowed in C++. */ # if __GNUG__ >= 3 /* GNU C++ has a __null macro that behaves like an integer ('int' or 'long') but has the same size as a pointer. Use that, to avoid warnings. */ # define NULL __null # else # define NULL 0L # endif # else # define NULL ((void *) 0) # endif #endif /* Some platforms lack wchar_t. */ #if !@HAVE_WCHAR_T@ # define wchar_t int #endif # endif /* _@GUARD_PREFIX@_STDDEF_H */ # endif /* _@GUARD_PREFIX@_STDDEF_H */ #endif /* __need_XXX */ ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/gl/progname.c����������������������������������������������������������������0000664�0001750�0001750�00000006150�11672675562�014312� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Program name management. Copyright (C) 2001-2003, 2005-2011 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2001. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include <config.h> /* Specification. */ #undef ENABLE_RELOCATABLE /* avoid defining set_program_name as a macro */ #include "progname.h" #include <errno.h> /* get program_invocation_name declaration */ #include <stdio.h> #include <stdlib.h> #include <string.h> /* String containing name the program is called with. To be initialized by main(). */ const char *program_name = NULL; /* Set program_name, based on argv[0]. argv0 must be a string allocated with indefinite extent, and must not be modified after this call. */ void set_program_name (const char *argv0) { /* libtool creates a temporary executable whose name is sometimes prefixed with "lt-" (depends on the platform). It also makes argv[0] absolute. But the name of the temporary executable is a detail that should not be visible to the end user and to the test suite. Remove this "<dirname>/.libs/" or "<dirname>/.libs/lt-" prefix here. */ const char *slash; const char *base; /* Sanity check. POSIX requires the invoking process to pass a non-NULL argv[0]. */ if (argv0 == NULL) { /* It's a bug in the invoking program. Help diagnosing it. */ fputs ("A NULL argv[0] was passed through an exec system call.\n", stderr); abort (); } slash = strrchr (argv0, '/'); base = (slash != NULL ? slash + 1 : argv0); if (base - argv0 >= 7 && strncmp (base - 7, "/.libs/", 7) == 0) { argv0 = base; if (strncmp (base, "lt-", 3) == 0) { argv0 = base + 3; /* On glibc systems, remove the "lt-" prefix from the variable program_invocation_short_name. */ #if HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME program_invocation_short_name = (char *) argv0; #endif } } /* But don't strip off a leading <dirname>/ in general, because when the user runs /some/hidden/place/bin/cp foo foo he should get the error message /some/hidden/place/bin/cp: `foo' and `foo' are the same file not cp: `foo' and `foo' are the same file */ program_name = argv0; /* On glibc systems, the error() function comes from libc and uses the variable program_invocation_name, not program_name. So set this variable as well. */ #if HAVE_DECL_PROGRAM_INVOCATION_NAME program_invocation_name = (char *) argv0; #endif } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/gl/basename-lgpl.c�����������������������������������������������������������0000664�0001750�0001750�00000004061�11672675562�015210� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* basename.c -- return the last element in a file name Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include <config.h> #include "dirname.h" #include <string.h> /* Return the address of the last file name component of NAME. If NAME has no relative file name components because it is a file system root, return the empty string. */ char * last_component (char const *name) { char const *base = name + FILE_SYSTEM_PREFIX_LEN (name); char const *p; bool saw_slash = false; while (ISSLASH (*base)) base++; for (p = base; *p; p++) { if (ISSLASH (*p)) saw_slash = true; else if (saw_slash) { base = p; saw_slash = false; } } return (char *) base; } /* Return the length of the basename NAME. Typically NAME is the value returned by base_name or last_component. Act like strlen (NAME), except omit all trailing slashes. */ size_t base_len (char const *name) { size_t len; size_t prefix_len = FILE_SYSTEM_PREFIX_LEN (name); for (len = strlen (name); 1 < len && ISSLASH (name[len - 1]); len--) continue; if (DOUBLE_SLASH_IS_DISTINCT_ROOT && len == 1 && ISSLASH (name[0]) && ISSLASH (name[1]) && ! name[2]) return 2; if (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE && prefix_len && len == prefix_len && ISSLASH (name[prefix_len])) return prefix_len + 1; return len; } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/gl/progname.h����������������������������������������������������������������0000664�0001750�0001750�00000003737�11672675562�014327� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Program name management. Copyright (C) 2001-2004, 2006, 2009-2011 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2001. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef _PROGNAME_H #define _PROGNAME_H /* Programs using this file should do the following in main(): set_program_name (argv[0]); */ #ifdef __cplusplus extern "C" { #endif /* String containing name the program is called with. */ extern const char *program_name; /* Set program_name, based on argv[0]. argv0 must be a string allocated with indefinite extent, and must not be modified after this call. */ extern void set_program_name (const char *argv0); #if ENABLE_RELOCATABLE /* Set program_name, based on argv[0], and original installation prefix and directory, for relocatability. */ extern void set_program_name_and_installdir (const char *argv0, const char *orig_installprefix, const char *orig_installdir); #undef set_program_name #define set_program_name(ARG0) \ set_program_name_and_installdir (ARG0, INSTALLPREFIX, INSTALLDIR) /* Return the full pathname of the current executable, based on the earlier call to set_program_name_and_installdir. Return NULL if unknown. */ extern char *get_full_program_name (void); #endif #ifdef __cplusplus } #endif #endif /* _PROGNAME_H */ ���������������������������������source-highlight-3.1.6/gl/dirname-lgpl.c������������������������������������������������������������0000664�0001750�0001750�00000006120�11672675562�015052� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* dirname.c -- return all but the last element in a file name Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include <config.h> #include "dirname.h" #include <stdlib.h> #include <string.h> /* Return the length of the prefix of FILE that will be used by dir_name. If FILE is in the working directory, this returns zero even though `dir_name (FILE)' will return ".". Works properly even if there are trailing slashes (by effectively ignoring them). */ size_t dir_len (char const *file) { size_t prefix_length = FILE_SYSTEM_PREFIX_LEN (file); size_t length; /* Advance prefix_length beyond important leading slashes. */ prefix_length += (prefix_length != 0 ? (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE && ISSLASH (file[prefix_length])) : (ISSLASH (file[0]) ? ((DOUBLE_SLASH_IS_DISTINCT_ROOT && ISSLASH (file[1]) && ! ISSLASH (file[2]) ? 2 : 1)) : 0)); /* Strip the basename and any redundant slashes before it. */ for (length = last_component (file) - file; prefix_length < length; length--) if (! ISSLASH (file[length - 1])) break; return length; } /* In general, we can't use the builtin `dirname' function if available, since it has different meanings in different environments. In some environments the builtin `dirname' modifies its argument. Return the leading directories part of FILE, allocated with malloc. Works properly even if there are trailing slashes (by effectively ignoring them). Return NULL on failure. If lstat (FILE) would succeed, then { chdir (dir_name (FILE)); lstat (base_name (FILE)); } will access the same file. Likewise, if the sequence { chdir (dir_name (FILE)); rename (base_name (FILE), "foo"); } succeeds, you have renamed FILE to "foo" in the same directory FILE was in. */ char * mdir_name (char const *file) { size_t length = dir_len (file); bool append_dot = (length == 0 || (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE && length == FILE_SYSTEM_PREFIX_LEN (file) && file[2] != '\0' && ! ISSLASH (file[2]))); char *dir = malloc (length + append_dot + 1); if (!dir) return NULL; memcpy (dir, file, length); if (append_dot) dir[length++] = '.'; dir[length] = '\0'; return dir; } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/gl/dosname.h�����������������������������������������������������������������0000664�0001750�0001750�00000003733�11672675562�014141� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* File names on MS-DOS/Windows systems. Copyright (C) 2000-2001, 2004-2006, 2009-2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. From Paul Eggert and Jim Meyering. */ #ifndef _DOSNAME_H #define _DOSNAME_H #if (defined _WIN32 || defined __WIN32__ || \ defined __MSDOS__ || defined __CYGWIN__ || \ defined __EMX__ || defined __DJGPP__) /* This internal macro assumes ASCII, but all hosts that support drive letters use ASCII. */ # define _IS_DRIVE_LETTER(C) (((unsigned int) (C) | ('a' - 'A')) - 'a' \ <= 'z' - 'a') # define FILE_SYSTEM_PREFIX_LEN(Filename) \ (_IS_DRIVE_LETTER ((Filename)[0]) && (Filename)[1] == ':' ? 2 : 0) # ifndef __CYGWIN__ # define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 1 # endif # define ISSLASH(C) ((C) == '/' || (C) == '\\') #else # define FILE_SYSTEM_PREFIX_LEN(Filename) 0 # define ISSLASH(C) ((C) == '/') #endif #ifndef FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE # define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 0 #endif #if FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE # define IS_ABSOLUTE_FILE_NAME(F) ISSLASH ((F)[FILE_SYSTEM_PREFIX_LEN (F)]) # else # define IS_ABSOLUTE_FILE_NAME(F) \ (ISSLASH ((F)[0]) || FILE_SYSTEM_PREFIX_LEN (F) != 0) #endif #define IS_RELATIVE_FILE_NAME(F) (! IS_ABSOLUTE_FILE_NAME (F)) #endif /* DOSNAME_H_ */ �������������������������������������source-highlight-3.1.6/gl/string.in.h���������������������������������������������������������������0000664�0001750�0001750�00000115224�11672675562�014425� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* A GNU-like <string.h>. Copyright (C) 1995-1996, 2001-2011 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _@GUARD_PREFIX@_STRING_H #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT@ @NEXT_STRING_H@ #ifndef _@GUARD_PREFIX@_STRING_H #define _@GUARD_PREFIX@_STRING_H /* NetBSD 5.0 mis-defines NULL. */ #include <stddef.h> /* MirBSD defines mbslen as a macro. */ #if @GNULIB_MBSLEN@ && defined __MirBSD__ # include <wchar.h> #endif /* The __attribute__ feature is available in gcc versions 2.5 and later. The attribute __pure__ was added in gcc 2.96. */ #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) # define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) #else # define _GL_ATTRIBUTE_PURE /* empty */ #endif /* NetBSD 5.0 declares strsignal in <unistd.h>, not in <string.h>. */ /* But in any case avoid namespace pollution on glibc systems. */ #if (@GNULIB_STRSIGNAL@ || defined GNULIB_POSIXCHECK) && defined __NetBSD__ \ && ! defined __GLIBC__ # include <unistd.h> #endif /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* The definition of _GL_ARG_NONNULL is copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ /* Find the index of the least-significant set bit. */ #if @GNULIB_FFSL@ # if !@HAVE_FFSL@ _GL_FUNCDECL_SYS (ffsl, int, (long int i)); # endif _GL_CXXALIAS_SYS (ffsl, int, (long int i)); _GL_CXXALIASWARN (ffsl); #elif defined GNULIB_POSIXCHECK # undef ffsl # if HAVE_RAW_DECL_FFSL _GL_WARN_ON_USE (ffsl, "ffsl is not portable - use the ffsl module"); # endif #endif /* Find the index of the least-significant set bit. */ #if @GNULIB_FFSLL@ # if !@HAVE_FFSLL@ _GL_FUNCDECL_SYS (ffsll, int, (long long int i)); # endif _GL_CXXALIAS_SYS (ffsll, int, (long long int i)); _GL_CXXALIASWARN (ffsll); #elif defined GNULIB_POSIXCHECK # undef ffsll # if HAVE_RAW_DECL_FFSLL _GL_WARN_ON_USE (ffsll, "ffsll is not portable - use the ffsll module"); # endif #endif /* Return the first instance of C within N bytes of S, or NULL. */ #if @GNULIB_MEMCHR@ # if @REPLACE_MEMCHR@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define memchr rpl_memchr # endif _GL_FUNCDECL_RPL (memchr, void *, (void const *__s, int __c, size_t __n) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (memchr, void *, (void const *__s, int __c, size_t __n)); # else # if ! @HAVE_MEMCHR@ _GL_FUNCDECL_SYS (memchr, void *, (void const *__s, int __c, size_t __n) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1))); # endif /* On some systems, this function is defined as an overloaded function: extern "C" { const void * std::memchr (const void *, int, size_t); } extern "C++" { void * std::memchr (void *, int, size_t); } */ _GL_CXXALIAS_SYS_CAST2 (memchr, void *, (void const *__s, int __c, size_t __n), void const *, (void const *__s, int __c, size_t __n)); # endif # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) _GL_CXXALIASWARN1 (memchr, void *, (void *__s, int __c, size_t __n)); _GL_CXXALIASWARN1 (memchr, void const *, (void const *__s, int __c, size_t __n)); # else _GL_CXXALIASWARN (memchr); # endif #elif defined GNULIB_POSIXCHECK # undef memchr /* Assume memchr is always declared. */ _GL_WARN_ON_USE (memchr, "memchr has platform-specific bugs - " "use gnulib module memchr for portability" ); #endif /* Return the first occurrence of NEEDLE in HAYSTACK. */ #if @GNULIB_MEMMEM@ # if @REPLACE_MEMMEM@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define memmem rpl_memmem # endif _GL_FUNCDECL_RPL (memmem, void *, (void const *__haystack, size_t __haystack_len, void const *__needle, size_t __needle_len) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1, 3))); _GL_CXXALIAS_RPL (memmem, void *, (void const *__haystack, size_t __haystack_len, void const *__needle, size_t __needle_len)); # else # if ! @HAVE_DECL_MEMMEM@ _GL_FUNCDECL_SYS (memmem, void *, (void const *__haystack, size_t __haystack_len, void const *__needle, size_t __needle_len) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1, 3))); # endif _GL_CXXALIAS_SYS (memmem, void *, (void const *__haystack, size_t __haystack_len, void const *__needle, size_t __needle_len)); # endif _GL_CXXALIASWARN (memmem); #elif defined GNULIB_POSIXCHECK # undef memmem # if HAVE_RAW_DECL_MEMMEM _GL_WARN_ON_USE (memmem, "memmem is unportable and often quadratic - " "use gnulib module memmem-simple for portability, " "and module memmem for speed" ); # endif #endif /* Copy N bytes of SRC to DEST, return pointer to bytes after the last written byte. */ #if @GNULIB_MEMPCPY@ # if ! @HAVE_MEMPCPY@ _GL_FUNCDECL_SYS (mempcpy, void *, (void *restrict __dest, void const *restrict __src, size_t __n) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (mempcpy, void *, (void *restrict __dest, void const *restrict __src, size_t __n)); _GL_CXXALIASWARN (mempcpy); #elif defined GNULIB_POSIXCHECK # undef mempcpy # if HAVE_RAW_DECL_MEMPCPY _GL_WARN_ON_USE (mempcpy, "mempcpy is unportable - " "use gnulib module mempcpy for portability"); # endif #endif /* Search backwards through a block for a byte (specified as an int). */ #if @GNULIB_MEMRCHR@ # if ! @HAVE_DECL_MEMRCHR@ _GL_FUNCDECL_SYS (memrchr, void *, (void const *, int, size_t) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1))); # endif /* On some systems, this function is defined as an overloaded function: extern "C++" { const void * std::memrchr (const void *, int, size_t); } extern "C++" { void * std::memrchr (void *, int, size_t); } */ _GL_CXXALIAS_SYS_CAST2 (memrchr, void *, (void const *, int, size_t), void const *, (void const *, int, size_t)); # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) _GL_CXXALIASWARN1 (memrchr, void *, (void *, int, size_t)); _GL_CXXALIASWARN1 (memrchr, void const *, (void const *, int, size_t)); # else _GL_CXXALIASWARN (memrchr); # endif #elif defined GNULIB_POSIXCHECK # undef memrchr # if HAVE_RAW_DECL_MEMRCHR _GL_WARN_ON_USE (memrchr, "memrchr is unportable - " "use gnulib module memrchr for portability"); # endif #endif /* Find the first occurrence of C in S. More efficient than memchr(S,C,N), at the expense of undefined behavior if C does not occur within N bytes. */ #if @GNULIB_RAWMEMCHR@ # if ! @HAVE_RAWMEMCHR@ _GL_FUNCDECL_SYS (rawmemchr, void *, (void const *__s, int __c_in) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1))); # endif /* On some systems, this function is defined as an overloaded function: extern "C++" { const void * std::rawmemchr (const void *, int); } extern "C++" { void * std::rawmemchr (void *, int); } */ _GL_CXXALIAS_SYS_CAST2 (rawmemchr, void *, (void const *__s, int __c_in), void const *, (void const *__s, int __c_in)); # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) _GL_CXXALIASWARN1 (rawmemchr, void *, (void *__s, int __c_in)); _GL_CXXALIASWARN1 (rawmemchr, void const *, (void const *__s, int __c_in)); # else _GL_CXXALIASWARN (rawmemchr); # endif #elif defined GNULIB_POSIXCHECK # undef rawmemchr # if HAVE_RAW_DECL_RAWMEMCHR _GL_WARN_ON_USE (rawmemchr, "rawmemchr is unportable - " "use gnulib module rawmemchr for portability"); # endif #endif /* Copy SRC to DST, returning the address of the terminating '\0' in DST. */ #if @GNULIB_STPCPY@ # if ! @HAVE_STPCPY@ _GL_FUNCDECL_SYS (stpcpy, char *, (char *restrict __dst, char const *restrict __src) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (stpcpy, char *, (char *restrict __dst, char const *restrict __src)); _GL_CXXALIASWARN (stpcpy); #elif defined GNULIB_POSIXCHECK # undef stpcpy # if HAVE_RAW_DECL_STPCPY _GL_WARN_ON_USE (stpcpy, "stpcpy is unportable - " "use gnulib module stpcpy for portability"); # endif #endif /* Copy no more than N bytes of SRC to DST, returning a pointer past the last non-NUL byte written into DST. */ #if @GNULIB_STPNCPY@ # if @REPLACE_STPNCPY@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef stpncpy # define stpncpy rpl_stpncpy # endif _GL_FUNCDECL_RPL (stpncpy, char *, (char *restrict __dst, char const *restrict __src, size_t __n) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (stpncpy, char *, (char *restrict __dst, char const *restrict __src, size_t __n)); # else # if ! @HAVE_STPNCPY@ _GL_FUNCDECL_SYS (stpncpy, char *, (char *restrict __dst, char const *restrict __src, size_t __n) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (stpncpy, char *, (char *restrict __dst, char const *restrict __src, size_t __n)); # endif _GL_CXXALIASWARN (stpncpy); #elif defined GNULIB_POSIXCHECK # undef stpncpy # if HAVE_RAW_DECL_STPNCPY _GL_WARN_ON_USE (stpncpy, "stpncpy is unportable - " "use gnulib module stpncpy for portability"); # endif #endif #if defined GNULIB_POSIXCHECK /* strchr() does not work with multibyte strings if the locale encoding is GB18030 and the character to be searched is a digit. */ # undef strchr /* Assume strchr is always declared. */ _GL_WARN_ON_USE (strchr, "strchr cannot work correctly on character strings " "in some multibyte locales - " "use mbschr if you care about internationalization"); #endif /* Find the first occurrence of C in S or the final NUL byte. */ #if @GNULIB_STRCHRNUL@ # if @REPLACE_STRCHRNUL@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define strchrnul rpl_strchrnul # endif _GL_FUNCDECL_RPL (strchrnul, char *, (const char *__s, int __c_in) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (strchrnul, char *, (const char *str, int ch)); # else # if ! @HAVE_STRCHRNUL@ _GL_FUNCDECL_SYS (strchrnul, char *, (char const *__s, int __c_in) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1))); # endif /* On some systems, this function is defined as an overloaded function: extern "C++" { const char * std::strchrnul (const char *, int); } extern "C++" { char * std::strchrnul (char *, int); } */ _GL_CXXALIAS_SYS_CAST2 (strchrnul, char *, (char const *__s, int __c_in), char const *, (char const *__s, int __c_in)); # endif # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) _GL_CXXALIASWARN1 (strchrnul, char *, (char *__s, int __c_in)); _GL_CXXALIASWARN1 (strchrnul, char const *, (char const *__s, int __c_in)); # else _GL_CXXALIASWARN (strchrnul); # endif #elif defined GNULIB_POSIXCHECK # undef strchrnul # if HAVE_RAW_DECL_STRCHRNUL _GL_WARN_ON_USE (strchrnul, "strchrnul is unportable - " "use gnulib module strchrnul for portability"); # endif #endif /* Duplicate S, returning an identical malloc'd string. */ #if @GNULIB_STRDUP@ # if @REPLACE_STRDUP@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef strdup # define strdup rpl_strdup # endif _GL_FUNCDECL_RPL (strdup, char *, (char const *__s) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (strdup, char *, (char const *__s)); # else # if defined __cplusplus && defined GNULIB_NAMESPACE && defined strdup /* strdup exists as a function and as a macro. Get rid of the macro. */ # undef strdup # endif # if !(@HAVE_DECL_STRDUP@ || defined strdup) _GL_FUNCDECL_SYS (strdup, char *, (char const *__s) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (strdup, char *, (char const *__s)); # endif _GL_CXXALIASWARN (strdup); #elif defined GNULIB_POSIXCHECK # undef strdup # if HAVE_RAW_DECL_STRDUP _GL_WARN_ON_USE (strdup, "strdup is unportable - " "use gnulib module strdup for portability"); # endif #endif /* Append no more than N characters from SRC onto DEST. */ #if @GNULIB_STRNCAT@ # if @REPLACE_STRNCAT@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef strncat # define strncat rpl_strncat # endif _GL_FUNCDECL_RPL (strncat, char *, (char *dest, const char *src, size_t n) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (strncat, char *, (char *dest, const char *src, size_t n)); # else _GL_CXXALIAS_SYS (strncat, char *, (char *dest, const char *src, size_t n)); # endif _GL_CXXALIASWARN (strncat); #elif defined GNULIB_POSIXCHECK # undef strncat # if HAVE_RAW_DECL_STRNCAT _GL_WARN_ON_USE (strncat, "strncat is unportable - " "use gnulib module strncat for portability"); # endif #endif /* Return a newly allocated copy of at most N bytes of STRING. */ #if @GNULIB_STRNDUP@ # if @REPLACE_STRNDUP@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef strndup # define strndup rpl_strndup # endif _GL_FUNCDECL_RPL (strndup, char *, (char const *__string, size_t __n) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (strndup, char *, (char const *__string, size_t __n)); # else # if ! @HAVE_DECL_STRNDUP@ _GL_FUNCDECL_SYS (strndup, char *, (char const *__string, size_t __n) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (strndup, char *, (char const *__string, size_t __n)); # endif _GL_CXXALIASWARN (strndup); #elif defined GNULIB_POSIXCHECK # undef strndup # if HAVE_RAW_DECL_STRNDUP _GL_WARN_ON_USE (strndup, "strndup is unportable - " "use gnulib module strndup for portability"); # endif #endif /* Find the length (number of bytes) of STRING, but scan at most MAXLEN bytes. If no '\0' terminator is found in that many bytes, return MAXLEN. */ #if @GNULIB_STRNLEN@ # if @REPLACE_STRNLEN@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef strnlen # define strnlen rpl_strnlen # endif _GL_FUNCDECL_RPL (strnlen, size_t, (char const *__string, size_t __maxlen) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (strnlen, size_t, (char const *__string, size_t __maxlen)); # else # if ! @HAVE_DECL_STRNLEN@ _GL_FUNCDECL_SYS (strnlen, size_t, (char const *__string, size_t __maxlen) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (strnlen, size_t, (char const *__string, size_t __maxlen)); # endif _GL_CXXALIASWARN (strnlen); #elif defined GNULIB_POSIXCHECK # undef strnlen # if HAVE_RAW_DECL_STRNLEN _GL_WARN_ON_USE (strnlen, "strnlen is unportable - " "use gnulib module strnlen for portability"); # endif #endif #if defined GNULIB_POSIXCHECK /* strcspn() assumes the second argument is a list of single-byte characters. Even in this simple case, it does not work with multibyte strings if the locale encoding is GB18030 and one of the characters to be searched is a digit. */ # undef strcspn /* Assume strcspn is always declared. */ _GL_WARN_ON_USE (strcspn, "strcspn cannot work correctly on character strings " "in multibyte locales - " "use mbscspn if you care about internationalization"); #endif /* Find the first occurrence in S of any character in ACCEPT. */ #if @GNULIB_STRPBRK@ # if ! @HAVE_STRPBRK@ _GL_FUNCDECL_SYS (strpbrk, char *, (char const *__s, char const *__accept) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1, 2))); # endif /* On some systems, this function is defined as an overloaded function: extern "C" { const char * strpbrk (const char *, const char *); } extern "C++" { char * strpbrk (char *, const char *); } */ _GL_CXXALIAS_SYS_CAST2 (strpbrk, char *, (char const *__s, char const *__accept), const char *, (char const *__s, char const *__accept)); # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) _GL_CXXALIASWARN1 (strpbrk, char *, (char *__s, char const *__accept)); _GL_CXXALIASWARN1 (strpbrk, char const *, (char const *__s, char const *__accept)); # else _GL_CXXALIASWARN (strpbrk); # endif # if defined GNULIB_POSIXCHECK /* strpbrk() assumes the second argument is a list of single-byte characters. Even in this simple case, it does not work with multibyte strings if the locale encoding is GB18030 and one of the characters to be searched is a digit. */ # undef strpbrk _GL_WARN_ON_USE (strpbrk, "strpbrk cannot work correctly on character strings " "in multibyte locales - " "use mbspbrk if you care about internationalization"); # endif #elif defined GNULIB_POSIXCHECK # undef strpbrk # if HAVE_RAW_DECL_STRPBRK _GL_WARN_ON_USE (strpbrk, "strpbrk is unportable - " "use gnulib module strpbrk for portability"); # endif #endif #if defined GNULIB_POSIXCHECK /* strspn() assumes the second argument is a list of single-byte characters. Even in this simple case, it cannot work with multibyte strings. */ # undef strspn /* Assume strspn is always declared. */ _GL_WARN_ON_USE (strspn, "strspn cannot work correctly on character strings " "in multibyte locales - " "use mbsspn if you care about internationalization"); #endif #if defined GNULIB_POSIXCHECK /* strrchr() does not work with multibyte strings if the locale encoding is GB18030 and the character to be searched is a digit. */ # undef strrchr /* Assume strrchr is always declared. */ _GL_WARN_ON_USE (strrchr, "strrchr cannot work correctly on character strings " "in some multibyte locales - " "use mbsrchr if you care about internationalization"); #endif /* Search the next delimiter (char listed in DELIM) starting at *STRINGP. If one is found, overwrite it with a NUL, and advance *STRINGP to point to the next char after it. Otherwise, set *STRINGP to NULL. If *STRINGP was already NULL, nothing happens. Return the old value of *STRINGP. This is a variant of strtok() that is multithread-safe and supports empty fields. Caveat: It modifies the original string. Caveat: These functions cannot be used on constant strings. Caveat: The identity of the delimiting character is lost. Caveat: It doesn't work with multibyte strings unless all of the delimiter characters are ASCII characters < 0x30. See also strtok_r(). */ #if @GNULIB_STRSEP@ # if ! @HAVE_STRSEP@ _GL_FUNCDECL_SYS (strsep, char *, (char **restrict __stringp, char const *restrict __delim) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (strsep, char *, (char **restrict __stringp, char const *restrict __delim)); _GL_CXXALIASWARN (strsep); # if defined GNULIB_POSIXCHECK # undef strsep _GL_WARN_ON_USE (strsep, "strsep cannot work correctly on character strings " "in multibyte locales - " "use mbssep if you care about internationalization"); # endif #elif defined GNULIB_POSIXCHECK # undef strsep # if HAVE_RAW_DECL_STRSEP _GL_WARN_ON_USE (strsep, "strsep is unportable - " "use gnulib module strsep for portability"); # endif #endif #if @GNULIB_STRSTR@ # if @REPLACE_STRSTR@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define strstr rpl_strstr # endif _GL_FUNCDECL_RPL (strstr, char *, (const char *haystack, const char *needle) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (strstr, char *, (const char *haystack, const char *needle)); # else /* On some systems, this function is defined as an overloaded function: extern "C++" { const char * strstr (const char *, const char *); } extern "C++" { char * strstr (char *, const char *); } */ _GL_CXXALIAS_SYS_CAST2 (strstr, char *, (const char *haystack, const char *needle), const char *, (const char *haystack, const char *needle)); # endif # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) _GL_CXXALIASWARN1 (strstr, char *, (char *haystack, const char *needle)); _GL_CXXALIASWARN1 (strstr, const char *, (const char *haystack, const char *needle)); # else _GL_CXXALIASWARN (strstr); # endif #elif defined GNULIB_POSIXCHECK /* strstr() does not work with multibyte strings if the locale encoding is different from UTF-8: POSIX says that it operates on "strings", and "string" in POSIX is defined as a sequence of bytes, not of characters. */ # undef strstr /* Assume strstr is always declared. */ _GL_WARN_ON_USE (strstr, "strstr is quadratic on many systems, and cannot " "work correctly on character strings in most " "multibyte locales - " "use mbsstr if you care about internationalization, " "or use strstr if you care about speed"); #endif /* Find the first occurrence of NEEDLE in HAYSTACK, using case-insensitive comparison. */ #if @GNULIB_STRCASESTR@ # if @REPLACE_STRCASESTR@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define strcasestr rpl_strcasestr # endif _GL_FUNCDECL_RPL (strcasestr, char *, (const char *haystack, const char *needle) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (strcasestr, char *, (const char *haystack, const char *needle)); # else # if ! @HAVE_STRCASESTR@ _GL_FUNCDECL_SYS (strcasestr, char *, (const char *haystack, const char *needle) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1, 2))); # endif /* On some systems, this function is defined as an overloaded function: extern "C++" { const char * strcasestr (const char *, const char *); } extern "C++" { char * strcasestr (char *, const char *); } */ _GL_CXXALIAS_SYS_CAST2 (strcasestr, char *, (const char *haystack, const char *needle), const char *, (const char *haystack, const char *needle)); # endif # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) _GL_CXXALIASWARN1 (strcasestr, char *, (char *haystack, const char *needle)); _GL_CXXALIASWARN1 (strcasestr, const char *, (const char *haystack, const char *needle)); # else _GL_CXXALIASWARN (strcasestr); # endif #elif defined GNULIB_POSIXCHECK /* strcasestr() does not work with multibyte strings: It is a glibc extension, and glibc implements it only for unibyte locales. */ # undef strcasestr # if HAVE_RAW_DECL_STRCASESTR _GL_WARN_ON_USE (strcasestr, "strcasestr does work correctly on character " "strings in multibyte locales - " "use mbscasestr if you care about " "internationalization, or use c-strcasestr if you want " "a locale independent function"); # endif #endif /* Parse S into tokens separated by characters in DELIM. If S is NULL, the saved pointer in SAVE_PTR is used as the next starting point. For example: char s[] = "-abc-=-def"; char *sp; x = strtok_r(s, "-", &sp); // x = "abc", sp = "=-def" x = strtok_r(NULL, "-=", &sp); // x = "def", sp = NULL x = strtok_r(NULL, "=", &sp); // x = NULL // s = "abc\0-def\0" This is a variant of strtok() that is multithread-safe. For the POSIX documentation for this function, see: http://www.opengroup.org/susv3xsh/strtok.html Caveat: It modifies the original string. Caveat: These functions cannot be used on constant strings. Caveat: The identity of the delimiting character is lost. Caveat: It doesn't work with multibyte strings unless all of the delimiter characters are ASCII characters < 0x30. See also strsep(). */ #if @GNULIB_STRTOK_R@ # if @REPLACE_STRTOK_R@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef strtok_r # define strtok_r rpl_strtok_r # endif _GL_FUNCDECL_RPL (strtok_r, char *, (char *restrict s, char const *restrict delim, char **restrict save_ptr) _GL_ARG_NONNULL ((2, 3))); _GL_CXXALIAS_RPL (strtok_r, char *, (char *restrict s, char const *restrict delim, char **restrict save_ptr)); # else # if @UNDEFINE_STRTOK_R@ || defined GNULIB_POSIXCHECK # undef strtok_r # endif # if ! @HAVE_DECL_STRTOK_R@ _GL_FUNCDECL_SYS (strtok_r, char *, (char *restrict s, char const *restrict delim, char **restrict save_ptr) _GL_ARG_NONNULL ((2, 3))); # endif _GL_CXXALIAS_SYS (strtok_r, char *, (char *restrict s, char const *restrict delim, char **restrict save_ptr)); # endif _GL_CXXALIASWARN (strtok_r); # if defined GNULIB_POSIXCHECK _GL_WARN_ON_USE (strtok_r, "strtok_r cannot work correctly on character " "strings in multibyte locales - " "use mbstok_r if you care about internationalization"); # endif #elif defined GNULIB_POSIXCHECK # undef strtok_r # if HAVE_RAW_DECL_STRTOK_R _GL_WARN_ON_USE (strtok_r, "strtok_r is unportable - " "use gnulib module strtok_r for portability"); # endif #endif /* The following functions are not specified by POSIX. They are gnulib extensions. */ #if @GNULIB_MBSLEN@ /* Return the number of multibyte characters in the character string STRING. This considers multibyte characters, unlike strlen, which counts bytes. */ # ifdef __MirBSD__ /* MirBSD defines mbslen as a macro. Override it. */ # undef mbslen # endif # if @HAVE_MBSLEN@ /* AIX, OSF/1, MirBSD define mbslen already in libc. */ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define mbslen rpl_mbslen # endif _GL_FUNCDECL_RPL (mbslen, size_t, (const char *string) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (mbslen, size_t, (const char *string)); # else _GL_FUNCDECL_SYS (mbslen, size_t, (const char *string) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_SYS (mbslen, size_t, (const char *string)); # endif _GL_CXXALIASWARN (mbslen); #endif #if @GNULIB_MBSNLEN@ /* Return the number of multibyte characters in the character string starting at STRING and ending at STRING + LEN. */ _GL_EXTERN_C size_t mbsnlen (const char *string, size_t len) _GL_ARG_NONNULL ((1)); #endif #if @GNULIB_MBSCHR@ /* Locate the first single-byte character C in the character string STRING, and return a pointer to it. Return NULL if C is not found in STRING. Unlike strchr(), this function works correctly in multibyte locales with encodings such as GB18030. */ # if defined __hpux # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define mbschr rpl_mbschr /* avoid collision with HP-UX function */ # endif _GL_FUNCDECL_RPL (mbschr, char *, (const char *string, int c) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (mbschr, char *, (const char *string, int c)); # else _GL_FUNCDECL_SYS (mbschr, char *, (const char *string, int c) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_SYS (mbschr, char *, (const char *string, int c)); # endif _GL_CXXALIASWARN (mbschr); #endif #if @GNULIB_MBSRCHR@ /* Locate the last single-byte character C in the character string STRING, and return a pointer to it. Return NULL if C is not found in STRING. Unlike strrchr(), this function works correctly in multibyte locales with encodings such as GB18030. */ # if defined __hpux || defined __INTERIX # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define mbsrchr rpl_mbsrchr /* avoid collision with system function */ # endif _GL_FUNCDECL_RPL (mbsrchr, char *, (const char *string, int c) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (mbsrchr, char *, (const char *string, int c)); # else _GL_FUNCDECL_SYS (mbsrchr, char *, (const char *string, int c) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_SYS (mbsrchr, char *, (const char *string, int c)); # endif _GL_CXXALIASWARN (mbsrchr); #endif #if @GNULIB_MBSSTR@ /* Find the first occurrence of the character string NEEDLE in the character string HAYSTACK. Return NULL if NEEDLE is not found in HAYSTACK. Unlike strstr(), this function works correctly in multibyte locales with encodings different from UTF-8. */ _GL_EXTERN_C char * mbsstr (const char *haystack, const char *needle) _GL_ARG_NONNULL ((1, 2)); #endif #if @GNULIB_MBSCASECMP@ /* Compare the character strings S1 and S2, ignoring case, returning less than, equal to or greater than zero if S1 is lexicographically less than, equal to or greater than S2. Note: This function may, in multibyte locales, return 0 for strings of different lengths! Unlike strcasecmp(), this function works correctly in multibyte locales. */ _GL_EXTERN_C int mbscasecmp (const char *s1, const char *s2) _GL_ARG_NONNULL ((1, 2)); #endif #if @GNULIB_MBSNCASECMP@ /* Compare the initial segment of the character string S1 consisting of at most N characters with the initial segment of the character string S2 consisting of at most N characters, ignoring case, returning less than, equal to or greater than zero if the initial segment of S1 is lexicographically less than, equal to or greater than the initial segment of S2. Note: This function may, in multibyte locales, return 0 for initial segments of different lengths! Unlike strncasecmp(), this function works correctly in multibyte locales. But beware that N is not a byte count but a character count! */ _GL_EXTERN_C int mbsncasecmp (const char *s1, const char *s2, size_t n) _GL_ARG_NONNULL ((1, 2)); #endif #if @GNULIB_MBSPCASECMP@ /* Compare the initial segment of the character string STRING consisting of at most mbslen (PREFIX) characters with the character string PREFIX, ignoring case. If the two match, return a pointer to the first byte after this prefix in STRING. Otherwise, return NULL. Note: This function may, in multibyte locales, return non-NULL if STRING is of smaller length than PREFIX! Unlike strncasecmp(), this function works correctly in multibyte locales. */ _GL_EXTERN_C char * mbspcasecmp (const char *string, const char *prefix) _GL_ARG_NONNULL ((1, 2)); #endif #if @GNULIB_MBSCASESTR@ /* Find the first occurrence of the character string NEEDLE in the character string HAYSTACK, using case-insensitive comparison. Note: This function may, in multibyte locales, return success even if strlen (haystack) < strlen (needle) ! Unlike strcasestr(), this function works correctly in multibyte locales. */ _GL_EXTERN_C char * mbscasestr (const char *haystack, const char *needle) _GL_ARG_NONNULL ((1, 2)); #endif #if @GNULIB_MBSCSPN@ /* Find the first occurrence in the character string STRING of any character in the character string ACCEPT. Return the number of bytes from the beginning of the string to this occurrence, or to the end of the string if none exists. Unlike strcspn(), this function works correctly in multibyte locales. */ _GL_EXTERN_C size_t mbscspn (const char *string, const char *accept) _GL_ARG_NONNULL ((1, 2)); #endif #if @GNULIB_MBSPBRK@ /* Find the first occurrence in the character string STRING of any character in the character string ACCEPT. Return the pointer to it, or NULL if none exists. Unlike strpbrk(), this function works correctly in multibyte locales. */ # if defined __hpux # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define mbspbrk rpl_mbspbrk /* avoid collision with HP-UX function */ # endif _GL_FUNCDECL_RPL (mbspbrk, char *, (const char *string, const char *accept) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (mbspbrk, char *, (const char *string, const char *accept)); # else _GL_FUNCDECL_SYS (mbspbrk, char *, (const char *string, const char *accept) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_SYS (mbspbrk, char *, (const char *string, const char *accept)); # endif _GL_CXXALIASWARN (mbspbrk); #endif #if @GNULIB_MBSSPN@ /* Find the first occurrence in the character string STRING of any character not in the character string REJECT. Return the number of bytes from the beginning of the string to this occurrence, or to the end of the string if none exists. Unlike strspn(), this function works correctly in multibyte locales. */ _GL_EXTERN_C size_t mbsspn (const char *string, const char *reject) _GL_ARG_NONNULL ((1, 2)); #endif #if @GNULIB_MBSSEP@ /* Search the next delimiter (multibyte character listed in the character string DELIM) starting at the character string *STRINGP. If one is found, overwrite it with a NUL, and advance *STRINGP to point to the next multibyte character after it. Otherwise, set *STRINGP to NULL. If *STRINGP was already NULL, nothing happens. Return the old value of *STRINGP. This is a variant of mbstok_r() that supports empty fields. Caveat: It modifies the original string. Caveat: These functions cannot be used on constant strings. Caveat: The identity of the delimiting character is lost. See also mbstok_r(). */ _GL_EXTERN_C char * mbssep (char **stringp, const char *delim) _GL_ARG_NONNULL ((1, 2)); #endif #if @GNULIB_MBSTOK_R@ /* Parse the character string STRING into tokens separated by characters in the character string DELIM. If STRING is NULL, the saved pointer in SAVE_PTR is used as the next starting point. For example: char s[] = "-abc-=-def"; char *sp; x = mbstok_r(s, "-", &sp); // x = "abc", sp = "=-def" x = mbstok_r(NULL, "-=", &sp); // x = "def", sp = NULL x = mbstok_r(NULL, "=", &sp); // x = NULL // s = "abc\0-def\0" Caveat: It modifies the original string. Caveat: These functions cannot be used on constant strings. Caveat: The identity of the delimiting character is lost. See also mbssep(). */ _GL_EXTERN_C char * mbstok_r (char *string, const char *delim, char **save_ptr) _GL_ARG_NONNULL ((2, 3)); #endif /* Map any int, typically from errno, into an error message. */ #if @GNULIB_STRERROR@ # if @REPLACE_STRERROR@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef strerror # define strerror rpl_strerror # endif _GL_FUNCDECL_RPL (strerror, char *, (int)); _GL_CXXALIAS_RPL (strerror, char *, (int)); # else _GL_CXXALIAS_SYS (strerror, char *, (int)); # endif _GL_CXXALIASWARN (strerror); #elif defined GNULIB_POSIXCHECK # undef strerror /* Assume strerror is always declared. */ _GL_WARN_ON_USE (strerror, "strerror is unportable - " "use gnulib module strerror to guarantee non-NULL result"); #endif /* Map any int, typically from errno, into an error message. Multithread-safe. Uses the POSIX declaration, not the glibc declaration. */ #if @GNULIB_STRERROR_R@ # if @REPLACE_STRERROR_R@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef strerror_r # define strerror_r rpl_strerror_r # endif _GL_FUNCDECL_RPL (strerror_r, int, (int errnum, char *buf, size_t buflen) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (strerror_r, int, (int errnum, char *buf, size_t buflen)); # else # if !@HAVE_DECL_STRERROR_R@ _GL_FUNCDECL_SYS (strerror_r, int, (int errnum, char *buf, size_t buflen) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (strerror_r, int, (int errnum, char *buf, size_t buflen)); # endif # if @HAVE_DECL_STRERROR_R@ _GL_CXXALIASWARN (strerror_r); # endif #elif defined GNULIB_POSIXCHECK # undef strerror_r # if HAVE_RAW_DECL_STRERROR_R _GL_WARN_ON_USE (strerror_r, "strerror_r is unportable - " "use gnulib module strerror_r-posix for portability"); # endif #endif #if @GNULIB_STRSIGNAL@ # if @REPLACE_STRSIGNAL@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define strsignal rpl_strsignal # endif _GL_FUNCDECL_RPL (strsignal, char *, (int __sig)); _GL_CXXALIAS_RPL (strsignal, char *, (int __sig)); # else # if ! @HAVE_DECL_STRSIGNAL@ _GL_FUNCDECL_SYS (strsignal, char *, (int __sig)); # endif /* Need to cast, because on Cygwin 1.5.x systems, the return type is 'const char *'. */ _GL_CXXALIAS_SYS_CAST (strsignal, char *, (int __sig)); # endif _GL_CXXALIASWARN (strsignal); #elif defined GNULIB_POSIXCHECK # undef strsignal # if HAVE_RAW_DECL_STRSIGNAL _GL_WARN_ON_USE (strsignal, "strsignal is unportable - " "use gnulib module strsignal for portability"); # endif #endif #if @GNULIB_STRVERSCMP@ # if !@HAVE_STRVERSCMP@ _GL_FUNCDECL_SYS (strverscmp, int, (const char *, const char *) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (strverscmp, int, (const char *, const char *)); _GL_CXXALIASWARN (strverscmp); #elif defined GNULIB_POSIXCHECK # undef strverscmp # if HAVE_RAW_DECL_STRVERSCMP _GL_WARN_ON_USE (strverscmp, "strverscmp is unportable - " "use gnulib module strverscmp for portability"); # endif #endif #endif /* _@GUARD_PREFIX@_STRING_H */ #endif /* _@GUARD_PREFIX@_STRING_H */ ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/gl/memset.c������������������������������������������������������������������0000664�0001750�0001750�00000001745�11672675562�014001� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* memset.c -- set an area of memory to a given value Copyright (C) 1991, 2003, 2009-2011 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include <config.h> #include <stddef.h> void * memset (void *str, int c, size_t len) { register char *st = str; while (len-- > 0) *st++ = c; return str; } ���������������������������source-highlight-3.1.6/gl/getopt1.c�����������������������������������������������������������������0000664�0001750�0001750�00000010552�11672675562�014066� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* getopt_long and getopt_long_only entry points for GNU getopt. Copyright (C) 1987-1994, 1996-1998, 2004, 2006, 2009-2011 Free Software Foundation, Inc. This file is part of the GNU C Library. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifdef _LIBC # include <getopt.h> #else # include <config.h> # include "getopt.h" #endif #include "getopt_int.h" #include <stdio.h> /* This needs to come after some library #include to get __GNU_LIBRARY__ defined. */ #ifdef __GNU_LIBRARY__ #include <stdlib.h> #endif #ifndef NULL #define NULL 0 #endif int getopt_long (int argc, char *__getopt_argv_const *argv, const char *options, const struct option *long_options, int *opt_index) { return _getopt_internal (argc, (char **) argv, options, long_options, opt_index, 0, 0); } int _getopt_long_r (int argc, char **argv, const char *options, const struct option *long_options, int *opt_index, struct _getopt_data *d) { return _getopt_internal_r (argc, argv, options, long_options, opt_index, 0, d, 0); } /* Like getopt_long, but '-' as well as '--' can indicate a long option. If an option that starts with '-' (not '--') doesn't match a long option, but does match a short option, it is parsed as a short option instead. */ int getopt_long_only (int argc, char *__getopt_argv_const *argv, const char *options, const struct option *long_options, int *opt_index) { return _getopt_internal (argc, (char **) argv, options, long_options, opt_index, 1, 0); } int _getopt_long_only_r (int argc, char **argv, const char *options, const struct option *long_options, int *opt_index, struct _getopt_data *d) { return _getopt_internal_r (argc, argv, options, long_options, opt_index, 1, d, 0); } #ifdef TEST #include <stdio.h> int main (int argc, char **argv) { int c; int digit_optind = 0; while (1) { int this_option_optind = optind ? optind : 1; int option_index = 0; static const struct option long_options[] = { {"add", 1, 0, 0}, {"append", 0, 0, 0}, {"delete", 1, 0, 0}, {"verbose", 0, 0, 0}, {"create", 0, 0, 0}, {"file", 1, 0, 0}, {0, 0, 0, 0} }; c = getopt_long (argc, argv, "abc:d:0123456789", long_options, &option_index); if (c == -1) break; switch (c) { case 0: printf ("option %s", long_options[option_index].name); if (optarg) printf (" with arg %s", optarg); printf ("\n"); break; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': if (digit_optind != 0 && digit_optind != this_option_optind) printf ("digits occur in two different argv-elements.\n"); digit_optind = this_option_optind; printf ("option %c\n", c); break; case 'a': printf ("option a\n"); break; case 'b': printf ("option b\n"); break; case 'c': printf ("option c with value `%s'\n", optarg); break; case 'd': printf ("option d with value `%s'\n", optarg); break; case '?': break; default: printf ("?? getopt returned character code 0%o ??\n", c); } } if (optind < argc) { printf ("non-option ARGV-elements: "); while (optind < argc) printf ("%s ", argv[optind++]); printf ("\n"); } exit (0); } #endif /* TEST */ ������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/gl/Makefile.am���������������������������������������������������������������0000664�0001750�0001750�00000102131�11672675562�014366� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������## DO NOT EDIT! GENERATED AUTOMATICALLY! ## Process this file with automake to produce Makefile.in. # Copyright (C) 2002-2011 Free Software Foundation, Inc. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This file is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this file. If not, see <http://www.gnu.org/licenses/>. # # As a special exception to the GNU General Public License, # this file may be distributed as part of a program that # contains a configuration script generated by Autoconf, under # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. # Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --no-conditional-dependencies --libtool --macro-prefix=gl dirent getopt memset mkdir progname strdup AUTOMAKE_OPTIONS = 1.5 gnits SUBDIRS = noinst_HEADERS = noinst_LIBRARIES = noinst_LTLIBRARIES = EXTRA_DIST = BUILT_SOURCES = SUFFIXES = MOSTLYCLEANFILES = core *.stackdump MOSTLYCLEANDIRS = CLEANFILES = DISTCLEANFILES = MAINTAINERCLEANFILES = EXTRA_DIST += m4/gnulib-cache.m4 AM_CPPFLAGS = AM_CFLAGS = noinst_LTLIBRARIES += libgnu.la libgnu_la_SOURCES = libgnu_la_LIBADD = $(gl_LTLIBOBJS) libgnu_la_DEPENDENCIES = $(gl_LTLIBOBJS) EXTRA_libgnu_la_SOURCES = libgnu_la_LDFLAGS = $(AM_LDFLAGS) libgnu_la_LDFLAGS += -no-undefined libgnu_la_LDFLAGS += $(LTLIBINTL) ## begin gnulib module dirent BUILT_SOURCES += dirent.h # We need the following in order to create <dirent.h> when the system # doesn't have one that works with the given compiler. dirent.h: dirent.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''HAVE_DIRENT_H''@|$(HAVE_DIRENT_H)|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_DIRENT_H''@|$(NEXT_DIRENT_H)|g' \ -e 's/@''GNULIB_OPENDIR''@/$(GNULIB_OPENDIR)/g' \ -e 's/@''GNULIB_READDIR''@/$(GNULIB_READDIR)/g' \ -e 's/@''GNULIB_REWINDDIR''@/$(GNULIB_REWINDDIR)/g' \ -e 's/@''GNULIB_CLOSEDIR''@/$(GNULIB_CLOSEDIR)/g' \ -e 's/@''GNULIB_DIRFD''@/$(GNULIB_DIRFD)/g' \ -e 's/@''GNULIB_FDOPENDIR''@/$(GNULIB_FDOPENDIR)/g' \ -e 's/@''GNULIB_SCANDIR''@/$(GNULIB_SCANDIR)/g' \ -e 's/@''GNULIB_ALPHASORT''@/$(GNULIB_ALPHASORT)/g' \ -e 's/@''HAVE_OPENDIR''@/$(HAVE_OPENDIR)/g' \ -e 's/@''HAVE_READDIR''@/$(HAVE_READDIR)/g' \ -e 's/@''HAVE_REWINDDIR''@/$(HAVE_REWINDDIR)/g' \ -e 's/@''HAVE_CLOSEDIR''@/$(HAVE_CLOSEDIR)/g' \ -e 's|@''HAVE_DECL_DIRFD''@|$(HAVE_DECL_DIRFD)|g' \ -e 's|@''HAVE_DECL_FDOPENDIR''@|$(HAVE_DECL_FDOPENDIR)|g' \ -e 's|@''HAVE_FDOPENDIR''@|$(HAVE_FDOPENDIR)|g' \ -e 's|@''HAVE_SCANDIR''@|$(HAVE_SCANDIR)|g' \ -e 's|@''HAVE_ALPHASORT''@|$(HAVE_ALPHASORT)|g' \ -e 's|@''REPLACE_OPENDIR''@|$(REPLACE_OPENDIR)|g' \ -e 's|@''REPLACE_CLOSEDIR''@|$(REPLACE_CLOSEDIR)|g' \ -e 's|@''REPLACE_DIRFD''@|$(REPLACE_DIRFD)|g' \ -e 's|@''REPLACE_FDOPENDIR''@|$(REPLACE_FDOPENDIR)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/dirent.in.h; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += dirent.h dirent.h-t EXTRA_DIST += dirent.in.h ## end gnulib module dirent ## begin gnulib module dirname-lgpl libgnu_la_SOURCES += dirname-lgpl.c basename-lgpl.c stripslash.c EXTRA_DIST += dirname.h ## end gnulib module dirname-lgpl ## begin gnulib module dosname EXTRA_DIST += dosname.h ## end gnulib module dosname ## begin gnulib module getopt-posix BUILT_SOURCES += $(GETOPT_H) # We need the following in order to create <getopt.h> when the system # doesn't have one that works with the given compiler. getopt.h: getopt.in.h $(top_builddir)/config.status $(ARG_NONNULL_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''HAVE_GETOPT_H''@|$(HAVE_GETOPT_H)|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_GETOPT_H''@|$(NEXT_GETOPT_H)|g' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ < $(srcdir)/getopt.in.h; \ } > $@-t && \ mv -f $@-t $@ MOSTLYCLEANFILES += getopt.h getopt.h-t EXTRA_DIST += getopt.c getopt.in.h getopt1.c getopt_int.h EXTRA_libgnu_la_SOURCES += getopt.c getopt1.c ## end gnulib module getopt-posix ## begin gnulib module gettext-h libgnu_la_SOURCES += gettext.h ## end gnulib module gettext-h ## begin gnulib module malloc-posix EXTRA_DIST += malloc.c EXTRA_libgnu_la_SOURCES += malloc.c ## end gnulib module malloc-posix ## begin gnulib module memset EXTRA_DIST += memset.c EXTRA_libgnu_la_SOURCES += memset.c ## end gnulib module memset ## begin gnulib module mkdir EXTRA_DIST += mkdir.c EXTRA_libgnu_la_SOURCES += mkdir.c ## end gnulib module mkdir ## begin gnulib module progname libgnu_la_SOURCES += progname.h progname.c ## end gnulib module progname ## begin gnulib module snippet/_Noreturn # Because this Makefile snippet defines a variable used by other # gnulib Makefile snippets, it must be present in all Makefile.am that # need it. This is ensured by the applicability 'all' defined above. _NORETURN_H=$(top_srcdir)/build-aux/snippet/_Noreturn.h EXTRA_DIST += $(top_srcdir)/build-aux/snippet/_Noreturn.h ## end gnulib module snippet/_Noreturn ## begin gnulib module snippet/arg-nonnull # The BUILT_SOURCES created by this Makefile snippet are not used via #include # statements but through direct file reference. Therefore this snippet must be # present in all Makefile.am that need it. This is ensured by the applicability # 'all' defined above. BUILT_SOURCES += arg-nonnull.h # The arg-nonnull.h that gets inserted into generated .h files is the same as # build-aux/snippet/arg-nonnull.h, except that it has the copyright header cut # off. arg-nonnull.h: $(top_srcdir)/build-aux/snippet/arg-nonnull.h $(AM_V_GEN)rm -f $@-t $@ && \ sed -n -e '/GL_ARG_NONNULL/,$$p' \ < $(top_srcdir)/build-aux/snippet/arg-nonnull.h \ > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += arg-nonnull.h arg-nonnull.h-t ARG_NONNULL_H=arg-nonnull.h EXTRA_DIST += $(top_srcdir)/build-aux/snippet/arg-nonnull.h ## end gnulib module snippet/arg-nonnull ## begin gnulib module snippet/c++defs # The BUILT_SOURCES created by this Makefile snippet are not used via #include # statements but through direct file reference. Therefore this snippet must be # present in all Makefile.am that need it. This is ensured by the applicability # 'all' defined above. BUILT_SOURCES += c++defs.h # The c++defs.h that gets inserted into generated .h files is the same as # build-aux/snippet/c++defs.h, except that it has the copyright header cut off. c++defs.h: $(top_srcdir)/build-aux/snippet/c++defs.h $(AM_V_GEN)rm -f $@-t $@ && \ sed -n -e '/_GL_CXXDEFS/,$$p' \ < $(top_srcdir)/build-aux/snippet/c++defs.h \ > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += c++defs.h c++defs.h-t CXXDEFS_H=c++defs.h EXTRA_DIST += $(top_srcdir)/build-aux/snippet/c++defs.h ## end gnulib module snippet/c++defs ## begin gnulib module snippet/warn-on-use BUILT_SOURCES += warn-on-use.h # The warn-on-use.h that gets inserted into generated .h files is the same as # build-aux/snippet/warn-on-use.h, except that it has the copyright header cut # off. warn-on-use.h: $(top_srcdir)/build-aux/snippet/warn-on-use.h $(AM_V_GEN)rm -f $@-t $@ && \ sed -n -e '/^.ifndef/,$$p' \ < $(top_srcdir)/build-aux/snippet/warn-on-use.h \ > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += warn-on-use.h warn-on-use.h-t WARN_ON_USE_H=warn-on-use.h EXTRA_DIST += $(top_srcdir)/build-aux/snippet/warn-on-use.h ## end gnulib module snippet/warn-on-use ## begin gnulib module stdbool BUILT_SOURCES += $(STDBOOL_H) # We need the following in order to create <stdbool.h> when the system # doesn't have one that works. if GL_GENERATE_STDBOOL_H stdbool.h: stdbool.in.h $(top_builddir)/config.status $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' < $(srcdir)/stdbool.in.h; \ } > $@-t && \ mv $@-t $@ else stdbool.h: $(top_builddir)/config.status rm -f $@ endif MOSTLYCLEANFILES += stdbool.h stdbool.h-t EXTRA_DIST += stdbool.in.h ## end gnulib module stdbool ## begin gnulib module stddef BUILT_SOURCES += $(STDDEF_H) # We need the following in order to create <stddef.h> when the system # doesn't have one that works with the given compiler. if GL_GENERATE_STDDEF_H stddef.h: stddef.in.h $(top_builddir)/config.status $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_STDDEF_H''@|$(NEXT_STDDEF_H)|g' \ -e 's|@''HAVE_WCHAR_T''@|$(HAVE_WCHAR_T)|g' \ -e 's|@''REPLACE_NULL''@|$(REPLACE_NULL)|g' \ < $(srcdir)/stddef.in.h; \ } > $@-t && \ mv $@-t $@ else stddef.h: $(top_builddir)/config.status rm -f $@ endif MOSTLYCLEANFILES += stddef.h stddef.h-t EXTRA_DIST += stddef.in.h ## end gnulib module stddef ## begin gnulib module stdlib BUILT_SOURCES += stdlib.h # We need the following in order to create <stdlib.h> when the system # doesn't have one that works with the given compiler. stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \ $(_NORETURN_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_STDLIB_H''@|$(NEXT_STDLIB_H)|g' \ -e 's/@''GNULIB__EXIT''@/$(GNULIB__EXIT)/g' \ -e 's/@''GNULIB_ATOLL''@/$(GNULIB_ATOLL)/g' \ -e 's/@''GNULIB_CALLOC_POSIX''@/$(GNULIB_CALLOC_POSIX)/g' \ -e 's/@''GNULIB_CANONICALIZE_FILE_NAME''@/$(GNULIB_CANONICALIZE_FILE_NAME)/g' \ -e 's/@''GNULIB_GETLOADAVG''@/$(GNULIB_GETLOADAVG)/g' \ -e 's/@''GNULIB_GETSUBOPT''@/$(GNULIB_GETSUBOPT)/g' \ -e 's/@''GNULIB_GRANTPT''@/$(GNULIB_GRANTPT)/g' \ -e 's/@''GNULIB_MALLOC_POSIX''@/$(GNULIB_MALLOC_POSIX)/g' \ -e 's/@''GNULIB_MBTOWC''@/$(GNULIB_MBTOWC)/g' \ -e 's/@''GNULIB_MKDTEMP''@/$(GNULIB_MKDTEMP)/g' \ -e 's/@''GNULIB_MKOSTEMP''@/$(GNULIB_MKOSTEMP)/g' \ -e 's/@''GNULIB_MKOSTEMPS''@/$(GNULIB_MKOSTEMPS)/g' \ -e 's/@''GNULIB_MKSTEMP''@/$(GNULIB_MKSTEMP)/g' \ -e 's/@''GNULIB_MKSTEMPS''@/$(GNULIB_MKSTEMPS)/g' \ -e 's/@''GNULIB_POSIX_OPENPT''@/$(GNULIB_POSIX_OPENPT)/g' \ -e 's/@''GNULIB_PTSNAME''@/$(GNULIB_PTSNAME)/g' \ -e 's/@''GNULIB_PTSNAME_R''@/$(GNULIB_PTSNAME_R)/g' \ -e 's/@''GNULIB_PUTENV''@/$(GNULIB_PUTENV)/g' \ -e 's/@''GNULIB_RANDOM_R''@/$(GNULIB_RANDOM_R)/g' \ -e 's/@''GNULIB_REALLOC_POSIX''@/$(GNULIB_REALLOC_POSIX)/g' \ -e 's/@''GNULIB_REALPATH''@/$(GNULIB_REALPATH)/g' \ -e 's/@''GNULIB_RPMATCH''@/$(GNULIB_RPMATCH)/g' \ -e 's/@''GNULIB_SETENV''@/$(GNULIB_SETENV)/g' \ -e 's/@''GNULIB_STRTOD''@/$(GNULIB_STRTOD)/g' \ -e 's/@''GNULIB_STRTOLL''@/$(GNULIB_STRTOLL)/g' \ -e 's/@''GNULIB_STRTOULL''@/$(GNULIB_STRTOULL)/g' \ -e 's/@''GNULIB_SYSTEM_POSIX''@/$(GNULIB_SYSTEM_POSIX)/g' \ -e 's/@''GNULIB_UNLOCKPT''@/$(GNULIB_UNLOCKPT)/g' \ -e 's/@''GNULIB_UNSETENV''@/$(GNULIB_UNSETENV)/g' \ -e 's/@''GNULIB_WCTOMB''@/$(GNULIB_WCTOMB)/g' \ < $(srcdir)/stdlib.in.h | \ sed -e 's|@''HAVE__EXIT''@|$(HAVE__EXIT)|g' \ -e 's|@''HAVE_ATOLL''@|$(HAVE_ATOLL)|g' \ -e 's|@''HAVE_CANONICALIZE_FILE_NAME''@|$(HAVE_CANONICALIZE_FILE_NAME)|g' \ -e 's|@''HAVE_DECL_GETLOADAVG''@|$(HAVE_DECL_GETLOADAVG)|g' \ -e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \ -e 's|@''HAVE_GRANTPT''@|$(HAVE_GRANTPT)|g' \ -e 's|@''HAVE_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \ -e 's|@''HAVE_MKOSTEMP''@|$(HAVE_MKOSTEMP)|g' \ -e 's|@''HAVE_MKOSTEMPS''@|$(HAVE_MKOSTEMPS)|g' \ -e 's|@''HAVE_MKSTEMP''@|$(HAVE_MKSTEMP)|g' \ -e 's|@''HAVE_MKSTEMPS''@|$(HAVE_MKSTEMPS)|g' \ -e 's|@''HAVE_POSIX_OPENPT''@|$(HAVE_POSIX_OPENPT)|g' \ -e 's|@''HAVE_PTSNAME''@|$(HAVE_PTSNAME)|g' \ -e 's|@''HAVE_PTSNAME_R''@|$(HAVE_PTSNAME_R)|g' \ -e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \ -e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \ -e 's|@''HAVE_REALPATH''@|$(HAVE_REALPATH)|g' \ -e 's|@''HAVE_RPMATCH''@|$(HAVE_RPMATCH)|g' \ -e 's|@''HAVE_DECL_SETENV''@|$(HAVE_DECL_SETENV)|g' \ -e 's|@''HAVE_STRTOD''@|$(HAVE_STRTOD)|g' \ -e 's|@''HAVE_STRTOLL''@|$(HAVE_STRTOLL)|g' \ -e 's|@''HAVE_STRTOULL''@|$(HAVE_STRTOULL)|g' \ -e 's|@''HAVE_STRUCT_RANDOM_DATA''@|$(HAVE_STRUCT_RANDOM_DATA)|g' \ -e 's|@''HAVE_SYS_LOADAVG_H''@|$(HAVE_SYS_LOADAVG_H)|g' \ -e 's|@''HAVE_UNLOCKPT''@|$(HAVE_UNLOCKPT)|g' \ -e 's|@''HAVE_DECL_UNSETENV''@|$(HAVE_DECL_UNSETENV)|g' \ -e 's|@''REPLACE_CALLOC''@|$(REPLACE_CALLOC)|g' \ -e 's|@''REPLACE_CANONICALIZE_FILE_NAME''@|$(REPLACE_CANONICALIZE_FILE_NAME)|g' \ -e 's|@''REPLACE_MALLOC''@|$(REPLACE_MALLOC)|g' \ -e 's|@''REPLACE_MBTOWC''@|$(REPLACE_MBTOWC)|g' \ -e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \ -e 's|@''REPLACE_PTSNAME_R''@|$(REPLACE_PTSNAME_R)|g' \ -e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \ -e 's|@''REPLACE_REALLOC''@|$(REPLACE_REALLOC)|g' \ -e 's|@''REPLACE_REALPATH''@|$(REPLACE_REALPATH)|g' \ -e 's|@''REPLACE_SETENV''@|$(REPLACE_SETENV)|g' \ -e 's|@''REPLACE_STRTOD''@|$(REPLACE_STRTOD)|g' \ -e 's|@''REPLACE_UNSETENV''@|$(REPLACE_UNSETENV)|g' \ -e 's|@''REPLACE_WCTOMB''@|$(REPLACE_WCTOMB)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _Noreturn/r $(_NORETURN_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += stdlib.h stdlib.h-t EXTRA_DIST += stdlib.in.h ## end gnulib module stdlib ## begin gnulib module strdup EXTRA_DIST += strdup.c EXTRA_libgnu_la_SOURCES += strdup.c ## end gnulib module strdup ## begin gnulib module string BUILT_SOURCES += string.h # We need the following in order to create <string.h> when the system # doesn't have one that works with the given compiler. string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_STRING_H''@|$(NEXT_STRING_H)|g' \ -e 's/@''GNULIB_FFSL''@/$(GNULIB_FFSL)/g' \ -e 's/@''GNULIB_FFSLL''@/$(GNULIB_FFSLL)/g' \ -e 's/@''GNULIB_MBSLEN''@/$(GNULIB_MBSLEN)/g' \ -e 's/@''GNULIB_MBSNLEN''@/$(GNULIB_MBSNLEN)/g' \ -e 's/@''GNULIB_MBSCHR''@/$(GNULIB_MBSCHR)/g' \ -e 's/@''GNULIB_MBSRCHR''@/$(GNULIB_MBSRCHR)/g' \ -e 's/@''GNULIB_MBSSTR''@/$(GNULIB_MBSSTR)/g' \ -e 's/@''GNULIB_MBSCASECMP''@/$(GNULIB_MBSCASECMP)/g' \ -e 's/@''GNULIB_MBSNCASECMP''@/$(GNULIB_MBSNCASECMP)/g' \ -e 's/@''GNULIB_MBSPCASECMP''@/$(GNULIB_MBSPCASECMP)/g' \ -e 's/@''GNULIB_MBSCASESTR''@/$(GNULIB_MBSCASESTR)/g' \ -e 's/@''GNULIB_MBSCSPN''@/$(GNULIB_MBSCSPN)/g' \ -e 's/@''GNULIB_MBSPBRK''@/$(GNULIB_MBSPBRK)/g' \ -e 's/@''GNULIB_MBSSPN''@/$(GNULIB_MBSSPN)/g' \ -e 's/@''GNULIB_MBSSEP''@/$(GNULIB_MBSSEP)/g' \ -e 's/@''GNULIB_MBSTOK_R''@/$(GNULIB_MBSTOK_R)/g' \ -e 's/@''GNULIB_MEMCHR''@/$(GNULIB_MEMCHR)/g' \ -e 's/@''GNULIB_MEMMEM''@/$(GNULIB_MEMMEM)/g' \ -e 's/@''GNULIB_MEMPCPY''@/$(GNULIB_MEMPCPY)/g' \ -e 's/@''GNULIB_MEMRCHR''@/$(GNULIB_MEMRCHR)/g' \ -e 's/@''GNULIB_RAWMEMCHR''@/$(GNULIB_RAWMEMCHR)/g' \ -e 's/@''GNULIB_STPCPY''@/$(GNULIB_STPCPY)/g' \ -e 's/@''GNULIB_STPNCPY''@/$(GNULIB_STPNCPY)/g' \ -e 's/@''GNULIB_STRCHRNUL''@/$(GNULIB_STRCHRNUL)/g' \ -e 's/@''GNULIB_STRDUP''@/$(GNULIB_STRDUP)/g' \ -e 's/@''GNULIB_STRNCAT''@/$(GNULIB_STRNCAT)/g' \ -e 's/@''GNULIB_STRNDUP''@/$(GNULIB_STRNDUP)/g' \ -e 's/@''GNULIB_STRNLEN''@/$(GNULIB_STRNLEN)/g' \ -e 's/@''GNULIB_STRPBRK''@/$(GNULIB_STRPBRK)/g' \ -e 's/@''GNULIB_STRSEP''@/$(GNULIB_STRSEP)/g' \ -e 's/@''GNULIB_STRSTR''@/$(GNULIB_STRSTR)/g' \ -e 's/@''GNULIB_STRCASESTR''@/$(GNULIB_STRCASESTR)/g' \ -e 's/@''GNULIB_STRTOK_R''@/$(GNULIB_STRTOK_R)/g' \ -e 's/@''GNULIB_STRERROR''@/$(GNULIB_STRERROR)/g' \ -e 's/@''GNULIB_STRERROR_R''@/$(GNULIB_STRERROR_R)/g' \ -e 's/@''GNULIB_STRSIGNAL''@/$(GNULIB_STRSIGNAL)/g' \ -e 's/@''GNULIB_STRVERSCMP''@/$(GNULIB_STRVERSCMP)/g' \ < $(srcdir)/string.in.h | \ sed -e 's|@''HAVE_FFSL''@|$(HAVE_FFSL)|g' \ -e 's|@''HAVE_FFSLL''@|$(HAVE_FFSLL)|g' \ -e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|g' \ -e 's|@''HAVE_MEMCHR''@|$(HAVE_MEMCHR)|g' \ -e 's|@''HAVE_DECL_MEMMEM''@|$(HAVE_DECL_MEMMEM)|g' \ -e 's|@''HAVE_MEMPCPY''@|$(HAVE_MEMPCPY)|g' \ -e 's|@''HAVE_DECL_MEMRCHR''@|$(HAVE_DECL_MEMRCHR)|g' \ -e 's|@''HAVE_RAWMEMCHR''@|$(HAVE_RAWMEMCHR)|g' \ -e 's|@''HAVE_STPCPY''@|$(HAVE_STPCPY)|g' \ -e 's|@''HAVE_STPNCPY''@|$(HAVE_STPNCPY)|g' \ -e 's|@''HAVE_STRCHRNUL''@|$(HAVE_STRCHRNUL)|g' \ -e 's|@''HAVE_DECL_STRDUP''@|$(HAVE_DECL_STRDUP)|g' \ -e 's|@''HAVE_DECL_STRNDUP''@|$(HAVE_DECL_STRNDUP)|g' \ -e 's|@''HAVE_DECL_STRNLEN''@|$(HAVE_DECL_STRNLEN)|g' \ -e 's|@''HAVE_STRPBRK''@|$(HAVE_STRPBRK)|g' \ -e 's|@''HAVE_STRSEP''@|$(HAVE_STRSEP)|g' \ -e 's|@''HAVE_STRCASESTR''@|$(HAVE_STRCASESTR)|g' \ -e 's|@''HAVE_DECL_STRTOK_R''@|$(HAVE_DECL_STRTOK_R)|g' \ -e 's|@''HAVE_DECL_STRERROR_R''@|$(HAVE_DECL_STRERROR_R)|g' \ -e 's|@''HAVE_DECL_STRSIGNAL''@|$(HAVE_DECL_STRSIGNAL)|g' \ -e 's|@''HAVE_STRVERSCMP''@|$(HAVE_STRVERSCMP)|g' \ -e 's|@''REPLACE_STPNCPY''@|$(REPLACE_STPNCPY)|g' \ -e 's|@''REPLACE_MEMCHR''@|$(REPLACE_MEMCHR)|g' \ -e 's|@''REPLACE_MEMMEM''@|$(REPLACE_MEMMEM)|g' \ -e 's|@''REPLACE_STRCASESTR''@|$(REPLACE_STRCASESTR)|g' \ -e 's|@''REPLACE_STRCHRNUL''@|$(REPLACE_STRCHRNUL)|g' \ -e 's|@''REPLACE_STRDUP''@|$(REPLACE_STRDUP)|g' \ -e 's|@''REPLACE_STRSTR''@|$(REPLACE_STRSTR)|g' \ -e 's|@''REPLACE_STRERROR''@|$(REPLACE_STRERROR)|g' \ -e 's|@''REPLACE_STRERROR_R''@|$(REPLACE_STRERROR_R)|g' \ -e 's|@''REPLACE_STRNCAT''@|$(REPLACE_STRNCAT)|g' \ -e 's|@''REPLACE_STRNDUP''@|$(REPLACE_STRNDUP)|g' \ -e 's|@''REPLACE_STRNLEN''@|$(REPLACE_STRNLEN)|g' \ -e 's|@''REPLACE_STRSIGNAL''@|$(REPLACE_STRSIGNAL)|g' \ -e 's|@''REPLACE_STRTOK_R''@|$(REPLACE_STRTOK_R)|g' \ -e 's|@''UNDEFINE_STRTOK_R''@|$(UNDEFINE_STRTOK_R)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ < $(srcdir)/string.in.h; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += string.h string.h-t EXTRA_DIST += string.in.h ## end gnulib module string ## begin gnulib module sys_stat BUILT_SOURCES += sys/stat.h # We need the following in order to create <sys/stat.h> when the system # has one that is incomplete. sys/stat.h: sys_stat.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_at)$(MKDIR_P) sys $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_SYS_STAT_H''@|$(NEXT_SYS_STAT_H)|g' \ -e 's/@''GNULIB_FCHMODAT''@/$(GNULIB_FCHMODAT)/g' \ -e 's/@''GNULIB_FSTAT''@/$(GNULIB_FSTAT)/g' \ -e 's/@''GNULIB_FSTATAT''@/$(GNULIB_FSTATAT)/g' \ -e 's/@''GNULIB_FUTIMENS''@/$(GNULIB_FUTIMENS)/g' \ -e 's/@''GNULIB_LCHMOD''@/$(GNULIB_LCHMOD)/g' \ -e 's/@''GNULIB_LSTAT''@/$(GNULIB_LSTAT)/g' \ -e 's/@''GNULIB_MKDIRAT''@/$(GNULIB_MKDIRAT)/g' \ -e 's/@''GNULIB_MKFIFO''@/$(GNULIB_MKFIFO)/g' \ -e 's/@''GNULIB_MKFIFOAT''@/$(GNULIB_MKFIFOAT)/g' \ -e 's/@''GNULIB_MKNOD''@/$(GNULIB_MKNOD)/g' \ -e 's/@''GNULIB_MKNODAT''@/$(GNULIB_MKNODAT)/g' \ -e 's/@''GNULIB_STAT''@/$(GNULIB_STAT)/g' \ -e 's/@''GNULIB_UTIMENSAT''@/$(GNULIB_UTIMENSAT)/g' \ -e 's|@''HAVE_FCHMODAT''@|$(HAVE_FCHMODAT)|g' \ -e 's|@''HAVE_FSTATAT''@|$(HAVE_FSTATAT)|g' \ -e 's|@''HAVE_FUTIMENS''@|$(HAVE_FUTIMENS)|g' \ -e 's|@''HAVE_LCHMOD''@|$(HAVE_LCHMOD)|g' \ -e 's|@''HAVE_LSTAT''@|$(HAVE_LSTAT)|g' \ -e 's|@''HAVE_MKDIRAT''@|$(HAVE_MKDIRAT)|g' \ -e 's|@''HAVE_MKFIFO''@|$(HAVE_MKFIFO)|g' \ -e 's|@''HAVE_MKFIFOAT''@|$(HAVE_MKFIFOAT)|g' \ -e 's|@''HAVE_MKNOD''@|$(HAVE_MKNOD)|g' \ -e 's|@''HAVE_MKNODAT''@|$(HAVE_MKNODAT)|g' \ -e 's|@''HAVE_UTIMENSAT''@|$(HAVE_UTIMENSAT)|g' \ -e 's|@''REPLACE_FSTAT''@|$(REPLACE_FSTAT)|g' \ -e 's|@''REPLACE_FSTATAT''@|$(REPLACE_FSTATAT)|g' \ -e 's|@''REPLACE_FUTIMENS''@|$(REPLACE_FUTIMENS)|g' \ -e 's|@''REPLACE_LSTAT''@|$(REPLACE_LSTAT)|g' \ -e 's|@''REPLACE_MKDIR''@|$(REPLACE_MKDIR)|g' \ -e 's|@''REPLACE_MKFIFO''@|$(REPLACE_MKFIFO)|g' \ -e 's|@''REPLACE_MKNOD''@|$(REPLACE_MKNOD)|g' \ -e 's|@''REPLACE_STAT''@|$(REPLACE_STAT)|g' \ -e 's|@''REPLACE_UTIMENSAT''@|$(REPLACE_UTIMENSAT)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/sys_stat.in.h; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += sys/stat.h sys/stat.h-t MOSTLYCLEANDIRS += sys EXTRA_DIST += sys_stat.in.h ## end gnulib module sys_stat ## begin gnulib module time BUILT_SOURCES += time.h # We need the following in order to create <time.h> when the system # doesn't have one that works with the given compiler. time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_TIME_H''@|$(NEXT_TIME_H)|g' \ -e 's/@''GNULIB_MKTIME''@/$(GNULIB_MKTIME)/g' \ -e 's/@''GNULIB_NANOSLEEP''@/$(GNULIB_NANOSLEEP)/g' \ -e 's/@''GNULIB_STRPTIME''@/$(GNULIB_STRPTIME)/g' \ -e 's/@''GNULIB_TIMEGM''@/$(GNULIB_TIMEGM)/g' \ -e 's/@''GNULIB_TIME_R''@/$(GNULIB_TIME_R)/g' \ -e 's|@''HAVE_DECL_LOCALTIME_R''@|$(HAVE_DECL_LOCALTIME_R)|g' \ -e 's|@''HAVE_NANOSLEEP''@|$(HAVE_NANOSLEEP)|g' \ -e 's|@''HAVE_STRPTIME''@|$(HAVE_STRPTIME)|g' \ -e 's|@''HAVE_TIMEGM''@|$(HAVE_TIMEGM)|g' \ -e 's|@''REPLACE_LOCALTIME_R''@|$(REPLACE_LOCALTIME_R)|g' \ -e 's|@''REPLACE_MKTIME''@|$(REPLACE_MKTIME)|g' \ -e 's|@''REPLACE_NANOSLEEP''@|$(REPLACE_NANOSLEEP)|g' \ -e 's|@''REPLACE_TIMEGM''@|$(REPLACE_TIMEGM)|g' \ -e 's|@''PTHREAD_H_DEFINES_STRUCT_TIMESPEC''@|$(PTHREAD_H_DEFINES_STRUCT_TIMESPEC)|g' \ -e 's|@''SYS_TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(SYS_TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \ -e 's|@''TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/time.in.h; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += time.h time.h-t EXTRA_DIST += time.in.h ## end gnulib module time ## begin gnulib module unistd BUILT_SOURCES += unistd.h # We need the following in order to create an empty placeholder for # <unistd.h> when the system doesn't have one. unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_UNISTD_H''@|$(NEXT_UNISTD_H)|g' \ -e 's/@''GNULIB_CHDIR''@/$(GNULIB_CHDIR)/g' \ -e 's/@''GNULIB_CHOWN''@/$(GNULIB_CHOWN)/g' \ -e 's/@''GNULIB_CLOSE''@/$(GNULIB_CLOSE)/g' \ -e 's/@''GNULIB_DUP''@/$(GNULIB_DUP)/g' \ -e 's/@''GNULIB_DUP2''@/$(GNULIB_DUP2)/g' \ -e 's/@''GNULIB_DUP3''@/$(GNULIB_DUP3)/g' \ -e 's/@''GNULIB_ENVIRON''@/$(GNULIB_ENVIRON)/g' \ -e 's/@''GNULIB_EUIDACCESS''@/$(GNULIB_EUIDACCESS)/g' \ -e 's/@''GNULIB_FACCESSAT''@/$(GNULIB_FACCESSAT)/g' \ -e 's/@''GNULIB_FCHDIR''@/$(GNULIB_FCHDIR)/g' \ -e 's/@''GNULIB_FCHOWNAT''@/$(GNULIB_FCHOWNAT)/g' \ -e 's/@''GNULIB_FDATASYNC''@/$(GNULIB_FDATASYNC)/g' \ -e 's/@''GNULIB_FSYNC''@/$(GNULIB_FSYNC)/g' \ -e 's/@''GNULIB_FTRUNCATE''@/$(GNULIB_FTRUNCATE)/g' \ -e 's/@''GNULIB_GETCWD''@/$(GNULIB_GETCWD)/g' \ -e 's/@''GNULIB_GETDOMAINNAME''@/$(GNULIB_GETDOMAINNAME)/g' \ -e 's/@''GNULIB_GETDTABLESIZE''@/$(GNULIB_GETDTABLESIZE)/g' \ -e 's/@''GNULIB_GETGROUPS''@/$(GNULIB_GETGROUPS)/g' \ -e 's/@''GNULIB_GETHOSTNAME''@/$(GNULIB_GETHOSTNAME)/g' \ -e 's/@''GNULIB_GETLOGIN''@/$(GNULIB_GETLOGIN)/g' \ -e 's/@''GNULIB_GETLOGIN_R''@/$(GNULIB_GETLOGIN_R)/g' \ -e 's/@''GNULIB_GETPAGESIZE''@/$(GNULIB_GETPAGESIZE)/g' \ -e 's/@''GNULIB_GETUSERSHELL''@/$(GNULIB_GETUSERSHELL)/g' \ -e 's/@''GNULIB_GROUP_MEMBER''@/$(GNULIB_GROUP_MEMBER)/g' \ -e 's/@''GNULIB_LCHOWN''@/$(GNULIB_LCHOWN)/g' \ -e 's/@''GNULIB_LINK''@/$(GNULIB_LINK)/g' \ -e 's/@''GNULIB_LINKAT''@/$(GNULIB_LINKAT)/g' \ -e 's/@''GNULIB_LSEEK''@/$(GNULIB_LSEEK)/g' \ -e 's/@''GNULIB_PIPE''@/$(GNULIB_PIPE)/g' \ -e 's/@''GNULIB_PIPE2''@/$(GNULIB_PIPE2)/g' \ -e 's/@''GNULIB_PREAD''@/$(GNULIB_PREAD)/g' \ -e 's/@''GNULIB_PWRITE''@/$(GNULIB_PWRITE)/g' \ -e 's/@''GNULIB_READ''@/$(GNULIB_READ)/g' \ -e 's/@''GNULIB_READLINK''@/$(GNULIB_READLINK)/g' \ -e 's/@''GNULIB_READLINKAT''@/$(GNULIB_READLINKAT)/g' \ -e 's/@''GNULIB_RMDIR''@/$(GNULIB_RMDIR)/g' \ -e 's/@''GNULIB_SETHOSTNAME''@/$(GNULIB_SETHOSTNAME)/g' \ -e 's/@''GNULIB_SLEEP''@/$(GNULIB_SLEEP)/g' \ -e 's/@''GNULIB_SYMLINK''@/$(GNULIB_SYMLINK)/g' \ -e 's/@''GNULIB_SYMLINKAT''@/$(GNULIB_SYMLINKAT)/g' \ -e 's/@''GNULIB_TTYNAME_R''@/$(GNULIB_TTYNAME_R)/g' \ -e 's/@''GNULIB_UNISTD_H_GETOPT''@/0$(GNULIB_GL_UNISTD_H_GETOPT)/g' \ -e 's/@''GNULIB_UNISTD_H_NONBLOCKING''@/$(GNULIB_UNISTD_H_NONBLOCKING)/g' \ -e 's/@''GNULIB_UNISTD_H_SIGPIPE''@/$(GNULIB_UNISTD_H_SIGPIPE)/g' \ -e 's/@''GNULIB_UNLINK''@/$(GNULIB_UNLINK)/g' \ -e 's/@''GNULIB_UNLINKAT''@/$(GNULIB_UNLINKAT)/g' \ -e 's/@''GNULIB_USLEEP''@/$(GNULIB_USLEEP)/g' \ -e 's/@''GNULIB_WRITE''@/$(GNULIB_WRITE)/g' \ < $(srcdir)/unistd.in.h | \ sed -e 's|@''HAVE_CHOWN''@|$(HAVE_CHOWN)|g' \ -e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \ -e 's|@''HAVE_DUP3''@|$(HAVE_DUP3)|g' \ -e 's|@''HAVE_EUIDACCESS''@|$(HAVE_EUIDACCESS)|g' \ -e 's|@''HAVE_FACCESSAT''@|$(HAVE_FACCESSAT)|g' \ -e 's|@''HAVE_FCHDIR''@|$(HAVE_FCHDIR)|g' \ -e 's|@''HAVE_FCHOWNAT''@|$(HAVE_FCHOWNAT)|g' \ -e 's|@''HAVE_FDATASYNC''@|$(HAVE_FDATASYNC)|g' \ -e 's|@''HAVE_FSYNC''@|$(HAVE_FSYNC)|g' \ -e 's|@''HAVE_FTRUNCATE''@|$(HAVE_FTRUNCATE)|g' \ -e 's|@''HAVE_GETDTABLESIZE''@|$(HAVE_GETDTABLESIZE)|g' \ -e 's|@''HAVE_GETGROUPS''@|$(HAVE_GETGROUPS)|g' \ -e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \ -e 's|@''HAVE_GETLOGIN''@|$(HAVE_GETLOGIN)|g' \ -e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \ -e 's|@''HAVE_GROUP_MEMBER''@|$(HAVE_GROUP_MEMBER)|g' \ -e 's|@''HAVE_LCHOWN''@|$(HAVE_LCHOWN)|g' \ -e 's|@''HAVE_LINK''@|$(HAVE_LINK)|g' \ -e 's|@''HAVE_LINKAT''@|$(HAVE_LINKAT)|g' \ -e 's|@''HAVE_PIPE''@|$(HAVE_PIPE)|g' \ -e 's|@''HAVE_PIPE2''@|$(HAVE_PIPE2)|g' \ -e 's|@''HAVE_PREAD''@|$(HAVE_PREAD)|g' \ -e 's|@''HAVE_PWRITE''@|$(HAVE_PWRITE)|g' \ -e 's|@''HAVE_READLINK''@|$(HAVE_READLINK)|g' \ -e 's|@''HAVE_READLINKAT''@|$(HAVE_READLINKAT)|g' \ -e 's|@''HAVE_SETHOSTNAME''@|$(HAVE_SETHOSTNAME)|g' \ -e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \ -e 's|@''HAVE_SYMLINK''@|$(HAVE_SYMLINK)|g' \ -e 's|@''HAVE_SYMLINKAT''@|$(HAVE_SYMLINKAT)|g' \ -e 's|@''HAVE_UNLINKAT''@|$(HAVE_UNLINKAT)|g' \ -e 's|@''HAVE_USLEEP''@|$(HAVE_USLEEP)|g' \ -e 's|@''HAVE_DECL_ENVIRON''@|$(HAVE_DECL_ENVIRON)|g' \ -e 's|@''HAVE_DECL_FCHDIR''@|$(HAVE_DECL_FCHDIR)|g' \ -e 's|@''HAVE_DECL_FDATASYNC''@|$(HAVE_DECL_FDATASYNC)|g' \ -e 's|@''HAVE_DECL_GETDOMAINNAME''@|$(HAVE_DECL_GETDOMAINNAME)|g' \ -e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \ -e 's|@''HAVE_DECL_GETPAGESIZE''@|$(HAVE_DECL_GETPAGESIZE)|g' \ -e 's|@''HAVE_DECL_GETUSERSHELL''@|$(HAVE_DECL_GETUSERSHELL)|g' \ -e 's|@''HAVE_DECL_SETHOSTNAME''@|$(HAVE_DECL_SETHOSTNAME)|g' \ -e 's|@''HAVE_DECL_TTYNAME_R''@|$(HAVE_DECL_TTYNAME_R)|g' \ -e 's|@''HAVE_OS_H''@|$(HAVE_OS_H)|g' \ -e 's|@''HAVE_SYS_PARAM_H''@|$(HAVE_SYS_PARAM_H)|g' \ | \ sed -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \ -e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \ -e 's|@''REPLACE_DUP''@|$(REPLACE_DUP)|g' \ -e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \ -e 's|@''REPLACE_FCHOWNAT''@|$(REPLACE_FCHOWNAT)|g' \ -e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \ -e 's|@''REPLACE_GETDOMAINNAME''@|$(REPLACE_GETDOMAINNAME)|g' \ -e 's|@''REPLACE_GETLOGIN_R''@|$(REPLACE_GETLOGIN_R)|g' \ -e 's|@''REPLACE_GETGROUPS''@|$(REPLACE_GETGROUPS)|g' \ -e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \ -e 's|@''REPLACE_LCHOWN''@|$(REPLACE_LCHOWN)|g' \ -e 's|@''REPLACE_LINK''@|$(REPLACE_LINK)|g' \ -e 's|@''REPLACE_LINKAT''@|$(REPLACE_LINKAT)|g' \ -e 's|@''REPLACE_LSEEK''@|$(REPLACE_LSEEK)|g' \ -e 's|@''REPLACE_PREAD''@|$(REPLACE_PREAD)|g' \ -e 's|@''REPLACE_PWRITE''@|$(REPLACE_PWRITE)|g' \ -e 's|@''REPLACE_READ''@|$(REPLACE_READ)|g' \ -e 's|@''REPLACE_READLINK''@|$(REPLACE_READLINK)|g' \ -e 's|@''REPLACE_RMDIR''@|$(REPLACE_RMDIR)|g' \ -e 's|@''REPLACE_SLEEP''@|$(REPLACE_SLEEP)|g' \ -e 's|@''REPLACE_SYMLINK''@|$(REPLACE_SYMLINK)|g' \ -e 's|@''REPLACE_TTYNAME_R''@|$(REPLACE_TTYNAME_R)|g' \ -e 's|@''REPLACE_UNLINK''@|$(REPLACE_UNLINK)|g' \ -e 's|@''REPLACE_UNLINKAT''@|$(REPLACE_UNLINKAT)|g' \ -e 's|@''REPLACE_USLEEP''@|$(REPLACE_USLEEP)|g' \ -e 's|@''REPLACE_WRITE''@|$(REPLACE_WRITE)|g' \ -e 's|@''UNISTD_H_HAVE_WINSOCK2_H''@|$(UNISTD_H_HAVE_WINSOCK2_H)|g' \ -e 's|@''UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS''@|$(UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ } > $@-t && \ mv $@-t $@ MOSTLYCLEANFILES += unistd.h unistd.h-t EXTRA_DIST += unistd.in.h ## end gnulib module unistd mostlyclean-local: mostlyclean-generic @for dir in '' $(MOSTLYCLEANDIRS); do \ if test -n "$$dir" && test -d $$dir; then \ echo "rmdir $$dir"; rmdir $$dir; \ fi; \ done; \ : ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/�������������������������������������������������������������������������0000775�0001750�0001750�00000000000�11676051672�012573� 5����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/cobol.lang���������������������������������������������������������������0000644�0001750�0001750�00000006176�11672675564�014474� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Cobol language definition # to be tested, I don't know anything about cobol comment start '^[[:blank:]]*\*' keyword = "accept|access|add|advancing|after|all|alphabet|alphabetic|alphabetic-lower|alphabetic-upper", "alphanumeric|alphanumeric-edited|also|alter|alternate|and|any|are|area|areas|ascending|assign|at|author", "before|binary|blank|block|bottom|by|call|cancel|cd|cf|ch|character|characters|class|clock-units", "close|cobol|code|code-set|collating|column|comma|common|communication|comp|comp-0|comp-1|comp-2|comp-3", "comp-4|comp-5|comp-6|comp-x|computational|computational-0|computational-1|computational-2|computational-3", "computational-4|computational-5|computational-6|computational-x|compute|configuration|contains|content|continue", "control|control-area|controls|converting|copy|corr|corresponding|count|currency|data|date|date-compiled", "date-written|day|day-of-week|de|debug-contents|debug-item|debug-line|debug-name|debug-sub-1|debug-sub-2|debug-sub-3", "debugging|decimal-point|declaratives|delete|delimited|delimiter|depending|descending|destination|detail|disable", "display|divide|division|down|duplicates|dynamic|egi|else|emi|enable|end|end-add|end-call|end-compute|end-delete", "end-divide|end-evaluate|end-if|end-multiply|end-of-page|end-perform|end-read|end-receive|end-return|end-rewrite", "end-search|end-start|end-string|end-subtract|end-unstring|end-write|enter|environment|eop|equal|error", "esi|evaluate|every|exception|exit|extend|external|false|fd|file|file-control|filler|final|first", "footing|for|from|function|generate|giving|global|go|greater|group|heading|high-value|high-values|i-o|i-o-control", "identification|if|in|index|indexed|indicate|initial|initialize|initiate|input|input-output|inspect|installation", "into|invalid|just|justified|key|label|last|leading|left|length|less|limit|limits|linage|linage-counter", "line|line-counter|lines|linkage|lock|low-value|low-values|memory|merge|message|mode|modules|more-labels", "move|multiple|multiply|native|negative|next|no|notnumber|numeric|numeric-edited|object-computer|occurs", "of|off|omitted|on|open|optional|or|order|organization|other|output|overflow|packed-decimal|padding|page", "page-counter|perform|pf|ph|pic|picture|plus|pointer|position|positiveprinting|procedure|procedures|proceed|program-id|program|purge|queue|quote|quotes|random|rd|read|receive|record|records|redefines|reel|reference|references|relative|release|remainder|removal|renames|replace|replacing|report|reporting|reports|rerun|reserve|returnreversed|rewind|rewrite|rf|rh|right|rounded|run|same|sd|search|section|security|segment|segment-limit|select|send|sentence|separate|sequence|sequential|set|sign|size|sort|sort-mergesource|source-computer|space|spaces|special-names|standard|standard-1|standard-2|start|status|stop|string|sub-queue-1|sub-queue-2|sub-queue-3|subtract|sum|super|suppress|symbolic|sync|synchronized|tallying|tape|terminal|terminate|test|text|than|then|through|thru|time|times|to|top|trailing|true|type|unit|unstring|until|up|upon|usage|useusing|value|valuesvarying|whenwith|words|working-storage|write|zerozeroes|zeros" nonsensitive include "symbols.lang" include "c_string.lang" include "number.lang"��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/log.lang�����������������������������������������������������������������0000644�0001750�0001750�00000003242�11672675565�014147� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������vardef basic_time = '[[:digit:]]{2}:[[:digit:]]{2}:[[:digit:]]{2}' vardef time = '\<' + $basic_time + '\>' vardef ip = '[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}\>' vardef non_empty = '[^[:blank:]]+' state date start '^[[:alpha:]]{3}[[:blank:]]{1,2}[[:digit:]]{1,2}(?=[[:blank:]]' + $basic_time + ')' begin state time start $time begin state symbol start $non_empty begin normal = ":" exitall function = '[^:\(\[]+' number delim "[" "]" number delim "(" ")" end end end state ip start '^' + $ip begin string = '[[:alnum:]]+(?=[[:blank:]]\[[[:digit:]]{2}/[[:alpha:]]{3}/[[:digit:]]{4})' date = '[[:digit:]]{2}/[[:alpha:]]{3}/[[:digit:]]{4}(?=:' + $basic_time + ')' time = $basic_time + '[[:blank:]][+-][[:digit:]]{4}' twonumbers = '[1-5][[:digit:]]{2}[[:blank:]][-0-9]+' state webmethod = "OPTIONS|GET|HEAD|POST|PUT|DELETE|TRACE|CONNECT|PROPFIND|MKCOL|COPY|MOVE|LOCK|UNLOCK" begin string = $non_empty exit end end vardef weekday_date = '\[[[:alpha:]]{3}[[:blank:]][[:alpha:]]{3}[[:blank:]]{1,2}[[:digit:]]{1,2}[[:blank:]](?=' + $basic_time + ')' state date start '^' + $weekday_date begin time = $time date = '[[:digit:]]{4}\]' date = $weekday_date string = "[error]" comment = "[notice]" ip = $ip end ip = $ip string = "root","failure" (normal,port) = `((?:port|pid)[[:blank:]])([[:digit:]]+)` state normal start '[[:blank:]](?=(IN|OUT)=)' begin state normal = '(IN|OUT|PROTO)=(?=[^[:blank:]]+)' begin string = $non_empty exit end state normal = '(SPT|DPT|TYPE|SEQ)=(?=[^[:blank:]]+)' begin cbracket = $non_empty exit end number = "CWR|ECE|URG|ACK|PSH|RST|SYN|FIN" ip = $ip end��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/tml_macrolinks.lang������������������������������������������������������0000664�0001750�0001750�00000000724�11672675565�016410� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# [[Wiki][Links]] inside %MACRO{"arguments"}% - Eg. # %MACRO{"[[Wiki][Link $token(token-arg) %X%]]"}% environment url delim "[[" "]]" begin keyword = $MACRO environment keyword delim $MACROSTART $MACROEND multiline nested begin keyword = $MACRO attribute = $MACROATTR environment string delim "\"" "\"" escape "\\" multiline begin include "tml_formatting_all.lang" end end include "tml_macrotokens.lang" end ��������������������������������������������source-highlight-3.1.6/src/cmdline.ggo��������������������������������������������������������������0000644�0001750�0001750�00000016161�11672675564�014637� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Copyright (C) 1999-2007 Lorenzo Bettini, http://www.lorenzobettini.it # This file is used by gengetopt to generate a command line args parser # GNU gengetopt can be found at # http://www.gnu.org/software/gengetopt purpose "Highlight the syntax of a source file (e.g. Java) into a specific format (e.g. HTML)" usage " [OPTIONS]... < input_file > output_file\n source-highlight [OPTIONS]... -i input_file -o output_file\n source-highlight [OPTIONS]... [FILES]..." # Options option "input" i "input file. default std input" string typestr="filename" no option "output" o "output file. default std output (when the third invocation form is used). If STDOUT is specified, the output is directed to standard output" string typestr="filename" no text " you can simply specify some files at the command line and \ also use regular expressions (for instance \ *.java). In this case the name for the output files \ will be formed using the name of the source file with \ a .<ext> appended, where \ <ext> is the extension chosen according to the output format specified \ (for instance .html). " option "src-lang" s "source language (use --lang-list to get the complete list). If not specified, the source language will be guessed from the file extension." string no option "lang-list" - "list all the supported language and associated language definition file" no option "outlang-list" - "list all the supported output language and associated language definition file" no option "out-format" f "output format (use --outlang-list to get the complete list)" string default="html" no option "doc" d "create an output file that can be used as a stand alone document (e.g., not to be included in another one)" no option "no-doc" - "cancel the --doc option even if it is implied (e.g., when css is given)" no option "css" c "the external style sheet filename. Implies --doc" string typestr="filename" no option "title" T "give a title to the output document. Implies --doc" string no option "tab" t "specify tab length." int default="8" no option "header" H "file to insert as header" string typestr="filename" no option "footer" F "file to insert as footer" string typestr="filename" no option "style-file" - "specify the file containing format options" string typestr="filename" default="default.style" optional option "style-css-file" - "specify the file containing format options (in css syntax)" string typestr="filename" optional option "style-defaults" - "specify the file containing defaults for format options" string typestr="filename" default="style.defaults" optional option "outlang-def" - "output language definition file" string typestr="filename" no option "outlang-map" - "output language map file" string typestr="filename" default="outlang.map" no option "data-dir" - "directory where language definition files and language maps are searched for. If not specified these files are searched for in the current directory and in the data dir installation directory" string typestr="path" no option "output-dir" - "output directory" string typestr="path" no option "lang-def" - "language definition file" string typestr="filename" no option "lang-map" - "language map file" string typestr="filename" default="lang.map" no option "show-lang-elements" - "prints the language elements that are defined in the language definition file" optional string typestr="filename" option "infer-lang" - "force to infer source script language (overriding given language specification)" optional section "Lines" option "line-number" n "number all output lines, using the specified padding character" string typestr="padding" default="0" no argoptional option "line-number-ref" - "number all output lines and generate an anchor, made of the specified prefix + the line number" string typestr="prefix" default="line" no argoptional section "Filtering output" defmode "linerange" modedesc="specifying line ranges" defmode "regexrange" modedesc="specifying regular expression delimited ranges" modeoption "line-range" - "generate only the lines in the specified range(s)" details="each range can be of the shape: single line (e.g., --line-range=50) full range (e.g., --line-range=2-10) partial range (e.g., --line-range=-30, first 30 lines, --line-range=40- from line 40 to the end " string multiple optional mode="linerange" modeoption "range-separator" - "the optional separator to be printed among ranges (e.g., \"...\")" string optional dependon="line-range" mode="linerange" modeoption "range-context" - "number of (context) lines generated even if not in range" int optional details="The optional --range-context specifies the number of lines that are not in range that will be printed anyway (before and after the lines in range); These lines will be formatted according to the \"context\" style. " dependon="line-range" mode="linerange" modeoption "regex-range" - "generate only the lines within the specified regular expressions" details="when a line containing the specified regular expression is found, then the lines after this one are actually generated, until another line, containing the same regular expression is found (this last line is not generated). More than one regular expression can be specified." string multiple optional mode="regexrange" section "reference generation" option "gen-references" - "generate references" values="inline","postline","postdoc" default="inline" no option "ctags-file" - "specify the file generated by ctags that will be used to generate references" string typestr="filename" default="tags" no option "ctags" - "how to run the ctags command. If this option is not specified, ctags will be executed with the default value. If it is specified with an empty string, ctags will not be executed at all" string typestr="cmd" default="ctags --excmd=n --tag-relative=yes" no section "testing" option "verbose" v "verbose mode on" optional option "quiet" q "print no progress information" optional option "binary-output" - "write output files in binary mode" optional details="This is useful for testing purposes, since you may want to make sure that output files are always generated with a final newline character only" option "statistics" - "print some statistics (i.e., elapsed time)" optional option "gen-version" - "put source-highlight version in the generated file" flag on option "check-lang" - "only check the correctness of a language definition file" string typestr="filename" no option "check-outlang" - "only check the correctness of an output language definition file" string typestr="filename" no option "failsafe" - "if no language definition is found for the input, it is simply copied to the output" no option "debug-langdef" g "debug a language definition. In dump mode just dumps all the steps; in interactive, at each step, waits for some input (press ENTER to step)" optional argoptional values="interactive","dump" default="dump" typestr="type" option "show-regex" - "show the regular expression automaton corresponding to a language definition file" string typestr="filename" no ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/texinfo.style������������������������������������������������������������0000644�0001750�0001750�00000000355�11672675565�015263� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������keyword, type b ; variable f, i ; string f ; regexp f ; comment nf, i, noref ; preproc b ; // line numbers linenum f; // Internet related url f; // for diffs oldfile, newfile i; difflines b; // for css selector, property b; value i;�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/tml.lang�����������������������������������������������������������������0000664�0001750�0001750�00000001771�11672675565�014171� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# T/Foswiki "Topic Markup Language" - TML # Author: Paul.W.Harvey@csiro.au # # This is a wiki markup language with the usual text formatting capabilities, # but has an added challenge: it features an "inside-out, left-to-right" text- # replacement macro capability. This is exploited in weird and wonderful ways, # such as writing macro expressions that emit other macro expressions (sometimes # recursively). See http://foswiki.org/System/Macros#InsideOutLeftToRight # # This first attempt has resulted in a spaghetti-esque pile of tml_*.lang files, # a better solution would be very welcome. It does up to three levels of # %MACROS{"%within{"%macros%"}%"}%, & the same for the $percntDELAYED equivalent. # Foswiki itself does 16 levels. # * Set = statements (normal, preproc, preproc, normal, keyword, normal, normal) = `(^\t+|^ {3}|^ {6}|^ {9}|^ {12})(\*[[:blank:]]+)(Set|Local)([[:space:]]+)([^=]+)([[:blank:]])(=)` preproc = '<nop>' include "tml_macros.lang" include "tml_formatting.lang" include "html.lang" �������source-highlight-3.1.6/src/c_comment.lang�����������������������������������������������������������0000644�0001750�0001750�00000001011�11672675564�015321� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# c_comment.lang # comments with documentation tags environment comment start "///" begin include "url.lang" include "html_simple.lang" type = '@[[:alpha:]]+' include "todo.lang" end comment start "//" # comments with documentation tags environment comment delim "/**" "*/" multiline begin include "url.lang" include "html_simple.lang" type = '@[[:alpha:]]+' include "todo.lang" end # standard comments environment comment delim "/*" "*/" multiline begin include "url.lang" include "todo.lang" end�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/sh.lang������������������������������������������������������������������0000644�0001750�0001750�00000002510�11672675565�013775� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������preproc = "import" #number = '(?<=-)([[:digit:]]+)' include "number.lang" normal = '\\"' normal = '\\\'' include "c_string.lang" function = 'function[[:blank:]]+([[:alpha:]]|_)[[:word:]]*[[:blank:]]*(\(\))?' function = '([[:alpha:]]|_)[[:word:]]*[[:blank:]]*\(\)' # avoids, in things such as --bind, that words are highlighted as keywords normal = '([[:alpha:]]*[-/]+[[:alpha:]]+)+' keyword = "alias|bg|bind|break|builtin|caller|case|command|compgen", "complete|continue|declare|dirs|disown|do|done|elif|else|enable", "esac|eval|exec|exit|export|false|fc|fg|fi|for|getopts|hash|help", "history|if|in|jobs|let|local|logout|popd|printf|pushd|read", "readonly|return|select|set|shift|shopt|source|suspend|test|then", "times|trap|true|type|typeset|umask|unalias|unset|until|wait|while" # it is considered a variable if there's a =, which is discarded anyway variable = '([[:alpha:]]|_)[[:word:]]*(?==)' variable = '\$\{([^[:blank:]]+)\}' variable = '\$\(([^[:blank:]]+)\)' variable = '\$([[:alpha:]]|_)[[:word:]]*' variable = '\$([^[:blank:]]{1})' # notice that - is not a symbol since it can be used in command line parameters symbol = "~","!","%","^","*","(",")","+","=","[", "]","\\",":",";",",",".","/","?","&","<",">","\|","%%" symbol = '(##){2}(?!#)' include "script_comment.lang" ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/asm.lang�����������������������������������������������������������������0000644�0001750�0001750�00000005024�11672675564�014145� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# language definition file for assembler comment start ";" include "c_string.lang" preproc = '^[[:blank:]]*\.([[:alnum:]]+)' preproc = '^[[:blank:]]*([[:alnum:]]+):' keyword = "aaa|aad|aam|aas|adc|add|and|arpl", "bound|bsf|bsr|bswap|bt|btc|btr|bts", "call|cbw|cdq|clc", "cld|cli|clts|cmc|cmp|cmps|cmpsb|cmpsd|cmpsw|cmpxchg|cwd|cwde", "daa|das|dec|div", "enter|esc", "f2xm1|fabs|fadd|faddp|fbld|fbstp|fchs|fclex|fcom|fcomp", "fcompp|fcos|fdecstp|fdisi|fdiv|fdivp|fdivr|fdivrp|feni", "ffree|fiadd|ficom|ficomp|fidiv|fidivr|fild|fimul|fincstp", "finit|fist|fistp|fisub|fisubr|fld|fld1", "fldcw|fldenv|fldl2e|fldl2t|fldlg2|fldln2|fldpi|fldz|fmul|fmulp", "fnclex|fndisi|fneni|fninit|fnop", "fnsave|fnstcw|fnstenv|fnstsw|fpatan|fprem|fprem1", "fptan|frndint|frstor|fsave|fscale|fsetpm|fsin", "fsincos|fsqrt|fst|fstcw|fstenv|fstp|fstsw|fsub|fsubp", "fsubr|fsubrp|ftst|fucom|fucomp|fucompp|fwait", "fxam|fxch|fxtract|fyl2x|fyl2xp1", "hlt", "idiv|imul|in|inc|insb|insd|insw|int|into|invd|invlpg|iret|iretd", "ja|jae|jb|jbe|jc|jcxz|je|jecxz|jg|jge|jl|jle|jmp|jna|jnae|jnb|jnbe", "jnc|jne|jng|jnge|jnl|jnle|jno|jnp|jns|jnz|jo|jp|jpe|jpo|js|jz", "lahf|lar|lds|lea|leave|les|lfs|lgdt|lgs|lidt|lldt|lmsw|lock|lods", "lodsb|lodsd|lodsw|loop|loopd|loopde|loopdne|loopdnz|loopdz|loope", "loopne|loopnz|loopz|lsl|lss|ltr", "mov|movs|movsb|movsd|movsw|movsx|movzx|mul|mod", "neg|nop|not", "or|out|outsb|outsd|outsw|offset", "pop|popa|popad|popf|popfd|push|pusha|pushad|pushf|pushfd|ptr", "rcl|rcr|rep|repe|repne|repnz|repz|ret|retf|retn|rol|ror", "sahf|sal|sar|sbb|scas|scasb|scasd|scasw|segcs|segds|seges", "segfs|seggs|segss|seta|setae|setb|setbe", "setc|sete|setg|setge|setl|setle|setna|setnae|setnb|setnbe", "setnc|setne|setng|setnge|setnl|setnle", "setno|setnp|setns|setnz|seto|setp|setpe|setpo|sets", "setz|sgdt|shl|shld|shr|shrd|sidt|sldt|smsw|stc", "std|sti|stos|stosb|stosd|stosw|str|sub", "test|type", "verr|verw", "wait|wbinvd|xadd|xchg|xlat|xor", "assume|comment|db|dd|dq|dt|dw|end|endm|endp|ends", "eq|equ|exitm|ex|trn|far|ge|group|gt|include|label|large", "le|length|local|lt|macro|mask|name|near|org|page", "proc|public|purge|record|rept|seg|segment|short", "size|small|struc|subttl|symtype|this|title|width" nonsensitive variable = "ah|al|ax|bh|bl|bp|bx|ch|cl|cs|cx|dh|di|dl|ds", "dx|eax|ebp|ebx|ecx|edi|edx", "eip|es|esi|esp|fs|gs|shl|shr|si|sp|ss|st" nonsensitive type = "byte|dword|high|low|qword|tbyte|word" number = '0([0-9a-fA-F]+)([hHlLuU]*)' number = '((?:0x|0X)[0-9a-fA-F]+|\d*[\.\_]?\d+(?:[eE][\-\+]\d+)?[hHlLuU]*)' include "symbols.lang" include "number.lang"������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/lang.map�����������������������������������������������������������������0000644�0001750�0001750�00000005255�11672675565�014151� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������java = java.lang moc = cpp.lang cpp = cpp.lang c = c.lang C = cpp.lang cc = cpp.lang cs = csharp.lang csharp = csharp.lang h = cpp.lang hh = cpp.lang H = cpp.lang hpp = cpp.lang javascript = javascript.lang js = javascript.lang prolog = prolog.lang pl = prolog.lang perl = perl.lang pm = perl.lang php3 = php.lang php4 = php.lang php5 = php.lang php = php.lang ctp = php.lang protobuf = proto.lang proto = proto.lang python = python.lang py = python.lang ruby = ruby.lang rb = ruby.lang flex = flex.lang lex = flex.lang l = flex.lang ll = flex.lang bison = bison.lang yacc = bison.lang y = bison.lang yy = bison.lang changelog = changelog.lang lua = lua.lang ml = caml.lang caml = caml.lang mli = caml.lang sml = sml.lang sig = sml.lang syslog = log.lang log = log.lang pas = pascal.lang pascal = pascal.lang fortran = fortran.lang free-fortran = fortran.lang fixed-fortran = fixed-fortran.lang html = html.lang htm = html.lang tex = latex.lang latex = latex.lang cls = latex.lang sty = latex.lang dtx = latex.lang lgt = logtalk.lang logtalk = logtalk.lang diff = diff.lang patch = diff.lang lang = langdef.lang langdef = langdef.lang outlang = outlang.lang style = style.lang ps = postscript.lang eps = postscript.lang postscript = postscript.lang kcfg = xml.lang ui = xml.lang kdevelop = xml.lang rc = xml.lang docbook = xml.lang kidl = xml.lang xml = xml.lang xhtml = xml.lang bash = sh.lang sh = sh.lang csh = sh.lang ksh = sh.lang tcsh = sh.lang shell = sh.lang tcl = tcl.lang tk = tcl.lang txt = nohilite.lang sql = sql.lang bib = bib.lang makefile = makefile.lang am = makefile.lang in = makefile.lang css = css.lang m4 = m4.lang ac = m4.lang autoconf = m4.lang sl = slang.lang slsh = slang.lang slang = slang.lang properties = properties.lang desktop = desktop.lang ini = desktop.lang conf = conf.lang lsm = lsm.lang spec = spec.lang haxe = haxe.lang hx = haxe.lang ldap = ldap.lang ldif = ldap.lang glsl = glsl.lang xorg = xorg.lang scala = scala.lang ada = ada.lang adb = ada.lang pc = pc.lang pkgconfig = pc.lang oz = oz.lang texinfo = texinfo.lang texi = texinfo.lang hs = haskell.lang hs = haskell.lang lhs = haskell_literate.lang haskell = haskell.lang manifest = manifest.lang mf = manifest.lang asm = asm.lang s = asm.lang applescript = applescript.lang scpt = applescript.lang vbscript = vbscript.lang vbs = vbscript.lang awk = awk.lang bat = bat.lang batch = bat.lang clipper = clipper.lang prg = clipper.lang cbl = cobol.lang cobol = cobol.lang dmd = d.lang d = d.lang errors = errors.lang erl = erlang.lang erlang = erlang.lang vala = vala.lang lisp = lisp.lang el = lisp.lang scm = scheme.lang scheme = scheme.lang po = po.lang pot = po.lang opa = opa.lang javalog = javalog.lang upc = upc.lang tml = tml.lang���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/outlang.lang�������������������������������������������������������������0000644�0001750�0001750�00000000763�11672675565�015044� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# this is the language definition for the # language definition syntax itself comment start "#" preproc = "include" string delim "\"" "\"" escape "\\" multiline string delim "'" "'" escape "\\" multiline keyword = "nodoctemplate|doctemplate|styletemplate|styleseparator|bold|italics", "underline|notfixed|fixed|colormap|color|default|onestyle", "extension|anchor|inline_reference|postline_reference", "postdoc_reference|reference|lineprefix|translations|begin|end" symbol = "=|+|," �������������source-highlight-3.1.6/src/check-regexp_cmd.c�������������������������������������������������������0000644�0001750�0001750�00000022054�11675323762�016051� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* File autogenerated by gengetopt version 2.22.6 generated with the following command: /home/bettini/usr/local/bin/gengetopt --input ../../src/check-regexp_cmd.ggo --unamed-opts -F check-regexp_cmd --output-dir=../../src The developers of gengetopt consider the fixed text that goes in all gengetopt output files to be in the public domain: we make no copyright claims on it. */ /* If we use autoconf. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include <stdio.h> #include <stdlib.h> #include <string.h> #ifndef FIX_UNUSED #define FIX_UNUSED(X) (void) (X) /* avoid warnings for unused params */ #endif #include <getopt.h> #include "check-regexp_cmd.h" const char *gengetopt_args_info_purpose = "Tries to match the regular expression passed as the first argument\nagainst the strings passed as remaining arguments"; const char *gengetopt_args_info_usage = "Usage: check-regexp 'regular expression' 'string1' 'string2' ..."; const char *gengetopt_args_info_description = ""; const char *gengetopt_args_info_help[] = { " -h, --help Print help and exit", " -V, --version Print version and exit", 0 }; typedef enum {ARG_NO } cmdline_parser_arg_type; static void clear_given (struct gengetopt_args_info *args_info); static void clear_args (struct gengetopt_args_info *args_info); static int cmdline_parser_internal (int argc, char **argv, struct gengetopt_args_info *args_info, struct cmdline_parser_params *params, const char *additional_error); static char * gengetopt_strdup (const char *s); static void clear_given (struct gengetopt_args_info *args_info) { args_info->help_given = 0 ; args_info->version_given = 0 ; } static void clear_args (struct gengetopt_args_info *args_info) { FIX_UNUSED (args_info); } static void init_args_info(struct gengetopt_args_info *args_info) { args_info->help_help = gengetopt_args_info_help[0] ; args_info->version_help = gengetopt_args_info_help[1] ; } void cmdline_parser_print_version (void) { printf ("%s %s\n", (strlen(CMDLINE_PARSER_PACKAGE_NAME) ? CMDLINE_PARSER_PACKAGE_NAME : CMDLINE_PARSER_PACKAGE), CMDLINE_PARSER_VERSION); } static void print_help_common(void) { cmdline_parser_print_version (); if (strlen(gengetopt_args_info_purpose) > 0) printf("\n%s\n", gengetopt_args_info_purpose); if (strlen(gengetopt_args_info_usage) > 0) printf("\n%s\n", gengetopt_args_info_usage); printf("\n"); if (strlen(gengetopt_args_info_description) > 0) printf("%s\n\n", gengetopt_args_info_description); } void cmdline_parser_print_help (void) { int i = 0; print_help_common(); while (gengetopt_args_info_help[i]) printf("%s\n", gengetopt_args_info_help[i++]); } void cmdline_parser_init (struct gengetopt_args_info *args_info) { clear_given (args_info); clear_args (args_info); init_args_info (args_info); args_info->inputs = 0; args_info->inputs_num = 0; } void cmdline_parser_params_init(struct cmdline_parser_params *params) { if (params) { params->override = 0; params->initialize = 1; params->check_required = 1; params->check_ambiguity = 0; params->print_errors = 1; } } struct cmdline_parser_params * cmdline_parser_params_create(void) { struct cmdline_parser_params *params = (struct cmdline_parser_params *)malloc(sizeof(struct cmdline_parser_params)); cmdline_parser_params_init(params); return params; } static void cmdline_parser_release (struct gengetopt_args_info *args_info) { unsigned int i; for (i = 0; i < args_info->inputs_num; ++i) free (args_info->inputs [i]); if (args_info->inputs_num) free (args_info->inputs); clear_given (args_info); } static void write_into_file(FILE *outfile, const char *opt, const char *arg, const char *values[]) { FIX_UNUSED (values); if (arg) { fprintf(outfile, "%s=\"%s\"\n", opt, arg); } else { fprintf(outfile, "%s\n", opt); } } int cmdline_parser_dump(FILE *outfile, struct gengetopt_args_info *args_info) { int i = 0; if (!outfile) { fprintf (stderr, "%s: cannot dump options to stream\n", CMDLINE_PARSER_PACKAGE); return EXIT_FAILURE; } if (args_info->help_given) write_into_file(outfile, "help", 0, 0 ); if (args_info->version_given) write_into_file(outfile, "version", 0, 0 ); i = EXIT_SUCCESS; return i; } int cmdline_parser_file_save(const char *filename, struct gengetopt_args_info *args_info) { FILE *outfile; int i = 0; outfile = fopen(filename, "w"); if (!outfile) { fprintf (stderr, "%s: cannot open file for writing: %s\n", CMDLINE_PARSER_PACKAGE, filename); return EXIT_FAILURE; } i = cmdline_parser_dump(outfile, args_info); fclose (outfile); return i; } void cmdline_parser_free (struct gengetopt_args_info *args_info) { cmdline_parser_release (args_info); } /** @brief replacement of strdup, which is not standard */ char * gengetopt_strdup (const char *s) { char *result = 0; if (!s) return result; result = (char*)malloc(strlen(s) + 1); if (result == (char*)0) return (char*)0; strcpy(result, s); return result; } int cmdline_parser (int argc, char **argv, struct gengetopt_args_info *args_info) { return cmdline_parser2 (argc, argv, args_info, 0, 1, 1); } int cmdline_parser_ext (int argc, char **argv, struct gengetopt_args_info *args_info, struct cmdline_parser_params *params) { int result; result = cmdline_parser_internal (argc, argv, args_info, params, 0); if (result == EXIT_FAILURE) { cmdline_parser_free (args_info); exit (EXIT_FAILURE); } return result; } int cmdline_parser2 (int argc, char **argv, struct gengetopt_args_info *args_info, int override, int initialize, int check_required) { int result; struct cmdline_parser_params params; params.override = override; params.initialize = initialize; params.check_required = check_required; params.check_ambiguity = 0; params.print_errors = 1; result = cmdline_parser_internal (argc, argv, args_info, &params, 0); if (result == EXIT_FAILURE) { cmdline_parser_free (args_info); exit (EXIT_FAILURE); } return result; } int cmdline_parser_required (struct gengetopt_args_info *args_info, const char *prog_name) { FIX_UNUSED (args_info); FIX_UNUSED (prog_name); return EXIT_SUCCESS; } static char *package_name = 0; int cmdline_parser_internal ( int argc, char **argv, struct gengetopt_args_info *args_info, struct cmdline_parser_params *params, const char *additional_error) { int c; /* Character of the parsed option. */ int error = 0; struct gengetopt_args_info local_args_info; int override; int initialize; int check_required; int check_ambiguity; package_name = argv[0]; override = params->override; initialize = params->initialize; check_required = params->check_required; check_ambiguity = params->check_ambiguity; if (initialize) cmdline_parser_init (args_info); cmdline_parser_init (&local_args_info); optarg = 0; optind = 0; opterr = params->print_errors; optopt = '?'; while (1) { int option_index = 0; static struct option long_options[] = { { "help", 0, NULL, 'h' }, { "version", 0, NULL, 'V' }, { 0, 0, 0, 0 } }; c = getopt_long (argc, argv, "hV", long_options, &option_index); if (c == -1) break; /* Exit from `while (1)' loop. */ switch (c) { case 'h': /* Print help and exit. */ cmdline_parser_print_help (); cmdline_parser_free (&local_args_info); exit (EXIT_SUCCESS); case 'V': /* Print version and exit. */ cmdline_parser_print_version (); cmdline_parser_free (&local_args_info); exit (EXIT_SUCCESS); case 0: /* Long option with no short option */ case '?': /* Invalid option. */ /* `getopt_long' already printed an error message. */ goto failure; default: /* bug: option not considered. */ fprintf (stderr, "%s: option unknown: %c%s\n", CMDLINE_PARSER_PACKAGE, c, (additional_error ? additional_error : "")); abort (); } /* switch */ } /* while */ cmdline_parser_release (&local_args_info); if ( error ) return (EXIT_FAILURE); if (optind < argc) { int i = 0 ; int found_prog_name = 0; /* whether program name, i.e., argv[0], is in the remaining args (this may happen with some implementations of getopt, but surely not with the one included by gengetopt) */ i = optind; while (i < argc) if (argv[i++] == argv[0]) { found_prog_name = 1; break; } i = 0; args_info->inputs_num = argc - optind - found_prog_name; args_info->inputs = (char **)(malloc ((args_info->inputs_num)*sizeof(char *))) ; while (optind < argc) if (argv[optind++] != argv[0]) args_info->inputs[ i++ ] = gengetopt_strdup (argv[optind-1]) ; } return 0; failure: cmdline_parser_release (&local_args_info); return (EXIT_FAILURE); } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/latex.lang���������������������������������������������������������������0000644�0001750�0001750�00000002266�11672675565�014510� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������comment start "%" symbol = "&|~" symbol = '\\[$_&{}~^%#`\'"|[:space:]\\]' string delim "\"" "\"" escape "\\" multiline string delim "``" "''" escape "\\" multiline string delim "`" "'" escape "\\" multiline #string delim "'" "'" escape "\\" multiline math = "$$|\\[|\\]" math delim "$" "$" escape "\\" multiline state keyword start "\\textit" begin environment italics start "{" begin italics delim "{" "}" escape "\\" multiline nested italics = "}" exitall end end state keyword start "\\textbf" begin environment bold start "{" begin bold delim "{" "}" escape "\\" multiline nested bold = "}" exitall end end state keyword start "\\texttt" begin environment fixed start "{" begin fixed delim "{" "}" escape "\\" multiline nested fixed = "}" exitall end end state keyword start "\\underline" begin environment underline start "{" begin underline delim "{" "}" escape "\\" multiline nested underline = "}" exitall end end vardef command = '\\[[:alpha:]]+' keyword = $command symbol = "*" normal = '\{[[:blank:]]*\z' # a { and then a new line optionalargument delim "[" "]" escape "\\" argument delim "{" "}" escape "\\" multiline nested ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/htmlcss.outlang����������������������������������������������������������0000644�0001750�0001750�00000001030�11672675565�015564� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������include "css_common.outlang" doctemplate "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\"> <html> <head> <meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\"> <meta name=\"GENERATOR\" content=\"$additional\"> <title>$title</title> <link rel=\"stylesheet\" href=\"$css\" type=\"text/css\"> </head> <body> $header<pre><tt>" "</tt></pre> $footer</body> </html> " end nodoctemplate "<!-- Generator: $additional --> $header<pre><tt>" "</tt></pre>$footer " end ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/extreme_comment3.lang����������������������������������������������������0000644�0001750�0001750�00000000531�11672675564�016641� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# treat the preprocess statement # #if 0 # ... # #else # as a comment environment comment = '^[[:blank:]]*#[[:blank:]]*if[[:blank:]]+0' begin comment start '^[[:blank:]]*#[[:blank:]]*else' exit comment delim '^[[:blank:]]*#[[:blank:]]*if' '^[[:blank:]]*#[[:blank:]]*endif' multiline nested end include "cpp.lang" �����������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/sql.lang�����������������������������������������������������������������0000644�0001750�0001750�00000002577�11672675565�014177� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������type = "VARCHAR|TINYINT|TEXT|DATE|SMALLINT|MEDIUMINT|INT|BIGINT", "FLOAT|DOUBLE|DECIMAL|DATETIME|TIMESTAMP|TIME|YEAR|UNSIGNED", "CHAR|TINYBLOB|TINYTEXT|BLOB|MEDIUMBLOB|MEDIUMTEXT", "LONGBLOB|LONGTEXT|ENUM|BOOL|BINARY|VARBINARY" nonsensitive keyword = "ALL|ASC|AS|ALTER|AND|ADD|AUTO_INCREMENT", "BETWEEN|BINARY|BOTH|BY|BOOLEAN", "CHANGE|CHECK|COLUMNS|COLUMN|CROSS|CREATE", "DATABASES|DATABASE|DATA|DELAYED|DESCRIBE|DESC|DISTINCT|DELETE|DROP|DEFAULT", "ENCLOSED|ESCAPED|EXISTS|EXPLAIN", "FIELDS|FIELD|FLUSH|FOR|FOREIGN|FUNCTION|FROM", "GROUP|GRANT", "HAVING", "IGNORE|INDEX|INFILE|INSERT|INNER|INTO|IDENTIFIED|IN|IS|IF", "JOIN", "KEYS|KILL|KEY", "LEADING|LIKE|LIMIT|LINES|LOAD|LOCAL|LOCK|LOW_PRIORITY|LEFT|LANGUAGE", "MODIFY", "NATURAL|NOT|NULL|NEXTVAL", "OPTIMIZE|OPTION|OPTIONALLY|ORDER|OUTFILE|OR|OUTER|ON", "PROCEDURE","PROCEDURAL|PRIMARY", "READ|REFERENCES|REGEXP|RENAME|REPLACE|RETURN|REVOKE|RLIKE|RIGHT", "SHOW|SONAME|STATUS|STRAIGHT_JOIN|SELECT|SETVAL|SET", "TABLES|TERMINATED|TO|TRAILING","TRUNCATE|TABLE|TEMPORARY|TRIGGER|TRUSTED", "UNION|UNIQUE|UNLOCK|USE|USING|UPDATE", "VALUES|VARIABLES|VIEW", "WITH|WRITE|WHERE", "ZEROFILL|TYPE", "XOR" nonsensitive include "c_string.lang" environment string delim "`" "`" begin specialchar = $SPECIALCHAR end include "script_comment.lang" include "c_comment.lang" comment start "--" include "symbols.lang" include "number.lang"���������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/check-regexp_cmd.ggo�����������������������������������������������������0000644�0001750�0001750�00000000714�11672675564�016411� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Copyright (C) 1999-2007 Lorenzo Bettini, http://www.lorenzobettini.it # This file is used by gengetopt to generate a command line args parser # GNU gengetopt can be found at # http://www.gnu.org/software/gengetopt package "check-regexp (GNU Source-highlight)" purpose "Tries to match the regular expression passed as the first argument against the strings passed as remaining arguments" usage "check-regexp 'regular expression' 'string1' 'string2' ..." ����������������������������������������������������source-highlight-3.1.6/src/source-highlight.cc������������������������������������������������������0000644�0001750�0001750�00000047230�11672675565�016304� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (C) 1999-2009 Lorenzo Bettini <http://www.lorenzobettini.it> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ #ifdef HAVE_CONFIG_H #include "config.h" // this is glib related so don't use it when compiling with qmake #include "progname.h" #else #define set_program_name(x) ; #endif #include <cstdlib> #include <iostream> #include <exception> #include <boost/shared_ptr.hpp> #include "srchilite/sourcehighlight.h" #include "srchilite/fileutil.h" #include "srchilite/verbosity.h" #include "srchilite/langmap.h" #include "srchilite/languageinfer.h" #include "srchilite/utils.h" #include "srchilite/highlightbuilderexception.h" #include "srchilite/parserexception.h" #include "srchilite/debuglistener.h" #include "srchilite/ctagsmanager.h" #include "srchilite/stopwatch.h" #include "srchilite/lineranges.h" #include "srchilite/regexranges.h" #include "srchilite/versions.h" #include "srchilite/settings.h" #include "cmdline.h" using namespace std; using namespace srchilite; /** * how language inference should be made: NOINFERENCE = no inference at all, * INFERFIRST = inference has priority (e.g., if --infer-lang is specified), * INFERATLAST = try inference as the last chance */ enum InferPolicy { NOINFERENCE = 0, INFERFIRST, INFERATLAST }; static void print_copyright(); static void print_reportbugs(); static void print_version(); static string inferLang(const string &inputFileName); static string getMappedLang(const string &s, LangMap &langmap); static void printError(const string &s); static void print_cgi_header(); /** * Exits for a generic error (i.e., file not found) */ static void exitError(const string &s); static string getLangFileName(InferPolicy infer, const string &inputFileName, const string &langFileName, const string &langName, LangMap &langMap); static bool verbose = false; static bool failsafe = false; #ifdef BUILD_AS_CGI #include "envmapper.h" #endif // BUILD_AS_CGI /** * Print progress status information (provided --quiet is not specified) * @param message */ #define PROGRESSINFO(message) if (!args_info.quiet_given) cerr << message; int main(int argc, char * argv[]) { set_program_name(argv[0]); gengetopt_args_info args_info; // command line structure bool is_cgi = false; #ifdef BUILD_AS_CGI // map environment to parameters if used as CGI char **temp_argv; temp_argv = map_environment(&argc, argv); is_cgi = temp_argv != argv; argv = temp_argv; #endif // BUILD_AS_CGI if (cmdline_parser(argc, argv, &args_info) != 0) { // calls cmdline parser. The user gived bag args if it doesn't return -1 return EXIT_FAILURE; } if (args_info.version_given) { print_version(); print_copyright(); cmdline_parser_free(&args_info); return EXIT_SUCCESS; } if (args_info.help_given || args_info.detailed_help_given) { cout << "GNU "; if (args_info.detailed_help_given) { cmdline_parser_print_detailed_help(); } else { cmdline_parser_print_help(); } print_reportbugs(); cmdline_parser_free(&args_info); return EXIT_SUCCESS; } // set possible line ranges boost::shared_ptr<LineRanges> lineRanges; if (args_info.line_range_given) { lineRanges = boost::shared_ptr<LineRanges>(new LineRanges); for (unsigned int i = 0; i < args_info.line_range_given; ++i) { if (lineRanges->addRange(args_info.line_range_arg[i]) != NO_ERROR) { string invalid_range = args_info.line_range_arg[i]; cmdline_parser_free(&args_info); exitError("invalid line range: " + invalid_range); } } } // set possible regex ranges boost::shared_ptr<RegexRanges> regexRanges; if (args_info.regex_range_given) { regexRanges = boost::shared_ptr<RegexRanges>(new RegexRanges); for (unsigned int i = 0; i < args_info.regex_range_given; ++i) { if (!regexRanges->addRegexRange(args_info.regex_range_arg[i])) { string invalid_range = args_info.regex_range_arg[i]; cmdline_parser_free(&args_info); exitError("invalid regex range: " + invalid_range); } } } if (args_info.range_context_given) { lineRanges->setContextLines(args_info.range_context_arg); } // if a stopwatch is created, when it is deleted (automatically // since we're using a shared pointer, it will print the // elapsed seconds. boost::shared_ptr<StopWatch> stopwatch; if (args_info.statistics_given) { stopwatch = boost::shared_ptr<StopWatch>(new StopWatch); } verbose = args_info.verbose_given; failsafe = args_info.failsafe_given; string inputFile; string outputFile; string srcLang; string outputFormat; string langFile; string outLangFile; string dataDir; string outputDir; Verbosity::setVerbosity(verbose); if (args_info.input_given) inputFile = args_info.input_arg; if (args_info.output_given) outputFile = args_info.output_arg; // for cgi force output to standard output if (is_cgi) outputFile = "STDOUT"; if (args_info.src_lang_given) srcLang = args_info.src_lang_arg; if (args_info.lang_def_given) langFile = args_info.lang_def_arg; if (args_info.outlang_def_given) outLangFile = args_info.outlang_def_arg; // the default for output format is html outputFormat = args_info.out_format_arg; if (args_info.data_dir_given) { dataDir = args_info.data_dir_arg; } if (args_info.output_dir_given) { outputDir = args_info.output_dir_arg; } /* the starting default path to search for files is computed at run-time: it is the path of the binary + ".." + RELATIVEDATADIR this should make the package relocable (i.e., not stuck with a fixed installation directory). Of course, the GNU standards for installation directories should be followed, but this is not a problem if you use configure and make install features. If no path is specified in the running program we go back to the absolute datadir. */ // this is defined in fileutil.cc string prefix_dir = get_file_path(argv[0]); if (prefix_dir.size()) start_path = get_file_path(argv[0]) + RELATIVEDATADIR; else start_path = Settings::retrieveDataDir(); // if datadir is not specified, we rely on start_path? try { // initialize map files LangMap langmap(dataDir, args_info.lang_map_arg); // just print the input language list and associations if (args_info.lang_list_given) { langmap.open(); langmap.print(); return (EXIT_SUCCESS); } LangMap outlangmap(dataDir, args_info.outlang_map_arg); // just print the input language list and associations if (args_info.outlang_list_given) { outlangmap.open(); outlangmap.print(); return (EXIT_SUCCESS); } string cssUrl; if (args_info.css_given) cssUrl = args_info.css_arg; string docTitle; if (args_info.title_given) docTitle = args_info.title_arg; if (args_info.check_lang_given || args_info.check_outlang_given || args_info.show_regex_given || args_info.show_lang_elements_given || args_info.lang_list_given || args_info.outlang_list_given) { // FIXME just a bogus outlang file specification not to search in outlang.map outLangFile = "html.outlang"; } // initialize the main source highlight object SourceHighlight sourcehighlight(getLangFileName(NOINFERENCE, outputFile, outLangFile, outputFormat + (cssUrl.size() ? +"-css" : ""), outlangmap)); // and sets all its properties according to the command line args sourcehighlight.setDataDir(dataDir); boost::shared_ptr<DebugListener> debugListener; // if a simple check is required... if (args_info.check_lang_given) { cout << "checking " << args_info.check_lang_arg << "... "; sourcehighlight.checkLangDef(args_info.check_lang_arg); // if we're here, everything went fine! cout << "OK" << endl; // otherwise an exception has already been thrown return (EXIT_SUCCESS); } if (args_info.check_outlang_given) { cout << "checking " << args_info.check_outlang_arg << "... "; sourcehighlight.checkOutLangDef(args_info.check_outlang_arg); // if we're here, everything went fine! cout << "OK" << endl; // otherwise an exception has already been thrown return (EXIT_SUCCESS); } // just print the highlightstate if show-regex is specified if (args_info.show_regex_given) { sourcehighlight.printHighlightState(args_info.show_regex_arg, cout); return (EXIT_SUCCESS); } // just print the lang elems if show-lang-elements is specified if (args_info.show_lang_elements_given) { sourcehighlight.printLangElems(args_info.show_lang_elements_arg, cout); return (EXIT_SUCCESS); } sourcehighlight.setGenerateEntireDoc((!args_info.no_doc_given) && (args_info.doc_given || (docTitle.size()) || cssUrl.size())); sourcehighlight.setStyleDefaultFile(args_info.style_defaults_arg); sourcehighlight.setStyleFile(args_info.style_file_arg); if (args_info.style_css_file_given) sourcehighlight.setStyleCssFile(args_info.style_css_file_arg); sourcehighlight.setGenerateVersion(args_info.gen_version_flag != 0); sourcehighlight.setCss(cssUrl); sourcehighlight.setTitle(docTitle); sourcehighlight.setOutputDir(outputDir); sourcehighlight.setLineRanges(lineRanges.get()); sourcehighlight.setRegexRanges(regexRanges.get()); sourcehighlight.setBinaryOutput(args_info.binary_output_given); if (args_info.debug_langdef_given) { debugListener = boost::shared_ptr<DebugListener>(new DebugListener); const string debugType = args_info.debug_langdef_arg; if (debugType == "interactive") debugListener->setInteractive(true); sourcehighlight.setHighlightEventListener(debugListener.get()); // during debugging disable optimizations sourcehighlight.setOptimize(false); } int tabs = 0; if (args_info.tab_given) { tabs = args_info.tab_arg; } if (args_info.header_given) sourcehighlight.setHeaderFileName(args_info.header_arg); if (args_info.footer_given) sourcehighlight.setFooterFileName(args_info.footer_arg); bool generateLineNumbers = args_info.line_number_given || args_info.line_number_ref_given; sourcehighlight.setGenerateLineNumbers(generateLineNumbers); if (args_info.line_number_given) { // set the line number padding char (default is always '0') sourcehighlight.setLineNumberPad(args_info.line_number_arg[0]); } if (args_info.line_number_ref_given) { sourcehighlight.setGenerateLineNumberRefs(true); sourcehighlight.setLineNumberAnchorPrefix( args_info.line_number_ref_arg); } if (generateLineNumbers) { // when generating line numbers tabs must be translated // otherwise the output line will not be aligned // due to the presence of line numbers sourcehighlight.setTabSpaces(tabs ? tabs : 8); } if (tabs) { sourcehighlight.setTabSpaces(tabs); } // whether to give precedence to language inference InferPolicy inferPolicy = (args_info.infer_lang_given ? INFERFIRST : INFERATLAST); RefPosition refposition = INLINE; string gen_references_arg = args_info.gen_references_arg; if (gen_references_arg == "inline") refposition = INLINE; else if (gen_references_arg == "postline") refposition = POSTLINE; else if (gen_references_arg == "postdoc") refposition = POSTDOC; boost::shared_ptr<CTagsManager> ctagsManager; if (args_info.gen_references_given) { string ctags = args_info.ctags_arg; string ctags_file = args_info.ctags_file_arg; // build the additional arguments for the ctags command if (args_info.gen_references_given && ctags != "") { if (inputFile.size()) { ctags += " "; ctags += inputFile; } else if (args_info.inputs_num) { for (unsigned int i = 0; i < (args_info.inputs_num); ++i) { ctags += " "; ctags += args_info.inputs[i]; } } } // the ctags command must be executed if --ctags is specified with an empty string ctagsManager = boost::shared_ptr<CTagsManager>(new CTagsManager( ctags_file, ctags, ctags != "", refposition)); sourcehighlight.setCTagsManager(ctagsManager.get()); } if (args_info.range_separator_given) { sourcehighlight.setRangeSeparator(args_info.range_separator_arg); } // OK, let's highlight! if (args_info.inputs_num && (args_info.input_given || args_info.output_given)) { // do not mix command line invocation modes cerr << "Please, use one of the two syntaxes for invocation: " << endl; cerr << "source-highlight [OPTIONS]... -i input_file -o output_file" << endl; cerr << "source-highlight [OPTIONS]... [FILES]..." << endl; exit(EXIT_FAILURE); } // for cgi we can only process one file specified with --input if (args_info.inputs_num && !is_cgi) { // the output file name is empty, but we don't want to generate to stdout sourcehighlight.setCanUseStdOut(false); // in case multiple input files were specified (without --input) for (unsigned int i = 0; i < (args_info.inputs_num); ++i) { PROGRESSINFO(string("Processing ")+ args_info.inputs[i] + " ... "); sourcehighlight.highlight(args_info.inputs[i], "", getLangFileName(inferPolicy, args_info.inputs[i], langFile, srcLang, langmap)); PROGRESSINFO("created " + sourcehighlight.createOutputFileName(args_info.inputs[i]) + "\n"); } } else { if (is_cgi) print_cgi_header(); // in case only one input file was specified with --input sourcehighlight.highlight(inputFile, outputFile, getLangFileName( inferPolicy, inputFile, langFile, srcLang, langmap)); } } catch (const HighlightBuilderException &e) { cerr << e << endl; exit(EXIT_FAILURE); } catch (const ParserException &e) { cerr << e << endl; exit(EXIT_FAILURE); } catch (const exception &e) { exitError(e.what()); } cmdline_parser_free(&args_info); return 0; } void print_copyright() { int i; int copyright_text_length = 5; const char *copyright_text[] = { "copyright.text", "Copyright (C) 1999-2008 Lorenzo Bettini <http://www.lorenzobettini.it>", "This program comes with ABSOLUTELY NO WARRANTY.", "This is free software; you may redistribute copies of the program", "under the terms of the GNU General Public License.", "For more information about these matters, see the file named COPYING.", 0 }; for (i = 1; i <= copyright_text_length; ++i) cout << copyright_text[i] << endl;; } void print_reportbugs() { int i; int reportbugs_text_length = 3; const char *reportbugs_text[] = { "reportbugs.text", "", "Maintained by Lorenzo Bettini <http://www.lorenzobettini.it>", "Report bugs to <bug-source-highlight at gnu.org>", 0 }; for (i = 1; i <= reportbugs_text_length; ++i) cout << reportbugs_text[i] << endl; } void print_version() { cout << Versions::getCompleteVersion() << endl; } string inferLang(const string &inputFileName) { VERBOSELN("inferring input language..."); if (!inputFileName.size()) { printError("missing feature: language inference requires input file"); return ""; } LanguageInfer languageInfer; const string &result = languageInfer.infer(inputFileName); if (result.size()) { VERBOSELN("inferred input language: " + result); } else { VERBOSELN("couldn't infer input language"); } return result; } string getMappedLang(const string &s, LangMap &langmap) { // OK now map it into a .lang file string mapped_lang = langmap.getMappedFileName(s); if (!mapped_lang.size()) { // try the lower version mapped_lang = langmap.getFileName(Utils::tolower(s)); } return mapped_lang; } string getLangFileName(InferPolicy infer, const string &inputFileName, const string &langFileName, const string &langName, LangMap &langMap) { string langFile; // language inference has the precedence if (infer == INFERFIRST) { langFile = inferLang(inputFileName); langFile = getMappedLang(langFile, langMap); if (langFile.size()) return langFile; } // then if a lang file name was specified we're done if (langFileName.size()) return langFileName; // now try with the langName langFile = getMappedLang(langName, langMap); if (langFile.size()) return langFile; // otherwise try with the inputFileName (its file extension // and its name) langFile = langMap.getMappedFileNameFromFileName(inputFileName); if (langFile.size()) return langFile; // OK, as a last chance let's try with language infer if (infer == INFERATLAST) { langFile = getMappedLang(inferLang(inputFileName), langMap); if (langFile.size()) return langFile; } // if we're here we failed all checks // if failsafe is specified we default to default.lang if (failsafe) langFile = "default.lang"; if (!langFile.size()) { // if we're here we must exit with failure if (langName.size()) exitError("could not find a language definition for " + langName); else exitError("could not find a language definition for input file " + inputFileName); } return langFile; } void printError(const string &s) { cerr << PACKAGE << ": " << s << endl; } void exitError(const string &s) { printError(s); exit(EXIT_FAILURE); } void print_cgi_header() { cout << "Content-type: text/html\n"; cout << "\n"; } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/number.lang��������������������������������������������������������������0000644�0001750�0001750�00000000174�11672675565�014657� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������number = '\<[+-]?((0x[[:xdigit:]]+)|(([[:digit:]]*\.)? [[:digit:]]+([eE][+-]?[[:digit:]]+)?))u?((int(?:8|16|32|64))|L)?\>' ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/cmdline.h����������������������������������������������������������������0000644�0001750�0001750�00000060711�11675323762�014303� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/** @file cmdline.h * @brief The header file for the command line option parser * generated by GNU Gengetopt version 2.22.6 * http://www.gnu.org/software/gengetopt. * DO NOT modify this file, since it can be overwritten * @author GNU Gengetopt by Lorenzo Bettini */ #ifndef CMDLINE_H #define CMDLINE_H /* If we use autoconf. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include <stdio.h> /* for FILE */ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #ifndef CMDLINE_PARSER_PACKAGE /** @brief the program name (used for printing errors) */ #define CMDLINE_PARSER_PACKAGE PACKAGE #endif #ifndef CMDLINE_PARSER_PACKAGE_NAME /** @brief the complete program name (used for help and version) */ #ifdef PACKAGE_NAME #define CMDLINE_PARSER_PACKAGE_NAME PACKAGE_NAME #else #define CMDLINE_PARSER_PACKAGE_NAME PACKAGE #endif #endif #ifndef CMDLINE_PARSER_VERSION /** @brief the program version */ #define CMDLINE_PARSER_VERSION VERSION #endif /** @brief Where the command line options are stored */ struct gengetopt_args_info { const char *help_help; /**< @brief Print help and exit help description. */ const char *detailed_help_help; /**< @brief Print help, including all details and hidden options, and exit help description. */ const char *version_help; /**< @brief Print version and exit help description. */ char * input_arg; /**< @brief input file. default std input. */ char * input_orig; /**< @brief input file. default std input original value given at command line. */ const char *input_help; /**< @brief input file. default std input help description. */ char * output_arg; /**< @brief output file. default std output (when the third invocation form is used). If STDOUT is specified, the output is directed to standard output. */ char * output_orig; /**< @brief output file. default std output (when the third invocation form is used). If STDOUT is specified, the output is directed to standard output original value given at command line. */ const char *output_help; /**< @brief output file. default std output (when the third invocation form is used). If STDOUT is specified, the output is directed to standard output help description. */ char * src_lang_arg; /**< @brief source language (use --lang-list to get the complete list). If not specified, the source language will be guessed from the file extension.. */ char * src_lang_orig; /**< @brief source language (use --lang-list to get the complete list). If not specified, the source language will be guessed from the file extension. original value given at command line. */ const char *src_lang_help; /**< @brief source language (use --lang-list to get the complete list). If not specified, the source language will be guessed from the file extension. help description. */ const char *lang_list_help; /**< @brief list all the supported language and associated language definition file help description. */ const char *outlang_list_help; /**< @brief list all the supported output language and associated language definition file help description. */ char * out_format_arg; /**< @brief output format (use --outlang-list to get the complete list) (default='html'). */ char * out_format_orig; /**< @brief output format (use --outlang-list to get the complete list) original value given at command line. */ const char *out_format_help; /**< @brief output format (use --outlang-list to get the complete list) help description. */ const char *doc_help; /**< @brief create an output file that can be used as a stand alone document (e.g., not to be included in another one) help description. */ const char *no_doc_help; /**< @brief cancel the --doc option even if it is implied (e.g., when css is given) help description. */ char * css_arg; /**< @brief the external style sheet filename. Implies --doc. */ char * css_orig; /**< @brief the external style sheet filename. Implies --doc original value given at command line. */ const char *css_help; /**< @brief the external style sheet filename. Implies --doc help description. */ char * title_arg; /**< @brief give a title to the output document. Implies --doc. */ char * title_orig; /**< @brief give a title to the output document. Implies --doc original value given at command line. */ const char *title_help; /**< @brief give a title to the output document. Implies --doc help description. */ int tab_arg; /**< @brief specify tab length. (default='8'). */ char * tab_orig; /**< @brief specify tab length. original value given at command line. */ const char *tab_help; /**< @brief specify tab length. help description. */ char * header_arg; /**< @brief file to insert as header. */ char * header_orig; /**< @brief file to insert as header original value given at command line. */ const char *header_help; /**< @brief file to insert as header help description. */ char * footer_arg; /**< @brief file to insert as footer. */ char * footer_orig; /**< @brief file to insert as footer original value given at command line. */ const char *footer_help; /**< @brief file to insert as footer help description. */ char * style_file_arg; /**< @brief specify the file containing format options (default='default.style'). */ char * style_file_orig; /**< @brief specify the file containing format options original value given at command line. */ const char *style_file_help; /**< @brief specify the file containing format options help description. */ char * style_css_file_arg; /**< @brief specify the file containing format options (in css syntax). */ char * style_css_file_orig; /**< @brief specify the file containing format options (in css syntax) original value given at command line. */ const char *style_css_file_help; /**< @brief specify the file containing format options (in css syntax) help description. */ char * style_defaults_arg; /**< @brief specify the file containing defaults for format options (default='style.defaults'). */ char * style_defaults_orig; /**< @brief specify the file containing defaults for format options original value given at command line. */ const char *style_defaults_help; /**< @brief specify the file containing defaults for format options help description. */ char * outlang_def_arg; /**< @brief output language definition file. */ char * outlang_def_orig; /**< @brief output language definition file original value given at command line. */ const char *outlang_def_help; /**< @brief output language definition file help description. */ char * outlang_map_arg; /**< @brief output language map file (default='outlang.map'). */ char * outlang_map_orig; /**< @brief output language map file original value given at command line. */ const char *outlang_map_help; /**< @brief output language map file help description. */ char * data_dir_arg; /**< @brief directory where language definition files and language maps are searched for. If not specified these files are searched for in the current directory and in the data dir installation directory. */ char * data_dir_orig; /**< @brief directory where language definition files and language maps are searched for. If not specified these files are searched for in the current directory and in the data dir installation directory original value given at command line. */ const char *data_dir_help; /**< @brief directory where language definition files and language maps are searched for. If not specified these files are searched for in the current directory and in the data dir installation directory help description. */ char * output_dir_arg; /**< @brief output directory. */ char * output_dir_orig; /**< @brief output directory original value given at command line. */ const char *output_dir_help; /**< @brief output directory help description. */ char * lang_def_arg; /**< @brief language definition file. */ char * lang_def_orig; /**< @brief language definition file original value given at command line. */ const char *lang_def_help; /**< @brief language definition file help description. */ char * lang_map_arg; /**< @brief language map file (default='lang.map'). */ char * lang_map_orig; /**< @brief language map file original value given at command line. */ const char *lang_map_help; /**< @brief language map file help description. */ char * show_lang_elements_arg; /**< @brief prints the language elements that are defined in the language definition file. */ char * show_lang_elements_orig; /**< @brief prints the language elements that are defined in the language definition file original value given at command line. */ const char *show_lang_elements_help; /**< @brief prints the language elements that are defined in the language definition file help description. */ const char *infer_lang_help; /**< @brief force to infer source script language (overriding given language specification) help description. */ char * line_number_arg; /**< @brief number all output lines, using the specified padding character (default='0'). */ char * line_number_orig; /**< @brief number all output lines, using the specified padding character original value given at command line. */ const char *line_number_help; /**< @brief number all output lines, using the specified padding character help description. */ char * line_number_ref_arg; /**< @brief number all output lines and generate an anchor, made of the specified prefix + the line number (default='line'). */ char * line_number_ref_orig; /**< @brief number all output lines and generate an anchor, made of the specified prefix + the line number original value given at command line. */ const char *line_number_ref_help; /**< @brief number all output lines and generate an anchor, made of the specified prefix + the line number help description. */ char ** line_range_arg; /**< @brief generate only the lines in the specified range(s). */ char ** line_range_orig; /**< @brief generate only the lines in the specified range(s) original value given at command line. */ unsigned int line_range_min; /**< @brief generate only the lines in the specified range(s)'s minimum occurreces */ unsigned int line_range_max; /**< @brief generate only the lines in the specified range(s)'s maximum occurreces */ const char *line_range_help; /**< @brief generate only the lines in the specified range(s) help description. */ char * range_separator_arg; /**< @brief the optional separator to be printed among ranges (e.g., \"...\"). */ char * range_separator_orig; /**< @brief the optional separator to be printed among ranges (e.g., \"...\") original value given at command line. */ const char *range_separator_help; /**< @brief the optional separator to be printed among ranges (e.g., \"...\") help description. */ int range_context_arg; /**< @brief number of (context) lines generated even if not in range. */ char * range_context_orig; /**< @brief number of (context) lines generated even if not in range original value given at command line. */ const char *range_context_help; /**< @brief number of (context) lines generated even if not in range help description. */ char ** regex_range_arg; /**< @brief generate only the lines within the specified regular expressions. */ char ** regex_range_orig; /**< @brief generate only the lines within the specified regular expressions original value given at command line. */ unsigned int regex_range_min; /**< @brief generate only the lines within the specified regular expressions's minimum occurreces */ unsigned int regex_range_max; /**< @brief generate only the lines within the specified regular expressions's maximum occurreces */ const char *regex_range_help; /**< @brief generate only the lines within the specified regular expressions help description. */ char * gen_references_arg; /**< @brief generate references (default='inline'). */ char * gen_references_orig; /**< @brief generate references original value given at command line. */ const char *gen_references_help; /**< @brief generate references help description. */ char * ctags_file_arg; /**< @brief specify the file generated by ctags that will be used to generate references (default='tags'). */ char * ctags_file_orig; /**< @brief specify the file generated by ctags that will be used to generate references original value given at command line. */ const char *ctags_file_help; /**< @brief specify the file generated by ctags that will be used to generate references help description. */ char * ctags_arg; /**< @brief how to run the ctags command. If this option is not specified, ctags will be executed with the default value. If it is specified with an empty string, ctags will not be executed at all (default='ctags --excmd=n --tag-relative=yes'). */ char * ctags_orig; /**< @brief how to run the ctags command. If this option is not specified, ctags will be executed with the default value. If it is specified with an empty string, ctags will not be executed at all original value given at command line. */ const char *ctags_help; /**< @brief how to run the ctags command. If this option is not specified, ctags will be executed with the default value. If it is specified with an empty string, ctags will not be executed at all help description. */ const char *verbose_help; /**< @brief verbose mode on help description. */ const char *quiet_help; /**< @brief print no progress information help description. */ const char *binary_output_help; /**< @brief write output files in binary mode help description. */ const char *statistics_help; /**< @brief print some statistics (i.e., elapsed time) help description. */ int gen_version_flag; /**< @brief put source-highlight version in the generated file (default=on). */ const char *gen_version_help; /**< @brief put source-highlight version in the generated file help description. */ char * check_lang_arg; /**< @brief only check the correctness of a language definition file. */ char * check_lang_orig; /**< @brief only check the correctness of a language definition file original value given at command line. */ const char *check_lang_help; /**< @brief only check the correctness of a language definition file help description. */ char * check_outlang_arg; /**< @brief only check the correctness of an output language definition file. */ char * check_outlang_orig; /**< @brief only check the correctness of an output language definition file original value given at command line. */ const char *check_outlang_help; /**< @brief only check the correctness of an output language definition file help description. */ const char *failsafe_help; /**< @brief if no language definition is found for the input, it is simply copied to the output help description. */ char * debug_langdef_arg; /**< @brief debug a language definition. In dump mode just dumps all the steps; in interactive, at each step, waits for some input (press ENTER to step) (default='dump'). */ char * debug_langdef_orig; /**< @brief debug a language definition. In dump mode just dumps all the steps; in interactive, at each step, waits for some input (press ENTER to step) original value given at command line. */ const char *debug_langdef_help; /**< @brief debug a language definition. In dump mode just dumps all the steps; in interactive, at each step, waits for some input (press ENTER to step) help description. */ char * show_regex_arg; /**< @brief show the regular expression automaton corresponding to a language definition file. */ char * show_regex_orig; /**< @brief show the regular expression automaton corresponding to a language definition file original value given at command line. */ const char *show_regex_help; /**< @brief show the regular expression automaton corresponding to a language definition file help description. */ unsigned int help_given ; /**< @brief Whether help was given. */ unsigned int detailed_help_given ; /**< @brief Whether detailed-help was given. */ unsigned int version_given ; /**< @brief Whether version was given. */ unsigned int input_given ; /**< @brief Whether input was given. */ unsigned int output_given ; /**< @brief Whether output was given. */ unsigned int src_lang_given ; /**< @brief Whether src-lang was given. */ unsigned int lang_list_given ; /**< @brief Whether lang-list was given. */ unsigned int outlang_list_given ; /**< @brief Whether outlang-list was given. */ unsigned int out_format_given ; /**< @brief Whether out-format was given. */ unsigned int doc_given ; /**< @brief Whether doc was given. */ unsigned int no_doc_given ; /**< @brief Whether no-doc was given. */ unsigned int css_given ; /**< @brief Whether css was given. */ unsigned int title_given ; /**< @brief Whether title was given. */ unsigned int tab_given ; /**< @brief Whether tab was given. */ unsigned int header_given ; /**< @brief Whether header was given. */ unsigned int footer_given ; /**< @brief Whether footer was given. */ unsigned int style_file_given ; /**< @brief Whether style-file was given. */ unsigned int style_css_file_given ; /**< @brief Whether style-css-file was given. */ unsigned int style_defaults_given ; /**< @brief Whether style-defaults was given. */ unsigned int outlang_def_given ; /**< @brief Whether outlang-def was given. */ unsigned int outlang_map_given ; /**< @brief Whether outlang-map was given. */ unsigned int data_dir_given ; /**< @brief Whether data-dir was given. */ unsigned int output_dir_given ; /**< @brief Whether output-dir was given. */ unsigned int lang_def_given ; /**< @brief Whether lang-def was given. */ unsigned int lang_map_given ; /**< @brief Whether lang-map was given. */ unsigned int show_lang_elements_given ; /**< @brief Whether show-lang-elements was given. */ unsigned int infer_lang_given ; /**< @brief Whether infer-lang was given. */ unsigned int line_number_given ; /**< @brief Whether line-number was given. */ unsigned int line_number_ref_given ; /**< @brief Whether line-number-ref was given. */ unsigned int line_range_given ; /**< @brief Whether line-range was given. */ unsigned int range_separator_given ; /**< @brief Whether range-separator was given. */ unsigned int range_context_given ; /**< @brief Whether range-context was given. */ unsigned int regex_range_given ; /**< @brief Whether regex-range was given. */ unsigned int gen_references_given ; /**< @brief Whether gen-references was given. */ unsigned int ctags_file_given ; /**< @brief Whether ctags-file was given. */ unsigned int ctags_given ; /**< @brief Whether ctags was given. */ unsigned int verbose_given ; /**< @brief Whether verbose was given. */ unsigned int quiet_given ; /**< @brief Whether quiet was given. */ unsigned int binary_output_given ; /**< @brief Whether binary-output was given. */ unsigned int statistics_given ; /**< @brief Whether statistics was given. */ unsigned int gen_version_given ; /**< @brief Whether gen-version was given. */ unsigned int check_lang_given ; /**< @brief Whether check-lang was given. */ unsigned int check_outlang_given ; /**< @brief Whether check-outlang was given. */ unsigned int failsafe_given ; /**< @brief Whether failsafe was given. */ unsigned int debug_langdef_given ; /**< @brief Whether debug-langdef was given. */ unsigned int show_regex_given ; /**< @brief Whether show-regex was given. */ char **inputs ; /**< @brief unamed options (options without names) */ unsigned inputs_num ; /**< @brief unamed options number */ int linerange_mode_counter; /**< @brief Counter for mode linerange */ int regexrange_mode_counter; /**< @brief Counter for mode regexrange */ } ; /** @brief The additional parameters to pass to parser functions */ struct cmdline_parser_params { int override; /**< @brief whether to override possibly already present options (default 0) */ int initialize; /**< @brief whether to initialize the option structure gengetopt_args_info (default 1) */ int check_required; /**< @brief whether to check that all required options were provided (default 1) */ int check_ambiguity; /**< @brief whether to check for options already specified in the option structure gengetopt_args_info (default 0) */ int print_errors; /**< @brief whether getopt_long should print an error message for a bad option (default 1) */ } ; /** @brief the purpose string of the program */ extern const char *gengetopt_args_info_purpose; /** @brief the usage string of the program */ extern const char *gengetopt_args_info_usage; /** @brief all the lines making the help output */ extern const char *gengetopt_args_info_help[]; /** @brief all the lines making the detailed help output (including hidden options and details) */ extern const char *gengetopt_args_info_detailed_help[]; /** * The command line parser * @param argc the number of command line options * @param argv the command line options * @param args_info the structure where option information will be stored * @return 0 if everything went fine, NON 0 if an error took place */ int cmdline_parser (int argc, char **argv, struct gengetopt_args_info *args_info); /** * The command line parser (version with additional parameters - deprecated) * @param argc the number of command line options * @param argv the command line options * @param args_info the structure where option information will be stored * @param override whether to override possibly already present options * @param initialize whether to initialize the option structure my_args_info * @param check_required whether to check that all required options were provided * @return 0 if everything went fine, NON 0 if an error took place * @deprecated use cmdline_parser_ext() instead */ int cmdline_parser2 (int argc, char **argv, struct gengetopt_args_info *args_info, int override, int initialize, int check_required); /** * The command line parser (version with additional parameters) * @param argc the number of command line options * @param argv the command line options * @param args_info the structure where option information will be stored * @param params additional parameters for the parser * @return 0 if everything went fine, NON 0 if an error took place */ int cmdline_parser_ext (int argc, char **argv, struct gengetopt_args_info *args_info, struct cmdline_parser_params *params); /** * Save the contents of the option struct into an already open FILE stream. * @param outfile the stream where to dump options * @param args_info the option struct to dump * @return 0 if everything went fine, NON 0 if an error took place */ int cmdline_parser_dump(FILE *outfile, struct gengetopt_args_info *args_info); /** * Save the contents of the option struct into a (text) file. * This file can be read by the config file parser (if generated by gengetopt) * @param filename the file where to save * @param args_info the option struct to save * @return 0 if everything went fine, NON 0 if an error took place */ int cmdline_parser_file_save(const char *filename, struct gengetopt_args_info *args_info); /** * Print the help */ void cmdline_parser_print_help(void); /** * Print the detailed help (including hidden options and details) */ void cmdline_parser_print_detailed_help(void); /** * Print the version */ void cmdline_parser_print_version(void); /** * Initializes all the fields a cmdline_parser_params structure * to their default values * @param params the structure to initialize */ void cmdline_parser_params_init(struct cmdline_parser_params *params); /** * Allocates dynamically a cmdline_parser_params structure and initializes * all its fields to their default values * @return the created and initialized cmdline_parser_params structure */ struct cmdline_parser_params *cmdline_parser_params_create(void); /** * Initializes the passed gengetopt_args_info structure's fields * (also set default values for options that have a default) * @param args_info the structure to initialize */ void cmdline_parser_init (struct gengetopt_args_info *args_info); /** * Deallocates the string fields of the gengetopt_args_info structure * (but does not deallocate the structure itself) * @param args_info the structure to deallocate */ void cmdline_parser_free (struct gengetopt_args_info *args_info); /** * Checks that all the required options were specified * @param args_info the structure to check * @param prog_name the name of the program that will be used to print * possible errors * @return */ int cmdline_parser_required (struct gengetopt_args_info *args_info, const char *prog_name); extern const char *cmdline_parser_gen_references_values[]; /**< @brief Possible values for gen-references. */ extern const char *cmdline_parser_debug_langdef_values[]; /**< @brief Possible values for debug-langdef. */ #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* CMDLINE_H */ �������������������������������������������������������source-highlight-3.1.6/src/ada.lang�����������������������������������������������������������������0000644�0001750�0001750�00000002003�11672675564�014104� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# definitions for Ada, by Reto Buerki preproc = "with|use" keyword = "abort|abs|abstract|accept|access|aliased|all|and|array|at", "begin|body", "case|constant", "declare|delay|delta|digits|do", "else|elsif|end|entry|exception|exit", "for|function", "generic|goto", "if|in|interface|is", "limited|loop", "mod", "new|not|null", "of|or|others|out|overriding", "package|pragma|private|procedure|protected", "raise|range|record|rem|renames|requeue", "return|reverse", "select|separate|subtype|synchronized", "tagged|task|terminate|then|type", "until", "when|while", "xor" nonsensitive comment start "--" include "number.lang" string delim "\"" "\"" escape "\\" string delim "'" "'" escape "\\" type = "Integer|Float|Duration|Character|String|Wide_String|Boolean" nonsensitive include "symbols.lang" include "function.lang" �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/pc.lang������������������������������������������������������������������0000644�0001750�0001750�00000000255�11672675565�013771� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# highlighting for pkg-config files include "properties.lang" variable = '\$\{([^[:blank:]]+)\}' include "number.lang" include "url.lang" (string,symbol) = `(^[^:]+)(:)`���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/html_common.outlang������������������������������������������������������0000644�0001750�0001750�00000001110�11672675565�016422� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������include "html_ref.outlang" extension "html" bold "<b>$text</b>" italics "<i>$text</i>" underline "<u>$text</u>" color "<font color=\"$style\">$text</font>" colormap "green" "#33CC00" "red" "#FF0000" "darkred" "#990000" "blue" "#0000FF" "brown" "#9A1900" "pink" "#CC33CC" "yellow" "#FFCC00" "cyan" "#66FFFF" "purple" "#993399" "orange" "#FF6600" "brightorange" "#FF9900" "brightgreen" "#33FF33" "darkgreen" "#009900" "black" "#000000" "teal" "#008080" "gray" "#808080" "darkblue" "#000080" "white" "#FFFFFF" default "#000000" end translations "&" "&amp;" "<" "&lt;" ">" "&gt;" end ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/c.lang�������������������������������������������������������������������0000644�0001750�0001750�00000002062�11672675564�013606� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# definitions for C include "c_comment.lang" label = '^[[:blank:]]*[[:alnum:]]+:[[:blank:]]*\z' (keyword,normal,classname) = `(\<struct)([[:blank:]]+)([[:alnum:]_]+)` state preproc start '^[[:blank:]]*#(?:[[:blank:]]*include)' begin string delim "<" ">" string delim "\"" "\"" escape "\\" include "c_comment.lang" end preproc = '^[[:blank:]]*#([[:blank:]]*[[:word:]]*)' include "number.lang" include "c_string.lang" keyword = "__asm|__cdecl|__declspec|__export|__far16", "__fastcall|__fortran|__import", "__pascal|__rtti|__stdcall|_asm|_cdecl", "__except|_export|_far16|_fastcall", "__finally|_fortran|_import|_pascal|_stdcall|__thread|__try|asm|auto", "break|case|catch|cdecl|const|continue|default", "do|else|enum|extern|for|goto", "if|pascal", "register|return|sizeof|static", "struct|switch", "typedef|union", "volatile|while" type = "bool|char|double|float|int|long", "short|signed|unsigned|void|wchar_t" include "symbols.lang" cbracket = "{|}" include "function.lang" include "clike_vardeclaration.lang" ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/tml_glue.lang������������������������������������������������������������0000664�0001750�0001750�00000000101�11672675565�015167� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# GluePlugin syntax preproc = '(^[\*~]~~)' comment = '(^#~~.*$)' ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/css.lang�����������������������������������������������������������������0000644�0001750�0001750�00000000502�11672675564�014151� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# language definition for css style sheets include "c_comment.lang" selector = '(\.|#)[[:word:]]+' state cbracket delim "{" "}" multiline begin include "c_comment.lang" property = '[[:word:]-]+[[:blank:]]*:' value = '[.%[:word:]-]+' string = '#([[:word:]]+)' end include "symbols.lang"����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/xhtml_notfixed.outlang���������������������������������������������������0000644�0001750�0001750�00000000561�11672675565�017153� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������include "xhtml_common.outlang" fixed "<span style=\"font-family: monospace;\">$text</span>" doctemplate "<!-- Generator: $additional --> $header" "$footer" end nodoctemplate "<!-- Generator: $additional --> $header" "$footer" end translations "\n" "<br />\n" " " "&nbsp; " '^ ' "&nbsp;" # a space at the beginning of a line "\t" "&nbsp; &nbsp; &nbsp; &nbsp; " end �����������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/bib.lang�����������������������������������������������������������������0000644�0001750�0001750�00000000215�11672675564�014116� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������state bibtex = '@[[:alpha:]]+(?=\{)' begin argument = '(?<=\{)[[:alnum:]]+' normal = "," exit end string = '[[:alpha:]]+(?=[[:blank:]]*=)'�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/xhtmlcss.outlang���������������������������������������������������������0000644�0001750�0001750�00000001016�11672675565�015760� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������include "css_common.outlang" doctemplate "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\"> <html> <head> <meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\" /> <meta name=\"GENERATOR\" content=\"$additional\" /> <meta name=\"INPUTLANG\" content=\"$inputlang\" /> <title>$title</title> <link rel=\"stylesheet\" href=\"$css\" type=\"text/css\" /> </head> <body> $header<pre><tt>" "</tt></pre> $footer</body> </html> " end ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/java.lang����������������������������������������������������������������0000644�0001750�0001750�00000001312�11672675565�014303� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������preproc = "import","package" include "c_comment.lang" include "number.lang" include "c_string.lang" (keyword,normal,classname) = `(\<(?:class|interface))([[:blank:]]+)([$[:alnum:]_]+)` keyword = "abstract|assert|break|case|catch|class|const", "continue|default|do|else|extends|false|final", "finally|for|goto|if|implements|instanceof|interface" keyword = "native|new|null|private|protected|public|return", "static|strictfp|super|switch|synchronized|throw", "throws|true|this|transient|try|volatile|while" type = "int|byte|boolean|char|long|float|double|short|void" include "symbols.lang" cbracket = "{|}" include "function.lang" include "clike_vardeclaration.lang"����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/xhtml.outlang������������������������������������������������������������0000644�0001750�0001750�00000001130�11672675565�015244� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������include "xhtml_common.outlang" doctemplate "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\"> <html> <head> <meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\" /> <meta name=\"GENERATOR\" content=\"$additional\" /> <meta name=\"INPUTLANG\" content=\"$inputlang\" /> <title>$title</title> </head> <body style=\"background-color: $docbgcolor\"> $header<pre><tt>" "</tt></pre> $footer</body> </html> " end nodoctemplate "<!-- Generator: $additional --> $header<pre><tt>" "</tt></pre>$footer " end ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/tml_formatting.lang������������������������������������������������������0000664�0001750�0001750�00000001005�11672675565�016411� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# [[Wiki][Links with %MACROs{"and $tokens in MACROs"}%]] environment url delim "[[" "]]" begin # %MACROs without any wikitext formatting in their args keyword = $MACRO environment keyword delim $MACROSTART $MACROEND multiline nested begin keyword = $MACRO attribute = $MACROATTR environment string delim "\"" "\"" escape "\\" multiline begin include "tml_macrotokens.lang" end end include "tml_formatting_all.lang" end include "tml_formatting_all.lang" ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/outlang.map��������������������������������������������������������������0000644�0001750�0001750�00000000545�11676047550�014665� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������html = html.outlang htmltable = htmltable.outlang html-css = htmlcss.outlang xhtml = xhtml.outlang xhtmltable = xhtmltable.outlang xhtml-css = xhtmlcss.outlang esc = esc.outlang latex = latex.outlang latexcolor = latexcolor.outlang texinfo = texinfo.outlang javadoc = javadoc.outlang docbook = docbook.outlang odf = odf.outlang mediawiki = mediawiki.outlang�����������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/d.lang�������������������������������������������������������������������0000644�0001750�0001750�00000002273�11672675564�013613� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# D language definition, http://www.digitalmars.com/d/2.0/index.html # most is reused from cpp.lang preproc = '\<__[[:alpha:]]+__\>' preproc = "import" # sh style syntax script syntax comment start '^#!' # nested comments environment comment delim "/+" "+/" multiline nested begin include "url.lang" include "todo.lang" end # Wysiwyg Strings (\ is not a special char) string delim '(r|x)\"' "\"" string delim "`" "`" # string literal postfix characters string = '\".*\"(c|w|d)' include "cpp.lang" type = "byte|cdouble|cent|cfloat|creal|dchar|idouble|ifloat|ireal", "real|ubyte|ucent|uint|ulong|ushort|wchar" subst keyword = "abstract|alias|align|asm|assert|auto|body", "break|case|cast|catch|class|const|continue|debug|default", "delegate|delete|deprecated|do|else|enum|export|extern", "false|final|finally|for|foreach_reverse|foreach|function", "goto|if|in|inout|interface|invariant|is|lazy", "macro|mixin|module|new|nothrow|null|out|override", "package|pragma|private|protected|public|pure", "ref|return|scope|shared|static|struct|super|switch", "synchronized|template|this|throw|true|try|typedef|typeid", "typeof|union|unittest|version|void|volatile", "while|with|__gshared|__thread|__traits" �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/htmltable.outlang��������������������������������������������������������0000644�0001750�0001750�00000000445�11672675565�016074� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������include "html_common.outlang" doctemplate "<table BGCOLOR=\"$docbgcolor\" NOSAVE > <tr NOSAVE> <td NOSAVE> <pre><tt>" "</tt></pre> </td> </tr> </table> " end nodoctemplate "<table BGCOLOR=\"$docbgcolor\" NOSAVE > <tr NOSAVE> <td NOSAVE> <pre><tt>" "</tt></pre> </td> </tr> </table> " end ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/style.defaults�����������������������������������������������������������0000644�0001750�0001750�00000000651�11672675565�015415� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# defaults for styles # the format is: # elem1 = elem2 # meaning that if the style for elem1 is not specified, # then it will have the same style as elem2 classname = normal usertype = normal preproc = keyword section = function paren = cbracket attribute = type value = string predef_var = type predef_func = function atom = regexp meta = function path = regexp label = preproc error = string warning = type code = preproc���������������������������������������������������������������������������������������source-highlight-3.1.6/src/scala.lang���������������������������������������������������������������0000644�0001750�0001750�00000001457�11672675565�014457� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# written by Dean Wampler preproc = "import","package" include "c_comment.lang" include "number.lang" include "c_string.lang" (keyword,normal,classname) = `(\<(?:class|trait))([[:blank:]]+)([$[:alnum:]_]+)` keyword = "abstract|case|catch|class|def", "do|else|extends|false|final", "finally|for|forSome|if|implicit", "import|lazy|match|new|null", "object|override|package|private|protected", "requires|return|sealed|super|this", "throw|trait|try|true|type", "val|var|while|with|yield" keyword = "_|:|=>|=|<-|<:|<%|>:|#|@" type = "Int|Byte|Boolean|Char|Long|Float|Double|Short|Nil" include "symbols.lang" cbracket = "{|}" vardef FUNCTION = '([[:alpha:]]|_|[[:punct:]])([[:word:]]|[[:punct:]])*(?=[[:blank:]]*\()' function = $FUNCTION �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/bison.lang���������������������������������������������������������������0000644�0001750�0001750�00000000113�11672675564�014471� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# for the moment we share the flex language definition include "flex.lang"�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/conf.lang����������������������������������������������������������������0000644�0001750�0001750�00000000464�11672675564�014315� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# highlighting for generic configuration files include "properties.lang" include "desktop.lang" include "xorg.lang" variable = '([[:alpha:]]|_)[[:word:]]*(?==)' variable = '\$\{([^[:blank:]]+)\}' variable = '\$\(([^[:blank:]]+)\)' variable = '\$([[:alpha:]]|_)[[:word:]]*' variable = '\$([^[:blank:]]{1})' ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/oz.lang������������������������������������������������������������������0000644�0001750�0001750�00000001326�11672675565�014017� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# David Bremners, http://www.cs.unb.ca/~bremner/ keyword = "andthen|at|attr|case|catch|choice|class|cond", "declare|define|dis|div|do|else|elsecase", "elseif|elseof|end|fail|false|feat|finally|for", "from|fun|functor|if|import|in|local|lock|meth", "mod|not|of|or|orelse|prepare|proc|prop|raise", "require|self|skip|then|thread|true|try|unit" meta delim "<" ">" cbracket = "{|}" comment start "%" symbol = "~","*","(",")","-","+","=","[","]","#",":", ",",".","/","?","&","<",">","\|" atom delim "'" "'" escape "\\" atom = '[a-z][[:alpha:][:digit:]]*' variable delim "`" "`" escape "\\" variable = '[A-Z][[:alpha:][:digit:]]*' string delim "\"" "\"" escape "\\" ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/javalog.style������������������������������������������������������������0000644�0001750�0001750�00000001776�11672675565�015242� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// Mark Silberbauer <mark@stonethree.com> // for javalog keyword red b; // for language keywords type green b ; // for basic types string red f ; // for strings and chars specialchar yellow ; // for special chars, e.g., \n, \t, \\ comment blue b; // for comments number blue ; // for literal numbers preproc darkblue b ; // for preproc directives (e.g. #include, import) symbol darkred ; // for simbols (e.g. <, >, +) function black b; // for function calls and declarations cbracket red; // for block brackets (e.g. {, }) todo b; // for TODO and FIXME // line numbers linenum black f; // Internet related url blue u, f; // other elements for ChangeLog and Log files date blue b ; time darkblue b ; ip darkgreen ; file darkblue b ; name darkgreen ; // for Prolog, Perl... variable darkgreen ; // explicit for Latex italics darkgreen i; bold darkgreen b; underline darkgreen u; fixed green f; argument darkgreen; optionalargument purple; math orange; // for diffs oldfile orange; newfile darkgreen; difflines blue; ��source-highlight-3.1.6/src/style2.style�������������������������������������������������������������0000644�0001750�0001750�00000000244�11672675565�015026� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������normal darkblue ; keyword blue b ; type darkgreen ; string red ; comment brown i ; number purple ; preproc teal b ; symbol darkred ; function black b; cbracket red;������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/htmltablelinenum.outlang�������������������������������������������������0000644�0001750�0001750�00000001371�11672675565�017463� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# this output format must be used with line numbers include "html_common.outlang" # line numbers are in a separate column (and start the column for the code) linenum "<td style=\"vertical-align: top;\">$text</td><td>" lineprefix "<tr>" doctemplate "<table BGCOLOR=\"$docbgcolor\" style=\"text-align: left; width: 100%;\" border=\"0\" cellpadding=\"2\" cellspacing=\"2\" NOSAVE > <tbody> <pre><tt>" "</tt></pre> </tbody> </table> " end nodoctemplate "<table BGCOLOR=\"$docbgcolor\" style=\"text-align: left; width: 100%;\" border=\"0\" cellpadding=\"2\" cellspacing=\"2\" NOSAVE > <tbody> <pre><tt>" "</tt></pre> </tbody> </table> " end # terminate each line by closing the table column and the table row translations "\n" "</td></tr>\n" end �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/extreme_comment.lang�����������������������������������������������������0000644�0001750�0001750�00000000212�11672675564�016552� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������environment comment start '^[[:blank:]]*#if[[:blank:]]+0' begin comment start '^[[:blank:]]*#(else|endif)' exit end include "cpp.lang" ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/tml_macrosdelayed1.lang��������������������������������������������������0000664�0001750�0001750�00000001033�11672675565�017135� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������environment keyword delim $DELAYEDMACROSTART $DELAYEDMACROEND multiline nested begin attribute = $MACROATTR keyword = $MACRO include "tml_macros2.lang" include "tml_macrosdelayed2.lang" environment string delim "\\\"" "\\\"" escape "\\\\" multiline begin keyword = $MACRO include "tml_macros2.lang" include "tml_macrosdelayed2.lang" include "tml_macrotokens.lang" include "tml_macrolinks.lang" include "tml_formatting.lang" end include "tml_macrotokens.lang" end �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/ruby.lang����������������������������������������������������������������0000644�0001750�0001750�00000001715�11672675565�014352� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������preproc = "require" include "number.lang" string delim "\"" "\"" escape "\\" string delim "'" "'" escape "\\" string delim "<" ">" regexp = '/[^\n]*/' (symbol,regexp) = `(%r)(\{(?:\\\}|#\{[[:alnum:]]+\}|[^}])*\})` keyword = "alias|begin|BEGIN|break|case|defined|do|else|elsif|end|END|ensure|for|if|in|include|loop|next|raise|redo|rescue|retry|return|super|then|undef|unless|until|when|while|yield|false|nil|self|true|__FILE__|__LINE__|and|not|or|def|class|module|catch|fail|load|throw" comment delim '(^\=begin)' '^(\=end)' multiline type = '(\$[#]?|@@|@)([[:word:]]+|\'|\"|/)' # don't highlight ? and ! as symbols if they are part of a method call normal = '[[:alnum:]]+(\?|!)' include "symbols.lang" # for variable interpolation, #{ is not a comment (symbol,cbracket) = `(#)(\{)` include "script_comment.lang" cbracket = "{|}" # no function highlighting for Ruby, since a method invocation # can be written even without parenthesis # include "function.lang" ���������������������������������������������������source-highlight-3.1.6/src/latex.outlang������������������������������������������������������������0000644�0001750�0001750�00000002045�11672675565�015233� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������extension "tex" doctemplate "% Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite \documentclass{article} $header \title{$title} \date{} \begin{document} \maketitle \noindent " " $footer \end{document} " end nodoctemplate "% Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite $header\noindent " " $footer" end bold "\textbf{$text}" italics "\textit{$text}" underline "\underline{$text}" fixed "\texttt{$text}" anchor "\label{$infilename:$linenum}$text" reference "{\hfill $text $\rightarrow$ $infile:$linenum, page~\pageref{$infilename:$linenum}}" lineprefix "\mbox{}" translations "_" "$\\_$" "{" "\\{" "}" "\\}" "<" "\\textless{}" ">" "\\textgreater{}" "&" "\\&" "\\" "\\textbackslash{}" "^" "\\textasciicircum{}" "~" "\\textasciitilde{}" "\n" " \\\\\n" #" " "\\hspace*{2ex} " #"\t" "\\hspace*{8ex} " " " "\\ " "\t" "\\ \\ \\ \\ \\ \\ \\ \\ " "%" "\\%" "#" "\\#" "$" "\\$" "|" "$|$" "---" "-\\/-\\/-" "--" "-\\/-" "\"" "\"{}" # avoids problems with some inputenc end�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/cpp2html.in��������������������������������������������������������������0000644�0001750�0001750�00000000050�11672675564�014575� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#! @SHELL@ @PACKAGE@ -s cpp -f html $* ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/mediawiki.outlang��������������������������������������������������������0000664�0001750�0001750�00000001320�11676047304�016042� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# who to blame for bugs in this file: Abe Skolnik # Abe`s internal version #: 5 include "html_ref.outlang" extension "html" bold "<b>$text</b>" italics "<i>$text</i>" underline "<u>$text</u>" color "<span style=\"color:$style;\">$text</span>" colormap "green" "#33CC00" "red" "#FF0000" "darkred" "#990000" "blue" "#0000FF" "brown" "#9A1900" "pink" "#CC33CC" "yellow" "#FFCC00" "cyan" "#66FFFF" "purple" "#993399" "orange" "#FF6600" "brightorange" "#FF9900" "brightgreen" "#33FF33" "darkgreen" "#009900" "black" "#000000" "teal" "#008080" "gray" "#808080" "darkblue" "#000080" "white" "#FFFFFF" default "#000000" end translations "&" "&amp;" "<" "&lt;" ">" "&gt;" "\n" "<br/>\n" " " "&nbsp;" "\t" "&nbsp;&nbsp;" end ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/manifest.lang������������������������������������������������������������0000644�0001750�0001750�00000000372�11672675565�015175� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# language definition for Manifest files include "script_comment.lang" comment start "!" (type,normal,symbol) = `([^="+:;]+)([[:blank:]]*)(:=)` include "number.lang" include "url.lang" (string,symbol) = `(^[^:;]+)(:)` regexp = '%([[:alnum:]]+)'����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/source-highlight-settings.cpp��������������������������������������������0000644�0001750�0001750�00000006646�11672675565�020345� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (C) 2007-2009 Lorenzo Bettini <http://www.lorenzobettini.it> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ /* * This program is part of GNU source-highlight */ #include <cstdlib> #include <iostream> #include "srchilite/settings.h" #include "srchilite/versions.h" #ifdef HAVE_CONFIG_H #include "config.h" // this is glib related so don't use it when compiling with qmake #include "progname.h" #else #define set_program_name(x) ; #endif using namespace std; using namespace srchilite; Settings settings; bool checkForTestFile() { bool checkForTestFile = settings.checkForTestFile(); if (!checkForTestFile) cout << "*** ERROR: "; cout << "it seems that the datadir " << (checkForTestFile ? "contains" : "does not contain") << " files for source-highlight" << endl; return checkForTestFile; } bool save() { SettingError error = settings.save(); if (error != NO_SETTING_ERROR) { cout << "cannot create configuration file: " << settings.getConfDir() + settings.getConfFileName() << endl; return false; } return true; } int main(int argc, char * argv[]) { set_program_name(argv[0]); string answer; cout << "source-highlight-settings" << endl; cout << "part of " << Versions::getCompleteVersion() << endl; string configurationFile = settings.getConfDir() + settings.getConfFileName(); cout << "configuration file: " << configurationFile << endl; if (!settings.checkForConfFile()) { cout << "The configuration file does not exist..." << endl; cout << "Creating a default one, with the value for datadir: " << Settings::retrieveDataDir() << endl; save(); } while (true) { if (!settings.readDataDir()) { cout << "the datadir is not specified in the configuration file" << endl; } else { cout << "the current datadir is: " << settings.getDataDir() << endl; checkForTestFile(); } cout << "Do you want to change the datadir and save the configuration file? [y/n] "; cin >> answer; if (answer != "y" && answer != "Y") { cout << "No configuration file modified" << endl; break; } cout << "Please enter the new path for datadir: "; cin >> answer; settings.setDataDir(answer); cout << "Checking " << settings.getDataDir() << endl; if (!checkForTestFile()) { continue; } if (!save()) { continue; } cout << "New configuration file saved: " << configurationFile << endl; break; } cout << "Thanks for using source-highlight! :-)" << endl; return EXIT_SUCCESS; } ������������������������������������������������������������������������������������������source-highlight-3.1.6/src/upc.lang�����������������������������������������������������������������0000644�0001750�0001750�00000000453�11672675565�014156� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# definitions for UPC # by Viraj Sinha <viraj@intrepid.com> # additional keywords and types with respect to C keyword = "shared|strict|relaxed", "upc_blocksizeof|upc_elemsizeof|upc_localsizeof", "upc_forall", "upc_barrier|upc_notify|upc_wait|upc_fence" type = "upc_lock_t" include "c.lang" ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/html_ref.outlang���������������������������������������������������������0000644�0001750�0001750�00000000440�11672675565�015713� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# for html references and anchors anchor "<a name=\"$linenum\">$text</a>" postline_reference "<a href=\"$outfile#$linenum\">$text -> $infile:$linenum</a>" postdoc_reference "<a href=\"$outfile#$linenum\">$text -> $infile:$linenum</a>" reference "<a href=\"$outfile#$linenum\">$text</a>" ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/check-regexp.cpp���������������������������������������������������������0000644�0001750�0001750�00000006724�11672675564�015603� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (C) 2007-2009 Lorenzo Bettini <http://www.lorenzobettini.it> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ /* * This program is part of GNU source-highlight simply to * check a regular expression against a given an expression */ /* * some examples: * ./check-regexp "([^[:alnum:]]+)[^[:blank:]]*(\1)[^[:blank:]]*(\1)" "|w|\$|e|d| ^w^w^ ?a?b?" trying to match: |w|$|e|d| ^w^w^ ?a?b? against : ([^[:alnum:]]+)[^[:blank:]]*(\1)[^[:blank:]]*(\1) what[0]: |w|$|e|d| what[1]: | what[2]: | what[3]: | prefix: what[0]: ^w^w^ what[1]: ^ what[2]: ^ what[3]: ^ prefix: what[0]: ?a?b? what[1]: ? what[2]: ? what[3]: ? total number of matches: 3 * */ #include <cstdlib> #include <boost/regex.hpp> #include <iostream> #include "progname.h" #include "check-regexp_cmd.h" using namespace std; int main(int argc, char * argv[]) { set_program_name(argv[0]); gengetopt_args_info args_info; // command line structure if (cmdline_parser(argc, argv, &args_info)!= 0) // calls cmdline parser. The user gived bag args if it doesn't return -1 return EXIT_FAILURE; if (args_info.inputs_num < 2) { cerr << "Syntax: check-regexp <regular expression> <expressions...>" << endl; exit(EXIT_FAILURE); } boost::regex regex(args_info.inputs[0]); for (unsigned int i = 1; i < args_info.inputs_num; ++i) { string tomatch = args_info.inputs[i]; std::string::const_iterator start, end; boost::match_results<std::string::const_iterator> what; boost::match_flag_type flags; start = tomatch.begin(); end = tomatch.end(); flags = boost::match_default; cout << "\nsearching : " << tomatch << endl; cout << "for the regexp : " << regex << endl; cout << "num of subexps : " << regex.mark_count() << endl; int num_of_matches = 0; while (boost::regex_search(start, end, what, regex, flags)) { string prefix = what.prefix(); if (prefix.size()) cout << "prefix: " << prefix << endl; cout << "what[0]: " << what[0] << endl; for (unsigned int i = 1; i < what.size(); ++i) { if (what[i].matched) { cout << " what[" << i << "]: "<< what[i] << endl; cout << " length: " << what[i].length()<< endl; } } string suffix = what.suffix(); if (suffix.size()) cout << "suffix: " << suffix << endl; // update search position: start = what[0].second; // update flags: flags |= boost::match_prev_avail; flags |= boost::match_not_bob; ++num_of_matches; } cout << "total number of matches: " << num_of_matches << endl; } } ��������������������������������������������source-highlight-3.1.6/src/esc.outlang��������������������������������������������������������������0000644�0001750�0001750�00000001665�11672675564�014676� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������extension "txt" styletemplate "\x1b[$stylem$text\x1b[m" styleseparator ";" bold "01$style" underline "04$style" italics "$style" color "$style" colormap "green" "32" "red" "31" "darkred" "31" "blue" "34" "brown" "31" "pink" "35" "yellow" "33" "cyan" "36" "purple" "35" "orange" "31" "brightorange" "31" "brightgreen" "32" "darkgreen" "32" "black" "30" "teal" "37" "gray" "37" "darkblue" "34" default "30;" end # Decorate text with terminal control sequences (escape sequences). # To set the attribute/fg_color/bg_color we need to print # "\033[AA;FF;BBm" # where AA is one of these: # 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed, # FF is one of these: # 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white # BB is one of these: # 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white # # Any of AA,FF,BB may be omited. # # To reset do default color/attribute we need to print # "\033[m" ���������������������������������������������������������������������������source-highlight-3.1.6/src/java2html.in�������������������������������������������������������������0000644�0001750�0001750�00000000051�11672675565�014736� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#! @SHELL@ @PACKAGE@ -s java -f html $* ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/source-highlight-cgi.cc��������������������������������������������������0000644�0001750�0001750�00000000065�11672675565�017037� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#define BUILD_AS_CGI #include "source-highlight.cc" ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/javascript.lang����������������������������������������������������������0000644�0001750�0001750�00000002013�11672675565�015527� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Javascript lang definition file # first check if the input matches a comment include "c_comment.lang" keyword = "abstract|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|false|final|finally|for|function|goto|if|implements|in|instanceof|interface|native|new|null|private|protected|prototype|public|return|static|super|switch|synchronized|throw|throws|this|transient|true|try|typeof|var|volatile|while|with" # next check if it matches a division operator, which can occur only # after a number, an identifier, or certain symbols (symbol,normal,symbol) = `(\+\+|--|\)|\])(\s*)(/=?(?![*/]))` (number,normal,symbol) = `(0x[[:xdigit:]]+|(?:[[:digit:]]*\.)?[[:digit:]]+(?:[eE][+-]?[[:digit:]]+)?)(\s*)(/(?![*/]))` (normal,symbol) = `([[:alpha:]$_][[:alnum:]$_]*\s*)(/=?(?![*/]))` # finally check if it matches a regular expression regexp = '/(\\.|[^*\\/])(\\.|[^\\/])*/[gim]*' include "number.lang" include "c_string.lang" include "symbols.lang" cbracket = "{|}" include "function.lang" ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/esc.style����������������������������������������������������������������0000644�0001750�0001750�00000001026�11672675564�014354� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������keyword blue b ; type, classname darkgreen ; string red ; regexp orange ; specialchar pink ; comment cyan i ; number purple ; preproc darkblue b ; symbol darkred ; function black b; cbracket red; variable darkgreen ; // line numbers linenum yellow; // other elements for ChangeLog and Log files date blue ; time darkblue ; ip darkgreen ; file darkblue ; name darkgreen ; // Internet related url blue u; // for diffs oldfile orange; newfile darkgreen; difflines blue; // for css selector purple; property blue; value darkgreen i;����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/properties.lang����������������������������������������������������������0000644�0001750�0001750�00000000226�11672675565�015561� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# highlighting for (Java) properties files include "script_comment.lang" comment start "!" (type,normal,symbol) = `([^="+]+)([[:blank:]]*)(\+?=)` ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/default.style������������������������������������������������������������0000644�0001750�0001750�00000003152�11672675564�015230� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������bgcolor "white"; // the background color for documents context gray; // the color for context lines (when specified with line ranges) keyword blue b ; // for language keywords type darkgreen ; // for basic types usertype teal ; // for user defined types string red f ; // for strings and chars regexp orange f ; // for strings and chars specialchar pink f ; // for special chars, e.g., \n, \t, \\ comment brown i, noref; // for comments number purple ; // for literal numbers preproc darkblue b ; // for preproc directives (e.g. #include, import) symbol darkred ; // for simbols (e.g. <, >, +) function black b; // for function calls and declarations cbracket red; // for block brackets (e.g. {, }) todo bg:cyan b; // for TODO and FIXME code bg:brightgreen b; // for code snippets //Predefined variables and functions (for instance glsl) predef_var darkblue ; predef_func darkblue b ; // for OOP classname teal ; // for class names, e.g., in Java and C++ // line numbers linenum black f; // Internet related url blue u, f; // other elements for ChangeLog and Log files date blue b ; time, file darkblue b ; ip, name darkgreen ; // for Prolog, Perl... variable darkgreen ; // explicit for Latex italics darkgreen i; bold darkgreen b; underline darkgreen u; fixed green f; argument darkgreen; optionalargument purple; math orange; bibtex blue; // for diffs oldfile orange; newfile darkgreen; difflines blue; // for css selector purple; property blue; value darkgreen i; // for oz atom orange; meta i; // for file system path orange; // for C (or other language) labels label teal b; // for errors error purple; warning darkgreen;����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/cmdline.c����������������������������������������������������������������0000644�0001750�0001750�00000234415�11675323763�014303� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* File autogenerated by gengetopt version 2.22.6 generated with the following command: /home/bettini/usr/local/bin/gengetopt --input ../../src/cmdline.ggo --unamed-opts --no-handle-help --no-handle-version --output-dir=../../src The developers of gengetopt consider the fixed text that goes in all gengetopt output files to be in the public domain: we make no copyright claims on it. */ /* If we use autoconf. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include <stdio.h> #include <stdlib.h> #include <string.h> #ifndef FIX_UNUSED #define FIX_UNUSED(X) (void) (X) /* avoid warnings for unused params */ #endif #include <getopt.h> #include "cmdline.h" const char *gengetopt_args_info_purpose = "Highlight the syntax of a source file (e.g. Java) into a specific format (e.g. \nHTML)"; const char *gengetopt_args_info_usage = "Usage: " CMDLINE_PARSER_PACKAGE " [OPTIONS]... < input_file > output_file\n source-highlight [OPTIONS]... -i input_file -o output_file\n source-highlight [OPTIONS]... [FILES]..."; const char *gengetopt_args_info_description = ""; const char *gengetopt_args_info_detailed_help[] = { " -h, --help Print help and exit", " --detailed-help Print help, including all details and hidden \n options, and exit", " -V, --version Print version and exit", " -i, --input=filename input file. default std input", " -o, --output=filename output file. default std output (when the third \n invocation form is used). If STDOUT is \n specified, the output is directed to standard \n output", "\nyou can simply specify some files at the command line and also use regular \nexpressions (for instance *.java). In this case the name for the output files \nwill be formed using the name of the source file with a .<ext> appended, where \n<ext> is the extension chosen according to the output format specified (for \ninstance .html).\n", " -s, --src-lang=STRING source language (use --lang-list to get the \n complete list). If not specified, the source \n language will be guessed from the file \n extension.", " --lang-list list all the supported language and associated \n language definition file", " --outlang-list list all the supported output language and \n associated language definition file", " -f, --out-format=STRING output format (use --outlang-list to get the \n complete list) (default=`html')", " -d, --doc create an output file that can be used as a \n stand alone document (e.g., not to be \n included in another one)", " --no-doc cancel the --doc option even if it is implied \n (e.g., when css is given)", " -c, --css=filename the external style sheet filename. Implies \n --doc", " -T, --title=STRING give a title to the output document. Implies \n --doc", " -t, --tab=INT specify tab length. (default=`8')", " -H, --header=filename file to insert as header", " -F, --footer=filename file to insert as footer", " --style-file=filename specify the file containing format options \n (default=`default.style')", " --style-css-file=filename specify the file containing format options (in \n css syntax)", " --style-defaults=filename specify the file containing defaults for format \n options (default=`style.defaults')", " --outlang-def=filename output language definition file", " --outlang-map=filename output language map file \n (default=`outlang.map')", " --data-dir=path directory where language definition files and \n language maps are searched for. If not \n specified these files are searched for in the \n current directory and in the data dir \n installation directory", " --output-dir=path output directory", " --lang-def=filename language definition file", " --lang-map=filename language map file (default=`lang.map')", " --show-lang-elements=filename\n prints the language elements that are defined \n in the language definition file", " --infer-lang force to infer source script language \n (overriding given language specification)", "\nLines:", " -n, --line-number[=padding] number all output lines, using the specified \n padding character (default=`0')", " --line-number-ref[=prefix]\n number all output lines and generate an anchor, \n made of the specified prefix + the line \n number (default=`line')", "\nFiltering output:", "\n Mode: linerange\n specifying line ranges", " --line-range=STRING generate only the lines in the specified \n range(s)", " each range can be of the shape: \n single line (e.g., --line-range=50)\n full range (e.g., --line-range=2-10)\n partial range (e.g., --line-range=-30, first 30 lines, \n --line-range=40- from line 40 to the end\n", " --range-separator=STRING the optional separator to be printed among \n ranges (e.g., \"...\")", " --range-context=INT number of (context) lines generated even if not \n in range", " The optional --range-context specifies the number of lines that are not in\n range that will be printed anyway (before and after the lines in range);\n These lines will be formatted according to the \"context\" style.\n", "\n Mode: regexrange\n specifying regular expression delimited ranges", " --regex-range=STRING generate only the lines within the specified \n regular expressions", " when a line containing the specified regular expression is found, then\n the lines after this one are actually generated, until another line, \n containing the same regular expression is found (this last line is not \n generated).\n More than one regular expression can be specified.", "\nreference generation:", " --gen-references=STRING generate references (possible \n values=\"inline\", \"postline\", \"postdoc\" \n default=`inline')", " --ctags-file=filename specify the file generated by ctags that will \n be used to generate references \n (default=`tags')", " --ctags=cmd how to run the ctags command. If this option \n is not specified, ctags will be executed with \n the default value. If it is specified with \n an empty string, ctags will not be executed \n at all (default=`ctags --excmd=n \n --tag-relative=yes')", "\ntesting:", " -v, --verbose verbose mode on", " -q, --quiet print no progress information", " --binary-output write output files in binary mode", " This is useful for testing purposes, since you may want to make\n sure that output files are always generated with a final newline character \n only", " --statistics print some statistics (i.e., elapsed time)", " --gen-version put source-highlight version in the generated \n file (default=on)", " --check-lang=filename only check the correctness of a language \n definition file", " --check-outlang=filename only check the correctness of an output \n language definition file", " --failsafe if no language definition is found for the \n input, it is simply copied to the output", " -g, --debug-langdef[=type] debug a language definition. In dump mode just \n dumps all the steps; in interactive, at each \n step, waits for some input (press ENTER to \n step) (possible values=\"interactive\", \n \"dump\" default=`dump')", " --show-regex=filename show the regular expression automaton \n corresponding to a language definition file", 0 }; static void init_help_array(void) { gengetopt_args_info_help[0] = gengetopt_args_info_detailed_help[0]; gengetopt_args_info_help[1] = gengetopt_args_info_detailed_help[1]; gengetopt_args_info_help[2] = gengetopt_args_info_detailed_help[2]; gengetopt_args_info_help[3] = gengetopt_args_info_detailed_help[3]; gengetopt_args_info_help[4] = gengetopt_args_info_detailed_help[4]; gengetopt_args_info_help[5] = gengetopt_args_info_detailed_help[5]; gengetopt_args_info_help[6] = gengetopt_args_info_detailed_help[6]; gengetopt_args_info_help[7] = gengetopt_args_info_detailed_help[7]; gengetopt_args_info_help[8] = gengetopt_args_info_detailed_help[8]; gengetopt_args_info_help[9] = gengetopt_args_info_detailed_help[9]; gengetopt_args_info_help[10] = gengetopt_args_info_detailed_help[10]; gengetopt_args_info_help[11] = gengetopt_args_info_detailed_help[11]; gengetopt_args_info_help[12] = gengetopt_args_info_detailed_help[12]; gengetopt_args_info_help[13] = gengetopt_args_info_detailed_help[13]; gengetopt_args_info_help[14] = gengetopt_args_info_detailed_help[14]; gengetopt_args_info_help[15] = gengetopt_args_info_detailed_help[15]; gengetopt_args_info_help[16] = gengetopt_args_info_detailed_help[16]; gengetopt_args_info_help[17] = gengetopt_args_info_detailed_help[17]; gengetopt_args_info_help[18] = gengetopt_args_info_detailed_help[18]; gengetopt_args_info_help[19] = gengetopt_args_info_detailed_help[19]; gengetopt_args_info_help[20] = gengetopt_args_info_detailed_help[20]; gengetopt_args_info_help[21] = gengetopt_args_info_detailed_help[21]; gengetopt_args_info_help[22] = gengetopt_args_info_detailed_help[22]; gengetopt_args_info_help[23] = gengetopt_args_info_detailed_help[23]; gengetopt_args_info_help[24] = gengetopt_args_info_detailed_help[24]; gengetopt_args_info_help[25] = gengetopt_args_info_detailed_help[25]; gengetopt_args_info_help[26] = gengetopt_args_info_detailed_help[26]; gengetopt_args_info_help[27] = gengetopt_args_info_detailed_help[27]; gengetopt_args_info_help[28] = gengetopt_args_info_detailed_help[28]; gengetopt_args_info_help[29] = gengetopt_args_info_detailed_help[29]; gengetopt_args_info_help[30] = gengetopt_args_info_detailed_help[30]; gengetopt_args_info_help[31] = gengetopt_args_info_detailed_help[31]; gengetopt_args_info_help[32] = gengetopt_args_info_detailed_help[32]; gengetopt_args_info_help[33] = gengetopt_args_info_detailed_help[33]; gengetopt_args_info_help[34] = gengetopt_args_info_detailed_help[35]; gengetopt_args_info_help[35] = gengetopt_args_info_detailed_help[36]; gengetopt_args_info_help[36] = gengetopt_args_info_detailed_help[38]; gengetopt_args_info_help[37] = gengetopt_args_info_detailed_help[39]; gengetopt_args_info_help[38] = gengetopt_args_info_detailed_help[41]; gengetopt_args_info_help[39] = gengetopt_args_info_detailed_help[42]; gengetopt_args_info_help[40] = gengetopt_args_info_detailed_help[43]; gengetopt_args_info_help[41] = gengetopt_args_info_detailed_help[44]; gengetopt_args_info_help[42] = gengetopt_args_info_detailed_help[45]; gengetopt_args_info_help[43] = gengetopt_args_info_detailed_help[46]; gengetopt_args_info_help[44] = gengetopt_args_info_detailed_help[47]; gengetopt_args_info_help[45] = gengetopt_args_info_detailed_help[48]; gengetopt_args_info_help[46] = gengetopt_args_info_detailed_help[50]; gengetopt_args_info_help[47] = gengetopt_args_info_detailed_help[51]; gengetopt_args_info_help[48] = gengetopt_args_info_detailed_help[52]; gengetopt_args_info_help[49] = gengetopt_args_info_detailed_help[53]; gengetopt_args_info_help[50] = gengetopt_args_info_detailed_help[54]; gengetopt_args_info_help[51] = gengetopt_args_info_detailed_help[55]; gengetopt_args_info_help[52] = gengetopt_args_info_detailed_help[56]; gengetopt_args_info_help[53] = 0; } const char *gengetopt_args_info_help[54]; typedef enum {ARG_NO , ARG_FLAG , ARG_STRING , ARG_INT } cmdline_parser_arg_type; static void clear_given (struct gengetopt_args_info *args_info); static void clear_args (struct gengetopt_args_info *args_info); static int cmdline_parser_internal (int argc, char **argv, struct gengetopt_args_info *args_info, struct cmdline_parser_params *params, const char *additional_error); static int cmdline_parser_required2 (struct gengetopt_args_info *args_info, const char *prog_name, const char *additional_error); const char *cmdline_parser_gen_references_values[] = {"inline", "postline", "postdoc", 0}; /*< Possible values for gen-references. */ const char *cmdline_parser_debug_langdef_values[] = {"interactive", "dump", 0}; /*< Possible values for debug-langdef. */ static char * gengetopt_strdup (const char *s); static void clear_given (struct gengetopt_args_info *args_info) { args_info->help_given = 0 ; args_info->detailed_help_given = 0 ; args_info->version_given = 0 ; args_info->input_given = 0 ; args_info->output_given = 0 ; args_info->src_lang_given = 0 ; args_info->lang_list_given = 0 ; args_info->outlang_list_given = 0 ; args_info->out_format_given = 0 ; args_info->doc_given = 0 ; args_info->no_doc_given = 0 ; args_info->css_given = 0 ; args_info->title_given = 0 ; args_info->tab_given = 0 ; args_info->header_given = 0 ; args_info->footer_given = 0 ; args_info->style_file_given = 0 ; args_info->style_css_file_given = 0 ; args_info->style_defaults_given = 0 ; args_info->outlang_def_given = 0 ; args_info->outlang_map_given = 0 ; args_info->data_dir_given = 0 ; args_info->output_dir_given = 0 ; args_info->lang_def_given = 0 ; args_info->lang_map_given = 0 ; args_info->show_lang_elements_given = 0 ; args_info->infer_lang_given = 0 ; args_info->line_number_given = 0 ; args_info->line_number_ref_given = 0 ; args_info->line_range_given = 0 ; args_info->range_separator_given = 0 ; args_info->range_context_given = 0 ; args_info->regex_range_given = 0 ; args_info->gen_references_given = 0 ; args_info->ctags_file_given = 0 ; args_info->ctags_given = 0 ; args_info->verbose_given = 0 ; args_info->quiet_given = 0 ; args_info->binary_output_given = 0 ; args_info->statistics_given = 0 ; args_info->gen_version_given = 0 ; args_info->check_lang_given = 0 ; args_info->check_outlang_given = 0 ; args_info->failsafe_given = 0 ; args_info->debug_langdef_given = 0 ; args_info->show_regex_given = 0 ; args_info->linerange_mode_counter = 0 ; args_info->regexrange_mode_counter = 0 ; } static void clear_args (struct gengetopt_args_info *args_info) { FIX_UNUSED (args_info); args_info->input_arg = NULL; args_info->input_orig = NULL; args_info->output_arg = NULL; args_info->output_orig = NULL; args_info->src_lang_arg = NULL; args_info->src_lang_orig = NULL; args_info->out_format_arg = gengetopt_strdup ("html"); args_info->out_format_orig = NULL; args_info->css_arg = NULL; args_info->css_orig = NULL; args_info->title_arg = NULL; args_info->title_orig = NULL; args_info->tab_arg = 8; args_info->tab_orig = NULL; args_info->header_arg = NULL; args_info->header_orig = NULL; args_info->footer_arg = NULL; args_info->footer_orig = NULL; args_info->style_file_arg = gengetopt_strdup ("default.style"); args_info->style_file_orig = NULL; args_info->style_css_file_arg = NULL; args_info->style_css_file_orig = NULL; args_info->style_defaults_arg = gengetopt_strdup ("style.defaults"); args_info->style_defaults_orig = NULL; args_info->outlang_def_arg = NULL; args_info->outlang_def_orig = NULL; args_info->outlang_map_arg = gengetopt_strdup ("outlang.map"); args_info->outlang_map_orig = NULL; args_info->data_dir_arg = NULL; args_info->data_dir_orig = NULL; args_info->output_dir_arg = NULL; args_info->output_dir_orig = NULL; args_info->lang_def_arg = NULL; args_info->lang_def_orig = NULL; args_info->lang_map_arg = gengetopt_strdup ("lang.map"); args_info->lang_map_orig = NULL; args_info->show_lang_elements_arg = NULL; args_info->show_lang_elements_orig = NULL; args_info->line_number_arg = gengetopt_strdup ("0"); args_info->line_number_orig = NULL; args_info->line_number_ref_arg = gengetopt_strdup ("line"); args_info->line_number_ref_orig = NULL; args_info->line_range_arg = NULL; args_info->line_range_orig = NULL; args_info->range_separator_arg = NULL; args_info->range_separator_orig = NULL; args_info->range_context_orig = NULL; args_info->regex_range_arg = NULL; args_info->regex_range_orig = NULL; args_info->gen_references_arg = gengetopt_strdup ("inline"); args_info->gen_references_orig = NULL; args_info->ctags_file_arg = gengetopt_strdup ("tags"); args_info->ctags_file_orig = NULL; args_info->ctags_arg = gengetopt_strdup ("ctags --excmd=n --tag-relative=yes"); args_info->ctags_orig = NULL; args_info->gen_version_flag = 1; args_info->check_lang_arg = NULL; args_info->check_lang_orig = NULL; args_info->check_outlang_arg = NULL; args_info->check_outlang_orig = NULL; args_info->debug_langdef_arg = gengetopt_strdup ("dump"); args_info->debug_langdef_orig = NULL; args_info->show_regex_arg = NULL; args_info->show_regex_orig = NULL; } static void init_args_info(struct gengetopt_args_info *args_info) { init_help_array(); args_info->help_help = gengetopt_args_info_detailed_help[0] ; args_info->detailed_help_help = gengetopt_args_info_detailed_help[1] ; args_info->version_help = gengetopt_args_info_detailed_help[2] ; args_info->input_help = gengetopt_args_info_detailed_help[3] ; args_info->output_help = gengetopt_args_info_detailed_help[4] ; args_info->src_lang_help = gengetopt_args_info_detailed_help[6] ; args_info->lang_list_help = gengetopt_args_info_detailed_help[7] ; args_info->outlang_list_help = gengetopt_args_info_detailed_help[8] ; args_info->out_format_help = gengetopt_args_info_detailed_help[9] ; args_info->doc_help = gengetopt_args_info_detailed_help[10] ; args_info->no_doc_help = gengetopt_args_info_detailed_help[11] ; args_info->css_help = gengetopt_args_info_detailed_help[12] ; args_info->title_help = gengetopt_args_info_detailed_help[13] ; args_info->tab_help = gengetopt_args_info_detailed_help[14] ; args_info->header_help = gengetopt_args_info_detailed_help[15] ; args_info->footer_help = gengetopt_args_info_detailed_help[16] ; args_info->style_file_help = gengetopt_args_info_detailed_help[17] ; args_info->style_css_file_help = gengetopt_args_info_detailed_help[18] ; args_info->style_defaults_help = gengetopt_args_info_detailed_help[19] ; args_info->outlang_def_help = gengetopt_args_info_detailed_help[20] ; args_info->outlang_map_help = gengetopt_args_info_detailed_help[21] ; args_info->data_dir_help = gengetopt_args_info_detailed_help[22] ; args_info->output_dir_help = gengetopt_args_info_detailed_help[23] ; args_info->lang_def_help = gengetopt_args_info_detailed_help[24] ; args_info->lang_map_help = gengetopt_args_info_detailed_help[25] ; args_info->show_lang_elements_help = gengetopt_args_info_detailed_help[26] ; args_info->infer_lang_help = gengetopt_args_info_detailed_help[27] ; args_info->line_number_help = gengetopt_args_info_detailed_help[29] ; args_info->line_number_ref_help = gengetopt_args_info_detailed_help[30] ; args_info->line_range_help = gengetopt_args_info_detailed_help[33] ; args_info->line_range_min = 0; args_info->line_range_max = 0; args_info->range_separator_help = gengetopt_args_info_detailed_help[35] ; args_info->range_context_help = gengetopt_args_info_detailed_help[36] ; args_info->regex_range_help = gengetopt_args_info_detailed_help[39] ; args_info->regex_range_min = 0; args_info->regex_range_max = 0; args_info->gen_references_help = gengetopt_args_info_detailed_help[42] ; args_info->ctags_file_help = gengetopt_args_info_detailed_help[43] ; args_info->ctags_help = gengetopt_args_info_detailed_help[44] ; args_info->verbose_help = gengetopt_args_info_detailed_help[46] ; args_info->quiet_help = gengetopt_args_info_detailed_help[47] ; args_info->binary_output_help = gengetopt_args_info_detailed_help[48] ; args_info->statistics_help = gengetopt_args_info_detailed_help[50] ; args_info->gen_version_help = gengetopt_args_info_detailed_help[51] ; args_info->check_lang_help = gengetopt_args_info_detailed_help[52] ; args_info->check_outlang_help = gengetopt_args_info_detailed_help[53] ; args_info->failsafe_help = gengetopt_args_info_detailed_help[54] ; args_info->debug_langdef_help = gengetopt_args_info_detailed_help[55] ; args_info->show_regex_help = gengetopt_args_info_detailed_help[56] ; } void cmdline_parser_print_version (void) { printf ("%s %s\n", (strlen(CMDLINE_PARSER_PACKAGE_NAME) ? CMDLINE_PARSER_PACKAGE_NAME : CMDLINE_PARSER_PACKAGE), CMDLINE_PARSER_VERSION); } static void print_help_common(void) { cmdline_parser_print_version (); if (strlen(gengetopt_args_info_purpose) > 0) printf("\n%s\n", gengetopt_args_info_purpose); if (strlen(gengetopt_args_info_usage) > 0) printf("\n%s\n", gengetopt_args_info_usage); printf("\n"); if (strlen(gengetopt_args_info_description) > 0) printf("%s\n\n", gengetopt_args_info_description); } void cmdline_parser_print_help (void) { int i = 0; print_help_common(); while (gengetopt_args_info_help[i]) printf("%s\n", gengetopt_args_info_help[i++]); } void cmdline_parser_print_detailed_help (void) { int i = 0; print_help_common(); while (gengetopt_args_info_detailed_help[i]) printf("%s\n", gengetopt_args_info_detailed_help[i++]); } void cmdline_parser_init (struct gengetopt_args_info *args_info) { clear_given (args_info); clear_args (args_info); init_args_info (args_info); args_info->inputs = 0; args_info->inputs_num = 0; } void cmdline_parser_params_init(struct cmdline_parser_params *params) { if (params) { params->override = 0; params->initialize = 1; params->check_required = 1; params->check_ambiguity = 0; params->print_errors = 1; } } struct cmdline_parser_params * cmdline_parser_params_create(void) { struct cmdline_parser_params *params = (struct cmdline_parser_params *)malloc(sizeof(struct cmdline_parser_params)); cmdline_parser_params_init(params); return params; } static void free_string_field (char **s) { if (*s) { free (*s); *s = 0; } } /** @brief generic value variable */ union generic_value { int int_arg; char *string_arg; const char *default_string_arg; }; /** @brief holds temporary values for multiple options */ struct generic_list { union generic_value arg; char *orig; struct generic_list *next; }; /** * @brief add a node at the head of the list */ static void add_node(struct generic_list **list) { struct generic_list *new_node = (struct generic_list *) malloc (sizeof (struct generic_list)); new_node->next = *list; *list = new_node; new_node->arg.string_arg = 0; new_node->orig = 0; } static void free_multiple_string_field(unsigned int len, char ***arg, char ***orig) { unsigned int i; if (*arg) { for (i = 0; i < len; ++i) { free_string_field(&((*arg)[i])); free_string_field(&((*orig)[i])); } free_string_field(&((*arg)[0])); /* free default string */ free (*arg); *arg = 0; free (*orig); *orig = 0; } } static void cmdline_parser_release (struct gengetopt_args_info *args_info) { unsigned int i; free_string_field (&(args_info->input_arg)); free_string_field (&(args_info->input_orig)); free_string_field (&(args_info->output_arg)); free_string_field (&(args_info->output_orig)); free_string_field (&(args_info->src_lang_arg)); free_string_field (&(args_info->src_lang_orig)); free_string_field (&(args_info->out_format_arg)); free_string_field (&(args_info->out_format_orig)); free_string_field (&(args_info->css_arg)); free_string_field (&(args_info->css_orig)); free_string_field (&(args_info->title_arg)); free_string_field (&(args_info->title_orig)); free_string_field (&(args_info->tab_orig)); free_string_field (&(args_info->header_arg)); free_string_field (&(args_info->header_orig)); free_string_field (&(args_info->footer_arg)); free_string_field (&(args_info->footer_orig)); free_string_field (&(args_info->style_file_arg)); free_string_field (&(args_info->style_file_orig)); free_string_field (&(args_info->style_css_file_arg)); free_string_field (&(args_info->style_css_file_orig)); free_string_field (&(args_info->style_defaults_arg)); free_string_field (&(args_info->style_defaults_orig)); free_string_field (&(args_info->outlang_def_arg)); free_string_field (&(args_info->outlang_def_orig)); free_string_field (&(args_info->outlang_map_arg)); free_string_field (&(args_info->outlang_map_orig)); free_string_field (&(args_info->data_dir_arg)); free_string_field (&(args_info->data_dir_orig)); free_string_field (&(args_info->output_dir_arg)); free_string_field (&(args_info->output_dir_orig)); free_string_field (&(args_info->lang_def_arg)); free_string_field (&(args_info->lang_def_orig)); free_string_field (&(args_info->lang_map_arg)); free_string_field (&(args_info->lang_map_orig)); free_string_field (&(args_info->show_lang_elements_arg)); free_string_field (&(args_info->show_lang_elements_orig)); free_string_field (&(args_info->line_number_arg)); free_string_field (&(args_info->line_number_orig)); free_string_field (&(args_info->line_number_ref_arg)); free_string_field (&(args_info->line_number_ref_orig)); free_multiple_string_field (args_info->line_range_given, &(args_info->line_range_arg), &(args_info->line_range_orig)); free_string_field (&(args_info->range_separator_arg)); free_string_field (&(args_info->range_separator_orig)); free_string_field (&(args_info->range_context_orig)); free_multiple_string_field (args_info->regex_range_given, &(args_info->regex_range_arg), &(args_info->regex_range_orig)); free_string_field (&(args_info->gen_references_arg)); free_string_field (&(args_info->gen_references_orig)); free_string_field (&(args_info->ctags_file_arg)); free_string_field (&(args_info->ctags_file_orig)); free_string_field (&(args_info->ctags_arg)); free_string_field (&(args_info->ctags_orig)); free_string_field (&(args_info->check_lang_arg)); free_string_field (&(args_info->check_lang_orig)); free_string_field (&(args_info->check_outlang_arg)); free_string_field (&(args_info->check_outlang_orig)); free_string_field (&(args_info->debug_langdef_arg)); free_string_field (&(args_info->debug_langdef_orig)); free_string_field (&(args_info->show_regex_arg)); free_string_field (&(args_info->show_regex_orig)); for (i = 0; i < args_info->inputs_num; ++i) free (args_info->inputs [i]); if (args_info->inputs_num) free (args_info->inputs); clear_given (args_info); } /** * @param val the value to check * @param values the possible values * @return the index of the matched value: * -1 if no value matched, * -2 if more than one value has matched */ static int check_possible_values(const char *val, const char *values[]) { int i, found, last; size_t len; if (!val) /* otherwise strlen() crashes below */ return -1; /* -1 means no argument for the option */ found = last = 0; for (i = 0, len = strlen(val); values[i]; ++i) { if (strncmp(val, values[i], len) == 0) { ++found; last = i; if (strlen(values[i]) == len) return i; /* exact macth no need to check more */ } } if (found == 1) /* one match: OK */ return last; return (found ? -2 : -1); /* return many values or none matched */ } static void write_into_file(FILE *outfile, const char *opt, const char *arg, const char *values[]) { int found = -1; if (arg) { if (values) { found = check_possible_values(arg, values); } if (found >= 0) fprintf(outfile, "%s=\"%s\" # %s\n", opt, arg, values[found]); else fprintf(outfile, "%s=\"%s\"\n", opt, arg); } else { fprintf(outfile, "%s\n", opt); } } static void write_multiple_into_file(FILE *outfile, int len, const char *opt, char **arg, const char *values[]) { int i; for (i = 0; i < len; ++i) write_into_file(outfile, opt, (arg ? arg[i] : 0), values); } int cmdline_parser_dump(FILE *outfile, struct gengetopt_args_info *args_info) { int i = 0; if (!outfile) { fprintf (stderr, "%s: cannot dump options to stream\n", CMDLINE_PARSER_PACKAGE); return EXIT_FAILURE; } if (args_info->help_given) write_into_file(outfile, "help", 0, 0 ); if (args_info->detailed_help_given) write_into_file(outfile, "detailed-help", 0, 0 ); if (args_info->version_given) write_into_file(outfile, "version", 0, 0 ); if (args_info->input_given) write_into_file(outfile, "input", args_info->input_orig, 0); if (args_info->output_given) write_into_file(outfile, "output", args_info->output_orig, 0); if (args_info->src_lang_given) write_into_file(outfile, "src-lang", args_info->src_lang_orig, 0); if (args_info->lang_list_given) write_into_file(outfile, "lang-list", 0, 0 ); if (args_info->outlang_list_given) write_into_file(outfile, "outlang-list", 0, 0 ); if (args_info->out_format_given) write_into_file(outfile, "out-format", args_info->out_format_orig, 0); if (args_info->doc_given) write_into_file(outfile, "doc", 0, 0 ); if (args_info->no_doc_given) write_into_file(outfile, "no-doc", 0, 0 ); if (args_info->css_given) write_into_file(outfile, "css", args_info->css_orig, 0); if (args_info->title_given) write_into_file(outfile, "title", args_info->title_orig, 0); if (args_info->tab_given) write_into_file(outfile, "tab", args_info->tab_orig, 0); if (args_info->header_given) write_into_file(outfile, "header", args_info->header_orig, 0); if (args_info->footer_given) write_into_file(outfile, "footer", args_info->footer_orig, 0); if (args_info->style_file_given) write_into_file(outfile, "style-file", args_info->style_file_orig, 0); if (args_info->style_css_file_given) write_into_file(outfile, "style-css-file", args_info->style_css_file_orig, 0); if (args_info->style_defaults_given) write_into_file(outfile, "style-defaults", args_info->style_defaults_orig, 0); if (args_info->outlang_def_given) write_into_file(outfile, "outlang-def", args_info->outlang_def_orig, 0); if (args_info->outlang_map_given) write_into_file(outfile, "outlang-map", args_info->outlang_map_orig, 0); if (args_info->data_dir_given) write_into_file(outfile, "data-dir", args_info->data_dir_orig, 0); if (args_info->output_dir_given) write_into_file(outfile, "output-dir", args_info->output_dir_orig, 0); if (args_info->lang_def_given) write_into_file(outfile, "lang-def", args_info->lang_def_orig, 0); if (args_info->lang_map_given) write_into_file(outfile, "lang-map", args_info->lang_map_orig, 0); if (args_info->show_lang_elements_given) write_into_file(outfile, "show-lang-elements", args_info->show_lang_elements_orig, 0); if (args_info->infer_lang_given) write_into_file(outfile, "infer-lang", 0, 0 ); if (args_info->line_number_given) write_into_file(outfile, "line-number", args_info->line_number_orig, 0); if (args_info->line_number_ref_given) write_into_file(outfile, "line-number-ref", args_info->line_number_ref_orig, 0); write_multiple_into_file(outfile, args_info->line_range_given, "line-range", args_info->line_range_orig, 0); if (args_info->range_separator_given) write_into_file(outfile, "range-separator", args_info->range_separator_orig, 0); if (args_info->range_context_given) write_into_file(outfile, "range-context", args_info->range_context_orig, 0); write_multiple_into_file(outfile, args_info->regex_range_given, "regex-range", args_info->regex_range_orig, 0); if (args_info->gen_references_given) write_into_file(outfile, "gen-references", args_info->gen_references_orig, cmdline_parser_gen_references_values); if (args_info->ctags_file_given) write_into_file(outfile, "ctags-file", args_info->ctags_file_orig, 0); if (args_info->ctags_given) write_into_file(outfile, "ctags", args_info->ctags_orig, 0); if (args_info->verbose_given) write_into_file(outfile, "verbose", 0, 0 ); if (args_info->quiet_given) write_into_file(outfile, "quiet", 0, 0 ); if (args_info->binary_output_given) write_into_file(outfile, "binary-output", 0, 0 ); if (args_info->statistics_given) write_into_file(outfile, "statistics", 0, 0 ); if (args_info->gen_version_given) write_into_file(outfile, "gen-version", 0, 0 ); if (args_info->check_lang_given) write_into_file(outfile, "check-lang", args_info->check_lang_orig, 0); if (args_info->check_outlang_given) write_into_file(outfile, "check-outlang", args_info->check_outlang_orig, 0); if (args_info->failsafe_given) write_into_file(outfile, "failsafe", 0, 0 ); if (args_info->debug_langdef_given) write_into_file(outfile, "debug-langdef", args_info->debug_langdef_orig, cmdline_parser_debug_langdef_values); if (args_info->show_regex_given) write_into_file(outfile, "show-regex", args_info->show_regex_orig, 0); i = EXIT_SUCCESS; return i; } int cmdline_parser_file_save(const char *filename, struct gengetopt_args_info *args_info) { FILE *outfile; int i = 0; outfile = fopen(filename, "w"); if (!outfile) { fprintf (stderr, "%s: cannot open file for writing: %s\n", CMDLINE_PARSER_PACKAGE, filename); return EXIT_FAILURE; } i = cmdline_parser_dump(outfile, args_info); fclose (outfile); return i; } void cmdline_parser_free (struct gengetopt_args_info *args_info) { cmdline_parser_release (args_info); } /** @brief replacement of strdup, which is not standard */ char * gengetopt_strdup (const char *s) { char *result = 0; if (!s) return result; result = (char*)malloc(strlen(s) + 1); if (result == (char*)0) return (char*)0; strcpy(result, s); return result; } static char * get_multiple_arg_token(const char *arg) { const char *tok; char *ret; size_t len, num_of_escape, i, j; if (!arg) return 0; tok = strchr (arg, ','); num_of_escape = 0; /* make sure it is not escaped */ while (tok) { if (*(tok-1) == '\\') { /* find the next one */ tok = strchr (tok+1, ','); ++num_of_escape; } else break; } if (tok) len = (size_t)(tok - arg + 1); else len = strlen (arg) + 1; len -= num_of_escape; ret = (char *) malloc (len); i = 0; j = 0; while (arg[i] && (j < len-1)) { if (arg[i] == '\\' && arg[ i + 1 ] && arg[ i + 1 ] == ',') ++i; ret[j++] = arg[i++]; } ret[len-1] = '\0'; return ret; } static const char * get_multiple_arg_token_next(const char *arg) { const char *tok; if (!arg) return 0; tok = strchr (arg, ','); /* make sure it is not escaped */ while (tok) { if (*(tok-1) == '\\') { /* find the next one */ tok = strchr (tok+1, ','); } else break; } if (! tok || strlen(tok) == 1) return 0; return tok+1; } static int check_multiple_option_occurrences(const char *prog_name, unsigned int option_given, unsigned int min, unsigned int max, const char *option_desc); int check_multiple_option_occurrences(const char *prog_name, unsigned int option_given, unsigned int min, unsigned int max, const char *option_desc) { int error = 0; if (option_given && (min > 0 || max > 0)) { if (min > 0 && max > 0) { if (min == max) { /* specific occurrences */ if (option_given != (unsigned int) min) { fprintf (stderr, "%s: %s option occurrences must be %d\n", prog_name, option_desc, min); error = 1; } } else if (option_given < (unsigned int) min || option_given > (unsigned int) max) { /* range occurrences */ fprintf (stderr, "%s: %s option occurrences must be between %d and %d\n", prog_name, option_desc, min, max); error = 1; } } else if (min > 0) { /* at least check */ if (option_given < min) { fprintf (stderr, "%s: %s option occurrences must be at least %d\n", prog_name, option_desc, min); error = 1; } } else if (max > 0) { /* at most check */ if (option_given > max) { fprintf (stderr, "%s: %s option occurrences must be at most %d\n", prog_name, option_desc, max); error = 1; } } } return error; } int cmdline_parser (int argc, char **argv, struct gengetopt_args_info *args_info) { return cmdline_parser2 (argc, argv, args_info, 0, 1, 1); } int cmdline_parser_ext (int argc, char **argv, struct gengetopt_args_info *args_info, struct cmdline_parser_params *params) { int result; result = cmdline_parser_internal (argc, argv, args_info, params, 0); if (result == EXIT_FAILURE) { cmdline_parser_free (args_info); exit (EXIT_FAILURE); } return result; } int cmdline_parser2 (int argc, char **argv, struct gengetopt_args_info *args_info, int override, int initialize, int check_required) { int result; struct cmdline_parser_params params; params.override = override; params.initialize = initialize; params.check_required = check_required; params.check_ambiguity = 0; params.print_errors = 1; result = cmdline_parser_internal (argc, argv, args_info, &params, 0); if (result == EXIT_FAILURE) { cmdline_parser_free (args_info); exit (EXIT_FAILURE); } return result; } int cmdline_parser_required (struct gengetopt_args_info *args_info, const char *prog_name) { int result = EXIT_SUCCESS; if (cmdline_parser_required2(args_info, prog_name, 0) > 0) result = EXIT_FAILURE; if (result == EXIT_FAILURE) { cmdline_parser_free (args_info); exit (EXIT_FAILURE); } return result; } int cmdline_parser_required2 (struct gengetopt_args_info *args_info, const char *prog_name, const char *additional_error) { int error = 0; FIX_UNUSED (additional_error); /* checks for required options */ if (args_info->linerange_mode_counter && check_multiple_option_occurrences(prog_name, args_info->line_range_given, args_info->line_range_min, args_info->line_range_max, "'--line-range'")) error = 1; if (args_info->regexrange_mode_counter && check_multiple_option_occurrences(prog_name, args_info->regex_range_given, args_info->regex_range_min, args_info->regex_range_max, "'--regex-range'")) error = 1; /* checks for dependences among options */ if (args_info->range_separator_given && ! args_info->line_range_given) { fprintf (stderr, "%s: '--range-separator' option depends on option 'line-range'%s\n", prog_name, (additional_error ? additional_error : "")); error = 1; } if (args_info->range_context_given && ! args_info->line_range_given) { fprintf (stderr, "%s: '--range-context' option depends on option 'line-range'%s\n", prog_name, (additional_error ? additional_error : "")); error = 1; } return error; } static char *package_name = 0; /** * @brief updates an option * @param field the generic pointer to the field to update * @param orig_field the pointer to the orig field * @param field_given the pointer to the number of occurrence of this option * @param prev_given the pointer to the number of occurrence already seen * @param value the argument for this option (if null no arg was specified) * @param possible_values the possible values for this option (if specified) * @param default_value the default value (in case the option only accepts fixed values) * @param arg_type the type of this option * @param check_ambiguity @see cmdline_parser_params.check_ambiguity * @param override @see cmdline_parser_params.override * @param no_free whether to free a possible previous value * @param multiple_option whether this is a multiple option * @param long_opt the corresponding long option * @param short_opt the corresponding short option (or '-' if none) * @param additional_error possible further error specification */ static int update_arg(void *field, char **orig_field, unsigned int *field_given, unsigned int *prev_given, char *value, const char *possible_values[], const char *default_value, cmdline_parser_arg_type arg_type, int check_ambiguity, int override, int no_free, int multiple_option, const char *long_opt, char short_opt, const char *additional_error) { char *stop_char = 0; const char *val = value; int found; char **string_field; FIX_UNUSED (field); stop_char = 0; found = 0; if (!multiple_option && prev_given && (*prev_given || (check_ambiguity && *field_given))) { if (short_opt != '-') fprintf (stderr, "%s: `--%s' (`-%c') option given more than once%s\n", package_name, long_opt, short_opt, (additional_error ? additional_error : "")); else fprintf (stderr, "%s: `--%s' option given more than once%s\n", package_name, long_opt, (additional_error ? additional_error : "")); return 1; /* failure */ } if (possible_values && (found = check_possible_values((value ? value : default_value), possible_values)) < 0) { if (short_opt != '-') fprintf (stderr, "%s: %s argument, \"%s\", for option `--%s' (`-%c')%s\n", package_name, (found == -2) ? "ambiguous" : "invalid", value, long_opt, short_opt, (additional_error ? additional_error : "")); else fprintf (stderr, "%s: %s argument, \"%s\", for option `--%s'%s\n", package_name, (found == -2) ? "ambiguous" : "invalid", value, long_opt, (additional_error ? additional_error : "")); return 1; /* failure */ } if (field_given && *field_given && ! override) return 0; if (prev_given) (*prev_given)++; if (field_given) (*field_given)++; if (possible_values) val = possible_values[found]; switch(arg_type) { case ARG_FLAG: *((int *)field) = !*((int *)field); break; case ARG_INT: if (val) *((int *)field) = strtol (val, &stop_char, 0); break; case ARG_STRING: if (val) { string_field = (char **)field; if (!no_free && *string_field) free (*string_field); /* free previous string */ *string_field = gengetopt_strdup (val); } break; default: break; }; /* check numeric conversion */ switch(arg_type) { case ARG_INT: if (val && !(stop_char && *stop_char == '\0')) { fprintf(stderr, "%s: invalid numeric value: %s\n", package_name, val); return 1; /* failure */ } break; default: ; }; /* store the original value */ switch(arg_type) { case ARG_NO: case ARG_FLAG: break; default: if (value && orig_field) { if (no_free) { *orig_field = value; } else { if (*orig_field) free (*orig_field); /* free previous string */ *orig_field = gengetopt_strdup (value); } } }; return 0; /* OK */ } /** * @brief store information about a multiple option in a temporary list * @param list where to (temporarily) store multiple options */ static int update_multiple_arg_temp(struct generic_list **list, unsigned int *prev_given, const char *val, const char *possible_values[], const char *default_value, cmdline_parser_arg_type arg_type, const char *long_opt, char short_opt, const char *additional_error) { /* store single arguments */ char *multi_token; const char *multi_next; if (arg_type == ARG_NO) { (*prev_given)++; return 0; /* OK */ } multi_token = get_multiple_arg_token(val); multi_next = get_multiple_arg_token_next (val); while (1) { add_node (list); if (update_arg((void *)&((*list)->arg), &((*list)->orig), 0, prev_given, multi_token, possible_values, default_value, arg_type, 0, 1, 1, 1, long_opt, short_opt, additional_error)) { if (multi_token) free(multi_token); return 1; /* failure */ } if (multi_next) { multi_token = get_multiple_arg_token(multi_next); multi_next = get_multiple_arg_token_next (multi_next); } else break; } return 0; /* OK */ } /** * @brief free the passed list (including possible string argument) */ static void free_list(struct generic_list *list, short string_arg) { if (list) { struct generic_list *tmp; while (list) { tmp = list; if (string_arg && list->arg.string_arg) free (list->arg.string_arg); if (list->orig) free (list->orig); list = list->next; free (tmp); } } } /** * @brief updates a multiple option starting from the passed list */ static void update_multiple_arg(void *field, char ***orig_field, unsigned int field_given, unsigned int prev_given, union generic_value *default_value, cmdline_parser_arg_type arg_type, struct generic_list *list) { int i; struct generic_list *tmp; if (prev_given && list) { *orig_field = (char **) realloc (*orig_field, (field_given + prev_given) * sizeof (char *)); switch(arg_type) { case ARG_INT: *((int **)field) = (int *)realloc (*((int **)field), (field_given + prev_given) * sizeof (int)); break; case ARG_STRING: *((char ***)field) = (char **)realloc (*((char ***)field), (field_given + prev_given) * sizeof (char *)); break; default: break; }; for (i = (prev_given - 1); i >= 0; --i) { tmp = list; switch(arg_type) { case ARG_INT: (*((int **)field))[i + field_given] = tmp->arg.int_arg; break; case ARG_STRING: (*((char ***)field))[i + field_given] = tmp->arg.string_arg; break; default: break; } (*orig_field) [i + field_given] = list->orig; list = list->next; free (tmp); } } else { /* set the default value */ if (default_value && ! field_given) { switch(arg_type) { case ARG_INT: if (! *((int **)field)) { *((int **)field) = (int *)malloc (sizeof (int)); (*((int **)field))[0] = default_value->int_arg; } break; case ARG_STRING: if (! *((char ***)field)) { *((char ***)field) = (char **)malloc (sizeof (char *)); (*((char ***)field))[0] = gengetopt_strdup(default_value->string_arg); } break; default: break; } if (!(*orig_field)) { *orig_field = (char **) malloc (sizeof (char *)); (*orig_field)[0] = 0; } } } } static int check_modes( int given1[], const char *options1[], int given2[], const char *options2[]) { int i = 0, j = 0, errors = 0; while (given1[i] >= 0) { if (given1[i]) { while (given2[j] >= 0) { if (given2[j]) { ++errors; fprintf(stderr, "%s: option %s conflicts with option %s\n", package_name, options1[i], options2[j]); } ++j; } } ++i; } return errors; } int cmdline_parser_internal ( int argc, char **argv, struct gengetopt_args_info *args_info, struct cmdline_parser_params *params, const char *additional_error) { int c; /* Character of the parsed option. */ struct generic_list * line_range_list = NULL; struct generic_list * regex_range_list = NULL; int error = 0; struct gengetopt_args_info local_args_info; int override; int initialize; int check_required; int check_ambiguity; package_name = argv[0]; override = params->override; initialize = params->initialize; check_required = params->check_required; check_ambiguity = params->check_ambiguity; if (initialize) cmdline_parser_init (args_info); cmdline_parser_init (&local_args_info); optarg = 0; optind = 0; opterr = params->print_errors; optopt = '?'; while (1) { int option_index = 0; static struct option long_options[] = { { "help", 0, NULL, 'h' }, { "detailed-help", 0, NULL, 0 }, { "version", 0, NULL, 'V' }, { "input", 1, NULL, 'i' }, { "output", 1, NULL, 'o' }, { "src-lang", 1, NULL, 's' }, { "lang-list", 0, NULL, 0 }, { "outlang-list", 0, NULL, 0 }, { "out-format", 1, NULL, 'f' }, { "doc", 0, NULL, 'd' }, { "no-doc", 0, NULL, 0 }, { "css", 1, NULL, 'c' }, { "title", 1, NULL, 'T' }, { "tab", 1, NULL, 't' }, { "header", 1, NULL, 'H' }, { "footer", 1, NULL, 'F' }, { "style-file", 1, NULL, 0 }, { "style-css-file", 1, NULL, 0 }, { "style-defaults", 1, NULL, 0 }, { "outlang-def", 1, NULL, 0 }, { "outlang-map", 1, NULL, 0 }, { "data-dir", 1, NULL, 0 }, { "output-dir", 1, NULL, 0 }, { "lang-def", 1, NULL, 0 }, { "lang-map", 1, NULL, 0 }, { "show-lang-elements", 1, NULL, 0 }, { "infer-lang", 0, NULL, 0 }, { "line-number", 2, NULL, 'n' }, { "line-number-ref", 2, NULL, 0 }, { "line-range", 1, NULL, 0 }, { "range-separator", 1, NULL, 0 }, { "range-context", 1, NULL, 0 }, { "regex-range", 1, NULL, 0 }, { "gen-references", 1, NULL, 0 }, { "ctags-file", 1, NULL, 0 }, { "ctags", 1, NULL, 0 }, { "verbose", 0, NULL, 'v' }, { "quiet", 0, NULL, 'q' }, { "binary-output", 0, NULL, 0 }, { "statistics", 0, NULL, 0 }, { "gen-version", 0, NULL, 0 }, { "check-lang", 1, NULL, 0 }, { "check-outlang", 1, NULL, 0 }, { "failsafe", 0, NULL, 0 }, { "debug-langdef", 2, NULL, 'g' }, { "show-regex", 1, NULL, 0 }, { 0, 0, 0, 0 } }; c = getopt_long (argc, argv, "hVi:o:s:f:dc:T:t:H:F:n::vqg::", long_options, &option_index); if (c == -1) break; /* Exit from `while (1)' loop. */ switch (c) { case 'h': /* Print help and exit. */ if (update_arg( 0 , 0 , &(args_info->help_given), &(local_args_info.help_given), optarg, 0, 0, ARG_NO, check_ambiguity, override, 0, 0, "help", 'h', additional_error)) goto failure; cmdline_parser_free (&local_args_info); return 0; break; case 'V': /* Print version and exit. */ if (update_arg( 0 , 0 , &(args_info->version_given), &(local_args_info.version_given), optarg, 0, 0, ARG_NO, check_ambiguity, override, 0, 0, "version", 'V', additional_error)) goto failure; cmdline_parser_free (&local_args_info); return 0; break; case 'i': /* input file. default std input. */ if (update_arg( (void *)&(args_info->input_arg), &(args_info->input_orig), &(args_info->input_given), &(local_args_info.input_given), optarg, 0, 0, ARG_STRING, check_ambiguity, override, 0, 0, "input", 'i', additional_error)) goto failure; break; case 'o': /* output file. default std output (when the third invocation form is used). If STDOUT is specified, the output is directed to standard output. */ if (update_arg( (void *)&(args_info->output_arg), &(args_info->output_orig), &(args_info->output_given), &(local_args_info.output_given), optarg, 0, 0, ARG_STRING, check_ambiguity, override, 0, 0, "output", 'o', additional_error)) goto failure; break; case 's': /* source language (use --lang-list to get the complete list). If not specified, the source language will be guessed from the file extension.. */ if (update_arg( (void *)&(args_info->src_lang_arg), &(args_info->src_lang_orig), &(args_info->src_lang_given), &(local_args_info.src_lang_given), optarg, 0, 0, ARG_STRING, check_ambiguity, override, 0, 0, "src-lang", 's', additional_error)) goto failure; break; case 'f': /* output format (use --outlang-list to get the complete list). */ if (update_arg( (void *)&(args_info->out_format_arg), &(args_info->out_format_orig), &(args_info->out_format_given), &(local_args_info.out_format_given), optarg, 0, "html", ARG_STRING, check_ambiguity, override, 0, 0, "out-format", 'f', additional_error)) goto failure; break; case 'd': /* create an output file that can be used as a stand alone document (e.g., not to be included in another one). */ if (update_arg( 0 , 0 , &(args_info->doc_given), &(local_args_info.doc_given), optarg, 0, 0, ARG_NO, check_ambiguity, override, 0, 0, "doc", 'd', additional_error)) goto failure; break; case 'c': /* the external style sheet filename. Implies --doc. */ if (update_arg( (void *)&(args_info->css_arg), &(args_info->css_orig), &(args_info->css_given), &(local_args_info.css_given), optarg, 0, 0, ARG_STRING, check_ambiguity, override, 0, 0, "css", 'c', additional_error)) goto failure; break; case 'T': /* give a title to the output document. Implies --doc. */ if (update_arg( (void *)&(args_info->title_arg), &(args_info->title_orig), &(args_info->title_given), &(local_args_info.title_given), optarg, 0, 0, ARG_STRING, check_ambiguity, override, 0, 0, "title", 'T', additional_error)) goto failure; break; case 't': /* specify tab length.. */ if (update_arg( (void *)&(args_info->tab_arg), &(args_info->tab_orig), &(args_info->tab_given), &(local_args_info.tab_given), optarg, 0, "8", ARG_INT, check_ambiguity, override, 0, 0, "tab", 't', additional_error)) goto failure; break; case 'H': /* file to insert as header. */ if (update_arg( (void *)&(args_info->header_arg), &(args_info->header_orig), &(args_info->header_given), &(local_args_info.header_given), optarg, 0, 0, ARG_STRING, check_ambiguity, override, 0, 0, "header", 'H', additional_error)) goto failure; break; case 'F': /* file to insert as footer. */ if (update_arg( (void *)&(args_info->footer_arg), &(args_info->footer_orig), &(args_info->footer_given), &(local_args_info.footer_given), optarg, 0, 0, ARG_STRING, check_ambiguity, override, 0, 0, "footer", 'F', additional_error)) goto failure; break; case 'n': /* number all output lines, using the specified padding character. */ if (update_arg( (void *)&(args_info->line_number_arg), &(args_info->line_number_orig), &(args_info->line_number_given), &(local_args_info.line_number_given), optarg, 0, "0", ARG_STRING, check_ambiguity, override, 0, 0, "line-number", 'n', additional_error)) goto failure; break; case 'v': /* verbose mode on. */ if (update_arg( 0 , 0 , &(args_info->verbose_given), &(local_args_info.verbose_given), optarg, 0, 0, ARG_NO, check_ambiguity, override, 0, 0, "verbose", 'v', additional_error)) goto failure; break; case 'q': /* print no progress information. */ if (update_arg( 0 , 0 , &(args_info->quiet_given), &(local_args_info.quiet_given), optarg, 0, 0, ARG_NO, check_ambiguity, override, 0, 0, "quiet", 'q', additional_error)) goto failure; break; case 'g': /* debug a language definition. In dump mode just dumps all the steps; in interactive, at each step, waits for some input (press ENTER to step). */ if (update_arg( (void *)&(args_info->debug_langdef_arg), &(args_info->debug_langdef_orig), &(args_info->debug_langdef_given), &(local_args_info.debug_langdef_given), optarg, cmdline_parser_debug_langdef_values, "dump", ARG_STRING, check_ambiguity, override, 0, 0, "debug-langdef", 'g', additional_error)) goto failure; break; case 0: /* Long option with no short option */ /* Print help, including all details and hidden options, and exit. */ if (strcmp (long_options[option_index].name, "detailed-help") == 0) { if (update_arg( 0 , 0 , &(args_info->detailed_help_given), &(local_args_info.detailed_help_given), optarg, 0, 0, ARG_NO, check_ambiguity, override, 0, 0, "detailed-help", '-', additional_error)) goto failure; cmdline_parser_free (&local_args_info); return 0; } /* list all the supported language and associated language definition file. */ else if (strcmp (long_options[option_index].name, "lang-list") == 0) { if (update_arg( 0 , 0 , &(args_info->lang_list_given), &(local_args_info.lang_list_given), optarg, 0, 0, ARG_NO, check_ambiguity, override, 0, 0, "lang-list", '-', additional_error)) goto failure; } /* list all the supported output language and associated language definition file. */ else if (strcmp (long_options[option_index].name, "outlang-list") == 0) { if (update_arg( 0 , 0 , &(args_info->outlang_list_given), &(local_args_info.outlang_list_given), optarg, 0, 0, ARG_NO, check_ambiguity, override, 0, 0, "outlang-list", '-', additional_error)) goto failure; } /* cancel the --doc option even if it is implied (e.g., when css is given). */ else if (strcmp (long_options[option_index].name, "no-doc") == 0) { if (update_arg( 0 , 0 , &(args_info->no_doc_given), &(local_args_info.no_doc_given), optarg, 0, 0, ARG_NO, check_ambiguity, override, 0, 0, "no-doc", '-', additional_error)) goto failure; } /* specify the file containing format options. */ else if (strcmp (long_options[option_index].name, "style-file") == 0) { if (update_arg( (void *)&(args_info->style_file_arg), &(args_info->style_file_orig), &(args_info->style_file_given), &(local_args_info.style_file_given), optarg, 0, "default.style", ARG_STRING, check_ambiguity, override, 0, 0, "style-file", '-', additional_error)) goto failure; } /* specify the file containing format options (in css syntax). */ else if (strcmp (long_options[option_index].name, "style-css-file") == 0) { if (update_arg( (void *)&(args_info->style_css_file_arg), &(args_info->style_css_file_orig), &(args_info->style_css_file_given), &(local_args_info.style_css_file_given), optarg, 0, 0, ARG_STRING, check_ambiguity, override, 0, 0, "style-css-file", '-', additional_error)) goto failure; } /* specify the file containing defaults for format options. */ else if (strcmp (long_options[option_index].name, "style-defaults") == 0) { if (update_arg( (void *)&(args_info->style_defaults_arg), &(args_info->style_defaults_orig), &(args_info->style_defaults_given), &(local_args_info.style_defaults_given), optarg, 0, "style.defaults", ARG_STRING, check_ambiguity, override, 0, 0, "style-defaults", '-', additional_error)) goto failure; } /* output language definition file. */ else if (strcmp (long_options[option_index].name, "outlang-def") == 0) { if (update_arg( (void *)&(args_info->outlang_def_arg), &(args_info->outlang_def_orig), &(args_info->outlang_def_given), &(local_args_info.outlang_def_given), optarg, 0, 0, ARG_STRING, check_ambiguity, override, 0, 0, "outlang-def", '-', additional_error)) goto failure; } /* output language map file. */ else if (strcmp (long_options[option_index].name, "outlang-map") == 0) { if (update_arg( (void *)&(args_info->outlang_map_arg), &(args_info->outlang_map_orig), &(args_info->outlang_map_given), &(local_args_info.outlang_map_given), optarg, 0, "outlang.map", ARG_STRING, check_ambiguity, override, 0, 0, "outlang-map", '-', additional_error)) goto failure; } /* directory where language definition files and language maps are searched for. If not specified these files are searched for in the current directory and in the data dir installation directory. */ else if (strcmp (long_options[option_index].name, "data-dir") == 0) { if (update_arg( (void *)&(args_info->data_dir_arg), &(args_info->data_dir_orig), &(args_info->data_dir_given), &(local_args_info.data_dir_given), optarg, 0, 0, ARG_STRING, check_ambiguity, override, 0, 0, "data-dir", '-', additional_error)) goto failure; } /* output directory. */ else if (strcmp (long_options[option_index].name, "output-dir") == 0) { if (update_arg( (void *)&(args_info->output_dir_arg), &(args_info->output_dir_orig), &(args_info->output_dir_given), &(local_args_info.output_dir_given), optarg, 0, 0, ARG_STRING, check_ambiguity, override, 0, 0, "output-dir", '-', additional_error)) goto failure; } /* language definition file. */ else if (strcmp (long_options[option_index].name, "lang-def") == 0) { if (update_arg( (void *)&(args_info->lang_def_arg), &(args_info->lang_def_orig), &(args_info->lang_def_given), &(local_args_info.lang_def_given), optarg, 0, 0, ARG_STRING, check_ambiguity, override, 0, 0, "lang-def", '-', additional_error)) goto failure; } /* language map file. */ else if (strcmp (long_options[option_index].name, "lang-map") == 0) { if (update_arg( (void *)&(args_info->lang_map_arg), &(args_info->lang_map_orig), &(args_info->lang_map_given), &(local_args_info.lang_map_given), optarg, 0, "lang.map", ARG_STRING, check_ambiguity, override, 0, 0, "lang-map", '-', additional_error)) goto failure; } /* prints the language elements that are defined in the language definition file. */ else if (strcmp (long_options[option_index].name, "show-lang-elements") == 0) { if (update_arg( (void *)&(args_info->show_lang_elements_arg), &(args_info->show_lang_elements_orig), &(args_info->show_lang_elements_given), &(local_args_info.show_lang_elements_given), optarg, 0, 0, ARG_STRING, check_ambiguity, override, 0, 0, "show-lang-elements", '-', additional_error)) goto failure; } /* force to infer source script language (overriding given language specification). */ else if (strcmp (long_options[option_index].name, "infer-lang") == 0) { if (update_arg( 0 , 0 , &(args_info->infer_lang_given), &(local_args_info.infer_lang_given), optarg, 0, 0, ARG_NO, check_ambiguity, override, 0, 0, "infer-lang", '-', additional_error)) goto failure; } /* number all output lines and generate an anchor, made of the specified prefix + the line number. */ else if (strcmp (long_options[option_index].name, "line-number-ref") == 0) { if (update_arg( (void *)&(args_info->line_number_ref_arg), &(args_info->line_number_ref_orig), &(args_info->line_number_ref_given), &(local_args_info.line_number_ref_given), optarg, 0, "line", ARG_STRING, check_ambiguity, override, 0, 0, "line-number-ref", '-', additional_error)) goto failure; } /* generate only the lines in the specified range(s). */ else if (strcmp (long_options[option_index].name, "line-range") == 0) { args_info->linerange_mode_counter += 1; if (update_multiple_arg_temp(&line_range_list, &(local_args_info.line_range_given), optarg, 0, 0, ARG_STRING, "line-range", '-', additional_error)) goto failure; } /* the optional separator to be printed among ranges (e.g., \"...\"). */ else if (strcmp (long_options[option_index].name, "range-separator") == 0) { args_info->linerange_mode_counter += 1; if (update_arg( (void *)&(args_info->range_separator_arg), &(args_info->range_separator_orig), &(args_info->range_separator_given), &(local_args_info.range_separator_given), optarg, 0, 0, ARG_STRING, check_ambiguity, override, 0, 0, "range-separator", '-', additional_error)) goto failure; } /* number of (context) lines generated even if not in range. */ else if (strcmp (long_options[option_index].name, "range-context") == 0) { args_info->linerange_mode_counter += 1; if (update_arg( (void *)&(args_info->range_context_arg), &(args_info->range_context_orig), &(args_info->range_context_given), &(local_args_info.range_context_given), optarg, 0, 0, ARG_INT, check_ambiguity, override, 0, 0, "range-context", '-', additional_error)) goto failure; } /* generate only the lines within the specified regular expressions. */ else if (strcmp (long_options[option_index].name, "regex-range") == 0) { args_info->regexrange_mode_counter += 1; if (update_multiple_arg_temp(&regex_range_list, &(local_args_info.regex_range_given), optarg, 0, 0, ARG_STRING, "regex-range", '-', additional_error)) goto failure; } /* generate references. */ else if (strcmp (long_options[option_index].name, "gen-references") == 0) { if (update_arg( (void *)&(args_info->gen_references_arg), &(args_info->gen_references_orig), &(args_info->gen_references_given), &(local_args_info.gen_references_given), optarg, cmdline_parser_gen_references_values, "inline", ARG_STRING, check_ambiguity, override, 0, 0, "gen-references", '-', additional_error)) goto failure; } /* specify the file generated by ctags that will be used to generate references. */ else if (strcmp (long_options[option_index].name, "ctags-file") == 0) { if (update_arg( (void *)&(args_info->ctags_file_arg), &(args_info->ctags_file_orig), &(args_info->ctags_file_given), &(local_args_info.ctags_file_given), optarg, 0, "tags", ARG_STRING, check_ambiguity, override, 0, 0, "ctags-file", '-', additional_error)) goto failure; } /* how to run the ctags command. If this option is not specified, ctags will be executed with the default value. If it is specified with an empty string, ctags will not be executed at all. */ else if (strcmp (long_options[option_index].name, "ctags") == 0) { if (update_arg( (void *)&(args_info->ctags_arg), &(args_info->ctags_orig), &(args_info->ctags_given), &(local_args_info.ctags_given), optarg, 0, "ctags --excmd=n --tag-relative=yes", ARG_STRING, check_ambiguity, override, 0, 0, "ctags", '-', additional_error)) goto failure; } /* write output files in binary mode. */ else if (strcmp (long_options[option_index].name, "binary-output") == 0) { if (update_arg( 0 , 0 , &(args_info->binary_output_given), &(local_args_info.binary_output_given), optarg, 0, 0, ARG_NO, check_ambiguity, override, 0, 0, "binary-output", '-', additional_error)) goto failure; } /* print some statistics (i.e., elapsed time). */ else if (strcmp (long_options[option_index].name, "statistics") == 0) { if (update_arg( 0 , 0 , &(args_info->statistics_given), &(local_args_info.statistics_given), optarg, 0, 0, ARG_NO, check_ambiguity, override, 0, 0, "statistics", '-', additional_error)) goto failure; } /* put source-highlight version in the generated file. */ else if (strcmp (long_options[option_index].name, "gen-version") == 0) { if (update_arg((void *)&(args_info->gen_version_flag), 0, &(args_info->gen_version_given), &(local_args_info.gen_version_given), optarg, 0, 0, ARG_FLAG, check_ambiguity, override, 1, 0, "gen-version", '-', additional_error)) goto failure; } /* only check the correctness of a language definition file. */ else if (strcmp (long_options[option_index].name, "check-lang") == 0) { if (update_arg( (void *)&(args_info->check_lang_arg), &(args_info->check_lang_orig), &(args_info->check_lang_given), &(local_args_info.check_lang_given), optarg, 0, 0, ARG_STRING, check_ambiguity, override, 0, 0, "check-lang", '-', additional_error)) goto failure; } /* only check the correctness of an output language definition file. */ else if (strcmp (long_options[option_index].name, "check-outlang") == 0) { if (update_arg( (void *)&(args_info->check_outlang_arg), &(args_info->check_outlang_orig), &(args_info->check_outlang_given), &(local_args_info.check_outlang_given), optarg, 0, 0, ARG_STRING, check_ambiguity, override, 0, 0, "check-outlang", '-', additional_error)) goto failure; } /* if no language definition is found for the input, it is simply copied to the output. */ else if (strcmp (long_options[option_index].name, "failsafe") == 0) { if (update_arg( 0 , 0 , &(args_info->failsafe_given), &(local_args_info.failsafe_given), optarg, 0, 0, ARG_NO, check_ambiguity, override, 0, 0, "failsafe", '-', additional_error)) goto failure; } /* show the regular expression automaton corresponding to a language definition file. */ else if (strcmp (long_options[option_index].name, "show-regex") == 0) { if (update_arg( (void *)&(args_info->show_regex_arg), &(args_info->show_regex_orig), &(args_info->show_regex_given), &(local_args_info.show_regex_given), optarg, 0, 0, ARG_STRING, check_ambiguity, override, 0, 0, "show-regex", '-', additional_error)) goto failure; } break; case '?': /* Invalid option. */ /* `getopt_long' already printed an error message. */ goto failure; default: /* bug: option not considered. */ fprintf (stderr, "%s: option unknown: %c%s\n", CMDLINE_PARSER_PACKAGE, c, (additional_error ? additional_error : "")); abort (); } /* switch */ } /* while */ update_multiple_arg((void *)&(args_info->line_range_arg), &(args_info->line_range_orig), args_info->line_range_given, local_args_info.line_range_given, 0, ARG_STRING, line_range_list); update_multiple_arg((void *)&(args_info->regex_range_arg), &(args_info->regex_range_orig), args_info->regex_range_given, local_args_info.regex_range_given, 0, ARG_STRING, regex_range_list); args_info->line_range_given += local_args_info.line_range_given; local_args_info.line_range_given = 0; args_info->regex_range_given += local_args_info.regex_range_given; local_args_info.regex_range_given = 0; if (args_info->linerange_mode_counter && args_info->regexrange_mode_counter) { int linerange_given[] = {args_info->line_range_given, args_info->range_separator_given, args_info->range_context_given, -1}; const char *linerange_desc[] = {"--line-range", "--range-separator", "--range-context", 0}; int regexrange_given[] = {args_info->regex_range_given, -1}; const char *regexrange_desc[] = {"--regex-range", 0}; error += check_modes(linerange_given, linerange_desc, regexrange_given, regexrange_desc); } if (check_required) { error += cmdline_parser_required2 (args_info, argv[0], additional_error); } cmdline_parser_release (&local_args_info); if ( error ) return (EXIT_FAILURE); if (optind < argc) { int i = 0 ; int found_prog_name = 0; /* whether program name, i.e., argv[0], is in the remaining args (this may happen with some implementations of getopt, but surely not with the one included by gengetopt) */ i = optind; while (i < argc) if (argv[i++] == argv[0]) { found_prog_name = 1; break; } i = 0; args_info->inputs_num = argc - optind - found_prog_name; args_info->inputs = (char **)(malloc ((args_info->inputs_num)*sizeof(char *))) ; while (optind < argc) if (argv[optind++] != argv[0]) args_info->inputs[ i++ ] = gengetopt_strdup (argv[optind-1]) ; } return 0; failure: free_list (line_range_list, 1 ); free_list (regex_range_list, 1 ); cmdline_parser_release (&local_args_info); return (EXIT_FAILURE); } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/pascal.lang��������������������������������������������������������������0000644�0001750�0001750�00000001153�11672675565�014630� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������keyword = "alfa|and|array|begin|case|const|div", "do|downto|else|end|false|file|for|function|get|goto|if|in", "label|mod|new|not|of|or|pack|packed|page|program", "put|procedure|read|readln|record|repeat|reset|rewrite|set", "text|then|to|true|type|unpack|until|var|while|with|writeln|write" nonsensitive comment delim "(*" "*)" multiline nested comment delim "{" "}" multiline nested include "number.lang" string delim "\"" "\"" escape "\\" string delim "'" "'" escape "\\" type = "boolean|byte|char|integer|maxint|real" nonsensitive include "symbols.lang" include "function.lang" ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/lsm.lang�����������������������������������������������������������������0000644�0001750�0001750�00000000170�11672675565�014156� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Linux Software Map language definition keyword = 'Begin[[:digit:]]*|End' type = '^[[:word:]-]+:' include "url.lang"��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/tml_macrosdelayed3.lang��������������������������������������������������0000664�0001750�0001750�00000000611�11672675565�017140� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������environment keyword delim $DELAYEDMACROSTART $DELAYEDMACROEND multiline nested begin attribute = $MACROATTR keyword = $MACRO environment string delim "\\\"" "\\\"" escape "\\\\" multiline begin keyword = $MACRO include "tml_macrotokens.lang" include "tml_macrolinks.lang" include "tml_formatting.lang" end include "tml_macrotokens.lang" end �����������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/php.lang�����������������������������������������������������������������0000644�0001750�0001750�00000001721�11672675565�014155� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������state symbol delim "<?php" "?>" multiline begin preproc = "include|include_once|require|require_once" comment start "//" include "script_comment.lang" include "number.lang" string delim "\"" "\"" escape "\\" multiline string delim "'" "'" escape "\\" multiline keyword = "and|or|xor|__FILE__|exception|php_user_filter|__LINE__|abstract|array|as|break|case|catch|cfunction|class|clone|const|continue|declare|default|die|do|each|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|eval|exit|extends|final|for|foreach|function|global|goto|if|implements|interface|instanceof|isset|list|namespace|new|old_function|print|private|protected|public|return|static|switch|throw|try|unset|use|var|while|__FUNCTION__|__CLASS__|__METHOD__|__DIR__|__NAMESPACE__|null|false|true" include "c_comment.lang" variable = '(?:\$[#]?|@|%)[[:word:]]+' include "symbols.lang" cbracket = "{|}" include "function.lang" end include "html.lang" �����������������������������������������������source-highlight-3.1.6/src/xml.lang�����������������������������������������������������������������0000644�0001750�0001750�00000000626�11672675565�014171� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������state preproc delim "<?xml" "?>" multiline begin include "key_string.lang" end state preproc delim '<![[:alpha:]]+' ">" multiline begin include "key_string.lang" end comment delim "<!--" "-->" multiline nested keyword = '<(/)?[[:alpha:]]([[:word:]:.-]*)(/)?>' state keyword delim '<(/)?[[:alpha:]]([[:word:]:.-]*)' '(/)?>' multiline begin include "key_string.lang" end preproc = '&([[:alnum:]]+);' ����������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/changelog.lang�����������������������������������������������������������0000644�0001750�0001750�00000000414�11672675564�015312� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������state date start '[[:digit:]]{2,4}-?[[:digit:]]{2}-?[[:digit:]]{2}' begin include "url.lang" name = '([[:word:]]|[[:punct:]])+' end (normal,symbol,normal,file)= `(^[[:blank:]]+)(\*)([[:blank:]]+)((?:[^:]+\:)?)` (normal,file)= `(^[[:blank:]]+)((?:[^:]+\:)?)` ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/makefile.lang������������������������������������������������������������0000644�0001750�0001750�00000002241�11672675565�015141� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Author: Maurizio Loreti, aka MLO or (HAM) I3NOO # WWW: http://www.pd.infn.it/~loreti/mlo.html # ###################################################################### # Language definitions for Makefiles; intended for source-highlight # (see http://www.gnu.org/software/src-highlite). ###################################################################### # Modified by Lorenzo Bettini, http://www.lorenzobettini.it # Declared symbols; e.g.: # SOURCE = foo.c # ^^^^^^^^ will be highlighted as "type" (default: dark green) type = '^[a-zA-Z0-9_-]+[[:space:]]*=' # Special statements; e.g.: # .PHONY: clean # ^^^^^^^ will be highlighted as "preproc" (default: dark blue) preproc = '^\.[a-zA-Z0-9_-]+[[:space:]]*:' # automake/autoconf variables preproc = '@(.+)@' # Dependencies; e.g.: # foo.o foo.z: foo.c # ^^^^^^^^^^^^ will be highlighted as "symbol" (default: dark red) symbol = '^([[:word:].[:space:]-])+:' # Rules; e.g.: # %.o:%.c # ^^^^^^^ will be highlighted as "string" (default: red) string = '%[a-zA-Z0-9_.-]+:%[a-zA-Z0-9_.-]+' # filenames normal = '([[:word:]-]*)\.([[:word:]-]+)' # The statements following dependencies are for /bin/sh; so: include "sh.lang" ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/latexcolor.outlang�������������������������������������������������������0000644�0001750�0001750�00000001327�11672675565�016274� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������include "latex.outlang" color "\textcolor{$style}{$text}" bgcolor "\colorbox{$style}{$text}" doctemplate "% Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite \documentclass{article} \usepackage[usenames,dvipsnames]{color} $header \title{$title} \date{} \begin{document} \maketitle \noindent " " $footer \end{document} " end colormap "green" "Green" "red" "Red" "darkred" "BrickRed" "blue" "Blue" "brown" "Brown" "pink" "CarnationPink" "yellow" "Yellow" "cyan" "Cyan" "purple" "Purple" "orange" "Orange" "brightorange" "YellowOrange" "brightgreen" "YellowGreen" "darkgreen" "ForestGreen" "black" "Black" "teal" "TealBlue" "gray" "Gray" "darkblue" "RoyalBlue" default "Black" end ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/spec.lang����������������������������������������������������������������0000644�0001750�0001750�00000000266�11672675565�014323� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# rpm .spec files include "script_comment.lang" keyword = '^[[:word:]-]+:' include "url.lang" include "number.lang" variable = '\$[[:word:]]+' preproc = '%(\{?)[[:word:]]+(\}?)'������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/logtalk.lang�������������������������������������������������������������0000644�0001750�0001750�00000006327�11672675565�015032� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# highlighting for Logtalk source files (http://logtalk.org/) # # written by Paulo Moura (pmoura@logtalk.org) # last revised on January 18, 2011 comment start "%" comment delim "/*" "*/" multiline nested string delim "\"" "\"" escape "\\" environment string delim "'" "'" begin specialchar = '\\([\\abfnrtv"\']|(x[a-fA-F0-9]+|[0-7]+)\\)' end keyword = '\<(abolish|c(urrent|reate))_(object|protocol|category)(?=\()', '\<(object|protocol|category)_property(?=\()', '\<co(mplements_object|nforms_to_protocol)(?=\()', '\<extends_(object|protocol|category)(?=\()', '\<imp(lements_protocol|orts_category)(?=\()', '\<(instantiat|specializ)es_class(?=\()', '\<(current_event|(abolish|define)_events)(?=\()', '\<(current|set)_logtalk_flag(?=\()', '\<logtalk_(compile|l(oad|oad_context|ibrary_path))(?=\()' keyword = '\<(after|before)(?=\()', '\<(parameter|this|se(lf|nder))(?=\()', '\<(current_predicate|predicate_property)(?=\()', '\<(expand_(goal|term)|(goal|term)_expansion|phrase)(?=\()', '\<(clause|retract(all)?)(?=\()', '\<a(bolish|ssert(a|z))(?=\()', '\<(ca(ll|tch)|throw)(?=\()', '\<((bag|set)of|f(ind|or)all)(?=\()', '\<threaded(_(call|once|ignore|exit|peek|wait|notify))?(?=\()', '\<unify_with_occurs_check(?=\()', '\<(functor|arg|copy_term|numbervars)(?=\()', '\<(rem|mod|abs|sign)(?=\()', '\<(float_(integer|fractional)_part|float)(?=\()', '\<(floor|truncate|round|ceiling)(?=\()', '\<(cos|atan|exp|log|s(in|qrt))(?=\()', '\<(var|atom(ic)?|integer|float|c(allable|ompound)|n(onvar|umber)|ground)(?=\()', '\<compare(?=\()', '\<(curren|se)t_(in|out)put(?=\()', '\<(open|close)(?=\()', '\<flush_output(?=\()', '\<(flush_output|at_end_of_stream)\>', '\<(stream_property|at_end_of_stream|set_stream_position)(?=\()', '\<(get|p(eek|ut))_(byte|c(har|ode))(?=\()', '\<nl(?=\()', '\<(nl)\>', '\<(read(_term)?)(?=\()', '\<(write(q|_(canonical|term))?)(?=\()', '\<(op|current_op)(?=\()', '\<((current_)?char_conversion)(?=\()', '\<atom_(length|c(hars|o(ncat|des)))(?=\()', '\<(char_code|sub_atom)(?=\()', '\<number_(c(har|ode)s)(?=\()', '\<(set|current)_prolog_flag(?=\()', '\<halt(?=\()', '\<(halt)\>', '\<(ignore|once)(?=\()', '\<((key)?sort)(?=\()', '\<(true|fail|repeat)\>', '\<(e|pi|is|rem|mod)\>' variable = '\<[A-Z_][A-Za-z0-9_]*' cbracket = "{|}" preproc = '^[[:blank:]]*:-[[:blank:]](c(a(lls|tegory)|oinductive)|p(ublic|r(ot(ocol|ected)|ivate))|e(l(if|se)|n(coding|sure_loaded)|xport)|i(f|n(fo|itialization))|alias|d(ynamic|iscontiguous)|m(eta_predicate|od(e|ule)|ultifile)|reexport|s(et_(logtalk|prolog)_flag|ynchronized)|o(bject|p)|use(s|_module))(?=\()', '^[[:blank:]]*:-[[:blank:]](e(lse|nd(if|_(category|object|protocol)))|dynamic|synchronized|threaded)\.' preproc = '\<(complements|extends|i(nstantiates|mp(lements|orts))|specializes)(?=\()' normal = '\<[a-z][A-Za-z0-9_]*' number = '0\'.|0b[0-1]+|0o[0-7]+|0x[0-9a-fA-F]+|[0-9]+(\.[0-9]+)?([eE]([-+])?[0-9]+)?' symbol = "^", "::", "^^", ":", ">>", "<<", "/\\", "\\/", "\\", "=:=", "=\\=", "<", "=<", ">", ">=", "=..", "\\==", "==", "@=<", "@<", "@>=", "@>", "=", "\\=", "+", "-", "**", "*", "//", "/", "-->", "!", "->", ";", "\\+", "?", "@", ":-" ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/css_common.outlang�������������������������������������������������������0000644�0001750�0001750�00000000510�11672675564�016250� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������include "html_ref.outlang" extension "html" translations "&" "&amp;" "<" "&lt;" ">" "&gt;" end doctemplate "<!-- Generator: $additional --> $header<pre><tt>" "</tt></pre>$footer " end nodoctemplate "<!-- Generator: $additional --> $header<pre><tt>" "</tt></pre>$footer " end onestyle "<span class=\"$style\">$text</span>" ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/tml_macros1.lang���������������������������������������������������������0000664�0001750�0001750�00000000732�11672675565�015612� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������environment keyword delim $MACROSTART $MACROEND multiline nested begin attribute = $MACROATTR keyword = $MACRO include "tml_macros2.lang" include "tml_glue.lang" environment string delim "\"" "\"" escape "\\" multiline begin keyword = $MACRO include "tml_macros2.lang" include "tml_macrosdelayed1.lang" include "tml_macrotokens.lang" include "tml_macrolinks.lang" include "tml_formatting.lang" end end ��������������������������������������source-highlight-3.1.6/src/javadoc.outlang����������������������������������������������������������0000644�0001750�0001750�00000000546�11672675565�015531� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������include "html_common.outlang" doctemplate " * <!-- Generated by Source-highlight --> * <pre><tt> " " * </tt></pre> " end nodoctemplate " * <!-- Generated by Source-highlight --> * <pre><tt> " " * </tt></pre> " end lineprefix " * " translations "*/" "&#42;/" # this avoids the */ to be interpreted as # the end of a comment inside a javadoc comment end ����������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/sml.lang�����������������������������������������������������������������0000644�0001750�0001750�00000000566�11672675565�014167� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������include "caml.lang" redef keyword = "abstraction|abstype|and|andalso|as|before|case|datatype|do|else|end|eqtype|exception|fn|fun|functor|handle|if|in|include|infix|infixr|let|local|nonfix|o|of|op|open|orelse|overload|raise|rec|sharing|sig|signature|struct|structure|then|type|val|where|while|with|withtype" redef type = "int|byte|boolean|char|long|float|double|short|void"������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/docbook.outlang����������������������������������������������������������0000644�0001750�0001750�00000001336�11672675564�015537� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# by Stuart Rackham # http://www.methods.co.nz/asciidoc/source-highlight-filter.html extension "xml" bold "<emphasis role=\"strong\">$text</emphasis>" italics "<emphasis>$text</emphasis>" anchor "<anchor id=\"line$linenum\"/>$text" postline_reference "<link linkend='line$linenum'>$text -> $linenum</link>" postdoc_reference "<link linkend='line$linenum'>$text -> $linenum</link>" reference "<link linkend='line$linenum'>$text</link>" doctemplate "<!DOCTYPE article PUBLIC \"-//OASIS//DTD DocBook//EN\"> <article> <articleinfo> <title>$title</title> </articleinfo> <programlisting>" "</programlisting> </article> " end nodoctemplate "<programlisting>" "</programlisting> " end translations "&" "&amp;" "<" "&lt;" ">" "&gt;" end ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/check-regexp_cmd.h�������������������������������������������������������0000644�0001750�0001750�00000014155�11675323762�016061� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/** @file check-regexp_cmd.h * @brief The header file for the command line option parser * generated by GNU Gengetopt version 2.22.6 * http://www.gnu.org/software/gengetopt. * DO NOT modify this file, since it can be overwritten * @author GNU Gengetopt by Lorenzo Bettini */ #ifndef CHECK_REGEXP_CMD_H #define CHECK_REGEXP_CMD_H /* If we use autoconf. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include <stdio.h> /* for FILE */ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #ifndef CMDLINE_PARSER_PACKAGE /** @brief the program name (used for printing errors) */ #define CMDLINE_PARSER_PACKAGE "check-regexp (GNU Source-highlight)" #endif #ifndef CMDLINE_PARSER_PACKAGE_NAME /** @brief the complete program name (used for help and version) */ #define CMDLINE_PARSER_PACKAGE_NAME "check-regexp (GNU Source-highlight)" #endif #ifndef CMDLINE_PARSER_VERSION /** @brief the program version */ #define CMDLINE_PARSER_VERSION VERSION #endif /** @brief Where the command line options are stored */ struct gengetopt_args_info { const char *help_help; /**< @brief Print help and exit help description. */ const char *version_help; /**< @brief Print version and exit help description. */ unsigned int help_given ; /**< @brief Whether help was given. */ unsigned int version_given ; /**< @brief Whether version was given. */ char **inputs ; /**< @brief unamed options (options without names) */ unsigned inputs_num ; /**< @brief unamed options number */ } ; /** @brief The additional parameters to pass to parser functions */ struct cmdline_parser_params { int override; /**< @brief whether to override possibly already present options (default 0) */ int initialize; /**< @brief whether to initialize the option structure gengetopt_args_info (default 1) */ int check_required; /**< @brief whether to check that all required options were provided (default 1) */ int check_ambiguity; /**< @brief whether to check for options already specified in the option structure gengetopt_args_info (default 0) */ int print_errors; /**< @brief whether getopt_long should print an error message for a bad option (default 1) */ } ; /** @brief the purpose string of the program */ extern const char *gengetopt_args_info_purpose; /** @brief the usage string of the program */ extern const char *gengetopt_args_info_usage; /** @brief all the lines making the help output */ extern const char *gengetopt_args_info_help[]; /** * The command line parser * @param argc the number of command line options * @param argv the command line options * @param args_info the structure where option information will be stored * @return 0 if everything went fine, NON 0 if an error took place */ int cmdline_parser (int argc, char **argv, struct gengetopt_args_info *args_info); /** * The command line parser (version with additional parameters - deprecated) * @param argc the number of command line options * @param argv the command line options * @param args_info the structure where option information will be stored * @param override whether to override possibly already present options * @param initialize whether to initialize the option structure my_args_info * @param check_required whether to check that all required options were provided * @return 0 if everything went fine, NON 0 if an error took place * @deprecated use cmdline_parser_ext() instead */ int cmdline_parser2 (int argc, char **argv, struct gengetopt_args_info *args_info, int override, int initialize, int check_required); /** * The command line parser (version with additional parameters) * @param argc the number of command line options * @param argv the command line options * @param args_info the structure where option information will be stored * @param params additional parameters for the parser * @return 0 if everything went fine, NON 0 if an error took place */ int cmdline_parser_ext (int argc, char **argv, struct gengetopt_args_info *args_info, struct cmdline_parser_params *params); /** * Save the contents of the option struct into an already open FILE stream. * @param outfile the stream where to dump options * @param args_info the option struct to dump * @return 0 if everything went fine, NON 0 if an error took place */ int cmdline_parser_dump(FILE *outfile, struct gengetopt_args_info *args_info); /** * Save the contents of the option struct into a (text) file. * This file can be read by the config file parser (if generated by gengetopt) * @param filename the file where to save * @param args_info the option struct to save * @return 0 if everything went fine, NON 0 if an error took place */ int cmdline_parser_file_save(const char *filename, struct gengetopt_args_info *args_info); /** * Print the help */ void cmdline_parser_print_help(void); /** * Print the version */ void cmdline_parser_print_version(void); /** * Initializes all the fields a cmdline_parser_params structure * to their default values * @param params the structure to initialize */ void cmdline_parser_params_init(struct cmdline_parser_params *params); /** * Allocates dynamically a cmdline_parser_params structure and initializes * all its fields to their default values * @return the created and initialized cmdline_parser_params structure */ struct cmdline_parser_params *cmdline_parser_params_create(void); /** * Initializes the passed gengetopt_args_info structure's fields * (also set default values for options that have a default) * @param args_info the structure to initialize */ void cmdline_parser_init (struct gengetopt_args_info *args_info); /** * Deallocates the string fields of the gengetopt_args_info structure * (but does not deallocate the structure itself) * @param args_info the structure to deallocate */ void cmdline_parser_free (struct gengetopt_args_info *args_info); /** * Checks that all the required options were specified * @param args_info the structure to check * @param prog_name the name of the program that will be used to print * possible errors * @return */ int cmdline_parser_required (struct gengetopt_args_info *args_info, const char *prog_name); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* CHECK_REGEXP_CMD_H */ �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/javalog.lang�������������������������������������������������������������0000644�0001750�0001750�00000001111�11672675565�015002� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# provided by Mark Silberbauer <mark@stonethree.com> vardef basic_time = '[[:digit:]]{2}:[[:digit:]]{2}:[[:digit:]]{2}' comment = '^INFO:' keyword = '^WARNING:','^SEVERE:.*', '^Exception[[:blank:]]in[[:blank:]]thread.*' string = '^[[:blank:]]{8}at.*' specialchar = '[[:digit:]]{4}/[[:digit:]]{2}/[[:digit:]]{2}', $basic_time, '[[:digit:]]{1}:[[:digit:]]{2}:[[:digit:]]{2}[[:blank:]](AM|PM)', '(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)[[:blank:]][[:digit:]]{1,2},[[:blank:]]20[[:digit:]]{2}' number = '\b[[:digit:]]+\b' type = '[[:blank:]](?=\w*\d)\w*((_|\-)(?=\w*\d)\w*)+' �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/url.lang�����������������������������������������������������������������0000644�0001750�0001750�00000000241�11672675565�014164� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������vardef URLPART = '[[:word:]\./\-_~]+' url = '(<?)' + $URLPART + '@' + $URLPART + "." + '[[:word:]]+' + '(>?)' url = '(<?)' + '[[:word:]]+://' + $URLPART + '(>?)'���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/haxe.lang����������������������������������������������������������������0000644�0001750�0001750�00000000671�11672675565�014316� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������preproc = '^[[:blank:]]*#((if|else)[[:blank:]]*[[:word:]]*|end)' include "java.lang" subst keyword = "abstract|assert|break|case|cast|catch|class|continue|default|do|else|enum|extends|extern|false|final|finally|for|function|if|implements|in|inline|interface|new|null|override|private|protected|public|return|static|super|switch|synchronized|this|throw|throws|true|try|typedef|untyped|var|while" subst type = "Bool|Dynamic|Float|Int|Void" �����������������������������������������������������������������������source-highlight-3.1.6/src/haskell.lang�������������������������������������������������������������0000644�0001750�0001750�00000002613�11672675565�015012� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Quick and dirty Haskell highlight rules for GNU Source-highlight and SHJS # Sergey Astanin # Feel free to improve according to http://www.haskell.org/onlinereport/lexemes.html # Source-highlight docs: http://www.gnu.org/software/src-highlite/source-highlight.html#Language-Definitions # SHJS docs: http://shjs.sourceforge.net/doc/documentation.html # as number.lang but also with Haskell octals number = '\<[+-]?((0x[[:xdigit:]]+)|(0[oO][0-7]+)|(([[:digit:]]*\.)? [[:digit:]]+([eE][+-]?[[:digit:]]+)?))u?((int(?:8|16|32|64))|L)?\>' # strings and chars (including non-control escapes) string delim "\"" "\"" escape "\\" string = '\'([^\\\']{1}|\\[\\\'0abfnrtv"&]|\\[[:digit:]]+|\\[oO][0-7]+|\\[xX][[:xdigit:]]+)\'' # show some syntax errors with "regex" style regex = '\'[^\\\']{2,}\'' keyword = '\<(case|class|data|default|deriving|do|else|if|import|in|infix|infixl|infixr|instance|let|module|newtype|of|then|type|where|_)\>' comment delim "{-" "-}" multiline nested # -- An end-of-line comment # but -->, <--, |-- and --| are not comments in Haskell! symbol = '([!#$$%*+\./<=>\?@\\\^\|\-~:]+)--' comment start '(--)(?![!#$$%*+\./<=>\?@\\\^\|\-~:]+)' # dont highlight types in qualified names, borrowed from caml.lang type = '\<(?:[A-Z][\w\']*)\>(?![\.])' symbol = "!","#","$","%","&","*","+",".","/","<","=",">","?","@","\\","^","\|","-","~", "(",")",",",";","[","]","`","{","}", ":" cbracket = "{|}" ���������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/source-highlight.pro�����������������������������������������������������0000644�0001750�0001750�00000001466�11672675565�016520� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������include(../defines.pri) TEMPLATE = app # enable reading of this meta information in the applications that use the static library: CONFIG += link_prl TARGET = source-highlight SOURCES = cmdline.c \ source-highlight.cc INCLUDEPATH += . \ ../../lib \ ../lib \ $$INCPATH DEPENDPATH += ../lib \ ../../lib \ . LIBS += -L../lib \ -l$$LIBRARY_LIB $$ADDITIONAL_LIBRARIES DESTDIR = ../bin contains(COMPILER, msvc) { # custom implementation of getopt functions SOURCES += ../lib/compat/getopt.c ../lib/compat/getopt1.c INCLUDEPATH += ../lib/compat DEPENDPATH += ../lib/compat } target.path = /bin sourcehighlightdata.files = *.lang \ *.outlang \ *.style \ *.css \ *.map \ *.defaults sourcehighlightdata.path = /share/source-highlight INSTALLS += target \ sourcehighlightdata ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/scheme.lang��������������������������������������������������������������0000644�0001750�0001750�00000002472�11672675565�014636� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������comment delim "#\|" "\|#" multiline nested comment start ";" environment string delim "\"" "\"" begin specialchar = '\\.' end type = '#t|#f|#\\[[:alnum:]]+' nonsensitive vardef words = '(define|define-syntax|syntax-case|syntax-rules|lambda|let|let\*|letrec|let-syntax|letrec-syntax|if|else|cond|case|and|not|or|begin|for-each|map|delay|do|dynamic-wind|call/cc|call-with-current-continuation|call-with-input-file|call-with-output-file)' # Match keywords as long as they aren't just a prefix of an identifier keyword = $words + '(?![[:alnum:]!$%&*+./:<=>?@^_~-])' # Make any identifier that doen't start with a keyword be normal normal = '(?!' + $words +')' + '[[:alpha:]!$%&*+./:<=>?@^_~-][[:alnum:]!$%&*+./:<=>?@^_~-]*' # Highlight the named let expressions (cbracket,keyword,normal,function) = `(\()(let)([[:blank:]]+)([[:alpha:]!$%&*+./:<=>?@^_~-][[:alnum:]!$%&*+./:<=>?@^_~-]*)` # Highlight the names of defined forms (cbracket,keyword,normal,function) = `(\()(define(?:-syntax)?)([[:blank:]]+)([[:alpha:]!$%&*+./:<=>?@^_~-][[:alnum:]!$%&*+./:<=>?@^_~-]*)` (cbracket,keyword,normal,cbracket,function) = `(\()(define)([[:blank:]]+)(\()([[:alpha:]!$%&*+./:<=>?@^_~-][[:alnum:]!$%&*+./:<=>?@^_~-]*)` number = '(\#(x|o|b|X|O|B))?[+-]?((0x[[:xdigit:]]+)|(([[:digit:]]*\.)?[[:digit:]]+([eE][+-]?[[:digit:]]+)?))' cbracket = "(|)" ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/tcl.lang�����������������������������������������������������������������0000644�0001750�0001750�00000001740�11672675565�014151� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# language definition for TCL include "script_comment.lang" include "number.lang" include "c_string.lang" include "symbols.lang" cbracket = "{|}" keyword = "proc|global|upvar|if|then|else|elseif|for|foreach", "break|continue|while|set|eval|case|in|switch", "default|exit|error|proc|return|uplevel|loop", "for_array_keys|for_recursive_glob|for_file|unwind_protect", "expr|catch|namespace|rename|variable", "method|itcl_class|public|protected", "append|binary|format|re_syntax|regexp|regsub", "scan|string|subst", "concat|join|lappend|lindex|list|llength|lrange", "lreplace|lsearch|lset|lsort|split", "expr", "incr|close|eof|fblocked|fconfigure|fcopy|file", "fileevent|flush|gets|open|puts|read|seek", "socket|tell", "load|loadTk|package|pgk::create|pgk_mkIndex|source", "bgerror|history|info|interp|memory|unknown", "enconding|http|msgcat", "cd|clock|exec|exit|glob|pid|pwd|time", "dde|registry|resource" vardef ID = '[[:word:]]+' variable = '\$' + $ID��������������������������������source-highlight-3.1.6/src/haskell_literate.lang����������������������������������������������������0000644�0001750�0001750�00000000320�11672675565�016674� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Haskel literate programming # both Bird and Latex style state code start '^>' begin include "haskell.lang" end state code delim "\\begin{code}" "\\end{code}" multiline begin include "haskell.lang" end����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/glsl.lang����������������������������������������������������������������0000644�0001750�0001750�00000007444�11672675564�014336� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# definitions for glsl include "c_comment.lang" state preproc start '^[[:blank:]]*#(?:[[:blank:]]*include)' begin string delim "<" ">" string delim "\"" "\"" escape "\\" include "c_comment.lang" end preproc = '^[[:blank:]]*#([[:blank:]]*[[:word:]]*)' include "number.lang" include "c_string.lang" keyword = "attribute|const|uniform|varying", "centroid", "break|continue|do|for|while", "if|else", "in|out|inout", "invariant|discard|return|struct" predef_var = "gl_BackColor|gl_BackLightModelProduct|gl_BackLightProduct|gl_BackMaterial", "gl_BackSecondaryColor|gl_ClipPlane|gl_ClipVertex|gl_Color|gl_DepthRange", "gl_DepthRangeParameters|gl_EyePlaneQ|gl_EyePlaneR|gl_EyePlaneS|gl_EyePlaneT", "gl_Fog|gl_FogColor|gl_FogFragCoord|gl_FogParameters", "gl_FragColor|gl_FragCoord|gl_FragData|gl_FragDepth|gl_FragFacing", "gl_FrontColor|gl_FrontLightModelProduct|gl_FrontLightProduct", "gl_FrontMaterial|gl_FrontSecondaryColor|gl_LightModel", "gl_LightModelParameters|gl_LightModelProducts|gl_LightProducts", "gl_LightSource|gl_LightSourceParameters|gl_MaterialParameters", "gl_MaxClipPlanes|gl_MaxCombinedTextureImageUnits|gl_MaxDrawBuffers", "gl_MaxFragmentUniformComponents|gl_MaxLights|gl_MaxTextureCoords", "gl_MaxTextureImageUnits|gl_MaxTextureUnits|gl_MaxVaryingFloats", "gl_MaxVertexAttributes|gl_MaxVertexTextureImageUnits|gl_MaxVertexUniformComponents", "gl_ModelViewMatrix|gl_ModelViewMatrixInverse|gl_ModelViewMatrixInverseTranspose", "gl_ModelViewMatrixTranspose|gl_ModelViewProjectionMatrix|gl_ModelViewProjectionMatrixInverse", "gl_ModelViewProjectionMatrixInverseTranspose|gl_ModelViewProjectionMatrixTranspose", "gl_MultiTexCoord0|gl_MultiTexCoord1|gl_MultiTexCoord2|gl_MultiTexCoord2", "gl_MultiTexCoord3|gl_MultiTexCoord4|gl_MultiTexCoord5|gl_MultiTexCoord6", "gl_MultiTexCoord7|gl_NormScale|gl_Normal|gl_NormalMatrix|gl_ObjectPlaneQ", "gl_ObjectPlaneR|gl_ObjectPlaneS|gl_ObjectPlaneT|gl_Point|gl_PointParameters", "gl_PointSize|gl_Position|gl_ProjectionMatrix|gl_ProjectionMatrixInverse", "gl_ProjectionMatrixInverseTranspose|gl_ProjectionMatrixTranspose", "gl_SecondaryColor|gl_SecondaryColor|gl_TexCoord|gl_TextureEnvColor", "gl_TextureMatrix|gl_TextureMatrixInverse|gl_TextureMatrixInverseTranspose", "gl_TextureMatrixTranspose|gl_Vertex" predef_var = `\.(ambient|diffuse|specular|position|halfVector|spotDirection|spotExponent|spotCutoff|spotCosCutoff)` predef_var = `\.(constantAttenuation|linearAttenuation|quadraticAttenuation|sceneColor|emission|shininess)` predef_var = `\.(fadeThresholdSize|distanceConstantAttenuation|distanceLinearAttenuation|distanceQuadraticAttenuation)` predef_var = `\.([xyzw]{1,4}|[rgba]{1,4}|[stpq]{1,4}|near|far|diff|color|density|start|end|scale|size|sizeMin|sizeMax)` predef_func = "radians|degrees|sin|cos|tan|asin|acos|atan", "pow|exp|log|exp2|log2|sqrt|inversesqrt", "abs|sign|floor|ceil|fract|mod|min|max|clamp|mix|step|smoothstep", "length|distance|dot|cross|normalize|ftransform|faceforward|reflect|refract", "matrixCompMult", "lessThan|lessThenEqual|greaterThan|greaterThanEqual|equal|notEqual", "any|all|not", "texture1D|texture1DProj|texture1DLod|texture1DProjLod", "texture2D|texture2DProj|texture2DLod|texture2DProjLod", "texture3D|texture3DProj|texture3DLod|texture3DProjLod", "textureCube|textureCubeLod", "shadow1D|shadow1DProj|shadow1DLod|shadow1DProjLod", "shadow2D|shadow2DProj|shadow2DLod|shadow2DProjLod", "dFdx|dFdy|fwidth|noise1|noise2|noise3|noise4" type = "float|int|void|bool|true|false", "mat2|mat3|mat4", "mat2x2|mat2x3|mat2x4", "mat3x2|mat3x3|mat3x4", "mat4x2|mat4x3|mat4x4", "vec2|vec3|vec4|ivec2|ivec3|ivec4|bvec2|bvec3|bvec4", "sampler1D|sampler2D|sampler3D|samplercube", "sampler1Dshadow|sampler2Dshadow" include "symbols.lang" cbracket = "{|}" include "function.lang" ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/ldap.lang����������������������������������������������������������������0000644�0001750�0001750�00000000243�11672675565�014304� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# for ldap syntax comment start "#" (keyword,string) = `(\<[[:alnum:]_]+:)((?:[^,=]*\z)?)` (attribute,symbol,string,symbol)= `([[:alnum:]_]+)(=)([^,]+)(,?)` �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/src.pro������������������������������������������������������������������0000644�0001750�0001750�00000000121�11672675565�014025� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������TEMPLATE = subdirs SUBDIRS = source-highlight.pro source-highlight-settings.pro �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/src-hilite-lesspipe.sh.in������������������������������������������������0000644�0001750�0001750�00000000656�11672675565�017357� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#! @SHELL@ for source in "$@"; do case $source in *ChangeLog|*changelog) source-highlight --failsafe -f esc --lang-def=changelog.lang --style-file=esc.style -i "$source" ;; *Makefile|*makefile) source-highlight --failsafe -f esc --lang-def=makefile.lang --style-file=esc.style -i "$source" ;; *) source-highlight --failsafe --infer-lang -f esc --style-file=esc.style -i "$source" ;; esac done ����������������������������������������������������������������������������������source-highlight-3.1.6/src/opa.lang�����������������������������������������������������������������0000644�0001750�0001750�00000003477�11672675565�014157� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# written by Valentin Gatien-Baron <valentin.gatien-baron@mlstate.com>, MLstate # (licensed as GPL3 with permission from MLstate) vardef IDENT = '([a-zA-Z_][a-zA-Z_0-9]*|`[^`]*`)' vardef FUNCTION = $IDENT+'(?=\()' vardef MODULE = '[A-Z][a-zA-Z_0-9]*(?=\.)' # same as number.lang but with 0o and 0b also # and without suffixes like unsigned or long long vardef NUMBER = '\<[+-]?((0[xXbBoO][[:xdigit:]]+)|(([[:digit:]]*\.)? [[:digit:]]+([eE][+-]?[[:digit:]]+)?))\>' #directives preproc = '@[A-Za-z_]+' number = $NUMBER # weak coloration for strings # we color some parts of the expressions inserted in strings # at the first level only and it won't work if you put curly braces # in your inserts environment string delim "\"" "\"" escape "\\" begin state string delim "{" "}" begin function = $FUNCTION number = $NUMBER symbol = $MODULE include "symbols.lang" string delim "\"" "\"" escape "\\" end end keyword = "and|as|db|do|else|if|match|then|type|with|begin|css|end|external|forall|import|package|parser|rec|server|val|xml_parser" comment delim "/*" "*/" multiline nested comment start "//" # comment delim "<>" "</>" multiline nested # #id atom = '\#' + $IDENT # bypasses atom = '%%[^%]*%%' # modules symbol = $MODULE # need to come before symbols so that ~ doesn't get colored usertype = '~'+$IDENT # FIXME: need to color also made up symbols, not the set predefined # and defined a regexp SYMBOL, use it here and in string insertions above include "symbols.lang" # no idea what this is cbracket = "{|}" # function recognised as 'ident(' function = $FUNCTION # bindings, recognised by 'ident =' usertype = $IDENT+'(?=[[:blank:]]*=)' # matches some stdlib types # really ought to parse type expr in type def and in type annotations type = '\<(?:int|bool|option|float|void|string|list|text|xhtml|xml)\>' �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/html_simple.lang���������������������������������������������������������0000644�0001750�0001750�00000002666�11672675565�015714� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# this contains only html stuff, no javascript nor css # thus it can be used for inclusions in contexts such as javadoc # to avoid possible recursion problems # e.g., html uses javascript which uses doxygen which uses html... vardef SPECIAL= '(([sS][tT][yY][lL][eE])|(([nN][oO])?[sS][cC][rR][iI][pP][tT])|'+ '([xX][mM][pP])|([iI][fF][rR][aA][mM][eE])|'+ '([nN][oO][eE][mM][bB][eE][dD])|([nN][oO][fF][rR][aA][mM][eE][sS]))' vardef SPECIAL2= '(([tT][iI][tT][lL][eE])|([tT][eE][xX][tT][aA][rR][eE][aA]))' # we need to treat these differently because these elements # can't contain elements and entities # however, they can have attributes so we need to use # nested states # example <style foo="bar"> &amp; <br> not highlighted </style> state keyword = '<'+$SPECIAL begin include "key_string.lang" state keyword = '>' begin keyword = '</'+$SPECIAL+'>' exit 2 normal = '[^<[:blank:]]+' end end # title and textarea are similar, but entities are allowed state keyword delim '<'+$SPECIAL2+'>' '</'+$SPECIAL2+'>' multiline begin preproc = '&([[:alnum:]]+);' normal = '[^<[:blank:]]+' end # if we encounter <plaintext> everything else (up to the end of file) # will be highlighted as normal state keyword = '<[pP][lL][aA][iI][nN][tT][eE][xX][tT]>' begin normal = '.+' end include "xml.lang" keyword = '<(/)?[[:alpha:]][[:alnum:]]*(/)?>' state keyword delim '<(/)?[[:alpha:]][[:alnum:]]*' '(/)?>' multiline begin include "key_string.lang" end ��������������������������������������������������������������������������source-highlight-3.1.6/src/Makefile.in��������������������������������������������������������������0000664�0001750�0001750�00000131026�11676050473�014561� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Copyright (C) 1999-2009 Lorenzo Bettini <http://www.lorenzobettini.it> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = check-regexp$(EXEEXT) source-highlight$(EXEEXT) \ source-highlight-settings$(EXEEXT) EXTRA_PROGRAMS = source-highlight-cgi$(EXEEXT) subdir = src DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/cpp2html.in \ $(srcdir)/java2html.in $(srcdir)/src-hilite-lesspipe.sh.in \ ylwrap ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/gl/m4/00gnulib.m4 \ $(top_srcdir)/gl/m4/ac_prog_doxygen.m4 \ $(top_srcdir)/gl/m4/dirent_h.m4 $(top_srcdir)/gl/m4/dirname.m4 \ $(top_srcdir)/gl/m4/double-slash-root.m4 \ $(top_srcdir)/gl/m4/extensions.m4 \ $(top_srcdir)/gl/m4/getopt.m4 \ $(top_srcdir)/gl/m4/gnulib-common.m4 \ $(top_srcdir)/gl/m4/gnulib-comp.m4 \ $(top_srcdir)/gl/m4/include_next.m4 \ $(top_srcdir)/gl/m4/malloc.m4 $(top_srcdir)/gl/m4/memset.m4 \ $(top_srcdir)/gl/m4/mkdir.m4 $(top_srcdir)/gl/m4/nocrash.m4 \ $(top_srcdir)/gl/m4/ssize_t.m4 $(top_srcdir)/gl/m4/stdbool.m4 \ $(top_srcdir)/gl/m4/stddef_h.m4 \ $(top_srcdir)/gl/m4/stdlib_h.m4 $(top_srcdir)/gl/m4/strdup.m4 \ $(top_srcdir)/gl/m4/string_h.m4 \ $(top_srcdir)/gl/m4/sys_stat_h.m4 \ $(top_srcdir)/gl/m4/time_h.m4 $(top_srcdir)/gl/m4/unistd_h.m4 \ $(top_srcdir)/gl/m4/warn-on-use.m4 \ $(top_srcdir)/gl/m4/wchar_t.m4 \ $(top_srcdir)/m4/ax_boost_base.m4 \ $(top_srcdir)/m4/ax_boost_regex.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = java2html cpp2html src-hilite-lesspipe.sh CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" \ "$(DESTDIR)$(source_highlightdatadir)" PROGRAMS = $(bin_PROGRAMS) am_check_regexp_OBJECTS = check-regexp_cmd.$(OBJEXT) \ check-regexp.$(OBJEXT) check_regexp_OBJECTS = $(am_check_regexp_OBJECTS) am__DEPENDENCIES_1 = check_regexp_DEPENDENCIES = $(am__DEPENDENCIES_1) \ $(top_builddir)/gl/libgnu.la am_source_highlight_OBJECTS = cmdline.$(OBJEXT) \ source-highlight.$(OBJEXT) source_highlight_OBJECTS = $(am_source_highlight_OBJECTS) source_highlight_DEPENDENCIES = $(LDADD) \ $(top_builddir)/lib/srchilite/libsource-highlight.la am_source_highlight_cgi_OBJECTS = cmdline.$(OBJEXT) \ source-highlight-cgi.$(OBJEXT) envmapper.$(OBJEXT) source_highlight_cgi_OBJECTS = $(am_source_highlight_cgi_OBJECTS) source_highlight_cgi_DEPENDENCIES = $(source_highlight_LDADD) am_source_highlight_settings_OBJECTS = \ source-highlight-settings.$(OBJEXT) source_highlight_settings_OBJECTS = \ $(am_source_highlight_settings_OBJECTS) source_highlight_settings_DEPENDENCIES = $(LDADD) \ $(top_builddir)/lib/srchilite/libsource-highlight.la am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' SCRIPTS = $(bin_SCRIPTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(check_regexp_SOURCES) $(source_highlight_SOURCES) \ $(source_highlight_cgi_SOURCES) \ $(source_highlight_settings_SOURCES) DIST_SOURCES = $(check_regexp_SOURCES) $(source_highlight_SOURCES) \ $(source_highlight_cgi_SOURCES) \ $(source_highlight_settings_SOURCES) DATA = $(source_highlightdata_DATA) HEADERS = $(noinst_HEADERS) ETAGS = etags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ABSOLUTEDATADIR = @ABSOLUTEDATADIR@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ ARFLAGS = @ARFLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASH_COMPLETION_DIR = @BASH_COMPLETION_DIR@ BASH_SHELL = @BASH_SHELL@ BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ BOOST_LDFLAGS = @BOOST_LDFLAGS@ BOOST_REGEX_LIB = @BOOST_REGEX_LIB@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHROOT_INPUT_DIR = @CHROOT_INPUT_DIR@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOUBLECPP = @DOUBLECPP@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GENGETOPT = @GENGETOPT@ GETOPT_H = @GETOPT_H@ GNULIB_ALPHASORT = @GNULIB_ALPHASORT@ GNULIB_ATOLL = @GNULIB_ATOLL@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ GNULIB_CHDIR = @GNULIB_CHDIR@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@ GNULIB_DIRFD = @GNULIB_DIRFD@ GNULIB_DUP = @GNULIB_DUP@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ GNULIB_FDATASYNC = @GNULIB_FDATASYNC@ GNULIB_FDOPENDIR = @GNULIB_FDOPENDIR@ GNULIB_FFSL = @GNULIB_FFSL@ GNULIB_FFSLL = @GNULIB_FFSLL@ GNULIB_FSTAT = @GNULIB_FSTAT@ GNULIB_FSTATAT = @GNULIB_FSTATAT@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@ GNULIB_GRANTPT = @GNULIB_GRANTPT@ GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@ GNULIB_LCHMOD = @GNULIB_LCHMOD@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MBTOWC = @GNULIB_MBTOWC@ GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_MKDIRAT = @GNULIB_MKDIRAT@ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ GNULIB_MKFIFO = @GNULIB_MKFIFO@ GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@ GNULIB_MKNOD = @GNULIB_MKNOD@ GNULIB_MKNODAT = @GNULIB_MKNODAT@ GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_MKTIME = @GNULIB_MKTIME@ GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@ GNULIB_OPENDIR = @GNULIB_OPENDIR@ GNULIB_PIPE = @GNULIB_PIPE@ GNULIB_PIPE2 = @GNULIB_PIPE2@ GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PTSNAME = @GNULIB_PTSNAME@ GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PWRITE = @GNULIB_PWRITE@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_READ = @GNULIB_READ@ GNULIB_READDIR = @GNULIB_READDIR@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ GNULIB_REWINDDIR = @GNULIB_REWINDDIR@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SCANDIR = @GNULIB_SCANDIR@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_STAT = @GNULIB_STAT@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRERROR_R = @GNULIB_STRERROR_R@ GNULIB_STRNCAT = @GNULIB_STRNCAT@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRPTIME = @GNULIB_STRPTIME@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOD = @GNULIB_STRTOD@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRTOLL = @GNULIB_STRTOLL@ GNULIB_STRTOULL = @GNULIB_STRTOULL@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@ GNULIB_TIMEGM = @GNULIB_TIMEGM@ GNULIB_TIME_R = @GNULIB_TIME_R@ GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@ GNULIB_UNSETENV = @GNULIB_UNSETENV@ GNULIB_USLEEP = @GNULIB_USLEEP@ GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@ GNULIB_WCTOMB = @GNULIB_WCTOMB@ GNULIB_WRITE = @GNULIB_WRITE@ GNULIB__EXIT = @GNULIB__EXIT@ GREP = @GREP@ HAVE_ALPHASORT = @HAVE_ALPHASORT@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ HAVE_CHOWN = @HAVE_CHOWN@ HAVE_CLOSEDIR = @HAVE_CLOSEDIR@ HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@ HAVE_DECL_FDOPENDIR = @HAVE_DECL_FDOPENDIR@ HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ HAVE_DIRENT_H = @HAVE_DIRENT_H@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHDIR = @HAVE_FCHDIR@ HAVE_FCHMODAT = @HAVE_FCHMODAT@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FDATASYNC = @HAVE_FDATASYNC@ HAVE_FDOPENDIR = @HAVE_FDOPENDIR@ HAVE_FFSL = @HAVE_FFSL@ HAVE_FFSLL = @HAVE_FFSLL@ HAVE_FSTATAT = @HAVE_FSTATAT@ HAVE_FSYNC = @HAVE_FSYNC@ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ HAVE_FUTIMENS = @HAVE_FUTIMENS@ HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ HAVE_GETGROUPS = @HAVE_GETGROUPS@ HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ HAVE_GETLOGIN = @HAVE_GETLOGIN@ HAVE_GETOPT_H = @HAVE_GETOPT_H@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GRANTPT = @HAVE_GRANTPT@ HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LCHOWN = @HAVE_LCHOWN@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ HAVE_LSTAT = @HAVE_LSTAT@ HAVE_MBSLEN = @HAVE_MBSLEN@ HAVE_MEMCHR = @HAVE_MEMCHR@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_MKDIRAT = @HAVE_MKDIRAT@ HAVE_MKDTEMP = @HAVE_MKDTEMP@ HAVE_MKFIFO = @HAVE_MKFIFO@ HAVE_MKFIFOAT = @HAVE_MKFIFOAT@ HAVE_MKNOD = @HAVE_MKNOD@ HAVE_MKNODAT = @HAVE_MKNODAT@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMP = @HAVE_MKSTEMP@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ HAVE_NANOSLEEP = @HAVE_NANOSLEEP@ HAVE_OPENDIR = @HAVE_OPENDIR@ HAVE_OS_H = @HAVE_OS_H@ HAVE_PIPE = @HAVE_PIPE@ HAVE_PIPE2 = @HAVE_PIPE2@ HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@ HAVE_PREAD = @HAVE_PREAD@ HAVE_PTSNAME = @HAVE_PTSNAME@ HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ HAVE_PWRITE = @HAVE_PWRITE@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_READDIR = @HAVE_READDIR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ HAVE_REALPATH = @HAVE_REALPATH@ HAVE_REWINDDIR = @HAVE_REWINDDIR@ HAVE_RPMATCH = @HAVE_RPMATCH@ HAVE_SCANDIR = @HAVE_SCANDIR@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@ HAVE_SLEEP = @HAVE_SLEEP@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRPTIME = @HAVE_STRPTIME@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ HAVE_TIMEGM = @HAVE_TIMEGM@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ HAVE_USLEEP = @HAVE_USLEEP@ HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE__BOOL = @HAVE__BOOL@ HAVE__EXIT = @HAVE__EXIT@ HELP2MAN = @HELP2MAN@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBRARY_NAMESPACE = @LIBRARY_NAMESPACE@ LIBRARY_VERSION = @LIBRARY_VERSION@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@ NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ NEXT_DIRENT_H = @NEXT_DIRENT_H@ NEXT_GETOPT_H = @NEXT_GETOPT_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PRAGMA_COLUMNS = @PRAGMA_COLUMNS@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ RANLIB = @RANLIB@ REPLACE_CALLOC = @REPLACE_CALLOC@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ REPLACE_CHOWN = @REPLACE_CHOWN@ REPLACE_CLOSE = @REPLACE_CLOSE@ REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@ REPLACE_DIRFD = @REPLACE_DIRFD@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@ REPLACE_FSTAT = @REPLACE_FSTAT@ REPLACE_FSTATAT = @REPLACE_FSTATAT@ REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_LSTAT = @REPLACE_LSTAT@ REPLACE_MALLOC = @REPLACE_MALLOC@ REPLACE_MBTOWC = @REPLACE_MBTOWC@ REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKDIR = @REPLACE_MKDIR@ REPLACE_MKFIFO = @REPLACE_MKFIFO@ REPLACE_MKNOD = @REPLACE_MKNOD@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OPENDIR = @REPLACE_OPENDIR@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_PWRITE = @REPLACE_PWRITE@ REPLACE_READ = @REPLACE_READ@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_REALLOC = @REPLACE_REALLOC@ REPLACE_REALPATH = @REPLACE_REALPATH@ REPLACE_RMDIR = @REPLACE_RMDIR@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_STAT = @REPLACE_STAT@ REPLACE_STPNCPY = @REPLACE_STPNCPY@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRERROR_R = @REPLACE_STRERROR_R@ REPLACE_STRNCAT = @REPLACE_STRNCAT@ REPLACE_STRNDUP = @REPLACE_STRNDUP@ REPLACE_STRNLEN = @REPLACE_STRNLEN@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ REPLACE_UNLINK = @REPLACE_UNLINK@ REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ REPLACE_UNSETENV = @REPLACE_UNSETENV@ REPLACE_USLEEP = @REPLACE_USLEEP@ REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@ REPLACE_WCTOMB = @REPLACE_WCTOMB@ REPLACE_WRITE = @REPLACE_WRITE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STRIP = @STRIP@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TAR = @TAR@ TEXI2HTML = @TEXI2HTML@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ VALGRIND = @VALGRIND@ VERSION = @VERSION@ YACC = @YACC@ YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bash_completiondir = @bash_completiondir@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ gltests_WITNESS = @gltests_WITNESS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ source_highlightdatadir = @source_highlightdatadir@ source_highlightdocdir = @source_highlightdocdir@ source_highlightlibdocdir = @source_highlightlibdocdir@ source_highlightlibexampledir = @source_highlightlibexampledir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUFFIXES = .ggo bin_SCRIPTS = java2html cpp2html src-hilite-lesspipe.sh SRCHILITE = $(top_builddir)/src/source-highlight$(EXEEXT) INCLUDES = -I@top_srcdir@/lib AM_CPPFLAGS = -I$(top_srcdir)/gl -I$(top_builddir)/gl $(BOOST_CPPFLAGS) AM_LDFLAGS = $(BOOST_LDFLAGS) LDADD = $(top_builddir)/gl/libgnu.la source_highlight_LDADD = $(LDADD) $(top_builddir)/lib/srchilite/libsource-highlight.la source_highlight_cgi_LDADD = $(source_highlight_LDADD) check_regexp_LDADD = $(BOOST_REGEX_LIB) $(top_builddir)/gl/libgnu.la source_highlight_settings_LDADD = $(LDADD) $(top_builddir)/lib/srchilite/libsource-highlight.la # for most rules, we use one file per line. `diffs' are more clear this way #source_highlight_SOURCES = cmdline.c startapp.cc source-highlight.cc source_highlight_SOURCES = cmdline.c source-highlight.cc check_regexp_SOURCES = check-regexp_cmd.c check-regexp.cpp source_highlight_settings_SOURCES = source-highlight-settings.cpp source_highlight_cgi_SOURCES = cmdline.c source-highlight-cgi.cc envmapper.c # files that we don't want automake/autoconf to touch ever. # just stick them in the distribution as-is EXTRA_DIST = \ java2html.in \ cpp2html.in \ src-hilite-lesspipe.sh.in \ envmapper.h \ cmdline.ggo check-regexp_cmd.ggo \ $(source_highlightdata_DATA) \ src.pro source-highlight.pro source-highlight-settings.pro LANGFILES = \ bison.lang c.lang cpp.lang javascript.lang perl.lang ruby.lang \ c_comment.lang flex.lang log.lang php.lang sml.lang \ caml.lang function.lang lua.lang prolog.lang symbols.lang \ changelog.lang java.lang number.lang python.lang url.lang \ pascal.lang fortran.lang fixed-fortran.lang \ html.lang html_simple.lang latex.lang logtalk.lang \ diff.lang c_string.lang langdef.lang outlang.lang style.lang \ extreme_comment.lang extreme_comment2.lang extreme_comment3.lang \ postscript.lang csharp.lang xml.lang sh.lang script_comment.lang \ tcl.lang sql.lang bib.lang makefile.lang css.lang m4.lang \ default.lang nohilite.lang slang.lang key_string.lang properties.lang \ desktop.lang lsm.lang spec.lang haxe.lang ldap.lang glsl.lang xorg.lang \ clike_vardeclaration.lang scala.lang ada.lang conf.lang pc.lang oz.lang \ texinfo.lang haskell.lang haskell_literate.lang \ manifest.lang asm.lang todo.lang applescript.lang \ vbscript.lang awk.lang bat.lang clipper.lang cobol.lang d.lang \ errors.lang erlang.lang proto.lang vala.lang lisp.lang \ scheme.lang po.lang opa.lang javalog.lang upc.lang tml.lang LANGFILES_NOTTOCHECK = \ tml_formatting_all.lang tml_macrolinks.lang tml_macrosdelayed2.lang \ tml_formatting.lang tml_macros1.lang tml_macrosdelayed3.lang \ tml_glue.lang tml_macros2.lang tml_macros.lang \ tml_macrosdelayed1.lang tml_macrotokens.lang OUTLANGFILES = \ css_common.outlang \ esc.outlang \ html_common.outlang \ html_ref.outlang \ html_notfixed.outlang \ htmlcss.outlang \ htmltable.outlang \ htmltablelinenum.outlang \ html.outlang \ latex.outlang \ latexcolor.outlang \ xhtml_common.outlang \ xhtmlcss.outlang \ xhtml.outlang \ xhtml_notfixed.outlang \ xhtmltable.outlang \ texinfo.outlang \ javadoc.outlang \ docbook.outlang \ odf.outlang \ mediawiki.outlang STYLEFILES = texinfo.style esc.style source_highlightdata_DATA = \ $(LANGFILES) $(LANGFILES_NOTTOCHECK) $(OUTLANGFILES) \ $(STYLEFILES) \ default.style style2.style style3.style \ javalog.style \ lang.map outlang.map \ default.css \ style.defaults noinst_HEADERS = cmdline.h check-regexp_cmd.h all: all-am .SUFFIXES: .SUFFIXES: .ggo .c .cc .cpp .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): java2html: $(top_builddir)/config.status $(srcdir)/java2html.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ cpp2html: $(top_builddir)/config.status $(srcdir)/cpp2html.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ src-hilite-lesspipe.sh: $(top_builddir)/config.status $(srcdir)/src-hilite-lesspipe.sh.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p || test -f $$p1; \ then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list check-regexp$(EXEEXT): $(check_regexp_OBJECTS) $(check_regexp_DEPENDENCIES) @rm -f check-regexp$(EXEEXT) $(CXXLINK) $(check_regexp_OBJECTS) $(check_regexp_LDADD) $(LIBS) source-highlight$(EXEEXT): $(source_highlight_OBJECTS) $(source_highlight_DEPENDENCIES) @rm -f source-highlight$(EXEEXT) $(CXXLINK) $(source_highlight_OBJECTS) $(source_highlight_LDADD) $(LIBS) source-highlight-cgi$(EXEEXT): $(source_highlight_cgi_OBJECTS) $(source_highlight_cgi_DEPENDENCIES) @rm -f source-highlight-cgi$(EXEEXT) $(CXXLINK) $(source_highlight_cgi_OBJECTS) $(source_highlight_cgi_LDADD) $(LIBS) source-highlight-settings$(EXEEXT): $(source_highlight_settings_OBJECTS) $(source_highlight_settings_DEPENDENCIES) @rm -f source-highlight-settings$(EXEEXT) $(CXXLINK) $(source_highlight_settings_OBJECTS) $(source_highlight_settings_LDADD) $(LIBS) install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check-regexp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check-regexp_cmd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmdline.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/envmapper.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/source-highlight-cgi.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/source-highlight-settings.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/source-highlight.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< .cc.o: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cc.lo: @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< .cpp.o: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-source_highlightdataDATA: $(source_highlightdata_DATA) @$(NORMAL_INSTALL) test -z "$(source_highlightdatadir)" || $(MKDIR_P) "$(DESTDIR)$(source_highlightdatadir)" @list='$(source_highlightdata_DATA)'; test -n "$(source_highlightdatadir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(source_highlightdatadir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(source_highlightdatadir)" || exit $$?; \ done uninstall-source_highlightdataDATA: @$(NORMAL_UNINSTALL) @list='$(source_highlightdata_DATA)'; test -n "$(source_highlightdatadir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(source_highlightdatadir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(source_highlightdatadir)" && rm -f $$files ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(DATA) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(source_highlightdatadir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-source_highlightdataDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-binSCRIPTS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \ uninstall-source_highlightdataDATA .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic clean-libtool ctags distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-binPROGRAMS install-binSCRIPTS install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-source_highlightdataDATA \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am \ uninstall-binPROGRAMS uninstall-binSCRIPTS \ uninstall-source_highlightdataDATA #.ggo.c: # touch $@ @NO_GENGETOPT_FALSE@check-regexp_cmd.c: $(srcdir)/check-regexp_cmd.ggo @NO_GENGETOPT_FALSE@ $(GENGETOPT) --input $(srcdir)/check-regexp_cmd.ggo --unamed-opts -F check-regexp_cmd --output-dir=$(srcdir) @NO_GENGETOPT_FALSE@.ggo.c: @NO_GENGETOPT_FALSE@ $(GENGETOPT) --input $< --unamed-opts --no-handle-help --no-handle-version --output-dir=$(srcdir) # in order to make it work with parallel make we need to make # these deps explicit cmdline.h: cmdline.c # files that are built before distribution gets built #MAINTAINERCLEANFILES = $(BUILT_SOURCES) check: for langfile in $(LANGFILES); do \ $(SRCHILITE) --data-dir=$(srcdir) --check-lang $(srcdir)/$$langfile ; \ done && \ for outlangfile in $(OUTLANGFILES); do \ $(SRCHILITE) --data-dir=$(srcdir) --check-outlang $(srcdir)/$$outlangfile ; \ done tags: ctags --c-types='defgmstuv' --recurse=yes $(srcdir)/* .PHONY: tags # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/envmapper.c��������������������������������������������������������������0000644�0001750�0001750�00000006636�11672675564�014675� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (C) 1999, 2000, 2001 Lorenzo Bettini <http://www.lorenzobettini.it> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ /* * src/envmapper.c -- maps QUERY_STRING environment to argv * * 19.04.2001 [SPX] * added __convert_string() and __convert_char() to * interpret '%XX' 'characters' of 'QUERY_STRING' * * checks for CGI by scanning REQUEST_METHOD * * 'QUERY_STRING' is determined by REQUEST_METHOD * 06.04.2001 [SPX] completed initial revision * 05.04.2001 [SPX] initial revision * * written by Robert Wetzel <rw8@mail.inf.tu-dresden.de> */ #include <stdlib.h> #include <string.h> #include <stdio.h> #include <ctype.h> #include "envmapper.h" int __convert_char(char *hexstr, int *source) { int i, ch, temp_ch; for (ch = i = 0; i < 2; i++) { temp_ch = hexstr[(*source)++]; if (!isxdigit(temp_ch)) return temp_ch; temp_ch -= '0'; if (temp_ch > 9) temp_ch -= 'A' - '9' - 1; ch = (ch << 4) + temp_ch; } return ch; } char * __convert_string(char *hexstr) { int source, dest, ch, len; source = dest = 0; len = strlen(hexstr); while (source < len) { if ((ch=hexstr[source++]) == '%') hexstr[dest++] = __convert_char(hexstr, &source); else hexstr[dest++] = ch; } hexstr[dest] = '\0'; return hexstr; } char * __get_option_string(char *token) { char *new_token; new_token = (char*)calloc(strlen(token)+3, 1); sprintf(new_token, "--%s", token); return new_token; } char ** map_environment(int *argc, char **argv) { char *query_string, *request_method, *token; char **new_argv; /* check first, if CGI environment exists */ request_method = getenv(ENV_REQUEST_METHOD); if (!request_method) return argv; /* Ok. There is a request method. Lets check how the 'arguments' are given by determining the request method... */ if (!strcasecmp(request_method, REQUEST_METHOD_GET)) query_string = getenv(ENV_QUERY_STRING); else { query_string = (char*)calloc(MAX_QUERY_STRING_LEN, sizeof(char)); query_string = fgets(query_string, MAX_QUERY_STRING_LEN - 2, stdin); if (query_string) query_string[strlen(query_string)-2] = '\0'; } if (!query_string) /* print error page! Currently this looks like a security hole as it switches back to command line mode. */ return argv; query_string = __convert_string(query_string); /* allocate memory for the new argv which may hold up to MAX_PARAM_AMOUNT options */ new_argv = (char**)calloc(MAX_PARAM_AMOUNT, sizeof argv); /* 'copy' parameter strings */ memcpy(new_argv, argv, *argc * sizeof argv); token = strtok(query_string, "&"); do { new_argv[(*argc)++] = __get_option_string(token); } while ((token = strtok(NULL, "&"))); return new_argv; } ��������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/perl.lang����������������������������������������������������������������0000644�0001750�0001750�00000010722�11672675565�014331� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������preproc = "import" # these might be unreadable but I don't know how else to do that... (keyword,regexp,keyword) = `(s)(\{(?:\\\}|[^}])*\}\{(?:\\\}|[^}])*\})([ixsmogce]*)` (keyword,regexp,keyword) = `(s)(\((?:\\\)|[^)])*\)\((?:\\\)|[^)])*\))([ixsmogce]*)` (keyword,regexp,keyword) = `(s)(\[(?:\\\]|[^\]])*\]\[(?:\\\]|[^\]])*\])([ixsmogce]*)` (keyword,regexp,keyword) = `(s)(<.*><.*>)([ixsmogce]*)` (keyword,string) = `(q(?:q?))(\{(?:\\\}|[^}])*\})` (keyword,string) = `(q(?:q?))(\((?:\\\)|[^)])*\))` (keyword,string) = `(q(?:q?))(\[(?:\\\]|[^\]])*\])` (keyword,string) = `(q(?:q?))(<.*>)` (keyword,string,string) = `(q(?:q?))([^[:alnum:][:blank:]])(.*\2)` # the last (lookahead) expression is used to deal with # used # as a delimiter. # otherwise, with a line such as # s#foo\###; # my comment # the # of the comment would be match as the closing delimiter (keyword,regexp,regexp,keyword) = `(s)([^[:alnum:][:blank:]])(.*\2.*\2)([ixsmogce]*(?=[[:blank:]]*(?:\)|;)))` # this is to deal with cases where the delimiters for the first and the # second part are not the same (and spaces are allowed between the first # closing and the second opening) (keyword,regexp,regexp,regexp,regexp,keyword) = `(s)([^[:alnum:][:blank:]])(.*\2[[:blank:]]*)([^[:alnum:][:blank:]])(.*\4)([ixsmogce]*(?=[[:blank:]]*(?:\)|;)))` include "script_comment.lang" include "number.lang" # this won't work if # has something (non blank) before vardef comment_in_exp = '[[:blank:]]+#.*' vardef var_in_exp = '\$([[:word:]]+|\{[[:word:]]+\})' # this is to highlight correctly regular expressions # (and don't mix them with { } code blocks environment keyword = '(m|qr)(?=\{)' begin environment regexp = '\{' begin comment = $comment_in_exp variable = $var_in_exp regexp = '\\\{|\\\}' regexp = "}" exitall end end # repeat for other non alpha numerical chars environment keyword = '(m|qr)(?=#)' begin environment regexp = '#' begin comment = $comment_in_exp variable = $var_in_exp regexp = '\\#' regexp = "#" exitall end end environment keyword = '(m|qr)(?=\|)' begin environment regexp = '\|' begin comment = $comment_in_exp variable = $var_in_exp regexp = '\\\|' regexp = "\|" exitall end end environment keyword = '(m|qr)(?=@)' begin environment regexp = '@' begin comment = $comment_in_exp variable = $var_in_exp regexp = '\\@' regexp = "@" exitall end end environment keyword = '(m|qr)(?=<)' begin environment regexp = '<' begin comment = $comment_in_exp variable = $var_in_exp regexp = '\\<|\\>' regexp = ">" exitall end end environment keyword = '(m|qr)(?=\[)' begin environment regexp = '\[' begin comment = $comment_in_exp variable = $var_in_exp regexp = '\\]' regexp = "]" exitall end end environment keyword = '(m|qr)(?=\\)' begin environment regexp = '\\' begin comment = $comment_in_exp variable = $var_in_exp regexp = '\\\\' regexp = "\\" exitall end end environment keyword = '(m|qr)(?=/)' begin environment regexp = '/' begin comment = $comment_in_exp variable = $var_in_exp regexp = '\\/' regexp = "/" exitall end end string delim "\"" "\"" escape "\\" string delim "'" "'" escape "\\" string delim "<" ">" #string = '[[:word:]]*/[^\n]*/[[:word:]]*' string = '/[^\n]*/' keyword = "chomp|chop|chr|crypt|hex|i|index|lc|lcfirst|length|oct|ord|pack|q|qq|reverse|rindex|sprintf|substr|tr|uc|ucfirst|m|s|g|qw|abs|atan2|cos|exp|hex|int|log|oct|rand|sin|sqrt|srand|my|local|our|delete|each|exists|keys|values|pack|read|syscall|sysread|syswrite|unpack|vec|undef|unless|return|length|grep|sort|caller|continue|dump|eval|exit|goto|last|next|redo|sub|wantarray|pop|push|shift|splice|unshift|split|switch|join|defined|foreach|last|chop|chomp|bless|dbmclose|dbmopen|ref|tie|tied|untie|while|next|map|eq|die|cmp|lc|uc|and|do|if|else|elsif|for|use|require|package|import|chdir|chmod|chown|chroot|fcntl|glob|ioctl|link|lstat|mkdir|open|opendir|readlink|rename|rmdir|stat|symlink|umask|unlink|utime|binmode|close|closedir|dbmclose|dbmopen|die|eof|fileno|flock|format|getc|print|printf|read|readdir|rewinddir|seek|seekdir|select|syscall|sysread|sysseek|syswrite|tell|telldir|truncate|warn|write|alarm|exec|fork|getpgrp|getppid|getpriority|kill|pipe|qx|setpgrp|setpriority|sleep|system|times|x|wait|waitpid" comment delim '^\=(?:head1|head2|item)' '\=cut' multiline variable = '(?:\$[#]?|@|%)[/[:word:]]+' include "symbols.lang" cbracket = "{|}" include "function.lang" ����������������������������������������������source-highlight-3.1.6/src/langdef.lang�������������������������������������������������������������0000644�0001750�0001750�00000000745�11672675565�014773� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# this is the language definition for the # language definition syntax itself comment start "#" preproc = "include" string delim "\"" "\"" escape "\\" multiline regexp delim "'" "'" escape "\\" multiline regexp delim "`" "`" escape "\\" multiline keyword = "state|environment|begin|end|delim|escape|start", "multiline|nested|vardef|exitall|exit", "redef|subst|nonsensitive" symbol = "=|+|,|(|)" vardef ID = '[[:word:]]+' variable = '\$' + $ID variable = $ID ���������������������������source-highlight-3.1.6/src/style3.style�������������������������������������������������������������0000644�0001750�0001750�00000000243�11672675565�015026� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������keyword blue b ; type darkgreen ; string red ; comment brown i ; number purple ; preproc teal b ; symbol darkred ; function black b; cbracket red; lineno orange b;�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/html.lang����������������������������������������������������������������0000644�0001750�0001750�00000000714�11672675565�014333� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# deal with embedded CSS state keyword = "<style" nonsensitive begin include "key_string.lang" state keyword = '>' begin keyword = "</style>" nonsensitive exit 2 include "css.lang" end end # deal with embedded Javascript state keyword = "<script" nonsensitive begin include "key_string.lang" state keyword = '>' begin keyword = "</script>" nonsensitive exit 2 include "javascript.lang" end end include "html_simple.lang" ����������������������������������������������������source-highlight-3.1.6/src/flex.lang����������������������������������������������������������������0000644�0001750�0001750�00000001572�11672675564�014327� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������state preproc delim '^%\{' '^%\}' multiline begin include "cpp.lang" end state preproc start '^%[sx]' begin function = '[[:alpha:]_][[:alnum:]_-]*' end state preproc start '^%option' begin keyword = '[[:alpha:]_][[:alnum:]_-]*' string delim "\"" "\"" symbol = "=" end preproc = '^%(array|pointer|[aceknopr])' state preproc start '[[:alpha:]_][[:alnum:]_-]*' begin type = '\{[[:alpha:]_][[:alnum:]_-]*\}' string delim "\"" "\"" escape "\\" include "symbols.lang" end state preproc = '^%%' begin state preproc = '^%%' begin include "cpp.lang" end function = '<[[:alpha:]_][[:alnum:]_-]*>' string delim "\"" "\"" escape "\\" preproc = '\\.' type = '\{[[:alpha:]_][[:alnum:]_-]*\}' comment delim "/*" "*/" multiline nested state cbracket delim "{" "}" multiline nested begin variable = '\$.' include "cpp.lang" end include "symbols.lang" end��������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/lisp.lang����������������������������������������������������������������0000644�0001750�0001750�00000001447�11672675565�014342� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������comment delim "#\|" "\|#" multiline nested comment start ";" vardef SPECIALCHAR = '\\.' environment string delim "\"" "\"" begin specialchar = $SPECIALCHAR end number = '(\#(x|o|b|X|O|B))?[+-]?((0x[[:xdigit:]]+)|(([[:digit:]]*\.)? [[:digit:]]+([eE][+-]?[[:digit:]]+)?))u?((int(?:8|16|32|64))|L)?' type = '#?\'(\b|\/|\+|\?|\*|\-)[[:alnum:]_\/\-\+\*\?:]+(\+|\?|\*|\-|\/|\b)' preproc = ':[[:alnum:]\-]+' variable = '(\+|\*)[[:alnum:]_\-\+\*\?:]+(\+|\*)' normal = '(\b|\+|\?|\*|\-)[[:alnum:]_\-\+\*\?:]+(\+|\?|\*|\-|\b)' (cbracket,keyword) = `(\()(defconstant|defvar|defparameter|case|cond|in-package|deftype|list|definline|declare|when|defgeneric|defmethod|defpackage|defstruct|defclass|defun|defmacro|loop|let\*|let|progn|push|pop|cons|car|setf|getf|cdr|if|equal|eql|eq|\+|\*|\-)` cbracket = "(|)" �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/fortran.lang�������������������������������������������������������������0000644�0001750�0001750�00000003422�11672675564�015040� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Fortran language definition file for GNU Source-highlight keyword = "ACCESS|ASSIGN|BACKSPACE|BLANK|BLOCK|CALL", "CLOSE|COMMON|CONTINUE|DATA|DIMENSION|DIRECT|DO", "ELSE|ENDIF|ENDDO|END", "ENTRY|EOF|EQUIVALENCE|ERR|EXIST|EXTERNAL|FILE|FMT|FORM", "FORMAT|FORMATTED|FUNCTION|GO|TO|IF|IMPLICIT|INCLUDE|INQUIRE", "INTRINSIC|IOSTAT|LOGICAL|NAMED|NAMELIST|NEXTREC|NUMBER|OPEN|OPENED", "PARAMETER|PAUSE|PRINT|PROGRAM|READ|REC|RECL", "RETURN|REWIND|SEQUENTIAL|STATUS|STOP|SUBROUTINE|THEN|TYPE", "UNFORMATTED|UNIT|WRITE|SAVE" nonsensitive # Fortran 90 keyword = "ALLOCATE|ALLOCATABLE|CASE|CONTAINS|CYCLE|DEALLOCATE", "ELSEWHERE|EXIT|INTERFACE|INTENT|MODULE|ONLY|OPERATOR", "OPTIONAL|POINTER|PRIVATE|PROCEDURE|PUBLIC|RESULT|RECURSIVE", "SELECT|SEQUENCE|TARGET|USE|WHILE|WHERE" nonsensitive # Fortran 95 keyword = "ELEMENTAL|FORALL|PURE" nonsensitive # Fortran 2003 keyword = "ABSTRACT|CLASS|DELEGATE|STATIC|REFERENCE|ROUND", "DECIMAL|SIGN|ENCODING|IOMSG|ENDFILE|NEXTREC|PENDING", "PASS|ASSOCIATE|FLUSH|DECORATE|EXTENDS|EXTENSIBLE|GENERIC", "NON_OVERRIDABLE|ENUM|ENUMERATOR|TYPEALIAS|MOVE_ALLOC" nonsensitive keyword = "ASYNCHRONOUS|BIND|PROTECTED|VOLATILE" nonsensitive # Continuation character specialchar = "&" comment start "!" # Real constants number = '[+-]?\<([[:digit:]]*\.)?[[:digit:]]*([eEdDqQ][+-]?[[:digit:]]+)?(_[[:digit:][:alpha:]]+)?\>' # Binary, octal, and hexadecimal constants number = 'b\'\<[01]+\>\'' number = 'o\'\<[0-7]+\>\'' number = 'z\'\<[A-Fa-f0-9]+\>\'' # fortran strings have no \ escape char string delim "\"" "\"" string delim "'" "'" type = "CHARACTER|DOUBLE|INTEGER|REAL|PRECISION", "COMPLEX" nonsensitive include "symbols.lang" include "function.lang" ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/tml_macrotokens.lang�����������������������������������������������������0000664�0001750�0001750�00000000240�11672675565�016564� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# $tokens, $tokens(With, Args) - occur inside %MACRO{"args" (function, usertype, function) = `(\$[a-zA-Z0-9_]+\()([^\)]*)(\))` (function) = `(\$[a-zA-Z0-9_]+)` ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/clike_vardeclaration.lang������������������������������������������������0000644�0001750�0001750�00000000235�11672675564�017531� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������(usertype,usertype,normal) = `([[:alpha:]_](?:[^[:punct:][:space:]]|[_])*) ((?:<.*>)?) (\s+(?=[*&]*[[:alpha:]_][^[:punct:][:space:]]*\s*[[:punct:]\[\]]+))` �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/tml_macrosdelayed2.lang��������������������������������������������������0000664�0001750�0001750�00000001033�11672675565�017136� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������environment keyword delim $DELAYEDMACROSTART $DELAYEDMACROEND multiline nested begin attribute = $MACROATTR keyword = $MACRO include "tml_macros2.lang" include "tml_macrosdelayed3.lang" environment string delim "\\\"" "\\\"" escape "\\\\" multiline begin keyword = $MACRO include "tml_macros2.lang" include "tml_macrosdelayed3.lang" include "tml_macrotokens.lang" include "tml_macrolinks.lang" include "tml_formatting.lang" end include "tml_macrotokens.lang" end �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/html_notfixed.outlang����������������������������������������������������0000644�0001750�0001750�00000000510�11672675565�016755� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������include "html_common.outlang" fixed "<tt>$text</tt>" doctemplate "<!-- Generator: $additional --> $header" "$footer" end nodoctemplate "<!-- Generator: $additional --> $header" "$footer" end translations "\n" "<br>\n" " " "&nbsp; " '^ ' "&nbsp;" # a space at the beginning of a line "\t" "&nbsp; &nbsp; &nbsp; &nbsp; " end ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/errors.lang��������������������������������������������������������������0000644�0001750�0001750�00000000634�11672675564�014703� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# highlight errors like compiler output errors, e.g. # filename:line:col: warning: etc... # the path can also start with a drive letter and : state (path,symbol,function,symbol,function,symbol) = `((?:[[:alpha:]]:)?[^[:blank:]:]+)(:)([[:digit:]]+)(:?)([[:digit:]]*)(:?)` begin warning = "warning:" error = "error:" string delim "\"" "\"" string delim "`" "'" string delim "'" "'" normal = '\z' exit end ����������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/applescript.lang���������������������������������������������������������0000644�0001750�0001750�00000003057�11672675564�015717� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# language definition for AppleScript comment start "--" environment comment delim "(*" "*)" multiline begin include "url.lang" include "todo.lang" end vardef SPECIALCHAR = '\\.' environment string delim "\"" "\"" begin specialchar = $SPECIALCHAR end keyword = "and|as|at|beginning|considering|contain|contains|does|div|else|end", "equal|error|every|exit|first|from|get|global|greater|if|ignoring|in|is|last", "local|me|mod|my|not|of|on|or|property|reopen|repeat|return|script|set|tell", "than|the|then|to|transaction|try|with|without|which|while|whose", "AppleScript|access|activate|after|alias|application|ascending|ASCII|at", "attached|before|box|button|buttons|case|cell|cells|character|characters", "choose|class|close|column|columns|content|contents|control|controls", "copy|count|current|data|date|day|default|delay|delete|delimiter", "descending|desktop|dialog|display|document", "documents|domain|duplicate|enabled|ends|eof|equal|entry", "entries|exists|false|fields|field|file|files|folder|folders", "for|icon|icons|indicator|indicators|item|items", "length|list|load|location|localized|make|matrix|menu|menus", "missing|month|months|name|new|number|offset|open|order|panel", "panels|path|popup|print|process|progress", "properties|quit|read|response|row|rows|scroll|select", "selected|selection|sheet|size|sort|sorted|source|specification", "start|starting|stop|string|table|text|title|true", "Unicode|update|user|value|visible|view|views|window|windows|write|year|years" include "function.lang" cbracket = "{|}" include "symbols.lang" include "number.lang"���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/ylwrap�������������������������������������������������������������������0000644�0001750�0001750�00000006312�11672675565�013765� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#! /bin/sh # ylwrap - wrapper for lex/yacc invocations. # Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. # Written by Tom Tromey <tromey@cygnus.com>. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Usage: # ylwrap PROGRAM INPUT [OUTPUT DESIRED]... -- [ARGS]... # * PROGRAM is program to run. # * INPUT is the input file # * OUTPUT is file PROG generates # * DESIRED is file we actually want # * ARGS are passed to PROG # Any number of OUTPUT,DESIRED pairs may be used. # The program to run. prog="$1" shift # Make any relative path in $prog absolute. case "$prog" in /* | [A-Za-z]:\\*) ;; */*) prog="`pwd`/$prog" ;; esac # The input. input="$1" shift case "$input" in /* | [A-Za-z]:\\*) # Absolute path; do nothing. ;; *) # Relative path. Make it absolute. Why? Because otherwise any # debugging info in the generated file will point to the wrong # place. This is really gross. input="`pwd`/$input" ;; esac # We don't want to use the absolute path if the input in the current # directory like when making a tar ball. input_base=`echo $input | sed -e 's|.*/||'` if test -f $input_base && cmp $input_base $input >/dev/null 2>&1; then input=$input_base fi pairlist= while test "$#" -ne 0; do if test "$1" = "--"; then shift break fi pairlist="$pairlist $1" shift done # FIXME: add hostname here for parallel makes that run commands on # other machines. But that might take us over the 14-char limit. dirname=ylwrap$$ trap "cd `pwd`; rm -rf $dirname > /dev/null 2>&1" 1 2 3 15 mkdir $dirname || exit 1 cd $dirname case "$input" in /* | [A-Za-z]:\\*) # Absolute path; do nothing. ;; *) # Make a symbolic link, hard link or hardcopy. ln -s ../"$input" . > /dev/null 2>&1 || ln ../"$input" . > /dev/null 2>&1 || cp ../"$input" . ;; esac $prog ${1+"$@"} "$input" status=$? if test $status -eq 0; then set X $pairlist shift first=yes while test "$#" -ne 0; do if test -f "$1"; then # If $2 is an absolute path name, then just use that, # otherwise prepend `../'. case "$2" in /* | [A-Za-z]:\\*) target="$2";; *) target="../$2";; esac mv "$1" "$target" || status=$? else # A missing file is only an error for the first file. This # is a blatant hack to let us support using "yacc -d". If -d # is not specified, we don't want an error when the header # file is "missing". if test $first = yes; then status=1 fi fi shift shift first=no done else status=$? fi # Remove the directory. cd .. rm -rf $dirname exit $status ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/c_string.lang������������������������������������������������������������0000644�0001750�0001750�00000000257�11672675564�015200� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������vardef SPECIALCHAR = '\\.' environment string delim "\"" "\"" begin specialchar = $SPECIALCHAR end environment string delim "'" "'" begin specialchar = $SPECIALCHAR end �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/bat.lang�����������������������������������������������������������������0000644�0001750�0001750�00000002566�11672675564�014143� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# DOS batch files comment start '[Rr][Ee][Mm]' comment start "::" label start '^[[:blank:]]*:' path = '[[:alpha:]]:([[:alnum:]\\_])*' keyword = "do|else|end|errorlevel|exist|exit|for|goto|if|not|pause|return", "say|select|then|when" nonsensitive function = "ansi|append|assign|attrib|autofail|backup|basedev|boot|break", "buffers|cache|call|cd|chcp|chdir|chkdsk|choice|cls|cmd|codepage|command|comp", "copy|country|date|ddinstal|debug|del|detach|device|devicehigh|devinfo|dir", "diskcoache|diskcomp|diskcopy|doskey|dpath|dumpprocess|eautil|endlocal|erase", "exit_vdm|extproc|fcbs|fdisk|fdiskpm|files|find|format|fsaccess|fsfilter", "graftabl|iopl|join|keyb|keys|label|lastdrive|libpath|lh|loadhigh|makeini", "maxwait|md|mem|memman|mkdir|mode|move|net|patch|path|pauseonerror|picview", "pmrexx|print|printmonbufsize|priority|priority_disk_io|prompt|protectonly", "protshell|pstat|rd|recover|reipl|ren|rename|replace|restore|rmdir|rmsize|run", "set|setboot|setlocal|shell|shift|sort|spool|start|subst|suppresspopups|swappath", "syslevel|syslog|threads|time|timeslice|trace|tracebuf|tracefmt|trapdump|tree", "type|undelete|unpack|use|ver|verify|view|vmdisk|vol|xcopy|xcopy32|xdfcopy", "echo|cur-date" nonsensitive environment string delim "\"" "\"" escape "\\" begin specialchar = '%.' end variable = '%[[:digit:]]+' variable = '%%[[:alpha:]]' include "symbols.lang" include "number.lang" ������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/proto.lang���������������������������������������������������������������0000644�0001750�0001750�00000001220�11672675565�014523� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# definitions for Google Protocol Buffers (protobuf) # http://code.google.com/apis/protocolbuffers/docs/proto.html # Added by Joel Smith comment start "//" (keyword,normal,classname) = `(\<message|service)([[:blank:]]+)([[:alnum:]_]+)` symbol = "(",")","=","[","]",";" preproc = "import","package","option" include "number.lang" include "c_string.lang" keyword = "group", "optional|required|repeated", "default", "extend|extensions|to|max", "service|method|rpc|returns", "enum", "true|false" type = "int32|int64|uint32|uint64|sint32|sint64", "fixed32|fixed64|sfixed32|sfixed64", "float|double|bool|string|bytes" cbracket = "{|}" ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/awk.lang�����������������������������������������������������������������0000644�0001750�0001750�00000000456�11672675564�014153� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# language awk regexp = '/([^/]*)/' keyword = "begin|break|close|continue|delete|do|else|end|exit|for", "getline|gsub|if|index|length|match|next|print|printf|return|split", "sprintf|sub|substr|system|tolower|toupper|while" nonsensitive cbracket = "{|}" include "sh.lang" include "function.lang" ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/postscript.lang����������������������������������������������������������0000644�0001750�0001750�00000010233�11672675565�015576� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# by Dirk Jagdmann, http://cubic.org/~doj vardef ID = '[[:word:]]+' variable = '/' + $ID keyword = "abs|add|aload|anchorsearch|and|arc|arcn|arct|arcto|array|ashow|astore|atan|awidthshow", "begin|bind|bitshift|bytesavailable", "cachestatus|ceiling|charpath|clear|cleartomark|cleardictstack|clip|clippath|closefile|closepath|colorimage|concat|concatmatrix|condition|configurationerror|copy|copypage|cos|count|countdictstack|countexecstack|counttomark|cshow|currentblackgeneration|currentcacheparams|currentcmykcolor|currentcolor|currentcolorrendering|currentcolorscreen|currentcolorspace|currentcolortransfer|currentcontext|currentdash|currentdevparams|currentdict|currentfile|currentflat|currentfont|currentglobal|currentgray|currentgstate|currenthalftone|currenthalftonephase|currenthsbcolor|currentlinecap|currentlinejoin|currentlinewidth|currentmatrix|currentmiterlimit|currentobjectformat|currentpacking|currentpagedevice|currentpoint|currentrgbcolor|currentscreen|currentshared|currentstrokeadjust|currentsystemparams|currenttransfer|currentundercolorremoval|currentuserparams|curveto|cvi|cvlit|cvn|cvr|cvrs|cvs|cvx", "def|defaultmatrix|definefont|defineresource|defineusername|defineuserobject|deletefile|detach|deviceinfo|dict|dictfull|dictstack|dictstackoverflow|dictstackunderflow|div|dtransform|dup", "echo|eexec|end|eoclip|eofill|eoviewclip|eq|erasepage|errordict|exch|exec|execform|execstack|execstackoverflow|execuserobject|executeonly|executive|exit|exp", "false|file|filenameforall|fileposition|fill|filter|findencoding|findfont|findresource|flattenpath|floor|flush|flushfile|FontDirectory|for|forall|fork", "ge|get|getinterval|globaldict|GlobalFontDirectory|glyphshow|grestore|grestoreall|gsave|gstate|gt", "handleerror", "identmatrix|idiv|idtransform|if|ifelse|image|imagemask|index|ineofill|infill|initclip|initgraphics|initmatrix|initviewclip|instroke|internaldict|interrupt|inueofill|inufill|inustroke|invalidaccess|invalidcontext|invalidexit|invalidfileaccess|invalidfont|invalidid|invalidrestore|invertmatrix|ioerror|ISOLatin1Encoding|itransform", "join", "kshow|known", "languagelevel|le|length|limitcheck|lineto|ln|load|lock|log|loop|lt", "makefont|makepattern|mark|matrix|maxlength|mod|monitor|moveto|mul", "ne|neg|newpath|noaccess|nocurrentpoint|not|notify|null|nulldevice", "or", "packedarray|pathbbox|pathforall|pop|print|printobject|product|prompt|pstack|put|putinterval", "quit", "rand|rangecheck|rcurveto|read|readhexstring|readline|readonly|readstring|realtime|rectclip|rectfill|rectstroke|rectviewclip|renamefile|repeat|resetfile|resourceforall|resourcestatus|restore|reversepath|revision|rlineto|rmoveto|roll|rootfont|rotate|round|rrand|run", "save|scale|scalefont|scheck|search|selectfont|serialnumber|setbbox|setblackgeneration|setcachedevice|setcachedevice2|setcachelimit|setcacheparams|setcharwidth|setcmykcolor|setcolor|setcolorrendering|setcolorscreen|setcolorspace|setcolortransfer|setdash|setdevparams|setfileposition|setflat|setfont|setglobal|setgray|setgstate|sethalftone|sethalftonephase|sethsbcolor|setlinecap|setlinejoin|setlinewidth|setmatrix|setmiterlimit|setobjectformat|setoverprint|setpacking|setpagedevice|setpattern|setrgbcolor|setscreen|setshared|setstrokeadjust|setsystemparams|settransfer|setucacheparams|setundercolorremoval|setuserparams|setvmthreshold|shareddict|show|showpage|sin|sqrt|srand|stack|stackoverflow|stackunderflow|StandardEncoding|start|startjob|status|statusdict|stop|stopped|store|string|stringwidth|stroke|strokepath|sub|syntaxerror|systemdict", "timeout|transform|translate|true|truncate|type|typecheck|token", "uappend|ucache|ucachestatus|ueofill|ufill|undef|undefined|undefinedfilename|undefineresource|undefinedresult|undefinefont|undefineresource|undefinedresource|undefineuserobject|unmatchedmark|unregistered|upath|userdict|UserObjects|usertime|ustroke|ustrokepath", "version|viewclip|viewclippath|VMerror|vmreclaim|vmstatus", "wait|wcheck|where|widthshow|write|writehexstring|writeobject|writestring|wtranslation", "xcheck|xor|xshow|xyshow", "yield|yshow" variable = $ID environment string delim "(" ")" multiline nested begin specialchar = '\\.' end comment start "%" include "number.lang" symbol = "[","]","=","==","{","}","<<",">>" ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/texinfo.lang�������������������������������������������������������������0000644�0001750�0001750�00000001270�11672675565�015041� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Language definition file for Texinfo # author: Lorenzo Bettini normal = "@@","@{","@}" comment start "@c" preproc = "@include" environment keyword = '@([^[:blank:]]*)ref' begin cbracket = '\{' cbracket = '\}' exit string = '[^}]+' end preproc = "@menu","@end menu" # menu items string = '\*.+::' (keyword,cbracket,bold,cbracket) = `(@b)(\{)([^}]+)(\})` (keyword,cbracket,italics,cbracket) = `(@(?:emph|i))(\{)([^}]+)(\})` (keyword,cbracket,url,cbracket) = `(@(?:uref|url))(\{)([^[:blank:]]+)(\})` (keyword,cbracket,variable,cbracket) = `(@value)(\{)([^[:blank:]]+)(\})` keyword = '@end [^[:blank:]]+' keyword = '@[^[:blank:]{}]+' argument delim "{" "}" escape "@" multiline nested ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/python.lang��������������������������������������������������������������0000644�0001750�0001750�00000001333�11672675565�014706� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������preproc = "import|from" include "script_comment.lang" include "number.lang" keyword = "and|assert|break|class|continue|def|del|elif|else|except|exec", "finally|for|global|if|in|is|lambda|not|or|pass", "print|raise|return|try|while" comment delim '^([[:space:]]*\'{3})' '(\'{3})' multiline comment delim '^([[:space:]]*\"{3})' '(\"{3})' multiline comment = '^([[:space:]]*\'(?:[^\\\']|\\.)*\'[[:space:]]*|[[:space:]]*\"(?:[^\\\"]|\\.)*\"[[:space:]]*)$' string delim '([[:space:]]*\'{3})' '(\'{3})' multiline string delim '([[:space:]]*\"{3})' '(\"{3})' multiline string delim "\"" "\"" escape "\\" string delim "'" "'" escape "\\" include "symbols.lang" symbol = "{|}" include "function.lang" �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/prolog.lang��������������������������������������������������������������0000644�0001750�0001750�00000002665�11672675565�014700� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������preproc = "bgidriver|bgifont|check_determ|code|config|diagnostics|error|errorlevel|heap|gstacksize|nobreak|nowarnings|printermenu|project" comment start "%" include "number.lang" string delim "\"" "\"" escape "\\" string delim "'" "'" escape "\\" keyword = "abstract|align|as|and|class|clauses|constants|database|determ", "domains|elsedef|endclass|enddef|erroneous|facts|failure|global", "goal|if|ifdef|ifndef|implement|include|language|multi|nocopy", "nondeterm|object|or|procedure|protected|predicates|reference", "single|static|struct|this", "ABSTRACT|ALIGN|AS|AND|CLASS|CLAUSES|CONSTANTS|DATABASE|DETERM", "DOMAINS|ELSEDEF|ENDCLASS|ENDDEF|ERRONEOUS|FACTS|FAILURE|GLOBAL", "GOAL|IF|IFDEF|IFNDEF|IMPLEMENT|INCLUDE|LANGUAGE|MULTI|NOCOPY", "NONDETERM|OBJECT|OR|PROCEDURE|PROTECTED|PREDICATES|REFERENCE", "SINGLE|STATIC|STRUCT|THIS", "assert|asserta|assertz|bound|chain_inserta|chain_insertafter", "chain_insertz|chain_terms|consult|db_btrees|db_chains|fail", "findall|format|free|msgrecv|msgsend|nl|not|readterm|ref_term|retract", "retractall|save|term_bin|term_replace|term_str|trap|write|writef", "mod|div|abs|exp|ln|log|sqrt|round|trunc|val|cos|sin|tan|arctan", "random|randominit" comment delim "/*" "*/" multiline nested type = "char|real|string|symbol|byte|sbyte|short|ushort|word|integer|unsigned|dword|long|ulong|binary|ref" include "symbols.lang" cbracket = "{|}" include "function.lang" variable = '[[:upper:]][[:word:]]*|_'���������������������������������������������������������������������������source-highlight-3.1.6/src/csharp.lang��������������������������������������������������������������0000644�0001750�0001750�00000001550�11672675564�014645� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# definitions for C-sharp # by S. HEMMI, updated by L. Bettini. preproc = "using" number = '\<[+-]?((0x[[:xdigit:]]+)|(([[:digit:]]*\.)? [[:digit:]]+([eE][+-]?[[:digit:]]+)?))([FfDdMmUulL]+)?\>' include "cpp.lang" subst keyword = "abstract|event|new|struct", "as|explicit|null|switch", "base|extern|this", "false|operator|throw", "break|finally|out|true", "fixed|override|try", "case|params|typeof", "catch|for|private", "foreach|protected", "checked|goto|public|unchecked", "class|if|readonly|unsafe", "const|implicit|ref", "continue|in|return", "virtual", "default|interface|sealed|volatile", "delegate|internal", "do|is|sizeof|while", "lock|stackalloc", "else|static", "enum|namespace", "get|partial|set", "value|where|yield" subst type = "bool|byte|sbyte|char|decimal|double", "float|int|uint|long|ulong|object", "short|ushort|string|void" ��������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/default.lang�������������������������������������������������������������0000644�0001750�0001750�00000000473�11672675564�015014� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# this is the language definition file to which source-highlight # reverts (when in failsafe mode) if not language definition is # found for the current input file. # Thus, basically, no highlight is performed (unless you customize # this file). # However, your input file will be formatted in the output format. �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/xorg.lang����������������������������������������������������������������0000644�0001750�0001750�00000000736�11672675565�014352� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# lang definition file for xorg configuration files include "script_comment.lang" state keyword delim "Section" "EndSection" multiline begin include "number.lang" include "c_string.lang" include "script_comment.lang" state keyword delim "SubSection" "EndSubSection" multiline begin include "number.lang" include "c_string.lang" include "script_comment.lang" (normal,type) = `(^[[:blank:]]*)([[:word:]]+)` end (normal,type) = `(^[[:blank:]]*)([[:word:]]+)` end ����������������������������������source-highlight-3.1.6/src/vala.lang����������������������������������������������������������������0000644�0001750�0001750�00000001535�11672675565�014314� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# definitions for Vala # by Luca Bruno. string delim "\"\"\"" "\"\"\"" multiline #preproc = '^[[:blank:]]*\[.+\]' include "csharp.lang" subst keyword = "abstract|new|struct", "as|null|switch|inline", "base|extern|this|owned|unowned|weak", "false|throw|throws", "break|finally|out|true|volatile", "override|errordomain|try", "case|params|typeof|dynamic", "catch|for", "foreach|protected|async", "public|private", "class|if", "const|ref", "continue|in|return", "virtual", "default|interface", "delegate|internal|delete", "do|is|sizeof|while", "lock|ensures|requires", "else|static", "enum|namespace", "get|set|construct", "yield|signal" subst type = "bool|char|uchar|unichar|double|float", "int|int8|int16|int32|int64", "uint|uint8|uint16|uint32|uint64", "long|ulong", "short|ushort|string|void", "var|size_t|ssize_t|time_t|va_list" �������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/nohilite.lang������������������������������������������������������������0000644�0001750�0001750�00000000202�11672675565�015172� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Use this definition language if you only want your input file # to be formatted in the output language without any highlighting ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/style.lang���������������������������������������������������������������0000644�0001750�0001750�00000000627�11672675565�014532� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# this is the language definition for the # style definition syntax comment start "//" string delim "\"" "\"" escape "\\" keyword = "bgcolor|purple|orange|brightorange|brightgreen|darkgreen", "green|darkred|red|brown|pink|yellow|cyan", "black|teal|gray|darkblue|blue", "normal|linenum", "noref|nf|f|u|i|b" keyword = 'bg\:' symbol = ",|;" variable = '[[:word:]]+' ���������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/erlang.lang��������������������������������������������������������������0000644�0001750�0001750�00000005010�11672675564�014630� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Erlang lang definition file # by Caolan McMahon # from: http://caolanmcmahon.com/erlang_syntax_highlighting # patched by Miklos Vajna # further modifications by Lorenzo Bettini keyword = "div|rem|or|xor|bor|bxor|bsl|bsr|and|band|not|bnot|abs|alive|apply|atom_to_list|binary_to_list|binary_to_term|concat_binary|date|disconnect_node|element|erase|exit|float|float_to_list|get|get_keys|group_leader|halt|hd|integer_to_list|is_alive|length|link|list_to_atom|list_to_binary|list_to_float|list_to_integer|list_to_pid|list_to_tuple|load_module|make_ref|monitor_node|node|nodes|now|open_port|pid_to_list|process_flag|process_info|process|put|register|registered|round|self|setelement|size|spawn|spawn_link|split_binary|statistics|term_to_binary|throw|time|tl|trunc|tuple_to_list|unlink|unregister|whereis|atom|binary|constant|function|integer|list|number|pid|ports|port_close|port_info|reference|record|check_process_code|delete_module|get_cookie|hash|math|module_loaded|preloaded|processes|purge_module|set_cookie|set_node|acos|asin|atan|atan2|cos|cosh|exp|log|log10|pi|pow|power|sin|sinh|sqrt|tan|tanh|call|module_info|parse_transform|undefined_function|error_handler|after|begin|case|catch|cond|end|fun|if|let|of|query|receive|when|creation|current_function|dictionary|group_leader|heap_size|high|initial_call|linked|low|memory_in_use|message_queue|net_kernel|node|normal|priority|reductions|registered_name|runnable|running|stack_trace|status|timer|trap_exit|waiting|command|count_in|count_out|creation|in|in_format|linked|node|out|owner|packeting|atom_tables|communicating|creation|current_gc|current_reductions|current_runtime|current_wall_clock|distribution_port|entry_points|error_handler|friends|garbage_collection|magic_cookie|magic_cookies|module_table|monitored_nodes|name|next_ref|ports|preloaded|processes|reductions|ref_state|registry|runtime|wall_clock|apply_lambda|module_info|module_lambdas|record|record_index|record_info|badarg|nocookie|false|fun|true|badsig|kill|killed|exit|normal" environment comment start "%" begin include "url.lang" include "html_simple.lang" type = '@[[:alpha:]]+' include "todo.lang" end normal = "(|)|{|}|[|]|\||;|,|?|#" include "number.lang" #hex numbers number = '\$\\x+' string delim "\"" "\"" escape "\\" multiline string delim "'" "'" escape "\\" multiline function = '\w+(\s+)?[:@]?(\s+)?\w+(?=[[:blank:]]*\()' state preproc start "-author" begin include "url.lang" normal = ")" exit end preproc = '-[[:alpha:]_]+' symbol = "+|-|*|/|==|=|=:=|=/=|<|=<|>|>=|++|--|=|!|<-|->" symbol = ':|_|@|\\|\"|\.' ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/odf.outlang��������������������������������������������������������������0000664�0001750�0001750�00000013433�11672675565�014673� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# by Dag Wieërs # http://github.com/dagwieers/asciidoc-odf extension "odf" ### FIXME: Using class-names could make this a lot easier ### FIXME: But LibreOffice/Openoffice do not honor text:class-names (yet) #styletemplate "<text:span text:class-names=\"$style\">$text</text:span>" #styleseparator " " # #bold "strong$style" #italics "emphasis$style" #underline "underline$style" #fixed "monospaced$style" #color "$style" #bgcolor "bg$style" bold "<text:span text:style-name=\"strong\">$text</text:span>" italics "<text:span text:style-name=\"emphasis\">$text</text:span>" underline "<text:span text:style-name=\"underlined\">$text</text:span>" fixed "<text:span text:style-name=\"monospaced\">$text</text:span>" color "<text:span text:style-name=\"$style\">$text</text:span>" bgcolor "<text:span text:style-name=\"bg$style\">$text</text:span>" colormap "green" "green" "red" "red" "darkred" "darkred" "blue" "blue" "brown" "brown" "pink" "pink" "yellow" "yellow" "cyan" "cyan" "purple" "purple" "orange" "orange" "brightorange" "brightorange" "brightgreen" "brightgreen" "darkgreen" "darkgreen" "black" "black" "teal" "teal" "gray" "gray" "darkblue" "darkblue" default "black" end ### FIXME: anchor and references missing doctemplate "<?xml version=\"1.0\" encoding=\"UTF-8\"?> <office:document xmlns:office=\"urn:oasis:names:tc:opendocument:xmlns:office:1.0\" xmlns:style=\"urn:oasis:names:tc:opendocument:xmlns:style:1.0\" xmlns:text=\"urn:oasis:names:tc:opendocument:xmlns:text:1.0\" xmlns:fo=\"urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:meta=\"urn:oasis:names:tc:opendocument:xmlns:meta:1.0\" xmlns:svg=\"urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0\" office:version=\"1.2\" office:mimetype=\"application/vnd.oasis.opendocument.text\"> <office:meta> <dc:title>$title</dc:title> <dc:description>$additional</dc:description> <meta:generator>source-highlight/3.1.4$GNU source-highlight</meta:generator> </office:meta> <office:font-face-decls> <style:font-face style:name=\"monospace\" svg:font-family=\"&apos;DejaVu Sans Mono&apos;\" style:font-adornments=\"Book\" style:font-family-generic=\"modern\" style:font-pitch=\"fixed\"/> </office:font-face-decls> <office:styles> <style:default-style style:family=\"paragraph\"> <style:text-properties style:font-name=\"monospace\" fo:font-size=\"10pt\"/> </style:default-style> </office:styles> <office:automatic-styles> <style:page-layout style:name=\"Page\"> <style:page-layout-properties fo:page-width=\"210.01mm\" fo:page-height=\"297mm\" style:num-format=\"1\" style:print-orientation=\"portrait\" fo:margin-top=\"15mm\" fo:margin-bottom=\"15mm\" fo:margin-left=\"20mm\" fo:margin-right=\"20mm\"> </style:page-layout-properties> </style:page-layout> <style:style style:name=\"strong\" style:family=\"text\"> <style:text-properties fo:font-weight=\"bold\"/> </style:style> <style:style style:name=\"emphasis\" style:family=\"text\"> <style:text-properties fo:font-style=\"italic\"/> </style:style> <style:style style:name=\"underline\" style:family=\"text\"> <style:text-properties style:text-underline-style=\"solid\" style:text-underline-width=\"auto\" style:text-underline-mode=\"continuous\" style:text-overline-mode=\"continuous\" style:text-line-through-mode=\"continuous\"/> </style:style> <style:style style:name=\"green\" style:family=\"text\"><style:text-properties fo:color=\"#33cc00\"/></style:style> <style:style style:name=\"red\" style:family=\"text\"><style:text-properties fo:color=\"#ff0000\"/></style:style> <style:style style:name=\"darkred\" style:family=\"text\"><style:text-properties fo:color=\"#990000\"/></style:style> <style:style style:name=\"blue\" style:family=\"text\"><style:text-properties fo:color=\"#0000ff\"/></style:style> <style:style style:name=\"brown\" style:family=\"text\"><style:text-properties fo:color=\"#9a1900\"/></style:style> <style:style style:name=\"pink\" style:family=\"text\"><style:text-properties fo:color=\"#cc33cc\"/></style:style> <style:style style:name=\"yellow\" style:family=\"text\"><style:text-properties fo:color=\"#ffcc00\"/></style:style> <style:style style:name=\"cyan\" style:family=\"text\"><style:text-properties fo:color=\"#66ffff\"/></style:style> <style:style style:name=\"purple\" style:family=\"text\"><style:text-properties fo:color=\"#993399\"/></style:style> <style:style style:name=\"orange\" style:family=\"text\"><style:text-properties fo:color=\"#ff6600\"/></style:style> <style:style style:name=\"brightorange\" style:family=\"text\"><style:text-properties fo:color=\"#ff9900\"/></style:style> <style:style style:name=\"brightgreen\" style:family=\"text\"><style:text-properties fo:color=\"#33ff33\"/></style:style> <style:style style:name=\"darkgreen\" style:family=\"text\"><style:text-properties fo:color=\"#009900\"/></style:style> <style:style style:name=\"black\" style:family=\"text\"><style:text-properties fo:color=\"#000000\"/></style:style> <style:style style:name=\"teal\" style:family=\"text\"><style:text-properties fo:color=\"#008080\"/></style:style> <style:style style:name=\"gray\" style:family=\"text\"><style:text-properties fo:color=\"#808080\"/></style:style> <style:style style:name=\"darkblue\" style:family=\"text\"><style:text-properties fo:color=\"#000080\"/></style:style> <style:style style:name=\"white\" style:family=\"text\"><style:text-properties fo:color=\"#000000\"/></style:style> </office:automatic-styles> <office:master-styles> <style:master-page style:name=\"Standard\" style:page-layout-name=\"Page\"/> </office:master-styles> <office:body> <office:text> <text:p>" "</text:p> </office:text> </office:body> </office:document>" end translations " " "<text\:s/>" "\n" "<text\:line-break/>" "&" "&amp;" "<" "&lt;" ">" "&gt;" end �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/slang.lang���������������������������������������������������������������0000644�0001750�0001750�00000001252�11672675565�014471� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# slang.lang # written by John E. Davis # modified by Lorenzo Bettini include "script_comment.lang" keyword = "ERROR_BLOCK|EXECUTE_ERROR_BLOCK|EXIT_BLOCK|NULL|__tmp|_for|and", "break|case|catch|chs|continue|define|do|else|else|exch|finally|for", "foreach|forever|if|ifnot|loop|mod|mul2|not|or|orelse|pop|private", "public|return|shl|shr|sign|sqr|static|struct|switch|then|throw|try", "typedef|using|variable|while|xor" comment start "%" string delim "\"" "\"" escape "\\" string delim "'" "'" escape "\\" include "number.lang" symbol = "~","!","^","*","(",")","-","+","=","[", "]","\\",":",";",",",".","/","&","<",">","\|" preproc = "require" include "function.lang" ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/extreme_comment2.lang����������������������������������������������������0000644�0001750�0001750�00000000236�11672675564�016642� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������environment comment = '^[[:blank:]]*#[[:blank:]]*if[[:blank:]]+0' begin comment start '^[[:blank:]]*#[[:blank:]]*(else|endif)' exit end include "cpp.lang" ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/tml_macros2.lang���������������������������������������������������������0000664�0001750�0001750�00000000566�11672675565�015620� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������environment keyword delim $MACROSTART $MACROEND multiline nested begin attribute = $MACROATTR keyword = $MACRO environment string delim "\"" "\"" escape "\\" multiline begin keyword = $MACRO include "tml_glue.lang" include "tml_macrosdelayed3.lang" include "tml_macrotokens.lang" include "tml_macrolinks.lang" end end ������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/script_comment.lang������������������������������������������������������0000644�0001750�0001750�00000000140�11672675565�016406� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# this contains comment definitions for scripting languages, perl, bash, etc. comment start "#"��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/default.css��������������������������������������������������������������0000644�0001750�0001750�00000003211�11672675564�014654� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������body { background-color: white; } /* the color for context lines (when specified with line ranges) */ .context { color: gray; } .keyword { color: blue; font-weight: bold; } .type { color: darkgreen; } .usertype, .classname { color: teal; } .string { color: red; font-family: monospace; } .regexp { color: orange; } .specialchar { color: pink; font-family: monospace; } .comment { color: brown; font-style: italic; } .number { color: purple; } .preproc { color: darkblue; font-weight: bold; } .symbol { color: darkred; } .function { color: black; font-weight: bold; } .cbracket { color: red; } .todo { font-weight: bold; background-color: cyan; } /* line numbers */ .linenum { color: black; font-family: monospace; } /* Internet related */ .url { color: blue; text-decoration: underline; font-family: monospace; } /* other elements for ChangeLog and Log files */ .date { color: blue; font-weight: bold; } .time, .file { color: darkblue; font-weight: bold; } .ip, .name { color: darkgreen; } /* for Prolog, Perl */ .variable { color: darkgreen; } .italics { color: darkgreen; font-style: italic; } .bold { color: darkgreen; font-weight: bold; } /* for LaTeX */ .underline { color: darkgreen; text-decoration: underline; } .fixed { color: green; font-family: monospace; } .argument, .optionalargument { color: darkgreen; } .math { color: orange; } .bibtex { color: blue; } /* for diffs */ .oldfile { color: orange; } .newfile { color: darkgreen; } .difflines { color: blue; } /* for css */ .selector { color: purple; } .property { color: blue; } .value { color: darkgreen; font-style: italic; } /* for Oz */ .atom { color: orange; } .meta { font-style: italic; } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/desktop.lang�������������������������������������������������������������0000644�0001750�0001750�00000000354�11672675564�015037� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# highlighting for (KDE) desktop files include "script_comment.lang" section start '\[.*\]' (type,paren,normal,symbol) = `([^="\[]+)((?:\[.+\])*)([[:blank:]]*)(=)` include "number.lang" include "symbols.lang" include "c_string.lang"������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/xhtml_common.outlang�����������������������������������������������������0000644�0001750�0001750�00000000507�11672675565�016623� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������include "html_common.outlang" bold "<span style=\"font-weight: bold\">$text</span>" italics "<span style=\"font-style: italic\">$text</span>" underline "<span style=\"text-decoration: underline\">$text</span>" color "<span style=\"color: $style\">$text</span>" bgcolor "<span style=\"background-color: $style\">$text</span>" �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/todo.lang����������������������������������������������������������������0000644�0001750�0001750�00000000064�11672675565�014332� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������vardef TODO = '(TODO|FIXME|BUG)([:]?)' todo = $TODO����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/symbols.lang�������������������������������������������������������������0000644�0001750�0001750�00000000157�11672675565�015060� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������symbol = "~","!","%","^","*","(",")","-","+","=","[", "]","\\",":",";",",",".","/","?","&","<",">","\|"�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/lua.lang�����������������������������������������������������������������0000644�0001750�0001750�00000001425�11672675565�014150� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������include "number.lang" string delim "[[" "]]" multiline nested string delim "\"" "\"" escape "\\" string delim "'" "'" escape "\\" keyword = "and|break|do|else|elseif|end|false|for|function|if|in|local|nil|not|or|repeat|return|then|true|until|while" # if = is matched bewteen [[ then it must be present also in the closing ]] environment comment delim `--\[(=*)\[` "]" + @{1} + "]" multiline nested begin include "url.lang" environment comment delim "[[" "]]" multiline nested begin include "url.lang" end end environment comment start "--" begin include "url.lang" end include "symbols.lang" cbracket = "{|}" # function = '(?:[[:alpha:]]|_)[[:word:]]*[[:blank:]]*(?:\:(?:[[:alpha:]]|_)[[:word:]]*[[:blank:]]*)?(?=\()' function = '([[:alpha:]]|_)[[:word:]:]*(?=\()'�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/cpp.lang�����������������������������������������������������������������0000644�0001750�0001750�00000000646�11672675564�014154� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# definitions for C++ # most of it is shared with c.lang (keyword,normal,classname) = `(\<(?:class|struct|typename))([[:blank:]]+)([[:alnum:]_]+)` keyword = "class|const_cast|delete", "dynamic_cast|explicit|false|friend", "inline|mutable|namespace|new|operator|private|protected", "public|reinterpret_cast|static_cast", "template|this|throw|true", "try|typeid|typename", "using|virtual" include "c.lang" ������������������������������������������������������������������������������������������source-highlight-3.1.6/src/function.lang������������������������������������������������������������0000644�0001750�0001750�00000000125�11672675564�015207� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������vardef FUNCTION = '([[:alpha:]]|_)[[:word:]]*(?=[[:blank:]]*\()' function = $FUNCTION�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/vbscript.lang������������������������������������������������������������0000644�0001750�0001750�00000001066�11672675565�015224� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# language definition for AppleScript comment start "'" vardef SPECIALCHAR = '\\.' environment string delim "\"" "\"" begin specialchar = $SPECIALCHAR end keyword="and|response|call|case|select|continue|date|dim|server", "createobject|do|if|else|end|empty|then|next|set", "default|false|true|BOF", "eof|each|for|sub|function|len|cstr|include", "cdbl|cdate|is|null|object|redirect|request|querystring|exit", "clng|redim|session|form|not|nothing|loop|while" nonsensitive include "function.lang" cbracket = "{|}" include "symbols.lang" include "number.lang" ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/caml.lang����������������������������������������������������������������0000644�0001750�0001750�00000001250�11672675564�014276� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������preproc = '\<(?:external|open|include|[A-Z][\w\']*(?=\.))\>' include "number.lang" string delim "\"" "\"" escape "\\" keyword = "and|as|assert|asr|begin|class|closed|constraint|do|done|downto|else|end|exception|false|for|fun|function|functor|if|in|inherit|initializer|land|lazy|let|lor|lsl|lsr|lxor|match|method|mod|module|mutable|new|object|of|or|parser|private|rec|sig|struct|then|to|true|try|type|val|virtual|when|while|with" comment delim "(*" "*)" multiline nested type = '\<(?:[A-Z][\w\']*(?!\.)|int|int32|int64|nativeint|bool|char|exn|option|float|unit|string|list|array|ref|format|format4|lazy_t|in_channel|out_channel)\>' include "symbols.lang" cbracket = "{|}" ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/key_string.lang����������������������������������������������������������0000644�0001750�0001750�00000001103�11672675565�015536� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# highlighting for key="string", used in HTML and XML string delim "\"" "\"" escape "\\" multiline string delim "'" "'" escape "\\" multiline # this is valid <p foo=/bar/> and equivalent to <p foo="bar"> string delim "/" "/" # this is for HTML5 style for <a h=specification without quotes> (type,normal,symbol,normal,string) = `([^="[:blank:]>]+)([[:blank:]]*)(=)([[:blank:]]*)([^="'>]+)` # this is for the case where we expect " " or ' ' after the = (type,normal,symbol) = `([^="[:blank:]>]+)([[:blank:]]*)(=)` # everything else is highlighted as type type = '[[:alnum:]]+'�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/texinfo.outlang����������������������������������������������������������0000644�0001750�0001750�00000001121�11672675565�015564� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������extension "texinfo" doctemplate "@c Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite @example " " @end example" end nodoctemplate "@c Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite @example " " @end example" end bold "@b{$text}" italics "@i{$text}" fixed "@t{$text}" notfixed "@r{$text}" anchor "@anchor{$infilename:$linenum}$text" reference "@flushright @r{@i{@xref{$infilename:$linenum,$text,$text $infile:$linenum}.}} @end flushright" translations "{" "@{" "}" "@}" "@" "@@" "\t" " " end�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/envmapper.h��������������������������������������������������������������0000644�0001750�0001750�00000003063�11672675564�014671� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (C) 1999, 2000, 2001 Lorenzo Bettini <http://www.lorenzobettini.it> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ /* * src/envmapper.h -- prototypes and definitions for src/envmapper.c * * 19.04.2001 [SPX] * added ENV_REQUEST_METHOD * * added MAX_QUERY_STRING_LEN * * added REQUEST_METHOD_GET * 06.04.2001 [SPX] completed initial revision * 05.04.2001 [SPX] initial revision * * written by Robert Wetzel <rw8@mail.inf.tu-dresden.de> */ #ifndef _ENVMAPPER_H__ #define _ENVMAPPER_H__ #define ENV_REQUEST_METHOD "REQUEST_METHOD" #define ENV_QUERY_STRING "QUERY_STRING" #define REQUEST_METHOD_GET "GET" #define MAX_PARAM_AMOUNT 128 #define MAX_QUERY_STRING_LEN 512 #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ char **map_environment(int *argc, char **argv); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* _ENVMAPPER_H__ */ �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/diff.lang����������������������������������������������������������������0000644�0001750�0001750�00000001445�11672675564�014300� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# language definition for files created with 'diff' # diff created with -u option state oldfile = '(?=^[-]{3})' begin oldfile start '^[-]{3}' oldfile start '^[-]' newfile start '^[+]' difflines start '^@@' end # diff created with -c option state oldfile = '(?=^[*]{3})' begin environment oldfile = '^[*]{3}[[:blank:]]+[[:digit:]]' begin normal start '^[[:space:]]' newfile = '(?=^[-]{3})' exit end oldfile start '^[*]{3}' environment newfile = '^[-]{3}[[:blank:]]+[[:digit:]]' begin normal start '^[[:space:]]' newfile = '(?=^[*]{3})' exit normal start '^diff' exit end newfile start '^[-]{3}' end # otherwise, created without options state difflines = '(?=^[[:digit:]])' begin difflines start '^[[:digit:]]' oldfile start '^[<]' newfile start '^[>]' end ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/tml_formatting_all.lang��������������������������������������������������0000664�0001750�0001750�00000000203�11672675565�017240� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������preproc = '<nop>' # trailing whitespace whitespace = '[ \t]+$' # ---+ Headings preproc = '^---[\+#]+(!!)?' include "tml_glue.lang" ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/clipper.lang�������������������������������������������������������������0000644�0001750�0001750�00000002136�11672675564�015024� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# lang def file for good ol' clipper :-) include "c_comment.lang" keyword = "announce|begin|break|case|declare|do|elseif|else|endif|enddo|end", "endcase|exit|external|field|for|if|local|loop|memvar|next|otherwise|parameters", "private|public|recover|request|return|sequence|step|static|using|while|with", "accept|append|all|alternate|box|blank|bell|call|cancel|clear|close|commit", "continue|copy|count|create|century|color|confirm|console|cursor|delete|dir", "display|date|decimals|default|deleted|delimiters|device|eject|erase|extended", "epoch|escape|exact|exclusive|file|find|form|from|filter|fixed|format|function", "get|gets|go|index|init|input|intensity|join|keyboard|key|label|list|locate", "memory|menu|margin|message|note|order|pack|procedure|prompt|path|printer|quit", "read|recall|reindex|release|rename|replace|report|restore|run|relation|say", "screen|structure|save|seek|select|set|scoreboard|softseek|skip|sort|store|sum", "to|typeahead|text|total|type|unique|unlock|update|use|wrap|wait|zap" nonsensitive include "symbols.lang" include "c_string.lang" include "number.lang" include "function.lang"����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/Makefile.am��������������������������������������������������������������0000644�0001750�0001750�00000011656�11676047564�014563� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Copyright (C) 1999-2009 Lorenzo Bettini <http://www.lorenzobettini.it> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. SUFFIXES = .ggo if NO_GENGETOPT #.ggo.c: # touch $@ else check-regexp_cmd.c: $(srcdir)/check-regexp_cmd.ggo $(GENGETOPT) --input $(srcdir)/check-regexp_cmd.ggo --unamed-opts -F check-regexp_cmd --output-dir=$(srcdir) .ggo.c: $(GENGETOPT) --input $< --unamed-opts --no-handle-help --no-handle-version --output-dir=$(srcdir) endif # in order to make it work with parallel make we need to make # these deps explicit cmdline.h: cmdline.c #bin_PROGRAMS = check-regexp source-highlight bin_PROGRAMS = check-regexp source-highlight source-highlight-settings bin_SCRIPTS = java2html cpp2html src-hilite-lesspipe.sh EXTRA_PROGRAMS = source-highlight-cgi SRCHILITE = $(top_builddir)/src/source-highlight$(EXEEXT) INCLUDES = -I@top_srcdir@/lib AM_CPPFLAGS = -I$(top_srcdir)/gl -I$(top_builddir)/gl $(BOOST_CPPFLAGS) AM_LDFLAGS = $(BOOST_LDFLAGS) LDADD = $(top_builddir)/gl/libgnu.la source_highlight_LDADD = $(LDADD) $(top_builddir)/lib/srchilite/libsource-highlight.la source_highlight_cgi_LDADD = $(source_highlight_LDADD) check_regexp_LDADD = $(BOOST_REGEX_LIB) $(top_builddir)/gl/libgnu.la source_highlight_settings_LDADD = $(LDADD) $(top_builddir)/lib/srchilite/libsource-highlight.la # for most rules, we use one file per line. `diffs' are more clear this way #source_highlight_SOURCES = cmdline.c startapp.cc source-highlight.cc source_highlight_SOURCES = cmdline.c source-highlight.cc check_regexp_SOURCES = check-regexp_cmd.c check-regexp.cpp source_highlight_settings_SOURCES = source-highlight-settings.cpp source_highlight_cgi_SOURCES = cmdline.c source-highlight-cgi.cc envmapper.c # files that we don't want automake/autoconf to touch ever. # just stick them in the distribution as-is EXTRA_DIST = \ java2html.in \ cpp2html.in \ src-hilite-lesspipe.sh.in \ envmapper.h \ cmdline.ggo check-regexp_cmd.ggo \ $(source_highlightdata_DATA) \ src.pro source-highlight.pro source-highlight-settings.pro LANGFILES = \ bison.lang c.lang cpp.lang javascript.lang perl.lang ruby.lang \ c_comment.lang flex.lang log.lang php.lang sml.lang \ caml.lang function.lang lua.lang prolog.lang symbols.lang \ changelog.lang java.lang number.lang python.lang url.lang \ pascal.lang fortran.lang fixed-fortran.lang \ html.lang html_simple.lang latex.lang logtalk.lang \ diff.lang c_string.lang langdef.lang outlang.lang style.lang \ extreme_comment.lang extreme_comment2.lang extreme_comment3.lang \ postscript.lang csharp.lang xml.lang sh.lang script_comment.lang \ tcl.lang sql.lang bib.lang makefile.lang css.lang m4.lang \ default.lang nohilite.lang slang.lang key_string.lang properties.lang \ desktop.lang lsm.lang spec.lang haxe.lang ldap.lang glsl.lang xorg.lang \ clike_vardeclaration.lang scala.lang ada.lang conf.lang pc.lang oz.lang \ texinfo.lang haskell.lang haskell_literate.lang \ manifest.lang asm.lang todo.lang applescript.lang \ vbscript.lang awk.lang bat.lang clipper.lang cobol.lang d.lang \ errors.lang erlang.lang proto.lang vala.lang lisp.lang \ scheme.lang po.lang opa.lang javalog.lang upc.lang tml.lang LANGFILES_NOTTOCHECK= \ tml_formatting_all.lang tml_macrolinks.lang tml_macrosdelayed2.lang \ tml_formatting.lang tml_macros1.lang tml_macrosdelayed3.lang \ tml_glue.lang tml_macros2.lang tml_macros.lang \ tml_macrosdelayed1.lang tml_macrotokens.lang OUTLANGFILES = \ css_common.outlang \ esc.outlang \ html_common.outlang \ html_ref.outlang \ html_notfixed.outlang \ htmlcss.outlang \ htmltable.outlang \ htmltablelinenum.outlang \ html.outlang \ latex.outlang \ latexcolor.outlang \ xhtml_common.outlang \ xhtmlcss.outlang \ xhtml.outlang \ xhtml_notfixed.outlang \ xhtmltable.outlang \ texinfo.outlang \ javadoc.outlang \ docbook.outlang \ odf.outlang \ mediawiki.outlang STYLEFILES = texinfo.style esc.style source_highlightdata_DATA = \ $(LANGFILES) $(LANGFILES_NOTTOCHECK) $(OUTLANGFILES) \ $(STYLEFILES) \ default.style style2.style style3.style \ javalog.style \ lang.map outlang.map \ default.css \ style.defaults # files that are built before distribution gets built #MAINTAINERCLEANFILES = $(BUILT_SOURCES) check: for langfile in $(LANGFILES); do \ $(SRCHILITE) --data-dir=$(srcdir) --check-lang $(srcdir)/$$langfile ; \ done && \ for outlangfile in $(OUTLANGFILES); do \ $(SRCHILITE) --data-dir=$(srcdir) --check-outlang $(srcdir)/$$outlangfile ; \ done tags: ctags --c-types='defgmstuv' --recurse=yes $(srcdir)/* .PHONY: tags noinst_HEADERS = cmdline.h check-regexp_cmd.h ����������������������������������������������������������������������������������source-highlight-3.1.6/src/m4.lang������������������������������������������������������������������0000644�0001750�0001750�00000001264�11672675565�013710� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# language definition for m4 files state keyword start "dnl" begin # avoid spaces in front of urls or @[[:alpha:]]+ be caputured as prefixes comment = '[[:blank:]]+' include "url.lang" include "html_simple.lang" type = '@[[:alpha:]]+' # everything else is a comment comment = '.+' end comment start "#" string delim "\"" "\"" escape "\\" variable = '\$[[:digit:]]+' # it's better not to rely on sh.lang, otherwise, too many things # will be highlighted, and often not correctly: better to highlight less # like emacs does # since ## is not a comment in shell scripts, but it is in m4 # we kind of redefine multiple #'s as comments # comment start '#+' # include "sh.lang"��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/source-highlight-settings.pro��������������������������������������������0000644�0001750�0001750�00000000645�11672675565�020354� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������include(../defines.pri) TEMPLATE = app # enable reading of this meta information in the applications that use the static library: CONFIG += link_prl TARGET = source-highlight-settings SOURCES = source-highlight-settings.cpp INCLUDEPATH += . ../../lib ../lib $$INCPATH DEPENDPATH += ../lib ../../lib . LIBS += -L../lib -l$$LIBRARY_LIB $$ADDITIONAL_LIBRARIES DESTDIR = ../bin target.path = /bin INSTALLS += target �������������������������������������������������������������������������������������������source-highlight-3.1.6/src/po.lang������������������������������������������������������������������0000644�0001750�0001750�00000000105�11672675565�013777� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������comment start "#" keyword = "msgid","msgstr" string delim "\"" "\""�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/tml_macros.lang����������������������������������������������������������0000664�0001750�0001750�00000001607�11672675565�015533� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# %MACRO% vardef MACRO = '%[A-Za-z][A-Za-z0-9_:]*%' keyword = $MACRO # $percntMACRO{\"...\"}$percnt vardef DELAYEDMACROSTART = '\$perce?nt[A-Za-z][A-Za-z0-9_:]*\{?' vardef DELAYEDMACROEND = '\}?\$perce?nt' # foo= vardef MACROATTR = '[[:word:]-]+=' # %MACRO{"..."}% or the GluePlugin syntax: # %~~ MACRO{"... # ~~~ }% vardef MACROSTART = '%(~~[[:space:]]+)?[A-Za-z][A-Za-z0-9_:]*\{' vardef MACROEND = '(^~~~[[:space:]]*)?\}%' environment keyword delim $MACROSTART $MACROEND multiline nested begin attribute = $MACROATTR keyword = $MACRO include "tml_macros1.lang" include "tml_glue.lang" environment string delim "\"" "\"" escape "\\" multiline begin keyword = $MACRO include "tml_macros1.lang" include "tml_macrosdelayed1.lang" include "tml_macrotokens.lang" include "tml_macrolinks.lang" include "tml_formatting.lang" end end �������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/fixed-fortran.lang�������������������������������������������������������0000644�0001750�0001750�00000000121�11672675564�016126� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������comment start '^\*' comment start '^C' comment start '^c' include "fortran.lang"�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/src/html.outlang�������������������������������������������������������������0000644�0001750�0001750�00000000700�11672675565�015056� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������include "html_common.outlang" doctemplate "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML//EN\"> <html> <head> <meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\"> <meta name=\"GENERATOR\" content=\"$additional\"> <title>$title</title> </head> <body bgcolor=\"$docbgcolor\"> $header<pre><tt>" "</tt></pre> $footer</body> </html> " end nodoctemplate "<!-- Generator: $additional --> $header<pre><tt>" "</tt></pre>$footer " end ����������������������������������������������������������������source-highlight-3.1.6/src/xhtmltable.outlang�������������������������������������������������������0000644�0001750�0001750�00000000447�11672675565�016266� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������include "xhtml_common.outlang" doctemplate "<table style=\"background-color: $docbgcolor\"><tbody><tr><td><pre><tt>" "</tt></pre></td></tr></tbody></table>" end nodoctemplate "<table style=\"background-color: $docbgcolor\"><tbody><tr><td><pre><tt>" "</tt></pre></td></tr></tbody></table>" end �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/�������������������������������������������������������������������������0000775�0001750�0001750�00000000000�11676051670�012550� 5����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/tests/�������������������������������������������������������������������0000775�0001750�0001750�00000000000�11676051671�013713� 5����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/tests/test_highlightbuilder_main.cpp�������������������������������������0000644�0001750�0001750�00000034460�11676051405�021720� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2008 // // Copyright: See COPYING file that comes with this distribution // #include <iostream> #include "srchilite/highlightstatebuilder.hpp" #include "asserttestexit.h" #include "srchilite/regexrulefactory.h" #include "srchilite/stringdef.h" #include "srchilite/highlightstate.h" #include "srchilite/highlightrule.h" #include "srchilite/stringlistlangelem.h" #include "srchilite/highlightbuilderexception.h" #include <sstream> #include "srchilite/highlightstateprinter.h" #include "srchilite/delimitedlangelem.h" #include "srchilite/namedsubexpslangelem.h" #include "srchilite/statelangelem.h" #include "logformatter.h" #include "srchilite/sourcehighlighter.h" #include "srchilite/formattermanager.h" #include "stdboosterror.h" using namespace std; using namespace srchilite; HighlightStatePrinter coutPrinter; static StringListLangElem *createFooStringListLangElem(); static LangElems *createFooLangElems(); StringListLangElem *createFooStringListLangElem() { StringDefs *defs = new StringDefs; defs->push_back(new StringDef("foo")); return new StringListLangElem("foo", defs, false); } LangElems *createFooLangElems() { LangElems *elems = new LangElems; elems->add(createFooStringListLangElem()); return elems; } static void check_log_entry(const FormatterLogEntry &e, const std::string &elem, const std::string &s); void check_log_entry(const FormatterLogEntry &e, const std::string &elem, const std::string &s) { assertEquals(elem, e.first); assertEquals(s, e.second); } int main() { ostringstream os; RegexRuleFactory factory; HighlightStateBuilder builder(&factory); HighlightStatePtr mainState(new HighlightState()); FormatterLog log; FormatterPtr normalFormatter = FormatterPtr(new LogFormatter(log, "normal")); FormatterPtr keywordFormatter = FormatterPtr(new LogFormatter(log, "keyword")); FormatterPtr commentFormatter = FormatterPtr(new LogFormatter(log, "comment")); FormatterManager formatterManager(normalFormatter); SourceHighlighter sourceHighlighter(mainState); sourceHighlighter.setFormatterManager(&formatterManager); formatterManager.addFormatter("keyword", keywordFormatter); formatterManager.addFormatter("comment", commentFormatter); StringDef *quoted = new StringDef("foo", true); StringDef *quoted2 = new StringDef("bar", true); StringDef *unquoted = new StringDef("ufoo", false); StringDef *unquoted2 = new StringDef("ubar", false); StringDefs *mixed = new StringDefs; mixed->push_back(quoted); mixed->push_back(unquoted); StringListLangElem mixedListElem("foo", mixed, false); try { builder.build_DB(&mixedListElem, mainState.get()); // must not get here assertTrue(false); } catch (const HighlightBuilderException &e) { cout << e << endl; os << e; assertEquals("cannot mix double quoted and non double quoted\n" + stdBoostCausedBy(), os.str()); } // now check correct creation (with non mixed strings) quoted = new StringDef("foo", true); StringDefs *nonMixed = new StringDefs; nonMixed->push_back(quoted); nonMixed->push_back(quoted2); StringListLangElem okListElem("foo", nonMixed, false); builder.build_DB(&okListElem, mainState.get()); coutPrinter.printHighlightState(mainState.get()); assertEquals("\\<(?:foo|bar)\\>", mainState->getRuleList()[0]->toString()); assertEquals(0, mainState->getRuleList()[0]->getExitLevel()); unquoted = new StringDef("ufoo", false); StringDefs *nonMixed2 = new StringDefs; nonMixed2->push_back(unquoted); nonMixed2->push_back(unquoted2); StringListLangElem okListElem2("foo", nonMixed2, false); okListElem2.setExit(); builder.build_DB(&okListElem2, mainState.get()); coutPrinter.printHighlightState(mainState.get()); assertEquals("(?:ufoo|ubar)", mainState->getRuleList()[1]->toString()); assertEquals(1, mainState->getRuleList()[1]->getExitLevel()); // test for delimited lang DelimitedLangElem delim("delim", new StringDef("<"), new StringDef(">"), new StringDef("\\\\"), false, false); builder.build_DB(&delim, mainState.get()); coutPrinter.printHighlightState(mainState.get()); assertEquals("<(?:[^\\\\<\\\\>]|\\\\.)*>", mainState->getRuleList()[2]->toString()); // test for delimited lang (automatically transformed) DelimitedLangElem delim2("delim", new StringDef("<"), new StringDef(">"), new StringDef("\\\\"), true, false); delim2.setExit(); builder.build_DB(&delim2, mainState.get()); coutPrinter.printHighlightState(mainState.get()); assertEquals("<", mainState->getRuleList().back()->toString()); assertTrue(mainState->getRuleList().back()->getNextState().get()); assertEquals(">", mainState->getRuleList().back()->getNextState()->getRuleList().front()->toString()); // the exit level is 2 since 1 is for exiting the syntethized inner state and 1 // for the specified exit level assertEquals(2, mainState->getRuleList().back()->getNextState()->getRuleList().front()->getExitLevel()); // test for named subexpressions ElementNames *names = new ElementNames; names->push_back("foo"); names->push_back("bar"); NamedSubExpsLangElem namedSubExpsLangElem(names, new StringDef("(Foo)(Bar)(Gogo)")); try { builder.build_DB(&namedSubExpsLangElem, mainState.get()); // must not get here assertTrue(false); } catch (const HighlightBuilderException &e) { // we provided only 2 elements instead of 3 cout << e << endl; os.str(""); os << e; assertEquals("number of marked subexpressions does not match number of elements\n" + stdBoostCausedBy(), os.str()); } // add the missing elem names->push_back("gogo"); // also test exit all namedSubExpsLangElem.setExitAll(); // now it's OK since we added an element builder.build_DB(&namedSubExpsLangElem, mainState.get()); coutPrinter.printHighlightState(mainState.get()); assertEqualsCollections(*names, mainState->getRuleList().back()->getElemList()); assertEquals(-1, mainState->getRuleList().back()->getExitLevel()); // tests for state/environment elements StringDefs *stateDefs = new StringDefs; stateDefs->push_back(new StringDef("foo")); stateDefs->push_back(new StringDef("bar")); StringListLangElem *stateDefsElem = new StringListLangElem("foobar", stateDefs, false); StateLangElem stateLangElem("mystate", stateDefsElem, createFooLangElems()); builder.build_DB(&stateLangElem, mainState.get()); coutPrinter.printHighlightState(mainState.get()); HighlightRulePtr lastRule = mainState->getRuleList().back(); assertTrue(lastRule->getNextState().get() != 0); // check that in the inner state we find the foo rule created by createFooLangElems assertEquals("foo", lastRule->getNextState()->getRuleList().front()->getElemList().front()); // and that the default element is "foobar" (it's an environment) assertEquals("foobar", lastRule->getNextState()->getDefaultElement()); // we cannot create an environment with a NamedSubExpsLangElem names = new ElementNames; names->push_back("foo"); names->push_back("bar"); NamedSubExpsLangElem *namedSubExpsLangElem2 = new NamedSubExpsLangElem(names, new StringDef("(Foo)(Bar)")); StateLangElem wrongEnvLangElem("myenv", namedSubExpsLangElem2, createFooLangElems()); try { builder.build_DB(&wrongEnvLangElem, mainState.get()); // must not get here assertTrue(false); } catch (const HighlightBuilderException &e) { cout << e << endl; os.str(""); os << e; assertEquals("cannot use this element for environments (only for states)\n" + stdBoostCausedBy(), os.str()); } // while it's OK for states (the default element is normal) wrongEnvLangElem.set_state(); builder.build_DB(&wrongEnvLangElem, mainState.get()); coutPrinter.printHighlightState(mainState.get()); // test for backreferences StringDef *backRef = new StringDef("@{1} @{2}"); backRef->setBackRef(true); try { DelimitedLangElem delimWrongWBRF("delim", new StringDef("(<)"), backRef, new StringDef("\\\\"), false, false); builder.build_DB(&delimWrongWBRF, mainState.get()); // must not get here assertTrue(false); } catch (const HighlightBuilderException &e) { cout << e << endl; os.str(""); os << e; assertEquals("2 subexpressions requested, but only 1 found\n" + stdBoostCausedBy(), os.str()); } backRef = new StringDef("@{2} @{1}"); backRef->setBackRef(true); DelimitedLangElem commentDelim("comment", new StringDef("(<<) (>>)"), backRef, new StringDef("\\\\"), false, false); builder.build_DB(&commentDelim, mainState.get()); coutPrinter.printHighlightState(mainState.get()); lastRule = mainState->getRuleList().back(); // check that back ref information were set correctly assertTrue(lastRule->getHasSubexpressions()); assertTrue(lastRule->getNextState().get()); assertTrue(lastRule->getNextState()->getNeedsReferenceReplacement()); assertTrue(lastRule->getNextState()->getRuleList().front()->getNeedsReferenceReplacement()); sourceHighlighter.highlightParagraph("check << >> comment inside >> << outside"); showLog(log); // the delimited element has << >> as a starting element, and the end element // has backreferences to the start element @{2} @{1}, i.e., >> << check_log_entry(log[0], "normal", "check "); check_log_entry(log[1], "comment", "<< >>"); check_log_entry(log[2], "comment", " comment inside "); check_log_entry(log[3], "comment", ">> <<"); check_log_entry(log[4], "normal", " outside"); backRef = new StringDef("@{3}@{2}@{1}"); backRef->setBackRef(true); DelimitedLangElem commentComplexDelim("comment", new StringDef("([^[:alnum:]])([^[:alnum:]])(\\1)"), backRef, new StringDef("\\\\"), true, true); /* mainState = HighlightStatePtr(new HighlightState); sourceHighlighter = SourceHighlighter(mainState); sourceHighlighter.setFormatterManager(&formatterManager); */ builder.build_DB(&commentComplexDelim, mainState.get()); coutPrinter.printHighlightState(mainState.get()); lastRule = mainState->getRuleList().back(); // check that back ref information were set correctly assertTrue(lastRule->getHasSubexpressions()); assertTrue(lastRule->getNextState().get()); assertTrue(lastRule->getNextState()->getNeedsReferenceReplacement()); assertTrue(lastRule->getNextState()->getRuleList().front()->getNeedsReferenceReplacement()); assertTrue(lastRule->getNextState()->getRuleList().back()->getHasSubexpressions()); log.clear(); sourceHighlighter.highlightParagraph("check |{| comment inside |{| outside"); showLog(log); check_log_entry(log[0], "normal", "check "); check_log_entry(log[1], "comment", "|{|"); check_log_entry(log[2], "comment", " comment inside "); check_log_entry(log[3], "comment", "|{|"); check_log_entry(log[4], "normal", " outside"); log.clear(); sourceHighlighter.highlightParagraph("check [|[ comment <,< inside <,< [|[ outside"); showLog(log); check_log_entry(log[0], "normal", "check "); check_log_entry(log[1], "comment", "[|["); check_log_entry(log[2], "comment", " comment "); check_log_entry(log[3], "comment", "<,<"); check_log_entry(log[4], "comment", " inside "); check_log_entry(log[5], "comment", "<,<"); check_log_entry(log[6], "comment", " "); check_log_entry(log[7], "comment", "[|["); check_log_entry(log[8], "normal", " outside"); // nested elements must have different delimiters try { DelimitedLangElem wrongNestedDelim("delim", new StringDef("'"), new StringDef("'"), new StringDef("\\\\"), true, true); builder.build_DB(&wrongNestedDelim, mainState.get()); // must not get here assertTrue(false); } catch (const HighlightBuilderException &e) { cout << e << endl; os.str(""); os << e; assertEquals("delimiters must be different for nested elements\n" + stdBoostCausedBy(), os.str()); } // tests for word list and non-word list StringDefs *nonWordList = new StringDefs; nonWordList->push_back(new StringDef("%")); nonWordList->push_back(new StringDef("@")); mainState = HighlightStatePtr(new HighlightState); StringListLangElem nonWordListElem("foo", nonWordList, false); builder.build_DB(&nonWordListElem, mainState.get()); coutPrinter.printHighlightState(mainState.get()); lastRule = mainState->getRuleList().back(); // the generated expression must not be withing \< and \> assertEquals("(?:%|@)", lastRule->toString()); // even if there are words it still must not be within \< \> because of symbols StringDefs *nonWordList2 = new StringDefs; nonWordList2->push_back(new StringDef("%")); nonWordList2->push_back(new StringDef("@")); nonWordList2->push_front(new StringDef("foo")); nonWordList2->push_back(new StringDef("bar")); mainState = HighlightStatePtr(new HighlightState); StringListLangElem nonWordListElem2("foo", nonWordList2, false); builder.build_DB(&nonWordListElem2, mainState.get()); coutPrinter.printHighlightState(mainState.get()); lastRule = mainState->getRuleList().back(); assertEquals("(?:foo|%|@|bar)", lastRule->toString()); // test whether delimited elems that start a state are generated correctly DelimitedLangElem delimStartingState("delim", new StringDef("<"), new StringDef(">"), new StringDef("\\\\"), false, false); StateLangElem fooStateElem("foo", 0, 0, false); delimStartingState.setStateLangElem(&fooStateElem); mainState = HighlightStatePtr(new HighlightState); builder.build_DB(&delimStartingState, mainState.get()); coutPrinter.printHighlightState(mainState.get()); assertEquals("<", mainState->getRuleList().back()->toString()); assertTrue(mainState->getRuleList().back()->getNextState().get()); assertEquals(">", mainState->getRuleList().back()->getNextState()->getRuleList().front()->toString()); assertEquals(1, mainState->getRuleList().back()->getNextState()->getRuleList().front()->getExitLevel()); cout << "test_highlightbuilder: SUCCESS" << endl; return 0; } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/tests/test_filenotfound_main.cpp�����������������������������������������0000644�0001750�0001750�00000003135�11672675564�021107� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#include <iostream> #include <sstream> #include "asserttestexit.h" #include "srchilite/langdefparserfun.h" #include "srchilite/outlangdefparserfun.h" #include "srchilite/ioexception.h" #include "srchilite/parserexception.h" using namespace std; using namespace srchilite; int main() { try { parse_lang_def("", "foo.bar"); assertFalse(true); // must not get here } catch (ParserException &e) { cout << e << endl; ostringstream output; output << e; assertEquals("cannot find input file anywhere foo.bar", output.str()); } try { parse_lang_def("", TESTSDIR "wrong_include.lang"); assertFalse(true); // must not get here } catch (ParserException &e) { cout << e << endl; ostringstream output; output << e; assertEquals("cannot open include file " TESTSDIR "/nonexistent.lang", output.str()); } try { parse_outlang_def("", "foo.bar"); assertFalse(true); // must not get here } catch (ParserException &e) { cout << e << endl; ostringstream output; output << e; assertEquals("cannot find input file anywhere foo.bar", output.str()); } try { parse_outlang_def("", TESTSDIR "wrong_outlang_include.outlang"); assertFalse(true); // must not get here } catch (ParserException &e) { cout << e << endl; ostringstream output; output << e; assertEquals("cannot open include file " TESTSDIR "/nonexistent.outlang", output.str()); } cout << "test_filenotfound: SUCCESS" << endl; return 0; } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/tests/test_linenum_main.cpp����������������������������������������������0000644�0001750�0001750�00000002315�11672675564�020061� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#include <iostream> #include "asserttestexit.h" #include "srchilite/linenumgenerator.h" #include "srchilite/textstyle.h" using namespace std; using namespace srchilite; int main() { TextStyle lineStyle("<LINE>$text</LINE>"); LineNumGenerator lineNumGen(lineStyle, 5); string result; result = lineNumGen.generateLine(10); cout << "line: " << result << endl; assertEquals("<LINE>00010:</LINE> ", result); // test for padding lineNumGen = LineNumGenerator(lineStyle, 5, ' '); result = lineNumGen.generateLine(10); cout << "line: " << result << endl; assertEquals("<LINE> 10:</LINE> ", result); // test for anchors const char *vars[] = { "linenum", 0 }; TextStyle anchorStyle("<A line$linenum>$text</A>", vars); lineNumGen.setAnchorStyle(anchorStyle); result = lineNumGen.generateLine(10); cout << "line: " << result << endl; assertEquals("<A line10><LINE> 10:</LINE></A> ", result); lineNumGen.setAnchorPrefix("__"); result = lineNumGen.generateLine(10); cout << "line: " << result << endl; assertEquals("<A line__10><LINE> 10:</LINE></A> ", result); cout << "test_linenum: SUCCESS" << endl; return 0; } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/tests/test_ctagsmanager_main.cpp�����������������������������������������0000644�0001750�0001750�00000013226�11672675564�021051� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#include <iostream> #include "asserttestexit.h" #include "srchilite/ctagscollector.h" #include "srchilite/ctagsformatter.h" #include "srchilite/formatterparams.h" #include "srchilite/tostringcollection.h" #include "srchilite/ctagsmanager.h" #include "srchilite/ioexception.h" #include "srchilite/verbosity.h" #include <sstream> using namespace std; using namespace srchilite; #ifndef BASEDIR #define BASEDIR "" #endif void printResults(const CTagsFormatterResults &results) { if (results.inlineResult.size()) { cout << "INLINE: " << results.inlineResult << endl; } else { if (results.postLineResult.size()) { cout << "POSTLINE: " << collectionRefToString(results.postLineResult, '\n'); } if (results.postDocResult.size()) { cout << "POSTDOC: " << collectionRefToString(results.postDocResult, '\n'); } } } int main() { // no ctags command CTagsManager ctagsManager("mytags", "", false, INLINE); CTagsFormatterResults results; string sourceFile = string(BASEDIR) + "readtags.h"; cout << "sourceFile: " << sourceFile << endl; TextStyles textStyles; const char *vars[] = { "linenum", "infilename", "infile", "outfile", 0 }; textStyles.refstyle.anchor = TextStyle( "<A>$text - $outfile - $infile($infilename):$linenum<A>", vars); textStyles.refstyle.inline_reference = TextStyle( "<IN>$text - $outfile - $infile($infilename):$linenum<IN>", vars); textStyles.refstyle.postline_reference = TextStyle( "<PL>$text - $outfile - $infile($infilename):$linenum<PL>", vars); textStyles.refstyle.postdoc_reference = TextStyle( "<PD>$text - $outfile - $infile($infilename):$linenum<PD>", vars); // pretend the output is readtags.html CTagsFormatter *_formatter = ctagsManager.createCTagsFormatter(textStyles.refstyle); CTagsFormatter &formatter = *_formatter; formatter.setFileInfo(sourceFile, "readtags.html"); // test tags found in file readtags.h FormatterParams fileInfo(sourceFile); fileInfo.filename = sourceFile; fileInfo.line = 1; formatter.formatCTags("READTAGS_H", results, &fileInfo); printResults(results); assertEquals("<IN>READTAGS_H - readtags.html - " + sourceFile + "(readtags.h):22<IN>", results.inlineResult); results.clear(); fileInfo.line = 22; // this must be detected as an anchor, since the line number is the same formatter.formatCTags("READTAGS_H", results, &fileInfo); printResults(results); assertEquals("<A>READTAGS_H - readtags.html - " + sourceFile + "(readtags.h):22<A>", results.inlineResult); results.clear(); formatter.formatCTags("file", results, &fileInfo); printResults(results); assertEquals("<PL>file - readtags.html - " + sourceFile + "(readtags.h):112<PL>\n<PL>file - readtags.html - " + sourceFile + "(readtags.h):72<PL>\n", collectionRefToString(results.postLineResult, 0)); /* results.clear(); collectorInline.setRefPosition(POSTDOC); fileInfo.line = 1; formatter.formatCTags("READTAGS_H", results, &fileInfo); printResults(results); // this should be postdoc assertEquals("<PD>READTAGS_H - readtags.html - " + sourceFile + "(readtags.h):22<PD>\n", results.postDocResult); */ delete _formatter; // try with a non existing file try { CTagsManager ctagsManager4("mytags4", "", false, INLINE); _formatter = ctagsManager4.createCTagsFormatter(textStyles.refstyle); assertTrue(false); // must not get here } catch (IOException &e) { cout << e << endl; ostringstream o; o << e; assertEquals("cannot open tag file mytags4.", o.str()); } Verbosity::setVerbosity(true); // try with a wrong command try { CTagsManager ctagsManager3("mytags3", "foobarcommand", true, INLINE); ctagsManager3.runCTagsCmd(); assertTrue(false); // must not get here } catch (IOException &e) { cout << e << endl; ostringstream o; o << e; assertEquals("error running ctags command foobarcommand.", o.str()); } // now try running the ctags command string ctagsCommand = CTAGS " --excmd=n --fields=+n -o mytags2 " BASEDIR "test_readtags_main.cpp " BASEDIR "readtags.h"; cout << "trying running " << ctagsCommand << endl; CTagsManager ctagsManager2("mytags2", ctagsCommand, true, INLINE); _formatter = ctagsManager2.createCTagsFormatter(textStyles.refstyle); _formatter->setFileInfo(sourceFile, "readtags.html"); // test tags found in file readtags.h fileInfo.filename = sourceFile; fileInfo.line = 1; _formatter->formatCTags("READTAGS_H", results, &fileInfo); printResults(results); assertEquals("<IN>READTAGS_H - readtags.html - " + sourceFile + "(readtags.h):22<IN>", results.inlineResult); results.clear(); fileInfo.line = 22; // this must be detected as an anchor, since the line number is the same _formatter->formatCTags("READTAGS_H", results, &fileInfo); printResults(results); assertEquals("<A>READTAGS_H - readtags.html - " + sourceFile + "(readtags.h):22<A>", results.inlineResult); results.clear(); _formatter->formatCTags("file", results, &fileInfo); printResults(results); assertEquals("<PL>file - readtags.html - " + sourceFile + "(readtags.h):112<PL>\n<PL>file - readtags.html - " + sourceFile + "(readtags.h):72<PL>\n", collectionRefToString(results.postLineResult, 0)); delete _formatter; cout << "test_ctagsmanager: SUCCESS!" << endl; return 0; } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/tests/test_outlang_errors_main.cpp���������������������������������������0000644�0001750�0001750�00000002212�11672675564�021453� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#include <iostream> #include "srchilite/sourcehighlight.h" #include "srchilite/textstyleformatter.h" #include <sstream> #include "asserttestexit.h" #include "srchilite/outlangdefparserfun.h" #include "srchilite/parserexception.h" using namespace std; using namespace srchilite; /* static void showFormatters(const TextStyleFormatterCollection &collection); void showFormatters(const TextStyleFormatterCollection &collection) { for (TextStyleFormatterCollection::const_iterator it = collection.begin(); it != collection.end(); ++it) { cout << (*it)->toString() << endl; } } */ int main() { istringstream input; ostringstream output; SourceHighlight sourcehighlight(TESTSDIR "wrong_trans.outlang"); sourcehighlight.setDataDir(BASEDIR); // test with error in the lang file try { sourcehighlight.initialize(); assertTrue(false); // must not get here } catch (ParserException &e) { //cout << "expected exception: " << e << endl; assertEqualsException(BASEDIR "/" TESTSDIR "wrong_trans.outlang:4: syntax error", e); } cout << "test_outlang_errors: SUCCESS" << endl; return 0; } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/tests/test_instances_main.cpp��������������������������������������������0000644�0001750�0001750�00000001706�11672675564�020404� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/** * Tests for language inference, class LanguageInfer */ #include "srchilite/instances.h" #include "srchilite/langdefmanager.h" #include "srchilite/langmap.h" #include <sstream> #include <iterator> #include "asserttestexit.h" using namespace std; using namespace srchilite; int main() { LangDefManager *langDefManager = srchilite::Instances::getLangDefManager(); LangMap *langMap = srchilite::Instances::getLangMap(); LangMap *outlangMap = srchilite::Instances::getOutLangMap(); assertTrue(langDefManager != 0, "should not be null"); assertTrue(langMap != 0, "should not be null"); assertTrue(outlangMap != 0, "should not be null"); assertEquals(langDefManager, srchilite::Instances::getLangDefManager()); assertEquals(langMap, srchilite::Instances::getLangMap()); assertEquals(outlangMap, srchilite::Instances::getOutLangMap()); Instances::unload(); cout << "test_instances: SUCCESS" << endl; return 0; } ����������������������������������������������������������source-highlight-3.1.6/lib/tests/test_outlangparser_main.cpp����������������������������������������0000644�0001750�0001750�00000006771�11672675564�021312� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // C++ Implementation: test_outlangparser_main // // Description: // // // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2005 // // Copyright: See COPYING file that comes with this distribution // // #include <iostream> #include <cstdlib> #include "srchilite/outlangdefparserfun.h" #include "asserttestexit.h" using namespace std; using namespace srchilite; int main() { TextStylesPtr textstyles = parse_outlang_def(BASEDIR, "outlangtest.outlang"); cout << "DocTemplate start:\n" << textstyles->docTemplate.toStringBegin() << endl; assertEquals( "this is the start of my doc\n\ and this is a line with a backslash \\text\n\ and this contains a {\n\ this is the title: $title\n\ this is the css url: $css\n\ this is the header: $header\n\ and this is some additional stuff: $additional", textstyles->docTemplate.toStringBegin()); cout << "DocTemplate end:\n" << textstyles->docTemplate.toStringEnd() << endl; assertEquals( "this is the end of my doc\n\ this is simply the footer: $footer", textstyles->docTemplate.toStringEnd()); string start = textstyles->docTemplate.output_begin("title", "css", "additional", "header", "footer", "", "inputlang"); cout << "DocTemplate start:\n" << start << endl; assertEquals( "this is the start of my doc\n\ and this is a line with a backslash \\text\n\ and this contains a {\n\ this is the title: title\n\ this is the css url: css\n\ this is the header: header\n\ and this is some additional stuff: additional", start); string end = textstyles->docTemplate.output_end("title", "css", "additional", "header", "footer", "", "inputlang"); cout << "DocTemplate end:\n" << end << endl; assertEquals( "this is the end of my doc\n\ this is simply the footer: footer", end); cout << "Style template:\n" << textstyles->starting_template << endl; cout << "Style separator: " << textstyles->style_separator << endl; assertEquals(";", textstyles->style_separator); cout << "Bold style: " << textstyles->bold.toString() << endl; assertEquals("\\textbf{$text}", textstyles->bold.toString()); cout << "text formatted in bold style: " << textstyles->bold.output("TEXT") << endl; cout << "Italics: " << textstyles->italics.toString() << endl; assertEquals("<i>$text</i>", textstyles->italics.toString()); cout << "Underline: " << textstyles->underline.toString() << endl; assertEquals("<u>$text</u>", textstyles->underline.toString()); cout << "Color: " << textstyles->color.toString() << endl; assertEquals("<font color=\"$style\">$text</font>", textstyles->color.toString()); cout << "ColorMap:\n" << textstyles->colorMap->toString() << endl; assertEquals("[green]=#33CC00\n\ [red]=#FF0000\ndefault=#000000", textstyles->colorMap->toString()); cout << "CharTranslator:\n" << textstyles->charTranslator->toString() << endl; assertEquals("(&)|(<)|(>) -> (?1&amp;)(?2&lt;)(?3&gt;)", textstyles->charTranslator->toString()); cout << "Onestyle: " << textstyles->onestyle.toString() << endl; assertEquals("<span class=\"$style\">$text</span>", textstyles->onestyle.toString()); string i = "0x1b"; cout << "original: " << i << endl; cout << "conversion: " << strtod(i.c_str(), 0) << endl; cout << "test_outlangparser: SUCCESS!" << endl; return 0; } �������source-highlight-3.1.6/lib/tests/test_regexpreprocessor_main.cpp������������������������������������0000644�0001750�0001750�00000031134�11672675564�022174� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (C) 2007 Lorenzo Bettini <http://www.lorenzobettini.it> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ /* * This program is part of GNU source-highlight * * This tests regex preprocessing */ #include <iostream> #include <cstdlib> #include <boost/regex.hpp> #include "asserttestexit.h" #include "srchilite/regexpreprocessor.h" #include "srchilite/stringdef.h" using namespace std; using namespace srchilite; void testPreprocess(const string &original, const string &expected) { cout << "original : "<< original << endl; const string &preprocessed = RegexPreProcessor::preprocess(original); cout << "preprocessed : "<< preprocessed << endl; assertEquals(expected, preprocessed); } void testMakeNonSensitive(const string &original, const string &expected) { cout << "original : "<< original << endl; const string &preprocessed = RegexPreProcessor::make_nonsensitive(original); cout << "preprocessed : "<< preprocessed << endl; assertEquals(expected, preprocessed); } void testOnlyNumOfMarkedSubexpressions(const string &original, unsigned int expected) { cout << "original : "<< original << endl; unsigned int found = RegexPreProcessor::num_of_subexpressions(original); cout << "found : "<< found << endl; assertEquals(expected, found); } void testNumOfMarkedSubexpressions(const string &original, unsigned int expected, const string &error = "", bool allow_outer_char = false, bool allow_outer_nonmarked = false) { cout << "original : "<< original << endl; subexpressions_info sexp = RegexPreProcessor::num_of_marked_subexpressions( original, allow_outer_char, allow_outer_nonmarked); unsigned int found = sexp.marked; cout << "found : "<< found << endl; if (sexp.errors.size()) cout << "error : "<< sexp.errors<< endl; assertEquals(expected, found); assertEquals(error, sexp.errors); } void testBackReference(const string &original, bool expected) { cout << "original : "<< original << endl; bool found = RegexPreProcessor::contains_backreferences(original); cout << "found : "<< found << endl; assertEquals(expected, found); } void testNumOfBackReferences(const string &original, int expected, int highest_expected) { cout << "original : "<< original << endl; backreference_info found = RegexPreProcessor::num_of_backreferences(original); cout << "found : "<< found.first<< endl; cout << "max : "<< found.second<< endl; assertEquals(expected, found.first); assertEquals(highest_expected, found.second); } void testNumOfReferences(const string &original, int expected, int highest_expected) { cout << "original : "<< original << endl; backreference_info found = RegexPreProcessor::num_of_references(original); cout << "found : "<< found.first<< endl; cout << "max : "<< found.second<< endl; assertEquals(expected, found.first); assertEquals(highest_expected, found.second); } void testReferenceReplace(const string &original, const backreference_replacements &replace, const string &expected) { cout << "original : "<< original << endl; const string &repl = RegexPreProcessor::replace_references(original, replace); cout << "found : "<< repl << endl; assertEquals(expected, repl); } void testReferenceReplace(const string &original, const regex_match_results &results, const string &expected) { cout << "original : "<< original << endl; const string &repl = RegexPreProcessor::replace_references(original, results); cout << "found : "<< repl << endl; assertEquals(expected, repl); } void testBackReferenceReplace(const string &original, const backreference_replacements &replace, const string &expected) { cout << "original : "<< original << endl; const string &repl = RegexPreProcessor::replace_backreferences(original, replace); cout << "found : "<< repl << endl; assertEquals(expected, repl); } void testBackReferenceReplace(const string &original, const regex_match_results &results, const string &expected) { cout << "original : "<< original << endl; const string &repl = RegexPreProcessor::replace_backreferences(original, results); cout << "found : "<< repl << endl; assertEquals(expected, repl); } void testSplit(const string &original, const subexpressions_strings &expected) { const subexpressions_strings *split; split = RegexPreProcessor::split_marked_subexpressions(original); cout << "split : "; std::copy(split->begin(), split->end(), std::ostream_iterator<string>(cout)); cout << endl; if (!std::equal(split->begin(), split->end(), expected.begin())) { cerr << "are not equal!" << endl; cerr << "expected : "; std::copy(expected.begin(), expected.end(), std::ostream_iterator<string>(cerr)); exit(EXIT_FAILURE); } delete split; } int main() { cout << boolalpha; testPreprocess("simple", "simple"); testPreprocess("(inside)", "(?:inside)"); testPreprocess("(dou(b)le)", "(?:dou(?:b)le)"); testMakeNonSensitive("foo", "[Ff][Oo][Oo]"); testOnlyNumOfMarkedSubexpressions("none", 0); testOnlyNumOfMarkedSubexpressions("just (one)", 1); testOnlyNumOfMarkedSubexpressions("(3 of (them)) just (one)", 3); testOnlyNumOfMarkedSubexpressions("none \\(", 0); testOnlyNumOfMarkedSubexpressions("(?: again) none \\(", 0); testNumOfMarkedSubexpressions("none", 0, subexpressions_info::ERR_OUTSIDE_SUBEXP); testNumOfMarkedSubexpressions("none", 0, "", true); testNumOfMarkedSubexpressions("just (one)", 0, subexpressions_info::ERR_OUTSIDE_SUBEXP); testNumOfMarkedSubexpressions("just (one)", 1, "", true); testNumOfMarkedSubexpressions("(3 of (them)) just (one)", 1, subexpressions_info::ERR_NESTED_SUBEXP); // now some critic cases testNumOfMarkedSubexpressions("(\\((?:\\\\\\)|[^)])*\\))", 1); testNumOfMarkedSubexpressions("(\\[(?:\\\\\\]|[^\\]])*\\])", 1); testNumOfMarkedSubexpressions("(:[^:]+\\:)", 1); testNumOfMarkedSubexpressions("none \\(", 0, subexpressions_info::ERR_OUTSIDE_SUBEXP); testNumOfMarkedSubexpressions("(?: again) none \\(", 0, subexpressions_info::ERR_OUTER_UNMARKED); testNumOfMarkedSubexpressions("(?: again) none \\(", 0, "", true, true); // outer nonmarked are allowed, but outer chars are not testNumOfMarkedSubexpressions("(?: again) none \\(", 0, subexpressions_info::ERR_OUTSIDE_SUBEXP, false, true); testNumOfMarkedSubexpressions("(just one)", 1); testNumOfMarkedSubexpressions("(just one (?:some) and unmarked)", 1); testNumOfMarkedSubexpressions("(just one \\( and escapes)", 1); testNumOfMarkedSubexpressions("(just one \\( and \\) escapes)", 1); testNumOfMarkedSubexpressions("(one) ", 1, subexpressions_info::ERR_OUTSIDE_SUBEXP); testNumOfMarkedSubexpressions("(one", 1, subexpressions_info::ERR_UNBALANCED_PAREN); testNumOfMarkedSubexpressions("(one))", 1, subexpressions_info::ERR_UNBALANCED_PAREN); testNumOfMarkedSubexpressions("(one)(two)((?:three)*)", 3); testNumOfMarkedSubexpressions("(one) (two)", 1, subexpressions_info::ERR_OUTSIDE_SUBEXP); subexpressions_strings expected; expected.push_back("(this)"); expected.push_back("(is)"); expected.push_back("(one)"); testSplit("(this)(is)(one)", expected); expected.clear(); expected.push_back("(this)"); expected.push_back("(contains \\( some \\) other parenthesis)"); expected.push_back("(and (?:non marked) ones)"); testSplit( "(this)(contains \\( some \\) other parenthesis)(and (?:non marked) ones)", expected); testBackReference("this does not contain any", false); testBackReference("this does contain \\1 one", true); testBackReference("and also this one (?(2)...) does", true); testBackReference("while this one (?(foo)...) does NOT does", false); testNumOfBackReferences("this does not contain any", 0, 0); testNumOfBackReferences("this does contain \\1 one", 1, 1); testNumOfBackReferences("this does \\3 contain \\1 two", 2, 3); testNumOfBackReferences("and also this one (?(2)...) does", 1, 2); testNumOfBackReferences("and also \\1 this one (?(2)...) does", 2, 2); testNumOfBackReferences("and also this one (?(2)...) \\3 does", 2, 3); testNumOfBackReferences("while this one (?(foo)...) does NOT does", 0, 0); testNumOfReferences("this does not contain any", 0, 0); testNumOfReferences("this does contain @{1} one", 1, 1); testNumOfReferences("this does @{3} contain @{1} two", 2, 3); testNumOfReferences("while this one \\@{2} does NOT does", 0, 0); backreference_replacements replace(9); replace[1] = "SECOND"; replace[2] = "THIRD"; testReferenceReplace("this does not contain any", replace, "this does not contain any"); // test for an empty replace string testReferenceReplace("this does contain @{1} one", replace, "this does contain one"); replace[0] = "FIRST"; testReferenceReplace("this does contain @{1} one", replace, "this does contain FIRST one"); testReferenceReplace("this does contain @{1} one", replace, "this does contain FIRST one"); testReferenceReplace("and also this one (?(@{2})...) @{3} does", replace, "and also this one (?(SECOND)...) THIRD does"); testReferenceReplace( "and (@{1}|@{3}@{1}) also this one (?((?(@{2})foo|bar))...) (@{3}) does", replace, "and (FIRST|THIRDFIRST) also this one (?((?(SECOND)foo|bar))...) (THIRD) does"); // we test replacement when what we replace might be a special char in regex syntax replace[0] = "|"; replace[1] = "$"; replace[2] = "{"; replace[3] = "="; testReferenceReplace("Here are special chars: @{1} @{2} @{3} @{4}", replace, "Here are special chars: \\| \\$ \\{ ="); // now test substitutions using match results boost::regex test_regex("--\\[(=*)\\["); string to_match = "--[["; string to_substitute = "]]"; // between the ] ] regex_match_results what; assertEquals(true, boost::regex_search(to_match, what, test_regex)); // no substitution must take place testReferenceReplace(to_substitute, what, "]]"); // skip one char and replace with the first subexp to_substitute = "]@{1}]"; // between the ] ] what = regex_match_results(); to_match = "--[=["; assertEquals(true, boost::regex_search(to_match, what, test_regex)); testReferenceReplace(to_substitute, what, "]=]"); test_regex = boost::regex("--\\[(=*)\\[(-*)\\["); what = regex_match_results(); to_substitute = "]@{1}]@{2}]"; to_match = "--[=[-["; assertEquals(true, boost::regex_search(to_match, what, test_regex)); testReferenceReplace(to_substitute, what, "]=]-]"); what = regex_match_results(); to_match = "--[=[-["; to_substitute = "](?(@{1})@{1}|@{2})]@{2}]"; assertEquals(true, boost::regex_search(to_match, what, test_regex)); testReferenceReplace(to_substitute, what, "](?(=)=|-)]-]"); what = regex_match_results(); to_match = "--[=[["; assertEquals(true, boost::regex_search(to_match, what, test_regex)); testReferenceReplace(to_substitute, what, "](?(=)=|)]]"); // check StringDef for backreferences StringDef s1("foo"); StringDef s2("bar"); assertTrue(!s1.hasBackRef()); s1 = StringDef(""); s1.setBackRef(true); assertTrue(s1.hasBackRef()); assertTrue(!s2.hasBackRef()); StringDef *conc = StringDef::concat(&s1, &s2); assertTrue(conc->hasBackRef()); delete conc; cout << "test_regexpreprocessor: SUCCESS!" << endl; return 0; } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/tests/test_settings_main.cpp���������������������������������������������0000644�0001750�0001750�00000003314�11672675564�020252� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#include <iostream> #include "srchilite/settings.h" #include "asserttestexit.h" #include <cstdlib> using namespace std; using namespace srchilite; int main() { Settings settings; string home; const char *_home = getenv("HOME"); if (_home) home = _home; cout << "confDir: " << settings.getConfDir() << endl; assertEquals(home + "/.source-highlight/", settings.getConfDir()); // a non existent file settings.setTestFileName("foobar.conf"); assertFalse(settings.checkForTestFile(), "test file must not be found"); // now check for the file in the current directory settings.setDataDir(BASEDIR); settings.setTestFileName("testconffile.conf"); assertTrue(settings.checkForTestFile(), "test file must be found"); settings.setConfDir(BASEDIR); assertTrue(settings.readDataDir(), "datadir must be read from the conf file"); cout << "read datadir: " << settings.getDataDir() << endl; assertEquals("foo", settings.getDataDir()); // test the static method string readDataDir = Settings::retrieveDataDir(); cout << "retrieved data dir: " << readDataDir << endl; // now set the global value string globalValue = "global"; Settings::setGlobalDataDir(globalValue); assertEquals(globalValue, Settings::retrieveDataDir()); // now set the global value as empty, and check that the previous // value is returned now Settings::setGlobalDataDir(""); assertEquals(readDataDir, Settings::retrieveDataDir()); // test global check settings Settings::setGlobalDataDir(MAINSRCDIR); assertTrue(Settings::checkSettings(), "check setting should succeed"); cout << "test_settings: SUCCESS!" << endl; return 0; } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/tests/test_langinfer_main.cpp��������������������������������������������0000644�0001750�0001750�00000003553�11672675564�020364� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/** * Tests for language inference, class LanguageInfer */ #include "srchilite/languageinfer.h" #include <sstream> #include "asserttestexit.h" #include "srchilite/utils.h" using namespace std; using namespace srchilite; LanguageInfer inf; static void testInfer(const string &input, const string &expected); void testInfer(const string &input, const string &expected) { stringstream buf; buf << input << "\nother lines\nother lines" << endl; string res = inf.infer(buf); cout << "inferred language: " << res << endl; assertEquals(expected, res); } int main() { testInfer("#!/bin/sh", "sh"); testInfer("# !/bin/bash", "bash"); testInfer("#! /usr/local/bin/python", "python"); testInfer("#! mypython ", "mypython"); testInfer("#! usr/local/bin/perl", "perl"); testInfer("#! ../usr/local/bin/perl", "perl"); testInfer("#! ../usr/../local/bin/sh", "sh"); // now test emacs specifications testInfer("# -*- perl -*-", "perl"); testInfer("# -*- perl, as specified in Emacs -*-", "perl"); testInfer("# -*- Perl, as specified in Emacs -*-", "Perl"); testInfer("# -*- php3, as specified in Emacs -*-", "php3"); testInfer("#!/bin/sh\n# -*- tcl, as specified in Emacs -*-", "tcl"); // try with the env specification testInfer("#! /usr/bin/env python", "python"); testInfer("#! /bin/env perl", "perl"); // just a small check for tolower string s = "Lisp"; Utils::toLower(s); cout << "lowered string: " << s << endl; assertEquals("lisp", s); cout << "lowered string: " << Utils::tolower("Php3") << endl; assertEquals("php3", Utils::tolower("Php3")); // try with scripts starting with <? testInfer("<?php", "php"); testInfer("<?xml", "xml"); // try xml like testInfer("<!DOCTYPE kpartgui ", "xml"); cout << "test_langinfer: SUCCESS" << endl; return 0; } �����������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/tests/test_events_main.cpp�����������������������������������������������0000644�0001750�0001750�00000002541�11672675564�017717� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#include <iostream> #include <string> #include "srchilite/eventgenerator.h" #include <sstream> #include "asserttestexit.h" using namespace std; using namespace srchilite; ostringstream buffer; struct MyEvent { string desc; MyEvent(const string &_desc) : desc(_desc) { } }; struct MyListener { string name; MyListener(const string &_name) : name(_name) { } void notify(MyEvent e) { buffer << "listener: " << name << ", event: " << e.desc << endl; } }; int main() { MyListener l1("l1"), l2("l2"), l3("l3"); EventGenerator<MyListener, MyEvent> eventGenerator; assertFalse(eventGenerator.hasListeners()); eventGenerator.addListener(&l1); eventGenerator.addListener(&l2); eventGenerator.addListener(&l3); assertTrue(eventGenerator.hasListeners()); eventGenerator.notify(MyEvent("foo")); cout << buffer.str() << endl; assertEquals( "listener: l1, event: foo\nlistener: l2, event: foo\nlistener: l3, event: foo\n", buffer.str()); buffer.str(""); eventGenerator.removeListener(&l2); eventGenerator.notify(MyEvent("bar")); cout << buffer.str() << endl; assertEquals( "listener: l1, event: bar\nlistener: l3, event: bar\n", buffer.str()); cout << "test_events: SUCCESS!" << endl; return 0; } ���������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/tests/test_wordtokenizer_main.cpp����������������������������������������0000644�0001750�0001750�00000002257�11672675564�021325� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#include <iostream> #include "asserttestexit.h" #include "srchilite/wordtokenizer.h" #include "srchilite/tostringcollection.h" using namespace std; using namespace srchilite; static ostream &operator <<(ostream &os, const WordTokenizer::WordTokenizerResults::value_type &); ostream &operator <<(ostream &os, const WordTokenizer::WordTokenizerResults::value_type &token) { if (token.first.size()) { os << "space: \"" << token.first << "\"" << endl; } else { os << "word : \"" << token.second << "\"" << endl; } return os; } int main() { WordTokenizer::WordTokenizerResults tokens; WordTokenizer::tokenize(" Here are\t \t some_words!", tokens); cout << "tokens: " << collectionToString(&tokens) << endl; WordTokenizer::WordTokenizerResults::const_iterator tok = tokens.begin(); assertTrue(tok != tokens.end()); assertEquals(" ", (tok++)->first); assertEquals("Here", (tok++)->second); assertEquals(" ", (tok++)->first); assertEquals("are", (tok++)->second); assertEquals("\t \t ", (tok++)->first); assertEquals("some_words!", (tok++)->second); cout << "test_wordtokenizer: SUCCESS" << endl; return 0; } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/tests/test_highlighter_main.cpp������������������������������������������0000644�0001750�0001750�00000026111�11672675564�020710� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#include <iostream> #include "logformatter.h" #include "srchilite/sourcehighlighter.h" #include "srchilite/formattermanager.h" #include "srchilite/formatterparams.h" #include "srchilite/regexrulefactory.h" #include "srchilite/regexhighlightrule.h" #include "asserttestexit.h" using namespace std; using namespace srchilite; static void check_log_entry(const FormatterLogEntry &e, const std::string &elem, const std::string &s, const int start = -1); void check_log_entry(const FormatterLogEntry &e, const std::string &elem, const std::string &s, const int start) { assertEquals(elem, e.first); assertEquals(s, e.second); if (start != -1) { assertEquals(start, e.start); } } int main() { FormatterLog log; RegexRuleFactory factory; FormatterParams params; FormatterPtr normalFormatter = FormatterPtr(new LogFormatter(log, "normal")); FormatterPtr keywordFormatter = FormatterPtr(new LogFormatter(log, "keyword")); FormatterPtr commentFormatter = FormatterPtr(new LogFormatter(log, "comment")); FormatterManager formatterManager(normalFormatter); HighlightStatePtr highlightState = HighlightStatePtr(new HighlightState); SourceHighlighter sourceHighlighter(highlightState); sourceHighlighter.setFormatterManager(&formatterManager); sourceHighlighter.setFormatterParams(&params); // now the state has no rules, so we should see only "normal" formatting sourceHighlighter.highlightParagraph("this is normal"); showLog(log); assertEquals((size_t) 1, log.size()); assertEquals("normal", log[0].first); assertEquals("this is normal", log[0].second); // now we add some rules log.clear(); WordList keywords; keywords.push_back("class"); keywords.push_back("public"); highlightState->addRule(HighlightRulePtr(factory.createWordListRule( "keyword", keywords))); sourceHighlighter.highlightParagraph("this class is public and normal"); // however the formatter for keyword is not set, so we will get // tokenized strings all as normal showLog(log); check_log_entry(log[0], "normal", "this "); check_log_entry(log[1], "normal", "class"); check_log_entry(log[2], "normal", " is "); check_log_entry(log[3], "normal", "public"); check_log_entry(log[4], "normal", " and normal"); log.clear(); // now we add the formatter for keyword formatterManager.addFormatter("keyword", keywordFormatter); sourceHighlighter.highlightParagraph("this class is public and normal"); // and this time we will have also keywords logged showLog(log); check_log_entry(log[0], "normal", "this ", 0); check_log_entry(log[1], "keyword", "class", 5); check_log_entry(log[2], "normal", " is ", 10); check_log_entry(log[3], "keyword", "public", 14); check_log_entry(log[4], "normal", " and normal", 20); // test environments log.clear(); HighlightRulePtr multiLineCommentRule = HighlightRulePtr( factory.createMultiLineRule("comment", "/\\*", "\\*/", "", false)); HighlightStatePtr multiLineCommentState = multiLineCommentRule->getNextState(); assertTrue(multiLineCommentState.get()); highlightState->addRule(multiLineCommentRule); formatterManager.addFormatter("comment", commentFormatter); sourceHighlighter.highlightParagraph("this /* is a comment */ foo"); showLog(log); // since we didn't set the default element of multiLineCommentState, then // the string inside the comment is formatted as normal check_log_entry(log[0], "normal", "this "); check_log_entry(log[1], "comment", "/*"); check_log_entry(log[2], "normal", " is a comment "); check_log_entry(log[3], "comment", "*/"); check_log_entry(log[4], "normal", " foo"); log.clear(); // now we set its default element (to comment) multiLineCommentState->setDefaultElement("comment"); sourceHighlighter.highlightParagraph("this /* is a comment */ foo"); showLog(log); // since now we set the default element of multiLineCommentState, then // the string inside the comment is formatted as a comment check_log_entry(log[0], "normal", "this "); check_log_entry(log[1], "comment", "/*"); check_log_entry(log[2], "comment", " is a comment "); check_log_entry(log[3], "comment", "*/"); check_log_entry(log[4], "normal", " foo"); // test nested environments log.clear(); HighlightRulePtr multiLineNestedCommentRule = HighlightRulePtr( factory.createMultiLineRule("comment", "<<", ">>", "", true)); HighlightStatePtr multiLineNestedCommentState = multiLineNestedCommentRule->getNextState(); assertTrue(multiLineNestedCommentState.get()); multiLineNestedCommentState->setDefaultElement("comment"); highlightState->addRule(multiLineNestedCommentRule); sourceHighlighter.highlightParagraph( "this << is << a << nested >> comment >> >> foo"); showLog(log); check_log_entry(log[0], "normal", "this "); check_log_entry(log[1], "comment", "<<"); check_log_entry(log[2], "comment", " is "); check_log_entry(log[3], "comment", "<<"); check_log_entry(log[4], "comment", " a "); check_log_entry(log[5], "comment", "<<"); check_log_entry(log[6], "comment", " nested "); check_log_entry(log[7], "comment", ">>"); check_log_entry(log[8], "comment", " comment "); check_log_entry(log[9], "comment", ">>"); check_log_entry(log[10], "comment", " "); check_log_entry(log[11], "comment", ">>"); check_log_entry(log[12], "normal", " foo"); // test for exit all log.clear(); HighlightRulePtr exitAllRule = HighlightRulePtr(factory.createSimpleRule( "comment", "!")); exitAllRule->setExitLevel(-1); multiLineNestedCommentState->addRule(exitAllRule); sourceHighlighter.highlightParagraph( "this << is << a << ! exit >> comment >> >> foo"); showLog(log); // the ! makes exit all states and go back to the initial state check_log_entry(log[0], "normal", "this "); check_log_entry(log[1], "comment", "<<"); check_log_entry(log[2], "comment", " is "); check_log_entry(log[3], "comment", "<<"); check_log_entry(log[4], "comment", " a "); check_log_entry(log[5], "comment", "<<"); check_log_entry(log[6], "comment", " "); check_log_entry(log[7], "comment", "!"); check_log_entry(log[8], "normal", " exit >> comment >> >> foo"); // test for optmized buffering log.clear(); sourceHighlighter.setOptimize(); sourceHighlighter.highlightParagraph( "this << is << a << ! exit >> comment >> >> foo"); showLog(log); check_log_entry(log[0], "normal", "this "); check_log_entry(log[1], "comment", "<< is << a << !"); check_log_entry(log[2], "normal", " exit >> comment >> >> foo"); // check for final flush in optimization log.clear(); sourceHighlighter.setOptimize(); sourceHighlighter.highlightParagraph("this << is << a << !"); showLog(log); check_log_entry(log[0], "normal", "this "); check_log_entry(log[1], "comment", "<< is << a << !"); sourceHighlighter.setOptimize(false); // check for final current state log.clear(); sourceHighlighter.highlightParagraph("this <<"); showLog(log); check_log_entry(log[0], "normal", "this "); check_log_entry(log[1], "comment", "<<"); assertEquals("comment", sourceHighlighter.getCurrentState()->getDefaultElement()); log.clear(); // bring it back to the initial state sourceHighlighter.highlightParagraph("!"); showLog(log); check_log_entry(log[0], "comment", "!"); assertEquals("normal", sourceHighlighter.getCurrentState()->getDefaultElement()); // test for rule with \z log.clear(); HighlightRulePtr ruleWithEOL = HighlightRulePtr(factory.createLineRule( "comment", "#", "", "\\\\")); highlightState->addRule(ruleWithEOL); ruleWithEOL->getNextState()->setDefaultElement("comment"); sourceHighlighter.highlightParagraph("before # this is a comment"); sourceHighlighter.highlightParagraph("while this is class"); showLog(log); int i = 0; check_log_entry(log[i++], "normal", "before ", 0); check_log_entry(log[i++], "comment", "#", 7); check_log_entry(log[i++], "comment", " this is a comment", 8); //check_log_entry(log[i++], "comment", ""); // match the end of line check_log_entry(log[i++], "normal", "while this is ", 0); check_log_entry(log[i++], "keyword", "class", 14); // test for suspended log.clear(); sourceHighlighter.setSuspended(true); assertEquals((size_t) 0, log.size()); sourceHighlighter.highlightParagraph("foo"); sourceHighlighter.setSuspended(false); sourceHighlighter.highlightParagraph("bar"); check_log_entry(log[0], "normal", "bar"); // test for compound rule: class <classname> log.clear(); FormatterPtr typeFormatter = FormatterPtr(new LogFormatter(log, "type")); formatterManager.addFormatter("type", typeFormatter); ElemNameList nameList; nameList.push_back("keyword"); nameList.push_back("normal"); nameList.push_back("type"); HighlightRulePtr compoundRule = HighlightRulePtr( factory.createCompoundRule(nameList, "(myclass)([[:blank:]]+)([[:word:]]+)")); highlightState->addRule(compoundRule); sourceHighlighter.highlightParagraph("fo() myclass Foo {"); showLog(log); i = 0; check_log_entry(log[i++], "normal", "fo() ", 0); check_log_entry(log[i++], "keyword", "myclass", 5); check_log_entry(log[i++], "normal", " ", 12); check_log_entry(log[i++], "type", "Foo", 13); check_log_entry(log[i++], "normal", " {", 16); // check explicit setting of current state and stack log.clear(); sourceHighlighter.highlightParagraph("<< comment"); HighlightStatePtr prevCommentState = sourceHighlighter.getCurrentState(); HighlightStateStackPtr prevStack = sourceHighlighter.getStateStack(); // now the stack should contain one state assertEquals((size_t)1, sourceHighlighter.getStateStack()->size()); showLog(log); i = 0; check_log_entry(log[i++], "comment", "<<"); check_log_entry(log[i++], "comment", " comment"); log.clear(); sourceHighlighter.setCurrentState(sourceHighlighter.getMainState()); sourceHighlighter.setStateStack(HighlightStateStackPtr(new HighlightStateStack)); sourceHighlighter.highlightParagraph("not in comment"); showLog(log); i = 0; check_log_entry(log[i++], "normal", "not in comment"); log.clear(); sourceHighlighter.setCurrentState(prevCommentState); sourceHighlighter.setStateStack(prevStack); sourceHighlighter.highlightParagraph("end comment >>"); showLog(log); i = 0; check_log_entry(log[i++], "comment", "end comment "); check_log_entry(log[i++], "comment", ">>"); // now the stack should be empty assertEquals((size_t)0, sourceHighlighter.getStateStack()->size()); // also our copy assertEquals((size_t)0, prevStack->size()); cout << "test_highlighter: SUCCESS" << endl; return 0; } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/tests/test_formatreferences_main.cpp�������������������������������������0000644�0001750�0001750�00000011400�11672675564�021737� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// tests for class TextStyle #include <iostream> #include "asserttestexit.h" #include "srchilite/textstyleformatter.h" #include "srchilite/bufferedoutput.h" #include <sstream> #include "srchilite/srcuntabifier.h" #include "srchilite/ctagsformatter.h" #include "srchilite/ctagscollector.h" #include "srchilite/textstyles.h" #include "srchilite/formatterparams.h" using namespace srchilite; class MyPreFormatter : public PreFormatter { public: virtual ~MyPreFormatter() { } protected: /** * test performatting */ virtual const std::string doPreformat(const std::string &text) { return "{" + text + "}"; } }; using namespace std; int main() { CTagsCollector collectorInline("mytags", INLINE); CTagsFormatterResults results; string sourceFile = string( BASEDIR) + "readtags.h"; TextStyles textStyles; const char *vars[] = { "linenum", "infilename", "infile", "outfile", 0 }; textStyles.refstyle.anchor = TextStyle( "<A>$text - $infilename):$linenum<A>", vars); textStyles.refstyle.inline_reference = TextStyle( "<IN>$text - $infilename):$linenum<IN>", vars); textStyles.refstyle.postline_reference = TextStyle( "<PL>$text - $infilename):$linenum<PL>", vars); textStyles.refstyle.postdoc_reference = TextStyle( "<PD>$text - $infilename):$linenum<PD>", vars); // pretend the output is readtags.html MyPreFormatter preformatter; CTagsFormatter ctagsformatter(&preformatter, textStyles.refstyle, &collectorInline); ctagsformatter.setFileInfo(sourceFile, "readtags.html"); ostringstream os; BufferedOutput bufferedOutput(os); // just a foo tag string orig = "<F>$text</F>"; TextStyle textStyle1(orig); TextStyleFormatter formatter(textStyle1); formatter.setBufferedOutput(&bufferedOutput); formatter.setPreFormatter(&preformatter); formatter.setCTagsFormatter(&ctagsformatter); FormatterParams params(sourceFile); params.line = 1; formatter.format("there are no references", &params); cout << "formatted: " << os.str() << endl; assertEquals("<F>{there are no references}</F>", os.str()); os.str(""); formatter.format("just one READTAGS_H reference", &params); cout << "formatted: " << os.str() << endl; assertEquals( "<F>{just one }</F><F><IN>{READTAGS_H} - readtags.h):22<IN></F><F>{ reference}</F>", os.str()); // check that there's not post line and post doc references os.str(""); bufferedOutput.writePostLine(); assertEquals("", os.str()); os.str(""); bufferedOutput.writePostDoc(); assertEquals("", os.str()); // test anchor os.str(""); params.line = 22; formatter.format("just one READTAGS_H anchor", &params); cout << "formatted: " << os.str() << endl; assertEquals( "<F>{just one }</F><F><A>{READTAGS_H} - readtags.h):22<A></F><F>{ anchor}</F>", os.str()); // check that there's not post line and post doc references os.str(""); bufferedOutput.writePostLine(); assertEquals("", os.str()); os.str(""); bufferedOutput.writePostDoc(); assertEquals("", os.str()); // test automatic postline os.str(""); params.line = 1; formatter.format("this file is a file reference", &params); cout << "formatted: " << os.str() << endl; // the references do not appear in the paragraph, but in post line assertEquals( "<F>{this }</F><F>{file}</F><F>{ is a }</F><F>{file}</F><F>{ reference}</F>", os.str()); // check that there's a post line and no post doc references os.str(""); bufferedOutput.writePostLine(); cout << "postline: " << os.str() << endl; assertEquals( "<PL>{file} - readtags.h):112<PL>{\n}<PL>{file} - readtags.h):72<PL>{\n}", os.str()); os.str(""); bufferedOutput.writePostDoc(); assertEquals("", os.str()); // test post doc collectorInline.setRefPosition(POSTDOC); os.str(""); params.line = 1; formatter.format("this file is a file reference", &params); cout << "formatted: " << os.str() << endl; // the references do not appear in the paragraph, but in post line assertEquals( "<F>{this }</F><F>{file}</F><F>{ is a }</F><F>{file}</F><F>{ reference}</F>", os.str()); // check that there's a post doc and no post line references os.str(""); bufferedOutput.writePostDoc(); cout << "postdoc: " << os.str() << endl; assertEquals( "<PD>{file} - readtags.h):112<PD>{\n}<PD>{file} - readtags.h):72<PD>{\n}", os.str()); os.str(""); bufferedOutput.writePostLine(); assertEquals("", os.str()); cout << "test_formatreferences: SUCCESS" << endl; return 0; } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/tests/test_textstyleformatterfactory_main.cpp����������������������������0000644�0001750�0001750�00000010671�11672675564�023777� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#include <iostream> #include "asserttestexit.h" #include "srchilite/textstyleformatter.h" #include "srchilite/bufferedoutput.h" #include <sstream> #include "srchilite/srcuntabifier.h" #include "srchilite/textstyleformatterfactory.h" #include "srchilite/formattermanager.h" #include "srchilite/ctagsformatter.h" using namespace std; using namespace srchilite; class MyPreFormatter : public PreFormatter { public: virtual ~MyPreFormatter() { } protected: /** * test performatting */ virtual const std::string doPreformat(const std::string &text) { return "{" + text + "}"; } }; int main() { ostringstream os; bool result; BufferedOutput bufferedOutput(os); FormatterPtr defaultFormatter(new TextStyleFormatter("$text")); MyPreFormatter preformatter; TextStylesPtr textStyles(new TextStyles); textStyles->bold = TextStyle("<b>$text</b>"); textStyles->italics = TextStyle("<i>$text</i>"); textStyles->underline = TextStyle("<u>$text</u>"); textStyles->color = TextStyle("<c=$style>$text</c>"); (*(textStyles->colorMap))["red"] = "RED"; // this is just to test noref, it will be never used CTagsFormatter ctagsformatter(0, textStyles->refstyle, 0); ctagsformatter.setFileInfo("", ""); FormatterManager formatterManager(defaultFormatter); TextStyleFormatterFactory formatterFactory(textStyles, &preformatter, &ctagsformatter, &formatterManager); StyleConstantsPtr styleConstants(new StyleConstants); styleConstants->push_back(ISBOLD); styleConstants->push_back(ISUNDERLINE); // test without colors result = formatterFactory.createFormatter("foo", "", "", styleConstants); assertTrue(result); FormatterPtr formatter = formatterManager.getFormatter("foo"); assertTrue(formatter.get()); TextStyleFormatter *tformatter = 0; tformatter = dynamic_cast<TextStyleFormatter *>(formatter.get()); assertTrue(tformatter); assertEquals(&ctagsformatter, tformatter->getCTagsFormatter()); // one formatter was created assertEquals((size_t)1, formatterFactory.getFormatterCollection().size()); tformatter->setBufferedOutput(&bufferedOutput); tformatter->format("test"); cout << "formatted: " << os.str() << endl; assertEquals("<b><u>test</u></b>", os.str()); // check that noref does not set the ctagsformatter styleConstants->push_back(ISNOREF); result = formatterFactory.createFormatter("noref", "", "", styleConstants); // another formatter was created assertEquals((size_t)2, formatterFactory.getFormatterCollection().size()); assertTrue(result); formatter = formatterManager.getFormatter("noref"); assertTrue(formatter.get()); tformatter = dynamic_cast<TextStyleFormatter *>(formatter.get()); assertTrue(tformatter); assertEquals((CTagsFormatter *)0, tformatter->getCTagsFormatter()); // check that noref does not set the ctagsformatter result = formatterFactory.createFormatter("colored", "red", "", styleConstants); // another formatter was created assertEquals((size_t)3, formatterFactory.getFormatterCollection().size()); assertTrue(result); formatter = formatterManager.getFormatter("colored"); assertTrue(formatter.get()); tformatter = dynamic_cast<TextStyleFormatter *>(formatter.get()); assertTrue(tformatter); os.str(""); tformatter->setBufferedOutput(&bufferedOutput); tformatter->format("test"); cout << "formatted: " << os.str() << endl; assertEquals("<b><u><c=RED>test</c></u></b>", os.str()); // test for createMissingFormatter // formatter for foo already exists assertFalse(formatterFactory.createMissingFormatter("foo", "bar")); // formatter doesn't exist assertFalse(formatterFactory.createMissingFormatter("bar", "nonexisting")); // formatter for bar is just the same as the formatter for foo assertTrue(formatterFactory.createMissingFormatter("bar", "foo")); // check that formatting with "bar" is the same as formatting with "foo" formatter = formatterManager.hasFormatter("bar"); assertTrue(formatter.get()); // no other formatter was created assertEquals((size_t)3, formatterFactory.getFormatterCollection().size()); os.str(""); formatter->format("test"); cout << "formatted: " << os.str() << endl; assertEquals("<b><u>test</u></b>", os.str()); cout << "test_textstyleformatterfactory: SUCCESS" << endl; return 0; } �����������������������������������������������������������������������source-highlight-3.1.6/lib/tests/test_buffered_output_main.cpp��������������������������������������0000644�0001750�0001750�00000005137�11672675564�021621� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#include <iostream> #include <list> #include <sstream> #include "srchilite/bufferedoutput.h" #include "asserttestexit.h" using namespace std; using namespace srchilite; int main() { ostringstream os; BufferedOutput bufferedOutput(os); bufferedOutput.output("first line"); bufferedOutput.output(" blah blah"); bufferedOutput.postLineInsert("post first line\n"); bufferedOutput.postLineInsert("post first line\n"); // duplicates are not stored bufferedOutput.postLineInsert("post first line 2\n"); bufferedOutput.postLineInsert("post first line 3\n"); bufferedOutput.postDocInsert("post doc"); bufferedOutput.postDocInsert("post doc"); bufferedOutput.postDocInsert("post doc 2"); bufferedOutput.postDocInsert("post doc 3"); cout << "line: " << os.str() << endl; assertEquals("first line blah blah", os.str()); os.str(""); bufferedOutput.writePostLine("PRE "); const string &postLine = os.str(); cout << "post line: " << postLine << endl; assertEquals( "PRE post first line\nPRE post first line 2\nPRE post first line 3\n", postLine); os.str(""); bufferedOutput.writePostDoc("PRE "); const string &postDoc = os.str(); cout << "post doc: " << postDoc << endl; assertEquals("PRE post docPRE post doc 2PRE post doc 3", postDoc); // now try with collections list<string> postline, postdoc; postline.push_back("NEW post first line\n"); postline.push_back("NEW post first line 2\n"); postline.push_back("NEW post first line\n"); bufferedOutput.postLineInsertFrom(postline); os.str(""); bufferedOutput.writePostLine("PRE "); const string &postLine2 = os.str(); cout << "post line: " << postLine2 << endl; assertEquals("PRE NEW post first line\nPRE NEW post first line 2\n", postLine2); postdoc.push_back("NEW post doc"); postdoc.push_back("NEW post doc 2"); postdoc.push_back("NEW post doc"); bufferedOutput.postDocInsertFrom(postdoc); os.str(""); bufferedOutput.writePostDoc("PRE "); const string &postDoc2 = os.str(); cout << "post doc: " << postDoc2 << endl; assertEquals("PRE NEW post docPRE NEW post doc 2", postDoc2); // check that the buffers were flushed os.str(""); bufferedOutput.postLineInsert("foo"); bufferedOutput.writePostLine("PRE "); assertEquals("PRE foo", os.str()); os.str(""); bufferedOutput.postDocInsert("foo"); bufferedOutput.writePostDoc("PRE "); assertEquals("PRE foo", os.str()); cout << "test_buffered_output: SUCCESS!" << endl; return 0; } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/tests/test_sourcefilehighlighter_main.cpp��������������������������������0000644�0001750�0001750�00000021726�11672675564�023000� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#include <iostream> #include "srchilite/sourcehighlighter.h" #include "srchilite/sourcefilehighlighter.h" #include "srchilite/formattermanager.h" #include "srchilite/regexrulefactory.h" #include "srchilite/regexhighlightrule.h" #include "asserttestexit.h" #include <sstream> #include "srchilite/bufferedoutput.h" #include "srchilite/textstyleformatter.h" #include "srchilite/chartranslator.h" #include "srchilite/linenumgenerator.h" #include "srchilite/lineranges.h" #include "srchilite/regexranges.h" /* static void check_log_entry(const FormatterLogEntry &e, const std::string &elem, const std::string &s); void check_log_entry(const FormatterLogEntry &e, const std::string &elem, const std::string &s) { assertEquals(elem, e.first); assertEquals(s, e.second); } */ using namespace std; using namespace srchilite; int main() { ostringstream os; RegexRuleFactory factory; BufferedOutput output(os); FormatterPtr normalFormatter = FormatterPtr(new TextStyleFormatter("$text", &output)); FormatterPtr keywordFormatter = FormatterPtr(new TextStyleFormatter( "<K>$text</K>", &output)); FormatterPtr commentFormatter = FormatterPtr(new TextStyleFormatter( "<C>$text</C>", &output)); FormatterPtr contextFormatter = FormatterPtr(new TextStyleFormatter( "<CC>$text</CC>", &output)); FormatterManager formatterManager(normalFormatter); formatterManager.addFormatter("keyword", keywordFormatter); formatterManager.addFormatter("comment", commentFormatter); HighlightStatePtr highlightState = HighlightStatePtr(new HighlightState); SourceHighlighter sourceHighlighter(highlightState); sourceHighlighter.setFormatterManager(&formatterManager); SourceFileHighlighter highlighter("test", &sourceHighlighter, &output); // now the state has no rules, so we should see only "normal" formatting highlighter.highlight("this is a normal\nstring"); cout << "HIGHLIGHTED: " << os.str() << endl; assertEquals("this is a normal\nstring", os.str()); // now we add some rules os.str(""); WordList keywords; keywords.push_back("class"); keywords.push_back("public"); highlightState->addRule(HighlightRulePtr(factory.createWordListRule( "keyword", keywords))); highlighter.highlight( "this is a public class and\nhere's another class\nend"); cout << "HIGHLIGHTED: " << os.str() << endl; assertEquals( "this is a <K>public</K> <K>class</K> and\nhere's another <K>class</K>\nend", os.str()); // test comments (environments) os.str(""); HighlightRulePtr multiLineCommentRule = HighlightRulePtr( factory.createMultiLineRule("comment", "/\\*", "\\*/", "", false)); HighlightStatePtr multiLineCommentState = multiLineCommentRule->getNextState(); assertTrue(multiLineCommentState.get()); highlightState->addRule(multiLineCommentRule); // now we set its default element (to comment) multiLineCommentState->setDefaultElement("comment"); highlighter.highlight( "this is /* a comment\nthat spans\nmore lines\n*/\na public class and\nhere's another class\nend"); cout << "HIGHLIGHTED: " << os.str() << endl; assertEquals( "this is <C>/*</C><C> a comment</C>\n\ <C>that spans</C>\n\ <C>more lines</C>\n\ <C>*/</C>\n\ a <K>public</K> <K>class</K> and\n\ here's another <K>class</K>\n\ end", os.str()); // test optimizations (buffer adiacent elements) os.str(""); sourceHighlighter.setOptimize(true); highlighter.highlight( "this is /* a comment\nthat spans\nmore lines\n*/ a public class end"); cout << "HIGHLIGHTED: " << os.str() << endl; assertEquals( "this is <C>/* a comment</C>\n\ <C>that spans</C>\n\ <C>more lines</C>\n\ <C>*/</C> a <K>public</K> <K>class</K> end", os.str()); // test char translator for newlines os.str(""); CharTranslator charTranslator; charTranslator.set_translation("\n", "<NL>\n"); highlighter.setPreformatter(&charTranslator); highlighter.highlight( "this is /* a comment\nthat spans\nmore lines\n*/ a public class end"); cout << "HIGHLIGHTED: " << os.str() << endl; assertEquals( "this is <C>/* a comment</C><NL>\n\ <C>that spans</C><NL>\n\ <C>more lines</C><NL>\n\ <C>*/</C> a <K>public</K> <K>class</K> end", os.str()); // test for line number generation os.str(""); TextStyle lineStyle("<LINE>$text</LINE>"); LineNumGenerator lineNumGen(lineStyle, 5); highlighter.setLineNumGenerator(&lineNumGen); highlighter.highlight("this is /* a comment\nthat spans more lines\n*/ end"); cout << "HIGHLIGHTED: " << os.str() << endl; assertEquals( "<LINE>00001:</LINE> this is <C>/* a comment</C><NL>\n\ <LINE>00002:</LINE> <C>that spans more lines</C><NL>\n\ <LINE>00003:</LINE> <C>*/</C> end", os.str()); // test for line prefix os.str(""); highlighter.setLinePrefix(" PREFIX "); highlighter.highlight("this is /* a comment\nthat spans more lines\n*/ end"); cout << "HIGHLIGHTED: " << os.str() << endl; assertEquals( " PREFIX <LINE>00001:</LINE> this is <C>/* a comment</C><NL>\n\ PREFIX <LINE>00002:</LINE> <C>that spans more lines</C><NL>\n\ PREFIX <LINE>00003:</LINE> <C>*/</C> end", os.str()); // test for line ranges os.str(""); LineRanges lineRanges; lineRanges.addRange("2-3"); highlighter.setLineRanges(&lineRanges); highlighter.highlight( "this is /* a comment\nthat spans more lines\n*/ end\nend2"); cout << "HIGHLIGHTED: " << os.str() << endl; // only line 2 and 3 must be output assertEquals( " PREFIX <LINE>00002:</LINE> <C>that spans more lines</C><NL>\n\ PREFIX <LINE>00003:</LINE> <C>*/</C> end<NL>\n", os.str()); // do it again to check that lineRanges was correctly reset os.str(""); highlighter.highlight( "this is /* a comment\nthat spans more lines\n*/ end\nend2\nend3\nend4"); cout << "HIGHLIGHTED: " << os.str() << endl; // only line 2 and 3 must be output assertEquals( " PREFIX <LINE>00002:</LINE> <C>that spans more lines</C><NL>\n\ PREFIX <LINE>00003:</LINE> <C>*/</C> end<NL>\n", os.str()); // do it again to check context lines os.str(""); highlighter.setContextFormatter(contextFormatter.get()); lineRanges.setContextLines(2); highlighter.highlight( "this is /* a comment\nthat spans more lines\n*/ end\nend2\nend3\nend4\nend5"); cout << "HIGHLIGHTED: " << os.str() << endl; // only line 2 and 3 must be output, but line 1 and line 4 and 5 are printed as context assertEquals( " PREFIX <LINE>00001:</LINE> <CC>this is /* a comment</CC><NL>\n\ PREFIX <LINE>00002:</LINE> <C>that spans more lines</C><NL>\n\ PREFIX <LINE>00003:</LINE> <C>*/</C> end<NL>\n\ PREFIX <LINE>00004:</LINE> <CC>end2</CC><NL>\n\ PREFIX <LINE>00005:</LINE> <CC>end3</CC><NL>\n", os.str()); // do it again to check range separators os.str(""); highlighter.setContextFormatter(contextFormatter.get()); highlighter.setRangeSeparator("..."); lineRanges.addRange("7-8"); lineRanges.setContextLines(1); highlighter.highlight( "this is /* a comment\nthat spans more lines\n*/ end\nend2\nend3\nend4\nend5\nend6\nend7\nend8\nend9"); cout << "HIGHLIGHTED: " << os.str() << endl; // only line 2 and 3 must be output, but line 1 and line 4 is printed as context // then lines 7 and 8 // and also the separator is printed assertEquals( " PREFIX <LINE>00001:</LINE> <CC>this is /* a comment</CC><NL>\n\ PREFIX <LINE>00002:</LINE> <C>that spans more lines</C><NL>\n\ PREFIX <LINE>00003:</LINE> <C>*/</C> end<NL>\n\ PREFIX <LINE>00004:</LINE> <CC>end2</CC><NL>\n\ PREFIX ...<NL>\n\ PREFIX <LINE>00006:</LINE> <CC>end4</CC><NL>\n\ PREFIX <LINE>00007:</LINE> end5<NL>\n\ PREFIX <LINE>00008:</LINE> end6<NL>\n\ PREFIX <LINE>00009:</LINE> <CC>end7</CC><NL>\n\ PREFIX ...<NL>\n", os.str()); // now test the regex ranges RegexRanges regexRanges; highlighter.setLineRanges(0); highlighter.setRangeSeparator(""); highlighter.setRegexRanges(&regexRanges); regexRanges.addRegexRange("/// [[:alpha:]]+"); regexRanges.addRegexRange("/// [[:digit:]]+"); os.str(""); highlighter.highlight( "this is /* a comment\nthat spans more lines\n*/ /// range end\nin range\nin range2\nend4 /// range\nend5\n/// 25\nend7\nend8\nend9\n/// 28\nend10"); cout << "HIGHLIGHTED: " << os.str() << endl; assertEquals( " PREFIX <NL>\n\ PREFIX <LINE>00004:</LINE> in range<NL>\n\ PREFIX <LINE>00005:</LINE> in range2<NL>\n\ PREFIX <LINE>00009:</LINE> end7<NL>\n\ PREFIX <LINE>00010:</LINE> end8<NL>\n\ PREFIX <LINE>00011:</LINE> end9<NL>\n", os.str()); cout << "test_sourcefilehighlighter: SUCCESS" << endl; return 0; } ������������������������������������������source-highlight-3.1.6/lib/tests/test_sourcehighlight_main.cpp��������������������������������������0000644�0001750�0001750�00000011310�11672675564�021575� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#include <iostream> #include "srchilite/sourcehighlight.h" #include "srchilite/textstyleformatter.h" #include <sstream> #include "asserttestexit.h" #include "srchilite/ioexception.h" #include "srchilite/docgenerator.h" #include "srchilite/parserexception.h" using namespace std; using namespace srchilite; /* static void showFormatters(const TextStyleFormatterCollection &collection); void showFormatters(const TextStyleFormatterCollection &collection) { for (TextStyleFormatterCollection::const_iterator it = collection.begin(); it != collection.end(); ++it) { cout << (*it)->toString() << endl; } } */ int main() { istringstream input; ostringstream output; SourceHighlight sourcehighlight("html.outlang"); sourcehighlight.setDataDir(BASEDIR); string commentString = "this /* is a comment\nspanning more line */ end"; input.str(commentString); sourcehighlight.highlight(input, output, "c_comment.lang"); // save start and end of the generated documents for testing ostringstream docGeneratorBuffer; sourcehighlight.getNoDocGenerator()->generate_start_doc(&docGeneratorBuffer); const string startDoc = docGeneratorBuffer.str(); docGeneratorBuffer.str(""); sourcehighlight.getNoDocGenerator()->generate_end_doc(&docGeneratorBuffer); const string endDoc = docGeneratorBuffer.str(); // showFormatters(sourcehighlight.getFormatterCollection()); cout << "formatted: " << output.str() << endl; assertEquals( startDoc + "this <i><font color=\"#9A1900\">/* is a comment</font></i>\n\ <i><font color=\"#9A1900\">spanning more line */</font></i> end" + endDoc, output.str()); istringstream input2("this /* is a comment\nspanning more line */ end"); output.str(""); // tests for line numbers sourcehighlight.setGenerateLineNumbers(); sourcehighlight.highlight(input2, output, "c_comment.lang"); cout << "formatted: " << output.str() << endl; assertEquals( startDoc + "<font color=\"#000000\">00001:</font> this <i><font color=\"#9A1900\">/* is a comment</font></i>\n\ <font color=\"#000000\">00002:</font> <i><font color=\"#9A1900\">spanning more line */</font></i> end" + endDoc, output.str()); // tests for line numbers with explicit number of digits sourcehighlight.setLineNumberDigits(2); output.str(""); istringstream input_ndigits2("this /* is a comment\nspanning more line */ end"); sourcehighlight.highlight(input_ndigits2, output, "c_comment.lang"); cout << "formatted: " << output.str() << endl; assertEquals( startDoc + "<font color=\"#000000\">01:</font> this <i><font color=\"#9A1900\">/* is a comment</font></i>\n\ <font color=\"#000000\">02:</font> <i><font color=\"#9A1900\">spanning more line */</font></i> end" + endDoc, output.str()); sourcehighlight.setGenerateLineNumbers(false); // test HTML char translation istringstream input3("this < > & html chars"); output.str(""); sourcehighlight.highlight(input3, output, "c_comment.lang"); cout << "formatted: " << output.str() << endl; assertEquals(startDoc + "this &lt; &gt; &amp; html chars" + endDoc, output.str()); // test tab translation translation istringstream input4("these\t\tare\ttabs\tchars"); output.str(""); SourceHighlight sourcehighlightTabs("html.outlang"); sourcehighlightTabs.setDataDir(BASEDIR); sourcehighlightTabs.setTabSpaces(3); sourcehighlightTabs.highlight(input4, output, "c_comment.lang"); cout << "formatted: " << output.str() << endl; assertEquals(startDoc + "these are tabs chars" + endDoc, output.str()); sourcehighlight.setGenerateLineNumbers(); // try with files sourcehighlight.highlight(BASEDIR "../doc/Hello.java", "Hello.java.html", "java.lang"); // try with non existent input file try { sourcehighlight.highlight("FOO.java", "Hello.java.html", "java.lang"); assertTrue(false); // must not get here } catch (IOException &e) { cout << "expected exception: " << e << endl; assertEquals("FOO.java: cannot open input file FOO.java.", e.filename + ": " + e.what() + "."); } // try with entire doc sourcehighlight.setGenerateEntireDoc(); sourcehighlight.highlight(BASEDIR "../doc/Hello.java", "HelloDoc.java.html", "java.lang"); // test with html tables SourceHighlight sourcehighlightTable("htmltable.outlang"); sourcehighlightTable.setDataDir(BASEDIR); sourcehighlightTable.highlight(BASEDIR "../doc/Hello.java", "HelloTable.java.html", "java.lang"); cout << "test_sourcehighlight: SUCCESS" << endl; return 0; } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/tests/test_textgenerator_main.cpp����������������������������������������0000644�0001750�0001750�00000005503�11672675564�021307� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#include <iostream> #include "srchilite/textstyleformatter.h" #include "srchilite/textstylebuilder.h" #include "srchilite/doctemplate.h" #include "asserttestexit.h" using namespace std; using namespace srchilite; int main() { TextStyle bold("<b>$text</b>"); TextStyle italics("<i>$text</i>"); TextStyle keyword = bold; string orig = "fookeyword"; string expected = "<b>" + orig + "</b>"; string transformed = keyword.output(orig); cout << "orig: " << orig << endl; cout << "transformed: " << transformed << endl; assertEquals(expected, transformed); TextStyle keyword2 = bold.compose(italics); expected = "<b><i>" + orig + "</i></b>"; transformed = keyword2.output(orig); cout << "orig: " << orig << endl; cout << "transformed: " << transformed << endl; assertEquals(expected, transformed); TextStyleBuilder textStyleBuilder; textStyleBuilder.start(); textStyleBuilder.add(bold); textStyleBuilder.add(italics); TextStyle keywordGenerator3 = textStyleBuilder.end(); expected = "<b><i>" + orig + "</i></b>"; transformed = keywordGenerator3.output(orig); cout << "orig: " << orig << endl; cout << "transformed: " << transformed << endl; assertEquals(expected, transformed); TextStyleBuilder textStyleBuilder2("start{" STYLE_VAR_TEXT TEXT_VAR_TEXT "}", ";"); textStyleBuilder2.start(); textStyleBuilder2.add(TextStyle("bold" STYLE_VAR_TEXT)); textStyleBuilder2.add(TextStyle("italics " STYLE_VAR_TEXT)); TextStyle keywordGenerator4 = textStyleBuilder2.end(); expected = "start{bold;italics " + orig + "}"; transformed = keywordGenerator4.output(orig); cout << "orig: " << orig << endl; cout << "transformed: " << transformed << endl; assertEquals(expected, transformed); string start = "$headerthe title: $title\nthe css url: $css\nand some additional text: $additional"; string end = "$footer"; string expected_start = "HEADER\nthe title: TITLE\nthe css url: CSS\nand some additional text: ADDITIONAL"; string expected_end = "\nFOOTER"; DocTemplate docTemplate(start, end); string transformed_start = docTemplate.output_begin("TITLE", "CSS", "ADDITIONAL", "HEADER\n", "\nFOOTER", "", "INPUTLANG"); string transformed_end = docTemplate.output_end("TITLE", "CSS", "ADDITIONAL", "HEADER\n", "\nFOOTER", "", "INPUTLANG"); cout << "orig start : " << start << endl; cout << "transformed: " << transformed_start << endl; assertEquals(expected_start, transformed_start); cout << "orig end : " << end << endl; cout << "transformed: " << transformed_end << endl; assertEquals(expected_end, transformed_end); cout << "test_textgenerator: SUCCESS!" << endl; return 0; } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/tests/test_sourcehighlight_errors_main.cpp�������������������������������0000644�0001750�0001750�00000006314�11672675564�023201� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#include <iostream> #include "srchilite/sourcehighlight.h" #include "srchilite/textstyleformatter.h" #include <sstream> #include "asserttestexit.h" #include "srchilite/ioexception.h" #include "srchilite/docgenerator.h" #include "srchilite/parserexception.h" using namespace std; using namespace srchilite; /* static void showFormatters(const TextStyleFormatterCollection &collection); void showFormatters(const TextStyleFormatterCollection &collection) { for (TextStyleFormatterCollection::const_iterator it = collection.begin(); it != collection.end(); ++it) { cout << (*it)->toString() << endl; } } */ int main() { istringstream input; ostringstream output; SourceHighlight sourcehighlight("html.outlang"); sourcehighlight.setDataDir(BASEDIR); // test with error in the lang file try { sourcehighlight.highlight(BASEDIR "../doc/Hello.java", "Hello.java.html", TESTSDIR "wrong_var.lang"); assertTrue(false); // must not get here } catch (ParserException &e) { //cout << "expected exception: " << e << endl; assertEqualsException(BASEDIR "/" TESTSDIR "wrong_var.lang:3: undefined variable UNDEFINED", e); } try { sourcehighlight.highlight(BASEDIR "../doc/Hello.java", "Hello.java.html", TESTSDIR "wrong_syntax_simple.lang"); assertTrue(false); // must not get here } catch (ParserException &e) { // cout << "expected exception: " << e << endl; assertEqualsException(BASEDIR "/" TESTSDIR "wrong_syntax_simple.lang:1: syntax error", e); } try { sourcehighlight.highlight(BASEDIR "../doc/Hello.java", "Hello.java.html", TESTSDIR "wrong_syntax.lang"); assertTrue(false); // must not get here } catch (ParserException &e) { // cout << "expected exception: " << e << endl; assertEqualsException(BASEDIR "/" TESTSDIR "wrong_syntax.lang:2: syntax error", e); } try { sourcehighlight.highlight(BASEDIR "../doc/Hello.java", "Hello.java.html", TESTSDIR "wrong_syntax_include.lang"); assertTrue(false); // must not get here } catch (ParserException &e) { //cout << "expected exception: " << e << endl; // the error is in an included file assertEqualsException(TESTSDIR "/wrong_syntax.lang:2: syntax error", e); } try { sourcehighlight.highlight(BASEDIR "../doc/Hello.java", "Hello.java.html", TESTSDIR "wrong_backref.lang"); assertTrue(false); // must not get here } catch (ParserException &e) { //cout << "expected exception: " << e << endl; // the error is in an included file assertEqualsException(BASEDIR "/" TESTSDIR "wrong_backref.lang:2: backreferences are allowed only inside ` `", e); } try { sourcehighlight.highlight(BASEDIR "../doc/Hello.java", "Hello.java.html", TESTSDIR "wrong_backref2.lang"); assertTrue(false); // must not get here } catch (ParserException &e) { //cout << "expected exception: " << e << endl; // the error is in an included file assertEqualsException(BASEDIR "/" TESTSDIR "wrong_backref2.lang:2: backreferences are allowed only inside ` `", e); } cout << "test_sourcehighlight_errors: SUCCESS" << endl; return 0; } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/tests/asserttestexit.h���������������������������������������������������0000644�0001750�0001750�00000004322�11672675564�017107� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/** * C++ functions: asserttestexit.h * * Description: assert functions used for tests * * Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2005-2008 * Copyright: See COPYING file that comes with this distribution */ #ifndef _ASSERTTESTEXIT_H_ #define _ASSERTTESTEXIT_H_ #include <string> #include <iostream> #include <stdlib.h> #include <exception> #include <sstream> static std::exception std_exception; /** * returns the string representing a standard exception (which * can be different from system to system) */ const std::string stdExceptionToString() { return std_exception.what(); } const std::string stdCausedBy() { return "Caused by: " + stdExceptionToString(); } template <typename T> void assertEquals(T expected, T actual) { if (expected != actual) { std::cerr << "assertEquals failed" << std::endl; std::cerr << "expected: " << expected << std::endl; std::cerr << "actual : " << actual << std::endl; exit(EXIT_FAILURE); } } template <typename T2> void assertEqualsException(const std::string &expected, T2 actual) { std::ostringstream o; o << actual; assertEquals(expected, o.str()); } void assertEquals(const std::string &expected, const std::string &actual) { if (expected != actual) { std::cerr << "assertEquals failed" << std::endl; std::cerr << "expected: " << expected << std::endl; std::cerr << "actual : " << actual << std::endl; exit(EXIT_FAILURE); } } void assertTrue(bool actual, const std::string &expl = "") { if (!actual) { std::cerr << "assertion failed! " << expl << std::endl; exit(EXIT_FAILURE); } } void assertFalse(bool actual, const std::string &expl = "") { if (actual) { std::cerr << "assertion failed! " << expl << std::endl; exit(EXIT_FAILURE); } } template <typename T1, typename T2> void assertEqualsCollections(const T1 &expected, const T2 &actual) { assertEquals(expected.size(), actual.size()); typename T1::const_iterator it1 = expected.begin(); typename T2::const_iterator it2 = actual.begin(); for (; it1 != expected.end(); ++it1, ++it2) assertEquals(*it1, *it2); } #endif /*_ASSERTTESTEXIT_H_*/ ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/tests/outlangtest.outlang������������������������������������������������0000644�0001750�0001750�00000001200�11672675564�017577� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������styletemplate "\x1b[$stylem$text\x1b[" styleseparator ";" bold "\textbf{$text}" italics "<i>$text</i>" underline "<u>$text</u>" color "<font color=\"$style\">$text</font>" onestyle "<span class=\"$style\">$text</span>" colormap "green" "#33CC00" "red" "#FF0000" default "#000000" end translations "&" "&amp;" "<" "&lt;" ">" "&gt;" end doctemplate "this is the start of my doc and this is a line with a backslash \text and this contains a { this is the title: $title this is the css url: $css this is the header: $header and this is some additional stuff: $additional" "this is the end of my doc this is simply the footer: $footer" end������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/tests/test_style_errors_main.cpp�����������������������������������������0000644�0001750�0001750�00000006060�11672675564�021147� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#include <iostream> #include "srchilite/sourcehighlight.h" #include "srchilite/textstyleformatter.h" #include <sstream> #include "asserttestexit.h" #include "srchilite/ioexception.h" #include "srchilite/docgenerator.h" #include "srchilite/parserexception.h" using namespace std; using namespace srchilite; int main() { istringstream input; ostringstream output; // test with error with an empty file name style file try { SourceHighlight sourcehighlight("html.outlang"); sourcehighlight.setDataDir(BASEDIR); sourcehighlight.setStyleFile(""); sourcehighlight.highlight(BASEDIR "../doc/Hello.java", "Hello.java.html", TESTSDIR "wrong_var.lang"); assertTrue(false); // must not get here } catch (IOException &e) { //cout << "expected exception: " << e << endl; assertEqualsException("empty file name.", e); } // test with error in the style file try { SourceHighlight sourcehighlight("html.outlang"); sourcehighlight.setDataDir(BASEDIR); sourcehighlight.setStyleFile("nonexistent.style"); sourcehighlight.highlight(BASEDIR "../doc/Hello.java", "Hello.java.html", TESTSDIR "wrong_var.lang"); assertTrue(false); // must not get here } catch (IOException &e) { //cout << "expected exception: " << e << endl; assertEqualsException("cannot open " BASEDIR "/nonexistent.style.", e); } try { SourceHighlight sourcehighlight("html.outlang"); sourcehighlight.setDataDir(BASEDIR); sourcehighlight.setStyleFile(TESTSDIR "/wrong_already_defined.style"); sourcehighlight.highlight(BASEDIR "../doc/Hello.java", "Hello.java.html", TESTSDIR "wrong_var.lang"); assertTrue(false); // must not get here } catch (ParserException &e) { //cout << "expected exception: " << es.str() << endl; assertEqualsException(TESTSDIR "/wrong_already_defined.style:3: already defined date", e); } try { SourceHighlight sourcehighlight("html.outlang"); sourcehighlight.setDataDir(BASEDIR); sourcehighlight.setStyleCssFile("nonexistent.style"); sourcehighlight.highlight(BASEDIR "../doc/Hello.java", "Hello.java.html", TESTSDIR "wrong_var.lang"); assertTrue(false); // must not get here } catch (IOException &e) { //cout << "expected exception: " << e << endl; assertEqualsException("cannot open " BASEDIR "/nonexistent.style.", e); } try { SourceHighlight sourcehighlight("html.outlang"); sourcehighlight.setDataDir(BASEDIR); sourcehighlight.setStyleCssFile(TESTSDIR "/wrong_already_defined_css.css"); sourcehighlight.highlight(BASEDIR "../doc/Hello.java", "Hello.java.html", TESTSDIR "wrong_var.lang"); assertTrue(false); // must not get here } catch (ParserException &e) { //cout << "expected exception: " << es.str() << endl; assertEqualsException(TESTSDIR "/wrong_already_defined_css.css:5: already defined keyword", e); } cout << "test_style_errors: SUCCESS" << endl; return 0; } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/tests/test.map�����������������������������������������������������������0000644�0001750�0001750�00000000227�11672675564�015321� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# simple map file for testing C = cpp.lang c = c.lang changelog = changelog.lang makefile = makefile.lang Makefile = Makefile.lang am = makefile.lang �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/tests/test_ctagscollector_main.cpp���������������������������������������0000644�0001750�0001750�00000007060�11672675564�021424� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#include <iostream> #include "asserttestexit.h" #include "srchilite/ctagscollector.h" #include "srchilite/fileutil.h" #include "srchilite/formatterparams.h" #include "srchilite/tostringcollection.h" using namespace std; using namespace srchilite; static void printCTagsInfo(const CTagsInfos &infos); static void expectAnchor(const CTagsInfos &infos, const string &filename, const string &line); static void expectReference(const CTagsInfos &infos, const string &filename, const string &line, RefPosition refpos); namespace srchilite { static ostream &operator <<(ostream &os, const CTagsInfo &); ostream &operator <<(ostream &os, const srchilite::CTagsInfo &info) { os << (info.isAnchor ? "ANCHOR: " : "REF: ") << ", filename: " << strip_file_path(info.fileName) << ", line: " << info.lineNumber << ", refposition: " << info.refposition; return os; } } void printCTagsInfo(const srchilite::CTagsInfos &infos) { cout << "tags infos: " << collectionToString(&infos, '\n') << endl; } void expectAnchor(const CTagsInfos &infos, const string &filename, const string &line) { // only one element for anchors assertTrue(infos.size() == 1); CTagsInfo info = infos.front(); assertTrue(info.isAnchor); assertEquals(filename, info.fileName); assertEquals(line, info.lineNumber); assertEquals(NONE, info.refposition); } void expectReference(const CTagsInfos &infos, const string &filename, const string &line, RefPosition refpos) { assertTrue(infos.size() > 0); for (CTagsInfos::const_iterator it = infos.begin(); it != infos.end(); ++it) { CTagsInfo info = *it; if (info.fileName == filename && info.lineNumber == line) { assertFalse(info.isAnchor); assertEquals(refpos, info.refposition); return; } } cout << "reference not found" << endl; // if we're here we didn't find it, then fail assertTrue(false); } int main() { CTagsCollector collectorInline("mytags", INLINE); CTagsInfos infos; string sourceFile = BASEDIR; sourceFile += "readtags.h"; // test tags found in file readtags.h FormatterParams fileInfo(sourceFile); fileInfo.filename = sourceFile; fileInfo.line = 1; infos.clear(); collectorInline.collectTags("READTAGS_H", infos, &fileInfo); printCTagsInfo(infos); // this should be a reference inline expectReference(infos, sourceFile, "22", INLINE); infos.clear(); fileInfo.line = 22; // this must be detected as an anchor, since the line number is the same collectorInline.collectTags("READTAGS_H", infos, &fileInfo); printCTagsInfo(infos); expectAnchor(infos, sourceFile, "22"); infos.clear(); collectorInline.collectTags("file", infos, &fileInfo); printCTagsInfo(infos); // there should be two references expectReference(infos, sourceFile, "72", POSTLINE); expectReference(infos, sourceFile, "112", POSTLINE); infos.clear(); collectorInline.setRefPosition(POSTDOC); fileInfo.line = 1; collectorInline.collectTags("READTAGS_H", infos, &fileInfo); printCTagsInfo(infos); // this should be a reference postdoc expectReference(infos, sourceFile, "22", POSTDOC); infos.clear(); collectorInline.setRefPosition(POSTLINE); collectorInline.collectTags("READTAGS_H", infos, &fileInfo); printCTagsInfo(infos); // this should be a reference postline even if single expectReference(infos, sourceFile, "22", POSTLINE); cout << "test_ctagscollector: SUCCESS!" << endl; return 0; } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/tests/Makefile.in��������������������������������������������������������0000664�0001750�0001750�00000317270�11675044677�015721� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Copyright (C) 1999-2008 Lorenzo Bettini <http://www.lorenzobettini.it> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @NO_CTAGS_FALSE@am__append_1 = test_ctagscollector test_ctagsformatter test_ctagsmanager \ @NO_CTAGS_FALSE@ test_formatreferences TESTS = $(am__EXEEXT_2) test_sourcehighlight_errors$(EXEEXT) check_PROGRAMS = $(am__EXEEXT_3) subdir = lib/tests DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/valgrind_test.sh.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/gl/m4/00gnulib.m4 \ $(top_srcdir)/gl/m4/ac_prog_doxygen.m4 \ $(top_srcdir)/gl/m4/dirent_h.m4 $(top_srcdir)/gl/m4/dirname.m4 \ $(top_srcdir)/gl/m4/double-slash-root.m4 \ $(top_srcdir)/gl/m4/extensions.m4 \ $(top_srcdir)/gl/m4/getopt.m4 \ $(top_srcdir)/gl/m4/gnulib-common.m4 \ $(top_srcdir)/gl/m4/gnulib-comp.m4 \ $(top_srcdir)/gl/m4/include_next.m4 \ $(top_srcdir)/gl/m4/malloc.m4 $(top_srcdir)/gl/m4/memset.m4 \ $(top_srcdir)/gl/m4/mkdir.m4 $(top_srcdir)/gl/m4/nocrash.m4 \ $(top_srcdir)/gl/m4/ssize_t.m4 $(top_srcdir)/gl/m4/stdbool.m4 \ $(top_srcdir)/gl/m4/stddef_h.m4 \ $(top_srcdir)/gl/m4/stdlib_h.m4 $(top_srcdir)/gl/m4/strdup.m4 \ $(top_srcdir)/gl/m4/string_h.m4 \ $(top_srcdir)/gl/m4/sys_stat_h.m4 \ $(top_srcdir)/gl/m4/time_h.m4 $(top_srcdir)/gl/m4/unistd_h.m4 \ $(top_srcdir)/gl/m4/warn-on-use.m4 \ $(top_srcdir)/gl/m4/wchar_t.m4 \ $(top_srcdir)/m4/ax_boost_base.m4 \ $(top_srcdir)/m4/ax_boost_regex.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = valgrind_test.sh CONFIG_CLEAN_VPATH_FILES = @NO_CTAGS_FALSE@am__EXEEXT_1 = test_ctagscollector$(EXEEXT) \ @NO_CTAGS_FALSE@ test_ctagsformatter$(EXEEXT) \ @NO_CTAGS_FALSE@ test_ctagsmanager$(EXEEXT) \ @NO_CTAGS_FALSE@ test_formatreferences$(EXEEXT) am__EXEEXT_2 = test_regexrules$(EXEEXT) \ test_formatter_manager$(EXEEXT) test_highlighter$(EXEEXT) \ test_exception$(EXEEXT) test_highlightbuilder$(EXEEXT) \ test_buffered_output$(EXEEXT) test_textstyle$(EXEEXT) \ test_textgenerator$(EXEEXT) test_textstyleformatter$(EXEEXT) \ test_wordtokenizer$(EXEEXT) test_linenum$(EXEEXT) \ test_sourcefilehighlighter$(EXEEXT) \ test_textstyleformatterfactory$(EXEEXT) \ test_langdefmanager$(EXEEXT) test_sourcehighlight$(EXEEXT) \ test_sourcehighlight_errors$(EXEEXT) test_langinfer$(EXEEXT) \ test_untabifier$(EXEEXT) test_outlangparser$(EXEEXT) \ test_outlang_errors$(EXEEXT) test_events$(EXEEXT) \ test_debuglistener$(EXEEXT) test_regexpreprocessor$(EXEEXT) \ test_filenotfound$(EXEEXT) test_style_errors$(EXEEXT) \ test_lineranges$(EXEEXT) test_regexranges$(EXEEXT) \ test_settings$(EXEEXT) test_langmap$(EXEEXT) \ test_utils$(EXEEXT) test_instances$(EXEEXT) $(am__EXEEXT_1) am__EXEEXT_3 = $(am__EXEEXT_2) test_sourcehighlight_errors$(EXEEXT) am_test_buffered_output_OBJECTS = test_buffered_output_main.$(OBJEXT) test_buffered_output_OBJECTS = $(am_test_buffered_output_OBJECTS) test_buffered_output_LDADD = $(LDADD) am__DEPENDENCIES_1 = test_buffered_output_DEPENDENCIES = $(top_builddir)/gl/libgnu.la \ $(LIBDIR)/libsource-highlight.la $(am__DEPENDENCIES_1) am_test_ctagscollector_OBJECTS = \ test_ctagscollector-test_ctagscollector_main.$(OBJEXT) test_ctagscollector_OBJECTS = $(am_test_ctagscollector_OBJECTS) test_ctagscollector_LDADD = $(LDADD) test_ctagscollector_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(test_ctagscollector_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ am_test_ctagsformatter_OBJECTS = \ test_ctagsformatter-test_ctagsformatter_main.$(OBJEXT) test_ctagsformatter_OBJECTS = $(am_test_ctagsformatter_OBJECTS) test_ctagsformatter_LDADD = $(LDADD) test_ctagsformatter_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(test_ctagsformatter_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ am_test_ctagsmanager_OBJECTS = \ test_ctagsmanager-test_ctagsmanager_main.$(OBJEXT) test_ctagsmanager_OBJECTS = $(am_test_ctagsmanager_OBJECTS) test_ctagsmanager_LDADD = $(LDADD) test_ctagsmanager_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(test_ctagsmanager_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ am_test_debuglistener_OBJECTS = test_debuglistener_main.$(OBJEXT) test_debuglistener_OBJECTS = $(am_test_debuglistener_OBJECTS) test_debuglistener_LDADD = $(LDADD) test_debuglistener_DEPENDENCIES = $(top_builddir)/gl/libgnu.la \ $(LIBDIR)/libsource-highlight.la $(am__DEPENDENCIES_1) am_test_events_OBJECTS = test_events_main.$(OBJEXT) test_events_OBJECTS = $(am_test_events_OBJECTS) test_events_LDADD = $(LDADD) test_events_DEPENDENCIES = $(top_builddir)/gl/libgnu.la \ $(LIBDIR)/libsource-highlight.la $(am__DEPENDENCIES_1) am_test_exception_OBJECTS = test_exception_main.$(OBJEXT) test_exception_OBJECTS = $(am_test_exception_OBJECTS) test_exception_LDADD = $(LDADD) test_exception_DEPENDENCIES = $(top_builddir)/gl/libgnu.la \ $(LIBDIR)/libsource-highlight.la $(am__DEPENDENCIES_1) am_test_filenotfound_OBJECTS = \ test_filenotfound-test_filenotfound_main.$(OBJEXT) test_filenotfound_OBJECTS = $(am_test_filenotfound_OBJECTS) test_filenotfound_LDADD = $(LDADD) test_filenotfound_DEPENDENCIES = $(top_builddir)/gl/libgnu.la \ $(LIBDIR)/libsource-highlight.la $(am__DEPENDENCIES_1) test_filenotfound_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(test_filenotfound_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ am_test_formatreferences_OBJECTS = \ test_formatreferences-logformatter.$(OBJEXT) \ test_formatreferences-test_formatreferences_main.$(OBJEXT) test_formatreferences_OBJECTS = $(am_test_formatreferences_OBJECTS) test_formatreferences_LDADD = $(LDADD) test_formatreferences_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(test_formatreferences_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ am_test_formatter_manager_OBJECTS = \ test_formatter_manager_main.$(OBJEXT) test_formatter_manager_OBJECTS = $(am_test_formatter_manager_OBJECTS) test_formatter_manager_LDADD = $(LDADD) test_formatter_manager_DEPENDENCIES = $(top_builddir)/gl/libgnu.la \ $(LIBDIR)/libsource-highlight.la $(am__DEPENDENCIES_1) am_test_highlightbuilder_OBJECTS = logformatter.$(OBJEXT) \ test_highlightbuilder_main.$(OBJEXT) test_highlightbuilder_OBJECTS = $(am_test_highlightbuilder_OBJECTS) test_highlightbuilder_LDADD = $(LDADD) test_highlightbuilder_DEPENDENCIES = $(top_builddir)/gl/libgnu.la \ $(LIBDIR)/libsource-highlight.la $(am__DEPENDENCIES_1) am_test_highlighter_OBJECTS = logformatter.$(OBJEXT) \ test_highlighter_main.$(OBJEXT) test_highlighter_OBJECTS = $(am_test_highlighter_OBJECTS) test_highlighter_LDADD = $(LDADD) test_highlighter_DEPENDENCIES = $(top_builddir)/gl/libgnu.la \ $(LIBDIR)/libsource-highlight.la $(am__DEPENDENCIES_1) am_test_instances_OBJECTS = \ test_instances-test_instances_main.$(OBJEXT) test_instances_OBJECTS = $(am_test_instances_OBJECTS) test_instances_LDADD = $(LDADD) test_instances_DEPENDENCIES = $(top_builddir)/gl/libgnu.la \ $(LIBDIR)/libsource-highlight.la $(am__DEPENDENCIES_1) test_instances_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(test_instances_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ am_test_langdefmanager_OBJECTS = \ test_langdefmanager-test_langdefmanager_main.$(OBJEXT) test_langdefmanager_OBJECTS = $(am_test_langdefmanager_OBJECTS) test_langdefmanager_LDADD = $(LDADD) test_langdefmanager_DEPENDENCIES = $(top_builddir)/gl/libgnu.la \ $(LIBDIR)/libsource-highlight.la $(am__DEPENDENCIES_1) test_langdefmanager_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(test_langdefmanager_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ am_test_langinfer_OBJECTS = test_langinfer_main.$(OBJEXT) test_langinfer_OBJECTS = $(am_test_langinfer_OBJECTS) test_langinfer_LDADD = $(LDADD) test_langinfer_DEPENDENCIES = $(top_builddir)/gl/libgnu.la \ $(LIBDIR)/libsource-highlight.la $(am__DEPENDENCIES_1) am_test_langmap_OBJECTS = test_langmap-test_langmap_main.$(OBJEXT) test_langmap_OBJECTS = $(am_test_langmap_OBJECTS) test_langmap_LDADD = $(LDADD) test_langmap_DEPENDENCIES = $(top_builddir)/gl/libgnu.la \ $(LIBDIR)/libsource-highlight.la $(am__DEPENDENCIES_1) test_langmap_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(test_langmap_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_test_linenum_OBJECTS = test_linenum_main.$(OBJEXT) test_linenum_OBJECTS = $(am_test_linenum_OBJECTS) test_linenum_LDADD = $(LDADD) test_linenum_DEPENDENCIES = $(top_builddir)/gl/libgnu.la \ $(LIBDIR)/libsource-highlight.la $(am__DEPENDENCIES_1) am_test_lineranges_OBJECTS = test_lineranges_main.$(OBJEXT) test_lineranges_OBJECTS = $(am_test_lineranges_OBJECTS) test_lineranges_LDADD = $(LDADD) test_lineranges_DEPENDENCIES = $(top_builddir)/gl/libgnu.la \ $(LIBDIR)/libsource-highlight.la $(am__DEPENDENCIES_1) am_test_outlang_errors_OBJECTS = \ test_outlang_errors-test_outlang_errors_main.$(OBJEXT) test_outlang_errors_OBJECTS = $(am_test_outlang_errors_OBJECTS) test_outlang_errors_LDADD = $(LDADD) test_outlang_errors_DEPENDENCIES = $(top_builddir)/gl/libgnu.la \ $(LIBDIR)/libsource-highlight.la $(am__DEPENDENCIES_1) test_outlang_errors_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(test_outlang_errors_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ am_test_outlangparser_OBJECTS = \ test_outlangparser-test_outlangparser_main.$(OBJEXT) test_outlangparser_OBJECTS = $(am_test_outlangparser_OBJECTS) test_outlangparser_LDADD = $(LDADD) test_outlangparser_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(test_outlangparser_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ am_test_regexpreprocessor_OBJECTS = \ test_regexpreprocessor_main.$(OBJEXT) test_regexpreprocessor_OBJECTS = $(am_test_regexpreprocessor_OBJECTS) test_regexpreprocessor_LDADD = $(LDADD) test_regexpreprocessor_DEPENDENCIES = $(top_builddir)/gl/libgnu.la \ $(LIBDIR)/libsource-highlight.la $(am__DEPENDENCIES_1) am_test_regexranges_OBJECTS = test_regexranges_main.$(OBJEXT) test_regexranges_OBJECTS = $(am_test_regexranges_OBJECTS) test_regexranges_LDADD = $(LDADD) test_regexranges_DEPENDENCIES = $(top_builddir)/gl/libgnu.la \ $(LIBDIR)/libsource-highlight.la $(am__DEPENDENCIES_1) am_test_regexrules_OBJECTS = test_regexrules_main.$(OBJEXT) test_regexrules_OBJECTS = $(am_test_regexrules_OBJECTS) test_regexrules_LDADD = $(LDADD) test_regexrules_DEPENDENCIES = $(top_builddir)/gl/libgnu.la \ $(LIBDIR)/libsource-highlight.la $(am__DEPENDENCIES_1) am_test_settings_OBJECTS = test_settings-test_settings_main.$(OBJEXT) test_settings_OBJECTS = $(am_test_settings_OBJECTS) test_settings_LDADD = $(LDADD) test_settings_DEPENDENCIES = $(top_builddir)/gl/libgnu.la \ $(LIBDIR)/libsource-highlight.la $(am__DEPENDENCIES_1) test_settings_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(test_settings_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_test_sourcefilehighlighter_OBJECTS = \ test_sourcefilehighlighter_main.$(OBJEXT) test_sourcefilehighlighter_OBJECTS = \ $(am_test_sourcefilehighlighter_OBJECTS) test_sourcefilehighlighter_LDADD = $(LDADD) test_sourcefilehighlighter_DEPENDENCIES = \ $(top_builddir)/gl/libgnu.la $(LIBDIR)/libsource-highlight.la \ $(am__DEPENDENCIES_1) am_test_sourcehighlight_OBJECTS = \ test_sourcehighlight-test_sourcehighlight_main.$(OBJEXT) test_sourcehighlight_OBJECTS = $(am_test_sourcehighlight_OBJECTS) test_sourcehighlight_LDADD = $(LDADD) test_sourcehighlight_DEPENDENCIES = $(top_builddir)/gl/libgnu.la \ $(LIBDIR)/libsource-highlight.la $(am__DEPENDENCIES_1) test_sourcehighlight_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(test_sourcehighlight_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ am_test_sourcehighlight_errors_OBJECTS = test_sourcehighlight_errors-test_sourcehighlight_errors_main.$(OBJEXT) test_sourcehighlight_errors_OBJECTS = \ $(am_test_sourcehighlight_errors_OBJECTS) test_sourcehighlight_errors_LDADD = $(LDADD) test_sourcehighlight_errors_DEPENDENCIES = \ $(top_builddir)/gl/libgnu.la $(LIBDIR)/libsource-highlight.la \ $(am__DEPENDENCIES_1) test_sourcehighlight_errors_LINK = $(LIBTOOL) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(test_sourcehighlight_errors_CXXFLAGS) $(CXXFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_test_style_errors_OBJECTS = \ test_style_errors-test_style_errors_main.$(OBJEXT) test_style_errors_OBJECTS = $(am_test_style_errors_OBJECTS) test_style_errors_LDADD = $(LDADD) test_style_errors_DEPENDENCIES = $(top_builddir)/gl/libgnu.la \ $(LIBDIR)/libsource-highlight.la $(am__DEPENDENCIES_1) test_style_errors_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(test_style_errors_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ am_test_textgenerator_OBJECTS = test_textgenerator_main.$(OBJEXT) test_textgenerator_OBJECTS = $(am_test_textgenerator_OBJECTS) test_textgenerator_LDADD = $(LDADD) test_textgenerator_DEPENDENCIES = $(top_builddir)/gl/libgnu.la \ $(LIBDIR)/libsource-highlight.la $(am__DEPENDENCIES_1) am_test_textstyle_OBJECTS = test_textstyle_main.$(OBJEXT) test_textstyle_OBJECTS = $(am_test_textstyle_OBJECTS) test_textstyle_LDADD = $(LDADD) test_textstyle_DEPENDENCIES = $(top_builddir)/gl/libgnu.la \ $(LIBDIR)/libsource-highlight.la $(am__DEPENDENCIES_1) am_test_textstyleformatter_OBJECTS = \ test_textstyleformatter_main.$(OBJEXT) test_textstyleformatter_OBJECTS = \ $(am_test_textstyleformatter_OBJECTS) test_textstyleformatter_LDADD = $(LDADD) test_textstyleformatter_DEPENDENCIES = $(top_builddir)/gl/libgnu.la \ $(LIBDIR)/libsource-highlight.la $(am__DEPENDENCIES_1) am_test_textstyleformatterfactory_OBJECTS = \ test_textstyleformatterfactory_main.$(OBJEXT) test_textstyleformatterfactory_OBJECTS = \ $(am_test_textstyleformatterfactory_OBJECTS) test_textstyleformatterfactory_LDADD = $(LDADD) test_textstyleformatterfactory_DEPENDENCIES = \ $(top_builddir)/gl/libgnu.la $(LIBDIR)/libsource-highlight.la \ $(am__DEPENDENCIES_1) am_test_untabifier_OBJECTS = test_untabifier_main.$(OBJEXT) test_untabifier_OBJECTS = $(am_test_untabifier_OBJECTS) test_untabifier_LDADD = $(LDADD) test_untabifier_DEPENDENCIES = $(top_builddir)/gl/libgnu.la \ $(LIBDIR)/libsource-highlight.la $(am__DEPENDENCIES_1) am_test_utils_OBJECTS = test_utils-test_utils_main.$(OBJEXT) test_utils_OBJECTS = $(am_test_utils_OBJECTS) test_utils_LDADD = $(LDADD) test_utils_DEPENDENCIES = $(top_builddir)/gl/libgnu.la \ $(LIBDIR)/libsource-highlight.la $(am__DEPENDENCIES_1) test_utils_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(test_utils_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_test_wordtokenizer_OBJECTS = test_wordtokenizer_main.$(OBJEXT) test_wordtokenizer_OBJECTS = $(am_test_wordtokenizer_OBJECTS) test_wordtokenizer_LDADD = $(LDADD) test_wordtokenizer_DEPENDENCIES = $(top_builddir)/gl/libgnu.la \ $(LIBDIR)/libsource-highlight.la $(am__DEPENDENCIES_1) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(test_buffered_output_SOURCES) \ $(test_ctagscollector_SOURCES) $(test_ctagsformatter_SOURCES) \ $(test_ctagsmanager_SOURCES) $(test_debuglistener_SOURCES) \ $(test_events_SOURCES) $(test_exception_SOURCES) \ $(test_filenotfound_SOURCES) $(test_formatreferences_SOURCES) \ $(test_formatter_manager_SOURCES) \ $(test_highlightbuilder_SOURCES) $(test_highlighter_SOURCES) \ $(test_instances_SOURCES) $(test_langdefmanager_SOURCES) \ $(test_langinfer_SOURCES) $(test_langmap_SOURCES) \ $(test_linenum_SOURCES) $(test_lineranges_SOURCES) \ $(test_outlang_errors_SOURCES) $(test_outlangparser_SOURCES) \ $(test_regexpreprocessor_SOURCES) $(test_regexranges_SOURCES) \ $(test_regexrules_SOURCES) $(test_settings_SOURCES) \ $(test_sourcefilehighlighter_SOURCES) \ $(test_sourcehighlight_SOURCES) \ $(test_sourcehighlight_errors_SOURCES) \ $(test_style_errors_SOURCES) $(test_textgenerator_SOURCES) \ $(test_textstyle_SOURCES) $(test_textstyleformatter_SOURCES) \ $(test_textstyleformatterfactory_SOURCES) \ $(test_untabifier_SOURCES) $(test_utils_SOURCES) \ $(test_wordtokenizer_SOURCES) DIST_SOURCES = $(test_buffered_output_SOURCES) \ $(test_ctagscollector_SOURCES) $(test_ctagsformatter_SOURCES) \ $(test_ctagsmanager_SOURCES) $(test_debuglistener_SOURCES) \ $(test_events_SOURCES) $(test_exception_SOURCES) \ $(test_filenotfound_SOURCES) $(test_formatreferences_SOURCES) \ $(test_formatter_manager_SOURCES) \ $(test_highlightbuilder_SOURCES) $(test_highlighter_SOURCES) \ $(test_instances_SOURCES) $(test_langdefmanager_SOURCES) \ $(test_langinfer_SOURCES) $(test_langmap_SOURCES) \ $(test_linenum_SOURCES) $(test_lineranges_SOURCES) \ $(test_outlang_errors_SOURCES) $(test_outlangparser_SOURCES) \ $(test_regexpreprocessor_SOURCES) $(test_regexranges_SOURCES) \ $(test_regexrules_SOURCES) $(test_settings_SOURCES) \ $(test_sourcefilehighlighter_SOURCES) \ $(test_sourcehighlight_SOURCES) \ $(test_sourcehighlight_errors_SOURCES) \ $(test_style_errors_SOURCES) $(test_textgenerator_SOURCES) \ $(test_textstyle_SOURCES) $(test_textstyleformatter_SOURCES) \ $(test_textstyleformatterfactory_SOURCES) \ $(test_untabifier_SOURCES) $(test_utils_SOURCES) \ $(test_wordtokenizer_SOURCES) HEADERS = $(noinst_HEADERS) ETAGS = etags am__tty_colors = \ red=; grn=; lgn=; blu=; std= DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ABSOLUTEDATADIR = @ABSOLUTEDATADIR@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ ARFLAGS = @ARFLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASH_COMPLETION_DIR = @BASH_COMPLETION_DIR@ BASH_SHELL = @BASH_SHELL@ BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ BOOST_LDFLAGS = @BOOST_LDFLAGS@ BOOST_REGEX_LIB = @BOOST_REGEX_LIB@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHROOT_INPUT_DIR = @CHROOT_INPUT_DIR@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOUBLECPP = @DOUBLECPP@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GENGETOPT = @GENGETOPT@ GETOPT_H = @GETOPT_H@ GNULIB_ALPHASORT = @GNULIB_ALPHASORT@ GNULIB_ATOLL = @GNULIB_ATOLL@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ GNULIB_CHDIR = @GNULIB_CHDIR@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@ GNULIB_DIRFD = @GNULIB_DIRFD@ GNULIB_DUP = @GNULIB_DUP@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ GNULIB_FDATASYNC = @GNULIB_FDATASYNC@ GNULIB_FDOPENDIR = @GNULIB_FDOPENDIR@ GNULIB_FFSL = @GNULIB_FFSL@ GNULIB_FFSLL = @GNULIB_FFSLL@ GNULIB_FSTAT = @GNULIB_FSTAT@ GNULIB_FSTATAT = @GNULIB_FSTATAT@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@ GNULIB_GRANTPT = @GNULIB_GRANTPT@ GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@ GNULIB_LCHMOD = @GNULIB_LCHMOD@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MBTOWC = @GNULIB_MBTOWC@ GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_MKDIRAT = @GNULIB_MKDIRAT@ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ GNULIB_MKFIFO = @GNULIB_MKFIFO@ GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@ GNULIB_MKNOD = @GNULIB_MKNOD@ GNULIB_MKNODAT = @GNULIB_MKNODAT@ GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_MKTIME = @GNULIB_MKTIME@ GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@ GNULIB_OPENDIR = @GNULIB_OPENDIR@ GNULIB_PIPE = @GNULIB_PIPE@ GNULIB_PIPE2 = @GNULIB_PIPE2@ GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PTSNAME = @GNULIB_PTSNAME@ GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PWRITE = @GNULIB_PWRITE@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_READ = @GNULIB_READ@ GNULIB_READDIR = @GNULIB_READDIR@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ GNULIB_REWINDDIR = @GNULIB_REWINDDIR@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SCANDIR = @GNULIB_SCANDIR@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_STAT = @GNULIB_STAT@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRERROR_R = @GNULIB_STRERROR_R@ GNULIB_STRNCAT = @GNULIB_STRNCAT@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRPTIME = @GNULIB_STRPTIME@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOD = @GNULIB_STRTOD@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRTOLL = @GNULIB_STRTOLL@ GNULIB_STRTOULL = @GNULIB_STRTOULL@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@ GNULIB_TIMEGM = @GNULIB_TIMEGM@ GNULIB_TIME_R = @GNULIB_TIME_R@ GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@ GNULIB_UNSETENV = @GNULIB_UNSETENV@ GNULIB_USLEEP = @GNULIB_USLEEP@ GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@ GNULIB_WCTOMB = @GNULIB_WCTOMB@ GNULIB_WRITE = @GNULIB_WRITE@ GNULIB__EXIT = @GNULIB__EXIT@ GREP = @GREP@ HAVE_ALPHASORT = @HAVE_ALPHASORT@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ HAVE_CHOWN = @HAVE_CHOWN@ HAVE_CLOSEDIR = @HAVE_CLOSEDIR@ HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@ HAVE_DECL_FDOPENDIR = @HAVE_DECL_FDOPENDIR@ HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ HAVE_DIRENT_H = @HAVE_DIRENT_H@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHDIR = @HAVE_FCHDIR@ HAVE_FCHMODAT = @HAVE_FCHMODAT@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FDATASYNC = @HAVE_FDATASYNC@ HAVE_FDOPENDIR = @HAVE_FDOPENDIR@ HAVE_FFSL = @HAVE_FFSL@ HAVE_FFSLL = @HAVE_FFSLL@ HAVE_FSTATAT = @HAVE_FSTATAT@ HAVE_FSYNC = @HAVE_FSYNC@ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ HAVE_FUTIMENS = @HAVE_FUTIMENS@ HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ HAVE_GETGROUPS = @HAVE_GETGROUPS@ HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ HAVE_GETLOGIN = @HAVE_GETLOGIN@ HAVE_GETOPT_H = @HAVE_GETOPT_H@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GRANTPT = @HAVE_GRANTPT@ HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LCHOWN = @HAVE_LCHOWN@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ HAVE_LSTAT = @HAVE_LSTAT@ HAVE_MBSLEN = @HAVE_MBSLEN@ HAVE_MEMCHR = @HAVE_MEMCHR@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_MKDIRAT = @HAVE_MKDIRAT@ HAVE_MKDTEMP = @HAVE_MKDTEMP@ HAVE_MKFIFO = @HAVE_MKFIFO@ HAVE_MKFIFOAT = @HAVE_MKFIFOAT@ HAVE_MKNOD = @HAVE_MKNOD@ HAVE_MKNODAT = @HAVE_MKNODAT@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMP = @HAVE_MKSTEMP@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ HAVE_NANOSLEEP = @HAVE_NANOSLEEP@ HAVE_OPENDIR = @HAVE_OPENDIR@ HAVE_OS_H = @HAVE_OS_H@ HAVE_PIPE = @HAVE_PIPE@ HAVE_PIPE2 = @HAVE_PIPE2@ HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@ HAVE_PREAD = @HAVE_PREAD@ HAVE_PTSNAME = @HAVE_PTSNAME@ HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ HAVE_PWRITE = @HAVE_PWRITE@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_READDIR = @HAVE_READDIR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ HAVE_REALPATH = @HAVE_REALPATH@ HAVE_REWINDDIR = @HAVE_REWINDDIR@ HAVE_RPMATCH = @HAVE_RPMATCH@ HAVE_SCANDIR = @HAVE_SCANDIR@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@ HAVE_SLEEP = @HAVE_SLEEP@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRPTIME = @HAVE_STRPTIME@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ HAVE_TIMEGM = @HAVE_TIMEGM@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ HAVE_USLEEP = @HAVE_USLEEP@ HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE__BOOL = @HAVE__BOOL@ HAVE__EXIT = @HAVE__EXIT@ HELP2MAN = @HELP2MAN@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBRARY_NAMESPACE = @LIBRARY_NAMESPACE@ LIBRARY_VERSION = @LIBRARY_VERSION@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@ NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ NEXT_DIRENT_H = @NEXT_DIRENT_H@ NEXT_GETOPT_H = @NEXT_GETOPT_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PRAGMA_COLUMNS = @PRAGMA_COLUMNS@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ RANLIB = @RANLIB@ REPLACE_CALLOC = @REPLACE_CALLOC@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ REPLACE_CHOWN = @REPLACE_CHOWN@ REPLACE_CLOSE = @REPLACE_CLOSE@ REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@ REPLACE_DIRFD = @REPLACE_DIRFD@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@ REPLACE_FSTAT = @REPLACE_FSTAT@ REPLACE_FSTATAT = @REPLACE_FSTATAT@ REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_LSTAT = @REPLACE_LSTAT@ REPLACE_MALLOC = @REPLACE_MALLOC@ REPLACE_MBTOWC = @REPLACE_MBTOWC@ REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKDIR = @REPLACE_MKDIR@ REPLACE_MKFIFO = @REPLACE_MKFIFO@ REPLACE_MKNOD = @REPLACE_MKNOD@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OPENDIR = @REPLACE_OPENDIR@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_PWRITE = @REPLACE_PWRITE@ REPLACE_READ = @REPLACE_READ@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_REALLOC = @REPLACE_REALLOC@ REPLACE_REALPATH = @REPLACE_REALPATH@ REPLACE_RMDIR = @REPLACE_RMDIR@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_STAT = @REPLACE_STAT@ REPLACE_STPNCPY = @REPLACE_STPNCPY@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRERROR_R = @REPLACE_STRERROR_R@ REPLACE_STRNCAT = @REPLACE_STRNCAT@ REPLACE_STRNDUP = @REPLACE_STRNDUP@ REPLACE_STRNLEN = @REPLACE_STRNLEN@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ REPLACE_UNLINK = @REPLACE_UNLINK@ REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ REPLACE_UNSETENV = @REPLACE_UNSETENV@ REPLACE_USLEEP = @REPLACE_USLEEP@ REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@ REPLACE_WCTOMB = @REPLACE_WCTOMB@ REPLACE_WRITE = @REPLACE_WRITE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STRIP = @STRIP@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TAR = @TAR@ TEXI2HTML = @TEXI2HTML@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ VALGRIND = @VALGRIND@ VERSION = @VERSION@ YACC = @YACC@ YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bash_completiondir = @bash_completiondir@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ gltests_WITNESS = @gltests_WITNESS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ source_highlightdatadir = @source_highlightdatadir@ source_highlightdocdir = @source_highlightdocdir@ source_highlightlibdocdir = @source_highlightlibdocdir@ source_highlightlibexampledir = @source_highlightlibexampledir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I$(top_srcdir)/gl -I$(top_builddir)/gl $(BOOST_CPPFLAGS) AM_LDFLAGS = $(BOOST_LDFLAGS) -no-install LDADD = $(top_builddir)/gl/libgnu.la $(LIBDIR)/libsource-highlight.la $(BOOST_REGEX_LIB) #LIBDIR = $(top_builddir)/lib/srchilite/ LIBDIR = ../srchilite/ INCLUDES = -I@top_srcdir@/src -I@srcdir@/.. VALGRIND_TESTS = test_regexrules test_formatter_manager \ test_highlighter test_exception test_highlightbuilder \ test_buffered_output test_textstyle test_textgenerator \ test_textstyleformatter test_wordtokenizer test_linenum \ test_sourcefilehighlighter test_textstyleformatterfactory \ test_langdefmanager test_sourcehighlight \ test_sourcehighlight_errors test_langinfer test_untabifier \ test_outlangparser test_outlang_errors test_events \ test_debuglistener test_regexpreprocessor test_filenotfound \ test_style_errors test_lineranges test_regexranges \ test_settings test_langmap test_utils test_instances \ $(am__append_1) test_regexrules_SOURCES = test_regexrules_main.cpp test_formatter_manager_SOURCES = test_formatter_manager_main.cpp test_highlighter_SOURCES = logformatter.cpp test_highlighter_main.cpp test_exception_SOURCES = test_exception_main.cpp test_highlightbuilder_SOURCES = logformatter.cpp test_highlightbuilder_main.cpp test_buffered_output_SOURCES = test_buffered_output_main.cpp test_textstyle_SOURCES = test_textstyle_main.cpp test_textstyleformatter_SOURCES = test_textstyleformatter_main.cpp test_textgenerator_SOURCES = test_textgenerator_main.cpp test_wordtokenizer_SOURCES = test_wordtokenizer_main.cpp test_ctagscollector_SOURCES = test_ctagscollector_main.cpp test_ctagscollector_DEPENDENCIES = mytags test_ctagscollector_CXXFLAGS = -D BASEDIR="\"$(top_srcdir)/lib/srchilite/\"" test_ctagsformatter_SOURCES = test_ctagsformatter_main.cpp test_ctagsformatter_DEPENDENCIES = mytags test_ctagsformatter_CXXFLAGS = -D BASEDIR="\"$(top_srcdir)/lib/srchilite/\"" test_ctagsmanager_SOURCES = test_ctagsmanager_main.cpp test_ctagsmanager_DEPENDENCIES = mytags test_ctagsmanager_CXXFLAGS = -D BASEDIR="\"$(top_srcdir)/lib/srchilite/\"" -D CTAGS="\"$(CTAGS)\"" test_formatreferences_SOURCES = logformatter.cpp test_formatreferences_main.cpp test_formatreferences_DEPENDENCIES = mytags test_formatreferences_CXXFLAGS = -D BASEDIR="\"$(top_srcdir)/lib/srchilite/\"" test_untabifier_SOURCES = test_untabifier_main.cpp test_sourcefilehighlighter_SOURCES = test_sourcefilehighlighter_main.cpp test_lineranges_SOURCES = test_lineranges_main.cpp test_regexranges_SOURCES = test_regexranges_main.cpp test_debuglistener_SOURCES = test_debuglistener_main.cpp test_linenum_SOURCES = test_linenum_main.cpp test_textstyleformatterfactory_SOURCES = test_textstyleformatterfactory_main.cpp test_langdefmanager_SOURCES = test_langdefmanager_main.cpp test_langdefmanager_CXXFLAGS = -D BASEDIR="\"$(top_srcdir)/src/\"" test_sourcehighlight_SOURCES = test_sourcehighlight_main.cpp test_sourcehighlight_CXXFLAGS = -D BASEDIR="\"$(top_srcdir)/src/\"" -D TESTSDIR="\"$(top_srcdir)/tests/\"" test_sourcehighlight_errors_SOURCES = test_sourcehighlight_errors_main.cpp test_sourcehighlight_errors_CXXFLAGS = -D BASEDIR="\"$(top_srcdir)/src/\"" -D TESTSDIR="\"$(top_srcdir)/tests/\"" test_style_errors_SOURCES = test_style_errors_main.cpp test_style_errors_CXXFLAGS = -D BASEDIR="\"$(top_srcdir)/src/\"" -D TESTSDIR="\"$(top_srcdir)/tests/\"" test_outlang_errors_SOURCES = test_outlang_errors_main.cpp test_outlang_errors_CXXFLAGS = -D BASEDIR="\"$(top_srcdir)/src/\"" -D TESTSDIR="\"$(top_srcdir)/tests/\"" test_filenotfound_SOURCES = test_filenotfound_main.cpp test_filenotfound_CXXFLAGS = -D BASEDIR="\"$(top_srcdir)/src/\"" -D TESTSDIR="\"$(top_srcdir)/tests/\"" test_outlangparser_SOURCES = test_outlangparser_main.cpp test_outlangparser_DEPENDENCIES = outlangtest.outlang test_outlangparser_CXXFLAGS = -D BASEDIR="\"$(srcdir)/\"" -D TESTSDIR="\"$(top_srcdir)/tests/\"" test_langinfer_SOURCES = test_langinfer_main.cpp test_settings_SOURCES = test_settings_main.cpp test_settings_CXXFLAGS = -D BASEDIR="\"$(srcdir)/\"" -D TESTSDIR="\"$(top_srcdir)/tests/\"" \ -D MAINSRCDIR="\"$(top_srcdir)/src/\"" test_events_SOURCES = test_events_main.cpp test_regexpreprocessor_SOURCES = test_regexpreprocessor_main.cpp test_langmap_SOURCES = test_langmap_main.cpp test_langmap_CXXFLAGS = -D BASEDIR="\"$(srcdir)/\"" -D TESTSDIR="\"$(top_srcdir)/tests/\"" test_utils_SOURCES = test_utils_main.cpp test_utils_CXXFLAGS = -D BASEDIR="\"$(top_srcdir)/src/\"" test_instances_SOURCES = test_instances_main.cpp test_instances_CXXFLAGS = -D BASEDIR="\"$(srcdir)/\"" -D TESTSDIR="\"$(top_srcdir)/tests/\"" VALGRINDTEST = $(builddir)/valgrind_test.sh EXTRA_DIST = valgrind_test.sh.in \ outlangtest.outlang \ testconffile.conf \ source-highlight.conf \ test.map noinst_HEADERS = logformatter.h stdboosterror.h asserttestexit.h CLEANFILES = *.java.html mytags* all: all-am .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/tests/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu lib/tests/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): valgrind_test.sh: $(top_builddir)/config.status $(srcdir)/valgrind_test.sh.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ clean-checkPROGRAMS: @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list test_buffered_output$(EXEEXT): $(test_buffered_output_OBJECTS) $(test_buffered_output_DEPENDENCIES) @rm -f test_buffered_output$(EXEEXT) $(CXXLINK) $(test_buffered_output_OBJECTS) $(test_buffered_output_LDADD) $(LIBS) test_ctagscollector$(EXEEXT): $(test_ctagscollector_OBJECTS) $(test_ctagscollector_DEPENDENCIES) @rm -f test_ctagscollector$(EXEEXT) $(test_ctagscollector_LINK) $(test_ctagscollector_OBJECTS) $(test_ctagscollector_LDADD) $(LIBS) test_ctagsformatter$(EXEEXT): $(test_ctagsformatter_OBJECTS) $(test_ctagsformatter_DEPENDENCIES) @rm -f test_ctagsformatter$(EXEEXT) $(test_ctagsformatter_LINK) $(test_ctagsformatter_OBJECTS) $(test_ctagsformatter_LDADD) $(LIBS) test_ctagsmanager$(EXEEXT): $(test_ctagsmanager_OBJECTS) $(test_ctagsmanager_DEPENDENCIES) @rm -f test_ctagsmanager$(EXEEXT) $(test_ctagsmanager_LINK) $(test_ctagsmanager_OBJECTS) $(test_ctagsmanager_LDADD) $(LIBS) test_debuglistener$(EXEEXT): $(test_debuglistener_OBJECTS) $(test_debuglistener_DEPENDENCIES) @rm -f test_debuglistener$(EXEEXT) $(CXXLINK) $(test_debuglistener_OBJECTS) $(test_debuglistener_LDADD) $(LIBS) test_events$(EXEEXT): $(test_events_OBJECTS) $(test_events_DEPENDENCIES) @rm -f test_events$(EXEEXT) $(CXXLINK) $(test_events_OBJECTS) $(test_events_LDADD) $(LIBS) test_exception$(EXEEXT): $(test_exception_OBJECTS) $(test_exception_DEPENDENCIES) @rm -f test_exception$(EXEEXT) $(CXXLINK) $(test_exception_OBJECTS) $(test_exception_LDADD) $(LIBS) test_filenotfound$(EXEEXT): $(test_filenotfound_OBJECTS) $(test_filenotfound_DEPENDENCIES) @rm -f test_filenotfound$(EXEEXT) $(test_filenotfound_LINK) $(test_filenotfound_OBJECTS) $(test_filenotfound_LDADD) $(LIBS) test_formatreferences$(EXEEXT): $(test_formatreferences_OBJECTS) $(test_formatreferences_DEPENDENCIES) @rm -f test_formatreferences$(EXEEXT) $(test_formatreferences_LINK) $(test_formatreferences_OBJECTS) $(test_formatreferences_LDADD) $(LIBS) test_formatter_manager$(EXEEXT): $(test_formatter_manager_OBJECTS) $(test_formatter_manager_DEPENDENCIES) @rm -f test_formatter_manager$(EXEEXT) $(CXXLINK) $(test_formatter_manager_OBJECTS) $(test_formatter_manager_LDADD) $(LIBS) test_highlightbuilder$(EXEEXT): $(test_highlightbuilder_OBJECTS) $(test_highlightbuilder_DEPENDENCIES) @rm -f test_highlightbuilder$(EXEEXT) $(CXXLINK) $(test_highlightbuilder_OBJECTS) $(test_highlightbuilder_LDADD) $(LIBS) test_highlighter$(EXEEXT): $(test_highlighter_OBJECTS) $(test_highlighter_DEPENDENCIES) @rm -f test_highlighter$(EXEEXT) $(CXXLINK) $(test_highlighter_OBJECTS) $(test_highlighter_LDADD) $(LIBS) test_instances$(EXEEXT): $(test_instances_OBJECTS) $(test_instances_DEPENDENCIES) @rm -f test_instances$(EXEEXT) $(test_instances_LINK) $(test_instances_OBJECTS) $(test_instances_LDADD) $(LIBS) test_langdefmanager$(EXEEXT): $(test_langdefmanager_OBJECTS) $(test_langdefmanager_DEPENDENCIES) @rm -f test_langdefmanager$(EXEEXT) $(test_langdefmanager_LINK) $(test_langdefmanager_OBJECTS) $(test_langdefmanager_LDADD) $(LIBS) test_langinfer$(EXEEXT): $(test_langinfer_OBJECTS) $(test_langinfer_DEPENDENCIES) @rm -f test_langinfer$(EXEEXT) $(CXXLINK) $(test_langinfer_OBJECTS) $(test_langinfer_LDADD) $(LIBS) test_langmap$(EXEEXT): $(test_langmap_OBJECTS) $(test_langmap_DEPENDENCIES) @rm -f test_langmap$(EXEEXT) $(test_langmap_LINK) $(test_langmap_OBJECTS) $(test_langmap_LDADD) $(LIBS) test_linenum$(EXEEXT): $(test_linenum_OBJECTS) $(test_linenum_DEPENDENCIES) @rm -f test_linenum$(EXEEXT) $(CXXLINK) $(test_linenum_OBJECTS) $(test_linenum_LDADD) $(LIBS) test_lineranges$(EXEEXT): $(test_lineranges_OBJECTS) $(test_lineranges_DEPENDENCIES) @rm -f test_lineranges$(EXEEXT) $(CXXLINK) $(test_lineranges_OBJECTS) $(test_lineranges_LDADD) $(LIBS) test_outlang_errors$(EXEEXT): $(test_outlang_errors_OBJECTS) $(test_outlang_errors_DEPENDENCIES) @rm -f test_outlang_errors$(EXEEXT) $(test_outlang_errors_LINK) $(test_outlang_errors_OBJECTS) $(test_outlang_errors_LDADD) $(LIBS) test_outlangparser$(EXEEXT): $(test_outlangparser_OBJECTS) $(test_outlangparser_DEPENDENCIES) @rm -f test_outlangparser$(EXEEXT) $(test_outlangparser_LINK) $(test_outlangparser_OBJECTS) $(test_outlangparser_LDADD) $(LIBS) test_regexpreprocessor$(EXEEXT): $(test_regexpreprocessor_OBJECTS) $(test_regexpreprocessor_DEPENDENCIES) @rm -f test_regexpreprocessor$(EXEEXT) $(CXXLINK) $(test_regexpreprocessor_OBJECTS) $(test_regexpreprocessor_LDADD) $(LIBS) test_regexranges$(EXEEXT): $(test_regexranges_OBJECTS) $(test_regexranges_DEPENDENCIES) @rm -f test_regexranges$(EXEEXT) $(CXXLINK) $(test_regexranges_OBJECTS) $(test_regexranges_LDADD) $(LIBS) test_regexrules$(EXEEXT): $(test_regexrules_OBJECTS) $(test_regexrules_DEPENDENCIES) @rm -f test_regexrules$(EXEEXT) $(CXXLINK) $(test_regexrules_OBJECTS) $(test_regexrules_LDADD) $(LIBS) test_settings$(EXEEXT): $(test_settings_OBJECTS) $(test_settings_DEPENDENCIES) @rm -f test_settings$(EXEEXT) $(test_settings_LINK) $(test_settings_OBJECTS) $(test_settings_LDADD) $(LIBS) test_sourcefilehighlighter$(EXEEXT): $(test_sourcefilehighlighter_OBJECTS) $(test_sourcefilehighlighter_DEPENDENCIES) @rm -f test_sourcefilehighlighter$(EXEEXT) $(CXXLINK) $(test_sourcefilehighlighter_OBJECTS) $(test_sourcefilehighlighter_LDADD) $(LIBS) test_sourcehighlight$(EXEEXT): $(test_sourcehighlight_OBJECTS) $(test_sourcehighlight_DEPENDENCIES) @rm -f test_sourcehighlight$(EXEEXT) $(test_sourcehighlight_LINK) $(test_sourcehighlight_OBJECTS) $(test_sourcehighlight_LDADD) $(LIBS) test_sourcehighlight_errors$(EXEEXT): $(test_sourcehighlight_errors_OBJECTS) $(test_sourcehighlight_errors_DEPENDENCIES) @rm -f test_sourcehighlight_errors$(EXEEXT) $(test_sourcehighlight_errors_LINK) $(test_sourcehighlight_errors_OBJECTS) $(test_sourcehighlight_errors_LDADD) $(LIBS) test_style_errors$(EXEEXT): $(test_style_errors_OBJECTS) $(test_style_errors_DEPENDENCIES) @rm -f test_style_errors$(EXEEXT) $(test_style_errors_LINK) $(test_style_errors_OBJECTS) $(test_style_errors_LDADD) $(LIBS) test_textgenerator$(EXEEXT): $(test_textgenerator_OBJECTS) $(test_textgenerator_DEPENDENCIES) @rm -f test_textgenerator$(EXEEXT) $(CXXLINK) $(test_textgenerator_OBJECTS) $(test_textgenerator_LDADD) $(LIBS) test_textstyle$(EXEEXT): $(test_textstyle_OBJECTS) $(test_textstyle_DEPENDENCIES) @rm -f test_textstyle$(EXEEXT) $(CXXLINK) $(test_textstyle_OBJECTS) $(test_textstyle_LDADD) $(LIBS) test_textstyleformatter$(EXEEXT): $(test_textstyleformatter_OBJECTS) $(test_textstyleformatter_DEPENDENCIES) @rm -f test_textstyleformatter$(EXEEXT) $(CXXLINK) $(test_textstyleformatter_OBJECTS) $(test_textstyleformatter_LDADD) $(LIBS) test_textstyleformatterfactory$(EXEEXT): $(test_textstyleformatterfactory_OBJECTS) $(test_textstyleformatterfactory_DEPENDENCIES) @rm -f test_textstyleformatterfactory$(EXEEXT) $(CXXLINK) $(test_textstyleformatterfactory_OBJECTS) $(test_textstyleformatterfactory_LDADD) $(LIBS) test_untabifier$(EXEEXT): $(test_untabifier_OBJECTS) $(test_untabifier_DEPENDENCIES) @rm -f test_untabifier$(EXEEXT) $(CXXLINK) $(test_untabifier_OBJECTS) $(test_untabifier_LDADD) $(LIBS) test_utils$(EXEEXT): $(test_utils_OBJECTS) $(test_utils_DEPENDENCIES) @rm -f test_utils$(EXEEXT) $(test_utils_LINK) $(test_utils_OBJECTS) $(test_utils_LDADD) $(LIBS) test_wordtokenizer$(EXEEXT): $(test_wordtokenizer_OBJECTS) $(test_wordtokenizer_DEPENDENCIES) @rm -f test_wordtokenizer$(EXEEXT) $(CXXLINK) $(test_wordtokenizer_OBJECTS) $(test_wordtokenizer_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/logformatter.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_buffered_output_main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_ctagscollector-test_ctagscollector_main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_ctagsformatter-test_ctagsformatter_main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_ctagsmanager-test_ctagsmanager_main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_debuglistener_main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_events_main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_exception_main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_filenotfound-test_filenotfound_main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_formatreferences-logformatter.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_formatreferences-test_formatreferences_main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_formatter_manager_main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_highlightbuilder_main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_highlighter_main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_instances-test_instances_main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_langdefmanager-test_langdefmanager_main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_langinfer_main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_langmap-test_langmap_main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_linenum_main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_lineranges_main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_outlang_errors-test_outlang_errors_main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_outlangparser-test_outlangparser_main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_regexpreprocessor_main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_regexranges_main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_regexrules_main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_settings-test_settings_main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_sourcefilehighlighter_main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_sourcehighlight-test_sourcehighlight_main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_sourcehighlight_errors-test_sourcehighlight_errors_main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_style_errors-test_style_errors_main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_textgenerator_main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_textstyle_main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_textstyleformatter_main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_textstyleformatterfactory_main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_untabifier_main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_utils-test_utils_main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_wordtokenizer_main.Po@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< test_ctagscollector-test_ctagscollector_main.o: test_ctagscollector_main.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_ctagscollector_CXXFLAGS) $(CXXFLAGS) -MT test_ctagscollector-test_ctagscollector_main.o -MD -MP -MF $(DEPDIR)/test_ctagscollector-test_ctagscollector_main.Tpo -c -o test_ctagscollector-test_ctagscollector_main.o `test -f 'test_ctagscollector_main.cpp' || echo '$(srcdir)/'`test_ctagscollector_main.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/test_ctagscollector-test_ctagscollector_main.Tpo $(DEPDIR)/test_ctagscollector-test_ctagscollector_main.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='test_ctagscollector_main.cpp' object='test_ctagscollector-test_ctagscollector_main.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_ctagscollector_CXXFLAGS) $(CXXFLAGS) -c -o test_ctagscollector-test_ctagscollector_main.o `test -f 'test_ctagscollector_main.cpp' || echo '$(srcdir)/'`test_ctagscollector_main.cpp test_ctagscollector-test_ctagscollector_main.obj: test_ctagscollector_main.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_ctagscollector_CXXFLAGS) $(CXXFLAGS) -MT test_ctagscollector-test_ctagscollector_main.obj -MD -MP -MF $(DEPDIR)/test_ctagscollector-test_ctagscollector_main.Tpo -c -o test_ctagscollector-test_ctagscollector_main.obj `if test -f 'test_ctagscollector_main.cpp'; then $(CYGPATH_W) 'test_ctagscollector_main.cpp'; else $(CYGPATH_W) '$(srcdir)/test_ctagscollector_main.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/test_ctagscollector-test_ctagscollector_main.Tpo $(DEPDIR)/test_ctagscollector-test_ctagscollector_main.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='test_ctagscollector_main.cpp' object='test_ctagscollector-test_ctagscollector_main.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_ctagscollector_CXXFLAGS) $(CXXFLAGS) -c -o test_ctagscollector-test_ctagscollector_main.obj `if test -f 'test_ctagscollector_main.cpp'; then $(CYGPATH_W) 'test_ctagscollector_main.cpp'; else $(CYGPATH_W) '$(srcdir)/test_ctagscollector_main.cpp'; fi` test_ctagsformatter-test_ctagsformatter_main.o: test_ctagsformatter_main.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_ctagsformatter_CXXFLAGS) $(CXXFLAGS) -MT test_ctagsformatter-test_ctagsformatter_main.o -MD -MP -MF $(DEPDIR)/test_ctagsformatter-test_ctagsformatter_main.Tpo -c -o test_ctagsformatter-test_ctagsformatter_main.o `test -f 'test_ctagsformatter_main.cpp' || echo '$(srcdir)/'`test_ctagsformatter_main.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/test_ctagsformatter-test_ctagsformatter_main.Tpo $(DEPDIR)/test_ctagsformatter-test_ctagsformatter_main.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='test_ctagsformatter_main.cpp' object='test_ctagsformatter-test_ctagsformatter_main.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_ctagsformatter_CXXFLAGS) $(CXXFLAGS) -c -o test_ctagsformatter-test_ctagsformatter_main.o `test -f 'test_ctagsformatter_main.cpp' || echo '$(srcdir)/'`test_ctagsformatter_main.cpp test_ctagsformatter-test_ctagsformatter_main.obj: test_ctagsformatter_main.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_ctagsformatter_CXXFLAGS) $(CXXFLAGS) -MT test_ctagsformatter-test_ctagsformatter_main.obj -MD -MP -MF $(DEPDIR)/test_ctagsformatter-test_ctagsformatter_main.Tpo -c -o test_ctagsformatter-test_ctagsformatter_main.obj `if test -f 'test_ctagsformatter_main.cpp'; then $(CYGPATH_W) 'test_ctagsformatter_main.cpp'; else $(CYGPATH_W) '$(srcdir)/test_ctagsformatter_main.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/test_ctagsformatter-test_ctagsformatter_main.Tpo $(DEPDIR)/test_ctagsformatter-test_ctagsformatter_main.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='test_ctagsformatter_main.cpp' object='test_ctagsformatter-test_ctagsformatter_main.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_ctagsformatter_CXXFLAGS) $(CXXFLAGS) -c -o test_ctagsformatter-test_ctagsformatter_main.obj `if test -f 'test_ctagsformatter_main.cpp'; then $(CYGPATH_W) 'test_ctagsformatter_main.cpp'; else $(CYGPATH_W) '$(srcdir)/test_ctagsformatter_main.cpp'; fi` test_ctagsmanager-test_ctagsmanager_main.o: test_ctagsmanager_main.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_ctagsmanager_CXXFLAGS) $(CXXFLAGS) -MT test_ctagsmanager-test_ctagsmanager_main.o -MD -MP -MF $(DEPDIR)/test_ctagsmanager-test_ctagsmanager_main.Tpo -c -o test_ctagsmanager-test_ctagsmanager_main.o `test -f 'test_ctagsmanager_main.cpp' || echo '$(srcdir)/'`test_ctagsmanager_main.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/test_ctagsmanager-test_ctagsmanager_main.Tpo $(DEPDIR)/test_ctagsmanager-test_ctagsmanager_main.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='test_ctagsmanager_main.cpp' object='test_ctagsmanager-test_ctagsmanager_main.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_ctagsmanager_CXXFLAGS) $(CXXFLAGS) -c -o test_ctagsmanager-test_ctagsmanager_main.o `test -f 'test_ctagsmanager_main.cpp' || echo '$(srcdir)/'`test_ctagsmanager_main.cpp test_ctagsmanager-test_ctagsmanager_main.obj: test_ctagsmanager_main.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_ctagsmanager_CXXFLAGS) $(CXXFLAGS) -MT test_ctagsmanager-test_ctagsmanager_main.obj -MD -MP -MF $(DEPDIR)/test_ctagsmanager-test_ctagsmanager_main.Tpo -c -o test_ctagsmanager-test_ctagsmanager_main.obj `if test -f 'test_ctagsmanager_main.cpp'; then $(CYGPATH_W) 'test_ctagsmanager_main.cpp'; else $(CYGPATH_W) '$(srcdir)/test_ctagsmanager_main.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/test_ctagsmanager-test_ctagsmanager_main.Tpo $(DEPDIR)/test_ctagsmanager-test_ctagsmanager_main.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='test_ctagsmanager_main.cpp' object='test_ctagsmanager-test_ctagsmanager_main.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_ctagsmanager_CXXFLAGS) $(CXXFLAGS) -c -o test_ctagsmanager-test_ctagsmanager_main.obj `if test -f 'test_ctagsmanager_main.cpp'; then $(CYGPATH_W) 'test_ctagsmanager_main.cpp'; else $(CYGPATH_W) '$(srcdir)/test_ctagsmanager_main.cpp'; fi` test_filenotfound-test_filenotfound_main.o: test_filenotfound_main.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_filenotfound_CXXFLAGS) $(CXXFLAGS) -MT test_filenotfound-test_filenotfound_main.o -MD -MP -MF $(DEPDIR)/test_filenotfound-test_filenotfound_main.Tpo -c -o test_filenotfound-test_filenotfound_main.o `test -f 'test_filenotfound_main.cpp' || echo '$(srcdir)/'`test_filenotfound_main.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/test_filenotfound-test_filenotfound_main.Tpo $(DEPDIR)/test_filenotfound-test_filenotfound_main.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='test_filenotfound_main.cpp' object='test_filenotfound-test_filenotfound_main.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_filenotfound_CXXFLAGS) $(CXXFLAGS) -c -o test_filenotfound-test_filenotfound_main.o `test -f 'test_filenotfound_main.cpp' || echo '$(srcdir)/'`test_filenotfound_main.cpp test_filenotfound-test_filenotfound_main.obj: test_filenotfound_main.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_filenotfound_CXXFLAGS) $(CXXFLAGS) -MT test_filenotfound-test_filenotfound_main.obj -MD -MP -MF $(DEPDIR)/test_filenotfound-test_filenotfound_main.Tpo -c -o test_filenotfound-test_filenotfound_main.obj `if test -f 'test_filenotfound_main.cpp'; then $(CYGPATH_W) 'test_filenotfound_main.cpp'; else $(CYGPATH_W) '$(srcdir)/test_filenotfound_main.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/test_filenotfound-test_filenotfound_main.Tpo $(DEPDIR)/test_filenotfound-test_filenotfound_main.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='test_filenotfound_main.cpp' object='test_filenotfound-test_filenotfound_main.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_filenotfound_CXXFLAGS) $(CXXFLAGS) -c -o test_filenotfound-test_filenotfound_main.obj `if test -f 'test_filenotfound_main.cpp'; then $(CYGPATH_W) 'test_filenotfound_main.cpp'; else $(CYGPATH_W) '$(srcdir)/test_filenotfound_main.cpp'; fi` test_formatreferences-logformatter.o: logformatter.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_formatreferences_CXXFLAGS) $(CXXFLAGS) -MT test_formatreferences-logformatter.o -MD -MP -MF $(DEPDIR)/test_formatreferences-logformatter.Tpo -c -o test_formatreferences-logformatter.o `test -f 'logformatter.cpp' || echo '$(srcdir)/'`logformatter.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/test_formatreferences-logformatter.Tpo $(DEPDIR)/test_formatreferences-logformatter.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='logformatter.cpp' object='test_formatreferences-logformatter.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_formatreferences_CXXFLAGS) $(CXXFLAGS) -c -o test_formatreferences-logformatter.o `test -f 'logformatter.cpp' || echo '$(srcdir)/'`logformatter.cpp test_formatreferences-logformatter.obj: logformatter.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_formatreferences_CXXFLAGS) $(CXXFLAGS) -MT test_formatreferences-logformatter.obj -MD -MP -MF $(DEPDIR)/test_formatreferences-logformatter.Tpo -c -o test_formatreferences-logformatter.obj `if test -f 'logformatter.cpp'; then $(CYGPATH_W) 'logformatter.cpp'; else $(CYGPATH_W) '$(srcdir)/logformatter.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/test_formatreferences-logformatter.Tpo $(DEPDIR)/test_formatreferences-logformatter.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='logformatter.cpp' object='test_formatreferences-logformatter.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_formatreferences_CXXFLAGS) $(CXXFLAGS) -c -o test_formatreferences-logformatter.obj `if test -f 'logformatter.cpp'; then $(CYGPATH_W) 'logformatter.cpp'; else $(CYGPATH_W) '$(srcdir)/logformatter.cpp'; fi` test_formatreferences-test_formatreferences_main.o: test_formatreferences_main.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_formatreferences_CXXFLAGS) $(CXXFLAGS) -MT test_formatreferences-test_formatreferences_main.o -MD -MP -MF $(DEPDIR)/test_formatreferences-test_formatreferences_main.Tpo -c -o test_formatreferences-test_formatreferences_main.o `test -f 'test_formatreferences_main.cpp' || echo '$(srcdir)/'`test_formatreferences_main.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/test_formatreferences-test_formatreferences_main.Tpo $(DEPDIR)/test_formatreferences-test_formatreferences_main.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='test_formatreferences_main.cpp' object='test_formatreferences-test_formatreferences_main.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_formatreferences_CXXFLAGS) $(CXXFLAGS) -c -o test_formatreferences-test_formatreferences_main.o `test -f 'test_formatreferences_main.cpp' || echo '$(srcdir)/'`test_formatreferences_main.cpp test_formatreferences-test_formatreferences_main.obj: test_formatreferences_main.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_formatreferences_CXXFLAGS) $(CXXFLAGS) -MT test_formatreferences-test_formatreferences_main.obj -MD -MP -MF $(DEPDIR)/test_formatreferences-test_formatreferences_main.Tpo -c -o test_formatreferences-test_formatreferences_main.obj `if test -f 'test_formatreferences_main.cpp'; then $(CYGPATH_W) 'test_formatreferences_main.cpp'; else $(CYGPATH_W) '$(srcdir)/test_formatreferences_main.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/test_formatreferences-test_formatreferences_main.Tpo $(DEPDIR)/test_formatreferences-test_formatreferences_main.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='test_formatreferences_main.cpp' object='test_formatreferences-test_formatreferences_main.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_formatreferences_CXXFLAGS) $(CXXFLAGS) -c -o test_formatreferences-test_formatreferences_main.obj `if test -f 'test_formatreferences_main.cpp'; then $(CYGPATH_W) 'test_formatreferences_main.cpp'; else $(CYGPATH_W) '$(srcdir)/test_formatreferences_main.cpp'; fi` test_instances-test_instances_main.o: test_instances_main.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_instances_CXXFLAGS) $(CXXFLAGS) -MT test_instances-test_instances_main.o -MD -MP -MF $(DEPDIR)/test_instances-test_instances_main.Tpo -c -o test_instances-test_instances_main.o `test -f 'test_instances_main.cpp' || echo '$(srcdir)/'`test_instances_main.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/test_instances-test_instances_main.Tpo $(DEPDIR)/test_instances-test_instances_main.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='test_instances_main.cpp' object='test_instances-test_instances_main.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_instances_CXXFLAGS) $(CXXFLAGS) -c -o test_instances-test_instances_main.o `test -f 'test_instances_main.cpp' || echo '$(srcdir)/'`test_instances_main.cpp test_instances-test_instances_main.obj: test_instances_main.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_instances_CXXFLAGS) $(CXXFLAGS) -MT test_instances-test_instances_main.obj -MD -MP -MF $(DEPDIR)/test_instances-test_instances_main.Tpo -c -o test_instances-test_instances_main.obj `if test -f 'test_instances_main.cpp'; then $(CYGPATH_W) 'test_instances_main.cpp'; else $(CYGPATH_W) '$(srcdir)/test_instances_main.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/test_instances-test_instances_main.Tpo $(DEPDIR)/test_instances-test_instances_main.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='test_instances_main.cpp' object='test_instances-test_instances_main.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_instances_CXXFLAGS) $(CXXFLAGS) -c -o test_instances-test_instances_main.obj `if test -f 'test_instances_main.cpp'; then $(CYGPATH_W) 'test_instances_main.cpp'; else $(CYGPATH_W) '$(srcdir)/test_instances_main.cpp'; fi` test_langdefmanager-test_langdefmanager_main.o: test_langdefmanager_main.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_langdefmanager_CXXFLAGS) $(CXXFLAGS) -MT test_langdefmanager-test_langdefmanager_main.o -MD -MP -MF $(DEPDIR)/test_langdefmanager-test_langdefmanager_main.Tpo -c -o test_langdefmanager-test_langdefmanager_main.o `test -f 'test_langdefmanager_main.cpp' || echo '$(srcdir)/'`test_langdefmanager_main.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/test_langdefmanager-test_langdefmanager_main.Tpo $(DEPDIR)/test_langdefmanager-test_langdefmanager_main.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='test_langdefmanager_main.cpp' object='test_langdefmanager-test_langdefmanager_main.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_langdefmanager_CXXFLAGS) $(CXXFLAGS) -c -o test_langdefmanager-test_langdefmanager_main.o `test -f 'test_langdefmanager_main.cpp' || echo '$(srcdir)/'`test_langdefmanager_main.cpp test_langdefmanager-test_langdefmanager_main.obj: test_langdefmanager_main.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_langdefmanager_CXXFLAGS) $(CXXFLAGS) -MT test_langdefmanager-test_langdefmanager_main.obj -MD -MP -MF $(DEPDIR)/test_langdefmanager-test_langdefmanager_main.Tpo -c -o test_langdefmanager-test_langdefmanager_main.obj `if test -f 'test_langdefmanager_main.cpp'; then $(CYGPATH_W) 'test_langdefmanager_main.cpp'; else $(CYGPATH_W) '$(srcdir)/test_langdefmanager_main.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/test_langdefmanager-test_langdefmanager_main.Tpo $(DEPDIR)/test_langdefmanager-test_langdefmanager_main.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='test_langdefmanager_main.cpp' object='test_langdefmanager-test_langdefmanager_main.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_langdefmanager_CXXFLAGS) $(CXXFLAGS) -c -o test_langdefmanager-test_langdefmanager_main.obj `if test -f 'test_langdefmanager_main.cpp'; then $(CYGPATH_W) 'test_langdefmanager_main.cpp'; else $(CYGPATH_W) '$(srcdir)/test_langdefmanager_main.cpp'; fi` test_langmap-test_langmap_main.o: test_langmap_main.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_langmap_CXXFLAGS) $(CXXFLAGS) -MT test_langmap-test_langmap_main.o -MD -MP -MF $(DEPDIR)/test_langmap-test_langmap_main.Tpo -c -o test_langmap-test_langmap_main.o `test -f 'test_langmap_main.cpp' || echo '$(srcdir)/'`test_langmap_main.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/test_langmap-test_langmap_main.Tpo $(DEPDIR)/test_langmap-test_langmap_main.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='test_langmap_main.cpp' object='test_langmap-test_langmap_main.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_langmap_CXXFLAGS) $(CXXFLAGS) -c -o test_langmap-test_langmap_main.o `test -f 'test_langmap_main.cpp' || echo '$(srcdir)/'`test_langmap_main.cpp test_langmap-test_langmap_main.obj: test_langmap_main.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_langmap_CXXFLAGS) $(CXXFLAGS) -MT test_langmap-test_langmap_main.obj -MD -MP -MF $(DEPDIR)/test_langmap-test_langmap_main.Tpo -c -o test_langmap-test_langmap_main.obj `if test -f 'test_langmap_main.cpp'; then $(CYGPATH_W) 'test_langmap_main.cpp'; else $(CYGPATH_W) '$(srcdir)/test_langmap_main.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/test_langmap-test_langmap_main.Tpo $(DEPDIR)/test_langmap-test_langmap_main.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='test_langmap_main.cpp' object='test_langmap-test_langmap_main.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_langmap_CXXFLAGS) $(CXXFLAGS) -c -o test_langmap-test_langmap_main.obj `if test -f 'test_langmap_main.cpp'; then $(CYGPATH_W) 'test_langmap_main.cpp'; else $(CYGPATH_W) '$(srcdir)/test_langmap_main.cpp'; fi` test_outlang_errors-test_outlang_errors_main.o: test_outlang_errors_main.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_outlang_errors_CXXFLAGS) $(CXXFLAGS) -MT test_outlang_errors-test_outlang_errors_main.o -MD -MP -MF $(DEPDIR)/test_outlang_errors-test_outlang_errors_main.Tpo -c -o test_outlang_errors-test_outlang_errors_main.o `test -f 'test_outlang_errors_main.cpp' || echo '$(srcdir)/'`test_outlang_errors_main.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/test_outlang_errors-test_outlang_errors_main.Tpo $(DEPDIR)/test_outlang_errors-test_outlang_errors_main.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='test_outlang_errors_main.cpp' object='test_outlang_errors-test_outlang_errors_main.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_outlang_errors_CXXFLAGS) $(CXXFLAGS) -c -o test_outlang_errors-test_outlang_errors_main.o `test -f 'test_outlang_errors_main.cpp' || echo '$(srcdir)/'`test_outlang_errors_main.cpp test_outlang_errors-test_outlang_errors_main.obj: test_outlang_errors_main.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_outlang_errors_CXXFLAGS) $(CXXFLAGS) -MT test_outlang_errors-test_outlang_errors_main.obj -MD -MP -MF $(DEPDIR)/test_outlang_errors-test_outlang_errors_main.Tpo -c -o test_outlang_errors-test_outlang_errors_main.obj `if test -f 'test_outlang_errors_main.cpp'; then $(CYGPATH_W) 'test_outlang_errors_main.cpp'; else $(CYGPATH_W) '$(srcdir)/test_outlang_errors_main.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/test_outlang_errors-test_outlang_errors_main.Tpo $(DEPDIR)/test_outlang_errors-test_outlang_errors_main.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='test_outlang_errors_main.cpp' object='test_outlang_errors-test_outlang_errors_main.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_outlang_errors_CXXFLAGS) $(CXXFLAGS) -c -o test_outlang_errors-test_outlang_errors_main.obj `if test -f 'test_outlang_errors_main.cpp'; then $(CYGPATH_W) 'test_outlang_errors_main.cpp'; else $(CYGPATH_W) '$(srcdir)/test_outlang_errors_main.cpp'; fi` test_outlangparser-test_outlangparser_main.o: test_outlangparser_main.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_outlangparser_CXXFLAGS) $(CXXFLAGS) -MT test_outlangparser-test_outlangparser_main.o -MD -MP -MF $(DEPDIR)/test_outlangparser-test_outlangparser_main.Tpo -c -o test_outlangparser-test_outlangparser_main.o `test -f 'test_outlangparser_main.cpp' || echo '$(srcdir)/'`test_outlangparser_main.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/test_outlangparser-test_outlangparser_main.Tpo $(DEPDIR)/test_outlangparser-test_outlangparser_main.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='test_outlangparser_main.cpp' object='test_outlangparser-test_outlangparser_main.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_outlangparser_CXXFLAGS) $(CXXFLAGS) -c -o test_outlangparser-test_outlangparser_main.o `test -f 'test_outlangparser_main.cpp' || echo '$(srcdir)/'`test_outlangparser_main.cpp test_outlangparser-test_outlangparser_main.obj: test_outlangparser_main.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_outlangparser_CXXFLAGS) $(CXXFLAGS) -MT test_outlangparser-test_outlangparser_main.obj -MD -MP -MF $(DEPDIR)/test_outlangparser-test_outlangparser_main.Tpo -c -o test_outlangparser-test_outlangparser_main.obj `if test -f 'test_outlangparser_main.cpp'; then $(CYGPATH_W) 'test_outlangparser_main.cpp'; else $(CYGPATH_W) '$(srcdir)/test_outlangparser_main.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/test_outlangparser-test_outlangparser_main.Tpo $(DEPDIR)/test_outlangparser-test_outlangparser_main.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='test_outlangparser_main.cpp' object='test_outlangparser-test_outlangparser_main.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_outlangparser_CXXFLAGS) $(CXXFLAGS) -c -o test_outlangparser-test_outlangparser_main.obj `if test -f 'test_outlangparser_main.cpp'; then $(CYGPATH_W) 'test_outlangparser_main.cpp'; else $(CYGPATH_W) '$(srcdir)/test_outlangparser_main.cpp'; fi` test_settings-test_settings_main.o: test_settings_main.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_settings_CXXFLAGS) $(CXXFLAGS) -MT test_settings-test_settings_main.o -MD -MP -MF $(DEPDIR)/test_settings-test_settings_main.Tpo -c -o test_settings-test_settings_main.o `test -f 'test_settings_main.cpp' || echo '$(srcdir)/'`test_settings_main.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/test_settings-test_settings_main.Tpo $(DEPDIR)/test_settings-test_settings_main.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='test_settings_main.cpp' object='test_settings-test_settings_main.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_settings_CXXFLAGS) $(CXXFLAGS) -c -o test_settings-test_settings_main.o `test -f 'test_settings_main.cpp' || echo '$(srcdir)/'`test_settings_main.cpp test_settings-test_settings_main.obj: test_settings_main.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_settings_CXXFLAGS) $(CXXFLAGS) -MT test_settings-test_settings_main.obj -MD -MP -MF $(DEPDIR)/test_settings-test_settings_main.Tpo -c -o test_settings-test_settings_main.obj `if test -f 'test_settings_main.cpp'; then $(CYGPATH_W) 'test_settings_main.cpp'; else $(CYGPATH_W) '$(srcdir)/test_settings_main.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/test_settings-test_settings_main.Tpo $(DEPDIR)/test_settings-test_settings_main.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='test_settings_main.cpp' object='test_settings-test_settings_main.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_settings_CXXFLAGS) $(CXXFLAGS) -c -o test_settings-test_settings_main.obj `if test -f 'test_settings_main.cpp'; then $(CYGPATH_W) 'test_settings_main.cpp'; else $(CYGPATH_W) '$(srcdir)/test_settings_main.cpp'; fi` test_sourcehighlight-test_sourcehighlight_main.o: test_sourcehighlight_main.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_sourcehighlight_CXXFLAGS) $(CXXFLAGS) -MT test_sourcehighlight-test_sourcehighlight_main.o -MD -MP -MF $(DEPDIR)/test_sourcehighlight-test_sourcehighlight_main.Tpo -c -o test_sourcehighlight-test_sourcehighlight_main.o `test -f 'test_sourcehighlight_main.cpp' || echo '$(srcdir)/'`test_sourcehighlight_main.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/test_sourcehighlight-test_sourcehighlight_main.Tpo $(DEPDIR)/test_sourcehighlight-test_sourcehighlight_main.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='test_sourcehighlight_main.cpp' object='test_sourcehighlight-test_sourcehighlight_main.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_sourcehighlight_CXXFLAGS) $(CXXFLAGS) -c -o test_sourcehighlight-test_sourcehighlight_main.o `test -f 'test_sourcehighlight_main.cpp' || echo '$(srcdir)/'`test_sourcehighlight_main.cpp test_sourcehighlight-test_sourcehighlight_main.obj: test_sourcehighlight_main.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_sourcehighlight_CXXFLAGS) $(CXXFLAGS) -MT test_sourcehighlight-test_sourcehighlight_main.obj -MD -MP -MF $(DEPDIR)/test_sourcehighlight-test_sourcehighlight_main.Tpo -c -o test_sourcehighlight-test_sourcehighlight_main.obj `if test -f 'test_sourcehighlight_main.cpp'; then $(CYGPATH_W) 'test_sourcehighlight_main.cpp'; else $(CYGPATH_W) '$(srcdir)/test_sourcehighlight_main.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/test_sourcehighlight-test_sourcehighlight_main.Tpo $(DEPDIR)/test_sourcehighlight-test_sourcehighlight_main.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='test_sourcehighlight_main.cpp' object='test_sourcehighlight-test_sourcehighlight_main.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_sourcehighlight_CXXFLAGS) $(CXXFLAGS) -c -o test_sourcehighlight-test_sourcehighlight_main.obj `if test -f 'test_sourcehighlight_main.cpp'; then $(CYGPATH_W) 'test_sourcehighlight_main.cpp'; else $(CYGPATH_W) '$(srcdir)/test_sourcehighlight_main.cpp'; fi` test_sourcehighlight_errors-test_sourcehighlight_errors_main.o: test_sourcehighlight_errors_main.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_sourcehighlight_errors_CXXFLAGS) $(CXXFLAGS) -MT test_sourcehighlight_errors-test_sourcehighlight_errors_main.o -MD -MP -MF $(DEPDIR)/test_sourcehighlight_errors-test_sourcehighlight_errors_main.Tpo -c -o test_sourcehighlight_errors-test_sourcehighlight_errors_main.o `test -f 'test_sourcehighlight_errors_main.cpp' || echo '$(srcdir)/'`test_sourcehighlight_errors_main.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/test_sourcehighlight_errors-test_sourcehighlight_errors_main.Tpo $(DEPDIR)/test_sourcehighlight_errors-test_sourcehighlight_errors_main.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='test_sourcehighlight_errors_main.cpp' object='test_sourcehighlight_errors-test_sourcehighlight_errors_main.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_sourcehighlight_errors_CXXFLAGS) $(CXXFLAGS) -c -o test_sourcehighlight_errors-test_sourcehighlight_errors_main.o `test -f 'test_sourcehighlight_errors_main.cpp' || echo '$(srcdir)/'`test_sourcehighlight_errors_main.cpp test_sourcehighlight_errors-test_sourcehighlight_errors_main.obj: test_sourcehighlight_errors_main.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_sourcehighlight_errors_CXXFLAGS) $(CXXFLAGS) -MT test_sourcehighlight_errors-test_sourcehighlight_errors_main.obj -MD -MP -MF $(DEPDIR)/test_sourcehighlight_errors-test_sourcehighlight_errors_main.Tpo -c -o test_sourcehighlight_errors-test_sourcehighlight_errors_main.obj `if test -f 'test_sourcehighlight_errors_main.cpp'; then $(CYGPATH_W) 'test_sourcehighlight_errors_main.cpp'; else $(CYGPATH_W) '$(srcdir)/test_sourcehighlight_errors_main.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/test_sourcehighlight_errors-test_sourcehighlight_errors_main.Tpo $(DEPDIR)/test_sourcehighlight_errors-test_sourcehighlight_errors_main.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='test_sourcehighlight_errors_main.cpp' object='test_sourcehighlight_errors-test_sourcehighlight_errors_main.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_sourcehighlight_errors_CXXFLAGS) $(CXXFLAGS) -c -o test_sourcehighlight_errors-test_sourcehighlight_errors_main.obj `if test -f 'test_sourcehighlight_errors_main.cpp'; then $(CYGPATH_W) 'test_sourcehighlight_errors_main.cpp'; else $(CYGPATH_W) '$(srcdir)/test_sourcehighlight_errors_main.cpp'; fi` test_style_errors-test_style_errors_main.o: test_style_errors_main.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_style_errors_CXXFLAGS) $(CXXFLAGS) -MT test_style_errors-test_style_errors_main.o -MD -MP -MF $(DEPDIR)/test_style_errors-test_style_errors_main.Tpo -c -o test_style_errors-test_style_errors_main.o `test -f 'test_style_errors_main.cpp' || echo '$(srcdir)/'`test_style_errors_main.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/test_style_errors-test_style_errors_main.Tpo $(DEPDIR)/test_style_errors-test_style_errors_main.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='test_style_errors_main.cpp' object='test_style_errors-test_style_errors_main.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_style_errors_CXXFLAGS) $(CXXFLAGS) -c -o test_style_errors-test_style_errors_main.o `test -f 'test_style_errors_main.cpp' || echo '$(srcdir)/'`test_style_errors_main.cpp test_style_errors-test_style_errors_main.obj: test_style_errors_main.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_style_errors_CXXFLAGS) $(CXXFLAGS) -MT test_style_errors-test_style_errors_main.obj -MD -MP -MF $(DEPDIR)/test_style_errors-test_style_errors_main.Tpo -c -o test_style_errors-test_style_errors_main.obj `if test -f 'test_style_errors_main.cpp'; then $(CYGPATH_W) 'test_style_errors_main.cpp'; else $(CYGPATH_W) '$(srcdir)/test_style_errors_main.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/test_style_errors-test_style_errors_main.Tpo $(DEPDIR)/test_style_errors-test_style_errors_main.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='test_style_errors_main.cpp' object='test_style_errors-test_style_errors_main.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_style_errors_CXXFLAGS) $(CXXFLAGS) -c -o test_style_errors-test_style_errors_main.obj `if test -f 'test_style_errors_main.cpp'; then $(CYGPATH_W) 'test_style_errors_main.cpp'; else $(CYGPATH_W) '$(srcdir)/test_style_errors_main.cpp'; fi` test_utils-test_utils_main.o: test_utils_main.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_utils_CXXFLAGS) $(CXXFLAGS) -MT test_utils-test_utils_main.o -MD -MP -MF $(DEPDIR)/test_utils-test_utils_main.Tpo -c -o test_utils-test_utils_main.o `test -f 'test_utils_main.cpp' || echo '$(srcdir)/'`test_utils_main.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/test_utils-test_utils_main.Tpo $(DEPDIR)/test_utils-test_utils_main.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='test_utils_main.cpp' object='test_utils-test_utils_main.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_utils_CXXFLAGS) $(CXXFLAGS) -c -o test_utils-test_utils_main.o `test -f 'test_utils_main.cpp' || echo '$(srcdir)/'`test_utils_main.cpp test_utils-test_utils_main.obj: test_utils_main.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_utils_CXXFLAGS) $(CXXFLAGS) -MT test_utils-test_utils_main.obj -MD -MP -MF $(DEPDIR)/test_utils-test_utils_main.Tpo -c -o test_utils-test_utils_main.obj `if test -f 'test_utils_main.cpp'; then $(CYGPATH_W) 'test_utils_main.cpp'; else $(CYGPATH_W) '$(srcdir)/test_utils_main.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/test_utils-test_utils_main.Tpo $(DEPDIR)/test_utils-test_utils_main.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='test_utils_main.cpp' object='test_utils-test_utils_main.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_utils_CXXFLAGS) $(CXXFLAGS) -c -o test_utils-test_utils_main.obj `if test -f 'test_utils_main.cpp'; then $(CYGPATH_W) 'test_utils_main.cpp'; else $(CYGPATH_W) '$(srcdir)/test_utils_main.cpp'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ 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`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ 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 \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ echo "$$grn$$dashes"; \ else \ echo "$$red$$dashes"; \ fi; \ echo "$$banner"; \ test -z "$$skipped" || echo "$$skipped"; \ test -z "$$report" || echo "$$report"; \ echo "$$dashes$$std"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile $(HEADERS) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ clean-checkPROGRAMS clean-generic clean-libtool ctags \ distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am mytags: $(top_srcdir)/lib/srchilite/test_readtags_main.cpp $(CTAGS) --excmd=n --fields=+n -o mytags $(top_srcdir)/lib/srchilite/test_readtags_main.cpp $(top_srcdir)/lib/srchilite/readtags.h check_test_regexpreprocessor: test_regexpreprocessor$(EXEEXT) ./test_regexpreprocessor$(EXEEXT) check_test_regexrules: test_regexrules$(EXEEXT) ./test_regexrules$(EXEEXT) check_test_formatter_manager: test_formatter_manager$(EXEEXT) ./test_formatter_manager$(EXEEXT) check_test_highlighter: test_highlighter$(EXEEXT) ./test_highlighter$(EXEEXT) check_test_exception: test_exception$(EXEEXT) ./test_exception$(EXEEXT) check_test_highlightbuilder: test_highlightbuilder$(EXEEXT) ./test_highlightbuilder$(EXEEXT) check_test_buffered_output: test_buffered_output$(EXEEXT) ./test_buffered_output$(EXEEXT) check_test_textstyleformatter: test_textstyleformatter$(EXEEXT) ./test_textstyleformatter$(EXEEXT) check_test_textstyle: test_textstyle$(EXEEXT) ./test_textstyle$(EXEEXT) check_test_textgenerator: test_textgenerator$(EXEEXT) ./test_textgenerator$(EXEEXT) check_test_wordtokenizer: test_wordtokenizer$(EXEEXT) ./test_wordtokenizer$(EXEEXT) check_test_ctagscollector: test_ctagscollector$(EXEEXT) ./test_ctagscollector$(EXEEXT) check_test_ctagsformatter: test_ctagsformatter$(EXEEXT) ./test_ctagsformatter$(EXEEXT) check_test_ctagsmanager: test_ctagsmanager$(EXEEXT) ./test_ctagsmanager$(EXEEXT) check_test_formatreferences: test_formatreferences$(EXEEXT) ./test_formatreferences$(EXEEXT) check_test_sourcefilehighlighter: test_sourcefilehighlighter$(EXEEXT) ./test_sourcefilehighlighter$(EXEEXT) check_test_linenum: test_linenum$(EXEEXT) ./test_linenum$(EXEEXT) check_test_textstyleformatterfactory: test_textstyleformatterfactory$(EXEEXT) ./test_textstyleformatterfactory$(EXEEXT) check_test_langdefmanager: test_langdefmanager$(EXEEXT) ./test_langdefmanager$(EXEEXT) check_test_sourcehighlight: test_sourcehighlight$(EXEEXT) ./test_sourcehighlight$(EXEEXT) check_test_sourcehighlight_errors: test_sourcehighlight_errors$(EXEEXT) ./test_sourcehighlight_errors$(EXEEXT) check_test_style_errors: test_style_errors$(EXEEXT) ./test_style_errors$(EXEEXT) check_test_outlang_errors: test_outlang_errors$(EXEEXT) ./test_outlang_errors$(EXEEXT) check_test_filenotfound: test_filenotfound$(EXEEXT) ./test_filenotfound$(EXEEXT) check_test_outlangparser: test_outlangparser$(EXEEXT) ./test_outlangparser$(EXEEXT) check_test_langinfer: test_langinfer$(EXEEXT) ./test_langinfer$(EXEEXT) check_test_untabifier: test_untabifier$(EXEEXT) ./test_untabifier$(EXEEXT) check_test_events: test_events$(EXEEXT) ./test_events$(EXEEXT) check_test_debuglistener: test_debuglistener$(EXEEXT) ./test_debuglistener$(EXEEXT) check_test_lineranges: test_lineranges$(EXEEXT) ./test_lineranges$(EXEEXT) check_test_regexranges: test_regexranges$(EXEEXT) ./test_regexranges$(EXEEXT) check_test_settings: test_settings$(EXEEXT) ./test_settings$(EXEEXT) check_test_langmap: test_langmap$(EXEEXT) ./test_langmap$(EXEEXT) check_test_utils: test_utils$(EXEEXT) ./test_utils$(EXEEXT) check_test_instances: test_instances$(EXEEXT) ./test_instances$(EXEEXT) check-valgrind: $(VALGRIND_TESTS) for prog in $(VALGRIND_TESTS); do \ $(VALGRINDTEST) ./$$prog ; \ done ; # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/tests/logformatter.h�����������������������������������������������������0000644�0001750�0001750�00000002641�11672675564�016523� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2008 // // Copyright: See COPYING file that comes with this distribution // #ifndef LOGFORMATTER_H_ #define LOGFORMATTER_H_ #include <deque> #include <algorithm> #include <iostream> #include "srchilite/formatter.h" using namespace srchilite; struct FormatterLogEntry { /// the element name const std::string first; /// the string to format const std::string second; /// the start of the string in the paragraph const int start; FormatterLogEntry(const std::string &f, const std::string &s, const int i) : first(f), second(s), start(i) { } }; typedef std::deque<FormatterLogEntry> FormatterLog; /** * A simple Formatter implementation that logs the strings to format into * a collection (each element is a pair: <element, string> */ struct LogFormatter: public Formatter { /// the log (shared with other formatters) FormatterLog &log; /// the element represented by this formatter const std::string elem; LogFormatter(FormatterLog &_log, const std::string &_elem); virtual ~LogFormatter(); /** * Append to the log the information about the passed string */ virtual void format(const std::string &s, const FormatterParams *params); }; std::ostream& operator<<(std::ostream& os, const FormatterLogEntry &entry); void showLog(FormatterLog &log); #endif /*LOGFORMATTER_H_*/ �����������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/tests/valgrind_test.sh.in������������������������������������������������0000644�0001750�0001750�00000005040�11672675564�017447� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#! @BASH_SHELL@ # --------------------------------------------------------------------- # # # Script to run some examples through VALGRIND. # # Michael Hagemann <michael.hagemann@unibas.ch> # # modified by Lorenzo Bettini <http://www.lorenzobettini.it> # # this requires bash extensions # # --------------------------------------------------------------------- # # Hack to run valgrind with new glibcs. Problem: new TLS (thread # local storage) #VG_ENV="LD_ASSUME_KERNEL=2.2.5" # --num-callers=20 --leak-check=yes --leak-resolution=high --show-reachable=yes --suppressions=./suppressions.supp # --num-callers=20 --leak-resolution=high --suppressions=/home/bettini/work/src2tags/tests/suppressions.supp VG_PRG="@VALGRIND@" VG_ARGS="--tool=memcheck --num-callers=20 --leak-check=yes --leak-resolution=high --show-reachable=yes" #VG_ARGS="--tool=memcheck --num-callers=20 --leak-check=yes --leak-resolution=high --suppressions=@srcdir@/suppressions.supp" VGRIND="${VG_ENV} ${VG_PRG} ${VG_ARGS}" if test ! -x "${VG_PRG}"; then echo Valgrind not found! Check path. exit 1 fi # --------------------------------------------------------------------- # DATE=`date +"%Y-%m-%d_%H%M"` SUMMARY=valgrind_summary.log TMP_LOG=valgrind_tmp.log ERROR=0 # --------------------------------------------------------------------- # vgrind () { if test ! -x "$1" -o "$1" == `basename $0`; then echo "Skipping $1." return fi echo -n "Running $* ..." tmp_err= if [[ $1 == *.sh ]]; then # echo "$1 ${VGRIND} >${TMP_LOG} 2>&1 ..." eval $1 ${VGRIND} >${TMP_LOG} 2>&1; else # echo "${VGRIND} $* >${TMP_LOG} 2>&1 ..." eval ${VGRIND} $* >${TMP_LOG} 2>&1 fi; #grep -e "LEAK SUMMARY" ${TMP_LOG} >/dev/null 2>&1 grep -E "(reachable|lost): [1-9][0-9]*" ${TMP_LOG} >/dev/null 2>&1 if test "$?" == "0"; then echo -n " LEAKS!" echo "" >> ${SUMMARY} echo "** $*, LEAKS" >> ${SUMMARY} cat ${TMP_LOG} >> ${SUMMARY} tmp_err=1 fi grep -e "[1-9][0-9]* error" ${TMP_LOG} >/dev/null 2>&1 if test "$?" == "0"; then echo -n " ERRORS!" echo "" >> ${SUMMARY} echo "** $*, ERRORS" >> ${SUMMARY} cat ${TMP_LOG} >> ${SUMMARY} tmp_err=1 fi if test "x${tmp_err}" == "x"; then echo " OK." else ERROR=1 echo "" fi rm -f ${TMP_LOG} } # --------------------------------------------------------------------- # echo "Run at ${DATE}" >${SUMMARY} vgrind $* # --------------------------------------------------------------------- # # cat ${SUMMARY} exit ${ERROR} ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/tests/test_lineranges_main.cpp�������������������������������������������0000644�0001750�0001750�00000013426�11672675564�020546� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#include <iostream> #include <iterator> #include "asserttestexit.h" #include "srchilite/lineranges.h" #include <sstream> using namespace std; using namespace srchilite; static std::ostream& operator<<(std::ostream& os, const LineRanges::RangeType &entry); static void check_add_range(LineRanges &lineranges, const string &range); static void check_wrong_add_range(LineRanges &lineranges, const string &range, RangeError error); static void check_in_range(LineRanges &lineranges, const LineRanges::RangeElemType e); static void check_not_in_range(LineRanges &lineranges, const LineRanges::RangeElemType e, bool checkContext = false, bool expectedInContext = false); static void print_line_ranges(ostream &os, const LineRanges &lineranges); void check_add_range(LineRanges &lineranges, const string &range) { RangeError result = lineranges.addRange(range); cout << "checking " << range << "..." << endl; assertTrue(result == NO_ERROR); } void check_wrong_add_range(LineRanges &lineranges, const string &range, RangeError error) { RangeError result = lineranges.addRange(range); cout << "checking " << range << "..." << endl; assertEquals(error, result); } std::ostream& operator<<(std::ostream& os, const LineRanges::RangeType &entry) { if (entry.second == 0) { os << entry.first; } else if (entry.first < 0) { os << "-" << entry.second; } else if (entry.second < 0) { os << entry.first << "-"; } else { os << entry.first << "-" << entry.second; } return os; } void print_line_ranges(ostream &os, const LineRanges &lineranges) { for (LineRanges::LineRangeSet::const_iterator it = lineranges.getLineRangeSet().begin(); it != lineranges.getLineRangeSet().end(); ++it) { os << *it << endl; } } void check_in_range(LineRanges &lineranges, const LineRanges::RangeElemType e) { cout << "is " << e << " in range? "; assertTrue(lineranges.isInRange(e) == IN_RANGE); cout << "yes" << endl; } void check_not_in_range(LineRanges &lineranges, const LineRanges::RangeElemType e, bool checkContext, bool expectedInContext) { cout << "is " << e << " in range (expect no)? "; RangeResult result = lineranges.isInRange(e); assertFalse(result == IN_RANGE); cout << "no" << endl; if (checkContext) { cout << "is " << e << " in context range" << (!expectedInContext ? " (expect no)" : "") << "? "; assertEquals(expectedInContext, result == CONTEXT_RANGE); cout << (expectedInContext ? "yes" : "no") << endl; } } int main() { LineRanges lineranges; ostringstream buffer; check_add_range(lineranges, " 20"); check_add_range(lineranges, "30 "); check_add_range(lineranges, "10"); check_add_range(lineranges, "11-22"); check_add_range(lineranges, "100 - 200"); print_line_ranges(cout, lineranges); print_line_ranges(buffer, lineranges); assertEquals("10\n11-22\n20\n30\n100-200\n", buffer.str()); check_wrong_add_range(lineranges, "foo", INVALID_RANGE_NUMBER); check_add_range(lineranges, "-33"); check_add_range(lineranges, "-20"); check_add_range(lineranges, "101 - "); check_add_range(lineranges, "5 - "); buffer.str(""); print_line_ranges(cout, lineranges); print_line_ranges(buffer, lineranges); assertEquals("-20\n-33\n5-\n10\n11-22\n20\n30\n100-200\n101-\n", buffer.str()); lineranges = LineRanges(); lineranges.addRange("-5"); lineranges.addRange("7"); lineranges.addRange("10-20"); check_in_range(lineranges, 1); check_not_in_range(lineranges, 6); check_in_range(lineranges, 7); check_not_in_range(lineranges, 8); check_in_range(lineranges, 10); check_in_range(lineranges, 15); check_in_range(lineranges, 20); check_not_in_range(lineranges, 25); // now checking lines which are less the ones already checked should fail check_not_in_range(lineranges, 1); check_not_in_range(lineranges, 6); // but if we reset it, it works again lineranges.reset(); check_in_range(lineranges, 1); check_not_in_range(lineranges, 6); check_in_range(lineranges, 7); check_not_in_range(lineranges, 8); lineranges.reset(); lineranges.addRange("30-"); check_in_range(lineranges, 20); check_not_in_range(lineranges, 25); check_in_range(lineranges, 30); check_in_range(lineranges, 100); // with unspecified context lines, we must always get false context lineranges.reset(); check_not_in_range(lineranges, 6, true, false); check_not_in_range(lineranges, 8, true, false); check_not_in_range(lineranges, 25, true, false); lineranges.reset(); lineranges.setContextLines(1); check_not_in_range(lineranges, 6, true, true); check_not_in_range(lineranges, 8, true, true); check_not_in_range(lineranges, 9, true, true); check_not_in_range(lineranges, 25, true, false); check_not_in_range(lineranges, 28, true, false); check_not_in_range(lineranges, 29, true, true); lineranges.reset(); lineranges.setContextLines(2); check_not_in_range(lineranges, 6, true, true); check_not_in_range(lineranges, 8, true, true); check_not_in_range(lineranges, 9, true, true); check_not_in_range(lineranges, 25, true, false); check_not_in_range(lineranges, 28, true, true); check_not_in_range(lineranges, 29, true, true); lineranges.reset(); lineranges.setContextLines(5); check_not_in_range(lineranges, 6, true, true); check_not_in_range(lineranges, 8, true, true); check_not_in_range(lineranges, 9, true, true); check_not_in_range(lineranges, 25, true, true); check_not_in_range(lineranges, 28, true, true); check_not_in_range(lineranges, 29, true, true); return 0; } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/tests/test_ctagsformatter_main.cpp���������������������������������������0000644�0001750�0001750�00000006251�11672675564�021442� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#include <iostream> #include "asserttestexit.h" #include "srchilite/ctagscollector.h" #include "srchilite/ctagsformatter.h" #include "srchilite/formatterparams.h" #include "srchilite/tostringcollection.h" using namespace std; using namespace srchilite; #ifndef BASEDIR #define BASEDIR "" #endif void printResults(const CTagsFormatterResults &results) { if (results.inlineResult.size()) { cout << "INLINE: " << results.inlineResult << endl; } else { if (results.postLineResult.size()) { cout << "POSTLINE: " << collectionRefToString(results.postLineResult, '\n'); } if (results.postDocResult.size()) { cout << "POSTDOC: " << collectionRefToString(results.postDocResult, '\n'); } } } int main() { CTagsCollector collectorInline("mytags", INLINE); CTagsFormatterResults results; string sourceFile = string(BASEDIR) + "readtags.h"; TextStyles textStyles; const char *vars[] = { "linenum", "infilename", "infile", "outfile", 0 }; textStyles.refstyle.anchor = TextStyle( "<A>$text - $outfile - $infile($infilename):$linenum<A>", vars); textStyles.refstyle.inline_reference = TextStyle( "<IN>$text - $outfile - $infile($infilename):$linenum<IN>", vars); textStyles.refstyle.postline_reference = TextStyle( "<PL>$text - $outfile - $infile($infilename):$linenum<PL>", vars); textStyles.refstyle.postdoc_reference = TextStyle( "<PD>$text - $outfile - $infile($infilename):$linenum<PD>", vars); // pretend the output is readtags.html PreFormatter preformatter; CTagsFormatter formatter(&preformatter, textStyles.refstyle, &collectorInline); formatter.setFileInfo(sourceFile, "readtags.html"); // test tags found in file readtags.h FormatterParams fileInfo(sourceFile); fileInfo.filename = sourceFile; fileInfo.line = 1; formatter.formatCTags("READTAGS_H", results, &fileInfo); printResults(results); assertEquals("<IN>READTAGS_H - readtags.html - " + sourceFile + "(readtags.h):22<IN>", results.inlineResult); results.clear(); fileInfo.line = 22; // this must be detected as an anchor, since the line number is the same formatter.formatCTags("READTAGS_H", results, &fileInfo); printResults(results); assertEquals("<A>READTAGS_H - readtags.html - " + sourceFile + "(readtags.h):22<A>", results.inlineResult); results.clear(); formatter.formatCTags("file", results, &fileInfo); printResults(results); assertEquals("<PL>file - readtags.html - " + sourceFile + "(readtags.h):112<PL>\n<PL>file - readtags.html - " + sourceFile + "(readtags.h):72<PL>\n", collectionRefToString(results.postLineResult, 0)); results.clear(); collectorInline.setRefPosition(POSTDOC); fileInfo.line = 1; formatter.formatCTags("READTAGS_H", results, &fileInfo); printResults(results); // this should be postdoc assertEquals("<PD>READTAGS_H - readtags.html - " + sourceFile + "(readtags.h):22<PD>\n", collectionRefToString(results.postDocResult, 0)); cout << "test_ctagsformatter: SUCCESS!" << endl; return 0; } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/tests/test_untabifier_main.cpp�������������������������������������������0000644�0001750�0001750�00000001537�11672675564�020547� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#include <iostream> #include "asserttestexit.h" #include "srchilite/srcuntabifier.h" using namespace std; using namespace srchilite; int main() { Untabifier untabifier(4); string orig = "\twith\t\ttabs"; cout << "orig : " << orig << endl; string preformat = untabifier.preformat(orig); cout << "preformat: " << preformat << endl; assertEquals(" with tabs", preformat); Untabifier untabifier2(4); preformat = untabifier2.preformat(orig); cout << "preformat: " << preformat << endl; //assertEquals(" with tabs", preformat); preformat = untabifier2.preformat("\n"); preformat = untabifier2.preformat("\tsecond line"); cout << "preformat: " << preformat << endl; assertEquals(" second line", preformat); cout << "test_untabifier: SUCCESS" << endl; return 0; } �����������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/tests/logformatter.cpp���������������������������������������������������0000644�0001750�0001750�00000001564�11672675564�017061� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2008 // // Copyright: See COPYING file that comes with this distribution // #include "logformatter.h" #include "srchilite/formatterparams.h" using namespace std; using namespace srchilite; LogFormatter::LogFormatter(FormatterLog &_log, const std::string &_elem) : log(_log), elem(_elem) { } LogFormatter::~LogFormatter() { } void LogFormatter::format(const std::string &s, const FormatterParams *params) { log.push_back(FormatterLogEntry(elem, s, (params ? params->start : -2))); } ostream& operator<<(ostream& os, const FormatterLogEntry &entry) { os << entry.first << ": \"" << entry.second << "\"" << ", start: " << entry.start; return os; } void showLog(FormatterLog &log) { for (FormatterLog::const_iterator it = log.begin(); it != log.end(); ++it) cout << *it << endl; } ��������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/tests/test_exception_main.cpp��������������������������������������������0000644�0001750�0001750�00000001472�11672675564�020413� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2008 // // Copyright: See COPYING file that comes with this distribution // #include <iostream> #include "srchilite/highlightbuilderexception.h" #include "srchilite/parserinfo.h" #include "asserttestexit.h" #include <sstream> #include "stdboosterror.h" using namespace std; using namespace srchilite; int main() { ostringstream os; ParserInfo parserInfo("foo"); parserInfo.line = 10; HighlightBuilderException testException("test exception", &parserInfo); // cout << "OUTPUT: " << testException << endl; os << testException; string causedby = boost::regex_error(boost::regex_constants::error_bad_pattern).what(); assertEquals("foo:10: test exception\n" + stdBoostCausedBy("foo", "10"), os.str()); return 0; } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/tests/test_langmap_main.cpp����������������������������������������������0000644�0001750�0001750�00000003323�11672675564�020031� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/** * Tests for language inference, class LanguageInfer */ #include "srchilite/langmap.h" #include <sstream> #include <iterator> #include "asserttestexit.h" using namespace std; using namespace srchilite; LangMap langmap(BASEDIR "test.map"); static void testMapFromFileName(const string &input, const string &expected); void testMapFromFileName(const string &input, const string &expected) { string mapped = langmap.getMappedFileNameFromFileName(input); cout << input << " mapped to: " << mapped << endl; assertEquals(expected, mapped); } int main() { langmap.open(); cout << BASEDIR << "test.map contents: " << endl; langmap.print(); testMapFromFileName("foo.C", "cpp.lang"); testMapFromFileName("foo.c", "c.lang"); testMapFromFileName("Makefile.am", "makefile.lang"); testMapFromFileName("Makefile", "Makefile.lang"); testMapFromFileName("/my/long/path/Makefile", "Makefile.lang"); testMapFromFileName("makefile", "makefile.lang"); testMapFromFileName("ChangeLog", "changelog.lang"); set<string> langs = langmap.getLangNames(); set<string> langfiles = langmap.getMappedFileNames(); cout << "lang names: " << endl; ostringstream Langs; copy(langs.begin(), langs.end(), ostream_iterator<string>(Langs, " ")); cout << Langs.str() << endl; assertEquals("C ChangeLog Makefile am c changelog makefile ", Langs.str()); cout << "lang def file names: " << endl; Langs.str(""); copy(langfiles.begin(), langfiles.end(), ostream_iterator<string>(Langs, " ")); cout << Langs.str() << endl; assertEquals("Makefile.lang c.lang changelog.lang cpp.lang makefile.lang ", Langs.str()); cout << "test_langmap: SUCCESS" << endl; return 0; } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/tests/test_regexranges_main.cpp������������������������������������������0000644�0001750�0001750�00000005230�11672675564�020723� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#include <iostream> #include <iterator> #include "asserttestexit.h" #include "srchilite/regexranges.h" #include <iostream> using namespace std; using namespace srchilite; RegexRanges ranges; void check_range_regex(const string &s, bool expectedTrue = true) { cout << "checking " << s << endl; if (expectedTrue) assertTrue(ranges.addRegexRange(s)); else assertFalse(ranges.addRegexRange(s)); } void check_match(const string &line, const string &expected = "") { cout << "searching inside " << line; const boost::regex *matched = 0; if (expected != "") { matched = ranges.matches(line); assertTrue(matched != 0); assertEquals(expected, matched->str()); cout << " found " << *matched << endl; } else { assertTrue(ranges.matches(line) == 0); cout << " not found" << endl; } } void check_in_range(const string &s, bool expectedTrue = true) { cout << "checking " << s << "... "; if (expectedTrue) { assertTrue(ranges.isInRange(s)); } else { assertFalse(ranges.isInRange(s)); } cout << expectedTrue << endl; } int main() { cout << boolalpha; check_range_regex("simple regex"); check_range_regex("[[:alpha:]]+"); // test with a wrong regular expression check_range_regex("{notclosed", false); // reset regular expressions ranges.clear(); check_range_regex("/// foo"); check_range_regex("/// bar"); check_match(" not contains the searched string...", ""); check_match(" does contain /// foo the searched string...", "/// foo"); check_match(" does contain /// bar the searched string...", "/// bar"); check_in_range("not in range", false); check_in_range("not in range, /// bar but the range starts", false); check_in_range("now in range", true); check_in_range("still in range, and /// foo is not considered now", true); check_in_range("end of range /// bar", false); check_in_range("not in range", false); check_in_range("not in range, /// foo but the range starts", false); check_in_range("now in range", true); check_in_range("now in range", true); check_in_range("end of range /// foo", false); check_in_range("not in range", false); // now try with a more involved regular expression check_range_regex("/// [[:digit:]]{2}"); check_in_range("not in range", false); check_in_range("not in range, /// 25 but the range starts", false); check_in_range("now in range", true); check_in_range("still in range, and /// foo is not considered now", true); check_in_range("end of range /// 27", false); check_in_range("not in range", false); return 0; } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/tests/test_formatter_manager_main.cpp������������������������������������0000644�0001750�0001750�00000002632�11672675564�022111� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#include <iostream> #include "srchilite/formattermanager.h" #include "asserttestexit.h" using namespace std; using namespace srchilite; class MyFormatter : public Formatter { virtual void format(const std::string &s, const FormatterParams *params) { cout << "formatting " << s << endl; } }; int main() { FormatterPtr defaultFormatter = FormatterPtr(new MyFormatter); FormatterManager formatterManager(defaultFormatter); FormatterPtr fooFormatter = FormatterPtr(new MyFormatter); FormatterPtr barFormatter = FormatterPtr(new MyFormatter); formatterManager.addFormatter("foo", fooFormatter); formatterManager.addFormatter("bar", barFormatter); assertEquals(defaultFormatter.get(), formatterManager.getFormatter("nonexistent").get()); assertEquals(fooFormatter.get(), formatterManager.getFormatter("foo").get()); assertEquals(barFormatter.get(), formatterManager.getFormatter("bar").get()); // hasGenerator returns an invalid pointer if there's no association assertTrue(formatterManager.hasFormatter("non existent").get() == 0); assertEquals(fooFormatter.get(), formatterManager.hasFormatter("foo").get()); // check that reset removes all elements in the map formatterManager.reset(); assertTrue(formatterManager.getFormatterMap().size() == 0, "formatter map should be empty"); cout << "test_formatter_manager: SUCCESS" << endl; return 0; } ������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/tests/test_utils_main.cpp������������������������������������������������0000644�0001750�0001750�00000003446�11672675564�017560� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/** * Tests for SourceHighlightUtils */ #include "srchilite/sourcehighlightutils.h" #include <sstream> #include <iostream> #include <iterator> #include <algorithm> #include "asserttestexit.h" using namespace std; using namespace srchilite; static void printStringSet(const StringSet &s, const string &sep = " "); void printStringSet(const StringSet &s, const string &sep) { std::copy(s.begin(), s.end(), std::ostream_iterator<string>(cout, sep.c_str())); } int main() { StringSet strings = SourceHighlightUtils::getFileNames(BASEDIR, "lang"); printStringSet(strings); cout << endl; assertTrue(strings.find("java.lang") != strings.end(), "expected java.lang"); assertTrue(strings.find("symbols.lang") != strings.end(), "expected symbols.lang"); assertTrue(strings.find("foobar.lang") == strings.end(), "NON expected foobar.lang"); strings = SourceHighlightUtils::getStyleFileNames(BASEDIR); printStringSet(strings); cout << endl; assertTrue(strings.find("default.style") != strings.end(), "expected default.style"); strings = SourceHighlightUtils::getCssStyleFileNames(BASEDIR); printStringSet(strings); cout << endl; assertTrue(strings.find("default.css") != strings.end(), "expected default.css"); strings = SourceHighlightUtils::getLangFileNames(BASEDIR); printStringSet(strings); cout << endl; assertTrue(strings.find("java.lang") != strings.end(), "expected java.lang"); strings = SourceHighlightUtils::getOutLangFileNames(BASEDIR); printStringSet(strings); cout << endl; assertTrue(strings.find("html.outlang") != strings.end(), "expected html.outlang"); cout << "test_utils: SUCCESS" << endl; return 0; } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/tests/test_textstyle_main.cpp��������������������������������������������0000644�0001750�0001750�00000003051�11672675564�020455� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// tests for class TextStyle #include <iostream> #include "asserttestexit.h" #include "srchilite/textstyle.h" using namespace std; using namespace srchilite; int main() { string orig = "<font color=\"$style\">$text</font>"; string expected = "<font color=\"green\">foo</font>"; string transformed; TextStyle textStyle1(orig); transformed = textStyle1.output("foo", "green"); cout << "orig: " << textStyle1.toString() << endl; cout << "transformed: " << transformed << endl; assertEquals(true, textStyle1.containsStyleVar()); assertEquals(expected, transformed); orig = "<b>$text</b>"; expected = "<b>foo</b>"; textStyle1 = TextStyle(orig); transformed = textStyle1.output("foo", "green"); cout << "orig: " << textStyle1.toString() << endl; cout << "transformed: " << transformed << endl; assertEquals(false, textStyle1.containsStyleVar()); assertEquals(expected, transformed); TextStyle inner("<i>$text</i>"); TextStyle composed = textStyle1.compose(inner); transformed = composed.output("foo"); cout << "orig:" << composed.toString() << endl; cout << "transformed: " << transformed << endl; assertEquals("<b><i>foo</i></b>", transformed); expected = "(\\foo)"; textStyle1 = TextStyle(); transformed = textStyle1.output("(\\foo)", "green"); cout << "orig: " << textStyle1.toString() << endl; cout << "transformed: " << transformed << endl; assertEquals(expected, transformed); cout << "test_textstyle: SUCCESS!" << endl; return 0; } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/tests/test_langdefmanager_main.cpp���������������������������������������0000644�0001750�0001750�00000002662�11672675564�021352� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#include <iostream> #include "srchilite/langdefmanager.h" #include "srchilite/regexrulefactory.h" #include "srchilite/highlightstateprinter.h" #include "asserttestexit.h" using namespace std; using namespace srchilite; HighlightStatePrinter coutPrinter; int main() { RegexRuleFactory ruleFactory; LangDefManager langdefManager(&ruleFactory); HighlightStatePtr highlightState; HighlightStatePtr highlightState2; highlightState = langdefManager.getHighlightState(BASEDIR, "c_comment.lang"); highlightState2 = langdefManager.getHighlightState(BASEDIR, "c_comment.lang"); cout << "c_comment.lang: " << endl; coutPrinter.printHighlightState(highlightState.get()); cout << endl; // the second one must be the same of the previous one (using the cache) assertEquals(highlightState->getId(), highlightState2->getId()); highlightState2 = langdefManager.buildHighlightState(BASEDIR, "c_comment.lang"); // the second one must be different from the previous one (not using the cache) assertFalse(highlightState->getId() == highlightState2->getId()); // check for a more complex language definition file highlightState = langdefManager.getHighlightState(BASEDIR, "java.lang"); cout << "java.lang: " << endl; coutPrinter.printHighlightState(highlightState.get()); cout << endl; cout << "test_langdefmanager: SUCCESS" << endl; return 0; } ������������������������������������������������������������������������������source-highlight-3.1.6/lib/tests/test_textstyleformatter_main.cpp�����������������������������������0000644�0001750�0001750�00000003043�11672675564�022402� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// tests for class TextStyle #include <iostream> #include "asserttestexit.h" #include "srchilite/textstyleformatter.h" #include "srchilite/bufferedoutput.h" #include <sstream> #include "srchilite/srcuntabifier.h" using namespace std; using namespace srchilite; class MyPreFormatter : public PreFormatter { public: virtual ~MyPreFormatter() { } protected: /** * test performatting */ virtual const std::string doPreformat(const std::string &text) { return "{" + text + "}"; } }; int main() { ostringstream os; BufferedOutput bufferedOutput(os); string orig = "<font color=\"green\">$text</font>"; string expected = "<font color=\"green\">foo</font>"; string transformed; TextStyle textStyle1(orig); TextStyleFormatter formatter(textStyle1); formatter.setBufferedOutput(&bufferedOutput); formatter.format("foo"); cout << "formatted: " << os.str() << endl; assertEquals(expected, os.str()); // test the preformatter MyPreFormatter preformatter; formatter.setPreFormatter(&preformatter); os.str(""); formatter.format("foo"); cout << "formatted: " << os.str() << endl; assertEquals("<font color=\"green\">{foo}</font>", os.str()); Untabifier untabifier(3); formatter.setPreFormatter(&untabifier); os.str(""); formatter.format("\tfoo\t"); cout << "formatted: " << os.str() << endl; assertEquals("<font color=\"green\"> foo </font>", os.str()); cout << "test_textstyleformatter: SUCCESS" << endl; return 0; } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/tests/test_debuglistener_main.cpp����������������������������������������0000644�0001750�0001750�00000013504�11672675564�021250� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#include <iostream> #include "srchilite/sourcehighlighter.h" #include "srchilite/sourcefilehighlighter.h" #include "srchilite/formattermanager.h" #include "srchilite/regexrulefactory.h" #include "srchilite/regexhighlightrule.h" #include "asserttestexit.h" #include <sstream> #include "srchilite/bufferedoutput.h" #include "srchilite/textstyleformatter.h" #include "srchilite/chartranslator.h" #include "srchilite/linenumgenerator.h" #include "srchilite/debuglistener.h" /* static void check_log_entry(const FormatterLogEntry &e, const std::string &elem, const std::string &s); void check_log_entry(const FormatterLogEntry &e, const std::string &elem, const std::string &s) { assertEquals(elem, e.first); assertEquals(s, e.second); } */ using namespace std; using namespace srchilite; int main() { ostringstream os; ostringstream osdebug; DebugListener debugger(osdebug); RegexRuleFactory factory; BufferedOutput output(os); FormatterPtr normalFormatter = FormatterPtr(new TextStyleFormatter("$text", &output)); FormatterPtr keywordFormatter = FormatterPtr(new TextStyleFormatter("<K>$text</K>", &output)); FormatterPtr commentFormatter = FormatterPtr(new TextStyleFormatter("<C>$text</C>", &output)); FormatterManager formatterManager(normalFormatter); formatterManager.addFormatter("keyword", keywordFormatter); formatterManager.addFormatter("comment", commentFormatter); HighlightStatePtr highlightState = HighlightStatePtr(new HighlightState); SourceHighlighter sourceHighlighter(highlightState); sourceHighlighter.setFormatterManager(&formatterManager); sourceHighlighter.addListener(&debugger); SourceFileHighlighter highlighter("test", &sourceHighlighter, &output); // now the state has no rules, so we should see only "normal" formatting highlighter.highlight("this is a normal\nstring"); cout << "HIGHLIGHTED: " << os.str() << endl; assertEquals("this is a normal\nstring", os.str()); assertEquals( "formatting \"this is a normal\" as default\nformatting \"string\" as default\n", osdebug.str()); // now we add some rules os.str(""); osdebug.str(""); WordList keywords; keywords.push_back("class"); keywords.push_back("public"); highlightState->addRule(HighlightRulePtr(factory.createWordListRule( "keyword", keywords))); highlightState->getRuleList().back()->setAdditionalInfo("foo.lang:10"); highlighter.highlight("this is a public class and\nhere's another class\nend"); cout << "HIGHLIGHTED: " << os.str() << endl; assertEquals( "this is a <K>public</K> <K>class</K> and\nhere's another <K>class</K>\nend", os.str()); cout << "DEBUG: " << osdebug.str() << endl; // test comments (environments) os.str(""); osdebug.str(""); HighlightRulePtr multiLineCommentRule = HighlightRulePtr(factory.createMultiLineRule("comment", "/\\*", "\\*/", "", false)); multiLineCommentRule->setAdditionalInfo("comment.lang:20"); HighlightStatePtr multiLineCommentState = multiLineCommentRule->getNextState(); multiLineCommentState->getRuleList().front()->setAdditionalInfo("comment.lang:20"); assertTrue(multiLineCommentState.get()); highlightState->addRule(multiLineCommentRule); // now we set its default element (to comment) multiLineCommentState->setDefaultElement("comment"); highlighter.highlight("this is /* a comment\nthat spans\nmore lines\n*/\na public class and\nhere's another class\nend"); cout << "HIGHLIGHTED: " << os.str() << endl; assertEquals( "this is <C>/*</C><C> a comment</C>\n\ <C>that spans</C>\n\ <C>more lines</C>\n\ <C>*/</C>\n\ a <K>public</K> <K>class</K> and\n\ here's another <K>class</K>\n\ end", os.str()); cout << "DEBUG: " << osdebug.str() << endl; // test optimizations (buffer adiacent elements) os.str(""); sourceHighlighter.setOptimize(true); highlighter.highlight("this is /* a comment\nthat spans\nmore lines\n*/ a public class end"); cout << "HIGHLIGHTED: " << os.str() << endl; assertEquals( "this is <C>/* a comment</C>\n\ <C>that spans</C>\n\ <C>more lines</C>\n\ <C>*/</C> a <K>public</K> <K>class</K> end", os.str()); // test char translator for newlines os.str(""); CharTranslator charTranslator; charTranslator.set_translation("\n", "<NL>\n"); highlighter.setPreformatter(&charTranslator); highlighter.highlight("this is /* a comment\nthat spans\nmore lines\n*/ a public class end"); cout << "HIGHLIGHTED: " << os.str() << endl; assertEquals( "this is <C>/* a comment</C><NL>\n\ <C>that spans</C><NL>\n\ <C>more lines</C><NL>\n\ <C>*/</C> a <K>public</K> <K>class</K> end", os.str()); // test for line number generation os.str(""); TextStyle lineStyle("<LINE>$text</LINE>"); LineNumGenerator lineNumGen(lineStyle, 5); highlighter.setLineNumGenerator(&lineNumGen); highlighter.highlight("this is /* a comment\nthat spans more lines\n*/ end"); cout << "HIGHLIGHTED: " << os.str() << endl; assertEquals( "<LINE>00001:</LINE> this is <C>/* a comment</C><NL>\n\ <LINE>00002:</LINE> <C>that spans more lines</C><NL>\n\ <LINE>00003:</LINE> <C>*/</C> end", os.str()); // test for line prefix os.str(""); highlighter.setLinePrefix(" PREFIX "); highlighter.highlight("this is /* a comment\nthat spans more lines\n*/ end"); cout << "HIGHLIGHTED: " << os.str() << endl; assertEquals( " PREFIX <LINE>00001:</LINE> this is <C>/* a comment</C><NL>\n\ PREFIX <LINE>00002:</LINE> <C>that spans more lines</C><NL>\n\ PREFIX <LINE>00003:</LINE> <C>*/</C> end", os.str()); cout << "test_debuglistener: SUCCESS" << endl; return 0; } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/tests/testconffile.conf��������������������������������������������������0000644�0001750�0001750�00000000062�11672675564�017174� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# just a conf file used for test datadir = "foo" ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/tests/source-highlight.conf����������������������������������������������0000644�0001750�0001750�00000000062�11672675564�017754� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# just a conf file used for test datadir = "foo" ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/tests/stdboosterror.h����������������������������������������������������0000644�0001750�0001750�00000001251�11672675564�016725� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef STDBOOSTERROR_H_ #define STDBOOSTERROR_H_ #include <boost/regex/pattern_except.hpp> static boost::regex_error std_boost_exception(boost::regex_error(boost::regex_constants::error_bad_pattern)); /** * returns the string representing a standard exception (which * can be different from system to system) */ const std::string stdBoostExceptionToString() { return std_boost_exception.what(); } const std::string stdBoostCausedBy(const std::string &filename = "", const std::string &line = "") { return (filename.size() ? filename + ":" + line + ": " : "") + "Caused by: " + stdBoostExceptionToString(); } #endif /*STDBOOSTERROR_H_*/ �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/tests/Makefile.am��������������������������������������������������������0000644�0001750�0001750�00000021261�11672675564�015700� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Copyright (C) 1999-2008 Lorenzo Bettini <http://www.lorenzobettini.it> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. AM_CPPFLAGS = -I$(top_srcdir)/gl -I$(top_builddir)/gl $(BOOST_CPPFLAGS) AM_LDFLAGS = $(BOOST_LDFLAGS) -no-install LDADD = $(top_builddir)/gl/libgnu.la $(LIBDIR)/libsource-highlight.la $(BOOST_REGEX_LIB) #LIBDIR = $(top_builddir)/lib/srchilite/ LIBDIR = ../srchilite/ INCLUDES = -I@top_srcdir@/src -I@srcdir@/.. VALGRIND_TESTS = test_regexrules test_formatter_manager test_highlighter \ test_exception test_highlightbuilder test_buffered_output \ test_textstyle test_textgenerator test_textstyleformatter test_wordtokenizer test_linenum \ test_sourcefilehighlighter test_textstyleformatterfactory \ test_langdefmanager test_sourcehighlight test_sourcehighlight_errors test_langinfer \ test_untabifier test_outlangparser test_outlang_errors test_events test_debuglistener \ test_regexpreprocessor test_filenotfound test_style_errors \ test_lineranges test_regexranges test_settings test_langmap \ test_utils test_instances if !NO_CTAGS VALGRIND_TESTS += test_ctagscollector test_ctagsformatter test_ctagsmanager \ test_formatreferences endif TESTS = $(VALGRIND_TESTS) test_sourcehighlight_errors check_PROGRAMS = $(TESTS) test_regexrules_SOURCES = test_regexrules_main.cpp test_formatter_manager_SOURCES = test_formatter_manager_main.cpp test_highlighter_SOURCES = logformatter.cpp test_highlighter_main.cpp test_exception_SOURCES = test_exception_main.cpp test_highlightbuilder_SOURCES = logformatter.cpp test_highlightbuilder_main.cpp test_buffered_output_SOURCES = test_buffered_output_main.cpp test_textstyle_SOURCES = test_textstyle_main.cpp test_textstyleformatter_SOURCES = test_textstyleformatter_main.cpp test_textgenerator_SOURCES = test_textgenerator_main.cpp test_wordtokenizer_SOURCES = test_wordtokenizer_main.cpp test_ctagscollector_SOURCES = test_ctagscollector_main.cpp test_ctagscollector_DEPENDENCIES = mytags test_ctagscollector_CXXFLAGS = -D BASEDIR="\"$(top_srcdir)/lib/srchilite/\"" test_ctagsformatter_SOURCES = test_ctagsformatter_main.cpp test_ctagsformatter_DEPENDENCIES = mytags test_ctagsformatter_CXXFLAGS = -D BASEDIR="\"$(top_srcdir)/lib/srchilite/\"" test_ctagsmanager_SOURCES = test_ctagsmanager_main.cpp test_ctagsmanager_DEPENDENCIES = mytags test_ctagsmanager_CXXFLAGS = -D BASEDIR="\"$(top_srcdir)/lib/srchilite/\"" -D CTAGS="\"$(CTAGS)\"" test_formatreferences_SOURCES = logformatter.cpp test_formatreferences_main.cpp test_formatreferences_DEPENDENCIES = mytags test_formatreferences_CXXFLAGS = -D BASEDIR="\"$(top_srcdir)/lib/srchilite/\"" test_untabifier_SOURCES = test_untabifier_main.cpp test_sourcefilehighlighter_SOURCES = test_sourcefilehighlighter_main.cpp test_lineranges_SOURCES = test_lineranges_main.cpp test_regexranges_SOURCES = test_regexranges_main.cpp test_debuglistener_SOURCES = test_debuglistener_main.cpp test_linenum_SOURCES = test_linenum_main.cpp test_textstyleformatterfactory_SOURCES = test_textstyleformatterfactory_main.cpp test_langdefmanager_SOURCES = test_langdefmanager_main.cpp test_langdefmanager_CXXFLAGS = -D BASEDIR="\"$(top_srcdir)/src/\"" test_sourcehighlight_SOURCES = test_sourcehighlight_main.cpp test_sourcehighlight_CXXFLAGS = -D BASEDIR="\"$(top_srcdir)/src/\"" -D TESTSDIR="\"$(top_srcdir)/tests/\"" test_sourcehighlight_errors_SOURCES = test_sourcehighlight_errors_main.cpp test_sourcehighlight_errors_CXXFLAGS = -D BASEDIR="\"$(top_srcdir)/src/\"" -D TESTSDIR="\"$(top_srcdir)/tests/\"" test_style_errors_SOURCES = test_style_errors_main.cpp test_style_errors_CXXFLAGS = -D BASEDIR="\"$(top_srcdir)/src/\"" -D TESTSDIR="\"$(top_srcdir)/tests/\"" test_outlang_errors_SOURCES = test_outlang_errors_main.cpp test_outlang_errors_CXXFLAGS = -D BASEDIR="\"$(top_srcdir)/src/\"" -D TESTSDIR="\"$(top_srcdir)/tests/\"" test_filenotfound_SOURCES = test_filenotfound_main.cpp test_filenotfound_CXXFLAGS = -D BASEDIR="\"$(top_srcdir)/src/\"" -D TESTSDIR="\"$(top_srcdir)/tests/\"" test_outlangparser_SOURCES = test_outlangparser_main.cpp test_outlangparser_DEPENDENCIES = outlangtest.outlang test_outlangparser_CXXFLAGS = -D BASEDIR="\"$(srcdir)/\"" -D TESTSDIR="\"$(top_srcdir)/tests/\"" test_langinfer_SOURCES = test_langinfer_main.cpp test_settings_SOURCES = test_settings_main.cpp test_settings_CXXFLAGS = -D BASEDIR="\"$(srcdir)/\"" -D TESTSDIR="\"$(top_srcdir)/tests/\"" \ -D MAINSRCDIR="\"$(top_srcdir)/src/\"" test_events_SOURCES = test_events_main.cpp test_regexpreprocessor_SOURCES = test_regexpreprocessor_main.cpp test_langmap_SOURCES = test_langmap_main.cpp test_langmap_CXXFLAGS = -D BASEDIR="\"$(srcdir)/\"" -D TESTSDIR="\"$(top_srcdir)/tests/\"" test_utils_SOURCES = test_utils_main.cpp test_utils_CXXFLAGS = -D BASEDIR="\"$(top_srcdir)/src/\"" test_instances_SOURCES = test_instances_main.cpp test_instances_CXXFLAGS = -D BASEDIR="\"$(srcdir)/\"" -D TESTSDIR="\"$(top_srcdir)/tests/\"" mytags: $(top_srcdir)/lib/srchilite/test_readtags_main.cpp $(CTAGS) --excmd=n --fields=+n -o mytags $(top_srcdir)/lib/srchilite/test_readtags_main.cpp $(top_srcdir)/lib/srchilite/readtags.h check_test_regexpreprocessor: test_regexpreprocessor$(EXEEXT) ./test_regexpreprocessor$(EXEEXT) check_test_regexrules: test_regexrules$(EXEEXT) ./test_regexrules$(EXEEXT) check_test_formatter_manager: test_formatter_manager$(EXEEXT) ./test_formatter_manager$(EXEEXT) check_test_highlighter: test_highlighter$(EXEEXT) ./test_highlighter$(EXEEXT) check_test_exception: test_exception$(EXEEXT) ./test_exception$(EXEEXT) check_test_highlightbuilder: test_highlightbuilder$(EXEEXT) ./test_highlightbuilder$(EXEEXT) check_test_buffered_output: test_buffered_output$(EXEEXT) ./test_buffered_output$(EXEEXT) check_test_textstyleformatter: test_textstyleformatter$(EXEEXT) ./test_textstyleformatter$(EXEEXT) check_test_textstyle: test_textstyle$(EXEEXT) ./test_textstyle$(EXEEXT) check_test_textgenerator: test_textgenerator$(EXEEXT) ./test_textgenerator$(EXEEXT) check_test_wordtokenizer: test_wordtokenizer$(EXEEXT) ./test_wordtokenizer$(EXEEXT) check_test_ctagscollector: test_ctagscollector$(EXEEXT) ./test_ctagscollector$(EXEEXT) check_test_ctagsformatter: test_ctagsformatter$(EXEEXT) ./test_ctagsformatter$(EXEEXT) check_test_ctagsmanager: test_ctagsmanager$(EXEEXT) ./test_ctagsmanager$(EXEEXT) check_test_formatreferences: test_formatreferences$(EXEEXT) ./test_formatreferences$(EXEEXT) check_test_sourcefilehighlighter: test_sourcefilehighlighter$(EXEEXT) ./test_sourcefilehighlighter$(EXEEXT) check_test_linenum: test_linenum$(EXEEXT) ./test_linenum$(EXEEXT) check_test_textstyleformatterfactory: test_textstyleformatterfactory$(EXEEXT) ./test_textstyleformatterfactory$(EXEEXT) check_test_langdefmanager: test_langdefmanager$(EXEEXT) ./test_langdefmanager$(EXEEXT) check_test_sourcehighlight: test_sourcehighlight$(EXEEXT) ./test_sourcehighlight$(EXEEXT) check_test_sourcehighlight_errors: test_sourcehighlight_errors$(EXEEXT) ./test_sourcehighlight_errors$(EXEEXT) check_test_style_errors: test_style_errors$(EXEEXT) ./test_style_errors$(EXEEXT) check_test_outlang_errors: test_outlang_errors$(EXEEXT) ./test_outlang_errors$(EXEEXT) check_test_filenotfound: test_filenotfound$(EXEEXT) ./test_filenotfound$(EXEEXT) check_test_outlangparser: test_outlangparser$(EXEEXT) ./test_outlangparser$(EXEEXT) check_test_langinfer: test_langinfer$(EXEEXT) ./test_langinfer$(EXEEXT) check_test_untabifier: test_untabifier$(EXEEXT) ./test_untabifier$(EXEEXT) check_test_events: test_events$(EXEEXT) ./test_events$(EXEEXT) check_test_debuglistener: test_debuglistener$(EXEEXT) ./test_debuglistener$(EXEEXT) check_test_lineranges: test_lineranges$(EXEEXT) ./test_lineranges$(EXEEXT) check_test_regexranges: test_regexranges$(EXEEXT) ./test_regexranges$(EXEEXT) check_test_settings: test_settings$(EXEEXT) ./test_settings$(EXEEXT) check_test_langmap: test_langmap$(EXEEXT) ./test_langmap$(EXEEXT) check_test_utils: test_utils$(EXEEXT) ./test_utils$(EXEEXT) check_test_instances: test_instances$(EXEEXT) ./test_instances$(EXEEXT) VALGRINDTEST = $(builddir)/valgrind_test.sh check-valgrind: $(VALGRIND_TESTS) for prog in $(VALGRIND_TESTS); do \ $(VALGRINDTEST) ./$$prog ; \ done ; EXTRA_DIST = valgrind_test.sh.in \ outlangtest.outlang \ testconffile.conf \ source-highlight.conf \ test.map noinst_HEADERS = logformatter.h stdboosterror.h asserttestexit.h CLEANFILES = *.java.html mytags*�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/tests/test_regexrules_main.cpp�������������������������������������������0000644�0001750�0001750�00000045362�11672675564�020610� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// tests for RegexHighlightRules #include <iostream> #include <boost/regex.hpp> #include "asserttestexit.h" #include "srchilite/regexrulefactory.h" #include "srchilite/highlightrule.h" #include "srchilite/highlighttoken.h" #include "srchilite/highlightstateprinter.h" #include "srchilite/matchingparameters.h" #include <sstream> #include "srchilite/tostringcollection.h" using namespace std; using namespace srchilite; HighlightStatePrinter coutPrinter; static void check_regex(HighlightRule *rule, const MatchingParameters &params, const string &s, bool shouldMatch, const string &match, const string &prefix, const string &suffix, const MatchedSubExps &subexps = MatchedSubExps()); static void check_compound_regex(HighlightRule *rule, const MatchingParameters &params, const string &s, const MatchedElements &expectedElemList, const string &prefix, const string &suffix); static void check_state(const HighlightState *state, const MatchingParameters &params, const string &s, bool shouldMatch, const string &match, const string &prefix, const string &suffix, const string &expectedMatchingRule = "", const string &expectedElem = ""); void check_regex(HighlightRule *rule, const MatchingParameters &params, const string &s, bool shouldMatch, const string &match, const string &prefix, const string &suffix, const MatchedSubExps &subexps) { HighlightToken res; bool matched = rule->tryToMatch(s, res, params); assertEquals(shouldMatch, matched); if (matched) { cout << "prefix : " << res.prefix << endl; cout << "suffix : " << res.suffix << endl; cout << "matched: " << res.matched.begin()->second << endl; if (res.matchedSubExps.size()) { cout << "subexps: " << collectionToString(&(res.matchedSubExps), ',') << endl; } assertEquals(match, res.matched.begin()->second); assertEquals(prefix, res.prefix); assertEquals(suffix, res.suffix); assertEqualsCollections(subexps, res.matchedSubExps); } else { cout << "not matched: " << s << endl; } } void check_compound_regex(HighlightRule *rule, const MatchingParameters &params, const string &s, const MatchedElements &expectedElemList, const string &prefix, const string &suffix) { HighlightToken res; rule->tryToMatch(s, res, params); assertEquals(expectedElemList.size(), res.matched.size()); coutPrinter.printHighlightToken(&res); MatchedElements::const_iterator it, it2; for (it2 = res.matched.begin(), it = expectedElemList.begin(); it != expectedElemList.end(); ++it, ++it2) { assertEquals(it->first, it2->first); assertEquals(it->second, it2->second); } assertEquals(prefix, res.prefix); assertEquals(suffix, res.suffix); } void check_state(const HighlightState *state, const MatchingParameters &params, const string &s, bool shouldMatch, const string &match, const string &prefix, const string &suffix, const string &expectedMatchingRule, const string &expectedElem) { HighlightToken res; bool matched = state->findBestMatch(s, res, params); assertEquals(shouldMatch, matched); if (matched) { coutPrinter.printHighlightToken(&res); assertEquals(match, res.matched.begin()->second); assertEquals(prefix, res.prefix); assertEquals(suffix, res.suffix); if (expectedMatchingRule.size()) assertEquals(expectedMatchingRule, res.rule->toString()); if (expectedElem.size()) assertEquals(expectedElem, res.matched.begin()->first); } else { cout << "not matched: " << s << endl; } } int main() { ostringstream printedState; HighlightStatePrinter printer(printedState); MatchingParameters params; cout << "*** test_regexrules" << endl; // first of all check the only spaces regular expression boost::regex onlySpaces("[[:blank:]]*"); assertTrue(boost::regex_match(" \t \t ", onlySpaces)); assertTrue(boost::regex_match("", onlySpaces)); assertFalse(boost::regex_match(" a\t \t ", onlySpaces)); assertFalse(boost::regex_match(" a ", onlySpaces)); assertFalse(boost::regex_match("foo", onlySpaces)); RegexRuleFactory factory; HighlightRulePtr rule = HighlightRulePtr(factory.createSimpleRule("foo", "foo|bar")); check_regex(rule.get(), params, "before_foo_after", true, "foo", "before_", "_after"); check_regex(rule.get(), params, "before_foo", true, "foo", "before_", ""); check_regex(rule.get(), params, "bar_after", true, "bar", "", "_after"); check_regex(rule.get(), params, "before__after", false, "foo", "before_", "_after"); WordList wordList; wordList.push_back("foo"); wordList.push_back("bar"); wordList.push_back("gogo"); rule = HighlightRulePtr(factory.createWordListRule("foo", wordList)); cout << "word list regex: " << rule->toString() << endl; assertEquals("\\<(?:foo|bar|gogo)\\>", rule->toString()); // there's no matching since we required word boundaries check_regex(rule.get(), params, "before_foo_after", false, "foo", "before_", "_after"); check_regex(rule.get(), params, "before_foo", false, "foo", "before_", ""); check_regex(rule.get(), params, "bar_after", false, "bar", "", "_after"); // now there's match check_regex(rule.get(), params, "before foo after", true, "foo", "before ", " after"); check_regex(rule.get(), params, "before foo", true, "foo", "before ", ""); check_regex(rule.get(), params, "bar after", true, "bar", "", " after"); check_regex(rule.get(), params, "before__after", false, "foo", "before_", "_after"); // non case sensitive version rule = HighlightRulePtr(factory.createWordListRule("foo", wordList, false)); cout << "word list regex: " << rule->toString() << endl; assertEquals("\\<(?:[Ff][Oo][Oo]|[Bb][Aa][Rr]|[Gg][Oo][Gg][Oo])\\>", rule->toString()); check_regex(rule.get(), params, "before FoO", true, "FoO", "before ", ""); check_regex(rule.get(), params, "bAr after", true, "bAr", "", " after"); // now the simple list version (i.e., not word list) rule = HighlightRulePtr(factory.createListRule("foo", wordList)); cout << "word list regex: " << rule->toString() << endl; assertEquals("(?:foo|bar|gogo)", rule->toString()); check_regex(rule.get(), params, "before_foo", true, "foo", "before_", ""); check_regex(rule.get(), params, "bar_after", true, "bar", "", "_after"); // search for strings delimited by A rule = HighlightRulePtr(factory.createLineRule("foo", "A", "A")); cout << "line rule: " << rule->toString() << endl; assertEquals("A(?:[^A])*A", rule->toString()); check_regex(rule.get(), params, "before A foo bar A after", true, "A foo bar A", "before ", " after"); // search for strings delimited by A and BC rule = HighlightRulePtr(factory.createLineRule("foo", "A", "B")); cout << "line rule: " << rule->toString() << endl; assertEquals("A(?:[^AB])*B", rule->toString()); check_regex(rule.get(), params, "before A foo bar A and BC after", true, "A and B", "before A foo bar ", "C after"); // search for strings delimited by < and > and escape char rule = HighlightRulePtr(factory.createLineRule("foo", "<", ">", "\\\\")); cout << "line rule: " << rule->toString() << endl; assertEquals("<(?:[^\\\\<\\\\>]|\\\\.)*>", rule->toString()); check_regex(rule.get(), params, "before < foo bar \\> and > after", true, "< foo bar \\> and >", "before ", " after"); // test for multiline rule without escape and non nested rule = HighlightRulePtr(factory.createMultiLineRule("foo", "<", ">", "", false)); printer.printHighlightRule(rule.get()); cout << "multi line rule: " << printedState.str() << endl; assertEquals("<", rule->toString()); const HighlightState *nextState = rule->getNextState().get(); assertTrue(nextState != 0); if (nextState) { HighlightRulePtr nextRule = nextState->getRuleList()[0]; assertEquals(">", nextRule->toString()); } // test for multiline rule with escape and non nested rule = HighlightRulePtr(factory.createMultiLineRule("foo", "<", ">", "\\\\", false)); printedState.str(""); printer.printHighlightRule(rule.get()); cout << "multi line rule: " << printedState.str() << endl; assertEquals("<", rule->toString()); nextState = rule->getNextState().get(); assertTrue(nextState != 0); if (nextState) { HighlightRulePtr nextRule = nextState->getRuleList()[1]; assertEquals("\\\\.", nextRule->toString()); nextRule = nextState->getRuleList()[0]; assertEquals(">", nextRule->toString()); assertEquals(1, nextRule->getExitLevel()); } // check state betterThan HighlightToken t1("", "ab", ""); HighlightToken t2("", "bcd", "a"); HighlightToken t3("", "bcde", "a"); // t2 is not better than t1 since although its matching string is longer // also its prefix is assertFalse(HighlightState::betterThan(t2, t1)); assertTrue(HighlightState::betterThan(t1, t2)); // t2 is not better than t3 since since its matching string is smaller assertFalse(HighlightState::betterThan(t2, t3)); assertTrue(HighlightState::betterThan(t3, t2)); // now test the state matching with the above nextState HighlightToken token; // should match > check_state(nextState, params, "ab >", true, ">", "ab ", ""); // should match \> since it is escaped check_state(nextState, params, "ab \\> bc >", true, "\\>", "ab ", " bc >"); HighlightState classState; assertEquals("normal", classState.getDefaultElement()); classState.addRule( HighlightRulePtr(factory.createSimpleRule("as", "as|at"))); check_state(&classState, params, "this class foo", true, "as", "this cl", "s foo", "", "as"); HighlightRulePtr keywordRule = HighlightRulePtr(factory.createSimpleRule( "keyword", "class")); classState.addRule(keywordRule); // now we should find a better match "class" check_state(&classState, params, "this class foo", true, "class", "this ", " foo", "class", "keyword"); classState.addRule(HighlightRulePtr(factory.createSimpleRule("complex", "class[[:blank:]]+[[:word:]]+"))); // now we should find an even better match "class foo" check_state(&classState, params, "this class foo", true, "class foo", "this ", "", "class[[:blank:]]+[[:word:]]+", "complex"); // we don't match "class foo" but only "class" since its prefix // contains only spaces check_state(&classState, params, "\t \t class foo", true, "class", "\t \t ", " foo", "class", "keyword"); classState.addRule(HighlightRulePtr(factory.createSimpleRule("foo", "bar"))); // (1) classState.addRule(HighlightRulePtr(factory.createSimpleRule("foo", "[[:word:]]+(?=[[:blank:]]*\\()"))); // (2) // although also the second rule matches "bar", however the first one already matched check_state(&classState, params, "this bar ( foo", true, "bar", "this ", " ( foo", "bar"); // in this case the second rule matches only check_state(&classState, params, "this myfun ( foo", true, "myfun", "this ", " ( foo", "[[:word:]]+(?=[[:blank:]]*\\()"); // test for nested HighlightState stateWithNestedRule; HighlightRulePtr startRule = HighlightRulePtr(factory.createMultiLineRule( "foo", "<", ">", "\\\\", true)); cout << "multi line rule (nested): "; coutPrinter.printHighlightRule(startRule.get()); cout << endl; nextState = startRule->getNextState().get(); // the 3rd element is expected to be the same start sequence but nested and // with empty next state assertEquals("<", nextState->getRuleList()[2]->toString()); assertTrue(nextState->getRuleList()[2]->isNested()); assertTrue(nextState->getRuleList()[2]->getNextState().get() == 0); // single line automatically transformed in multi line (since nested) HighlightRulePtr singleNestedToMultiRule = HighlightRulePtr( factory.createLineRule("foo", "<", ">", "\\\\", true)); cout << "single nested line rule (transformed): "; coutPrinter.printHighlightRule(singleNestedToMultiRule.get()); cout << endl; nextState = singleNestedToMultiRule->getNextState().get(); assertEquals(">", nextState->getRuleList()[0]->toString()); assertEquals(1, nextState->getRuleList()[0]->getExitLevel()); assertEquals("<", nextState->getRuleList()[2]->toString()); assertTrue(nextState->getRuleList()[2]->isNested()); // single line automatically transformed in multi line (since // one delimiter has more than one char) HighlightRulePtr singleToMultiRule = HighlightRulePtr( factory.createLineRule("foo", "<<", ">>", "\\\\")); cout << "single line rule (transformed): "; coutPrinter.printHighlightRule(singleToMultiRule.get()); cout << endl; nextState = singleToMultiRule->getNextState().get(); assertEquals(">>", nextState->getRuleList()[0]->toString()); assertEquals(1, nextState->getRuleList()[0]->getExitLevel()); // check state copy HighlightStatePtr stateCopy = HighlightStatePtr( new HighlightState(*nextState)); // a new id must have been created for the copy assertEquals(nextState->getId()+1, stateCopy->getId()); rule = HighlightRulePtr(factory.createSimpleRule("foo", "foo")); // change the second rule of the state HighlightRulePtr oldRule = stateCopy->replaceRule(0, rule); stateCopy->addRule(HighlightRulePtr(factory.createSimpleRule("foo", "bar"))); cout << "orig state: "; coutPrinter.printHighlightState(nextState); cout << endl; cout << "copy state: "; coutPrinter.printHighlightState(stateCopy.get()); cout << endl; // check that the original state is still the same assertEquals(">>", nextState->getRuleList()[0]->toString()); assertEquals(1, nextState->getRuleList()[0]->getExitLevel()); assertEquals(">>", oldRule->toString()); assertEquals(1, oldRule->getExitLevel()); // and that the new one has changed rules assertEquals("foo", stateCopy->getRuleList()[0]->toString()); assertEquals(0, stateCopy->getRuleList()[0]->getExitLevel()); assertEquals("bar", stateCopy->getRuleList()[2]->toString()); // test for MatchingParameters (beginning of line) HighlightStatePtr stateWithBOL = HighlightStatePtr(new HighlightState); stateWithBOL->addRule(HighlightRulePtr(factory.createSimpleRule("BOL", "^[[:word:]]+"))); stateWithBOL->addRule(HighlightRulePtr(factory.createSimpleRule("NOTBOL", "foo"))); cout << "state with BOL: "; coutPrinter.printHighlightState(stateWithBOL.get()); cout << endl; // the first rule matches since we're at the beginning of the line check_state(stateWithBOL.get(), params, "foo at the beginning", true, "foo", "", " at the beginning", "^[[:word:]]+", "BOL"); // the second rule matches since we specified that we're not at the beginning of the line MatchingParameters paramsNotBOL; paramsNotBOL.beginningOfLine = false; check_state(stateWithBOL.get(), paramsNotBOL, "foo at the beginning", true, "foo", "", " at the beginning", "foo", "NOTBOL"); // test for compound rules ElemNameList nameList; nameList.push_back("keyword"); nameList.push_back("normal"); nameList.push_back("type"); HighlightRulePtr compoundRule = HighlightRulePtr( factory.createCompoundRule(nameList, "(class)([[:blank:]]+)([[:word:]]+)")); cout << "compound rule: "; coutPrinter.printHighlightRule(compoundRule.get()); cout << endl; MatchedElements expectedMatchedElements; expectedMatchedElements.push_back(make_pair("keyword", "class")); expectedMatchedElements.push_back(make_pair("normal", " ")); expectedMatchedElements.push_back(make_pair("type", "MyClass")); check_compound_regex(compoundRule.get(), params, "class MyClass", expectedMatchedElements, "", ""); // test for rules with no end (i.e., \z) rule = HighlightRulePtr(factory.createLineRule("foo", "#", "", "\\\\")); cout << "line rule: "; coutPrinter.printHighlightRule(rule.get()); cout << endl; assertEquals("#", rule->toString()); assertTrue(rule->getNextState().get()); assertEquals("\\z", rule->getNextState()->getRuleList().front()->toString()); check_regex(rule.get(), params, "before # after", true, "#", "before ", " after"); // test for replacement rule = HighlightRulePtr(factory.createSimpleRule("foo", "@{2} @{1} @{3}")); ReplacementList rep(9); rep[0] = "first"; rep[1] = "second"; rule->replaceReferences(rep); cout << "replaced rule: " << rule->toString() << endl; assertEquals("second first ", rule->toString()); // test replacement for states HighlightRulePtr origRep1 = HighlightRulePtr(factory.createSimpleRule( "foo", "@{2} @{1} @{3}")); HighlightRulePtr origNoRep = HighlightRulePtr(factory.createSimpleRule( "foo", "no @{1} replacement")); HighlightRulePtr origRep2 = HighlightRulePtr(factory.createSimpleRule( "foo", "@{3} @{1} @{2}")); origRep1->setNeedsReferenceReplacement(); origRep2->setNeedsReferenceReplacement(); HighlightStatePtr stateWithRepl = HighlightStatePtr(new HighlightState); stateWithRepl->addRule(origRep1); stateWithRepl->addRule(origNoRep); stateWithRepl->addRule(origRep2); stateWithRepl->replaceReferences(rep); coutPrinter.printHighlightState(stateWithRepl.get()); // check that the original rule have not been changed assertEquals("@{2} @{1} @{3}", origRep1->toString()); assertEquals("@{3} @{1} @{2}", origRep2->toString()); // that the second rule was not changed assertEquals("no @{1} replacement", stateWithRepl->getRuleList()[1]->toString()); // that the other two were changed assertEquals("second first ", stateWithRepl->getRuleList()[0]->toString()); assertEquals(" first second", stateWithRepl->getRuleList()[2]->toString()); // test for subexpressions rule = HighlightRulePtr(factory.createSimpleRule("foo", "(class) ([[:word:]]+) (\\{)")); rule->setHasSubexpressions(); // the expected subexpressions MatchedSubExps subexps; subexps.push_back("class"); subexps.push_back("foo"); subexps.push_back("{"); check_regex(rule.get(), params, "my class foo {", true, "class foo {", "my ", "", subexps); cout << "*** test_regexrules SUCCESS" << endl; return 0; } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/���������������������������������������������������������������0000775�0001750�0001750�00000000000�11676051671�014537� 5����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/settings.h�����������������������������������������������������0000644�0001750�0001750�00000013643�11672675563�016505� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * settings.h * * Created on: Apr 18, 2009 * Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2008 * Copyright: See COPYING file that comes with this distribution */ #ifndef SETTINGS_H_ #define SETTINGS_H_ #include <string> namespace srchilite { /// an error dealing with setting configuration file enum SettingError { NO_SETTING_ERROR = 0, CANT_CREATE_DIR, CANT_CREATE_FILE }; /** * Handles the settings for source-highlight (and its library). * At the moment the only setting that is stored is the value for datadir * (command line option --data-dir), that specifies whether source-highlight * should search for .lang, .outlang, .map and other files. * * A default value for this datadir is hardcoded, based on the configure * --prefix option: prefix/share/source-highlight (where prefix is the * one specified at configure, and it defaults to /usr/local). * * When an object of this class is created, it will get the value * of the environment variable $HOME. * * The method checkForConfFile() should be used to check whether configuration * exists at all. * * The method readDataDir() can be used to retrieve the datadir value * from the configuration file. If it returns false it can be assumed * that no configuration file was found. * * The method checkForTestFile() should be used to make sure that datadir * contains the files needed by source-highlight. If it returns false * it can be assumed that that directory is not correct (that directory * may not exist at all). * * The new value for datadir can be set with method setDataDir(). * * The method save() will save the current value of datadir in the * configuration file (it also creates the directory if it does not exist). * * This class also provides a static method retrieveDataDir() which uses * an object of this class to retrieve datadir (if the environment * variable SOURCE_HIGHLIGHT_DATADIR is not set). * If also the reading of configuration file fails, then it returns the * hardcoded value. * * Thus, the users of the * library should always rely on this static method for retrieving * the datadir value. The other methods of this class should be used * when (possibly) configuring the library from within the program itself. * For instance this is done by the program source-highlight-settings. * * An alternative use, is to set a global data dir value with * setGlobalDataDir(); this way, retrieveDataDir() will always return * the global value (this enforces consistency in a library using * the source-highlight library). */ class Settings { /// the home directory of the user std::string homeDir; /// the directory for configuration file (default: $HOME/.source-highlight/) std::string confDir; /// the name of the configuration file (default: source-highlight.conf) std::string confFileName; /// test file to search for in the datadir (default: lang.map) std::string testFileName; /// the data dir (used for .lang, .outlang, lang.map, etc), this is read from the configuration file std::string dataDir; public: Settings(); ~Settings(); const std::string getConfDir() const { return confDir; } void setConfDir(const std::string &dir) { confDir = dir; } const std::string getConfFileName() const { return confFileName; } const std::string getTestFileName() const { return testFileName; } void setTestFileName(const std::string &name) { testFileName = name; } const std::string getDataDir() const { return dataDir; } void setDataDir(const std::string &ddir) { dataDir = ddir; } /** * Checks whether the conf file exists * @return true if the conf file exists */ bool checkForConfFile(); /** * Checks whether the test file is in the datadir * @return true if the test file is in the datadir */ bool checkForTestFile(); /** * Reads the datadir from the configuration file * @return true if the datadir was specified in the configuration file */ bool readDataDir(); /** * Saves the setting (for datadir) in the conf file * @return a possible error in case saving (or creating directory) fails */ SettingError save(); /** * Retrieves the value for the data dir. * * If the global value was set with setGlobalDataDir() then always returns this * global value. It returns the value of the environment * variable SOURCE_HIGHLIGHT_DATADIR if set. Otherwise, it returns the * value read from the configuration file. * * Thus, the users of the library should always rely on this static method for retrieving * the datadir value. * * If also the reading of configuration file fails, then it returns the * hardcoded value. * * If the global data dir was set (and it's not empty) with setGlobalDataDir, then this * method will always return the global value, without inspecting the environment * variable nor the configuration file. * * @param reload whether to perform the retrieval from scratch (otherwise it is * cached) * @return the value for datadir */ static const std::string retrieveDataDir(bool reload = false); /** * @return the hardcoded datadir value */ static const std::string getDefaultDataDir(); /** * Sets the global data dir value. If the passed value is not empty, * then retrieveDataDir() will always return this value (and it won't * read the configuration file). * @param dataDir */ static void setGlobalDataDir(const std::string &dataDir); /** * Checks whether the current retrieved data dir is a valid * data dir value for source-highlight * @return whether the current retrieved data dir is a valid * data dir value for source-highlight. */ static bool checkSettings(); }; } #endif /* SETTINGS_H_ */ ���������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/vardefinitions.h�����������������������������������������������0000644�0001750�0001750�00000001231�11672675564�017660� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004 // // Copyright: See COPYING file that comes with this distribution // // #ifndef VARDEFINITIONS_H #define VARDEFINITIONS_H #include <map> #include <string> namespace srchilite { class StringDefs; /** store definitions of strings and regular expressions representing language elements */ class VarDefinitions : protected std::map<std::string, std::string> { public: VarDefinitions(); ~VarDefinitions(); void add(const std::string &var, const StringDefs *value); const std::string &getVar(const std::string &name); bool contains(const std::string &name); }; } #endif �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/highlightstateprinter.cpp��������������������������������������0000644�0001750�0001750�00000004632�11672675563�021612� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2008 // // Copyright: See COPYING file that comes with this distribution // #include "highlightstateprinter.h" #include "highlightstate.h" #include "highlightrule.h" #include "highlighttoken.h" #include "tostringcollection.h" namespace srchilite { #define INDENT_INC 2 #define inc_indent (indent += INDENT_INC) #define dec_indent (indent -= INDENT_INC) #define do_indent stream << (indent ? string(indent, ' ') : ""); using namespace std; HighlightStatePrinter::HighlightStatePrinter(std::ostream &s) : indent(0), stream(s) { } HighlightStatePrinter::~HighlightStatePrinter() { } void HighlightStatePrinter::printHighlightState(const HighlightState *state) { do_indent; stream << "STATE " << state->getId() << " default: " << state->getDefaultElement() << endl; const RuleList &ruleList = state->getRuleList(); inc_indent; for (RuleList::const_iterator it = ruleList.begin(); it != ruleList.end(); ++it) { printHighlightRule((*it).get()); } dec_indent; } void HighlightStatePrinter::printHighlightRule(const HighlightRule *rule) { HighlightStatePtr nextState = rule->getNextState(); do_indent; stream << "rule (" + toStringCollection(rule->getElemList()) + ") \"" << rule->toString() << "\" (exit level: " << rule->getExitLevel() << ", next: " << (nextState.get() ? nextState->getId() : 0) << (rule->isNested() ? ", nested" : "") << ")" << endl; // recursive call on next level if (nextState.get()) { unsigned int id = nextState->getId(); // avoid printing already printed states and avoid loops for recursive states if (stateidset.find(id) == stateidset.end()) { stateidset.insert(id); inc_indent; printHighlightState(nextState.get()); dec_indent; } } } void HighlightStatePrinter::printHighlightToken(const HighlightToken *token) { stream << "prefix : \"" << token->prefix << "\"" << endl; stream << "suffix : \"" << token->suffix << "\"" << endl; stream << "matched: " << endl; for (MatchedElements::const_iterator it = token->matched.begin(); it != token->matched.end(); ++it) stream << " \"" << it->second << "\": " << it->first << endl; if (token->rule) stream << "rule : " << token->rule->toString() << endl; } } ������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/instances.h����������������������������������������������������0000644�0001750�0001750�00000002653�11672675563�016633� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * instances.h * * Created on: Aug 21, 2009 * Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2009 * Copyright: See COPYING file that comes with this distribution */ #ifndef INSTANCES_H_ #define INSTANCES_H_ namespace srchilite { class LangDefManager; class LangMap; /** * This class contains static and singleton instances for some * utility classes for LangDefManagers, LangMap, etc. * * Using this class ensures to use always the same instance for * doing these tasks, and if you change the global settings, through * Settings, you can reload() the files of these instances using the * new settings, thus enforcing consistency within a program using * this library. * * @since 3.1.1 */ class Instances { public: /** * @return the instance for LangDefManager */ static LangDefManager *getLangDefManager(); /** * @return the instance for LangMap for lang files */ static LangMap *getLangMap(); /** * @return the instance for LangMap for outlang files */ static LangMap *getOutLangMap(); /** * Reloads files (using the new settings) for each single instances. */ static void reload(); /** * Deletes all static instances. * This is not necessary, but if you're sure you're not using the library * anymore in your program, you can free some memory. */ static void unload(); }; } #endif /* INSTANCES_H_ */ �������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/versions.cpp���������������������������������������������������0000644�0001750�0001750�00000001073�11672675564�017043� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * versions.cpp * * Created on: Apr 18, 2009 * Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2008 * Copyright: See COPYING file that comes with this distribution */ #include "versions.h" #ifdef HAVE_CONFIG_H #include "config.h" #endif namespace srchilite { const std::string Versions::getVersion() { return VERSION; } const std::string Versions::getLibraryVersion() { return LIBRARY_VERSION; } const std::string Versions::getCompleteVersion() { return "GNU Source-highlight " VERSION " (library: " LIBRARY_VERSION ")"; } } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/debuglistener.h������������������������������������������������0000644�0001750�0001750�00000002214�11672675563�017471� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2008 // // Copyright: See COPYING file that comes with this distribution // #ifndef DEBUGLISTENER_H_ #define DEBUGLISTENER_H_ #include <iostream> #include "highlighteventlistener.h" namespace srchilite { struct HighlightEvent; /** * Implementation of highlight events that prints debug information. * In interactive mode, after each event, it will wait for the user * to press ENTER to go on. */ class DebugListener: public HighlightEventListener { /// where to output debug info (default stdout) std::ostream &os; /// whether to act in step mode (wait for the user ENTER after each step) bool interactive; public: /** * @param os the output stream to print debug information (default std::cout) */ DebugListener(std::ostream &_os = std::cout); virtual ~DebugListener(); virtual void notify(const HighlightEvent &event); void setInteractive(bool i = true) { interactive = i; } /** * Waits for the user to press ENTER (in case of interactive debugging) */ void step(); }; } #endif /*DEBUGLISTENER_H_*/ ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/utils.cpp������������������������������������������������������0000644�0001750�0001750�00000001731�11672675564�016334� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // C++ Implementation: utils // // Description: // // // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2006 // // Copyright: See COPYING file that comes with this distribution // // #include "utils.h" #include <algorithm> #include <cctype> // old <ctype.h> namespace srchilite { struct ToLower { char operator() (char c) const { return std::tolower(c); } }; struct ToUpper { char operator() (char c) const { return std::toupper(c); } }; void Utils::toUpper(std::string &s) { // Change everything into upper case std::transform (s.begin(), s.end(), s.begin(), ToUpper()); } void Utils::toLower(std::string &s) { // Change everything into upper case std::transform (s.begin(), s.end(), s.begin(), ToLower()); } std::string Utils::toupper(const std::string &s) { std::string buffer = s; toUpper(buffer); return buffer; } std::string Utils::tolower(const std::string &s) { std::string buffer = s; toLower(buffer); return buffer; } } ���������������������������������������source-highlight-3.1.6/lib/srchilite/sourcefilehighlighter.h����������������������������������������0000644�0001750�0001750�00000006665�11672675563�021232� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // C++ Interface: SourceFileHighlighter // // Description: // // // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2008 // // Copyright: See COPYING file that comes with this distribution // // #ifndef SOURCEFILEHIGHLIGHTER_H_ #define SOURCEFILEHIGHLIGHTER_H_ #include <string> #include <istream> namespace srchilite { class SourceHighlighter; class BufferedOutput; class PreFormatter; class LineNumGenerator; class LineRanges; class RegexRanges; class Formatter; /// debugging policy enum FileHighlighterDebug { NO_DEBUG = 0, DEBUG, DEBUG_INTERACTIVE }; /** * Highlights the contents of a file relying on a SourceHighlighter */ class SourceFileHighlighter { /// the name of the file to highlight const std::string fileName; /// the initial regexp state SourceHighlighter *sourceHighlighter; /// the output object BufferedOutput *output; /// debugging policy FileHighlighterDebug debugPolicy; /// the preformatter for characters, e.g., for \n PreFormatter *preformatter; /// for generation of line numbers (if not null) LineNumGenerator *lineNumGenerator; /// if not null, it detects whether a line is in the stored ranges LineRanges *lineRanges; /// if not null, it detects whether a line is in the stored ranges RegexRanges *regexRanges; /// the formatter for possible context lines Formatter *contextFormatter; /// a prefix to be generated in front of each formatted code line std::string linePrefix; /// if specified, a string to be printed between two ranges std::string rangeSeparator; public: /** * @param file the name of the file to highlight; * if the filename is empty then we will process the standard input * @param sourceHighlighter the highlighter to highlight paragraphs * @param output the output object used to write */ SourceFileHighlighter(const std::string &file, SourceHighlighter *sourceHighlighter, BufferedOutput *output); void setDebugPolicy(FileHighlighterDebug p) { debugPolicy = p; } void setPreformatter(PreFormatter *pf) { preformatter = pf; } void setContextFormatter(Formatter *cf) { contextFormatter = cf; } void setLineNumGenerator(LineNumGenerator *lG) { lineNumGenerator = lG; } void setLinePrefix(const std::string &prefix) { linePrefix = prefix; } /** * The range separator will be automatically preformatted to deal with * the specific output format. * * @param rangeSep */ void setRangeSeparator(const std::string &rangeSep); const LineRanges *getLineRanges() const { return lineRanges; } void setLineRanges(LineRanges *lr) { lineRanges = lr; } void setRegexRanges(RegexRanges *rr) { regexRanges = rr; } /** * Performs the highlighting; Once the highlighting is finished, this * object can be re-used. */ void highlight(); /** * Performs the highlighting of the contents of the given input stream; * Once the highlighting is finished, this object can be re-used. * @param is */ void highlight(std::istream &is); /** * Performs the highlighting of the contents of the given string; * Once the highlighting is finished, this object can be re-used. * @param is */ void highlight(const std::string &is); }; } #endif /*SOURCEFILEHIGHLIGHTER_H_*/ ���������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/parserexception.h����������������������������������������������0000644�0001750�0001750�00000002203�11672675563�020046� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2008 // // Copyright: See COPYING file that comes with this distribution // #ifndef PARSEREXCEPTION_H_ #define PARSEREXCEPTION_H_ #include <ostream> #include <string> #include <exception> namespace srchilite { struct ParseStruct; /** * Represents an exception during parsing, for instance, * syntax errors. */ struct ParserException : public std::exception { /// detailed message for this exception std::string message; /// additional explaining message std::string additional; /// filename of the element that caused this exception std::string filename; /// line of the element that caused this exception unsigned int line; ParserException(const std::string &_message, const ParseStruct *parserinfo); ParserException(const std::string &_message, const std::string &filename = "", unsigned int line = 0); virtual ~ParserException() throw (); virtual const char* what ( ) const throw (); }; std::ostream& operator<<(std::ostream& os, const ParserException &entry); } #endif /*PARSEREXCEPTION_H_*/ ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/verbosity.h����������������������������������������������������0000644�0001750�0001750�00000002254�11672675564�016670� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * verbosity.h * * Created on: Apr 19, 2009 * Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2008 * Copyright: See COPYING file that comes with this distribution */ #ifndef VERBOSITY_H_ #define VERBOSITY_H_ #include <iostream> namespace srchilite { /** * Utility class to output messages in case of verbose option is requested. * This class provides static methods, so that it can be used globally * from within the application using the library, so that all * classes that wants to output verbose messages will do that consistently. */ class Verbosity { static bool verbosity; public: static void setVerbosity(bool b = true) { verbosity = b; } static bool getVerbosity() { return verbosity; } }; /** * This is an optimization in the sense that the string is not even * created if verbosity is false */ #define VERBOSE(s) if (Verbosity::getVerbosity()) std::cerr << s; /** * This is an optimization in the sense that the string is not even * created if verbosity is false; it also generates a newline */ #define VERBOSELN(s) if (Verbosity::getVerbosity()) std::cerr << s << std::endl; } #endif /* VERBOSITY_H_ */ ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/highlightbuilderexception.cpp����������������������������������0000644�0001750�0001750�00000003242�11672675563�022427� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2008 // // Copyright: See COPYING file that comes with this distribution // #include "highlightbuilderexception.h" #include "parserinfo.h" #include <sstream> using namespace std; namespace srchilite { HighlightBuilderException::HighlightBuilderException( const std::string &_message, const ParserInfo *parserinfo, const boost::regex_error &e) : message(_message), causedBy(e), filename(parserinfo->filename), line(parserinfo->line) { } HighlightBuilderException::HighlightBuilderException( const std::string &_message, const std::string &_filename, unsigned int _line, const boost::regex_error &e) : message(_message), causedBy(e), filename(_filename), line(_line) { } HighlightBuilderException::~HighlightBuilderException() throw() { } const char* HighlightBuilderException::what() const throw () { return "problem when building an highlight rule"; } std::ostream& operator<<(std::ostream& os, const HighlightBuilderException &entry) { ostringstream errbuff; if (entry.filename.size()) errbuff << entry.filename << ":"; if (entry.line > 0) errbuff << entry.line << ": "; else if (entry.filename.size()) errbuff << " "; os << errbuff.str() << entry.message << "\n"; const string &causeBy = entry.causedBy.what(); if (causeBy.size()) { os << errbuff.str() << "Caused by: " << causeBy; /* if (entry.causedBy.position()) os << "\n" << errbuff.str() << "Position: " << entry.causedBy.position(); */ } return os; } } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/langdefscanner.h�����������������������������������������������0000644�0001750�0001750�00000001305�11672675563�017607� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // C++ Interface: langdefscanner // // Description: // // // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004 // // Copyright: See COPYING file that comes with this distribution // // #ifndef LANGDEFSCANNER_H #define LANGDEFSCANNER_H #include "parsestruct.h" namespace srchilite { void open_file_to_scan(const std::string &path, const std::string &file); /** * Releases resources allocated by the scanner */ void clear_langdefscanner(); /** * Closes the input file. This is required only in case of errors during * parsing (otherwise the file is closed automatically when the scanner * reaches the end of file). */ void close_langdefinputfile(); } #endif // LANGDEFSCANNER_H ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/langdefparser.h������������������������������������������������0000644�0001750�0001750�00000007714�11675044735�017456� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������ /* A Bison parser, made by GNU Bison 2.4.1. */ /* Skeleton interface for Bison's Yacc-like parsers in C Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work under terms of your choice, so long as that work isn't itself a parser generator using the skeleton or a modified version thereof as a parser skeleton. Alternatively, if you modify or redistribute the parser skeleton itself, you may (at your option) remove this special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ /* Tokens. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE /* Put the tokens into the symbol table, so that GDB and other debuggers know about them. */ enum yytokentype { BEGIN_T = 258, END_T = 259, ENVIRONMENT_T = 260, STATE_T = 261, MULTILINE_T = 262, DELIM_T = 263, START_T = 264, ESCAPE_T = 265, NESTED_T = 266, EXIT_ALL = 267, EXIT_T = 268, VARDEF_T = 269, REDEF_T = 270, SUBST_T = 271, NONSENSITIVE_T = 272, WRONG_BACKREFERENCE = 273, LEVEL = 274, KEY = 275, STRINGDEF = 276, REGEXPNOPREPROC = 277, VARUSE = 278, BACKREFVAR = 279, WRONG_INCLUDE_FILE = 280, REGEXPDEF = 281 }; #endif /* Tokens. */ #define BEGIN_T 258 #define END_T 259 #define ENVIRONMENT_T 260 #define STATE_T 261 #define MULTILINE_T 262 #define DELIM_T 263 #define START_T 264 #define ESCAPE_T 265 #define NESTED_T 266 #define EXIT_ALL 267 #define EXIT_T 268 #define VARDEF_T 269 #define REDEF_T 270 #define SUBST_T 271 #define NONSENSITIVE_T 272 #define WRONG_BACKREFERENCE 273 #define LEVEL 274 #define KEY 275 #define STRINGDEF 276 #define REGEXPNOPREPROC 277 #define VARUSE 278 #define BACKREFVAR 279 #define WRONG_INCLUDE_FILE 280 #define REGEXPDEF 281 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE { /* Line 1676 of yacc.c */ #line 91 "../../../lib/srchilite/langdefparser.yy" int tok ; /* command */ bool booloption ; const std::string * string ; /* string : id, ... */ class srchilite::StringDef *stringdef; class StringDefs *stringdefs; class LangElem *langelem; class StateLangElem *statelangelem; class StateStartLangElem *statestartlangelem; class LangElems *langelems; class NamedSubExpsLangElem *namedsubexpslangelem; struct Key *key; struct ElementNamesList *keys; int flag ; unsigned int level; /* Line 1676 of yacc.c */ #line 123 "../../../lib/srchilite/langdefparser.h" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 #endif extern YYSTYPE langdef_lval; #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED typedef struct YYLTYPE { int first_line; int first_column; int last_line; int last_column; } YYLTYPE; # define yyltype YYLTYPE /* obsolescent; will be withdrawn */ # define YYLTYPE_IS_DECLARED 1 # define YYLTYPE_IS_TRIVIAL 1 #endif extern YYLTYPE langdef_lloc; ����������������������������������������������������source-highlight-3.1.6/lib/srchilite/substfun.h�����������������������������������������������������0000644�0001750�0001750�00000000720�11672675563�016506� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/** * C++ function: substfun.h * * Description: substitutes a string to a $var into a text. * * Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2005 * Copyright: See COPYING file that comes with this distribution */ #ifndef _SUBSTFUN_H_ #define _SUBSTFUN_H_ #include <boost/regex.hpp> #include <string> namespace srchilite { std::string subst(const boost::regex &e, const std::string &s, const std::string &sub); } #endif /*_SUBSTFUN_H_*/ ������������������������������������������������source-highlight-3.1.6/lib/srchilite/refposition.h��������������������������������������������������0000644�0001750�0001750�00000000526�11672675563�017202� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef REFPOSITION_H #define REFPOSITION_H namespace srchilite { /// where a reference must be put enum RefPosition { NONE = 0, INLINE = 1, ///< put reference inline POSTLINE, ///< put all references of a line at the end of the line POSTDOC ///< put all references at the end of the document }; } #endif // REFPOSITION_H ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/textstyle.cpp��������������������������������������������������0000644�0001750�0001750�00000007430�11672675563�017242� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/** * C++ Implementation: textstyle * * Description: * * Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2005 * Copyright: See COPYING file that comes with this distribution */ #include "textstyle.h" #include <sstream> using namespace std; namespace srchilite { static SubstitutionMapping substitutionmapping; TextStyle::TextStyle(const string &s,const char **vars) : repr((s.size() ? s : TEXT_VAR_TEXT)), invalid(true) { ostringstream exp_buff; exp_buff << "\\$(style|text"; if (vars) { int i = 0; while (vars[i]) { exp_buff << "|" << vars[i]; ++i; } } exp_buff << ")"; var_exp = boost::regex(exp_buff.str()); } TextStyle::~TextStyle() { } /** * The parts vector contains the string repr split in parts: those that * constant parts and those that represent $text and $style variables. * For instance, if repr == "<span class=\"$style\">$text</span>", then we * have: * * - parts[0] == "<span class=\"" * - parts[1] == "" * - parts[2] == "\">" * - parts[3] == "" * - parts[4] == "</span>" * * Then style_substitutions contains the index(es) of parts corresponding to * $style variable occurrences that will be substituted with values * and text_substitutions is the same but for $text occurrences. Thus, in this * case: * * - style_substitutions[0] = 1 * - text_substitutions[0] = 3 */ void TextStyle::build_vectors() { parts.clear(); substitutions.clear(); boost::sregex_iterator i1(repr.begin(), repr.end(), var_exp); boost::sregex_iterator i2; string suffix; if (i1 == i2) return ; int index = -1; for (boost::sregex_iterator it = i1; it != i2; ++it) { string prefix = it->prefix(); if (prefix.size()) { parts.push_back(prefix); ++index; } ++index; string matched = string((*it)[0].first, (*it)[0].second); substitutions[matched].push_back(index); suffix = it->suffix(); parts.push_back(""); // this will be set during "output" // with a value for $text or $style } if (suffix.size()) parts.push_back(suffix); } /** * First substitute in the vector parts the values for $text and * $style and return a string with the substituted values. * * @param text * @param style * @return */ string TextStyle::output(const string &text, const string &style) { substitutionmapping["$text"] = text; substitutionmapping["$style"] = style; return output(substitutionmapping); } /** * for each i substitutes: subst_map[i].first occurrence with subst_map[i].second */ std::string TextStyle::output(SubstitutionMapping &subst_map) { if (invalid) { build_vectors(); invalid = false; } SubstitutionIndexes::const_iterator subIt; IndexVector::const_iterator indexIt; for (subIt = substitutions.begin(); subIt != substitutions.end(); ++subIt) { for (indexIt = subIt->second.begin(); indexIt != subIt->second.end(); ++indexIt) { parts[*indexIt] = subst_map[subIt->first]; } } string ret; for (StringVector::const_iterator it = parts.begin(); it != parts.end(); ++it) ret += *it; return ret; } string TextStyle::subst_style(const string &style) { return output(TEXT_VAR_TEXT, style); // leave $text untouched } TextStyle TextStyle::compose(const TextStyle &inner) { return TextStyle(output(inner.toString())); } void TextStyle::update(const string &inner) { repr = output(inner); invalid = true; } void TextStyle::update(const string &text, const string &style) { repr = output(text, style); invalid = true; } void TextStyle::update(const TextStyle &inner) { update(inner.toString()); } bool TextStyle::containsStyleVar() const { boost::regex style_exp(STYLE_VAR); return boost::regex_search(repr, style_exp); } bool TextStyle::empty() const { return repr == STYLE_VAR_TEXT || repr == TEXT_VAR_TEXT; } } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/langdefparser.yy�����������������������������������������������0000644�0001750�0001750�00000025032�11672675563�017667� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������%{ /* * Copyright (C) 1999-2009 Lorenzo Bettini <http://www.lorenzobettini.it> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <iostream> #include <string> #include "stringdef.h" #include "statelangelem.h" #include "statestartlangelem.h" #include "stringlistlangelem.h" #include "delimitedlangelem.h" #include "langelems.h" #include "langdefparserfun.h" #include "langdefscanner.h" #include "vardefinitions.h" #include "namedsubexpslangelem.h" #include "parserexception.h" #include "ioexception.h" using std::cerr; using std::string; using namespace srchilite; extern int langdef_lex() ; extern FILE *langdef_in; extern ParseStructPtr parsestruct; static void yyerror( const char *s ) ; static void yyerror( const string &s ) ; /// the buffer for storing errors static string errorBuffer; /// this is where the parsed elements are store LangElems *current_lang_elems = 0; VarDefinitions *vardefinitions = 0; /// used to record that the error is due to an included file not found static bool includedFileNotFound = false; #define UPDATE_REDEF(el, r) if (r == 1) { el->setRedef(); } else if (r == 2) { el->setSubst(); } #define ADD_ELEMENT(elems, elem) \ if (elem) { \ if (elem->isRedef()) \ elems->redef(elem); \ else if (elem->isSubst()) \ elems->subst(elem); \ else \ elems->add(elem); \ } struct Key : public ParserInfo { const string *key; ~Key() { /* the string belongs to the string table so it is deallocated automatically by clearing the scanner */ } }; // this is a trick since ElementNames is a typedef and cannot // be used in the union below struct ElementNamesList : ElementNames { }; %} %union { int tok ; /* command */ bool booloption ; const std::string * string ; /* string : id, ... */ class srchilite::StringDef *stringdef; class StringDefs *stringdefs; class LangElem *langelem; class StateLangElem *statelangelem; class StateStartLangElem *statestartlangelem; class LangElems *langelems; class NamedSubExpsLangElem *namedsubexpslangelem; struct Key *key; struct ElementNamesList *keys; int flag ; unsigned int level; }; %token <tok> BEGIN_T END_T ENVIRONMENT_T STATE_T MULTILINE_T DELIM_T START_T %token <tok> ESCAPE_T NESTED_T EXIT_ALL EXIT_T VARDEF_T REDEF_T SUBST_T NONSENSITIVE_T %token <tok> WRONG_BACKREFERENCE %token <level> LEVEL %token <string> KEY STRINGDEF REGEXPNOPREPROC VARUSE BACKREFVAR WRONG_INCLUDE_FILE %token <stringdef> REGEXPDEF %type <stringdef> stringdef escapedef stringdefwreferences %type <stringdefs> stringdefs %type <langelem> elemdef %type <langelems> elemdefs %type <statestartlangelem> complexelem %type <booloption> multiline startnewenv nested nonsensitive %type <tok> exitlevel redefsubst %type <level> level %type <key> key; %type <keys> keys; %destructor { //std::cout << "freeing discarded symbol" << std::endl; delete $$; } stringdef stringdefs elemdef elemdefs key keys %% allelements : { /* no definitions (i.e., empty a .lang file with no definition) */ /* such as, default.lang */ /* synthetize a normal elem that catches everything */ current_lang_elems = new LangElems; StringDefs *defs = new StringDefs; defs->push_back (new StringDef("(?:.+)")); current_lang_elems->add(new StringListLangElem("normal", defs, false)); } | elemdefs { current_lang_elems = $1; } ; elemdefs : elemdefs elemdef { $$ = $1; ADD_ELEMENT($$, $2); } | elemdef { $$ = new LangElems; ADD_ELEMENT($$, $1); } ; elemdef : redefsubst complexelem exitlevel { $$ = $2; if ($3 < 0) $2->setExitAll(); if ($3 > 0) $2->setExit($3); UPDATE_REDEF($2, $1); } | redefsubst startnewenv complexelem BEGIN_T elemdefs END_T { StateLangElem *statelangelem = new StateLangElem($3->getName(), $3, $5, !$2); $$ = statelangelem; $3->setStateLangElem(statelangelem); UPDATE_REDEF($$, $1); } | VARDEF_T KEY '=' stringdefs { vardefinitions->add(*$2, $4); $$ = 0; } | WRONG_INCLUDE_FILE { // this token is used by the scanner to signal an error // in opening an include file includedFileNotFound = true; yyerror("cannot open include file " + *$1); YYERROR; $$ = 0; } ; complexelem : key DELIM_T stringdef stringdefwreferences escapedef multiline nested { $$ = new DelimitedLangElem(*($1->key), $3, $4, $5, $6, $7); $$->setParserInfo($1); delete $1; } | key START_T stringdef { $$ = new DelimitedLangElem(*($1->key), $3, 0, 0, false, false); $$->setParserInfo($1); delete $1; } | key '=' stringdefs nonsensitive { $$ = new StringListLangElem(*($1->key), $3, $4); $$->setParserInfo($1); delete $1; } | '(' keys ')' '=' REGEXPNOPREPROC { $$ = new NamedSubExpsLangElem($2, new StringDef(*$5)); $$->setParserInfo(parsestruct->file_name, @1.first_line); } ; key: KEY { $$ = new Key; $$->key = $1; $$->setParserInfo(parsestruct->file_name, @1.first_line); } ; keys: keys ',' KEY { $$ = $1; $$->push_back(*$3); } | KEY { $$ = new ElementNamesList; $$->push_back(*$1); } ; escapedef : ESCAPE_T stringdef { $$ = $2; } | { $$ = 0; } ; exitlevel: EXIT_ALL { $$ = -1; } | EXIT_T level { $$ = $2; } | { $$ = 0; } ; level: LEVEL { $$ = $1; } | { $$ = 1; } ; startnewenv : ENVIRONMENT_T { $$ = true; } | STATE_T { $$ = false; } ; multiline : MULTILINE_T { $$ = true; } | { $$ = false; } ; redefsubst : REDEF_T { $$ = 1; } | SUBST_T { $$ = 2; } | { $$ = 0; } ; nested : NESTED_T { $$ = true; } | { $$ = false; } ; nonsensitive : NONSENSITIVE_T { $$ = true; } | { $$ = false; } ; stringdefs : stringdefs ',' stringdef { $$ = $1; $$->push_back($3); } | stringdef { $$ = new StringDefs; $$->push_back($1); } ; stringdefwreferences : REGEXPDEF { $$ = $1; } | STRINGDEF { $$ = new StringDef(*$1, true); } | REGEXPNOPREPROC { $$ = new StringDef(*$1); } | VARUSE { if (! vardefinitions->contains(*$1)) { yyerror("undefined variable " + *$1); YYERROR; } $$ = new StringDef(vardefinitions->getVar(*$1)); } | BACKREFVAR { $$ = new StringDef(*$1); $$->setBackRef(true); } | stringdefwreferences '+' stringdefwreferences { $$ = StringDef::concat($1, $3); delete $1; delete $3; } | WRONG_BACKREFERENCE { // this token is used by the scanner to signal an error // in scanning a string with backreference yyerror("backreferences are allowed only inside ` `"); YYERROR; $$ = 0; } ; stringdef : REGEXPDEF { $$ = $1; } | STRINGDEF { $$ = new StringDef(*$1, true); } | REGEXPNOPREPROC { $$ = new StringDef(*$1); } | VARUSE { if (! vardefinitions->contains(*$1)) { yyerror("undefined variable " + *$1); YYERROR; } $$ = new StringDef(vardefinitions->getVar(*$1)); } | stringdef '+' stringdef { $$ = StringDef::concat($1, $3); delete $1; delete $3; } | WRONG_BACKREFERENCE { // this token is used by the scanner to signal an error // in scanning a string with backreference yyerror("backreferences are allowed only inside ` `"); YYERROR; $$ = 0; } ; %% extern int langdef_lex_destroy (void); void yyerror( const char *s ) { errorBuffer = s; } void yyerror( const string &s ) { yyerror(s.c_str()); } namespace srchilite { LangElems * parse_lang_def() { return parse_lang_def("", "stdin"); } LangElems * parse_lang_def(const char *path, const char *name) { current_lang_elems = 0; includedFileNotFound = false; vardefinitions = new VarDefinitions; parsestruct = ParseStructPtr(new ParseStruct(path, name)); errorBuffer = ""; int result = 1; bool fileNotFound = false; try { if (strcmp(name, "stdin") != 0) open_file_to_scan(path, name); } catch (IOException &e) { errorBuffer = e.message; fileNotFound = true; } if (!fileNotFound) result = langdef_parse(); delete vardefinitions; vardefinitions = 0; if (result != 0 && ! fileNotFound) { // make sure the input file is closed close_langdefinputfile(); // close it before clearing the scanner } // release scanner memory clear_langdefscanner (); if (result != 0 || errorBuffer.size()) { if (fileNotFound || includedFileNotFound) { if (current_lang_elems) delete current_lang_elems; throw ParserException(errorBuffer); } else { ParserException e(errorBuffer, parsestruct.get()); if (current_lang_elems) delete current_lang_elems; throw e; } } return current_lang_elems; } } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/parserexception.cpp��������������������������������������������0000644�0001750�0001750�00000002356�11672675563�020412� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2008 // // Copyright: See COPYING file that comes with this distribution // #include "parserexception.h" #include "parsestruct.h" #include <sstream> namespace srchilite { ParserException::ParserException(const std::string &_message, const ParseStruct *pinfo) : message(_message), filename((pinfo->path.size() ? pinfo->path + "/" : "") + pinfo->file_name), line(pinfo->line) { } ParserException::ParserException(const std::string &_message, const std::string &_filename, unsigned int _line) : message(_message), filename(_filename), line(_line) { } ParserException::~ParserException() throw() { } const char* ParserException::what() const throw () { return "error during the parsing of a definition file"; } std::ostream& operator<<(std::ostream& os, const ParserException &entry) { std::ostringstream err; if (entry.filename.size()) err << entry.filename << ":"; if (entry.line > 0) err << entry.line << ": "; else if (entry.filename.size()) err << " "; os << err.str() << entry.message; if (entry.additional.size()) os << "\n" << err.str() << entry.additional; return os; } } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/highlightstatebuilder.h����������������������������������������0000644�0001750�0001750�00000003014�11672675563�021213� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2008 // // Copyright: See COPYING file that comes with this distribution // #ifndef HIGHLIGHTSTATEBUILDER_H_ #define HIGHLIGHTSTATEBUILDER_H_ #include "highlightstate.h" namespace srchilite { class LangElems; class HighlightRuleFactory; /** * Builds an HighlightState from the language definition file collected structures. * This class uses dynamic overloading and it must be processed by doublecpp, * http://doublecpp.sf.net, in case you need to modify it. */ class HighlightStateBuilder { /// the factory for creating rules HighlightRuleFactory *highlightRuleFactory; public: HighlightStateBuilder(HighlightRuleFactory *_highlightRuleFactory); virtual ~HighlightStateBuilder(); /** * Builds all the rules into the passed mainState as specified in the * passed LangElems * * @param elems the element definitions retrieved from the lang file * @param mainState the main state where to store all the rules */ void build(LangElems *elems, HighlightStatePtr mainState); /// the following is a multi-method that needs to be processed by doublecpp branches build void (LangElem *elem, HighlightState *state); void (StringListLangElem *elem, HighlightState *state); void (DelimitedLangElem *elem, HighlightState *state); void (NamedSubExpsLangElem *elem, HighlightState *state); void (StateLangElem *elem, HighlightState *state); endbranches }; } #endif /*HIGHLIGHTSTATEBUILDER_H_*/ ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/statestartlangelem.cpp�����������������������������������������0000644�0001750�0001750�00000001131�11672675563�021070� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // C++ Implementation: statestartlangelem // // Description: // // // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004 // // Copyright: See COPYING file that comes with this distribution // // #include "statestartlangelem.h" using std::string; namespace srchilite { StateStartLangElem::StateStartLangElem(const string &n, unsigned int exit, bool all) : LangElem(n), exit(exit), exit_all(all), statelangelem(0) { } StateStartLangElem::~StateStartLangElem() { } const std::string StateStartLangElem::toString() const { string res = LangElem::toString(); return res; } } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/highlightbuilderexception.h������������������������������������0000644�0001750�0001750�00000002564�11672675563�022102� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2008 // // Copyright: See COPYING file that comes with this distribution // #ifndef HIGHLIGHTBUILDEREXCEPTION_H_ #define HIGHLIGHTBUILDEREXCEPTION_H_ #include <ostream> #include <boost/regex/pattern_except.hpp> #include <string> namespace srchilite { struct ParserInfo; struct HighlightBuilderException : public std::exception { /// detailed message for this exception std::string message; /// possible exception that caused this one boost::regex_error causedBy; /// filename of the element that caused this exception std::string filename; /// line of the element that caused this exception unsigned int line; HighlightBuilderException(const std::string &_message, const ParserInfo *parserinfo, const boost::regex_error &e = boost::regex_error(boost::regex_constants::error_bad_pattern)); HighlightBuilderException(const std::string &_message, const std::string &filename = "", unsigned int line = 0, const boost::regex_error &e = boost::regex_error(boost::regex_constants::error_bad_pattern)); virtual ~HighlightBuilderException() throw(); virtual const char* what ( ) const throw () ; }; std::ostream& operator<<(std::ostream& os, const HighlightBuilderException &entry); } #endif /*HIGHLIGHTBUILDEREXCEPTION_H_*/ ��������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/yywrap.c�������������������������������������������������������0000644�0001750�0001750�00000000621�11672675564�016164� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* yywrap.c this is a kind of work around to make java2html work even if who compiles it doesn't have lex installed on his/her system (I don't know itf this works). This way, even if he/she can't link to any lex library he/she shouldn't get any error... This should work with flex, I don't know about lex; anyway this should worry only who implements. */ int yywrap() { return 1 ; } ���������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/highlighttoken.h�����������������������������������������������0000644�0001750�0001750�00000004453�11672675563�017654� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2008 // // Copyright: See COPYING file that comes with this distribution // #ifndef HIGHLIGHTTOKEN_H_ #define HIGHLIGHTTOKEN_H_ #include <string> #include <list> #include <vector> #include <algorithm> namespace srchilite { class HighlightRule; /** * The matched element information by a rule. Each element of the collection is: * first = the element name, second = the actual program string */ typedef std::list<std::pair<std::string, std::string> > MatchedElements; /** * The matched subexpressions (if the original rule had subexpressions) */ typedef std::vector<std::string> MatchedSubExps; /** * Token containing information for performing the highlight */ struct HighlightToken { /// the possible prefix (part before the matched string) std::string prefix; /// true if the prefix is empty or contains only spaces bool prefixOnlySpaces; /// the possible suffix (part after the matched string) std::string suffix; /// the matched elements information MatchedElements matched; /** the size of the whole matched sequence (this is computed automatically when matched elements are set or added) */ unsigned int matchedSize; /** * The matched subexpressions (in case the rule had subexpressions) */ MatchedSubExps matchedSubExps; /// the matching rule const HighlightRule *rule; HighlightToken(const HighlightRule *_rule = 0); HighlightToken(const std::string &elem, const std::string &matched, const std::string &_prefix, const HighlightRule *_rule = 0); ~HighlightToken(); /** * Copy from the passed toke * @param token */ void copyFrom(const HighlightToken &token) { prefix = token.prefix; suffix = token.suffix; matched = token.matched; matchedSize = token.matchedSize; matchedSubExps = token.matchedSubExps; rule = token.rule; } /** * Resets the matched related fields (i.e., matched, matchedSize) */ void clearMatched(); /** * Adds information about a matched element * @param elem the element name * @param s the matched string */ void addMatched(const std::string &elem, const std::string &s); }; } #endif /*HIGHLIGHTTOKEN_H_*/ ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/regexpreprocessor.cpp������������������������������������������0000644�0001750�0001750�00000032636�11672675563�020764� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // C++ Implementation: RegexPreProcessor // // Description: performs operations or inspections on a string representing // a valid regular expression // // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 1999-2007 // // Copyright: See COPYING file that comes with this distribution // // #include "regexpreprocessor.h" #include <boost/regex.hpp> #include <sstream> #include <ctype.h> #include <iostream> using namespace std; namespace srchilite { // IMPORTANT: the following regular expressions assume that the // regular expression they try to match is a valid regular expression /// matches character sets in a regular expression const boost::regex char_set_exp("\\[([^\\|]*)\\]"); /// substitute a "(" with "(?:" if it's not followed by a ? and not preceeded by \\ char const boost::regex from("(\\\\\\()|(\\((?!\\?))"); /// substitute a "(" with "(?:" if it's not followed by a ? and not preceeded by \\ char const string into = "(?1\\\\\\()(?2\\(\\?\\:)"; /// found actual marking parenthesis, i.e., not preceeded by \\ and not followed by ? const boost::regex paren("(?<!\\\\)\\((?!\\?)"); /// regular expression matching a backreference, e.g., \1 or inside a conditional (?(1)...) const boost::regex backreference("(\\\\([[:digit:]]))|(\\(\\?\\(([[:digit:]]))"); /// index of the subexpression matching a slashed backreference #define SLASHED_BACKREFERENCE 1 /// index of the subexpression matching the number in a slashed backreference #define SLASHED_BACKREFERENCE_NUM 2 /// index of the subexpression matching a conditional backreference #define CONDITIONAL_BACKREFERENCE 3 /// index of the subexpression matching the number in a conditional backreference #define CONDITIONAL_BACKREFERENCE_NUM 4 /** regular expression matching a reference, e.g., @{digit} the @$ must not be preceeded by an escape char */ const boost::regex reference_exp("(?<!\\\\)@\\{([[:digit:]])\\}"); /// substitute a special char (i.e., .[{()\*+?|^$)... const boost::regex special_char("(\\.|\\[|\\]|\\{|\\}|\\(|\\)|\\\\|\\*|\\+|\\?|\\||\\^|\\$)"); /// ...with its escaped version const string special_char_escape = "(?1\\\\\\1)"; /// index of the subexpression matching the number backreference #define BACKREFERENCE_NUM 1 const string subexpressions_info::ERR_OUTER_UNMARKED = "unmarked subexpressions are allowed only inside marked subexpressions"; const string subexpressions_info::ERR_NESTED_SUBEXP = "subexpressions of subexpressions are not allowed"; const string subexpressions_info::ERR_UNBALANCED_PAREN = "unbalanced parenthesis"; const string subexpressions_info::ERR_OUTSIDE_SUBEXP = "parts outside marked subexpressions are not allowed"; RegexPreProcessor::RegexPreProcessor() { } RegexPreProcessor::~RegexPreProcessor() { } const string RegexPreProcessor::preprocess(const string &s) { // substitute a "(" with "(?:" if it's not followed by a ? and not preceeded by \\ char return boost::regex_replace(s, from, into, boost::match_default | boost::format_all); } const string _make_nonsensitive(const string &s) { ostringstream result; for (string::const_iterator it = s.begin(); it != s.end(); ++it) if (isalpha(*it)) result << "["<< (char)toupper(*it) << (char)tolower(*it) << "]"; else result << *it; return result.str(); } const string RegexPreProcessor::make_nonsensitive(const string &s) { boost::sregex_iterator m1(s.begin(), s.end(), char_set_exp); boost::sregex_iterator m2; if (m1 == m2) return _make_nonsensitive(s); ostringstream buffer; string prefix; string suffix; for (boost::sregex_iterator it = m1; it != m2; ++it) { prefix = it->prefix(); suffix = it->suffix(); if (prefix.size()) { buffer << _make_nonsensitive(prefix); } buffer << (*it)[0]; } if (suffix.size()) { buffer << _make_nonsensitive(suffix); } return buffer.str(); } unsigned int RegexPreProcessor::num_of_subexpressions(const string &s) { boost::sregex_iterator m1(s.begin(), s.end(), paren); boost::sregex_iterator m2; int counter = 0; for (boost::sregex_iterator it = m1; it != m2; ++it) { ++counter; } return counter; } const subexpressions_strings *RegexPreProcessor::split_marked_subexpressions( const string &s) { boost::sregex_iterator m1(s.begin(), s.end(), paren); boost::sregex_iterator m2; // we don't need to parse it (we can use the regex) since we assume that // the regular expression represented by s is made up of only // marked subexpressions and no nested subexpressions and char outside subexpressions subexpressions_strings *split = new subexpressions_strings; for (boost::sregex_iterator it = m1; it != m2;) { string prefix = it->prefix(); if (prefix.size()) split->push_back("(" + prefix); string suffix = it->suffix(); if (++it == m2) split->push_back("(" + suffix); } return split; } subexpressions_info RegexPreProcessor::num_of_marked_subexpressions( const string &s, bool allow_outer_char, bool allow_outer_nonmarked) { subexpressions_info sexps; // number of open parenthesis int open_paren_num = 0; // whether we're inside a marked subexpressions bool found_marked_subexp = false; // whether we're inside a char sequence [...] bool char_sequence_state = false; // whether we're inside a char class name, e.g., [:alpha:] bool char_class_name_state = false; // len of string int len = s.size(); // char we're examining char c; for (int i = 0; i < len; ++i) { c = s[i]; if (!char_sequence_state && c == '[' && (i == 0 || s[i-1] != '\\') ) { char_sequence_state = true; } else if (char_sequence_state) { // here i cannot be 0 if (char_class_name_state) { if (c == ']' && s[i-1] == ':') { // exit the char class name state char_class_name_state = false; } } else if (!char_class_name_state && c == '[' && s[i-1] != '\\' && (i+1) < len && s[i+1] == ':') { char_class_name_state = true; } else if (c == ']' && s[i-1] != '\\') { // exit the char sequence state char_sequence_state = false; } // else simply go on skipping chars } else if (c == '\\' && (i+1) < len && (s[i+1] == '('|| s[i+1] == ')')) { // skip the escaped paren ++i; } else if (c == '(') { // we found a subexp ++open_paren_num; if ((i+1) < len && s[i+1] == '?') { if (!found_marked_subexp && !allow_outer_nonmarked) { // outer subexpressions must be marked sexps.errors = subexpressions_info::ERR_OUTER_UNMARKED; return sexps; } } else { // it's a marked subexp if (found_marked_subexp) { // we don't allow nested subexpressions sexps.errors = subexpressions_info::ERR_NESTED_SUBEXP; return sexps; } // we found a marked subexp found_marked_subexp = true; ++(sexps.marked); } } else if (c == ')') { if (!open_paren_num) { // unbalanced parenthesis sexps.errors = subexpressions_info::ERR_UNBALANCED_PAREN; return sexps; } --open_paren_num; // end of marked subexp if (!open_paren_num && found_marked_subexp) found_marked_subexp = false; } else { // we don't allow non marked parts if (!found_marked_subexp && !allow_outer_char) { sexps.errors = subexpressions_info::ERR_OUTSIDE_SUBEXP; return sexps; } } } // check that all paren are closed if (open_paren_num) sexps.errors = subexpressions_info::ERR_UNBALANCED_PAREN; return sexps; } bool RegexPreProcessor::contains_backreferences(const std::string &s) { return boost::regex_search(s, backreference); } backreference_info RegexPreProcessor::num_of_backreferences(const string &s) { boost::sregex_iterator m1(s.begin(), s.end(), backreference); boost::sregex_iterator m2; backreference_info info(std::make_pair(0, 0)); for (boost::sregex_iterator it = m1; it != m2; ++it) { ++(info.first); // for converting a string into the number stringstream buffer; int backreference_num; if ((*it)[SLASHED_BACKREFERENCE].matched) { buffer << (*it)[SLASHED_BACKREFERENCE_NUM]; } else { buffer << (*it)[CONDITIONAL_BACKREFERENCE_NUM]; } // retrieve the number of the backreference buffer >> backreference_num; if (backreference_num > info.second) { // we update the number of the highest backreference info.second = backreference_num; } } return info; } backreference_info RegexPreProcessor::num_of_references(const string &s) { boost::sregex_iterator m1(s.begin(), s.end(), reference_exp); boost::sregex_iterator m2; backreference_info info(std::make_pair(0, 0)); for (boost::sregex_iterator it = m1; it != m2; ++it) { ++(info.first); // for converting a string into the number stringstream buffer; int backreference_num; // the digit of the reference buffer << (*it)[BACKREFERENCE_NUM]; // retrieve the number of the backreference buffer >> backreference_num; if (backreference_num > info.second) { // we update the number of the highest backreference info.second = backreference_num; } } return info; } const std::string RegexPreProcessor::replace_backreferences( const std::string &original, const backreference_replacements &replace) { boost::sregex_iterator m1(original.begin(), original.end(), backreference); boost::sregex_iterator m2; if (m1 == m2) { // no backreference in the current string return original; } ostringstream result; for (boost::sregex_iterator it = m1; it != m2;) { string prefix = it->prefix(); if (prefix.size()) result << prefix; // for converting a string into the number stringstream buffer; int backreference_num; // substitute the backreference number with the corresponding replace // string if ((*it)[SLASHED_BACKREFERENCE].matched) { buffer << (*it)[SLASHED_BACKREFERENCE_NUM]; // retrieve the number of the backreference buffer >> backreference_num; result << replace[backreference_num-1]; } else { buffer << (*it)[CONDITIONAL_BACKREFERENCE_NUM]; // retrieve the number of the backreference buffer >> backreference_num; result << "(?("<< replace[backreference_num-1]; } string suffix = it->suffix(); if (++it == m2) result << suffix; } return result.str(); } const std::string RegexPreProcessor::replace_backreferences( const std::string &original, const regex_match_results &results) { // build the replacement vector backreference_replacements replace(9); // fill it with matched results for (unsigned i = 1; i < results.size(); ++i) { // remember that 0 is the whole expressions replace[i-1] = results[i]; } return replace_backreferences(original, replace); } const string RegexPreProcessor::replace_references( const std::string &original, const backreference_replacements &replace) { boost::sregex_iterator m1(original.begin(), original.end(), reference_exp); boost::sregex_iterator m2; if (m1 == m2) { // no backreference in the current string return original; } ostringstream result; for (boost::sregex_iterator it = m1; it != m2;) { string prefix = it->prefix(); if (prefix.size()) result << prefix; // for converting a string into the number stringstream buffer; int backreference_num; buffer << (*it)[BACKREFERENCE_NUM]; // retrieve the number of the backreference buffer >> backreference_num; // substitute the backreference number with the corresponding replace // string, after escaping non-alphanumerical characters // this is necessary since this string will be used to create a regular // expression result << boost::regex_replace(replace[backreference_num-1], special_char, special_char_escape, boost::match_default | boost::format_all); string suffix = it->suffix(); if (++it == m2) result << suffix; } return result.str(); } const string RegexPreProcessor::replace_references( const std::string &original, const regex_match_results &results) { // build the replacement vector backreference_replacements replace(9); // fill it with matched results for (unsigned i = 1; i < results.size(); ++i) { // remember that 0 is the whole expressions replace[i-1] = results[i]; } return replace_references(original, replace); } } ��������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/textstyleformatter.cpp�����������������������������������������0000644�0001750�0001750�00000006300�11672675563�021161� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/** * C++ class: textstyleformatter.cpp * * Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2005-2008 * Copyright: See COPYING file that comes with this distribution */ #include "textstyleformatter.h" #include "bufferedoutput.h" #include "preformatter.h" #include "ctagsformatter.h" #include "wordtokenizer.h" #include <sstream> using namespace std; namespace srchilite { TextStyleFormatter::TextStyleFormatter(const TextStyle &style, BufferedOutput *o) : textstyle(style), output(o), preFormatter(0), ctagsFormatter(0) { } TextStyleFormatter::TextStyleFormatter(const string &repr, BufferedOutput *o) : textstyle(TextStyle(repr)), output(o), preFormatter(0), ctagsFormatter(0) { } void TextStyleFormatter::format(const string &s, const FormatterParams *params) { // first check whether the reference formatter can format the paragraph if (!formatReferences(s, params)) doFormat(s); // otherwise we do it ourselves } void TextStyleFormatter::doFormat(const string &s, bool preformat) { if (!s.size()) return; if (preFormatter && preformat) { output->output(textstyle.output(preFormatter->preformat(s))); } else { output->output(textstyle.output(s)); } } bool TextStyleFormatter::formatReferences(const string &s, const FormatterParams *params) { if (ctagsFormatter && params) { // for each word in s try to format an anchor or reference WordTokenizer::WordTokenizerResults tokens; WordTokenizer::tokenize(s, tokens); // here we buffer parts that are not references (or spaces) ostringstream notReferences; CTagsFormatterResults results; for (WordTokenizer::WordTokenizerResults::const_iterator token = tokens.begin(); token != tokens.end(); ++token) { if (token->first.size()) { // a space notReferences << token->first; } else { if (ctagsFormatter->formatCTags(token->second, results, params)) { // first format the previous non reference parts if any doFormat(notReferences.str()); notReferences.str(""); // then the anchors and references if (results.inlineResult.size()) { // don't preformat: it's already been done doFormat(results.inlineResult, false); } else { // inline result excludes the other ones output->postLineInsertFrom(results.postLineResult); output->postDocInsertFrom(results.postDocResult); // we still need to format this word, since otherwise // it won't appear in the text of the program doFormat(token->second); } // clear results for possible other formatting results.clear(); } else { notReferences << token->second; } } } // format possible buffered tokens doFormat(notReferences.str()); return true; } return false; } } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/highlightrulefactory.h�����������������������������������������0000644�0001750�0001750�00000007266�11672675563�021100� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2008 // // Copyright: See COPYING file that comes with this distribution // #ifndef HIGHLIGHTRULEFACTORY_H_ #define HIGHLIGHTRULEFACTORY_H_ #include <list> #include <string> namespace srchilite { typedef std::list<std::string> WordList; typedef std::list<std::string> ElemNameList; class HighlightRule; /** * Abstract factory for highlighting rules */ class HighlightRuleFactory { public: HighlightRuleFactory(); virtual ~HighlightRuleFactory(); /** * Creates a generic highlighting rule * @param name the element name represented by the rule * @param the string representation * @return the generated rule */ virtual HighlightRule *createSimpleRule(const std::string &name, const std::string &s) = 0; /** * Creates a rule for detecting a list of specific words, i.e., isolated * from other parts by a space or a delimiter (e.g., if "class" is considered as * a word, then it will not match the substring "class" in "myclass") * @param name the element name represented by the rule * @param list the list of words to detect * @param caseSensitive if the characters in the expression must be interpreted * case sensitive * @return the generated rule */ virtual HighlightRule *createWordListRule(const std::string &name, const WordList &list, bool caseSensitve = true) = 0; /** * Creates a rule for detecting a list of specific expressions * @param name the element name represented by the rule * @param list the list of words to detect * @param caseSensitive if the characters in the expression must be interpreted * case sensitive * @return the generated rule */ virtual HighlightRule *createListRule(const std::string &name, const WordList &list, bool caseSensitve = true) = 0; /** * Creates a rule for matching a delimited string (spanning a single line) * @param name the element name represented by the rule * @param start the string determining the start of the sequence * @param end the string determining the end of the sequence * @param escape the string the escape sequence (typically a char, e.g., \) * @param nested whether the delimiters can be nested * @return the generated rule */ virtual HighlightRule *createLineRule(const std::string &name, const std::string &start, const std::string &end, const std::string &escape, bool nested) = 0; /** * Creates a rule for matching a delimited string (possibly spanning more than one line) * @param name the element name represented by the rule * @param start the string determining the start of the sequence * @param end the string determining the end of the sequence * @param escape the string the escape sequence (typically a char, e.g., \) * @param nested whether the delimiters can be nested * @return the generated rule */ virtual HighlightRule *createMultiLineRule(const std::string &name, const std::string &start, const std::string &end, const std::string &escape, bool nested) = 0; /** * Creates a rule for matching many element names, each represented by a * subexpression (the number of subexpression must be equal to the size of the * nameList) * @param nameList the list of element names represented by the rule * @param rep the string representation of the rule * @return the generated rule */ virtual HighlightRule *createCompoundRule(const ElemNameList &nameList, const std::string &rep) = 0; }; } #endif /*HIGHLIGHTRULEFACTORY_H_*/ ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/lineranges.h���������������������������������������������������0000644�0001750�0001750�00000006020�11672675563�016763� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * lineranges.h * * Created on: Sep 17, 2008 * Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2008 * Copyright: See COPYING file that comes with this distribution */ #ifndef LINERANGES_H_ #define LINERANGES_H_ #include <set> #include <string> namespace srchilite { /// a possible error in specifying a range enum RangeError { NO_ERROR = 0, INVALID_RANGE_NUMBER }; /// result for a check whether a number is in a range (or in a context) enum RangeResult { NOT_IN_RANGE = 0, CONTEXT_RANGE, IN_RANGE }; /** * Functionalities for detecting whether a line is in one of the * stored line ranges (or in the context of a range). * * This also performs some optimization: ranges are stored in a set * in ascending order; if we have ranges, e.g., 1-20, 50-70, 100-200, and * we check whether 23 is in range, we first check if it's in 1-20, then, * since it's not there, we check whether it's in 50-70; it is not, and since the * range is 50-70 it makes no sense searching for it in other ranges. The next search * will start from range 50-70, since we assume that line numbers are always increasing. */ class LineRanges { public: LineRanges(unsigned int contextLines = 0); ~LineRanges(); typedef int RangeElemType; typedef std::pair<RangeElemType, RangeElemType> RangeType; typedef std::set<RangeType> LineRangeSet; /** * Adds a range to the set. * The argument can be: * * - a single element (means only one line) * - a complete range (e.g., 20-35) * - a partial range (e.g., 10- : from line 10 to the end, * -20 : from the beginning to line 20) * * @param range the string representing the range. * @return code specifying a possible error */ RangeError addRange(const std::string &range); const LineRangeSet &getLineRangeSet() const { return lineRangeSet; } /** * The next isInRange search will start from the first element of * the set. This should be called before searching for lines of a file, * that we started to process. */ void reset() { searchFromTheStart = true; } /** * Checks whether the passed element is in a range of this set. * If it's not in the range it might be in the surrounding context. * * @param e * @return whether the passed element is in a range or in the surrounding context. */ RangeResult isInRange(const RangeElemType e); void setContextLines(unsigned int context) { contextLines = context; } private: LineRangeSet lineRangeSet; /** * whether to perform the search from the first element of the set */ bool searchFromTheStart; /** * The current range for performing the search of isInRange. */ LineRangeSet::const_iterator currentRange; /** * The number of lines making the context (i.e., the number of lines * that are not part of a range but are in the specified line number context) */ int contextLines; }; } #endif /* LINERANGES_H_ */ ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/langelemsprinter_dbtab.cc��������������������������������������0000644�0001750�0001750�00000001775�11672675563�021515� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#include "statelangelem.h" #include "namedsubexpslangelem.h" #include "langelems.h" #include "langelem.h" #include "langelemsprinter.hpp" void LangElemsPrinter::collect_DB(const LangElem * elem) { (const_cast<LangElem *>(elem))->dispatch_collect_const(this); } void LangElemsPrinter::collect_DB(const LangElems * elem) { (const_cast<LangElems *>(elem))->dispatch_collect_const(this); } void LangElem::dispatch_collect_const(LangElemsPrinter *LangElemsPrinter_o) { LangElemsPrinter_o->_forward_collect((const LangElem *)(this)); } void LangElems::dispatch_collect_const(LangElemsPrinter *LangElemsPrinter_o) { LangElemsPrinter_o->_forward_collect((const LangElems *)(this)); } void NamedSubExpsLangElem::dispatch_collect_const(LangElemsPrinter *LangElemsPrinter_o) { LangElemsPrinter_o->_forward_collect((const NamedSubExpsLangElem *)(this)); } void StateLangElem::dispatch_collect_const(LangElemsPrinter *LangElemsPrinter_o) { LangElemsPrinter_o->_forward_collect((const StateLangElem *)(this)); } ���source-highlight-3.1.6/lib/srchilite/bufferedoutput.cpp���������������������������������������������0000664�0001750�0001750�00000002224�11672675562�020235� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2008 // // Copyright: See COPYING file that comes with this distribution // #include "bufferedoutput.h" namespace srchilite { using namespace std; BufferedOutput::BufferedOutput(std::ostream &os) : outputBuff(os), alwaysFlush(false) { } BufferedOutput::~BufferedOutput() { } void BufferedOutput::output(const std::string &s) { outputBuff << s; if (alwaysFlush) outputBuff << flush; } void BufferedOutput::postLineInsert(const std::string &s) { if (s.size()) postLineContents.insert(s); } void BufferedOutput::postDocInsert(const std::string &s) { if (s.size()) postDocContents.insert(s); } void BufferedOutput::writePostInfo(PostContents &post, const std::string &prefix) { for (PostContents::const_iterator it = post.begin(); it != post.end(); ++it) { output(prefix + *it); } post.clear(); } void BufferedOutput::writePostLine(const std::string &prefix) { writePostInfo(postLineContents, prefix); } void BufferedOutput::writePostDoc(const std::string &prefix) { writePostInfo(postDocContents, prefix); } } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/outlangdefparser.yy��������������������������������������������0000644�0001750�0001750�00000015076�11672675563�020426� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������%{ /* * Copyright (C) 1999-2007 Lorenzo Bettini <http://www.lorenzobettini.it> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <iostream> #include <string> #include "parsestruct.h" #include "outlangdefscanner.h" #include "outlangdefparserfun.h" #include "textstyles.h" #include "parserexception.h" #include "ioexception.h" using std::cerr; using std::string; using namespace srchilite; static void yyerror( const char *s ) ; static void yyerror( const string &s ) ; /// the buffer for storing errors static string errorBuffer; TextStylesPtr textstyles; string start_doc, end_doc; ColorMapPtr colorMap; CharTranslatorPtr charTranslator; const char *reference_vars[] = {"linenum", "infilename", "infile", "outfile", 0}; const char *anchor_vars[] = {"linenum", "infilename", "infile", 0}; /// used to record that the error is due to an included file not found static bool includedFileNotFound = false; %} %union { int tok ; /* command */ bool booloption ; const std::string * string ; /* string : id, ... */ int flag ; }; %token <tok> BEGIN_T END_T DOC_TEMPLATE_T NODOC_TEMPLATE_T STYLE_TEMPLATE_T STYLE_SEPARATOR_T %token <tok> BOLD_T ITALICS_T UNDERLINE_T COLOR_T BG_COLOR_T FIXED_T NOTFIXED_T %token <tok> COLORMAP_T DEFAULT_T ONESTYLE_T TRANSLATIONS_T EXTENSION_T ANCHOR_T %token <tok> REFERENCE_T INLINE_REFERENCE_T POSTLINE_REFERENCE_T POSTDOC_REFERENCE_T %token <string> KEY STRINGDEF REGEXDEF LINE_PREFIX_T LINENUM_T WRONG_INCLUDE_FILE %% outputlang : outputlangdefs ; outputlangdefs : outputlangdefs outputlangdef | outputlangdef ; outputlangdef : DOC_TEMPLATE_T STRINGDEF STRINGDEF END_T { textstyles->docTemplate = DocTemplate(*$2, *$3); delete $2; delete $3; } | NODOC_TEMPLATE_T STRINGDEF STRINGDEF END_T { textstyles->noDocTemplate = DocTemplate(*$2, *$3); delete $2; delete $3; } | STYLE_TEMPLATE_T STRINGDEF { textstyles->starting_template = *$2; delete $2; } | STYLE_SEPARATOR_T STRINGDEF { textstyles->style_separator = *$2; delete $2; } | BOLD_T STRINGDEF { textstyles->bold = *$2; delete $2; } | ITALICS_T STRINGDEF { textstyles->italics = *$2; delete $2; } | UNDERLINE_T STRINGDEF { textstyles->underline = *$2; delete $2; } | FIXED_T STRINGDEF { textstyles->fixed = *$2; delete $2; } | NOTFIXED_T STRINGDEF { textstyles->notfixed = *$2; delete $2; } | COLOR_T STRINGDEF { textstyles->color = *$2; delete $2; } | BG_COLOR_T STRINGDEF { textstyles->bg_color = *$2; delete $2; } | ONESTYLE_T STRINGDEF { textstyles->onestyle = *$2; delete $2; } | EXTENSION_T STRINGDEF { textstyles->file_extension = *$2; delete $2; } | ANCHOR_T STRINGDEF { textstyles->refstyle.anchor = TextStyle(*$2, anchor_vars); delete $2; } | LINE_PREFIX_T STRINGDEF { textstyles->line_prefix = *$2; delete $2; } | LINENUM_T STRINGDEF { textstyles->linenum = *$2; delete $2; } | REFERENCE_T STRINGDEF { if (textstyles->refstyle.inline_reference.empty()) textstyles->refstyle.inline_reference = TextStyle(*$2, reference_vars); if (textstyles->refstyle.postline_reference.empty()) textstyles->refstyle.postline_reference = TextStyle(*$2, reference_vars); if (textstyles->refstyle.postdoc_reference.empty()) textstyles->refstyle.postdoc_reference = TextStyle(*$2, reference_vars); delete $2; } | INLINE_REFERENCE_T STRINGDEF { textstyles->refstyle.inline_reference = TextStyle(*$2, reference_vars); delete $2; } | POSTLINE_REFERENCE_T STRINGDEF { textstyles->refstyle.postline_reference = TextStyle(*$2, reference_vars); delete $2; } | POSTDOC_REFERENCE_T STRINGDEF { textstyles->refstyle.postdoc_reference = TextStyle(*$2, reference_vars); delete $2; } | colormap { textstyles->colorMap = colorMap; } | chartranslator { textstyles->charTranslator = charTranslator; } | WRONG_INCLUDE_FILE { // this token is used by the scanner to signal an error // in opening an include file includedFileNotFound = true; yyerror("cannot open include file " + *$1); delete $1; YYERROR; } ; colormap : COLORMAP_T colormapentries END_T ; colormapentries : colormapentries colormapentry | colormapentry ; colormapentry : STRINGDEF STRINGDEF { (*colorMap)[*$1] = *$2; delete $1; delete $2; } | DEFAULT_T STRINGDEF { colorMap->setDefault(*$2); delete $2; } ; chartranslator : TRANSLATIONS_T translations END_T ; translations : translations translation | translation ; translation : REGEXDEF REGEXDEF { charTranslator->set_translation(*$1, *$2); delete $1; delete $2; } %% extern int outlangdef_lex_destroy (void); void yyerror( const char *s ) { errorBuffer = s; } void yyerror( const string &s ) { yyerror(s.c_str()); } namespace srchilite { TextStylesPtr parse_outlang_def() { return parse_outlang_def("", "stdin"); } TextStylesPtr parse_outlang_def(const char *path, const char *name) { includedFileNotFound = false; outlang_parsestruct = ParseStructPtr(new ParseStruct(path, name)); textstyles = TextStylesPtr(new TextStyles); colorMap = ColorMapPtr(new ColorMap); charTranslator = CharTranslatorPtr(new CharTranslator); errorBuffer = ""; int result = 1; bool fileNotFound = false; try { if (strcmp(name, "stdin") != 0) open_outlang_file_to_scan(path, name); } catch (IOException &e) { errorBuffer = e.message; fileNotFound = true; } if (!fileNotFound) result = outlangdef_parse(); if (result != 0 && ! fileNotFound) { // make sure the input file is closed close_outlangdefinputfile(); // close it before clearing the scanner } // release scanner memory clear_outlangdefscanner (); if (result != 0 || errorBuffer.size()) { if (fileNotFound || includedFileNotFound) { throw ParserException(errorBuffer); } else { ParserException e(errorBuffer, outlang_parsestruct.get()); throw e; } } return textstyles; } } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/outlangdefparserfun.h������������������������������������������0000644�0001750�0001750�00000000620�11672675563�020712� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // C++ Interface: %{MODULE} // // Description: // // // Author: %{AUTHOR} <%{EMAIL}>, (C) %{YEAR} // // Copyright: See COPYING file that comes with this distribution // // #ifndef OUTLANGDEFPARSERFUN_H #define OUTLANGDEFPARSERFUN_H #include "textstyles.h" namespace srchilite { TextStylesPtr parse_outlang_def(); TextStylesPtr parse_outlang_def(const char *path, const char *name); } #endif ����������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/fileinfo.cpp���������������������������������������������������0000644�0001750�0001750�00000001067�11672675563�016770� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // C++ Implementation: fileinfo // // Description: // // // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2005 // // Copyright: See COPYING file that comes with this distribution // // #include "fileinfo.h" #include "fileutil.h" using namespace std; namespace srchilite { FileInfo::FileInfo(const string &input, const string &output) : ParserInfo(input), input_file_name(strip_file_path(input)), output_file_name(output), output_file_extension("." +get_file_extension(output)) { } FileInfo::~FileInfo() { } } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/langelemsprinter.cpp�������������������������������������������0000644�0001750�0001750�00000002711�11672675563�020545� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // C++ Implementation: langelemsprinter // // Description: // // // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2006 // // Copyright: See COPYING file that comes with this distribution // // #include "langelemsprinter.hpp" #include "statelangelem.h" #include "langelems.h" #include "namedsubexpslangelem.h" #include <ostream> #include <algorithm> #include <iterator> using namespace std; namespace srchilite { LangElemsPrinter::LangElemsPrinter() { } LangElemsPrinter::~LangElemsPrinter() { } void LangElemsPrinter::print(const LangElems *elems, ostream &os) { if (!elems) return; collect_DB(elems); copy(setOfElements.begin(), setOfElements.end(), ostream_iterator< SetOfElements::value_type>(os, "\n")); } void LangElemsPrinter::collect(const LangElems *elems) { if (elems) for (LangElems::const_iterator it = elems->begin(); it != elems->end(); ++it) collect_DB(*it); } void LangElemsPrinter::collect(const StateLangElem *elem) { setOfElements.insert(elem->getName()); const LangElems *elems = elem->getElems(); if (elems) collect_DB(elems); } void LangElemsPrinter::collect(const LangElem *elem) { setOfElements.insert(elem->getName()); } void LangElemsPrinter::collect(const NamedSubExpsLangElem *elem) { const ElementNames *names = elem->getElementNames(); setOfElements.insert(names->begin(), names->end()); } #include "langelemsprinter_dbtab.cc" } �������������������������������������������������������source-highlight-3.1.6/lib/srchilite/preformatter.h�������������������������������������������������0000644�0001750�0001750�00000003140�11672675563�017346� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // C++ Interface: preformatter // // Description: // // // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2005 // // Copyright: See COPYING file that comes with this distribution // // #ifndef PREFORMATTER_H #define PREFORMATTER_H #include <string> #include <boost/shared_ptr.hpp> namespace srchilite { class PreFormatter; /// shared pointer for PreFormatter typedef boost::shared_ptr<PreFormatter> PreFormatterPtr; /** Preformats text to be generated. This implements the Decorator pattern, thus yielding a chain of preformatters @author Lorenzo Bettini */ class PreFormatter { /// the possible nested preformatter (Decorator pattern) PreFormatterPtr decorator; public: /** * @param f the nested decorated preformatter */ PreFormatter(PreFormatterPtr f = PreFormatterPtr()); virtual ~PreFormatter(); /** * Sets the nested preformatter * @param f the nested (decorated) preformatter */ void setPreFormatter(PreFormatterPtr f); /** * Preformats the passed string (public version) * @param text the string to be preformatted * @return the preformatted string */ const std::string preformat(const std::string &text); protected: /** * Preformats the passed string (protected version). The subclasses must * redefine this method to perform the preformatting. The default implementation * does not perform any preformatting. * @param text the string to be preformatted * @return the preformatted string */ virtual const std::string doPreformat(const std::string &text); }; } #endif ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/outlangdefparser.cc��������������������������������������������0000644�0001750�0001750�00000156176�11675044736�020354� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������ /* A Bison parser, made by GNU Bison 2.4.1. */ /* Skeleton implementation for Bison's Yacc-like parsers in C Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work under terms of your choice, so long as that work isn't itself a parser generator using the skeleton or a modified version thereof as a parser skeleton. Alternatively, if you modify or redistribute the parser skeleton itself, you may (at your option) remove this special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ /* C LALR(1) parser skeleton written by Richard Stallman, by simplifying the original so-called "semantic" parser. */ /* All symbols defined below should begin with yy or YY, to avoid infringing on user name space. This should be done even for local variables, as they might otherwise be expanded by user macros. There are some unavoidable exceptions within include files to define necessary library symbols; they are noted "INFRINGES ON USER NAME SPACE" below. */ /* Identify Bison output. */ #define YYBISON 1 /* Bison version. */ #define YYBISON_VERSION "2.4.1" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" /* Pure parsers. */ #define YYPURE 0 /* Push parsers. */ #define YYPUSH 0 /* Pull parsers. */ #define YYPULL 1 /* Using locations. */ #define YYLSP_NEEDED 0 /* Substitute the variable and function names. */ #define yyparse outlangdef_parse #define yylex outlangdef_lex #define yyerror outlangdef_error #define yylval outlangdef_lval #define yychar outlangdef_char #define yydebug outlangdef_debug #define yynerrs outlangdef_nerrs /* Copy the first part of user declarations. */ /* Line 189 of yacc.c */ #line 1 "../../../lib/srchilite/outlangdefparser.yy" /* * Copyright (C) 1999-2007 Lorenzo Bettini <http://www.lorenzobettini.it> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <iostream> #include <string> #include "parsestruct.h" #include "outlangdefscanner.h" #include "outlangdefparserfun.h" #include "textstyles.h" #include "parserexception.h" #include "ioexception.h" using std::cerr; using std::string; using namespace srchilite; static void yyerror( const char *s ) ; static void yyerror( const string &s ) ; /// the buffer for storing errors static string errorBuffer; TextStylesPtr textstyles; string start_doc, end_doc; ColorMapPtr colorMap; CharTranslatorPtr charTranslator; const char *reference_vars[] = {"linenum", "infilename", "infile", "outfile", 0}; const char *anchor_vars[] = {"linenum", "infilename", "infile", 0}; /// used to record that the error is due to an included file not found static bool includedFileNotFound = false; /* Line 189 of yacc.c */ #line 139 "../../../lib/srchilite/outlangdefparser.cc" /* Enabling traces. */ #ifndef YYDEBUG # define YYDEBUG 0 #endif /* Enabling verbose error messages. */ #ifdef YYERROR_VERBOSE # undef YYERROR_VERBOSE # define YYERROR_VERBOSE 1 #else # define YYERROR_VERBOSE 0 #endif /* Enabling the token table. */ #ifndef YYTOKEN_TABLE # define YYTOKEN_TABLE 0 #endif /* Tokens. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE /* Put the tokens into the symbol table, so that GDB and other debuggers know about them. */ enum yytokentype { BEGIN_T = 258, END_T = 259, DOC_TEMPLATE_T = 260, NODOC_TEMPLATE_T = 261, STYLE_TEMPLATE_T = 262, STYLE_SEPARATOR_T = 263, BOLD_T = 264, ITALICS_T = 265, UNDERLINE_T = 266, COLOR_T = 267, BG_COLOR_T = 268, FIXED_T = 269, NOTFIXED_T = 270, COLORMAP_T = 271, DEFAULT_T = 272, ONESTYLE_T = 273, TRANSLATIONS_T = 274, EXTENSION_T = 275, ANCHOR_T = 276, REFERENCE_T = 277, INLINE_REFERENCE_T = 278, POSTLINE_REFERENCE_T = 279, POSTDOC_REFERENCE_T = 280, KEY = 281, STRINGDEF = 282, REGEXDEF = 283, LINE_PREFIX_T = 284, LINENUM_T = 285, WRONG_INCLUDE_FILE = 286 }; #endif /* Tokens. */ #define BEGIN_T 258 #define END_T 259 #define DOC_TEMPLATE_T 260 #define NODOC_TEMPLATE_T 261 #define STYLE_TEMPLATE_T 262 #define STYLE_SEPARATOR_T 263 #define BOLD_T 264 #define ITALICS_T 265 #define UNDERLINE_T 266 #define COLOR_T 267 #define BG_COLOR_T 268 #define FIXED_T 269 #define NOTFIXED_T 270 #define COLORMAP_T 271 #define DEFAULT_T 272 #define ONESTYLE_T 273 #define TRANSLATIONS_T 274 #define EXTENSION_T 275 #define ANCHOR_T 276 #define REFERENCE_T 277 #define INLINE_REFERENCE_T 278 #define POSTLINE_REFERENCE_T 279 #define POSTDOC_REFERENCE_T 280 #define KEY 281 #define STRINGDEF 282 #define REGEXDEF 283 #define LINE_PREFIX_T 284 #define LINENUM_T 285 #define WRONG_INCLUDE_FILE 286 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE { /* Line 214 of yacc.c */ #line 58 "../../../lib/srchilite/outlangdefparser.yy" int tok ; /* command */ bool booloption ; const std::string * string ; /* string : id, ... */ int flag ; /* Line 214 of yacc.c */ #line 246 "../../../lib/srchilite/outlangdefparser.cc" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 #endif /* Copy the second part of user declarations. */ /* Line 264 of yacc.c */ #line 258 "../../../lib/srchilite/outlangdefparser.cc" #ifdef short # undef short #endif #ifdef YYTYPE_UINT8 typedef YYTYPE_UINT8 yytype_uint8; #else typedef unsigned char yytype_uint8; #endif #ifdef YYTYPE_INT8 typedef YYTYPE_INT8 yytype_int8; #elif (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) typedef signed char yytype_int8; #else typedef short int yytype_int8; #endif #ifdef YYTYPE_UINT16 typedef YYTYPE_UINT16 yytype_uint16; #else typedef unsigned short int yytype_uint16; #endif #ifdef YYTYPE_INT16 typedef YYTYPE_INT16 yytype_int16; #else typedef short int yytype_int16; #endif #ifndef YYSIZE_T # ifdef __SIZE_TYPE__ # define YYSIZE_T __SIZE_TYPE__ # elif defined size_t # define YYSIZE_T size_t # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # else # define YYSIZE_T unsigned int # endif #endif #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) #ifndef YY_ # if YYENABLE_NLS # if ENABLE_NLS # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ # define YY_(msgid) dgettext ("bison-runtime", msgid) # endif # endif # ifndef YY_ # define YY_(msgid) msgid # endif #endif /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ # define YYUSE(e) ((void) (e)) #else # define YYUSE(e) /* empty */ #endif /* Identity function, used to suppress warnings about constant conditions. */ #ifndef lint # define YYID(n) (n) #else #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static int YYID (int yyi) #else static int YYID (yyi) int yyi; #endif { return yyi; } #endif #if ! defined yyoverflow || YYERROR_VERBOSE /* The parser invokes alloca or malloc; define the necessary symbols. */ # ifdef YYSTACK_USE_ALLOCA # if YYSTACK_USE_ALLOCA # ifdef __GNUC__ # define YYSTACK_ALLOC __builtin_alloca # elif defined __BUILTIN_VA_ARG_INCR # include <alloca.h> /* INFRINGES ON USER NAME SPACE */ # elif defined _AIX # define YYSTACK_ALLOC __alloca # elif defined _MSC_VER # include <malloc.h> /* INFRINGES ON USER NAME SPACE */ # define alloca _alloca # else # define YYSTACK_ALLOC alloca # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ # ifndef _STDLIB_H # define _STDLIB_H 1 # endif # endif # endif # endif # endif # ifdef YYSTACK_ALLOC /* Pacify GCC's `empty if-body' warning. */ # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) # ifndef YYSTACK_ALLOC_MAXIMUM /* The OS might guarantee only one guard page at the bottom of the stack, and a page size can be as small as 4096 bytes. So we cannot safely invoke alloca (N) if N exceeds 4096. Use a slightly smaller number to allow for a few compiler-allocated temporary stack slots. */ # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ # endif # else # define YYSTACK_ALLOC YYMALLOC # define YYSTACK_FREE YYFREE # ifndef YYSTACK_ALLOC_MAXIMUM # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM # endif # if (defined __cplusplus && ! defined _STDLIB_H \ && ! ((defined YYMALLOC || defined malloc) \ && (defined YYFREE || defined free))) # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ # ifndef _STDLIB_H # define _STDLIB_H 1 # endif # endif # ifndef YYMALLOC # define YYMALLOC malloc # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ # endif # endif # ifndef YYFREE # define YYFREE free # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif # endif # endif #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ #if (! defined yyoverflow \ && (! defined __cplusplus \ || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc { yytype_int16 yyss_alloc; YYSTYPE yyvs_alloc; }; /* The size of the maximum gap between one aligned stack and the next. */ # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) /* The size of an array large to enough to hold all stacks, each with N elements. */ # define YYSTACK_BYTES(N) \ ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + YYSTACK_GAP_MAXIMUM) /* Copy COUNT objects from FROM to TO. The source and destination do not overlap. */ # ifndef YYCOPY # if defined __GNUC__ && 1 < __GNUC__ # define YYCOPY(To, From, Count) \ __builtin_memcpy (To, From, (Count) * sizeof (*(From))) # else # define YYCOPY(To, From, Count) \ do \ { \ YYSIZE_T yyi; \ for (yyi = 0; yyi < (Count); yyi++) \ (To)[yyi] = (From)[yyi]; \ } \ while (YYID (0)) # endif # endif /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ do \ { \ YYSIZE_T yynewbytes; \ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ Stack = &yyptr->Stack_alloc; \ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ while (YYID (0)) #endif /* YYFINAL -- State number of the termination state. */ #define YYFINAL 56 /* YYLAST -- Last index in YYTABLE. */ #define YYLAST 76 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 32 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 10 /* YYNRULES -- Number of rules. */ #define YYNRULES 36 /* YYNRULES -- Number of states. */ #define YYNSTATES 69 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 #define YYMAXUTOK 286 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ static const yytype_uint8 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 }; #if YYDEBUG /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in YYRHS. */ static const yytype_uint8 yyprhs[] = { 0, 0, 3, 5, 8, 10, 15, 20, 23, 26, 29, 32, 35, 38, 41, 44, 47, 50, 53, 56, 59, 62, 65, 68, 71, 74, 76, 78, 80, 84, 87, 89, 92, 95, 99, 102, 104 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ static const yytype_int8 yyrhs[] = { 33, 0, -1, 34, -1, 34, 35, -1, 35, -1, 5, 27, 27, 4, -1, 6, 27, 27, 4, -1, 7, 27, -1, 8, 27, -1, 9, 27, -1, 10, 27, -1, 11, 27, -1, 14, 27, -1, 15, 27, -1, 12, 27, -1, 13, 27, -1, 18, 27, -1, 20, 27, -1, 21, 27, -1, 29, 27, -1, 30, 27, -1, 22, 27, -1, 23, 27, -1, 24, 27, -1, 25, 27, -1, 36, -1, 39, -1, 31, -1, 16, 37, 4, -1, 37, 38, -1, 38, -1, 27, 27, -1, 17, 27, -1, 19, 40, 4, -1, 40, 41, -1, 41, -1, 28, 28, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { 0, 74, 74, 77, 78, 81, 88, 95, 101, 107, 113, 119, 125, 131, 137, 143, 149, 155, 161, 167, 173, 179, 190, 196, 202, 208, 213, 217, 227, 230, 232, 235, 242, 249, 252, 254, 257 }; #endif #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { "$end", "error", "$undefined", "BEGIN_T", "END_T", "DOC_TEMPLATE_T", "NODOC_TEMPLATE_T", "STYLE_TEMPLATE_T", "STYLE_SEPARATOR_T", "BOLD_T", "ITALICS_T", "UNDERLINE_T", "COLOR_T", "BG_COLOR_T", "FIXED_T", "NOTFIXED_T", "COLORMAP_T", "DEFAULT_T", "ONESTYLE_T", "TRANSLATIONS_T", "EXTENSION_T", "ANCHOR_T", "REFERENCE_T", "INLINE_REFERENCE_T", "POSTLINE_REFERENCE_T", "POSTDOC_REFERENCE_T", "KEY", "STRINGDEF", "REGEXDEF", "LINE_PREFIX_T", "LINENUM_T", "WRONG_INCLUDE_FILE", "$accept", "outputlang", "outputlangdefs", "outputlangdef", "colormap", "colormapentries", "colormapentry", "chartranslator", "translations", "translation", 0 }; #endif # ifdef YYPRINT /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to token YYLEX-NUM. */ static const yytype_uint16 yytoknum[] = { 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286 }; # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_uint8 yyr1[] = { 0, 32, 33, 34, 34, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 36, 37, 37, 38, 38, 39, 40, 40, 41 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ static const yytype_uint8 yyr2[] = { 0, 2, 1, 2, 1, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 3, 2, 1, 2, 2, 3, 2, 1, 2 }; /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state STATE-NUM when YYTABLE doesn't specify something else to do. Zero means the default is an error. */ static const yytype_uint8 yydefact[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27, 0, 2, 4, 25, 26, 0, 0, 7, 8, 9, 10, 11, 14, 15, 12, 13, 0, 0, 0, 30, 16, 0, 0, 35, 17, 18, 21, 22, 23, 24, 19, 20, 1, 3, 0, 0, 32, 31, 28, 29, 36, 33, 34, 5, 6 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int8 yydefgoto[] = { -1, 24, 25, 26, 27, 42, 43, 28, 46, 47 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ #define YYPACT_NINF -6 static const yytype_int8 yypact[] = { -5, -4, 0, 1, 2, 3, 4, 6, 10, 11, 12, 13, 5, 14, 7, 15, 16, 18, 19, 20, 21, 22, 23, -6, 51, -5, -6, -6, -6, 25, 26, -6, -6, -6, -6, -6, -6, -6, -6, -6, 27, 28, 17, -6, -6, 29, 8, -6, -6, -6, -6, -6, -6, -6, -6, -6, -6, -6, 52, 54, -6, -6, -6, -6, -6, -6, -6, -6, -6 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int8 yypgoto[] = { -6, -6, -6, 34, -6, -6, 24, -6, -6, 30 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule which number is the opposite. If zero, do what YYDEFACT says. If YYTABLE_NINF, syntax error. */ #define YYTABLE_NINF -1 static const yytype_uint8 yytable[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 65, 13, 14, 15, 16, 17, 18, 19, 20, 62, 40, 29, 21, 22, 23, 30, 31, 32, 33, 34, 41, 35, 40, 45, 45, 36, 37, 38, 39, 44, 48, 49, 41, 50, 51, 52, 53, 54, 55, 56, 58, 59, 60, 61, 67, 64, 68, 57, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66 }; static const yytype_int8 yycheck[] = { 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 4, 18, 19, 20, 21, 22, 23, 24, 25, 4, 17, 27, 29, 30, 31, 27, 27, 27, 27, 27, 27, 27, 17, 28, 28, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 0, 27, 27, 27, 27, 4, 28, 4, 25, -1, -1, -1, -1, -1, -1, 42, -1, -1, -1, -1, -1, -1, -1, -1, -1, 46 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { 0, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18, 19, 20, 21, 22, 23, 24, 25, 29, 30, 31, 33, 34, 35, 36, 39, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 17, 27, 37, 38, 27, 28, 40, 41, 27, 27, 27, 27, 27, 27, 27, 27, 0, 35, 27, 27, 27, 27, 4, 38, 28, 4, 41, 4, 4 }; #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) #define YYEMPTY (-2) #define YYEOF 0 #define YYACCEPT goto yyacceptlab #define YYABORT goto yyabortlab #define YYERROR goto yyerrorlab /* Like YYERROR except do call yyerror. This remains here temporarily to ease the transition to the new meaning of YYERROR, for GCC. Once GCC version 2 has supplanted version 1, this can go. */ #define YYFAIL goto yyerrlab #define YYRECOVERING() (!!yyerrstatus) #define YYBACKUP(Token, Value) \ do \ if (yychar == YYEMPTY && yylen == 1) \ { \ yychar = (Token); \ yylval = (Value); \ yytoken = YYTRANSLATE (yychar); \ YYPOPSTACK (1); \ goto yybackup; \ } \ else \ { \ yyerror (YY_("syntax error: cannot back up")); \ YYERROR; \ } \ while (YYID (0)) #define YYTERROR 1 #define YYERRCODE 256 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. If N is 0, then set CURRENT to the empty location which ends the previous symbol: RHS[0] (always defined). */ #define YYRHSLOC(Rhs, K) ((Rhs)[K]) #ifndef YYLLOC_DEFAULT # define YYLLOC_DEFAULT(Current, Rhs, N) \ do \ if (YYID (N)) \ { \ (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ } \ else \ { \ (Current).first_line = (Current).last_line = \ YYRHSLOC (Rhs, 0).last_line; \ (Current).first_column = (Current).last_column = \ YYRHSLOC (Rhs, 0).last_column; \ } \ while (YYID (0)) #endif /* YY_LOCATION_PRINT -- Print the location on the stream. This macro was not mandated originally: define only if we know we won't break user code: when these are the locations we know. */ #ifndef YY_LOCATION_PRINT # if YYLTYPE_IS_TRIVIAL # define YY_LOCATION_PRINT(File, Loc) \ fprintf (File, "%d.%d-%d.%d", \ (Loc).first_line, (Loc).first_column, \ (Loc).last_line, (Loc).last_column) # else # define YY_LOCATION_PRINT(File, Loc) ((void) 0) # endif #endif /* YYLEX -- calling `yylex' with the right arguments. */ #ifdef YYLEX_PARAM # define YYLEX yylex (YYLEX_PARAM) #else # define YYLEX yylex () #endif /* Enable debugging if requested. */ #if YYDEBUG # ifndef YYFPRINTF # include <stdio.h> /* INFRINGES ON USER NAME SPACE */ # define YYFPRINTF fprintf # endif # define YYDPRINTF(Args) \ do { \ if (yydebug) \ YYFPRINTF Args; \ } while (YYID (0)) # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ do { \ if (yydebug) \ { \ YYFPRINTF (stderr, "%s ", Title); \ yy_symbol_print (stderr, \ Type, Value); \ YYFPRINTF (stderr, "\n"); \ } \ } while (YYID (0)) /*--------------------------------. | Print this symbol on YYOUTPUT. | `--------------------------------*/ /*ARGSUSED*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) #else static void yy_symbol_value_print (yyoutput, yytype, yyvaluep) FILE *yyoutput; int yytype; YYSTYPE const * const yyvaluep; #endif { if (!yyvaluep) return; # ifdef YYPRINT if (yytype < YYNTOKENS) YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); # else YYUSE (yyoutput); # endif switch (yytype) { default: break; } } /*--------------------------------. | Print this symbol on YYOUTPUT. | `--------------------------------*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) #else static void yy_symbol_print (yyoutput, yytype, yyvaluep) FILE *yyoutput; int yytype; YYSTYPE const * const yyvaluep; #endif { if (yytype < YYNTOKENS) YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); else YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); yy_symbol_value_print (yyoutput, yytype, yyvaluep); YYFPRINTF (yyoutput, ")"); } /*------------------------------------------------------------------. | yy_stack_print -- Print the state stack from its BOTTOM up to its | | TOP (included). | `------------------------------------------------------------------*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) #else static void yy_stack_print (yybottom, yytop) yytype_int16 *yybottom; yytype_int16 *yytop; #endif { YYFPRINTF (stderr, "Stack now"); for (; yybottom <= yytop; yybottom++) { int yybot = *yybottom; YYFPRINTF (stderr, " %d", yybot); } YYFPRINTF (stderr, "\n"); } # define YY_STACK_PRINT(Bottom, Top) \ do { \ if (yydebug) \ yy_stack_print ((Bottom), (Top)); \ } while (YYID (0)) /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_reduce_print (YYSTYPE *yyvsp, int yyrule) #else static void yy_reduce_print (yyvsp, yyrule) YYSTYPE *yyvsp; int yyrule; #endif { int yynrhs = yyr2[yyrule]; int yyi; unsigned long int yylno = yyrline[yyrule]; YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", yyrule - 1, yylno); /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { YYFPRINTF (stderr, " $%d = ", yyi + 1); yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], &(yyvsp[(yyi + 1) - (yynrhs)]) ); YYFPRINTF (stderr, "\n"); } } # define YY_REDUCE_PRINT(Rule) \ do { \ if (yydebug) \ yy_reduce_print (yyvsp, Rule); \ } while (YYID (0)) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ # define YYDPRINTF(Args) # define YY_SYMBOL_PRINT(Title, Type, Value, Location) # define YY_STACK_PRINT(Bottom, Top) # define YY_REDUCE_PRINT(Rule) #endif /* !YYDEBUG */ /* YYINITDEPTH -- initial size of the parser's stacks. */ #ifndef YYINITDEPTH # define YYINITDEPTH 200 #endif /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only if the built-in stack extension method is used). Do not make this value too large; the results are undefined if YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) evaluated with infinite-precision integer arithmetic. */ #ifndef YYMAXDEPTH # define YYMAXDEPTH 10000 #endif #if YYERROR_VERBOSE # ifndef yystrlen # if defined __GLIBC__ && defined _STRING_H # define yystrlen strlen # else /* Return the length of YYSTR. */ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static YYSIZE_T yystrlen (const char *yystr) #else static YYSIZE_T yystrlen (yystr) const char *yystr; #endif { YYSIZE_T yylen; for (yylen = 0; yystr[yylen]; yylen++) continue; return yylen; } # endif # endif # ifndef yystpcpy # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE # define yystpcpy stpcpy # else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static char * yystpcpy (char *yydest, const char *yysrc) #else static char * yystpcpy (yydest, yysrc) char *yydest; const char *yysrc; #endif { char *yyd = yydest; const char *yys = yysrc; while ((*yyd++ = *yys++) != '\0') continue; return yyd - 1; } # endif # endif # ifndef yytnamerr /* Copy to YYRES the contents of YYSTR after stripping away unnecessary quotes and backslashes, so that it's suitable for yyerror. The heuristic is that double-quoting is unnecessary unless the string contains an apostrophe, a comma, or backslash (other than backslash-backslash). YYSTR is taken from yytname. If YYRES is null, do not copy; instead, return the length of what the result would have been. */ static YYSIZE_T yytnamerr (char *yyres, const char *yystr) { if (*yystr == '"') { YYSIZE_T yyn = 0; char const *yyp = yystr; for (;;) switch (*++yyp) { case '\'': case ',': goto do_not_strip_quotes; case '\\': if (*++yyp != '\\') goto do_not_strip_quotes; /* Fall through. */ default: if (yyres) yyres[yyn] = *yyp; yyn++; break; case '"': if (yyres) yyres[yyn] = '\0'; return yyn; } do_not_strip_quotes: ; } if (! yyres) return yystrlen (yystr); return yystpcpy (yyres, yystr) - yyres; } # endif /* Copy into YYRESULT an error message about the unexpected token YYCHAR while in state YYSTATE. Return the number of bytes copied, including the terminating null byte. If YYRESULT is null, do not copy anything; just return the number of bytes that would be copied. As a special case, return 0 if an ordinary "syntax error" message will do. Return YYSIZE_MAXIMUM if overflow occurs during size calculation. */ static YYSIZE_T yysyntax_error (char *yyresult, int yystate, int yychar) { int yyn = yypact[yystate]; if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) return 0; else { int yytype = YYTRANSLATE (yychar); YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); YYSIZE_T yysize = yysize0; YYSIZE_T yysize1; int yysize_overflow = 0; enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; int yyx; # if 0 /* This is so xgettext sees the translatable formats that are constructed on the fly. */ YY_("syntax error, unexpected %s"); YY_("syntax error, unexpected %s, expecting %s"); YY_("syntax error, unexpected %s, expecting %s or %s"); YY_("syntax error, unexpected %s, expecting %s or %s or %s"); YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); # endif char *yyfmt; char const *yyf; static char const yyunexpected[] = "syntax error, unexpected %s"; static char const yyexpecting[] = ", expecting %s"; static char const yyor[] = " or %s"; char yyformat[sizeof yyunexpected + sizeof yyexpecting - 1 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) * (sizeof yyor - 1))]; char const *yyprefix = yyexpecting; /* Start YYX at -YYN if negative to avoid negative indexes in YYCHECK. */ int yyxbegin = yyn < 0 ? -yyn : 0; /* Stay within bounds of both yycheck and yytname. */ int yychecklim = YYLAST - yyn + 1; int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; int yycount = 1; yyarg[0] = yytname[yytype]; yyfmt = yystpcpy (yyformat, yyunexpected); for (yyx = yyxbegin; yyx < yyxend; ++yyx) if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) { if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) { yycount = 1; yysize = yysize0; yyformat[sizeof yyunexpected - 1] = '\0'; break; } yyarg[yycount++] = yytname[yyx]; yysize1 = yysize + yytnamerr (0, yytname[yyx]); yysize_overflow |= (yysize1 < yysize); yysize = yysize1; yyfmt = yystpcpy (yyfmt, yyprefix); yyprefix = yyor; } yyf = YY_(yyformat); yysize1 = yysize + yystrlen (yyf); yysize_overflow |= (yysize1 < yysize); yysize = yysize1; if (yysize_overflow) return YYSIZE_MAXIMUM; if (yyresult) { /* Avoid sprintf, as that infringes on the user's name space. Don't have undefined behavior even if the translation produced a string with the wrong number of "%s"s. */ char *yyp = yyresult; int yyi = 0; while ((*yyp = *yyf) != '\0') { if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) { yyp += yytnamerr (yyp, yyarg[yyi++]); yyf += 2; } else { yyp++; yyf++; } } } return yysize; } } #endif /* YYERROR_VERBOSE */ /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ /*ARGSUSED*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) #else static void yydestruct (yymsg, yytype, yyvaluep) const char *yymsg; int yytype; YYSTYPE *yyvaluep; #endif { YYUSE (yyvaluep); if (!yymsg) yymsg = "Deleting"; YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); switch (yytype) { default: break; } } /* Prevent warnings from -Wmissing-prototypes. */ #ifdef YYPARSE_PARAM #if defined __STDC__ || defined __cplusplus int yyparse (void *YYPARSE_PARAM); #else int yyparse (); #endif #else /* ! YYPARSE_PARAM */ #if defined __STDC__ || defined __cplusplus int yyparse (void); #else int yyparse (); #endif #endif /* ! YYPARSE_PARAM */ /* The lookahead symbol. */ int yychar; /* The semantic value of the lookahead symbol. */ YYSTYPE yylval; /* Number of syntax errors so far. */ int yynerrs; /*-------------------------. | yyparse or yypush_parse. | `-------------------------*/ #ifdef YYPARSE_PARAM #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) int yyparse (void *YYPARSE_PARAM) #else int yyparse (YYPARSE_PARAM) void *YYPARSE_PARAM; #endif #else /* ! YYPARSE_PARAM */ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) int yyparse (void) #else int yyparse () #endif #endif { int yystate; /* Number of tokens to shift before error messages enabled. */ int yyerrstatus; /* The stacks and their tools: `yyss': related to states. `yyvs': related to semantic values. Refer to the stacks thru separate pointers, to allow yyoverflow to reallocate them elsewhere. */ /* The state stack. */ yytype_int16 yyssa[YYINITDEPTH]; yytype_int16 *yyss; yytype_int16 *yyssp; /* The semantic value stack. */ YYSTYPE yyvsa[YYINITDEPTH]; YYSTYPE *yyvs; YYSTYPE *yyvsp; YYSIZE_T yystacksize; int yyn; int yyresult; /* Lookahead token as an internal (translated) token number. */ int yytoken; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; #if YYERROR_VERBOSE /* Buffer for error messages, and its allocated size. */ char yymsgbuf[128]; char *yymsg = yymsgbuf; YYSIZE_T yymsg_alloc = sizeof yymsgbuf; #endif #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) /* The number of symbols on the RHS of the reduced rule. Keep to zero when no symbol should be popped. */ int yylen = 0; yytoken = 0; yyss = yyssa; yyvs = yyvsa; yystacksize = YYINITDEPTH; YYDPRINTF ((stderr, "Starting parse\n")); yystate = 0; yyerrstatus = 0; yynerrs = 0; yychar = YYEMPTY; /* Cause a token to be read. */ /* Initialize stack pointers. Waste one element of value and location stack so that they stay on the same level as the state stack. The wasted elements are never initialized. */ yyssp = yyss; yyvsp = yyvs; goto yysetstate; /*------------------------------------------------------------. | yynewstate -- Push a new state, which is found in yystate. | `------------------------------------------------------------*/ yynewstate: /* In all cases, when you get here, the value and location stacks have just been pushed. So pushing a state here evens the stacks. */ yyssp++; yysetstate: *yyssp = yystate; if (yyss + yystacksize - 1 <= yyssp) { /* Get the current used size of the three stacks, in elements. */ YYSIZE_T yysize = yyssp - yyss + 1; #ifdef yyoverflow { /* Give user a chance to reallocate the stack. Use copies of these so that the &'s don't force the real ones into memory. */ YYSTYPE *yyvs1 = yyvs; yytype_int16 *yyss1 = yyss; /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. This used to be a conditional around just the two extra args, but that might be undefined if yyoverflow is a macro. */ yyoverflow (YY_("memory exhausted"), &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), &yystacksize); yyss = yyss1; yyvs = yyvs1; } #else /* no yyoverflow */ # ifndef YYSTACK_RELOCATE goto yyexhaustedlab; # else /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) goto yyexhaustedlab; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) yystacksize = YYMAXDEPTH; { yytype_int16 *yyss1 = yyss; union yyalloc *yyptr = (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) goto yyexhaustedlab; YYSTACK_RELOCATE (yyss_alloc, yyss); YYSTACK_RELOCATE (yyvs_alloc, yyvs); # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); } # endif #endif /* no yyoverflow */ yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; YYDPRINTF ((stderr, "Stack size increased to %lu\n", (unsigned long int) yystacksize)); if (yyss + yystacksize - 1 <= yyssp) YYABORT; } YYDPRINTF ((stderr, "Entering state %d\n", yystate)); if (yystate == YYFINAL) YYACCEPT; goto yybackup; /*-----------. | yybackup. | `-----------*/ yybackup: /* Do appropriate processing given the current state. Read a lookahead token if we need one and don't already have one. */ /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; if (yyn == YYPACT_NINF) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); yychar = YYLEX; } if (yychar <= YYEOF) { yychar = yytoken = YYEOF; YYDPRINTF ((stderr, "Now at end of input.\n")); } else { yytoken = YYTRANSLATE (yychar); YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); } /* If the proper action on seeing token YYTOKEN is to reduce or to detect an error, take that action. */ yyn += yytoken; if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) goto yydefault; yyn = yytable[yyn]; if (yyn <= 0) { if (yyn == 0 || yyn == YYTABLE_NINF) goto yyerrlab; yyn = -yyn; goto yyreduce; } /* Count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; /* Shift the lookahead token. */ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); /* Discard the shifted token. */ yychar = YYEMPTY; yystate = yyn; *++yyvsp = yylval; goto yynewstate; /*-----------------------------------------------------------. | yydefault -- do the default action for the current state. | `-----------------------------------------------------------*/ yydefault: yyn = yydefact[yystate]; if (yyn == 0) goto yyerrlab; goto yyreduce; /*-----------------------------. | yyreduce -- Do a reduction. | `-----------------------------*/ yyreduce: /* yyn is the number of a rule to reduce with. */ yylen = yyr2[yyn]; /* If YYLEN is nonzero, implement the default value of the action: `$$ = $1'. Otherwise, the following line sets YYVAL to garbage. This behavior is undocumented and Bison users should not rely upon it. Assigning to YYVAL unconditionally makes the parser a bit smaller, and it avoids a GCC warning that YYVAL may be used uninitialized. */ yyval = yyvsp[1-yylen]; YY_REDUCE_PRINT (yyn); switch (yyn) { case 5: /* Line 1455 of yacc.c */ #line 82 "../../../lib/srchilite/outlangdefparser.yy" { textstyles->docTemplate = DocTemplate(*(yyvsp[(2) - (4)].string), *(yyvsp[(3) - (4)].string)); delete (yyvsp[(2) - (4)].string); delete (yyvsp[(3) - (4)].string); } break; case 6: /* Line 1455 of yacc.c */ #line 89 "../../../lib/srchilite/outlangdefparser.yy" { textstyles->noDocTemplate = DocTemplate(*(yyvsp[(2) - (4)].string), *(yyvsp[(3) - (4)].string)); delete (yyvsp[(2) - (4)].string); delete (yyvsp[(3) - (4)].string); } break; case 7: /* Line 1455 of yacc.c */ #line 96 "../../../lib/srchilite/outlangdefparser.yy" { textstyles->starting_template = *(yyvsp[(2) - (2)].string); delete (yyvsp[(2) - (2)].string); } break; case 8: /* Line 1455 of yacc.c */ #line 102 "../../../lib/srchilite/outlangdefparser.yy" { textstyles->style_separator = *(yyvsp[(2) - (2)].string); delete (yyvsp[(2) - (2)].string); } break; case 9: /* Line 1455 of yacc.c */ #line 108 "../../../lib/srchilite/outlangdefparser.yy" { textstyles->bold = *(yyvsp[(2) - (2)].string); delete (yyvsp[(2) - (2)].string); } break; case 10: /* Line 1455 of yacc.c */ #line 114 "../../../lib/srchilite/outlangdefparser.yy" { textstyles->italics = *(yyvsp[(2) - (2)].string); delete (yyvsp[(2) - (2)].string); } break; case 11: /* Line 1455 of yacc.c */ #line 120 "../../../lib/srchilite/outlangdefparser.yy" { textstyles->underline = *(yyvsp[(2) - (2)].string); delete (yyvsp[(2) - (2)].string); } break; case 12: /* Line 1455 of yacc.c */ #line 126 "../../../lib/srchilite/outlangdefparser.yy" { textstyles->fixed = *(yyvsp[(2) - (2)].string); delete (yyvsp[(2) - (2)].string); } break; case 13: /* Line 1455 of yacc.c */ #line 132 "../../../lib/srchilite/outlangdefparser.yy" { textstyles->notfixed = *(yyvsp[(2) - (2)].string); delete (yyvsp[(2) - (2)].string); } break; case 14: /* Line 1455 of yacc.c */ #line 138 "../../../lib/srchilite/outlangdefparser.yy" { textstyles->color = *(yyvsp[(2) - (2)].string); delete (yyvsp[(2) - (2)].string); } break; case 15: /* Line 1455 of yacc.c */ #line 144 "../../../lib/srchilite/outlangdefparser.yy" { textstyles->bg_color = *(yyvsp[(2) - (2)].string); delete (yyvsp[(2) - (2)].string); } break; case 16: /* Line 1455 of yacc.c */ #line 150 "../../../lib/srchilite/outlangdefparser.yy" { textstyles->onestyle = *(yyvsp[(2) - (2)].string); delete (yyvsp[(2) - (2)].string); } break; case 17: /* Line 1455 of yacc.c */ #line 156 "../../../lib/srchilite/outlangdefparser.yy" { textstyles->file_extension = *(yyvsp[(2) - (2)].string); delete (yyvsp[(2) - (2)].string); } break; case 18: /* Line 1455 of yacc.c */ #line 162 "../../../lib/srchilite/outlangdefparser.yy" { textstyles->refstyle.anchor = TextStyle(*(yyvsp[(2) - (2)].string), anchor_vars); delete (yyvsp[(2) - (2)].string); } break; case 19: /* Line 1455 of yacc.c */ #line 168 "../../../lib/srchilite/outlangdefparser.yy" { textstyles->line_prefix = *(yyvsp[(2) - (2)].string); delete (yyvsp[(2) - (2)].string); } break; case 20: /* Line 1455 of yacc.c */ #line 174 "../../../lib/srchilite/outlangdefparser.yy" { textstyles->linenum = *(yyvsp[(2) - (2)].string); delete (yyvsp[(2) - (2)].string); } break; case 21: /* Line 1455 of yacc.c */ #line 180 "../../../lib/srchilite/outlangdefparser.yy" { if (textstyles->refstyle.inline_reference.empty()) textstyles->refstyle.inline_reference = TextStyle(*(yyvsp[(2) - (2)].string), reference_vars); if (textstyles->refstyle.postline_reference.empty()) textstyles->refstyle.postline_reference = TextStyle(*(yyvsp[(2) - (2)].string), reference_vars); if (textstyles->refstyle.postdoc_reference.empty()) textstyles->refstyle.postdoc_reference = TextStyle(*(yyvsp[(2) - (2)].string), reference_vars); delete (yyvsp[(2) - (2)].string); } break; case 22: /* Line 1455 of yacc.c */ #line 191 "../../../lib/srchilite/outlangdefparser.yy" { textstyles->refstyle.inline_reference = TextStyle(*(yyvsp[(2) - (2)].string), reference_vars); delete (yyvsp[(2) - (2)].string); } break; case 23: /* Line 1455 of yacc.c */ #line 197 "../../../lib/srchilite/outlangdefparser.yy" { textstyles->refstyle.postline_reference = TextStyle(*(yyvsp[(2) - (2)].string), reference_vars); delete (yyvsp[(2) - (2)].string); } break; case 24: /* Line 1455 of yacc.c */ #line 203 "../../../lib/srchilite/outlangdefparser.yy" { textstyles->refstyle.postdoc_reference = TextStyle(*(yyvsp[(2) - (2)].string), reference_vars); delete (yyvsp[(2) - (2)].string); } break; case 25: /* Line 1455 of yacc.c */ #line 209 "../../../lib/srchilite/outlangdefparser.yy" { textstyles->colorMap = colorMap; } break; case 26: /* Line 1455 of yacc.c */ #line 214 "../../../lib/srchilite/outlangdefparser.yy" { textstyles->charTranslator = charTranslator; } break; case 27: /* Line 1455 of yacc.c */ #line 217 "../../../lib/srchilite/outlangdefparser.yy" { // this token is used by the scanner to signal an error // in opening an include file includedFileNotFound = true; yyerror("cannot open include file " + *(yyvsp[(1) - (1)].string)); delete (yyvsp[(1) - (1)].string); YYERROR; } break; case 31: /* Line 1455 of yacc.c */ #line 236 "../../../lib/srchilite/outlangdefparser.yy" { (*colorMap)[*(yyvsp[(1) - (2)].string)] = *(yyvsp[(2) - (2)].string); delete (yyvsp[(1) - (2)].string); delete (yyvsp[(2) - (2)].string); } break; case 32: /* Line 1455 of yacc.c */ #line 243 "../../../lib/srchilite/outlangdefparser.yy" { colorMap->setDefault(*(yyvsp[(2) - (2)].string)); delete (yyvsp[(2) - (2)].string); } break; case 36: /* Line 1455 of yacc.c */ #line 258 "../../../lib/srchilite/outlangdefparser.yy" { charTranslator->set_translation(*(yyvsp[(1) - (2)].string), *(yyvsp[(2) - (2)].string)); delete (yyvsp[(1) - (2)].string); delete (yyvsp[(2) - (2)].string); } break; /* Line 1455 of yacc.c */ #line 1774 "../../../lib/srchilite/outlangdefparser.cc" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); YYPOPSTACK (yylen); yylen = 0; YY_STACK_PRINT (yyss, yyssp); *++yyvsp = yyval; /* Now `shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ yyn = yyr1[yyn]; yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) yystate = yytable[yystate]; else yystate = yydefgoto[yyn - YYNTOKENS]; goto yynewstate; /*------------------------------------. | yyerrlab -- here on detecting error | `------------------------------------*/ yyerrlab: /* If not already recovering from an error, report this error. */ if (!yyerrstatus) { ++yynerrs; #if ! YYERROR_VERBOSE yyerror (YY_("syntax error")); #else { YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) { YYSIZE_T yyalloc = 2 * yysize; if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) yyalloc = YYSTACK_ALLOC_MAXIMUM; if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); yymsg = (char *) YYSTACK_ALLOC (yyalloc); if (yymsg) yymsg_alloc = yyalloc; else { yymsg = yymsgbuf; yymsg_alloc = sizeof yymsgbuf; } } if (0 < yysize && yysize <= yymsg_alloc) { (void) yysyntax_error (yymsg, yystate, yychar); yyerror (yymsg); } else { yyerror (YY_("syntax error")); if (yysize != 0) goto yyexhaustedlab; } } #endif } if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an error, discard it. */ if (yychar <= YYEOF) { /* Return failure if at end of input. */ if (yychar == YYEOF) YYABORT; } else { yydestruct ("Error: discarding", yytoken, &yylval); yychar = YYEMPTY; } } /* Else will try to reuse lookahead token after shifting the error token. */ goto yyerrlab1; /*---------------------------------------------------. | yyerrorlab -- error raised explicitly by YYERROR. | `---------------------------------------------------*/ yyerrorlab: /* Pacify compilers like GCC when the user code never invokes YYERROR and the label yyerrorlab therefore never appears in user code. */ if (/*CONSTCOND*/ 0) goto yyerrorlab; /* Do not reclaim the symbols of the rule which action triggered this YYERROR. */ YYPOPSTACK (yylen); yylen = 0; YY_STACK_PRINT (yyss, yyssp); yystate = *yyssp; goto yyerrlab1; /*-------------------------------------------------------------. | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ yyerrlab1: yyerrstatus = 3; /* Each real token shifted decrements this. */ for (;;) { yyn = yypact[yystate]; if (yyn != YYPACT_NINF) { yyn += YYTERROR; if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) { yyn = yytable[yyn]; if (0 < yyn) break; } } /* Pop the current state because it cannot handle the error token. */ if (yyssp == yyss) YYABORT; yydestruct ("Error: popping", yystos[yystate], yyvsp); YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); } *++yyvsp = yylval; /* Shift the error token. */ YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); yystate = yyn; goto yynewstate; /*-------------------------------------. | yyacceptlab -- YYACCEPT comes here. | `-------------------------------------*/ yyacceptlab: yyresult = 0; goto yyreturn; /*-----------------------------------. | yyabortlab -- YYABORT comes here. | `-----------------------------------*/ yyabortlab: yyresult = 1; goto yyreturn; #if !defined(yyoverflow) || YYERROR_VERBOSE /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ yyexhaustedlab: yyerror (YY_("memory exhausted")); yyresult = 2; /* Fall through. */ #endif yyreturn: if (yychar != YYEMPTY) yydestruct ("Cleanup: discarding lookahead", yytoken, &yylval); /* Do not reclaim the symbols of the rule which action triggered this YYABORT or YYACCEPT. */ YYPOPSTACK (yylen); YY_STACK_PRINT (yyss, yyssp); while (yyssp != yyss) { yydestruct ("Cleanup: popping", yystos[*yyssp], yyvsp); YYPOPSTACK (1); } #ifndef yyoverflow if (yyss != yyssa) YYSTACK_FREE (yyss); #endif #if YYERROR_VERBOSE if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); #endif /* Make sure YYID is used. */ return YYID (yyresult); } /* Line 1675 of yacc.c */ #line 264 "../../../lib/srchilite/outlangdefparser.yy" extern int outlangdef_lex_destroy (void); void yyerror( const char *s ) { errorBuffer = s; } void yyerror( const string &s ) { yyerror(s.c_str()); } namespace srchilite { TextStylesPtr parse_outlang_def() { return parse_outlang_def("", "stdin"); } TextStylesPtr parse_outlang_def(const char *path, const char *name) { includedFileNotFound = false; outlang_parsestruct = ParseStructPtr(new ParseStruct(path, name)); textstyles = TextStylesPtr(new TextStyles); colorMap = ColorMapPtr(new ColorMap); charTranslator = CharTranslatorPtr(new CharTranslator); errorBuffer = ""; int result = 1; bool fileNotFound = false; try { if (strcmp(name, "stdin") != 0) open_outlang_file_to_scan(path, name); } catch (IOException &e) { errorBuffer = e.message; fileNotFound = true; } if (!fileNotFound) result = outlangdef_parse(); if (result != 0 && ! fileNotFound) { // make sure the input file is closed close_outlangdefinputfile(); // close it before clearing the scanner } // release scanner memory clear_outlangdefscanner (); if (result != 0 || errorBuffer.size()) { if (fileNotFound || includedFileNotFound) { throw ParserException(errorBuffer); } else { ParserException e(errorBuffer, outlang_parsestruct.get()); throw e; } } return textstyles; } } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/docgenerator.h�������������������������������������������������0000644�0001750�0001750�00000006566�11672675563�017327� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* ** Copyright (C) 1999-2007 Lorenzo Bettini <http://www.lorenzobettini.it> ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 3 of the License, or ** (at your option) any later version. ** ** This program is distributed in the hope that it will be useful, ** but WITHOUT ANY WARRANTY; without even the implied warranty of ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ** GNU General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with this program; if not, write to the Free Software ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ** */ // docgenerator.h : Document generator class // for preable, header, footer, etc. #ifndef DOCGENERATOR_H #define DOCGENERATOR_H #include <string> #include <iostream> #include "doctemplate.h" using std::string; namespace srchilite { /** * Given a DocTemplate it generates the start of the document and the end, using * variables such as title, file_name, header, etc. */ class DocGenerator { protected: string title; bool gen_source_highlight_version; string input_file_name; string doc_header; string doc_footer; string css_url; string doc_background; bool entire_doc; string input_lang; DocTemplate docTemplate; public: DocGenerator(const string &s, const string &i, const string &h, const string &f, const string &c, const string &back, bool entire, const string &inputlang, const string &start_tmpl, const string &end_tmpl) : title(s), gen_source_highlight_version(true), input_file_name(i), doc_header(h), doc_footer(f), css_url(c), doc_background(back), entire_doc(entire), input_lang(inputlang), docTemplate(DocTemplate(start_tmpl, end_tmpl)) { } DocGenerator(const string &start_tmpl, const string &end_tmpl) : gen_source_highlight_version(true), docTemplate(DocTemplate(start_tmpl, end_tmpl)) { } DocGenerator() { } ~DocGenerator() { } /** * Generates the start of the document into the passed ostream * * @param sout the stream for generating the output */ void generate_start_doc(std::ostream *sout); /** * Generates the end of the document into the passed ostream * * @param sout the stream for generating the output */ void generate_end_doc(std::ostream *sout); /** * Sets the version of the generator (i.e., of source-highlight) */ void set_gen_version(bool b) { gen_source_highlight_version = b; } void setInputFileName(const std::string &filename) { input_file_name = filename; } void setTitle(const std::string &_title) { title = _title; } void setInputLang(const std::string &_input_lang) { input_lang = _input_lang; } void setBackgroundColor(const std::string &bg) { doc_background = bg; } void setCss(const std::string &css) { css_url = css; } void setHeader(const std::string &_header) { doc_header = _header; } void setFooter(const std::string &_footer) { doc_footer = _footer; } }; } #endif // DOCGENERATOR_H ������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/stylecssparser.cc����������������������������������������������0000644�0001750�0001750�00000145316�11675044736�020067� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������ /* A Bison parser, made by GNU Bison 2.4.1. */ /* Skeleton implementation for Bison's Yacc-like parsers in C Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work under terms of your choice, so long as that work isn't itself a parser generator using the skeleton or a modified version thereof as a parser skeleton. Alternatively, if you modify or redistribute the parser skeleton itself, you may (at your option) remove this special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ /* C LALR(1) parser skeleton written by Richard Stallman, by simplifying the original so-called "semantic" parser. */ /* All symbols defined below should begin with yy or YY, to avoid infringing on user name space. This should be done even for local variables, as they might otherwise be expanded by user macros. There are some unavoidable exceptions within include files to define necessary library symbols; they are noted "INFRINGES ON USER NAME SPACE" below. */ /* Identify Bison output. */ #define YYBISON 1 /* Bison version. */ #define YYBISON_VERSION "2.4.1" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" /* Pure parsers. */ #define YYPURE 0 /* Push parsers. */ #define YYPUSH 0 /* Pull parsers. */ #define YYPULL 1 /* Using locations. */ #define YYLSP_NEEDED 0 /* Substitute the variable and function names. */ #define yyparse stylecsssc_parse #define yylex stylecsssc_lex #define yyerror stylecsssc_error #define yylval stylecsssc_lval #define yychar stylecsssc_char #define yydebug stylecsssc_debug #define yynerrs stylecsssc_nerrs /* Copy the first part of user declarations. */ /* Line 189 of yacc.c */ #line 1 "../../../lib/srchilite/stylecssparser.yy" /* * Copyright (C) 1999-2007 Lorenzo Bettini <http://www.lorenzobettini.it> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ #include <stdio.h> #include <stdlib.h> #include <iostream> #include <string> #include "formatterfactory.h" #include "colors.h" #include "keys.h" #include "parsestyles.h" #include "fileutil.h" #include "stylekey.h" #include "utils.h" #include "parserexception.h" using std::cerr; using namespace srchilite; extern int line; static int yyparse() ; static void yyerror( const char *s ) ; // line is defined in styleparser // to generate the formatter for each language element static FormatterFactory *formatterFactory; static void updateBgColor(const std::string &c); // for the background color of the entire output static string bodyBgColor; extern int stylecsssc_lex() ; extern FILE *stylecsssc_in ; extern int stylecsssc_lex_destroy (void); /// the global pointer to style constant for a specific element static StyleConstantsPtr currentStyleConstants; /// the global pointer to the current color static string currentColor; /// the global pointer to the current bg color static string currentBGColor; /// where we store possible errors static string errorBuffer; /* Line 189 of yacc.c */ #line 151 "../../../lib/srchilite/stylecssparser.cc" /* Enabling traces. */ #ifndef YYDEBUG # define YYDEBUG 0 #endif /* Enabling verbose error messages. */ #ifdef YYERROR_VERBOSE # undef YYERROR_VERBOSE # define YYERROR_VERBOSE 1 #else # define YYERROR_VERBOSE 0 #endif /* Enabling the token table. */ #ifndef YYTOKEN_TABLE # define YYTOKEN_TABLE 0 #endif /* Tokens. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE /* Put the tokens into the symbol table, so that GDB and other debuggers know about them. */ enum yytokentype { BOLD = 258, ITALICS = 259, UNDERLINE = 260, FIXED = 261, NOTFIXED = 262, NOREF = 263, KEY = 264, COLOR = 265, BG_COLOR = 266, STRINGDEF = 267, BG_STRINGDEF = 268 }; #endif /* Tokens. */ #define BOLD 258 #define ITALICS 259 #define UNDERLINE 260 #define FIXED 261 #define NOTFIXED 262 #define NOREF 263 #define KEY 264 #define COLOR 265 #define BG_COLOR 266 #define STRINGDEF 267 #define BG_STRINGDEF 268 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE { /* Line 214 of yacc.c */ #line 70 "../../../lib/srchilite/stylecssparser.yy" int tok ; /* command */ const std::string * string ; /* string : id, ... */ srchilite::StyleConstant flag ; srchilite::StyleConstants *styleconstants; srchilite::KeyList *keylist; /* Line 214 of yacc.c */ #line 223 "../../../lib/srchilite/stylecssparser.cc" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 #endif /* Copy the second part of user declarations. */ /* Line 264 of yacc.c */ #line 235 "../../../lib/srchilite/stylecssparser.cc" #ifdef short # undef short #endif #ifdef YYTYPE_UINT8 typedef YYTYPE_UINT8 yytype_uint8; #else typedef unsigned char yytype_uint8; #endif #ifdef YYTYPE_INT8 typedef YYTYPE_INT8 yytype_int8; #elif (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) typedef signed char yytype_int8; #else typedef short int yytype_int8; #endif #ifdef YYTYPE_UINT16 typedef YYTYPE_UINT16 yytype_uint16; #else typedef unsigned short int yytype_uint16; #endif #ifdef YYTYPE_INT16 typedef YYTYPE_INT16 yytype_int16; #else typedef short int yytype_int16; #endif #ifndef YYSIZE_T # ifdef __SIZE_TYPE__ # define YYSIZE_T __SIZE_TYPE__ # elif defined size_t # define YYSIZE_T size_t # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # else # define YYSIZE_T unsigned int # endif #endif #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) #ifndef YY_ # if YYENABLE_NLS # if ENABLE_NLS # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ # define YY_(msgid) dgettext ("bison-runtime", msgid) # endif # endif # ifndef YY_ # define YY_(msgid) msgid # endif #endif /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ # define YYUSE(e) ((void) (e)) #else # define YYUSE(e) /* empty */ #endif /* Identity function, used to suppress warnings about constant conditions. */ #ifndef lint # define YYID(n) (n) #else #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static int YYID (int yyi) #else static int YYID (yyi) int yyi; #endif { return yyi; } #endif #if ! defined yyoverflow || YYERROR_VERBOSE /* The parser invokes alloca or malloc; define the necessary symbols. */ # ifdef YYSTACK_USE_ALLOCA # if YYSTACK_USE_ALLOCA # ifdef __GNUC__ # define YYSTACK_ALLOC __builtin_alloca # elif defined __BUILTIN_VA_ARG_INCR # include <alloca.h> /* INFRINGES ON USER NAME SPACE */ # elif defined _AIX # define YYSTACK_ALLOC __alloca # elif defined _MSC_VER # include <malloc.h> /* INFRINGES ON USER NAME SPACE */ # define alloca _alloca # else # define YYSTACK_ALLOC alloca # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ # ifndef _STDLIB_H # define _STDLIB_H 1 # endif # endif # endif # endif # endif # ifdef YYSTACK_ALLOC /* Pacify GCC's `empty if-body' warning. */ # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) # ifndef YYSTACK_ALLOC_MAXIMUM /* The OS might guarantee only one guard page at the bottom of the stack, and a page size can be as small as 4096 bytes. So we cannot safely invoke alloca (N) if N exceeds 4096. Use a slightly smaller number to allow for a few compiler-allocated temporary stack slots. */ # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ # endif # else # define YYSTACK_ALLOC YYMALLOC # define YYSTACK_FREE YYFREE # ifndef YYSTACK_ALLOC_MAXIMUM # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM # endif # if (defined __cplusplus && ! defined _STDLIB_H \ && ! ((defined YYMALLOC || defined malloc) \ && (defined YYFREE || defined free))) # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ # ifndef _STDLIB_H # define _STDLIB_H 1 # endif # endif # ifndef YYMALLOC # define YYMALLOC malloc # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ # endif # endif # ifndef YYFREE # define YYFREE free # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif # endif # endif #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ #if (! defined yyoverflow \ && (! defined __cplusplus \ || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc { yytype_int16 yyss_alloc; YYSTYPE yyvs_alloc; }; /* The size of the maximum gap between one aligned stack and the next. */ # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) /* The size of an array large to enough to hold all stacks, each with N elements. */ # define YYSTACK_BYTES(N) \ ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + YYSTACK_GAP_MAXIMUM) /* Copy COUNT objects from FROM to TO. The source and destination do not overlap. */ # ifndef YYCOPY # if defined __GNUC__ && 1 < __GNUC__ # define YYCOPY(To, From, Count) \ __builtin_memcpy (To, From, (Count) * sizeof (*(From))) # else # define YYCOPY(To, From, Count) \ do \ { \ YYSIZE_T yyi; \ for (yyi = 0; yyi < (Count); yyi++) \ (To)[yyi] = (From)[yyi]; \ } \ while (YYID (0)) # endif # endif /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ do \ { \ YYSIZE_T yynewbytes; \ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ Stack = &yyptr->Stack_alloc; \ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ while (YYID (0)) #endif /* YYFINAL -- State number of the termination state. */ #define YYFINAL 7 /* YYLAST -- Last index in YYTABLE. */ #define YYLAST 15 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 16 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 12 /* YYNRULES -- Number of rules. */ #define YYNRULES 25 /* YYNRULES -- Number of states. */ #define YYNSTATES 28 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 #define YYMAXUTOK 268 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ static const yytype_uint8 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 15, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 14, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; #if YYDEBUG /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in YYRHS. */ static const yytype_uint8 yyprhs[] = { 0, 0, 3, 4, 6, 9, 11, 13, 14, 19, 23, 25, 26, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ static const yytype_int8 yyrhs[] = { 17, 0, -1, -1, 18, -1, 18, 19, -1, 19, -1, 20, -1, -1, 22, 21, 23, 14, -1, 22, 15, 9, -1, 9, -1, -1, 23, 24, -1, 25, -1, 26, -1, 27, -1, 10, -1, 12, -1, 11, -1, 13, -1, 3, -1, 4, -1, 5, -1, 6, -1, 7, -1, 8, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint8 yyrline[] = { 0, 90, 90, 91, 94, 95, 98, 102, 101, 143, 149, 157, 158, 161, 162, 163, 166, 171, 178, 183, 190, 191, 192, 193, 194, 195 }; #endif #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { "$end", "error", "$undefined", "BOLD", "ITALICS", "UNDERLINE", "FIXED", "NOTFIXED", "NOREF", "KEY", "COLOR", "BG_COLOR", "STRINGDEF", "BG_STRINGDEF", "';'", "','", "$accept", "stylefile", "statements", "statement", "option", "$@1", "keylist", "optionspecs", "optionspec", "color", "bgcolor", "styleconstant", 0 }; #endif # ifdef YYPRINT /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to token YYLEX-NUM. */ static const yytype_uint16 yytoknum[] = { 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 59, 44 }; # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_uint8 yyr1[] = { 0, 16, 17, 17, 18, 18, 19, 21, 20, 22, 22, 23, 23, 24, 24, 24, 25, 25, 26, 26, 27, 27, 27, 27, 27, 27 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ static const yytype_uint8 yyr2[] = { 0, 2, 0, 1, 2, 1, 1, 0, 4, 3, 1, 0, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state STATE-NUM when YYTABLE doesn't specify something else to do. Zero means the default is an error. */ static const yytype_uint8 yydefact[] = { 2, 10, 0, 3, 5, 6, 7, 1, 4, 0, 11, 9, 0, 20, 21, 22, 23, 24, 25, 16, 18, 17, 19, 8, 12, 13, 14, 15 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int8 yydefgoto[] = { -1, 2, 3, 4, 5, 10, 6, 12, 24, 25, 26, 27 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ #define YYPACT_NINF -4 static const yytype_int8 yypact[] = { 3, -4, 6, 3, -4, -4, -2, -4, -4, 5, -4, -4, -3, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int8 yypgoto[] = { -4, -4, -4, 12, -4, -4, -4, -4, -4, -4, -4, -4 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule which number is the opposite. If zero, do what YYDEFACT says. If YYTABLE_NINF, syntax error. */ #define YYTABLE_NINF -1 static const yytype_uint8 yytable[] = { 13, 14, 15, 16, 17, 18, 7, 19, 20, 21, 22, 23, 1, 9, 11, 8 }; static const yytype_uint8 yycheck[] = { 3, 4, 5, 6, 7, 8, 0, 10, 11, 12, 13, 14, 9, 15, 9, 3 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { 0, 9, 17, 18, 19, 20, 22, 0, 19, 15, 21, 9, 23, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 24, 25, 26, 27 }; #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) #define YYEMPTY (-2) #define YYEOF 0 #define YYACCEPT goto yyacceptlab #define YYABORT goto yyabortlab #define YYERROR goto yyerrorlab /* Like YYERROR except do call yyerror. This remains here temporarily to ease the transition to the new meaning of YYERROR, for GCC. Once GCC version 2 has supplanted version 1, this can go. */ #define YYFAIL goto yyerrlab #define YYRECOVERING() (!!yyerrstatus) #define YYBACKUP(Token, Value) \ do \ if (yychar == YYEMPTY && yylen == 1) \ { \ yychar = (Token); \ yylval = (Value); \ yytoken = YYTRANSLATE (yychar); \ YYPOPSTACK (1); \ goto yybackup; \ } \ else \ { \ yyerror (YY_("syntax error: cannot back up")); \ YYERROR; \ } \ while (YYID (0)) #define YYTERROR 1 #define YYERRCODE 256 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. If N is 0, then set CURRENT to the empty location which ends the previous symbol: RHS[0] (always defined). */ #define YYRHSLOC(Rhs, K) ((Rhs)[K]) #ifndef YYLLOC_DEFAULT # define YYLLOC_DEFAULT(Current, Rhs, N) \ do \ if (YYID (N)) \ { \ (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ } \ else \ { \ (Current).first_line = (Current).last_line = \ YYRHSLOC (Rhs, 0).last_line; \ (Current).first_column = (Current).last_column = \ YYRHSLOC (Rhs, 0).last_column; \ } \ while (YYID (0)) #endif /* YY_LOCATION_PRINT -- Print the location on the stream. This macro was not mandated originally: define only if we know we won't break user code: when these are the locations we know. */ #ifndef YY_LOCATION_PRINT # if YYLTYPE_IS_TRIVIAL # define YY_LOCATION_PRINT(File, Loc) \ fprintf (File, "%d.%d-%d.%d", \ (Loc).first_line, (Loc).first_column, \ (Loc).last_line, (Loc).last_column) # else # define YY_LOCATION_PRINT(File, Loc) ((void) 0) # endif #endif /* YYLEX -- calling `yylex' with the right arguments. */ #ifdef YYLEX_PARAM # define YYLEX yylex (YYLEX_PARAM) #else # define YYLEX yylex () #endif /* Enable debugging if requested. */ #if YYDEBUG # ifndef YYFPRINTF # include <stdio.h> /* INFRINGES ON USER NAME SPACE */ # define YYFPRINTF fprintf # endif # define YYDPRINTF(Args) \ do { \ if (yydebug) \ YYFPRINTF Args; \ } while (YYID (0)) # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ do { \ if (yydebug) \ { \ YYFPRINTF (stderr, "%s ", Title); \ yy_symbol_print (stderr, \ Type, Value); \ YYFPRINTF (stderr, "\n"); \ } \ } while (YYID (0)) /*--------------------------------. | Print this symbol on YYOUTPUT. | `--------------------------------*/ /*ARGSUSED*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) #else static void yy_symbol_value_print (yyoutput, yytype, yyvaluep) FILE *yyoutput; int yytype; YYSTYPE const * const yyvaluep; #endif { if (!yyvaluep) return; # ifdef YYPRINT if (yytype < YYNTOKENS) YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); # else YYUSE (yyoutput); # endif switch (yytype) { default: break; } } /*--------------------------------. | Print this symbol on YYOUTPUT. | `--------------------------------*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) #else static void yy_symbol_print (yyoutput, yytype, yyvaluep) FILE *yyoutput; int yytype; YYSTYPE const * const yyvaluep; #endif { if (yytype < YYNTOKENS) YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); else YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); yy_symbol_value_print (yyoutput, yytype, yyvaluep); YYFPRINTF (yyoutput, ")"); } /*------------------------------------------------------------------. | yy_stack_print -- Print the state stack from its BOTTOM up to its | | TOP (included). | `------------------------------------------------------------------*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) #else static void yy_stack_print (yybottom, yytop) yytype_int16 *yybottom; yytype_int16 *yytop; #endif { YYFPRINTF (stderr, "Stack now"); for (; yybottom <= yytop; yybottom++) { int yybot = *yybottom; YYFPRINTF (stderr, " %d", yybot); } YYFPRINTF (stderr, "\n"); } # define YY_STACK_PRINT(Bottom, Top) \ do { \ if (yydebug) \ yy_stack_print ((Bottom), (Top)); \ } while (YYID (0)) /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_reduce_print (YYSTYPE *yyvsp, int yyrule) #else static void yy_reduce_print (yyvsp, yyrule) YYSTYPE *yyvsp; int yyrule; #endif { int yynrhs = yyr2[yyrule]; int yyi; unsigned long int yylno = yyrline[yyrule]; YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", yyrule - 1, yylno); /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { YYFPRINTF (stderr, " $%d = ", yyi + 1); yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], &(yyvsp[(yyi + 1) - (yynrhs)]) ); YYFPRINTF (stderr, "\n"); } } # define YY_REDUCE_PRINT(Rule) \ do { \ if (yydebug) \ yy_reduce_print (yyvsp, Rule); \ } while (YYID (0)) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ # define YYDPRINTF(Args) # define YY_SYMBOL_PRINT(Title, Type, Value, Location) # define YY_STACK_PRINT(Bottom, Top) # define YY_REDUCE_PRINT(Rule) #endif /* !YYDEBUG */ /* YYINITDEPTH -- initial size of the parser's stacks. */ #ifndef YYINITDEPTH # define YYINITDEPTH 200 #endif /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only if the built-in stack extension method is used). Do not make this value too large; the results are undefined if YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) evaluated with infinite-precision integer arithmetic. */ #ifndef YYMAXDEPTH # define YYMAXDEPTH 10000 #endif #if YYERROR_VERBOSE # ifndef yystrlen # if defined __GLIBC__ && defined _STRING_H # define yystrlen strlen # else /* Return the length of YYSTR. */ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static YYSIZE_T yystrlen (const char *yystr) #else static YYSIZE_T yystrlen (yystr) const char *yystr; #endif { YYSIZE_T yylen; for (yylen = 0; yystr[yylen]; yylen++) continue; return yylen; } # endif # endif # ifndef yystpcpy # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE # define yystpcpy stpcpy # else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static char * yystpcpy (char *yydest, const char *yysrc) #else static char * yystpcpy (yydest, yysrc) char *yydest; const char *yysrc; #endif { char *yyd = yydest; const char *yys = yysrc; while ((*yyd++ = *yys++) != '\0') continue; return yyd - 1; } # endif # endif # ifndef yytnamerr /* Copy to YYRES the contents of YYSTR after stripping away unnecessary quotes and backslashes, so that it's suitable for yyerror. The heuristic is that double-quoting is unnecessary unless the string contains an apostrophe, a comma, or backslash (other than backslash-backslash). YYSTR is taken from yytname. If YYRES is null, do not copy; instead, return the length of what the result would have been. */ static YYSIZE_T yytnamerr (char *yyres, const char *yystr) { if (*yystr == '"') { YYSIZE_T yyn = 0; char const *yyp = yystr; for (;;) switch (*++yyp) { case '\'': case ',': goto do_not_strip_quotes; case '\\': if (*++yyp != '\\') goto do_not_strip_quotes; /* Fall through. */ default: if (yyres) yyres[yyn] = *yyp; yyn++; break; case '"': if (yyres) yyres[yyn] = '\0'; return yyn; } do_not_strip_quotes: ; } if (! yyres) return yystrlen (yystr); return yystpcpy (yyres, yystr) - yyres; } # endif /* Copy into YYRESULT an error message about the unexpected token YYCHAR while in state YYSTATE. Return the number of bytes copied, including the terminating null byte. If YYRESULT is null, do not copy anything; just return the number of bytes that would be copied. As a special case, return 0 if an ordinary "syntax error" message will do. Return YYSIZE_MAXIMUM if overflow occurs during size calculation. */ static YYSIZE_T yysyntax_error (char *yyresult, int yystate, int yychar) { int yyn = yypact[yystate]; if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) return 0; else { int yytype = YYTRANSLATE (yychar); YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); YYSIZE_T yysize = yysize0; YYSIZE_T yysize1; int yysize_overflow = 0; enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; int yyx; # if 0 /* This is so xgettext sees the translatable formats that are constructed on the fly. */ YY_("syntax error, unexpected %s"); YY_("syntax error, unexpected %s, expecting %s"); YY_("syntax error, unexpected %s, expecting %s or %s"); YY_("syntax error, unexpected %s, expecting %s or %s or %s"); YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); # endif char *yyfmt; char const *yyf; static char const yyunexpected[] = "syntax error, unexpected %s"; static char const yyexpecting[] = ", expecting %s"; static char const yyor[] = " or %s"; char yyformat[sizeof yyunexpected + sizeof yyexpecting - 1 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) * (sizeof yyor - 1))]; char const *yyprefix = yyexpecting; /* Start YYX at -YYN if negative to avoid negative indexes in YYCHECK. */ int yyxbegin = yyn < 0 ? -yyn : 0; /* Stay within bounds of both yycheck and yytname. */ int yychecklim = YYLAST - yyn + 1; int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; int yycount = 1; yyarg[0] = yytname[yytype]; yyfmt = yystpcpy (yyformat, yyunexpected); for (yyx = yyxbegin; yyx < yyxend; ++yyx) if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) { if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) { yycount = 1; yysize = yysize0; yyformat[sizeof yyunexpected - 1] = '\0'; break; } yyarg[yycount++] = yytname[yyx]; yysize1 = yysize + yytnamerr (0, yytname[yyx]); yysize_overflow |= (yysize1 < yysize); yysize = yysize1; yyfmt = yystpcpy (yyfmt, yyprefix); yyprefix = yyor; } yyf = YY_(yyformat); yysize1 = yysize + yystrlen (yyf); yysize_overflow |= (yysize1 < yysize); yysize = yysize1; if (yysize_overflow) return YYSIZE_MAXIMUM; if (yyresult) { /* Avoid sprintf, as that infringes on the user's name space. Don't have undefined behavior even if the translation produced a string with the wrong number of "%s"s. */ char *yyp = yyresult; int yyi = 0; while ((*yyp = *yyf) != '\0') { if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) { yyp += yytnamerr (yyp, yyarg[yyi++]); yyf += 2; } else { yyp++; yyf++; } } } return yysize; } } #endif /* YYERROR_VERBOSE */ /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ /*ARGSUSED*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) #else static void yydestruct (yymsg, yytype, yyvaluep) const char *yymsg; int yytype; YYSTYPE *yyvaluep; #endif { YYUSE (yyvaluep); if (!yymsg) yymsg = "Deleting"; YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); switch (yytype) { case 9: /* "KEY" */ /* Line 1000 of yacc.c */ #line 83 "../../../lib/srchilite/stylecssparser.yy" { if ((yyvaluep->string)) delete (yyvaluep->string); }; /* Line 1000 of yacc.c */ #line 1147 "../../../lib/srchilite/stylecssparser.cc" break; case 10: /* "COLOR" */ /* Line 1000 of yacc.c */ #line 83 "../../../lib/srchilite/stylecssparser.yy" { if ((yyvaluep->string)) delete (yyvaluep->string); }; /* Line 1000 of yacc.c */ #line 1159 "../../../lib/srchilite/stylecssparser.cc" break; case 11: /* "BG_COLOR" */ /* Line 1000 of yacc.c */ #line 83 "../../../lib/srchilite/stylecssparser.yy" { if ((yyvaluep->string)) delete (yyvaluep->string); }; /* Line 1000 of yacc.c */ #line 1171 "../../../lib/srchilite/stylecssparser.cc" break; case 12: /* "STRINGDEF" */ /* Line 1000 of yacc.c */ #line 83 "../../../lib/srchilite/stylecssparser.yy" { if ((yyvaluep->string)) delete (yyvaluep->string); }; /* Line 1000 of yacc.c */ #line 1183 "../../../lib/srchilite/stylecssparser.cc" break; case 22: /* "keylist" */ /* Line 1000 of yacc.c */ #line 83 "../../../lib/srchilite/stylecssparser.yy" { if ((yyvaluep->keylist)) delete (yyvaluep->keylist); }; /* Line 1000 of yacc.c */ #line 1195 "../../../lib/srchilite/stylecssparser.cc" break; default: break; } } /* Prevent warnings from -Wmissing-prototypes. */ #ifdef YYPARSE_PARAM #if defined __STDC__ || defined __cplusplus int yyparse (void *YYPARSE_PARAM); #else int yyparse (); #endif #else /* ! YYPARSE_PARAM */ #if defined __STDC__ || defined __cplusplus int yyparse (void); #else int yyparse (); #endif #endif /* ! YYPARSE_PARAM */ /* The lookahead symbol. */ int yychar; /* The semantic value of the lookahead symbol. */ YYSTYPE yylval; /* Number of syntax errors so far. */ int yynerrs; /*-------------------------. | yyparse or yypush_parse. | `-------------------------*/ #ifdef YYPARSE_PARAM #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) int yyparse (void *YYPARSE_PARAM) #else int yyparse (YYPARSE_PARAM) void *YYPARSE_PARAM; #endif #else /* ! YYPARSE_PARAM */ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) int yyparse (void) #else int yyparse () #endif #endif { int yystate; /* Number of tokens to shift before error messages enabled. */ int yyerrstatus; /* The stacks and their tools: `yyss': related to states. `yyvs': related to semantic values. Refer to the stacks thru separate pointers, to allow yyoverflow to reallocate them elsewhere. */ /* The state stack. */ yytype_int16 yyssa[YYINITDEPTH]; yytype_int16 *yyss; yytype_int16 *yyssp; /* The semantic value stack. */ YYSTYPE yyvsa[YYINITDEPTH]; YYSTYPE *yyvs; YYSTYPE *yyvsp; YYSIZE_T yystacksize; int yyn; int yyresult; /* Lookahead token as an internal (translated) token number. */ int yytoken; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; #if YYERROR_VERBOSE /* Buffer for error messages, and its allocated size. */ char yymsgbuf[128]; char *yymsg = yymsgbuf; YYSIZE_T yymsg_alloc = sizeof yymsgbuf; #endif #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) /* The number of symbols on the RHS of the reduced rule. Keep to zero when no symbol should be popped. */ int yylen = 0; yytoken = 0; yyss = yyssa; yyvs = yyvsa; yystacksize = YYINITDEPTH; YYDPRINTF ((stderr, "Starting parse\n")); yystate = 0; yyerrstatus = 0; yynerrs = 0; yychar = YYEMPTY; /* Cause a token to be read. */ /* Initialize stack pointers. Waste one element of value and location stack so that they stay on the same level as the state stack. The wasted elements are never initialized. */ yyssp = yyss; yyvsp = yyvs; goto yysetstate; /*------------------------------------------------------------. | yynewstate -- Push a new state, which is found in yystate. | `------------------------------------------------------------*/ yynewstate: /* In all cases, when you get here, the value and location stacks have just been pushed. So pushing a state here evens the stacks. */ yyssp++; yysetstate: *yyssp = yystate; if (yyss + yystacksize - 1 <= yyssp) { /* Get the current used size of the three stacks, in elements. */ YYSIZE_T yysize = yyssp - yyss + 1; #ifdef yyoverflow { /* Give user a chance to reallocate the stack. Use copies of these so that the &'s don't force the real ones into memory. */ YYSTYPE *yyvs1 = yyvs; yytype_int16 *yyss1 = yyss; /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. This used to be a conditional around just the two extra args, but that might be undefined if yyoverflow is a macro. */ yyoverflow (YY_("memory exhausted"), &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), &yystacksize); yyss = yyss1; yyvs = yyvs1; } #else /* no yyoverflow */ # ifndef YYSTACK_RELOCATE goto yyexhaustedlab; # else /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) goto yyexhaustedlab; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) yystacksize = YYMAXDEPTH; { yytype_int16 *yyss1 = yyss; union yyalloc *yyptr = (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) goto yyexhaustedlab; YYSTACK_RELOCATE (yyss_alloc, yyss); YYSTACK_RELOCATE (yyvs_alloc, yyvs); # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); } # endif #endif /* no yyoverflow */ yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; YYDPRINTF ((stderr, "Stack size increased to %lu\n", (unsigned long int) yystacksize)); if (yyss + yystacksize - 1 <= yyssp) YYABORT; } YYDPRINTF ((stderr, "Entering state %d\n", yystate)); if (yystate == YYFINAL) YYACCEPT; goto yybackup; /*-----------. | yybackup. | `-----------*/ yybackup: /* Do appropriate processing given the current state. Read a lookahead token if we need one and don't already have one. */ /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; if (yyn == YYPACT_NINF) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); yychar = YYLEX; } if (yychar <= YYEOF) { yychar = yytoken = YYEOF; YYDPRINTF ((stderr, "Now at end of input.\n")); } else { yytoken = YYTRANSLATE (yychar); YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); } /* If the proper action on seeing token YYTOKEN is to reduce or to detect an error, take that action. */ yyn += yytoken; if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) goto yydefault; yyn = yytable[yyn]; if (yyn <= 0) { if (yyn == 0 || yyn == YYTABLE_NINF) goto yyerrlab; yyn = -yyn; goto yyreduce; } /* Count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; /* Shift the lookahead token. */ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); /* Discard the shifted token. */ yychar = YYEMPTY; yystate = yyn; *++yyvsp = yylval; goto yynewstate; /*-----------------------------------------------------------. | yydefault -- do the default action for the current state. | `-----------------------------------------------------------*/ yydefault: yyn = yydefact[yystate]; if (yyn == 0) goto yyerrlab; goto yyreduce; /*-----------------------------. | yyreduce -- Do a reduction. | `-----------------------------*/ yyreduce: /* yyn is the number of a rule to reduce with. */ yylen = yyr2[yyn]; /* If YYLEN is nonzero, implement the default value of the action: `$$ = $1'. Otherwise, the following line sets YYVAL to garbage. This behavior is undocumented and Bison users should not rely upon it. Assigning to YYVAL unconditionally makes the parser a bit smaller, and it avoids a GCC warning that YYVAL may be used uninitialized. */ yyval = yyvsp[1-yylen]; YY_REDUCE_PRINT (yyn); switch (yyn) { case 2: /* Line 1455 of yacc.c */ #line 90 "../../../lib/srchilite/stylecssparser.yy" { /* allow empty files */ } break; case 7: /* Line 1455 of yacc.c */ #line 102 "../../../lib/srchilite/stylecssparser.yy" { //printSequence( $1 ) ; //printMessage_noln( ": " ) ; currentStyleConstants = StyleConstantsPtr(new StyleConstants); currentColor = ""; currentBGColor = ""; } break; case 8: /* Line 1455 of yacc.c */ #line 110 "../../../lib/srchilite/stylecssparser.yy" { KeyType key; KeyList *keylist = (yyvsp[(1) - (4)].keylist); for (KeyList::const_iterator it = keylist->begin(); it != keylist->end(); ++it) { key = *it; // check whether it's the body specification if (Utils::tolower(key) == "body") { updateBgColor(currentBGColor); // notice that for text style specification for the body, the background // is assumed for the entire document and not for the normal text // following the semantics of css // avoid adding an empty style definition for normal if (currentColor != "" || currentStyleConstants->size()) { if (!formatterFactory->createFormatter(NORMAL, currentColor, "", currentStyleConstants)) { errorBuffer = "already defined " NORMAL; delete keylist; YYERROR; } } } else { if (!formatterFactory->createFormatter(key, currentColor, currentBGColor, currentStyleConstants)) { errorBuffer = "already defined " + key; delete keylist; YYERROR; } } } delete keylist; } break; case 9: /* Line 1455 of yacc.c */ #line 144 "../../../lib/srchilite/stylecssparser.yy" { (yyvsp[(1) - (3)].keylist)->push_back(*(yyvsp[(3) - (3)].string)); (yyval.keylist) = (yyvsp[(1) - (3)].keylist); delete (yyvsp[(3) - (3)].string); } break; case 10: /* Line 1455 of yacc.c */ #line 150 "../../../lib/srchilite/stylecssparser.yy" { (yyval.keylist) = new KeyList; (yyval.keylist)->push_back(*(yyvsp[(1) - (1)].string)); delete (yyvsp[(1) - (1)].string); } break; case 11: /* Line 1455 of yacc.c */ #line 157 "../../../lib/srchilite/stylecssparser.yy" {} break; case 16: /* Line 1455 of yacc.c */ #line 167 "../../../lib/srchilite/stylecssparser.yy" { currentColor = *(yyvsp[(1) - (1)].string); delete (yyvsp[(1) - (1)].string); } break; case 17: /* Line 1455 of yacc.c */ #line 172 "../../../lib/srchilite/stylecssparser.yy" { currentColor = *(yyvsp[(1) - (1)].string); delete (yyvsp[(1) - (1)].string); } break; case 18: /* Line 1455 of yacc.c */ #line 179 "../../../lib/srchilite/stylecssparser.yy" { currentBGColor = *(yyvsp[(1) - (1)].string); delete (yyvsp[(1) - (1)].string); } break; case 19: /* Line 1455 of yacc.c */ #line 184 "../../../lib/srchilite/stylecssparser.yy" { currentBGColor = *(yyvsp[(1) - (1)].string); delete (yyvsp[(1) - (1)].string); } break; case 20: /* Line 1455 of yacc.c */ #line 190 "../../../lib/srchilite/stylecssparser.yy" { currentStyleConstants->push_back(ISBOLD); } break; case 21: /* Line 1455 of yacc.c */ #line 191 "../../../lib/srchilite/stylecssparser.yy" { currentStyleConstants->push_back(ISITALIC); } break; case 22: /* Line 1455 of yacc.c */ #line 192 "../../../lib/srchilite/stylecssparser.yy" { currentStyleConstants->push_back(ISUNDERLINE); } break; case 23: /* Line 1455 of yacc.c */ #line 193 "../../../lib/srchilite/stylecssparser.yy" { currentStyleConstants->push_back(ISFIXED); } break; case 24: /* Line 1455 of yacc.c */ #line 194 "../../../lib/srchilite/stylecssparser.yy" { currentStyleConstants->push_back(ISNOTFIXED); } break; case 25: /* Line 1455 of yacc.c */ #line 195 "../../../lib/srchilite/stylecssparser.yy" { currentStyleConstants->push_back(ISNOREF); } break; /* Line 1455 of yacc.c */ #line 1668 "../../../lib/srchilite/stylecssparser.cc" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); YYPOPSTACK (yylen); yylen = 0; YY_STACK_PRINT (yyss, yyssp); *++yyvsp = yyval; /* Now `shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ yyn = yyr1[yyn]; yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) yystate = yytable[yystate]; else yystate = yydefgoto[yyn - YYNTOKENS]; goto yynewstate; /*------------------------------------. | yyerrlab -- here on detecting error | `------------------------------------*/ yyerrlab: /* If not already recovering from an error, report this error. */ if (!yyerrstatus) { ++yynerrs; #if ! YYERROR_VERBOSE yyerror (YY_("syntax error")); #else { YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) { YYSIZE_T yyalloc = 2 * yysize; if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) yyalloc = YYSTACK_ALLOC_MAXIMUM; if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); yymsg = (char *) YYSTACK_ALLOC (yyalloc); if (yymsg) yymsg_alloc = yyalloc; else { yymsg = yymsgbuf; yymsg_alloc = sizeof yymsgbuf; } } if (0 < yysize && yysize <= yymsg_alloc) { (void) yysyntax_error (yymsg, yystate, yychar); yyerror (yymsg); } else { yyerror (YY_("syntax error")); if (yysize != 0) goto yyexhaustedlab; } } #endif } if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an error, discard it. */ if (yychar <= YYEOF) { /* Return failure if at end of input. */ if (yychar == YYEOF) YYABORT; } else { yydestruct ("Error: discarding", yytoken, &yylval); yychar = YYEMPTY; } } /* Else will try to reuse lookahead token after shifting the error token. */ goto yyerrlab1; /*---------------------------------------------------. | yyerrorlab -- error raised explicitly by YYERROR. | `---------------------------------------------------*/ yyerrorlab: /* Pacify compilers like GCC when the user code never invokes YYERROR and the label yyerrorlab therefore never appears in user code. */ if (/*CONSTCOND*/ 0) goto yyerrorlab; /* Do not reclaim the symbols of the rule which action triggered this YYERROR. */ YYPOPSTACK (yylen); yylen = 0; YY_STACK_PRINT (yyss, yyssp); yystate = *yyssp; goto yyerrlab1; /*-------------------------------------------------------------. | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ yyerrlab1: yyerrstatus = 3; /* Each real token shifted decrements this. */ for (;;) { yyn = yypact[yystate]; if (yyn != YYPACT_NINF) { yyn += YYTERROR; if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) { yyn = yytable[yyn]; if (0 < yyn) break; } } /* Pop the current state because it cannot handle the error token. */ if (yyssp == yyss) YYABORT; yydestruct ("Error: popping", yystos[yystate], yyvsp); YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); } *++yyvsp = yylval; /* Shift the error token. */ YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); yystate = yyn; goto yynewstate; /*-------------------------------------. | yyacceptlab -- YYACCEPT comes here. | `-------------------------------------*/ yyacceptlab: yyresult = 0; goto yyreturn; /*-----------------------------------. | yyabortlab -- YYABORT comes here. | `-----------------------------------*/ yyabortlab: yyresult = 1; goto yyreturn; #if !defined(yyoverflow) || YYERROR_VERBOSE /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ yyexhaustedlab: yyerror (YY_("memory exhausted")); yyresult = 2; /* Fall through. */ #endif yyreturn: if (yychar != YYEMPTY) yydestruct ("Cleanup: discarding lookahead", yytoken, &yylval); /* Do not reclaim the symbols of the rule which action triggered this YYABORT or YYACCEPT. */ YYPOPSTACK (yylen); YY_STACK_PRINT (yyss, yyssp); while (yyssp != yyss) { yydestruct ("Cleanup: popping", yystos[*yyssp], yyvsp); YYPOPSTACK (1); } #ifndef yyoverflow if (yyss != yyssa) YYSTACK_FREE (yyss); #endif #if YYERROR_VERBOSE if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); #endif /* Make sure YYID is used. */ return YYID (yyresult); } /* Line 1675 of yacc.c */ #line 198 "../../../lib/srchilite/stylecssparser.yy" // string current_file; defined in styleparser extern string current_file; void yyerror( const char *s ) { errorBuffer = s; } void updateBgColor(const std::string &c) { if (bodyBgColor != "") yyerror("bgcolor already defined"); else bodyBgColor = c; } namespace srchilite { void parseCssStyles(const string &path, const string &name, FormatterFactory *genFactory, string &bodyBgColor_) { formatterFactory = genFactory; errorBuffer = ""; int result = 1; line = 1; // opens the file for yylex stylecsssc_in = open_data_file_stream(path, name); if (contains_path(name)) current_file = name; else current_file = (path.size() ? path + "/" : "") + name; bodyBgColor = ""; result = yyparse() ; bodyBgColor_ = bodyBgColor; fclose(stylecsssc_in); // release scanner memory stylecsssc_lex_destroy(); if (result != 0 || errorBuffer.size()) { throw ParserException(errorBuffer, current_file, line); } } } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/eventgenerator.h�����������������������������������������������0000644�0001750�0001750�00000002242�11672675563�017666� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2008 // // Copyright: See COPYING file that comes with this distribution // #ifndef EVENTGENERATOR_H_ #define EVENTGENERATOR_H_ #include <list> namespace srchilite { /** * A generic event generator, for listeners of type EventListener and events of * type EventType. EventListener must implement the method notify(const EventType &) */ template <class EventListener, class EventType> class EventGenerator { /// the list of listeners std::list<EventListener *> listeners; public: void addListener(EventListener *listener) { listeners.push_back(listener); } void removeListener(EventListener *listener) { listeners.remove(listener); } bool hasListeners() const { return listeners.size(); } /** * Notifies all listeners of a specific event * @param event the event */ void notify(const EventType &event) { for (typename std::list<EventListener *>::const_iterator it = listeners.begin(); it != listeners.end(); ++it) { (*it)->notify(event); } } }; } #endif /*EVENTGENERATOR_H_*/ ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/ctagsformatter.cpp���������������������������������������������0000644�0001750�0001750�00000010077�11672675563�020223� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2008 // // Copyright: See COPYING file that comes with this distribution // #include "ctagsformatter.h" #include "preformatter.h" #include "fileutil.h" #include "ctagscollector.h" #include "formatterparams.h" using namespace std; namespace srchilite { /// for formatting anchors and references static SubstitutionMapping ref_substitutionmapping; CTagsFormatter::CTagsFormatter(PreFormatter *pre, const TextStyles::RefTextStyle &r, CTagsCollector *ctagsC) : preFormatter(pre), refstyle(r), ctagsCollector(ctagsC) { } CTagsFormatter::~CTagsFormatter() { } void CTagsFormatter::setFileInfo(const std::string &input, const std::string &output) { inputFile = input; outputFile = output; inputFileName = strip_file_path(inputFile); outputFileExtension = ("." + get_file_extension(outputFile)); } bool CTagsFormatter::formatCTags(const std::string &word, CTagsFormatterResults &result, const FormatterParams *params) { CTagsInfos ctagsInfo; if (!ctagsCollector->collectTags(word, ctagsInfo, params)) return false; // no tags found for this word if (preFormatter) ref_substitutionmapping["$text"] = preFormatter->preformat(word); else ref_substitutionmapping["$text"] = word; string output; for (CTagsInfos::const_iterator info = ctagsInfo.begin(); info != ctagsInfo.end(); ++info) { if (info->isAnchor) { ref_substitutionmapping["$infilename"] = strip_file_path(info->fileName); ref_substitutionmapping["$infile"] = info->fileName; ref_substitutionmapping["$linenum"] = info->lineNumber; // format and store the anchor result.inlineResult = refstyle.anchor.output(ref_substitutionmapping); break; // if there's an anchor there can be nothing else } else { TextStyle *referencestyle = 0; // choose the right style if (info->refposition == POSTLINE) referencestyle = &(refstyle.postline_reference); else if (info->refposition == POSTDOC) referencestyle = &(refstyle.postdoc_reference); else referencestyle = &(refstyle.inline_reference); string gen_info; // we found where this element appears so we generate a reference // if it's a link in the same file, we use the output_file_name... if (info->fileName == inputFile || info->fileName == inputFileName) gen_info = outputFile; else gen_info = info->fileName + outputFileExtension; // ...otherwise we build the referenced file by using the output_file_extension // in fact, in this case, it probably means that multiple input files have been specified ref_substitutionmapping["$outfile"] = gen_info; ref_substitutionmapping["$infilename"] = strip_file_path(info->fileName); ref_substitutionmapping["$infile"] = info->fileName; ref_substitutionmapping["$linenum"] = info->lineNumber; // format and store the reference output += referencestyle->output(ref_substitutionmapping); // if the following is true, it means that there's not only one reference if (ctagsInfo.size()> 1 || info->refposition != INLINE) { if (preFormatter) output += preFormatter->preformat("\n"); else output += "\n"; if (info->refposition == POSTLINE || info->refposition == INLINE) { result.postLineResult.push_back(output); } else { // (refposition == POSTDOC) result.postDocResult.push_back(output); } output = ""; // no need to modify the current element } else { result.inlineResult = output; } } } return true; } } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/stringdef.h����������������������������������������������������0000644�0001750�0001750�00000005621�11672675563�016627� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // C++ Interface: StringDef // // Description: a string definition that is used by all the language elements. // // // Author: Lorenzo Bettini, 1999-2007 <http://www.lorenzobettini.it> // // Copyright: See COPYING file that comes with this distribution // // #ifndef STRINGDEF_H #define STRINGDEF_H #include <string> #include <list> namespace srchilite { class StringDefs; /** represent a string for a language definition file's element */ class StringDef { private: /// @brief the actual content std::string stringdef; /// @brief the original representation (without any preprocessing) std::string orig; /// @brief whether the string was specified with double quotes bool doubleQuotedString; /// @brief whether this is contains a back reference to a matched subexpression bool hasBackRef_; public: /** * constructs a StringDef and store also the original representation * @param s the actual content * @param o the original representation */ StringDef(const std::string &s, const std::string &o) : stringdef(s), orig(o), doubleQuotedString(false), hasBackRef_(false) { } /** * constructs a StringDef and record whether it comes from a double quoted * string. * @param s the actual content * @param doubleQuotes */ StringDef(const std::string &s, bool doubleQuotes = false) : stringdef(s), doubleQuotedString(doubleQuotes), hasBackRef_(false) { } /** * return the string representation (after preprocessing) * @return the string representation */ const std::string toString() const; /** * return the original representation (without any preprocessing); * this is useful for printing errors * @return the original representation */ const std::string toStringOriginal() const { return orig; } /** * whether this comes from a double quoted string * @return whether this comes from a double quoted string */ bool isDoubleQuoted() const { return doubleQuotedString; } /** * @return whether this has a back reference */ bool hasBackRef() const { return hasBackRef_; } /** * @param b */ void setBackRef(bool b) { hasBackRef_ = b; } /** * Given two StringDef produces a new StringDef (keeping properties such as * hasBackRef) * @param s1 * @param s2 * @return the new StringDef */ static StringDef *concat(const StringDef *s1, const StringDef *s2); }; typedef std::list<StringDef *> StringDefsBase; /** * A collection (list) of StringDef's. This collection is the owner * of its elements, so it will delete them when the collection is deleted */ class StringDefs : public StringDefsBase { public: ~StringDefs() { for (StringDefsBase::iterator it = begin(); it != end(); ++it) delete *it; } }; } #endif ���������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/langelems.h����������������������������������������������������0000644�0001750�0001750�00000004135�11672675563�016610� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Author: Lorenzo Bettini, (C) 1999-2009 // // Copyright: See COPYING file that comes with this distribution // // #ifndef LANGELEMS_H #define LANGELEMS_H #include "langelem.h" #include <list> #include <map> #include <string> using std::list; using std::map; using std::string; namespace srchilite { /// the base class for LangElems typedef list<LangElem *> LangElemsBase; /** * @class LangElems * collection of LangElem objects */ // doublecpp: forward declarations, DO NOT MODIFY class LangElemsPrinter; // file: langelemsprinter.h // doublecpp: end, DO NOT MODIFY class LangElems : protected list<LangElem *> { typedef LangElemsBase base; typedef base::iterator Pointer; typedef list<Pointer> PointerList; typedef map<string, PointerList> ElemMap; ElemMap elem_map; public: using base::const_iterator; using base::begin; using base::end; using base::size; LangElems(); virtual ~LangElems(); /** * Adds a new element at the end of this collection * @param el */ void add(LangElem *el); /** * Redefines all the possible occurrences of elements (which will be removed) with the * same name with the new element (which will be added at the end of this collection) * @param el the new element */ void redef(LangElem *el); /** * Replaces the first occurrence of element (with the same name) with the new one; * all the other possible occurrences of elements will be removed * @param el the new element */ void subst(LangElem *el); /** * return the string representation (with preprocessing) of all the elements * @return the string representation */ const std::string toString() const; /** * return the original representation (without any preprocessing) of all the elements; * this is useful for printing errors * @return the original representation */ const std::string toStringOriginal() const; // doublecpp: dispatch methods, DO NOT MODIFY public: virtual void dispatch_collect_const(LangElemsPrinter *); // doublecpp: end, DO NOT MODIFY }; } #endif �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/fileinfo.h�����������������������������������������������������0000644�0001750�0001750�00000001263�11672675563�016433� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // C++ Interface: fileinfo // // Description: // // // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2005 // // Copyright: See COPYING file that comes with this distribution // // #ifndef FILEINFO_H #define FILEINFO_H #include "parserinfo.h" namespace srchilite { /** Information about the file we are processing. */ struct FileInfo: public ParserInfo { /// the input file name (without path) std::string input_file_name; /// the output file name std::string output_file_name; /// the output file extension std::string output_file_extension; FileInfo(const std::string &input, const std::string &output); ~FileInfo(); }; } #endif ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/textstylebuilder.cpp�������������������������������������������0000644�0001750�0001750�00000002037�11672675563�020607� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/** * C++ class: textstylebuilder.h * * Description: Given TextStyle objects build a new one, * adding a starting part, and ending part, and separating * them. * * Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2005 * Copyright: See COPYING file that comes with this distribution */ #include "textstylebuilder.h" using namespace std; namespace srchilite { TextStyleBuilder::TextStyleBuilder(const std::string &st, const std::string &sep) : start_(st), separator_(sep), added(false) { } void TextStyleBuilder::start() { buffer = TextStyle(start_); added = false; } void TextStyleBuilder::add(const TextStyle &textStyle) { if (textStyle.empty()) return; string separator = (added ? separator_ : ""); if (buffer.containsStyleVar()) { buffer.update(TEXT_VAR_TEXT, separator + textStyle.toString()); added = true; } else { buffer.update(separator + textStyle.toString()); } } TextStyle TextStyleBuilder::end() { return TextStyle(buffer.toString()); } } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/ioexception.cpp������������������������������������������������0000644�0001750�0001750�00000001164�11672675563�017521� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2008 // // Copyright: See COPYING file that comes with this distribution // #include "ioexception.h" namespace srchilite { IOException::IOException(const std::string &_message, const std::string &_filename) : message(_message + (_filename.size() ? " " + _filename : "")), filename(_filename) { } IOException::~IOException() throw() { } const char* IOException::what() const throw () { return message.c_str(); } std::ostream& operator<<(std::ostream& os, const IOException &entry) { os << entry.message << "."; return os; } } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/stylefileparser.cpp��������������������������������������������0000644�0001750�0001750�00000002242�11672675563�020406� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * stylefileparser.cpp * * Created on: Dec 9, 2008 * Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2008 * Copyright: See COPYING file that comes with this distribution */ #include "stylefileparser.h" #include "parsestyles.h" #include "settings.h" namespace srchilite { void StyleFileParser::parseStyleFile(const std::string &name, FormatterFactory *formatterFactory, std::string &bodyBgColor) { parseStyles(name, formatterFactory, bodyBgColor); } void StyleFileParser::parseCssStyleFile(const std::string &name, FormatterFactory *formatterFactory, std::string &bodyBgColor) { parseCssStyles(Settings::retrieveDataDir(), name, formatterFactory, bodyBgColor); } void StyleFileParser::parseStyleFile(const std::string &path, const std::string &name, FormatterFactory *formatterFactory, std::string &bodyBgColor) { parseStyles(path, name, formatterFactory, bodyBgColor); } void StyleFileParser::parseCssStyleFile(const std::string &path, const std::string &name, FormatterFactory *formatterFactory, std::string &bodyBgColor) { parseCssStyles(path, name, formatterFactory, bodyBgColor); } } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/langdefparserfun.h���������������������������������������������0000644�0001750�0001750�00000000575�11672675563�020173� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // C++ Interface: %{MODULE} // // Description: // // // Author: %{AUTHOR} <%{EMAIL}>, (C) %{YEAR} // // Copyright: See COPYING file that comes with this distribution // // #ifndef LANGDEFPARSERFUN_H #define LANGDEFPARSERFUN_H #include "langelems.h" namespace srchilite { LangElems *parse_lang_def(); LangElems *parse_lang_def(const char *path, const char *name); } #endif �����������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/colors.h�������������������������������������������������������0000644�0001750�0001750�00000001267�11672675563�016145� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef COLORS_H #define COLORS_H namespace srchilite { #define GREEN "green" #define RED "red" #define DARKRED "darkred" #define BLUE "blue" #define BROWN "brown" #define PINK "pink" #define YELLOW "yellow" #define CYAN "cyan" #define PURPLE "purple" #define ORANGE "orange" #define BRIGHTORANGE "brightorange" #define DARKGREEN "darkgreen" #define BRIGHTGREEN "brightgreen" #define BLACK "black" #define TEAL "teal" #define GRAY "gray" #define DARKBLUE "darkblue" #define COMMENT_C BROWN #define KEYWORD_C BLUE #define STRING_C RED #define BASETYPE_C GREEN #define NUMBER_C PINK #define PREPROC_C DARKBLUE #define SYMBOL_C BLACK #define FUNCTION_C BLACK #define CBRACKET_C BLACK } #endif �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/substfun.cpp���������������������������������������������������0000644�0001750�0001750�00000001552�11672675563�017045� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/** * C++ function: substfun.h * * Description: substitutes a string to a $var into a text. * * Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2005 * Copyright: See COPYING file that comes with this distribution */ #include "substfun.h" using namespace std; namespace srchilite { string subst(const boost::regex &e, const string &s, const string &sub) { string ret; boost::sregex_iterator i1(s.begin(), s.end(), e); boost::sregex_iterator i2; string suffix; if (i1 == i2) return s; // the exp is not in the string so we do not alter it. for (boost::sregex_iterator it = i1; it != i2; ++it) { string prefix = it->prefix(); if (prefix.size()) ret += prefix; suffix = it->suffix(); ret += sub; } if (suffix.size()) ret += suffix; return ret; } } ������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/stylecssparser.h�����������������������������������������������0000644�0001750�0001750�00000005423�11675044736�017723� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������ /* A Bison parser, made by GNU Bison 2.4.1. */ /* Skeleton interface for Bison's Yacc-like parsers in C Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work under terms of your choice, so long as that work isn't itself a parser generator using the skeleton or a modified version thereof as a parser skeleton. Alternatively, if you modify or redistribute the parser skeleton itself, you may (at your option) remove this special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ /* Tokens. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE /* Put the tokens into the symbol table, so that GDB and other debuggers know about them. */ enum yytokentype { BOLD = 258, ITALICS = 259, UNDERLINE = 260, FIXED = 261, NOTFIXED = 262, NOREF = 263, KEY = 264, COLOR = 265, BG_COLOR = 266, STRINGDEF = 267, BG_STRINGDEF = 268 }; #endif /* Tokens. */ #define BOLD 258 #define ITALICS 259 #define UNDERLINE 260 #define FIXED 261 #define NOTFIXED 262 #define NOREF 263 #define KEY 264 #define COLOR 265 #define BG_COLOR 266 #define STRINGDEF 267 #define BG_STRINGDEF 268 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE { /* Line 1676 of yacc.c */ #line 70 "../../../lib/srchilite/stylecssparser.yy" int tok ; /* command */ const std::string * string ; /* string : id, ... */ srchilite::StyleConstant flag ; srchilite::StyleConstants *styleconstants; srchilite::KeyList *keylist; /* Line 1676 of yacc.c */ #line 88 "../../../lib/srchilite/stylecssparser.h" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 #endif extern YYSTYPE stylecsssc_lval; ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/formatter.h����������������������������������������������������0000644�0001750�0001750�00000002056�11672675563�016644� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2008 // // Copyright: See COPYING file that comes with this distribution // #ifndef FORMATTER_H_ #define FORMATTER_H_ #include <string> #include <boost/shared_ptr.hpp> namespace srchilite { struct FormatterParams; /** * The base abstract class for formatting strings. Derived classes must * implement the abstract method notify. Note that only the string to * format is passed (and some additional information in a FormatterParams object); * everything else (e.g., what kind of elements this formatter handles) must * be part of the Formatter itself (i.e., of the subclass). */ class Formatter { public: Formatter(); virtual ~Formatter(); /** * Formats the passed string. * * @param the string to format * @param params possible additional parameters for the formatter */ virtual void format(const std::string &s, const FormatterParams *params = 0) = 0; }; /// shared pointer for Formatter typedef boost::shared_ptr<Formatter> FormatterPtr; } #endif /*FORMATTER_H_*/ ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/sourcehighlightutils.cpp���������������������������������������0000644�0001750�0001750�00000003651�11672675563�021447� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * sourcehighlightutils.cpp * * Created on: May 19, 2009 * Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2008 * Copyright: See COPYING file that comes with this distribution */ #include "sourcehighlightutils.h" #include "ioexception.h" #include "fileutil.h" #include "settings.h" #include <stdio.h> #ifndef USE_MSVC // msvc does not provide this header #include <dirent.h> #else #include <direct.h> #define mkdir(path,mode) _mkdir (path) #include <compat_dirent.h> #endif using namespace std; namespace srchilite { StringSet SourceHighlightUtils::getFileNames(const std::string path, const std::string fileExtension) { StringSet strings; DIR *dp; struct dirent *ep; dp = opendir(path.c_str()); if (dp != NULL) { while ((ep = readdir(dp))) { const string name(ep->d_name); if (get_file_extension(name) == fileExtension) { strings.insert(name); } } (void) closedir(dp); } else { throw IOException("Couldn't open the directory", path); } return strings; } StringSet SourceHighlightUtils::getStyleFileNames(const std::string _path) { string path = _path; if (path == "") path = Settings::retrieveDataDir(); return getFileNames(path, "style"); } StringSet SourceHighlightUtils::getCssStyleFileNames(const std::string _path) { string path = _path; if (path == "") path = Settings::retrieveDataDir(); return getFileNames(path, "css"); } StringSet SourceHighlightUtils::getLangFileNames(const std::string _path) { string path = _path; if (path == "") path = Settings::retrieveDataDir(); return getFileNames(path, "lang"); } StringSet SourceHighlightUtils::getOutLangFileNames(const std::string _path) { string path = _path; if (path == "") path = Settings::retrieveDataDir(); return getFileNames(path, "outlang"); } } ���������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/ctagscollector.h�����������������������������������������������0000644�0001750�0001750�00000005217�11672675563�017653� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2009 // // Copyright: See COPYING file that comes with this distribution // #ifndef CTAGSCOLLECTOR_H_ #define CTAGSCOLLECTOR_H_ #include <string> #include <list> #include "refposition.h" #include "readtags.h" namespace srchilite { struct FormatterParams; /** * Information about a tag. This structure is used to * return collected information. */ struct CTagsInfo { /// the filename of a tag std::string fileName; /// the line number std::string lineNumber; /// where the reference should be positioned (only valid if !isAnchor) RefPosition refposition; /// whether the information concerns an anchor and not a reference bool isAnchor; /** * @param _fileName the filename of a tag * @param _lineNumber the line number * @param _refposition where the reference should be positioned * (only valid if !isAnchor) * @param _isAnchor whether the information concerns an anchor * and not a reference */ CTagsInfo(const std::string &_fileName, const std::string &_lineNumber, RefPosition _refposition, bool _isAnchor) : fileName(_fileName), lineNumber(_lineNumber), refposition(_refposition), isAnchor(_isAnchor) { } }; /** * The collection of information about a tag. */ typedef std::list<CTagsInfo> CTagsInfos; /** * Collects the tags information generated by the ctags program for * a given word */ class CTagsCollector { /// where references should be positioned RefPosition refposition; /// the ctags file tagFile *ctags_file; /// information about the ctags being examined (not really used) tagFileInfo info; public: /** * @param ctags_file_name the name of the ctags file * @param pos where the reference should be generated * @throws IOException if the file cannot be opened */ CTagsCollector(const std::string &ctags_file_name, RefPosition pos); ~CTagsCollector(); /** * Collects the tag information about the specified word and stores them * into the passed collection * @param word the word to collect tag information about * @param infos where to store the information * @param fileInfo information about the word being processed * @return false whether we did not find any information about the passed word */ bool collectTags(const std::string &word, CTagsInfos &infos, const FormatterParams *fileInfo); /** * where references should be positioned */ void setRefPosition(RefPosition r) { refposition = r; } }; } #endif /*CTAGSCOLLECTOR_H_*/ ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/chartranslator.h�����������������������������������������������0000644�0001750�0001750�00000005065�11672675563�017673� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (C) 1999-2009 Lorenzo Bettini, http://www.lorenzobettini.it * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ #ifndef _CHARTRANSLATOR_H #define _CHARTRANSLATOR_H #define NUM_OF_CHARS 256 #include <string> #include <boost/regex.hpp> #include "preformatter.h" namespace srchilite { /** * Translates specific character sequences into corresponding ones; * it can also use regualr expression for the characters to be translated. * This is useful for translating some characters in the input which * are special characters in the output formats, e.g., & in LaTeX, or * < in HTML. */ class CharTranslator: public PreFormatter { protected: /// keeps track of the translation patterns added unsigned int counter; /// the translation regular expression (for buffering) std::string translation_exp; /// the corresponding translated regular expression (for buffering) std::string translation_format; /// the actual regular expression boost::regex *reg_exp; /// whether we are at the beginning of a new line bool bol; /** * The actual preformatting (char translation) * @param text what to translate * @return the translated string */ virtual const std::string doPreformat(const std::string &text); public: /** * @param f the decorated preformatter */ CharTranslator(PreFormatterPtr f = PreFormatterPtr()); virtual ~CharTranslator(); /** * Adds a translation pair * @param s1 what to translate * @param s2 the translated expression */ void set_translation(const std::string &s1, const std::string &s2); /** * returns a string representation: what we translate * and into what we translate */ const std::string toString() const { return translation_exp + " -> " + translation_format; } }; typedef boost::shared_ptr<CharTranslator> CharTranslatorPtr; } #endif // _CHARTRANSLATOR_H ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/namedsubexpslangelem.h�����������������������������������������0000644�0001750�0001750�00000004376�11672675563�021053� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // C++ Interface: NamedSubExpsLangElem // // Description: represents a regular expression made by many marked groups // and each marked group represents a different language element // // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2007-2009 // // Copyright: See COPYING file that comes with this distribution // // #ifndef NAMEDSUBEXPSLANGELEM_H_ #define NAMEDSUBEXPSLANGELEM_H_ #include "statestartlangelem.h" #include <list> namespace srchilite { class StringDef; /// collection of element names typedef std::list<std::string> ElementNames; /** * @class NamedSubExpsLangElem * An element with subparts (subexpressions), each with a possible * different name. */ // doublecpp: forward declarations, DO NOT MODIFY class HighlightState; // file: highlightstate.h class HighlightStateBuilder; // file: highlightstatebuilder.h class LangElemsPrinter; // file: langelemsprinter.h // doublecpp: end, DO NOT MODIFY class NamedSubExpsLangElem : public StateStartLangElem { /// the element names const ElementNames *elementNames; /// the whole regular expression defiition StringDef *regexpDef; public: /** * @param names the element names (one for each subexpression) * @param def the whole definition * @param exit whether to exit one state * @param all whether to exit all states */ NamedSubExpsLangElem(const ElementNames *names, StringDef *def, bool exit = false, bool all = false); virtual ~NamedSubExpsLangElem(); /** * @return a string representation */ virtual const std::string toString() const; /** * @return a string representatio of the original expression (without * any preprocessing) */ virtual const std::string toStringOriginal() const; /** * @return the list of all the element names */ const ElementNames *getElementNames() const { return elementNames; } /** * @return the complete expression for this element */ const StringDef *getRegexpDef() const { return regexpDef; } // doublecpp: dispatch methods, DO NOT MODIFY public: virtual void dispatch_build(HighlightStateBuilder *, HighlightState * state); virtual void dispatch_collect_const(LangElemsPrinter *); // doublecpp: end, DO NOT MODIFY }; } #endif /*NAMEDSUBEXPSLANGELEM_H_*/ ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/langmap.cpp����������������������������������������������������0000644�0001750�0001750�00000006441�11672675563�016615� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // C++ Implementation: langmap // // Description: // // // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004 // // Copyright: See COPYING file that comes with this distribution // // #include <iostream> #include <boost/regex.hpp> #include "langmap.h" #include "fileutil.h" #include "utils.h" #include "parserexception.h" #include "settings.h" using namespace std; namespace srchilite { /// the regular expression for the map file syntax boost::regex assoc_exp( "[[:blank:]]*([^[:blank:]]+)[[:blank:]]*=[[:blank:]]*([^[:blank:]\\r]+)[[:blank:]\\r]*|([[:space:]]+)|([[:space:]]*#.*)"); LangMap::LangMap(const string &_path, const string &_filename) : isOpen(false), path(_path), filename(_filename) { } LangMap::LangMap(const string &_filename) : isOpen(false), path(Settings::retrieveDataDir()), filename(_filename) { } LangMap::~LangMap() { } void LangMap::open() { if (isOpen) return; istream *in = open_data_file_istream(path, filename); string line; unsigned int lineno = 1; while (read_line(in, line)) { if (line.size()) { boost::cmatch what; if (!boost::regex_match(line.c_str(), what, assoc_exp)) throw ParserException("wrong specification" + line, filename, lineno); else if (!what[3].matched) // not all spaces langmap[what[1]] = what[2]; } ++lineno; } isOpen = true; delete in; } const std::string LangMap::getMappedFileName(const std::string &lang) { // make sure that the lang map file has been parsed open(); return getFileName(lang); } const std::string LangMap::getMappedFileNameFromFileName( const std::string &fileName) { // make sure the lang map file is parsed open(); string mappedFile; // try with the file extension const string ext = get_file_extension(fileName); if (ext != "") { mappedFile = getFileName(ext); if (mappedFile != "") return mappedFile; else { mappedFile = getFileName(Utils::tolower(ext)); if (mappedFile != "") return mappedFile; } } string fileNameNoPath = strip_file_path(fileName); // try with the file name mappedFile = getFileName(fileNameNoPath); if (mappedFile != "") return mappedFile; // try with the lower case file name (as our last chance) return getFileName(Utils::tolower(fileNameNoPath)); } void LangMap::print() { for (Map::const_iterator it = langmap.begin(); it != langmap.end(); ++it) cout << it->first << " = " << it->second << endl; } set<string> LangMap::getLangNames() const { set<string> s; for (Map::const_iterator it = langmap.begin(); it != langmap.end(); ++it) if (it->first != "") s.insert(it->first); return s; } std::set<std::string> LangMap::getMappedFileNames() const { set<string> s; for (Map::const_iterator it = langmap.begin(); it != langmap.end(); ++it) if (it->second != "") s.insert(it->second); return s; } void LangMap::reload(const string &_path, const string &_filename) { path = _path; filename = _filename; isOpen = false; // this will force reopening langmap.clear(); open(); } } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/textstylebuilder.h���������������������������������������������0000644�0001750�0001750�00000001370�11672675563�020253� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/** * Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2005 * Copyright: See COPYING file that comes with this distribution */ #ifndef _TEXTSTYLEBUILDER_H_ #define _TEXTSTYLEBUILDER_H_ #include "textstyle.h" namespace srchilite { /** * Given TextStyle objects build a new one, * adding a starting part, and ending part, and separating * them. */ class TextStyleBuilder { std::string start_, separator_; TextStyle buffer; ///< where we store intermediate results bool added; ///< whether we've already added something public: TextStyleBuilder(const std::string &st = "", const std::string &sep = ""); void start(); void add(const TextStyle &textStyle); TextStyle end(); }; } #endif /*_TEXTSTYLEBUILDER_H_*/ ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/languageinfer.cpp����������������������������������������������0000644�0001750�0001750�00000006556�11672675563�020014� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // C++ Implementation: languageinfer // // Description: // // // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2006 // // Copyright: See COPYING file that comes with this distribution // // #include "languageinfer.h" #include "fileutil.h" #include <boost/regex.hpp> using namespace std; namespace srchilite { LanguageInfer::LanguageInfer() { } LanguageInfer::~LanguageInfer() { } const string LanguageInfer::infer(const string &filename) { istream *stream = open_file_istream_or_error(filename); string result = infer(*stream); delete stream; return result; } const string LanguageInfer::infer(istream &stream) { // the regular expression for finding the language specification in a script file // this such as #! /bin/bash static boost::regex langRegEx( "#[[:blank:]]*![[:blank:]]*(?:[\\./]*)(?:[[:alnum:]]+[\\./]+)*([[:alnum:]]+)"); // the regular expression for finding the language specification in a script file // this such as #! /usr/bin/env perl static boost::regex langEnvRegEx( "#[[:blank:]]*![[:blank:]]*(?:[\\./]*)(?:[[:alnum:]]+[\\./]+)*(?:env)[[:blank:]]+([[:alnum:]]+)"); // the regular expression for finding the language specification in a script file // according to Emacs convention: # -*- language -*- static boost::regex langRegExEmacs("-\\*-[[:blank:]]*([[:alnum:]]+).*-\\*-"); // the Emacs specification has the precedence in order to correctly infer // that scripts of the shape // #!/bin/sh // # -*- tcl -*- // are Tcl scripts and not shell scripts // the regular expression for scripts starting with <?... // such as xml and php static boost::regex langXMLLikeScripts("<\\?([[:alnum:]]+)"); // the regular expression for <!DOCTYPE static boost::regex langDocType("<![Dd][Oo][Cc][Tt][Yy][Pp][Ee]"); string firstLine; string secondLine; // read only the first line of the input read_line(&stream, firstLine); // and the second line read_line(&stream, secondLine); boost::match_results<std::string::const_iterator> what; boost::match_results<std::string::const_iterator> whatEnv; boost::match_results<std::string::const_iterator> whatEmacs; // first try the emacs specification boost::regex_search(secondLine, whatEmacs, langRegExEmacs, boost::match_default); if (whatEmacs[1].matched) return whatEmacs[1]; else { // try also on the first line boost::regex_search(firstLine, whatEmacs, langRegExEmacs, boost::match_default); if (whatEmacs[1].matched) return whatEmacs[1]; } // try also the env specification boost::regex_search(firstLine, whatEnv, langEnvRegEx, boost::match_default); if (whatEnv[1].matched) return whatEnv[1]; // try the sha-bang specification boost::regex_search(firstLine, what, langRegEx, boost::match_default); if (what[1].matched) return what[1]; // the xml like starting scripts boost::regex_search(firstLine, what, langXMLLikeScripts, boost::match_default); if (what[1].matched) return what[1]; // the doctype case boost::regex_search(firstLine, what, langDocType, boost::match_default); if (what[0].matched) return "xml"; return ""; } } ��������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/linebuffer.h���������������������������������������������������0000644�0001750�0001750�00000002713�11672675563�016762� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2005 // // Copyright: See COPYING file that comes with this distribution // // #ifndef LINEBUFFER_H #define LINEBUFFER_H #include <string> #include <set> #include <boost/shared_ptr.hpp> #include <sstream> namespace srchilite { /** A buffer for a line to be generated */ class LineBuffer { public: /// Stores contents to be printed after the line typedef std::set<std::string> PostContents; private: ostringstream buffer; ///< the line contents PostContents post; ///< to be generated after the line public: LineBuffer() { } ~LineBuffer() { } /** * Puts something in the buffer */ void output(const std::string &s) { buffer << s; } /** * Stores something to be generated after the line */ void output_post(const std::string &s) { post.insert(s); } /** * @return the contents of the buffer */ const std::string getContents() const { return buffer.str(); } /** * @return what to generated after the line */ const PostContents &getPostContents() const { return post; } /** * @return whether both the buffer and the post line contens are empty */ bool empty() const { return (buffer.str().size() == 0 && post.size() == 0); } }; /// shared pointer for LineBuffer typedef boost::shared_ptr<LineBuffer> LineBufferPtr; } #endif �����������������������������������������������������source-highlight-3.1.6/lib/srchilite/highlightrulefactory.cpp���������������������������������������0000644�0001750�0001750�00000000241�11672675563�021415� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#include "highlightrulefactory.h" namespace srchilite { HighlightRuleFactory::HighlightRuleFactory() { } HighlightRuleFactory::~HighlightRuleFactory() { } } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/stylecssscanner.ll���������������������������������������������0000644�0001750�0001750�00000012547�11672675563�020252� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������%{ /* * Copyright (C) 1999-2007 Lorenzo Bettini, http://www.lorenzobettini.it * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ #include <stdlib.h> #include <string.h> #include "stylekey.h" #include "formatterfactory.h" #include "stylecssparser.h" #include <sstream> #include "parsestyles.h" using namespace srchilite; static std::ostringstream buff; extern int line ; //#define DEBUG_SCANNER #ifdef DEBUG_SCANNER #include <iostream> // for debug #define DEB(s) std::cerr << s << std::endl; #define DEB2(s,s2) std::cerr << s << ": " << s2 << std::endl; #else #define DEB(s) #define DEB2(s,s2) #endif %} %option prefix="stylecsssc_" %option noyywrap ws [ ]+ tabs [\t]+ nl \n cr \r IDE [a-zA-Z_]([a-zA-Z0-9_])* VALUE [^\n\r:;[:blank:]]+ STRING \"[^\"\n]*\" %s COMMENT_STATE MULTI_COMMENT_STATE STRING_STATE CSS_SELECTOR CSS_PROPERTIES CSS_COLOR CSS_BG_COLOR CSS_FONT_WEIGHT CSS_FONT_STYLE CSS_FONT_FAMILY CSS_TEXT_DECORATION %% {ws}|{tabs} {} \r {} "/*" { BEGIN(MULTI_COMMENT_STATE); } <MULTI_COMMENT_STATE>[^\n] {} <MULTI_COMMENT_STATE>\n { ++line; BEGIN(INITIAL); } <CSS_SELECTOR>"," { return ',' ; } <CSS_SELECTOR>{IDE} { stylecsssc_lval.string = new std::string(yytext) ; return KEY ; } \n { ++line ; } <INITIAL>\. { BEGIN(CSS_SELECTOR) ; DEB("CSS SELECTOR"); } <INITIAL>[bB][oO][dD][yY] { BEGIN(CSS_SELECTOR) ; DEB("BODY CSS SELECTOR"); stylecsssc_lval.string = new std::string(yytext) ; return KEY; } <CSS_SELECTOR>\. { // in case of comma separated selectors DEB("CSS SELECTOR"); } <CSS_SELECTOR>"{" { BEGIN(CSS_PROPERTIES); DEB("CSS PROPERTIES"); } <CSS_PROPERTIES>"color" { BEGIN(CSS_COLOR); DEB("CSS COLOR"); } <CSS_COLOR>"green"|"red"|"darkred"|"blue"|"brown"|"pink"|"yellow"|"cyan"|"purple"|"orange"|"brightorange"|"darkgreen"|"brightgreen"|"black"|"teal"|"gray"|"darkblue" { BEGIN(CSS_PROPERTIES); stylecsssc_lval.string = new std::string(yytext) ; DEB2("CSS COLOR", yytext); return COLOR ; } <CSS_COLOR>[#[:alnum:]]+ { BEGIN(CSS_PROPERTIES); DEB2("CSS COLOR", yytext); /* we need to add the " in order to make source-highlight realize that this is a direct color specification */ stylecsssc_lval.string = new std::string("\"" + std::string(yytext) + "\""); return STRINGDEF; } <CSS_PROPERTIES>"background-color" { BEGIN(CSS_BG_COLOR); DEB("CSS BACKGROUND COLOR"); } <CSS_BG_COLOR>"green"|"red"|"darkred"|"blue"|"brown"|"pink"|"yellow"|"cyan"|"purple"|"orange"|"brightorange"|"darkgreen"|"brightgreen"|"black"|"teal"|"gray"|"darkblue" { BEGIN(CSS_PROPERTIES); stylecsssc_lval.string = new std::string(yytext) ; DEB2("CSS BG COLOR", yytext); return BG_COLOR ; } <CSS_BG_COLOR>[#[:alnum:]]+ { BEGIN(CSS_PROPERTIES); DEB2("CSS BG COLOR", yytext); /* we need to add the " in order to make source-highlight realize that this is a direct color specification */ stylecsssc_lval.string = new std::string("\"" + std::string(yytext) + "\""); return BG_STRINGDEF; } <CSS_PROPERTIES>"font-weight" { BEGIN(CSS_FONT_WEIGHT); DEB("CSS FONT WEIGHT"); } <CSS_FONT_WEIGHT>{VALUE} { BEGIN(CSS_PROPERTIES); if (strcmp(yytext, "bold") == 0) { DEB("CSS BOLD"); stylecsssc_lval.flag = srchilite::ISBOLD ; return BOLD ; } DEB2("discarding not handled value", yytext); } <CSS_PROPERTIES>"font-style" { BEGIN(CSS_FONT_STYLE); DEB("CSS FONT STYLE"); } <CSS_FONT_STYLE>{VALUE} { BEGIN(CSS_PROPERTIES); if (strcmp(yytext, "italic") == 0) { DEB("CSS ITALIC"); stylecsssc_lval.flag = srchilite::ISITALIC ; return ITALICS ; } DEB2("discarding not handled value", yytext); } <CSS_PROPERTIES>"font-family" { BEGIN(CSS_FONT_FAMILY); DEB("CSS FONT FAMILY"); } <CSS_FONT_FAMILY>{VALUE} { BEGIN(CSS_PROPERTIES); if (strcmp(yytext, "monospace") == 0) { DEB("CSS FIXED"); stylecsssc_lval.flag = srchilite::ISFIXED ; return FIXED ; } DEB2("discarding not handled value", yytext); } <CSS_PROPERTIES>"text-decoration" { BEGIN(CSS_TEXT_DECORATION); DEB("CSS TEXT DECORATION"); } <CSS_TEXT_DECORATION>{VALUE} { BEGIN(CSS_PROPERTIES); if (strcmp(yytext, "underline") == 0) { DEB("CSS UNDERLINE"); stylecsssc_lval.flag = srchilite::ISUNDERLINE ; return UNDERLINE ; } DEB2("discarding not handled value", yytext); } <CSS_PROPERTIES>"}" { BEGIN(INITIAL); DEB("CSS END PROPERTIES"); /* we must return ; since this is the terminator of a style option so we simulate it in case of css files */ return ';' ; } <CSS_COLOR,CSS_BG_COLOR,CSS_FONT_WEIGHT,CSS_FONT_STYLE,CSS_FONT_FAMILY,CSS_TEXT_DECORATION>":"|";"|[\t]|[[:blank:]] { /* discard other characters */ DEB2("CSS discarding", yytext); } <CSS_PROPERTIES>. { /* discard other properties */ DEB2("CSS PROPERTIES discarding", yytext); } <INITIAL>. { return yytext[0] ; } %% ���������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/preformatter.cpp�����������������������������������������������0000644�0001750�0001750�00000001665�11672675563�017713� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // C++ Implementation: preformatter // // Description: // // // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2005 // // Copyright: See COPYING file that comes with this distribution // // #include "preformatter.h" using namespace std; namespace srchilite { PreFormatter::PreFormatter(PreFormatterPtr f) : decorator(f) { } PreFormatter::~PreFormatter() { } void PreFormatter::setPreFormatter(PreFormatterPtr f) { if (decorator.get()) decorator->setPreFormatter(f); else decorator = f; } const string PreFormatter::preformat(const string &text) { if (! text.size()) return text; string preformat_text = text; PreFormatter *inner = this; while (inner) // start the chain of preformatting { preformat_text = inner->doPreformat(preformat_text); inner = inner->decorator.get(); } return preformat_text; } const string PreFormatter::doPreformat(const string &text) { return text; } } ���������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/textstyleformattercollection.h���������������������������������0000644�0001750�0001750�00000000466�11672675563�022711� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef TEXTSTYLEFORMATTERCOLLECTION_H_ #define TEXTSTYLEFORMATTERCOLLECTION_H_ #include <list> namespace srchilite { class TextStyleFormatter; /// Collection of TextStyleFormatter objects typedef std::list<TextStyleFormatter *> TextStyleFormatterCollection; } #endif /*TEXTSTYLEFORMATTERCOLLECTION_H_*/ ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/versions.h�����������������������������������������������������0000644�0001750�0001750�00000001327�11672675564�016512� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Created on: Apr 18, 2009 * Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2008 * Copyright: See COPYING file that comes with this distribution */ #ifndef VERSIONS_H_ #define VERSIONS_H_ #include <string> namespace srchilite { /** * Utility functions for version numbers */ class Versions { public: /** * @return the version of Source-highlight */ static const std::string getVersion(); /** * @return the version of Source-highlight library */ static const std::string getLibraryVersion(); /** * @return a string with the version and the library version */ static const std::string getCompleteVersion(); }; } #endif /* VERSIONS_H_ */ ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/regexpreprocessor.h��������������������������������������������0000644�0001750�0001750�00000014777�11672675563�020437� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // C++ Interface: RegexPreProcessor // // Description: performs operations or inspections on a string representing // a valid regular expression // // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 1999-2007 // // Copyright: See COPYING file that comes with this distribution // // #ifndef REGEXPREPROCESSOR_H #define REGEXPREPROCESSOR_H #include <string> #include <list> #include <utility> #include <vector> #include <boost/regex.hpp> namespace srchilite { /** * @internal * info about subexpressions */ struct subexpressions_info { const static std::string ERR_OUTER_UNMARKED; const static std::string ERR_NESTED_SUBEXP; const static std::string ERR_UNBALANCED_PAREN; const static std::string ERR_OUTSIDE_SUBEXP; /// num of marked subexpressions unsigned int marked; /// error specifications, if any std::string errors; subexpressions_info() : marked(0) { } }; /** * all the marked subexpressions in a list */ typedef std::list<std::string> subexpressions_strings; /** * Information about backreferences; the first elem contains the * number of backreferences and the second one contains the highest * backreference info */ typedef std::pair<int, int> backreference_info; /** * What to replace to backreferences in a regular expression */ typedef std::vector<std::string> backreference_replacements; /** * The result of boost::regex_search */ typedef boost::match_results<std::string::const_iterator> regex_match_results; /** preprocess a regular expression, e.g., transform "()" into "(?:)" */ class RegexPreProcessor { public: RegexPreProcessor(); ~RegexPreProcessor(); /** * translates marked subexpressions (...) into non marked subexpressions (?: ) * @return the translated string */ static const std::string preprocess(const std::string &s); /** * translates the expression into a case nonsensitive expression, i.e., * foo is translated into [Ff][Oo][Oo] * @return the translated string */ static const std::string make_nonsensitive(const std::string &s); /** * counts the number of marked subexpressions (...) * * @param s * @return the number of marked subexpressions */ static unsigned int num_of_subexpressions(const std::string &s); /** * check that the expressions is made up of marked subexpressions (...) * and no nested subexpressions and no char outside subexpressions (unless * allow_outer_char is true). * * Non-marked groups are allowed only if allow_outer_nonmarked is true. * * @param s * @param allow_outer_char whether we allow characters outside marked subexps * @param allow_outer_nonmarked whether we allow outer nonmarked subexps * @return the struct containing the number of marked subexpressions * and possible errors */ static subexpressions_info num_of_marked_subexpressions( const std::string &s, bool allow_outer_char = false, bool allow_outer_nonmarked = false); /** * Splits the marked subexpressions of a regular expression made up of only * marked subexpressions and no nested subexpressions and char outside subexpressions * (thus, before calling this, you must make sure that num_of_marked_subexpressions * did not return an error. * * @return the subexpressions in a collection (this is allocated on the heap, so * it is up to the caller to delete it) */ static const subexpressions_strings *split_marked_subexpressions( const std::string &s); /** * Checks whether the passed regular expression string contains * a backreference (e.g., either \1 or a conditional with a backreference * (?(1)...) * * @return true if the passed regular expression string contains * a backreference */ static bool contains_backreferences(const std::string &s); /** * counts the number of backreferences (also in conditionals) * * @param s * @return the number of backreferences and the highest backreference * number */ static backreference_info num_of_backreferences(const std::string &s); /** * counts the number of references (i.e., reference to a matched subexpression * of another regular expression) * * @param s * @return the number of backreferences and the highest backreference * number */ static backreference_info num_of_references(const std::string &s); /** * Replace into the original string occurrences of backreferences * with the corresponding string in the replace parameter, i.e., * \n backreference will be replaced with replace[n-1] * * @warning For the moment this is never used but in testing * * @param original * @param replace * @return the result of the replacement */ static const std::string replace_backreferences( const std::string &original, const backreference_replacements &replace); /** * Replace into the original string occurrences of backreferences * with the corresponding subexpressions that matched in the results. * * Notice that we assume that the results come from a regular expression * without nested subexpressions. * * @warning For the moment this is never used but in testing * * @param original * @param results * @return the result of the replacement */ static const std::string replace_backreferences( const std::string &original, const regex_match_results &results); /** * Replace into the original string occurrences of backreferences * with the corresponding string in the replace parameter, i.e., * @{n} backreference will be replaced with replace[n-1] * * @param original * @param replace * @return the result of the replacement */ static const std::string replace_references( const std::string &original, const backreference_replacements &replace); /** * Replace into the original string occurrences of backreferences * with the corresponding subexpressions that matched in the results. * * Notice that we assume that the results come from a regular expression * without nested subexpressions. * * @param original * @param results * @return the result of the replacement */ static const std::string replace_references( const std::string &original, const regex_match_results &results); }; } #endif �source-highlight-3.1.6/lib/srchilite/ctagsmanager.cpp�����������������������������������������������0000644�0001750�0001750�00000002704�11672675563�017630� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2008 // // Copyright: See COPYING file that comes with this distribution // #include <cstdlib> #include "ctagsmanager.h" #include "ctagscollector.h" #include "ioexception.h" #include "ctagscollector.h" #include "ctagsformatter.h" #include "verbosity.h" using namespace std; namespace srchilite { CTagsManager::CTagsManager(const std::string &_ctagsFile, const std::string &_ctagsCmd, bool _runCTags, RefPosition _refPosition) : ctagsFile(_ctagsFile), ctagsCmd(_ctagsCmd), runCTags(_runCTags), refPosition(_refPosition), ctagsCollector(0) { } CTagsManager::~CTagsManager() { if (ctagsCollector) delete ctagsCollector; } void CTagsManager::runCTagsCmd() { VERBOSELN("Running ctags: " + ctagsCmd); int res = system(ctagsCmd.c_str()); if (res != 0) { throw IOException("error running ctags command", ctagsCmd); } // so that the ctags command is run only once runCTags = false; } CTagsFormatter *CTagsManager::createCTagsFormatter(const TextStyles::RefTextStyle &r) { if (runCTags) runCTagsCmd(); // the CTagsCollector will be shared by all the created CTagsFormatters if (!ctagsCollector) ctagsCollector = new CTagsCollector(ctagsFile, refPosition); // the preformatter is set to 0 in the CTagsFormatter: it must be // set externally return new CTagsFormatter(0, r, ctagsCollector); } } ������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/langdefmanager.cpp���������������������������������������������0000644�0001750�0001750�00000003441�11672675563�020126� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2008 // // Copyright: See COPYING file that comes with this distribution // #include "langdefmanager.h" #include "fileutil.h" #include "langdefparserfun.h" #include "langelems.h" #include "highlightstatebuilder.hpp" #include "settings.h" using namespace std; namespace srchilite { LangDefManager::LangDefManager(HighlightRuleFactory *_ruleFactory) : ruleFactory(_ruleFactory) { } LangDefManager::~LangDefManager() { } HighlightStatePtr LangDefManager::buildHighlightState(const string &path, const string &file) { HighlightStatePtr highlightState(new HighlightState); // parse the contents of the langdef file LangElems *elems = getLangElems(path, file); HighlightStateBuilder builder(ruleFactory); // build the highlight state corresponding to the language definition file builder.build(elems, highlightState); delete elems; return highlightState; } HighlightStatePtr LangDefManager::getHighlightState(const string &path, const string &file) { const string key = (path.size() ? path + "/" : "") + file; HighlightStatePtr highlightState = highlightStateCache[key]; // check whether we had already built such an HighlightState if (highlightState.get()) return highlightState; // otherwise build it highlightState = buildHighlightState(path, file); // store in the cache highlightStateCache[key] = highlightState; return highlightState; } HighlightStatePtr LangDefManager::getHighlightState(const string &file) { return getHighlightState(Settings::retrieveDataDir(), file); } LangElems *LangDefManager::getLangElems(const std::string &path, const std::string &file) { return parse_lang_def(path.c_str(), file.c_str()); } } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/lineranges.cpp�������������������������������������������������0000644�0001750�0001750�00000007513�11672675563�017326� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * lineranges.cpp * * Created on: Sep 17, 2008 * Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2008 * Copyright: See COPYING file that comes with this distribution */ #include "lineranges.h" #include <sstream> #include <boost/regex.hpp> #include <cstdlib> namespace srchilite { /// regular expression for a single line static boost::regex singleNumber("\\s*([[:digit:]]+)\\s*"); /// regular expression for an interval static boost::regex rangeExp("\\s*([[:digit:]]+)\\s*-\\s*([[:digit:]]+)\\s*"); /// regular expression for an interval with only the first element static boost::regex rangeExp1("\\s*([[:digit:]]+)\\s*-\\s*"); /// regular expression for an interval with only the second element static boost::regex rangeExp2("\\s*-\\s*([[:digit:]]+)\\s*"); using namespace std; LineRanges::LineRanges(unsigned int context) : searchFromTheStart(true), contextLines(context) { } LineRanges::~LineRanges() { } RangeError LineRanges::addRange(const std::string &range) { boost::smatch match; if (boost::regex_match(range, match, singleNumber)) { lineRangeSet.insert(make_pair(strtol(match[1].str().c_str(), 0, 0), 0)); } else if (boost::regex_match(range, match, rangeExp)) { lineRangeSet.insert(make_pair(strtol(match[1].str().c_str(), 0, 0), strtol(match[2].str().c_str(), 0, 0))); } else if (boost::regex_match(range, match, rangeExp1)) { lineRangeSet.insert(make_pair(strtol(match[1].str().c_str(), 0, 0), -1)); } else if (boost::regex_match(range, match, rangeExp2)) { lineRangeSet.insert(make_pair(-1, strtol(match[1].str().c_str(), 0, 0))); } else { return INVALID_RANGE_NUMBER; } return NO_ERROR; } RangeResult LineRanges::isInRange(const RangeElemType e) { if (searchFromTheStart) { currentRange = lineRangeSet.begin(); searchFromTheStart = false; } while (currentRange != lineRangeSet.end()) { if (currentRange->first < 0) { // first and second cannot be both < 0 (already checked during add) if (e <= currentRange->second) { return IN_RANGE; } } else if (currentRange->second < 0) { if (e >= currentRange->first) { return IN_RANGE; } else { if ((contextLines > 0) && (currentRange->first - e) <= contextLines) { return CONTEXT_RANGE; } // makes no sense checking further ranges return NOT_IN_RANGE; } } else if (currentRange->second == 0) { // check perfect match if (e == currentRange->first) { return IN_RANGE; } else if (e < currentRange->first) { if (contextLines > 0) { if (((currentRange->first - e) <= contextLines)) { return CONTEXT_RANGE; } } // makes no sense checking further ranges return NOT_IN_RANGE; } else if (contextLines > 0 && ((e - currentRange->first) <= contextLines)) { return CONTEXT_RANGE; } } else if (e >= currentRange->first && e <= currentRange->second) { return IN_RANGE; } else if (contextLines > 0 && (((e < currentRange->first) && ((currentRange->first - e) <= contextLines)) || ((e > currentRange->second) && ((e - currentRange->second) <= contextLines)))) { return CONTEXT_RANGE; } else if (e < currentRange->first) { // makes no sense checking further ranges return NOT_IN_RANGE; } // if we're here we try with another range in the set currentRange++; } return NOT_IN_RANGE; } } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/langdefscanner.cc����������������������������������������������0000644�0001750�0001750�00000176402�11675044736�017753� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#line 2 "../../../lib/srchilite/langdefscanner.cc" #line 4 "../../../lib/srchilite/langdefscanner.cc" #define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ #define yy_create_buffer langdef__create_buffer #define yy_delete_buffer langdef__delete_buffer #define yy_flex_debug langdef__flex_debug #define yy_init_buffer langdef__init_buffer #define yy_flush_buffer langdef__flush_buffer #define yy_load_buffer_state langdef__load_buffer_state #define yy_switch_to_buffer langdef__switch_to_buffer #define yyin langdef_in #define yyleng langdef_leng #define yylex langdef_lex #define yylineno langdef_lineno #define yyout langdef_out #define yyrestart langdef_restart #define yytext langdef_text #define yywrap langdef_wrap #define yyalloc langdef_alloc #define yyrealloc langdef_realloc #define yyfree langdef_free #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 #define YY_FLEX_SUBMINOR_VERSION 35 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif /* First, we deal with platform-specific or compiler-specific issues. */ /* begin standard C headers. */ #include <stdio.h> #include <string.h> #include <errno.h> #include <stdlib.h> /* end standard C headers. */ /* flex integer type definitions */ #ifndef FLEXINT_H #define FLEXINT_H /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */ #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include <inttypes.h> typedef int8_t flex_int8_t; typedef uint8_t flex_uint8_t; typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; #else typedef signed char flex_int8_t; typedef short int flex_int16_t; typedef int flex_int32_t; typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; /* Limits of integral types. */ #ifndef INT8_MIN #define INT8_MIN (-128) #endif #ifndef INT16_MIN #define INT16_MIN (-32767-1) #endif #ifndef INT32_MIN #define INT32_MIN (-2147483647-1) #endif #ifndef INT8_MAX #define INT8_MAX (127) #endif #ifndef INT16_MAX #define INT16_MAX (32767) #endif #ifndef INT32_MAX #define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX #define UINT8_MAX (255U) #endif #ifndef UINT16_MAX #define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX #define UINT32_MAX (4294967295U) #endif #endif /* ! C99 */ #endif /* ! FLEXINT_H */ #ifdef __cplusplus /* The "const" storage-class-modifier is valid. */ #define YY_USE_CONST #else /* ! __cplusplus */ /* C99 requires __STDC__ to be defined as 1. */ #if defined (__STDC__) #define YY_USE_CONST #endif /* defined (__STDC__) */ #endif /* ! __cplusplus */ #ifdef YY_USE_CONST #define yyconst const #else #define yyconst #endif /* Returned upon end-of-file. */ #define YY_NULL 0 /* Promotes a possibly negative, possibly signed char to an unsigned * integer for use as an array index. If the signed char is negative, * we want to instead treat it as an 8-bit unsigned char, hence the * double cast. */ #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) /* Enter a start condition. This macro really ought to take a parameter, * but we do it the disgusting crufty way forced on us by the ()-less * definition of BEGIN. */ #define BEGIN (yy_start) = 1 + 2 * /* Translate the current start state into a value that can be later handed * to BEGIN to return to the state. The YYSTATE alias is for lex * compatibility. */ #define YY_START (((yy_start) - 1) / 2) #define YYSTATE YY_START /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) /* Special action meaning "start processing a new file". */ #define YY_NEW_FILE langdef_restart(langdef_in ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ #ifndef YY_BUF_SIZE #ifdef __ia64__ /* On IA-64, the buffer size is 16k, not 8k. * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. * Ditto for the __ia64__ case accordingly. */ #define YY_BUF_SIZE 32768 #else #define YY_BUF_SIZE 16384 #endif /* __ia64__ */ #endif /* The state buf must be large enough to hold one state per character in the main buffer. */ #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) #ifndef YY_TYPEDEF_YY_BUFFER_STATE #define YY_TYPEDEF_YY_BUFFER_STATE typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif extern int langdef_leng; extern FILE *langdef_in, *langdef_out; #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 #define YY_LESS_LINENO(n) /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ do \ { \ /* Undo effects of setting up langdef_text. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ *yy_cp = (yy_hold_char); \ YY_RESTORE_YY_MORE_OFFSET \ (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ YY_DO_BEFORE_ACTION; /* set up langdef_text again */ \ } \ while ( 0 ) #define unput(c) yyunput( c, (yytext_ptr) ) #ifndef YY_TYPEDEF_YY_SIZE_T #define YY_TYPEDEF_YY_SIZE_T typedef size_t yy_size_t; #endif #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state { FILE *yy_input_file; char *yy_ch_buf; /* input buffer */ char *yy_buf_pos; /* current position in input buffer */ /* Size of input buffer in bytes, not including room for EOB * characters. */ yy_size_t yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. */ int yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to * delete it. */ int yy_is_our_buffer; /* Whether this is an "interactive" input source; if so, and * if we're using stdio for input, then we want to use getc() * instead of fread(), to make sure we stop fetching input after * each newline. */ int yy_is_interactive; /* Whether we're considered to be at the beginning of a line. * If so, '^' rules will be active on the next match, otherwise * not. */ int yy_at_bol; int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ /* Whether to try to fill the input buffer when we reach the * end of it. */ int yy_fill_buffer; int yy_buffer_status; #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 /* When an EOF's been seen but there's still some text to process * then we mark the buffer as YY_EOF_PENDING, to indicate that we * shouldn't try reading from the input source any more. We might * still have a bunch of tokens to match, though, because of * possible backing-up. * * When we actually see the EOF, we change the status to "new" * (via langdef_restart()), so that the user can continue scanning by * just pointing langdef_in at a new input file. */ #define YY_BUFFER_EOF_PENDING 2 }; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ /* Stack of input buffers. */ static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ /* We provide macros for accessing buffer states in case in the * future we want to put the buffer states in a more general * "scanner state". * * Returns the top of the stack, or NULL. */ #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ : NULL) /* Same as previous macro, but useful when we know that the buffer stack is not * NULL or when we need an lvalue. For internal use only. */ #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] /* yy_hold_char holds the character lost when langdef_text is formed. */ static char yy_hold_char; static int yy_n_chars; /* number of characters read into yy_ch_buf */ int langdef_leng; /* Points to current character in buffer. */ static char *yy_c_buf_p = (char *) 0; static int yy_init = 0; /* whether we need to initialize */ static int yy_start = 0; /* start state number */ /* Flag which is used to allow langdef_wrap()'s to do buffer switches * instead of setting up a fresh langdef_in. A bit of a hack ... */ static int yy_did_buffer_switch_on_eof; void langdef_restart (FILE *input_file ); void langdef__switch_to_buffer (YY_BUFFER_STATE new_buffer ); YY_BUFFER_STATE langdef__create_buffer (FILE *file,int size ); void langdef__delete_buffer (YY_BUFFER_STATE b ); void langdef__flush_buffer (YY_BUFFER_STATE b ); void langdef_push_buffer_state (YY_BUFFER_STATE new_buffer ); void langdef_pop_buffer_state (void ); static void langdef_ensure_buffer_stack (void ); static void langdef__load_buffer_state (void ); static void langdef__init_buffer (YY_BUFFER_STATE b,FILE *file ); #define YY_FLUSH_BUFFER langdef__flush_buffer(YY_CURRENT_BUFFER ) YY_BUFFER_STATE langdef__scan_buffer (char *base,yy_size_t size ); YY_BUFFER_STATE langdef__scan_string (yyconst char *yy_str ); YY_BUFFER_STATE langdef__scan_bytes (yyconst char *bytes,int len ); void *langdef_alloc (yy_size_t ); void *langdef_realloc (void *,yy_size_t ); void langdef_free (void * ); #define yy_new_buffer langdef__create_buffer #define yy_set_interactive(is_interactive) \ { \ if ( ! YY_CURRENT_BUFFER ){ \ langdef_ensure_buffer_stack (); \ YY_CURRENT_BUFFER_LVALUE = \ langdef__create_buffer(langdef_in,YY_BUF_SIZE ); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ } #define yy_set_bol(at_bol) \ { \ if ( ! YY_CURRENT_BUFFER ){\ langdef_ensure_buffer_stack (); \ YY_CURRENT_BUFFER_LVALUE = \ langdef__create_buffer(langdef_in,YY_BUF_SIZE ); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ } #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) /* Begin user sect3 */ #define langdef_wrap(n) 1 #define YY_SKIP_YYWRAP typedef unsigned char YY_CHAR; FILE *langdef_in = (FILE *) 0, *langdef_out = (FILE *) 0; typedef int yy_state_type; extern int langdef_lineno; int langdef_lineno = 1; extern char *langdef_text; #define yytext_ptr langdef_text static yy_state_type yy_get_previous_state (void ); static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); static int yy_get_next_buffer (void ); static void yy_fatal_error (yyconst char msg[] ); /* Done after the current pattern has been matched and before the * corresponding action - sets up langdef_text. */ #define YY_DO_BEFORE_ACTION \ (yytext_ptr) = yy_bp; \ langdef_leng = (size_t) (yy_cp - yy_bp); \ (yy_hold_char) = *yy_cp; \ *yy_cp = '\0'; \ (yy_c_buf_p) = yy_cp; #define YY_NUM_RULES 58 #define YY_END_OF_BUFFER 59 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info { flex_int32_t yy_verify; flex_int32_t yy_nxt; }; static yyconst flex_int16_t yy_accept[164] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 59, 57, 1, 55, 2, 31, 3, 57, 40, 29, 30, 28, 27, 56, 26, 57, 25, 48, 25, 25, 25, 25, 25, 25, 25, 25, 25, 4, 1, 5, 2, 38, 39, 2, 37, 32, 38, 46, 47, 2, 45, 41, 46, 53, 54, 2, 49, 53, 52, 58, 1, 2, 58, 23, 56, 0, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 36, 35, 34, 33, 44, 43, 42, 50, 51, 0, 23, 0, 25, 25, 7, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 22, 24, 25, 25, 25, 25, 16, 25, 25, 25, 25, 25, 25, 25, 25, 25, 6, 11, 25, 25, 25, 25, 25, 25, 25, 18, 12, 9, 19, 25, 25, 13, 25, 25, 25, 14, 25, 17, 25, 15, 21, 25, 25, 25, 25, 25, 25, 10, 25, 25, 25, 8, 25, 20, 0 } ; static yyconst flex_int32_t yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 5, 6, 7, 1, 1, 8, 9, 10, 11, 12, 13, 1, 14, 1, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 1, 1, 1, 16, 1, 17, 18, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 20, 21, 22, 23, 19, 24, 25, 26, 27, 28, 29, 30, 31, 19, 32, 19, 19, 33, 34, 35, 36, 37, 19, 38, 39, 40, 41, 42, 19, 43, 19, 19, 44, 45, 46, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } ; static yyconst flex_int32_t yy_meta[47] = { 0, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 4, 1, 1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1 } ; static yyconst flex_int16_t yy_base[173] = { 0, 0, 0, 45, 48, 50, 94, 71, 115, 62, 106, 80, 86, 235, 236, 236, 236, 236, 236, 236, 0, 236, 236, 236, 236, 236, 219, 236, 189, 0, 236, 203, 202, 86, 195, 188, 27, 199, 36, 202, 236, 236, 236, 236, 236, 236, 236, 236, 236, 126, 236, 236, 236, 236, 236, 92, 236, 236, 236, 236, 57, 236, 236, 236, 236, 0, 0, 211, 210, 0, 193, 190, 92, 195, 189, 193, 186, 179, 182, 188, 190, 188, 175, 236, 236, 236, 236, 236, 236, 236, 236, 236, 207, 0, 165, 178, 177, 0, 176, 182, 166, 172, 164, 163, 163, 172, 55, 161, 167, 236, 236, 135, 135, 130, 130, 141, 124, 132, 134, 133, 131, 120, 130, 118, 128, 0, 0, 120, 126, 121, 125, 119, 123, 115, 0, 0, 0, 0, 119, 113, 0, 113, 116, 112, 0, 104, 0, 108, 0, 0, 104, 105, 106, 103, 88, 91, 0, 90, 62, 45, 0, 40, 0, 236, 171, 175, 179, 183, 187, 54, 189, 193, 195 } ; static yyconst flex_int16_t yy_def[173] = { 0, 163, 1, 164, 164, 165, 165, 166, 166, 167, 167, 168, 168, 163, 163, 163, 163, 163, 163, 163, 169, 163, 163, 163, 163, 163, 163, 163, 163, 170, 163, 170, 170, 170, 170, 170, 170, 170, 170, 170, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 171, 172, 163, 163, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 163, 163, 163, 163, 163, 163, 163, 163, 163, 171, 172, 163, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 163, 163, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 0, 163, 163, 163, 163, 163, 163, 163, 163, 163 } ; static yyconst flex_int16_t yy_nxt[283] = { 0, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 14, 24, 25, 14, 26, 27, 14, 28, 29, 14, 14, 14, 14, 30, 29, 31, 29, 32, 33, 29, 29, 34, 29, 35, 36, 29, 29, 37, 38, 29, 29, 39, 29, 14, 14, 14, 41, 42, 43, 41, 42, 43, 45, 46, 47, 77, 48, 66, 48, 48, 48, 48, 78, 48, 57, 58, 48, 48, 162, 48, 49, 48, 48, 51, 52, 80, 81, 90, 53, 59, 91, 63, 60, 64, 65, 61, 161, 63, 54, 64, 65, 55, 121, 48, 122, 48, 45, 46, 47, 87, 48, 160, 48, 48, 48, 48, 88, 48, 57, 58, 48, 48, 89, 48, 49, 48, 48, 51, 52, 97, 72, 159, 53, 59, 73, 158, 60, 157, 74, 61, 83, 156, 54, 98, 155, 55, 154, 48, 153, 48, 84, 152, 151, 150, 149, 148, 85, 147, 146, 145, 144, 143, 142, 141, 140, 139, 138, 137, 136, 135, 134, 133, 132, 131, 130, 129, 128, 127, 126, 125, 86, 40, 40, 40, 40, 44, 44, 44, 44, 50, 50, 50, 50, 56, 56, 56, 56, 62, 62, 62, 62, 69, 69, 92, 124, 92, 92, 93, 93, 123, 120, 119, 118, 117, 116, 115, 114, 113, 112, 111, 110, 109, 108, 107, 106, 105, 104, 103, 102, 101, 100, 99, 96, 95, 94, 67, 82, 79, 76, 75, 71, 70, 68, 67, 163, 13, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163 } ; static yyconst flex_int16_t yy_chk[283] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 4, 4, 4, 5, 5, 5, 36, 5, 169, 5, 5, 5, 5, 36, 5, 9, 9, 5, 5, 161, 5, 5, 5, 5, 7, 7, 38, 38, 60, 7, 9, 60, 11, 9, 11, 11, 9, 159, 12, 7, 12, 12, 7, 106, 5, 106, 5, 6, 6, 6, 55, 6, 158, 6, 6, 6, 6, 55, 6, 10, 10, 6, 6, 55, 6, 6, 6, 6, 8, 8, 72, 33, 157, 8, 10, 33, 155, 10, 154, 33, 10, 49, 153, 8, 72, 152, 8, 151, 6, 150, 6, 49, 147, 145, 143, 142, 141, 49, 139, 138, 133, 132, 131, 130, 129, 128, 127, 124, 123, 122, 121, 120, 119, 118, 117, 116, 115, 114, 113, 112, 111, 49, 164, 164, 164, 164, 165, 165, 165, 165, 166, 166, 166, 166, 167, 167, 167, 167, 168, 168, 168, 168, 170, 170, 171, 108, 171, 171, 172, 172, 107, 105, 104, 103, 102, 101, 100, 99, 98, 96, 95, 94, 92, 82, 81, 80, 79, 78, 77, 76, 75, 74, 73, 71, 70, 68, 67, 39, 37, 35, 34, 32, 31, 28, 26, 13, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163 } ; static yy_state_type yy_last_accepting_state; static char *yy_last_accepting_cpos; extern int langdef__flex_debug; int langdef__flex_debug = 0; /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. */ #define REJECT reject_used_but_not_detected #define yymore() yymore_used_but_not_detected #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET char *langdef_text; #line 1 "../../../lib/srchilite/langdefscanner.ll" #line 2 "../../../lib/srchilite/langdefscanner.ll" /* * Copyright (C) 1999-2009, Lorenzo Bettini, http://www.lorenzobettini.it * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ #include <cstdlib> #include <sstream> #include "stringdef.h" #include "stringtable.h" #include "langdefparser.h" #include "langdefscanner.h" #include "fileutil.h" #include "regexpreprocessor.h" #include "ioexception.h" #include <stack> //#define DEBUG_SCANNER #ifdef DEBUG_SCANNER #include <iostream> // for debug #define DEB(s) std::cerr << s << std::endl; #define DEB2(s,s2) std::cerr << s << ": " << s2 << std::endl; #else #define DEB(s) #define DEB2(s,s2) #endif //using srchilite::StringDef; //using namespace srchilite; static std::ostringstream buff; static srchilite::StringTable *stringTable = 0; static void buffer(const char *s); static void buffer_escape(const char *c); static const std::string *flush_buffer(); static srchilite::StringDef *flush_buffer_preproc(); static void open_include_file(const char *file); static void close_include_file(); srchilite::ParseStructPtr parsestruct; typedef std::stack<srchilite::ParseStructPtr> ParseStructStack; static ParseStructStack parsestructstack; void updateTokenInfo() { langdef_lloc.first_line = parsestruct->line ; } #line 668 "../../../lib/srchilite/langdefscanner.cc" #define INITIAL 0 #define COMMENT_STATE 1 #define STRING_STATE 2 #define REGEXP_STATE 3 #define REGEXP_NOPREPROC_STATE 4 #define INCLUDE_STATE 5 #ifndef YY_NO_UNISTD_H /* Special case for "unistd.h", since it is non-ANSI. We include it way * down here because we want the user's section 1 to have been scanned first. * The user has a chance to override it with an option. */ #include <unistd.h> #endif #ifndef YY_EXTRA_TYPE #define YY_EXTRA_TYPE void * #endif static int yy_init_globals (void ); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ int langdef_lex_destroy (void ); int langdef_get_debug (void ); void langdef_set_debug (int debug_flag ); YY_EXTRA_TYPE langdef_get_extra (void ); void langdef_set_extra (YY_EXTRA_TYPE user_defined ); FILE *langdef_get_in (void ); void langdef_set_in (FILE * in_str ); FILE *langdef_get_out (void ); void langdef_set_out (FILE * out_str ); int langdef_get_leng (void ); char *langdef_get_text (void ); int langdef_get_lineno (void ); void langdef_set_lineno (int line_number ); /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus extern "C" int langdef_wrap (void ); #else extern int langdef_wrap (void ); #endif #endif static void yyunput (int c,char *buf_ptr ); #ifndef yytext_ptr static void yy_flex_strncpy (char *,yyconst char *,int ); #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * ); #endif #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (void ); #else static int input (void ); #endif #endif /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE #ifdef __ia64__ /* On IA-64, the buffer size is 16k, not 8k */ #define YY_READ_BUF_SIZE 16384 #else #define YY_READ_BUF_SIZE 8192 #endif /* __ia64__ */ #endif /* Copy whatever the last rule matched to the standard output. */ #ifndef ECHO /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ #define ECHO do { if (fwrite( langdef_text, langdef_leng, 1, langdef_out )) {} } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, * is returned in "result". */ #ifndef YY_INPUT #define YY_INPUT(buf,result,max_size) \ if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ size_t n; \ for ( n = 0; n < max_size && \ (c = getc( langdef_in )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ if ( c == '\n' ) \ buf[n++] = (char) c; \ if ( c == EOF && ferror( langdef_in ) ) \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ result = n; \ } \ else \ { \ errno=0; \ while ( (result = fread(buf, 1, max_size, langdef_in))==0 && ferror(langdef_in)) \ { \ if( errno != EINTR) \ { \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ break; \ } \ errno=0; \ clearerr(langdef_in); \ } \ }\ \ #endif /* No semi-colon after return; correct usage is to write "yyterminate();" - * we don't want an extra ';' after the "return" because that will cause * some compilers to complain about unreachable statements. */ #ifndef yyterminate #define yyterminate() return YY_NULL #endif /* Number of entries by which start-condition stack grows. */ #ifndef YY_START_STACK_INCR #define YY_START_STACK_INCR 25 #endif /* Report a fatal error. */ #ifndef YY_FATAL_ERROR #define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) #endif /* end tables serialization structures and prototypes */ /* Default declaration of generated scanner - a define so the user can * easily add parameters. */ #ifndef YY_DECL #define YY_DECL_IS_OURS 1 extern int langdef_lex (void); #define YY_DECL int langdef_lex (void) #endif /* !YY_DECL */ /* Code executed at the beginning of each rule, after langdef_text and langdef_leng * have been set up. */ #ifndef YY_USER_ACTION #define YY_USER_ACTION #endif /* Code executed at the end of each rule. */ #ifndef YY_BREAK #define YY_BREAK break; #endif #define YY_RULE_SETUP \ YY_USER_ACTION /** The main scanner function which does all the work. */ YY_DECL { register yy_state_type yy_current_state; register char *yy_cp, *yy_bp; register int yy_act; #line 86 "../../../lib/srchilite/langdefscanner.ll" #line 863 "../../../lib/srchilite/langdefscanner.cc" if ( !(yy_init) ) { (yy_init) = 1; #ifdef YY_USER_INIT YY_USER_INIT; #endif if ( ! (yy_start) ) (yy_start) = 1; /* first start state */ if ( ! langdef_in ) langdef_in = stdin; if ( ! langdef_out ) langdef_out = stdout; if ( ! YY_CURRENT_BUFFER ) { langdef_ensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = langdef__create_buffer(langdef_in,YY_BUF_SIZE ); } langdef__load_buffer_state( ); } while ( 1 ) /* loops until end-of-file is reached */ { yy_cp = (yy_c_buf_p); /* Support of langdef_text. */ *yy_cp = (yy_hold_char); /* yy_bp points to the position in yy_ch_buf of the start of * the current run. */ yy_bp = yy_cp; yy_current_state = (yy_start); yy_match: do { register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 164 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ++yy_cp; } while ( yy_base[yy_current_state] != 236 ); yy_find_action: yy_act = yy_accept[yy_current_state]; if ( yy_act == 0 ) { /* have to back up */ yy_cp = (yy_last_accepting_cpos); yy_current_state = (yy_last_accepting_state); yy_act = yy_accept[yy_current_state]; } YY_DO_BEFORE_ACTION; do_action: /* This label is used only to access EOF actions. */ switch ( yy_act ) { /* beginning of action switch */ case 0: /* must back up */ /* undo the effects of YY_DO_BEFORE_ACTION */ *yy_cp = (yy_hold_char); yy_cp = (yy_last_accepting_cpos); yy_current_state = (yy_last_accepting_state); goto yy_find_action; case 1: YY_RULE_SETUP #line 88 "../../../lib/srchilite/langdefscanner.ll" {} YY_BREAK case 2: YY_RULE_SETUP #line 90 "../../../lib/srchilite/langdefscanner.ll" {} YY_BREAK case 3: YY_RULE_SETUP #line 92 "../../../lib/srchilite/langdefscanner.ll" { BEGIN(COMMENT_STATE); } YY_BREAK case 4: YY_RULE_SETUP #line 93 "../../../lib/srchilite/langdefscanner.ll" {} YY_BREAK case 5: /* rule 5 can match eol */ YY_RULE_SETUP #line 94 "../../../lib/srchilite/langdefscanner.ll" { ++(parsestruct->line); BEGIN(INITIAL); } YY_BREAK case 6: YY_RULE_SETUP #line 96 "../../../lib/srchilite/langdefscanner.ll" { return BEGIN_T ; } YY_BREAK case 7: YY_RULE_SETUP #line 97 "../../../lib/srchilite/langdefscanner.ll" { return END_T ; } YY_BREAK case 8: YY_RULE_SETUP #line 98 "../../../lib/srchilite/langdefscanner.ll" { return ENVIRONMENT_T; } YY_BREAK case 9: YY_RULE_SETUP #line 99 "../../../lib/srchilite/langdefscanner.ll" { return STATE_T; } YY_BREAK case 10: YY_RULE_SETUP #line 100 "../../../lib/srchilite/langdefscanner.ll" { return MULTILINE_T; } YY_BREAK case 11: YY_RULE_SETUP #line 101 "../../../lib/srchilite/langdefscanner.ll" { return DELIM_T; } YY_BREAK case 12: YY_RULE_SETUP #line 102 "../../../lib/srchilite/langdefscanner.ll" { return START_T; } YY_BREAK case 13: YY_RULE_SETUP #line 103 "../../../lib/srchilite/langdefscanner.ll" { return ESCAPE_T; } YY_BREAK case 14: YY_RULE_SETUP #line 104 "../../../lib/srchilite/langdefscanner.ll" { return NESTED_T; } YY_BREAK case 15: YY_RULE_SETUP #line 105 "../../../lib/srchilite/langdefscanner.ll" { return EXIT_ALL; } YY_BREAK case 16: YY_RULE_SETUP #line 106 "../../../lib/srchilite/langdefscanner.ll" { return EXIT_T; } YY_BREAK case 17: YY_RULE_SETUP #line 107 "../../../lib/srchilite/langdefscanner.ll" { return VARDEF_T; } YY_BREAK case 18: YY_RULE_SETUP #line 108 "../../../lib/srchilite/langdefscanner.ll" { return REDEF_T; } YY_BREAK case 19: YY_RULE_SETUP #line 109 "../../../lib/srchilite/langdefscanner.ll" { return SUBST_T; } YY_BREAK case 20: YY_RULE_SETUP #line 110 "../../../lib/srchilite/langdefscanner.ll" { return NONSENSITIVE_T; } YY_BREAK case 21: YY_RULE_SETUP #line 112 "../../../lib/srchilite/langdefscanner.ll" { BEGIN(INCLUDE_STATE); } YY_BREAK case 22: YY_RULE_SETUP #line 113 "../../../lib/srchilite/langdefscanner.ll" { DEB2("inclusion of ", langdef_text); char *file_name = &langdef_text[1]; file_name[strlen(file_name)-1] = '\0'; try { open_include_file(file_name); } catch (srchilite::IOException &e) { langdef_lval.string = stringTable->newString(e.filename); return WRONG_INCLUDE_FILE; } langdef_push_buffer_state(langdef__create_buffer(langdef_in,YY_BUF_SIZE)); BEGIN(INITIAL); } YY_BREAK case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(COMMENT_STATE): case YY_STATE_EOF(STRING_STATE): case YY_STATE_EOF(REGEXP_STATE): case YY_STATE_EOF(REGEXP_NOPREPROC_STATE): case YY_STATE_EOF(INCLUDE_STATE): #line 131 "../../../lib/srchilite/langdefscanner.ll" { DEB("END OF FILE"); fclose(langdef_in); langdef_in = 0; langdef_pop_buffer_state(); if ( !YY_CURRENT_BUFFER ) { yyterminate(); } else close_include_file(); } YY_BREAK case 23: YY_RULE_SETUP #line 146 "../../../lib/srchilite/langdefscanner.ll" { DEB2("VAR",langdef_text); langdef_lval.string = stringTable->newString(&langdef_text[1]) ; return VARUSE ; } YY_BREAK case 24: YY_RULE_SETUP #line 147 "../../../lib/srchilite/langdefscanner.ll" { DEB2("BACKREFVAR",langdef_text); langdef_lval.string = stringTable->newString(langdef_text); return BACKREFVAR ; } YY_BREAK case 25: YY_RULE_SETUP #line 152 "../../../lib/srchilite/langdefscanner.ll" { DEB2("KEY",langdef_text); langdef_lval.string = stringTable->newString(langdef_text) ; updateTokenInfo(); return KEY ; } YY_BREAK case 26: YY_RULE_SETUP #line 153 "../../../lib/srchilite/langdefscanner.ll" { return '=' ; } YY_BREAK case 27: YY_RULE_SETUP #line 154 "../../../lib/srchilite/langdefscanner.ll" { return ',' ; } YY_BREAK case 28: YY_RULE_SETUP #line 155 "../../../lib/srchilite/langdefscanner.ll" { return '+' ; } YY_BREAK case 29: YY_RULE_SETUP #line 156 "../../../lib/srchilite/langdefscanner.ll" { updateTokenInfo(); return '(' ; } YY_BREAK case 30: YY_RULE_SETUP #line 157 "../../../lib/srchilite/langdefscanner.ll" { return ')' ; } YY_BREAK case 31: YY_RULE_SETUP #line 159 "../../../lib/srchilite/langdefscanner.ll" { BEGIN(STRING_STATE) ; } YY_BREAK case 32: YY_RULE_SETUP #line 160 "../../../lib/srchilite/langdefscanner.ll" { buffer_escape( langdef_text ) ; } YY_BREAK case 33: YY_RULE_SETUP #line 161 "../../../lib/srchilite/langdefscanner.ll" { buffer( langdef_text ) ; } YY_BREAK case 34: YY_RULE_SETUP #line 162 "../../../lib/srchilite/langdefscanner.ll" { buffer( langdef_text ) ; } YY_BREAK case 35: YY_RULE_SETUP #line 163 "../../../lib/srchilite/langdefscanner.ll" { return WRONG_BACKREFERENCE ; } YY_BREAK case 36: YY_RULE_SETUP #line 166 "../../../lib/srchilite/langdefscanner.ll" { buffer( langdef_text ) ; } YY_BREAK case 37: YY_RULE_SETUP #line 167 "../../../lib/srchilite/langdefscanner.ll" { BEGIN(INITIAL) ; langdef_lval.string = flush_buffer() ; DEB2("STRINGDEF",langdef_lval.string); return STRINGDEF; } YY_BREAK case 38: YY_RULE_SETUP #line 168 "../../../lib/srchilite/langdefscanner.ll" { buffer( langdef_text ) ; } YY_BREAK case 39: /* rule 39 can match eol */ YY_RULE_SETUP #line 169 "../../../lib/srchilite/langdefscanner.ll" { DEB("NEWLINE"); ++(parsestruct->line) ; } YY_BREAK case 40: YY_RULE_SETUP #line 171 "../../../lib/srchilite/langdefscanner.ll" { BEGIN(REGEXP_STATE) ; } YY_BREAK case 41: YY_RULE_SETUP #line 172 "../../../lib/srchilite/langdefscanner.ll" { buffer_escape( langdef_text ) ; } YY_BREAK case 42: YY_RULE_SETUP #line 173 "../../../lib/srchilite/langdefscanner.ll" { buffer( langdef_text ) ; } YY_BREAK case 43: YY_RULE_SETUP #line 174 "../../../lib/srchilite/langdefscanner.ll" { return WRONG_BACKREFERENCE ; } YY_BREAK case 44: YY_RULE_SETUP #line 177 "../../../lib/srchilite/langdefscanner.ll" { buffer( "'" ) ; } YY_BREAK case 45: YY_RULE_SETUP #line 178 "../../../lib/srchilite/langdefscanner.ll" { BEGIN(INITIAL) ; langdef_lval.stringdef = flush_buffer_preproc() ; DEB2("REGEXPDEF",langdef_lval.string); return REGEXPDEF; } YY_BREAK case 46: YY_RULE_SETUP #line 179 "../../../lib/srchilite/langdefscanner.ll" { buffer( langdef_text ) ; } YY_BREAK case 47: /* rule 47 can match eol */ YY_RULE_SETUP #line 180 "../../../lib/srchilite/langdefscanner.ll" { DEB("NEWLINE"); ++(parsestruct->line) ; } YY_BREAK case 48: YY_RULE_SETUP #line 182 "../../../lib/srchilite/langdefscanner.ll" { BEGIN(REGEXP_NOPREPROC_STATE) ; } YY_BREAK case 49: YY_RULE_SETUP #line 183 "../../../lib/srchilite/langdefscanner.ll" { buffer_escape( langdef_text ) ; } YY_BREAK case 50: YY_RULE_SETUP #line 184 "../../../lib/srchilite/langdefscanner.ll" { buffer( langdef_text ) ; } YY_BREAK case 51: YY_RULE_SETUP #line 185 "../../../lib/srchilite/langdefscanner.ll" { buffer( "'" ) ; } YY_BREAK case 52: YY_RULE_SETUP #line 186 "../../../lib/srchilite/langdefscanner.ll" { BEGIN(INITIAL) ; langdef_lval.string = flush_buffer() ; DEB2("REGEXPNOPREPROCDEF",langdef_lval.string); return REGEXPNOPREPROC; } YY_BREAK case 53: YY_RULE_SETUP #line 187 "../../../lib/srchilite/langdefscanner.ll" { buffer( langdef_text ) ; } YY_BREAK case 54: /* rule 54 can match eol */ YY_RULE_SETUP #line 188 "../../../lib/srchilite/langdefscanner.ll" { DEB("NEWLINE"); ++(parsestruct->line) ; } YY_BREAK case 55: /* rule 55 can match eol */ YY_RULE_SETUP #line 190 "../../../lib/srchilite/langdefscanner.ll" { DEB("NEWLINE"); ++(parsestruct->line) ; } YY_BREAK case 56: YY_RULE_SETUP #line 192 "../../../lib/srchilite/langdefscanner.ll" { langdef_lval.level = atoi(langdef_text); return LEVEL ; } YY_BREAK case 57: YY_RULE_SETUP #line 194 "../../../lib/srchilite/langdefscanner.ll" { return langdef_text[0] ; } YY_BREAK case 58: YY_RULE_SETUP #line 196 "../../../lib/srchilite/langdefscanner.ll" ECHO; YY_BREAK #line 1287 "../../../lib/srchilite/langdefscanner.cc" case YY_END_OF_BUFFER: { /* Amount of text matched not including the EOB char. */ int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; /* Undo the effects of YY_DO_BEFORE_ACTION. */ *yy_cp = (yy_hold_char); YY_RESTORE_YY_MORE_OFFSET if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) { /* We're scanning a new file or input source. It's * possible that this happened because the user * just pointed langdef_in at a new source and called * langdef_lex(). If so, then we have to assure * consistency between YY_CURRENT_BUFFER and our * globals. Here is the right place to do so, because * this is the first action (other than possibly a * back-up) that will match for the new input source. */ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; YY_CURRENT_BUFFER_LVALUE->yy_input_file = langdef_in; YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; } /* Note that here we test for yy_c_buf_p "<=" to the position * of the first EOB in the buffer, since yy_c_buf_p will * already have been incremented past the NUL character * (since all states make transitions on EOB to the * end-of-buffer state). Contrast this with the test * in input(). */ if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) { /* This was really a NUL. */ yy_state_type yy_next_state; (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state( ); /* Okay, we're now positioned to make the NUL * transition. We couldn't have * yy_get_previous_state() go ahead and do it * for us because it doesn't know how to deal * with the possibility of jamming (and we don't * want to build jamming into it because then it * will run more slowly). */ yy_next_state = yy_try_NUL_trans( yy_current_state ); yy_bp = (yytext_ptr) + YY_MORE_ADJ; if ( yy_next_state ) { /* Consume the NUL. */ yy_cp = ++(yy_c_buf_p); yy_current_state = yy_next_state; goto yy_match; } else { yy_cp = (yy_c_buf_p); goto yy_find_action; } } else switch ( yy_get_next_buffer( ) ) { case EOB_ACT_END_OF_FILE: { (yy_did_buffer_switch_on_eof) = 0; if ( langdef_wrap( ) ) { /* Note: because we've taken care in * yy_get_next_buffer() to have set up * langdef_text, we can now set up * yy_c_buf_p so that if some total * hoser (like flex itself) wants to * call the scanner after we return the * YY_NULL, it'll still work - another * YY_NULL will get returned. */ (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; yy_act = YY_STATE_EOF(YY_START); goto do_action; } else { if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; } break; } case EOB_ACT_CONTINUE_SCAN: (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state( ); yy_cp = (yy_c_buf_p); yy_bp = (yytext_ptr) + YY_MORE_ADJ; goto yy_match; case EOB_ACT_LAST_MATCH: (yy_c_buf_p) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; yy_current_state = yy_get_previous_state( ); yy_cp = (yy_c_buf_p); yy_bp = (yytext_ptr) + YY_MORE_ADJ; goto yy_find_action; } break; } default: YY_FATAL_ERROR( "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ } /* end of langdef_lex */ /* yy_get_next_buffer - try to read in a new buffer * * Returns a code representing an action: * EOB_ACT_LAST_MATCH - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ static int yy_get_next_buffer (void) { register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; register char *source = (yytext_ptr); register int number_to_move, i; int ret_val; if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) YY_FATAL_ERROR( "fatal flex scanner internal error--end of buffer missed" ); if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) { /* Don't try to fill the buffer, so this is an EOF. */ if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) { /* We matched a single character, the EOB, so * treat this as a final EOF. */ return EOB_ACT_END_OF_FILE; } else { /* We matched some text prior to the EOB, first * process it. */ return EOB_ACT_LAST_MATCH; } } /* Try to read more data. */ /* First move last chars to start of buffer. */ number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) /* don't do the read, it's not guaranteed to return an EOF, * just force an EOF */ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; else { int num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) { /* Not enough room in the buffer - grow it. */ /* just a shorter name for the current buffer */ YY_BUFFER_STATE b = YY_CURRENT_BUFFER; int yy_c_buf_p_offset = (int) ((yy_c_buf_p) - b->yy_ch_buf); if ( b->yy_is_our_buffer ) { int new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; else b->yy_buf_size *= 2; b->yy_ch_buf = (char *) /* Include room in for 2 EOB chars. */ langdef_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); } else /* Can't grow it, we don't own it. */ b->yy_ch_buf = 0; if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "fatal error - scanner input buffer overflow" ); (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; } if ( num_to_read > YY_READ_BUF_SIZE ) num_to_read = YY_READ_BUF_SIZE; /* Read in more data. */ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), (yy_n_chars), (size_t) num_to_read ); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } if ( (yy_n_chars) == 0 ) { if ( number_to_move == YY_MORE_ADJ ) { ret_val = EOB_ACT_END_OF_FILE; langdef_restart(langdef_in ); } else { ret_val = EOB_ACT_LAST_MATCH; YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_EOF_PENDING; } } else ret_val = EOB_ACT_CONTINUE_SCAN; if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { /* Extend the array by 50%, plus the number we really need. */ yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) langdef_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); } (yy_n_chars) += number_to_move; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; return ret_val; } /* yy_get_previous_state - get the state just before the EOB char was reached */ static yy_state_type yy_get_previous_state (void) { register yy_state_type yy_current_state; register char *yy_cp; yy_current_state = (yy_start); for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) { register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 164 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; } return yy_current_state; } /* yy_try_NUL_trans - try to make a transition on the NUL character * * synopsis * next_state = yy_try_NUL_trans( current_state ); */ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) { register int yy_is_jam; register char *yy_cp = (yy_c_buf_p); register YY_CHAR yy_c = 1; if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 164 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; yy_is_jam = (yy_current_state == 163); return yy_is_jam ? 0 : yy_current_state; } static void yyunput (int c, register char * yy_bp ) { register char *yy_cp; yy_cp = (yy_c_buf_p); /* undo effects of setting up langdef_text */ *yy_cp = (yy_hold_char); if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) { /* need to shift things up to make room */ /* +2 for EOB chars. */ register int number_to_move = (yy_n_chars) + 2; register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; register char *source = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) *--dest = *--source; yy_cp += (int) (dest - source); yy_bp += (int) (dest - source); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) YY_FATAL_ERROR( "flex scanner push-back overflow" ); } *--yy_cp = (char) c; (yytext_ptr) = yy_bp; (yy_hold_char) = *yy_cp; (yy_c_buf_p) = yy_cp; } #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (void) #else static int input (void) #endif { int c; *(yy_c_buf_p) = (yy_hold_char); if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) { /* yy_c_buf_p now points to the character we want to return. * If this occurs *before* the EOB characters, then it's a * valid NUL; if not, then we've hit the end of the buffer. */ if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) /* This was really a NUL. */ *(yy_c_buf_p) = '\0'; else { /* need more input */ int offset = (yy_c_buf_p) - (yytext_ptr); ++(yy_c_buf_p); switch ( yy_get_next_buffer( ) ) { case EOB_ACT_LAST_MATCH: /* This happens because yy_g_n_b() * sees that we've accumulated a * token and flags that we need to * try matching the token before * proceeding. But for input(), * there's no matching to consider. * So convert the EOB_ACT_LAST_MATCH * to EOB_ACT_END_OF_FILE. */ /* Reset buffer status. */ langdef_restart(langdef_in ); /*FALLTHROUGH*/ case EOB_ACT_END_OF_FILE: { if ( langdef_wrap( ) ) return EOF; if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; #ifdef __cplusplus return yyinput(); #else return input(); #endif } case EOB_ACT_CONTINUE_SCAN: (yy_c_buf_p) = (yytext_ptr) + offset; break; } } } c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ *(yy_c_buf_p) = '\0'; /* preserve langdef_text */ (yy_hold_char) = *++(yy_c_buf_p); return c; } #endif /* ifndef YY_NO_INPUT */ /** Immediately switch to a different input stream. * @param input_file A readable stream. * * @note This function does not reset the start condition to @c INITIAL . */ void langdef_restart (FILE * input_file ) { if ( ! YY_CURRENT_BUFFER ){ langdef_ensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = langdef__create_buffer(langdef_in,YY_BUF_SIZE ); } langdef__init_buffer(YY_CURRENT_BUFFER,input_file ); langdef__load_buffer_state( ); } /** Switch to a different input buffer. * @param new_buffer The new input buffer. * */ void langdef__switch_to_buffer (YY_BUFFER_STATE new_buffer ) { /* TODO. We should be able to replace this entire function body * with * langdef_pop_buffer_state(); * langdef_push_buffer_state(new_buffer); */ langdef_ensure_buffer_stack (); if ( YY_CURRENT_BUFFER == new_buffer ) return; if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ *(yy_c_buf_p) = (yy_hold_char); YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } YY_CURRENT_BUFFER_LVALUE = new_buffer; langdef__load_buffer_state( ); /* We don't actually know whether we did this switch during * EOF (langdef_wrap()) processing, but the only time this flag * is looked at is after langdef_wrap() is called, so it's safe * to go ahead and always set it. */ (yy_did_buffer_switch_on_eof) = 1; } static void langdef__load_buffer_state (void) { (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; langdef_in = YY_CURRENT_BUFFER_LVALUE->yy_input_file; (yy_hold_char) = *(yy_c_buf_p); } /** Allocate and initialize an input buffer state. * @param file A readable stream. * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. * * @return the allocated buffer state. */ YY_BUFFER_STATE langdef__create_buffer (FILE * file, int size ) { YY_BUFFER_STATE b; b = (YY_BUFFER_STATE) langdef_alloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in langdef__create_buffer()" ); b->yy_buf_size = size; /* yy_ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. */ b->yy_ch_buf = (char *) langdef_alloc(b->yy_buf_size + 2 ); if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in langdef__create_buffer()" ); b->yy_is_our_buffer = 1; langdef__init_buffer(b,file ); return b; } /** Destroy the buffer. * @param b a buffer created with langdef__create_buffer() * */ void langdef__delete_buffer (YY_BUFFER_STATE b ) { if ( ! b ) return; if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; if ( b->yy_is_our_buffer ) langdef_free((void *) b->yy_ch_buf ); langdef_free((void *) b ); } #ifndef __cplusplus extern int isatty (int ); #endif /* __cplusplus */ /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a langdef_restart() or at EOF. */ static void langdef__init_buffer (YY_BUFFER_STATE b, FILE * file ) { int oerrno = errno; langdef__flush_buffer(b ); b->yy_input_file = file; b->yy_fill_buffer = 1; /* If b is the current buffer, then langdef__init_buffer was _probably_ * called from langdef_restart() or through yy_get_next_buffer. * In that case, we don't want to reset the lineno or column. */ if (b != YY_CURRENT_BUFFER){ b->yy_bs_lineno = 1; b->yy_bs_column = 0; } b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; errno = oerrno; } /** Discard all buffered characters. On the next scan, YY_INPUT will be called. * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. * */ void langdef__flush_buffer (YY_BUFFER_STATE b ) { if ( ! b ) return; b->yy_n_chars = 0; /* We always need two end-of-buffer characters. The first causes * a transition to the end-of-buffer state. The second causes * a jam in that state. */ b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; b->yy_buf_pos = &b->yy_ch_buf[0]; b->yy_at_bol = 1; b->yy_buffer_status = YY_BUFFER_NEW; if ( b == YY_CURRENT_BUFFER ) langdef__load_buffer_state( ); } /** Pushes the new state onto the stack. The new state becomes * the current state. This function will allocate the stack * if necessary. * @param new_buffer The new state. * */ void langdef_push_buffer_state (YY_BUFFER_STATE new_buffer ) { if (new_buffer == NULL) return; langdef_ensure_buffer_stack(); /* This block is copied from langdef__switch_to_buffer. */ if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ *(yy_c_buf_p) = (yy_hold_char); YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } /* Only push if top exists. Otherwise, replace top. */ if (YY_CURRENT_BUFFER) (yy_buffer_stack_top)++; YY_CURRENT_BUFFER_LVALUE = new_buffer; /* copied from langdef__switch_to_buffer. */ langdef__load_buffer_state( ); (yy_did_buffer_switch_on_eof) = 1; } /** Removes and deletes the top of the stack, if present. * The next element becomes the new top. * */ void langdef_pop_buffer_state (void) { if (!YY_CURRENT_BUFFER) return; langdef__delete_buffer(YY_CURRENT_BUFFER ); YY_CURRENT_BUFFER_LVALUE = NULL; if ((yy_buffer_stack_top) > 0) --(yy_buffer_stack_top); if (YY_CURRENT_BUFFER) { langdef__load_buffer_state( ); (yy_did_buffer_switch_on_eof) = 1; } } /* Allocates the stack if it does not exist. * Guarantees space for at least one push. */ static void langdef_ensure_buffer_stack (void) { int num_to_alloc; if (!(yy_buffer_stack)) { /* First allocation is just for 2 elements, since we don't know if this * scanner will even need a stack. We use 2 instead of 1 to avoid an * immediate realloc on the next call. */ num_to_alloc = 1; (yy_buffer_stack) = (struct yy_buffer_state**)langdef_alloc (num_to_alloc * sizeof(struct yy_buffer_state*) ); if ( ! (yy_buffer_stack) ) YY_FATAL_ERROR( "out of dynamic memory in langdef_ensure_buffer_stack()" ); memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); (yy_buffer_stack_max) = num_to_alloc; (yy_buffer_stack_top) = 0; return; } if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ /* Increase the buffer to prepare for a possible push. */ int grow_size = 8 /* arbitrary grow size */; num_to_alloc = (yy_buffer_stack_max) + grow_size; (yy_buffer_stack) = (struct yy_buffer_state**)langdef_realloc ((yy_buffer_stack), num_to_alloc * sizeof(struct yy_buffer_state*) ); if ( ! (yy_buffer_stack) ) YY_FATAL_ERROR( "out of dynamic memory in langdef_ensure_buffer_stack()" ); /* zero only the new slots.*/ memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); (yy_buffer_stack_max) = num_to_alloc; } } /** Setup the input buffer state to scan directly from a user-specified character buffer. * @param base the character buffer * @param size the size in bytes of the character buffer * * @return the newly allocated buffer state object. */ YY_BUFFER_STATE langdef__scan_buffer (char * base, yy_size_t size ) { YY_BUFFER_STATE b; if ( size < 2 || base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) /* They forgot to leave room for the EOB's. */ return 0; b = (YY_BUFFER_STATE) langdef_alloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in langdef__scan_buffer()" ); b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ b->yy_buf_pos = b->yy_ch_buf = base; b->yy_is_our_buffer = 0; b->yy_input_file = 0; b->yy_n_chars = b->yy_buf_size; b->yy_is_interactive = 0; b->yy_at_bol = 1; b->yy_fill_buffer = 0; b->yy_buffer_status = YY_BUFFER_NEW; langdef__switch_to_buffer(b ); return b; } /** Setup the input buffer state to scan a string. The next call to langdef_lex() will * scan from a @e copy of @a str. * @param yystr a NUL-terminated string to scan * * @return the newly allocated buffer state object. * @note If you want to scan bytes that may contain NUL values, then use * langdef__scan_bytes() instead. */ YY_BUFFER_STATE langdef__scan_string (yyconst char * yystr ) { return langdef__scan_bytes(yystr,strlen(yystr) ); } /** Setup the input buffer state to scan the given bytes. The next call to langdef_lex() will * scan from a @e copy of @a bytes. * @param yybytes the byte buffer to scan * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. * * @return the newly allocated buffer state object. */ YY_BUFFER_STATE langdef__scan_bytes (yyconst char * yybytes, int _yybytes_len ) { YY_BUFFER_STATE b; char *buf; yy_size_t n; int i; /* Get memory for full buffer, including space for trailing EOB's. */ n = _yybytes_len + 2; buf = (char *) langdef_alloc(n ); if ( ! buf ) YY_FATAL_ERROR( "out of dynamic memory in langdef__scan_bytes()" ); for ( i = 0; i < _yybytes_len; ++i ) buf[i] = yybytes[i]; buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; b = langdef__scan_buffer(buf,n ); if ( ! b ) YY_FATAL_ERROR( "bad buffer in langdef__scan_bytes()" ); /* It's okay to grow etc. this buffer, and we should throw it * away when we're done. */ b->yy_is_our_buffer = 1; return b; } #ifndef YY_EXIT_FAILURE #define YY_EXIT_FAILURE 2 #endif static void yy_fatal_error (yyconst char* msg ) { (void) fprintf( stderr, "%s\n", msg ); exit( YY_EXIT_FAILURE ); } /* Redefine yyless() so it works in section 3 code. */ #undef yyless #define yyless(n) \ do \ { \ /* Undo effects of setting up langdef_text. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ langdef_text[langdef_leng] = (yy_hold_char); \ (yy_c_buf_p) = langdef_text + yyless_macro_arg; \ (yy_hold_char) = *(yy_c_buf_p); \ *(yy_c_buf_p) = '\0'; \ langdef_leng = yyless_macro_arg; \ } \ while ( 0 ) /* Accessor methods (get/set functions) to struct members. */ /** Get the current line number. * */ int langdef_get_lineno (void) { return langdef_lineno; } /** Get the input stream. * */ FILE *langdef_get_in (void) { return langdef_in; } /** Get the output stream. * */ FILE *langdef_get_out (void) { return langdef_out; } /** Get the length of the current token. * */ int langdef_get_leng (void) { return langdef_leng; } /** Get the current token. * */ char *langdef_get_text (void) { return langdef_text; } /** Set the current line number. * @param line_number * */ void langdef_set_lineno (int line_number ) { langdef_lineno = line_number; } /** Set the input stream. This does not discard the current * input buffer. * @param in_str A readable stream. * * @see langdef__switch_to_buffer */ void langdef_set_in (FILE * in_str ) { langdef_in = in_str ; } void langdef_set_out (FILE * out_str ) { langdef_out = out_str ; } int langdef_get_debug (void) { return langdef__flex_debug; } void langdef_set_debug (int bdebug ) { langdef__flex_debug = bdebug ; } static int yy_init_globals (void) { /* Initialization is the same as for the non-reentrant scanner. * This function is called from langdef_lex_destroy(), so don't allocate here. */ (yy_buffer_stack) = 0; (yy_buffer_stack_top) = 0; (yy_buffer_stack_max) = 0; (yy_c_buf_p) = (char *) 0; (yy_init) = 0; (yy_start) = 0; /* Defined in main.c */ #ifdef YY_STDINIT langdef_in = stdin; langdef_out = stdout; #else langdef_in = (FILE *) 0; langdef_out = (FILE *) 0; #endif /* For future reference: Set errno on error, since we are called by * langdef_lex_init() */ return 0; } /* langdef_lex_destroy is for both reentrant and non-reentrant scanners. */ int langdef_lex_destroy (void) { /* Pop the buffer stack, destroying each element. */ while(YY_CURRENT_BUFFER){ langdef__delete_buffer(YY_CURRENT_BUFFER ); YY_CURRENT_BUFFER_LVALUE = NULL; langdef_pop_buffer_state(); } /* Destroy the stack itself. */ langdef_free((yy_buffer_stack) ); (yy_buffer_stack) = NULL; /* Reset the globals. This is important in a non-reentrant scanner so the next time * langdef_lex() is called, initialization will occur. */ yy_init_globals( ); return 0; } /* * Internal utility routines. */ #ifndef yytext_ptr static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) { register int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * s ) { register int n; for ( n = 0; s[n]; ++n ) ; return n; } #endif void *langdef_alloc (yy_size_t size ) { return (void *) malloc( size ); } void *langdef_realloc (void * ptr, yy_size_t size ) { /* The cast to (char *) in the following accommodates both * implementations that use char* generic pointers, and those * that use void* generic pointers. It works with the latter * because both ANSI C and C++ allow castless assignment from * any pointer type to void*, and deal with argument conversions * as though doing an assignment. */ return (void *) realloc( (char *) ptr, size ); } void langdef_free (void * ptr ) { free( (char *) ptr ); /* see langdef_realloc() for (char *) cast */ } #define YYTABLES_NAME "yytables" #line 196 "../../../lib/srchilite/langdefscanner.ll" void buffer(const char *s) { buff << s; } void buffer_escape(const char *s) { buff << "\\" << s; } const std::string *flush_buffer() { const std::string *ret = stringTable->newString(buff.str()); buff.str(""); return ret; } srchilite::StringDef *flush_buffer_preproc() { srchilite::StringDef *sd = new srchilite::StringDef (srchilite::RegexPreProcessor::preprocess(buff.str()), buff.str()); buff.str(""); return sd; } void _open_file_to_scan(const string &path, const string &name) { langdef_in = srchilite::open_data_file_stream(path, name); } void open_include_file(const char *name) { string file_name = name; string path = parsestruct->path; if (! srchilite::contains_path(name) && srchilite::contains_path(parsestruct->file_name)) path = srchilite::get_file_path(parsestruct->file_name); parsestructstack.push(parsestruct); parsestruct = srchilite::ParseStructPtr(new srchilite::ParseStruct(path, file_name)); _open_file_to_scan(path.c_str(), file_name.c_str()); } void close_include_file() { parsestruct = parsestructstack.top(); parsestructstack.pop(); } namespace srchilite { void open_file_to_scan(const string &path, const string &name) { stringTable = new StringTable; _open_file_to_scan(path, name); langdef_restart(langdef_in); } void clear_langdefscanner() { delete stringTable; langdef_lex_destroy(); } void close_langdefinputfile() { // also close possible open files due to inclusions do { if (langdef_in) fclose(langdef_in); langdef_pop_buffer_state(); } while ( YY_CURRENT_BUFFER ); } } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/vardefinitions.cpp���������������������������������������������0000644�0001750�0001750�00000001441�11672675564�020216� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // C++ Implementation: vardefinitions // // Description: // // // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004 // // Copyright: See COPYING file that comes with this distribution // // #include "vardefinitions.h" #include "stringdef.h" #include "tostringcollection.h" using namespace std; namespace srchilite { VarDefinitions::VarDefinitions() { } VarDefinitions::~VarDefinitions() { } void VarDefinitions::add(const std::string &var, const StringDefs *values) { if (contains(var)) (*this)[var] += "|"; (*this)[var] = toStringCollection<StringDefs>(values, '|'); delete values; } const string & VarDefinitions::getVar(const std::string &name) { return (*this)[name]; } bool VarDefinitions::contains(const string &name) { return find(name) != end(); } } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/regexranges.cpp������������������������������������������������0000644�0001750�0001750�00000003117�11672675563�017505� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * regexranges.cpp * * Created on: Apr 11, 2009 * Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2008 * Copyright: See COPYING file that comes with this distribution */ #include "regexranges.h" namespace srchilite { RegexRanges::RegexRanges() : currentRegex(0) { } RegexRanges::~RegexRanges() { } bool RegexRanges::addRegexRange(const std::string &s) { try { ranges.push_back(boost::regex(s)); } catch (boost::regex_error &e) { return false; } return true; } const boost::regex *RegexRanges::matches(const std::string &line) { for (RegexRangesType::const_iterator it = ranges.begin(); it != ranges.end(); ++it) { if (boost::regex_search(line, *it)) { return &(*it); } } return 0; } bool RegexRanges::isInRange(const std::string &line) { // if the current regular expression is null, then we still // haven't found the starting of the range if (!currentRegex) { currentRegex = matches(line); // note that even if we found a matching regular expression, // the delimiters of the range must not be considered return false; } else { // we're already inside a range, and to find the end of it // we must match the current regex if (boost::regex_search(line, *currentRegex)) { // ok we found the end of the range // so first, reset current regular expression currentRegex = 0; return false; } } // if we're here, we're still in range return true; } } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/stylefileparser.h����������������������������������������������0000644�0001750�0001750�00000005327�11672675563�020062� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * stylefileparser.h * * Created on: Dec 9, 2008 * Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2008 * Copyright: See COPYING file that comes with this distribution */ #ifndef STYLEFILEPARSER_H_ #define STYLEFILEPARSER_H_ #include <string> #include "formatterfactory.h" namespace srchilite { /** * A utility class with static methods to parse style files */ class StyleFileParser { public: /** * Parses the specified style file, and creates the corresponding formatters, * using the passed FormatterFactory. (For the default searching path, it uses * the hardcoded data dir). * * @param name the style file name * @param formatterFactory * @param bodyBgColor the background color for the document (output parameter) * @throws ParserException in case of parsing error */ static void parseStyleFile(const std::string &name, FormatterFactory *formatterFactory, std::string &bodyBgColor); /** * Parses the specified css style file, and creates the corresponding formatters, * using the passed FormatterFactory. (For the default searching path, it uses * the hardcoded data dir). * * @param name the css style file name * @param formatterFactory * @param bodyBgColor the background color for the document (output parameter) * @throws ParserException in case of parsing error */ static void parseCssStyleFile(const std::string &name, FormatterFactory *formatterFactory, std::string &bodyBgColor); /** * Parses the specified style file, in the specified path, and creates the corresponding formatters, * using the passed FormatterFactory. * * @param path where to look for the file * @param name the style file name * @param formatterFactory * @param bodyBgColor the background color for the document (output parameter) * @throws ParserException in case of parsing error */ static void parseStyleFile(const std::string &path, const std::string &name, FormatterFactory *formatterFactory, std::string &bodyBgColor); /** * Parses the specified css style file, in the specified path, and creates the corresponding formatters, * using the passed FormatterFactory. * * @param path where to look for the file * @param name the css style file name * @param formatterFactory * @param bodyBgColor the background color for the document (output parameter) * @throws ParserException in case of parsing error */ static void parseCssStyleFile(const std::string &path, const std::string &name, FormatterFactory *formatterFactory, std::string &bodyBgColor); }; } #endif /* STYLEFILEPARSER_H_ */ ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/ctagsformatter.h�����������������������������������������������0000644�0001750�0001750�00000004623�11672675563�017670� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2008 // // Copyright: See COPYING file that comes with this distribution // #ifndef CTAGSFORMATTER_H_ #define CTAGSFORMATTER_H_ #include <string> #include <list> #include "textstyles.h" namespace srchilite { class PreFormatter; class CTagsCollector; struct FormatterParams; /// collection of strings to be written after (post) a line or a doc typedef std::list<std::string> postResults; /** * Stores the result of the CTagsFormatter */ struct CTagsFormatterResults { /// the result for inline reference or anchor std::string inlineResult; /// the result for postline references postResults postLineResult; /// the result for postdoc references postResults postDocResult; /** * Clears all the results. */ void clear() { inlineResult.clear(); postLineResult.clear(); postDocResult.clear(); } }; /** * Formatter for information gathered from ctags */ class CTagsFormatter { /// the input file name std::string inputFile; /// the input file name (without path) std::string inputFileName; /// the output file name std::string outputFile; /// the output file name extension std::string outputFileExtension; /// the preformatter PreFormatter *preFormatter; /// for actually formatting anchors and references TextStyles::RefTextStyle refstyle; /// collect information about the tags CTagsCollector *ctagsCollector; public: CTagsFormatter(PreFormatter *pre, const TextStyles::RefTextStyle &r, CTagsCollector *ctagsC); ~CTagsFormatter(); void setPreFormatter(PreFormatter *pre) { preFormatter = pre; } /** * Sets the information about input file and output file * @param input input file (with path) * @param output output file (with path) */ void setFileInfo(const std::string &input, const std::string &output); /** * Formats an anchor or references concerning the passed word * * @param word * @param result where formatting results will be stored * @param params additional parameters for the formatter * @return true if some ctags about the word were found and formatted */ bool formatCTags(const std::string &word, CTagsFormatterResults &result, const FormatterParams *params); }; } #endif /*CTAGSFORMATTER_H_*/ �������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/highlightrule.cpp����������������������������������������������0000644�0001750�0001750�00000001615�11672675563�020033� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2008 // // Copyright: See COPYING file that comes with this distribution // #include "highlightrule.h" namespace srchilite { HighlightRule::HighlightRule() : nextState(HighlightStatePtr()), exitLevel(0), nested(false), needsReferenceReplacement(false), hasSubexpressions(false) { } HighlightRule::HighlightRule(const std::string &name) : nextState(HighlightStatePtr()), exitLevel(0), nested(false), needsReferenceReplacement(false), hasSubexpressions(false) { elemList.push_back(name); } HighlightRule::~HighlightRule() { } void HighlightRule::addElem(const std::string &name) { elemList.push_back(name); } bool HighlightRule::tryToMatch(const std::string &s, HighlightToken &token, const MatchingParameters &params) { return tryToMatch(s.begin(), s.end(), token, params); } } �������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/highlighttoken.cpp���������������������������������������������0000644�0001750�0001750�00000002010�11672675563�020172� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2008 // // Copyright: See COPYING file that comes with this distribution // #include "highlighttoken.h" using namespace std; namespace srchilite { HighlightToken::HighlightToken(const HighlightRule *_rule) : prefixOnlySpaces(false), matchedSize(0), rule(_rule) { } HighlightToken::HighlightToken(const std::string &elem, const std::string &_matched, const std::string &_prefix, const HighlightRule *_rule) : prefix(_prefix), prefixOnlySpaces(false), matchedSize(_matched.size()), rule(_rule) { addMatched(elem, _matched); } HighlightToken::~HighlightToken() { } void HighlightToken::addMatched(const std::string &elem, const std::string &s) { matched.push_back(make_pair(elem, s)); matchedSize += s.size(); } void HighlightToken::clearMatched() { if (matched.size()) { matched.clear(); matchedSize = 0; } if (matchedSubExps.size()) { matchedSubExps.clear(); } } } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/parsestyles.h��������������������������������������������������0000644�0001750�0001750�00000003010�11672675563�017206� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // C++ Interface: parsestyles // // Description: declaration of function for parsing style files // // // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2007 // // Copyright: See COPYING file that comes with this distribution // // #ifndef PARSESTYLES_H #define PARSESTYLES_H #include <string> #include "formatterfactory.h" namespace srchilite { /** * Parses the specified style file, and creates the corresponding formatters, * using the passed FormatterFactory. * * @param path the path for searching for style files * @param name the style file name * @param formatterFactory * @param bodyBgColor the background color for the document (can be an empty string) */ extern void parseStyles(const std::string &path, const std::string &name, FormatterFactory *formatterFactory, std::string &bodyBgColor); /** * Parses the specified style file, and creates the corresponding formatters, * using the passed FormatterFactory. (For the default searching path, it uses * the hardcoded data dir). * * @param name the style file name * @param formatterFactory * @param bodyBgColor the background color for the document (output parameter) */ extern void parseStyles(const std::string &name, FormatterFactory *formatterFactory, std::string &bodyBgColor); extern void parseStyleError(const std::string &error); /// for css style files extern void parseCssStyles(const std::string &path, const std::string &name, FormatterFactory *formatterFactory, std::string &bodyBgColor); } #endif ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/ctagscollector.cpp���������������������������������������������0000644�0001750�0001750�00000005370�11672675563�020206� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2008 // // Copyright: See COPYING file that comes with this distribution // #include "ctagscollector.h" #include "formatterparams.h" #include <sstream> #include "ioexception.h" using namespace std; namespace srchilite { /** * internal struct to store information about references */ struct RefEntry { string filename; unsigned long linenumber; }; CTagsCollector::CTagsCollector(const std::string &ctags_file_name, RefPosition pos) : refposition(pos) { ctags_file = tagsOpen(ctags_file_name.c_str(), &info); if (ctags_file == 0) { throw IOException("cannot open tag file", ctags_file_name); } } CTagsCollector::~CTagsCollector() { if (ctags_file) tagsClose(ctags_file); } bool CTagsCollector::collectTags(const std::string &word, CTagsInfos &infos, const FormatterParams *fileinfo) { tagEntry entry; bool found = false; // whether we found a tag bool found_anchor = false; // whether we found an anchor string output; typedef list<RefEntry> FoundRefList; FoundRefList foundreflist; if (tagsFind(ctags_file, &entry, word.c_str(), TAG_FULLMATCH)== TagSuccess) { found = true; do { RefEntry refentry; refentry.filename = entry.file; if ((refentry.filename == fileinfo->filename || refentry.filename == fileinfo->fileNameNoPath) && entry.address.lineNumber == fileinfo->line) { ostringstream gen_info; // we just found an entry to this very element (same file and same lineno) // so it will be an anchor gen_info << entry.address.lineNumber; CTagsInfo ctagsInfo(refentry.filename, gen_info.str(), NONE, true); infos.push_back(ctagsInfo); found_anchor = true; break; } refentry.linenumber = entry.address.lineNumber; foundreflist.push_back(refentry); } while (tagsFindNext(ctags_file, &entry)== TagSuccess); } if (found && !found_anchor) { RefPosition refpos; // in case there's more than one reference we switch to POSTLINE if (foundreflist.size()>1 && refposition == INLINE) { refpos = POSTLINE; } else { refpos = refposition; } for (FoundRefList::const_iterator it = foundreflist.begin(); it != foundreflist.end(); ++it) { ostringstream gen_info; gen_info << it->linenumber; CTagsInfo ctagsInfo(it->filename, gen_info.str(), refpos, false); infos.push_back(ctagsInfo); } } return found || found_anchor; } } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/stylescanner.ll������������������������������������������������0000644�0001750�0001750�00000006171�11672675563�017535� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������%{ /* * Copyright (C) 1999-2007 Lorenzo Bettini, http://www.lorenzobettini.it * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ #include <stdlib.h> #include "stylekey.h" #include "formatterfactory.h" #include "styleparser.h" #include <sstream> #include "parsestyles.h" using namespace srchilite; static std::ostringstream buff; extern int line ; //#define DEBUG_SCANNER #ifdef DEBUG_SCANNER #include <iostream> // for debug #define DEB(s) std::cerr << s << std::endl; #define DEB2(s,s2) std::cerr << s << ": " << s2 << std::endl; #else #define DEB(s) #define DEB2(s,s2) #endif static void buffer(const char *s); static const std::string *flush_buffer(); %} %option prefix="stylesc_" %option noyywrap ws [ ]+ tabs [\t]+ nl \n cr \r IDE [a-zA-Z_]([a-zA-Z0-9_])* STRING \"[^\"\n]*\" %s COMMENT_STATE STRING_STATE %% {ws}|{tabs} {} \r {} <INITIAL>"//" { BEGIN(COMMENT_STATE); } <COMMENT_STATE>[^\n] {} <COMMENT_STATE>\n { ++line; BEGIN(INITIAL); } <INITIAL>"green"|"red"|"darkred"|"blue"|"brown"|"pink"|"yellow"|"cyan"|"purple"|"orange"|"brightorange"|"darkgreen"|"brightgreen"|"black"|"teal"|"gray"|"darkblue"|"white" { stylesc_lval.string = new std::string(yytext) ; return COLOR ; } <INITIAL>"bgcolor" { return BODY_BG_COLOR ; } <INITIAL>"bg" { return BG_T ; } <INITIAL>"b" { stylesc_lval.flag = ISBOLD ; return BOLD ; } <INITIAL>"i" { stylesc_lval.flag = ISITALIC ; return ITALICS ; } <INITIAL>"u" { stylesc_lval.flag = ISUNDERLINE ; return UNDERLINE ; } <INITIAL>"f" { stylesc_lval.flag = ISFIXED; return FIXED; } <INITIAL>"nf" { stylesc_lval.flag = ISNOTFIXED; return NOTFIXED; } <INITIAL>"noref" { stylesc_lval.flag = ISNOREF; return NOREF; } <INITIAL>"," { return ',' ; } <INITIAL>";" { return ';' ; } <INITIAL>":" { return ':' ; } <INITIAL>{IDE} { stylesc_lval.string = new std::string(yytext) ; return KEY ; } <INITIAL>\" { BEGIN(STRING_STATE); DEB("STRING_STATE"); buffer( yytext ) ; } <STRING_STATE>\\\\ { buffer( yytext ) ; } <STRING_STATE>"\\\"" { buffer( "\"" ) ; } <STRING_STATE>\" { BEGIN(INITIAL) ; buffer( yytext ) ; DEB("END STRING_STATE"); stylesc_lval.string = flush_buffer() ; return STRINGDEF; } <STRING_STATE>[^\n]|" " { buffer( yytext ) ; } <STRING_STATE>\n { buffer( "\n" ) ; } \n { ++line ; } <INITIAL>. { /* anything else will generate a parsing error */ return yytext[0] ; } %% void buffer(const char *s) { DEB2("BUFFERING ", s); buff << s; } const std::string *flush_buffer() { const std::string *ret = new std::string(buff.str()); buff.str(""); return ret; } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/langelemsprinter.hpp�������������������������������������������0000644�0001750�0001750�00000004005�11672675563�020550� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // C++ Interface: langelemsprinter // // Description: // // // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2006 // // Copyright: See COPYING file that comes with this distribution // // #ifndef LANGELEMSPRINTER_H #define LANGELEMSPRINTER_H #include <set> #include <string> #include <ostream> namespace srchilite { /** * Prints all the language elements. * his class uses dynamic overloading and it must be processed by doublecpp, * http://doublecpp.sf.net, in case you need to modify it. */ // doublecpp: forward declarations, DO NOT MODIFY class LangElem; // file: langelem.h class LangElems; // file: langelems.h class NamedSubExpsLangElem; // file: namedsubexpslangelem.h class StateLangElem; // file: statelangelem.h // doublecpp: end, DO NOT MODIFY #line 26 "langelemsprinter.h" class LangElemsPrinter { typedef std::set<std::string> SetOfElements; SetOfElements setOfElements; public: LangElemsPrinter(); virtual ~LangElemsPrinter(); /** * Prints all the elements contained in the passed LangElems * to the specified ostream. * @param elems * @param os */ void print(const LangElems *elems, std::ostream &os); protected: // doublecpp: method branches, DO NOT MODIFY #line 46 "langelemsprinter.h" virtual void collect(const StateLangElem * elem); #line 47 "langelemsprinter.h" virtual void collect(const LangElem * elem); #line 48 "langelemsprinter.h" virtual void collect(const LangElems * elem); #line 49 "langelemsprinter.h" virtual void collect(const NamedSubExpsLangElem * elem); public: void _forward_collect(const LangElem * elem) { collect(elem); }; void _forward_collect(const LangElems * elem) { collect(elem); }; void _forward_collect(const NamedSubExpsLangElem * elem) { collect(elem); }; void _forward_collect(const StateLangElem * elem) { collect(elem); }; protected: virtual void collect_DB(const LangElem * elem); virtual void collect_DB(const LangElems * elem); #line 49 "langelemsprinter.h" // doublecpp: end, DO NOT MODIFY }; } #endif ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/highlightstatebuilder.cpp��������������������������������������0000644�0001750�0001750�00000026031�11672675563�021552� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2008 // // Copyright: See COPYING file that comes with this distribution // #include <exception> #include <cctype> #include "highlightstatebuilder.hpp" #include "langelems.h" #include "stringlistlangelem.h" #include "delimitedlangelem.h" #include "highlightbuilderexception.h" #include "highlightrulefactory.h" #include "highlightrule.h" #include "stringdef.h" #include "namedsubexpslangelem.h" #include "regexpreprocessor.h" #include "statelangelem.h" #include <sstream> namespace srchilite { /** * Sets the exit level of the rule using the information contained in the passed elem * @param elem * @param rule * @param inc the possible additional incrementation of the exit level */ static void setExitLevel(const StateStartLangElem *elem, HighlightRule *rule, unsigned int inc = 0); /** * A string is to matched as isolated (word boundaries) basically if it is an alphanumerical * string or a _. * * Notice that this should be called only on strings specified in double quotes, * since other expressions are intended as regular expressions and should not * be isolated. This is checked in the code that calls this function. * * @param s * @return */ static bool is_to_isolate(const string &s); HighlightStateBuilder::HighlightStateBuilder( HighlightRuleFactory *_highlightRuleFactory) : highlightRuleFactory(_highlightRuleFactory) { } HighlightStateBuilder::~HighlightStateBuilder() { } bool is_to_isolate(const string &s) { if (s.size()) { if ((isalnum(s[0]) || s[0] == '_') && (isalnum(s[s.size() - 1]) || s[s.size() - 1] == '_')) return true; } return false; } void HighlightStateBuilder::build(LangElems *elems, HighlightStatePtr mainState) { if (!elems) return; for (LangElems::const_iterator it = elems->begin(); it != elems->end(); ++it) { try { build_DB(*it, mainState.get()); } catch (boost::regex_error &e) { // catch all other exceptions throw HighlightBuilderException("problem in this expression: " + (*it)->toStringOriginal(), *it, e); } } } void HighlightStateBuilder::build(LangElem *elem, HighlightState *state) { // no common operation for the moment } void HighlightStateBuilder::build(StringListLangElem *elem, HighlightState *state) { const string &name = elem->getName(); StringDefs *alternatives = elem->getAlternatives(); WordList wordList; bool doubleQuoted = false, nonDoubleQuoted = false, buildAsWordList = true; for (StringDefs::const_iterator it = alternatives->begin(); it != alternatives->end(); ++it) { const string &rep = (*it)->toString(); // double quoted strings generate WordListRules, otherwise simple ListRules // we don't allow double quoted strings mixed with non double quoted if (((*it)->isDoubleQuoted() && nonDoubleQuoted) || (!(*it)->isDoubleQuoted() && doubleQuoted)) { throw HighlightBuilderException( "cannot mix double quoted and non double quoted", elem); } doubleQuoted = (*it)->isDoubleQuoted(); nonDoubleQuoted = !(*it)->isDoubleQuoted(); wordList.push_back(rep); // now check whether we must build a word list rule (word boundary) or an // ordinary list; as soon as we find something that is not to be isolated // we set buildAsWordList as false if (buildAsWordList && (!doubleQuoted || !is_to_isolate(rep))) { buildAsWordList = false; } } HighlightRulePtr rule; if (buildAsWordList) rule = HighlightRulePtr(highlightRuleFactory->createWordListRule(name, wordList, elem->isCaseSensitive())); else rule = HighlightRulePtr(highlightRuleFactory->createListRule(name, wordList, elem->isCaseSensitive())); rule->setAdditionalInfo(elem->toStringParserInfo()); state->addRule(rule); setExitLevel(elem, rule.get()); } void HighlightStateBuilder::build(DelimitedLangElem *elem, HighlightState *state) { const string &name = elem->getName(); StringDef *start = elem->getStart(); StringDef *end = elem->getEnd(); StringDef *escape = elem->getEscape(); string start_string = (start ? start->toString() : ""); string end_string = (end ? end->toString() : ""); string escape_string = (escape ? escape->toString() : ""); if (elem->isNested() && start_string == end_string) { // the two delimiters must be different for nested elements throw HighlightBuilderException( "delimiters must be different for nested elements", elem); } bool end_string_has_references = false; // check possible back reference markers and their correctness if (end && end->hasBackRef() && end_string.size()) { backreference_info ref_info = RegexPreProcessor::num_of_references( end_string); subexpressions_info info = RegexPreProcessor::num_of_marked_subexpressions(start_string, true, true); // possible errors, e.g., unbalanced parenthesis if (info.errors.size()) { throw HighlightBuilderException(info.errors, elem); } // check that there are enough subexpressions as requested by the maximal // back reference number unsigned int max = ref_info.second; if (max > info.marked) { std::ostringstream error; error << max << " subexpressions requested, but only " << info.marked << " found"; throw HighlightBuilderException(error.str(), elem); } end_string_has_references = true; } HighlightRulePtr rule; // if this element starts a new state/environment, we must split it if (elem->getStateLangElem() || elem->isMultiline() || end_string_has_references) { rule = HighlightRulePtr(highlightRuleFactory->createMultiLineRule(name, start_string, end_string, escape_string, elem->isNested())); if (end_string_has_references) { // record that the state (and the rule representing the end) // need to have dynamic back references replaced rule->getNextState()->setNeedsReferenceReplacement(); rule->getNextState()->getRuleList().front()->setNeedsReferenceReplacement(); // and that the starting rule has sub expressions // (that will be used for replacing dynamic back references) rule->setHasSubexpressions(); // if the element is nested, then the last rule is a sort of copy // of the first one, so we need to record that it has subexpressions too if (elem->isNested()) { rule->getNextState()->getRuleList().back()->setHasSubexpressions(); } } } else { rule = HighlightRulePtr(highlightRuleFactory->createLineRule(name, start_string, end_string, escape_string, elem->isNested())); } rule->setAdditionalInfo(elem->toStringParserInfo()); state->addRule(rule); if (rule->getNextState().get()) { // as for exit level, if the rule was split using states, we must set // the exit level of the first rule of the next state (i.e., the end expression) of the rule // this exit level must be incremented by one: 1 is for exiting the inner state // of the rule, and 1 for exiting the state this rule belongs to setExitLevel(elem, rule->getNextState()->getRuleList().front().get(), 1); // adjust the additional info of the exiting rule rule->getNextState()->getRuleList().front()->setAdditionalInfo( elem->toStringParserInfo()); // since this is a delimited element, we must set the default element for // the inner state to the name of the element itself rule->getNextState()->setDefaultElement(name); } else { setExitLevel(elem, rule.get()); } } void HighlightStateBuilder::build(NamedSubExpsLangElem *elem, HighlightState *state) { const ElementNames *elems = elem->getElementNames(); const StringDef *regexp = elem->getRegexpDef(); const string &regexp_string = regexp->toString(); // first check that the number of marked subexpressions is the same of // the specified element names subexpressions_info sexps = RegexPreProcessor::num_of_marked_subexpressions(regexp_string); if (sexps.errors.size()) { throw HighlightBuilderException(sexps.errors, elem); } if (sexps.marked != elems->size()) { throw HighlightBuilderException( "number of marked subexpressions does not match number of elements", elem); } HighlightRulePtr rule = HighlightRulePtr( highlightRuleFactory->createCompoundRule(*elems, regexp_string)); rule->setAdditionalInfo(elem->toStringParserInfo()); state->addRule(rule); setExitLevel(elem, rule.get()); } void HighlightStateBuilder::build(StateLangElem *elem, HighlightState *state) { StateStartLangElem *statestart = elem->getStateStart(); if (!elem->isState() && dynamic_cast<NamedSubExpsLangElem *> (statestart)) { throw HighlightBuilderException( "cannot use this element for environments (only for states)", statestart); } /* First act on the element that defines this new State */ build_DB(statestart, state); /* The last rule corresponds to the rule added for the element that defines this state, i.e., statestart */ HighlightRulePtr last = state->getRuleList().back(); /* We must make sure that this rule has a next state, since we will use it to populate it with the elements of this state. For instance, a StringListLangElem does not have a next state, so we must create one. */ if (!last->getNextState().get()) { last->setNextState(HighlightStatePtr(new HighlightState)); } /* Use the last rule next state to populate it with the elements of this State/Environment element */ HighlightStatePtr inner = last->getNextState(); /* If it's a State then the default formatter corresponds to NORMAL, otherwise (Environment) the default formatter is the same of the element itself. */ if (elem->isState()) { inner->setDefaultElement("normal"); } else { // at this point we already checked that the rule represents only one element inner->setDefaultElement(last->getElemList().front()); } last->setAdditionalInfo(statestart->toStringParserInfo()); LangElems *elems = elem->getElems(); build(elems, inner); } void setExitLevel(const StateStartLangElem *elem, HighlightRule *rule, unsigned int inc) { if (elem->exitAll()) { rule->setExitLevel(-1); // exit all } else if (elem->getExit()) { rule->setExitLevel(elem->getExit() + inc); } } #include "highlightstatebuilder_dbtab.cc" } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/stopwatch.h����������������������������������������������������0000644�0001750�0001750�00000001165�11672675563�016655� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // C++ Interface: stopwatch // // Description: // // // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2006 // // Copyright: See COPYING file that comes with this distribution // // #ifndef STOPWATCH_H #define STOPWATCH_H #include <time.h> namespace srchilite { /** Records elapsed time */ class StopWatch{ clock_t start; public: /** * constructs a StopWatch object by storing the current time * (uses clock()) */ StopWatch() : start(clock()) {} /** * Upon destruction, prints the elapsed time in seconds, * since the construction of this StopWatch */ ~StopWatch(); }; } #endif �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/styleparser.h��������������������������������������������������0000644�0001750�0001750�00000005456�11675044736�017220� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������ /* A Bison parser, made by GNU Bison 2.4.1. */ /* Skeleton interface for Bison's Yacc-like parsers in C Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work under terms of your choice, so long as that work isn't itself a parser generator using the skeleton or a modified version thereof as a parser skeleton. Alternatively, if you modify or redistribute the parser skeleton itself, you may (at your option) remove this special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ /* Tokens. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE /* Put the tokens into the symbol table, so that GDB and other debuggers know about them. */ enum yytokentype { BOLD = 258, ITALICS = 259, UNDERLINE = 260, FIXED = 261, NOTFIXED = 262, NOREF = 263, KEY = 264, COLOR = 265, BG_COLOR = 266, STRINGDEF = 267, BG_T = 268, BODY_BG_COLOR = 269 }; #endif /* Tokens. */ #define BOLD 258 #define ITALICS 259 #define UNDERLINE 260 #define FIXED 261 #define NOTFIXED 262 #define NOREF 263 #define KEY 264 #define COLOR 265 #define BG_COLOR 266 #define STRINGDEF 267 #define BG_T 268 #define BODY_BG_COLOR 269 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE { /* Line 1676 of yacc.c */ #line 62 "../../../lib/srchilite/styleparser.yy" int tok ; /* command */ const std::string * string ; /* string : id, ... */ srchilite::StyleConstant flag ; srchilite::StyleConstants *styleconstants; srchilite::KeyList *keylist; /* Line 1676 of yacc.c */ #line 90 "../../../lib/srchilite/styleparser.h" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 #endif extern YYSTYPE stylesc_lval; ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/settings.cpp���������������������������������������������������0000644�0001750�0001750�00000011104�11672675563�017026� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * settings.cpp * * Created on: Apr 18, 2009 * Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2008 * Copyright: See COPYING file that comes with this distribution */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "settings.h" #ifndef USE_MSVC // msvc does not provide this header #include <dirent.h> #else #include <io.h> #include <direct.h> #define mkdir(path,mode) _mkdir (path) #include <compat_dirent.h> #endif #include <sys/stat.h> #include <cstdlib> #include <fstream> #include <iostream> #include <boost/regex.hpp> #include "fileutil.h" #include "verbosity.h" #ifdef USE_MINGW // mingw's mkdir() function has 1 argument, but we pass 2 arguments. // so we use its version _mkdir() #undef mkdir #define mkdir(path,mode) _mkdir (path) #endif using namespace std; namespace srchilite { /// if set (i.e., not empty), retrieveDataDir() always returns this value string globalDataDir = ""; /// the regular expression for the conf file syntax boost::regex datadir_exp( "[[:blank:]]*(datadir)[[:blank:]]*=[[:blank:]]*\"([^[:blank:]\\r]+)\"[[:blank:]\\r]*|([[:space:]]+)|([[:space:]]*#.*)"); #define DEFAULT_CONF_DIR ".source-highlight" #define DEFAULT_CONF_FILE "source-highlight.conf" static string findHomeDirectory() { const char *home = getenv("HOME"); if (home) { return home; } // let's try other variables in windows char * homedrive = getenv("HOMEDRIVE"); // Drive containing Windows char * homepath = getenv("HOMEPATH"); // Path to the user directory into the Windows drive if (homedrive && homepath) { return string(homedrive) + string(homepath); } // last chance in windows home = getenv("USERPROFILE"); if (home) { return home; } // nothing found... return ""; } Settings::Settings() : confFileName(DEFAULT_CONF_FILE), testFileName("lang.map"), dataDir(ABSOLUTEDATADIR) { const string homeDir = findHomeDirectory(); confDir = (homeDir != "" ? homeDir + "/" + DEFAULT_CONF_DIR + "/" : string( DEFAULT_CONF_DIR) + "/"); } Settings::~Settings() { } bool Settings::checkForTestFile() { string file = dataDir + "/" + testFileName; ifstream i(file.c_str()); return (i != 0); } bool Settings::checkForConfFile() { string file = confDir + confFileName; ifstream i(file.c_str()); return (i != 0); } bool Settings::readDataDir() { string file = confDir + confFileName; ifstream i(file.c_str()); string line; if (i != 0) { while (read_line(&i, line)) { if (line.size()) { boost::cmatch what; if (boost::regex_match(line.c_str(), what, datadir_exp) && what[2].matched) {// not all spaces, nor comments dataDir = what[2]; return true; } } } } return false; } SettingError Settings::save() { // the directory does not exist? if (opendir(confDir.c_str()) == 0) { // then create it if (mkdir(confDir.c_str(), S_IRWXU) != 0) { return CANT_CREATE_DIR; } } string file = confDir + confFileName; ofstream o; o.open(file.c_str()); if (o) { o << "# settings for source-highlight" << endl; o << endl; o << "datadir = \"" << dataDir << "\"" << endl; o.close(); return NO_SETTING_ERROR; } return CANT_CREATE_FILE; } const string Settings::retrieveDataDir(bool reload) { if (globalDataDir != "") return globalDataDir; static string dataDir; if (dataDir != "" && !reload) return dataDir; // cached value VERBOSELN("retrieving default datadir value..."); const char *_dataDir = getenv("SOURCE_HIGHLIGHT_DATADIR"); if (_dataDir) { VERBOSELN("using SOURCE_HIGHLIGHT_DATADIR env value " + string(_dataDir)); dataDir = _dataDir; return _dataDir; } static Settings settings; if (!settings.readDataDir()) { VERBOSELN("using hardcoded datadir value " ABSOLUTEDATADIR); dataDir = ABSOLUTEDATADIR; return ABSOLUTEDATADIR; } dataDir = settings.getDataDir(); VERBOSELN("using datadir value from conf file " + dataDir); return dataDir; } const std::string Settings::getDefaultDataDir() { return ABSOLUTEDATADIR; } void Settings::setGlobalDataDir(const std::string &dataDir) { globalDataDir = dataDir; } bool Settings::checkSettings() { static Settings settings; settings.setDataDir(retrieveDataDir()); return settings.checkForTestFile(); } } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/parserinfo.h���������������������������������������������������0000644�0001750�0001750�00000001520�11672675563�017004� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // C++ Interface: parserinfo // // Description: // // // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2005-2008 // // Copyright: See COPYING file that comes with this distribution // // #ifndef PARSERINFO_H #define PARSERINFO_H #include <string> namespace srchilite { /** Stores information about the file name and the line number of a generic element created during parsing */ struct ParserInfo { std::string filename; // including path unsigned int line; ParserInfo() : line(0) { } ParserInfo(const std::string &n) : filename(n), line(0) { } void setParserInfo(const std::string &name, unsigned int l) { filename = name; line = l; } void setParserInfo(const ParserInfo *p) { filename = p->filename; line = p->line; } }; } #endif ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/statelangelem.cpp����������������������������������������������0000644�0001750�0001750�00000001705�11672675563�020021� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // C++ Implementation: %{MODULE} // // Description: // // // Author: %{AUTHOR} <%{EMAIL}>, (C) %{YEAR} // // Copyright: See COPYING file that comes with this distribution // // #include "statelangelem.h" #include "statestartlangelem.h" using namespace std; namespace srchilite { StateLangElem::StateLangElem(const string &n, StateStartLangElem *start, LangElems *elems, bool st) : LangElem(n), statestartlangelem(start), langelems(elems), state(st) { } StateLangElem::~StateLangElem() { if (statestartlangelem) delete statestartlangelem; if (langelems) delete langelems; } const std::string StateLangElem::toString() const { string res = statestartlangelem->toString(); if (langelems) res += "\n" + langelems->toString(); return res; } const std::string StateLangElem::toStringOriginal() const { string res = statestartlangelem->toString(); if (langelems) res += "\n" + langelems->toStringOriginal(); return res; } } �����������������������������������������������������������source-highlight-3.1.6/lib/srchilite/regexranges.h��������������������������������������������������0000644�0001750�0001750�00000004230�11672675563�017147� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * regexranges.h * * Created on: Apr 11, 2009 * Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2008 * Copyright: See COPYING file that comes with this distribution */ #ifndef REGEXRANGES_H_ #define REGEXRANGES_H_ #include <string> #include <list> #include <boost/regex.hpp> namespace srchilite { /** * Stores possible separators implemented as regular expressions and * provides functionalities to search for such occurrences in lines. */ class RegexRanges { public: RegexRanges(); ~RegexRanges(); typedef std::list<boost::regex> RegexRangesType; /** * Adds a regular expression range, specified by the passed string. * * @param s the string representation of the regular expression * @return true if the passed string is a valid regular expression, false * otherwise */ bool addRegexRange(const std::string &s); /** * Removes all the added expressions */ void clear() { ranges.clear(); } /** * Checks whether one of the stored regular expression can be found in the * passed string line. * @param line * @return the matched regular expression or 0 if none was found */ const boost::regex *matches(const std::string &line); /** * @param line the line to inspect * @return whether the passed line is in range */ bool isInRange(const std::string &line); /** * The next isInRange search will start from the first element of * the list. This should be called before searching for lines of a file, * that we started to process. */ void reset() { currentRegex = 0; } private: /// the actual collection of regular expressions for ranges RegexRangesType ranges; /** * if set, it represents the matched regular expression up to now. * This is used internally: if we're searching for a range, the first time * we find a matching expression, we found the beginning of the range. * The end of the range will be found when we match again the previously * matched expression. */ const boost::regex *currentRegex; }; } #endif /* REGEXRANGES_H_ */ ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/namedsubexpslangelem.cpp���������������������������������������0000644�0001750�0001750�00000002364�11672675563�021401� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // C++ Interface: NamedSubExpsLangElem // // Description: represents a regular expression made by many marked groups // and each marked group represents a different language element // // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2007 // // Copyright: See COPYING file that comes with this distribution // // #include "namedsubexpslangelem.h" #include "stringdef.h" #include "tostringcollection.h" using namespace std; namespace srchilite { NamedSubExpsLangElem::NamedSubExpsLangElem(const ElementNames *names, StringDef *def, bool ex, bool al) : StateStartLangElem("named subexps", ex, al), // "named subexps" is a bogus name elementNames(names), regexpDef(def) { } NamedSubExpsLangElem::~NamedSubExpsLangElem() { if (elementNames) delete elementNames; if (regexpDef) delete regexpDef; } const std::string NamedSubExpsLangElem::toString() const { string res = StateStartLangElem::toString() + " " + collectionToString(elementNames, ',') + regexpDef->toString(); return res; } const std::string NamedSubExpsLangElem::toStringOriginal() const { string res = StateStartLangElem::toString() + " " + collectionToString(elementNames, ',') + regexpDef->toStringOriginal(); return res; } } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/stopwatch.cpp��������������������������������������������������0000644�0001750�0001750�00000000664�11672675563�017213� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // C++ Implementation: stopwatch // // Description: // // // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2006 // // Copyright: See COPYING file that comes with this distribution // // #include "stopwatch.h" #include <iostream> using namespace std; namespace srchilite { StopWatch::~StopWatch() { clock_t total = clock() - start; cout << "elapsed time (secs): " << double(total) / CLOCKS_PER_SEC << endl; } } ����������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/delimitedlangelem.h��������������������������������������������0000644�0001750�0001750�00000004625�11672675563�020312� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // C++ Interface: delimitedlangelem // // Description: // // // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2009 // // Copyright: See COPYING file that comes with this distribution // // #ifndef DELIMITEDLANGELEM_H #define DELIMITEDLANGELEM_H #include "statestartlangelem.h" namespace srchilite { class StringDef; /** A language element that is delimited by specific strings (regular expressions) */ // doublecpp: forward declarations, DO NOT MODIFY class HighlightState; // file: highlightstate.h class HighlightStateBuilder; // file: highlightstatebuilder.h // doublecpp: end, DO NOT MODIFY class DelimitedLangElem : public StateStartLangElem { private: StringDef *start; StringDef *end; StringDef *escape; bool multiline; bool nested; public: /** * @param n the name of the element * @param s the starting regular expression for the element * @param e the ending regular expression * @param es the escaping sequence (if any) * @param multi whether this element spans multiple lines * @param nes whether this element can be nested */ DelimitedLangElem(const std::string &n, StringDef *s, StringDef *e, StringDef *es, bool multi, bool nes); ~DelimitedLangElem(); /** * return the string representation (with preprocessing) * @return the string representation */ virtual const std::string toString() const; /** * return the original representation (without any preprocessing); * this is useful for printing errors * @return the original representation */ virtual const std::string toStringOriginal() const; /** * @return the starting string */ StringDef *getStart() const { return start; } /** * @return the ending string */ StringDef *getEnd() const { return end; } /** * @return the escape string */ StringDef *getEscape() const { return escape; } /** * @return whether this element can span multiple lines */ bool isMultiline() const { return multiline; } /** * @return whether this element can be nested */ bool isNested() const { return nested; } // doublecpp: dispatch methods, DO NOT MODIFY public: virtual void dispatch_build(HighlightStateBuilder *, HighlightState * state); // doublecpp: end, DO NOT MODIFY }; } #endif �����������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/linenumgenerator.cpp�������������������������������������������0000644�0001750�0001750�00000002202�11672675563�020543� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2008 // // Copyright: See COPYING file that comes with this distribution // #include <iomanip> #include "linenumgenerator.h" #include <sstream> using namespace std; namespace srchilite { /// used for line information generation static SubstitutionMapping substitutionmapping; LineNumGenerator::LineNumGenerator(const TextStyle &_lineStyle, unsigned int _digitNum, char _padding) : digitNum(_digitNum), padding(_padding), lineStyle(_lineStyle) { } LineNumGenerator::~LineNumGenerator() { } const std::string LineNumGenerator::generateLine(unsigned int line) { ostringstream sout; sout << std::setw(digitNum) << std::setfill(padding) << line << ":"; string line_str = lineStyle.output(sout.str()); // possible anchor generation if (anchorStyle.toString() != "") { ostringstream line_n; line_n << anchorLinePrefix << line; substitutionmapping["$text"] = line_str; substitutionmapping["$linenum"] = line_n.str(); line_str = anchorStyle.output(substitutionmapping); } return line_str + " "; } } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/outlangdefparser.h���������������������������������������������0000644�0001750�0001750�00000007223�11675044736�020202� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������ /* A Bison parser, made by GNU Bison 2.4.1. */ /* Skeleton interface for Bison's Yacc-like parsers in C Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work under terms of your choice, so long as that work isn't itself a parser generator using the skeleton or a modified version thereof as a parser skeleton. Alternatively, if you modify or redistribute the parser skeleton itself, you may (at your option) remove this special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ /* Tokens. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE /* Put the tokens into the symbol table, so that GDB and other debuggers know about them. */ enum yytokentype { BEGIN_T = 258, END_T = 259, DOC_TEMPLATE_T = 260, NODOC_TEMPLATE_T = 261, STYLE_TEMPLATE_T = 262, STYLE_SEPARATOR_T = 263, BOLD_T = 264, ITALICS_T = 265, UNDERLINE_T = 266, COLOR_T = 267, BG_COLOR_T = 268, FIXED_T = 269, NOTFIXED_T = 270, COLORMAP_T = 271, DEFAULT_T = 272, ONESTYLE_T = 273, TRANSLATIONS_T = 274, EXTENSION_T = 275, ANCHOR_T = 276, REFERENCE_T = 277, INLINE_REFERENCE_T = 278, POSTLINE_REFERENCE_T = 279, POSTDOC_REFERENCE_T = 280, KEY = 281, STRINGDEF = 282, REGEXDEF = 283, LINE_PREFIX_T = 284, LINENUM_T = 285, WRONG_INCLUDE_FILE = 286 }; #endif /* Tokens. */ #define BEGIN_T 258 #define END_T 259 #define DOC_TEMPLATE_T 260 #define NODOC_TEMPLATE_T 261 #define STYLE_TEMPLATE_T 262 #define STYLE_SEPARATOR_T 263 #define BOLD_T 264 #define ITALICS_T 265 #define UNDERLINE_T 266 #define COLOR_T 267 #define BG_COLOR_T 268 #define FIXED_T 269 #define NOTFIXED_T 270 #define COLORMAP_T 271 #define DEFAULT_T 272 #define ONESTYLE_T 273 #define TRANSLATIONS_T 274 #define EXTENSION_T 275 #define ANCHOR_T 276 #define REFERENCE_T 277 #define INLINE_REFERENCE_T 278 #define POSTLINE_REFERENCE_T 279 #define POSTDOC_REFERENCE_T 280 #define KEY 281 #define STRINGDEF 282 #define REGEXDEF 283 #define LINE_PREFIX_T 284 #define LINENUM_T 285 #define WRONG_INCLUDE_FILE 286 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE { /* Line 1676 of yacc.c */ #line 58 "../../../lib/srchilite/outlangdefparser.yy" int tok ; /* command */ bool booloption ; const std::string * string ; /* string : id, ... */ int flag ; /* Line 1676 of yacc.c */ #line 123 "../../../lib/srchilite/outlangdefparser.h" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 #endif extern YYSTYPE outlangdef_lval; �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/regexhighlightrule.h�������������������������������������������0000644�0001750�0001750�00000002370�11672675563�020532� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2008 // // Copyright: See COPYING file that comes with this distribution // #ifndef REGEXHIGHLIGHTRULE_H_ #define REGEXHIGHLIGHTRULE_H_ #include "highlightrule.h" #include <boost/regex.hpp> namespace srchilite { /** * An implementation of HighlightRule using Boost regex library */ class RegexHighlightRule : public HighlightRule { /// the regular expression for the rule boost::regex regExp; public: /** * @param s the string representing the regular expression */ RegexHighlightRule(const std::string &s); /** * @param name the element name represented by this rule * @param s the string representing the regular expression */ RegexHighlightRule(const std::string &name, const std::string &s); virtual ~RegexHighlightRule(); virtual bool tryToMatch(std::string::const_iterator start, std::string::const_iterator end, HighlightToken &token, const MatchingParameters &params); virtual const std::string toString() const; virtual void replaceReferences(const ReplacementList &rep); virtual HighlightRule *clone(); void setRegExp(const std::string &s); }; } #endif /*REGEXHIGHLIGHTRULE_H_*/ ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/formatter.cpp��������������������������������������������������0000644�0001750�0001750�00000000376�11672675563�017202� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2008 // // Copyright: See COPYING file that comes with this distribution // #include "formatter.h" namespace srchilite { Formatter::Formatter() { } Formatter::~Formatter() { } } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/outlangdefscanner.cc�������������������������������������������0000644�0001750�0001750�00000211505�11675044736�020475� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#line 2 "../../../lib/srchilite/outlangdefscanner.cc" #line 4 "../../../lib/srchilite/outlangdefscanner.cc" #define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ #define yy_create_buffer outlangdef__create_buffer #define yy_delete_buffer outlangdef__delete_buffer #define yy_flex_debug outlangdef__flex_debug #define yy_init_buffer outlangdef__init_buffer #define yy_flush_buffer outlangdef__flush_buffer #define yy_load_buffer_state outlangdef__load_buffer_state #define yy_switch_to_buffer outlangdef__switch_to_buffer #define yyin outlangdef_in #define yyleng outlangdef_leng #define yylex outlangdef_lex #define yylineno outlangdef_lineno #define yyout outlangdef_out #define yyrestart outlangdef_restart #define yytext outlangdef_text #define yywrap outlangdef_wrap #define yyalloc outlangdef_alloc #define yyrealloc outlangdef_realloc #define yyfree outlangdef_free #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 #define YY_FLEX_SUBMINOR_VERSION 35 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif /* First, we deal with platform-specific or compiler-specific issues. */ /* begin standard C headers. */ #include <stdio.h> #include <string.h> #include <errno.h> #include <stdlib.h> /* end standard C headers. */ /* flex integer type definitions */ #ifndef FLEXINT_H #define FLEXINT_H /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */ #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include <inttypes.h> typedef int8_t flex_int8_t; typedef uint8_t flex_uint8_t; typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; #else typedef signed char flex_int8_t; typedef short int flex_int16_t; typedef int flex_int32_t; typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; /* Limits of integral types. */ #ifndef INT8_MIN #define INT8_MIN (-128) #endif #ifndef INT16_MIN #define INT16_MIN (-32767-1) #endif #ifndef INT32_MIN #define INT32_MIN (-2147483647-1) #endif #ifndef INT8_MAX #define INT8_MAX (127) #endif #ifndef INT16_MAX #define INT16_MAX (32767) #endif #ifndef INT32_MAX #define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX #define UINT8_MAX (255U) #endif #ifndef UINT16_MAX #define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX #define UINT32_MAX (4294967295U) #endif #endif /* ! C99 */ #endif /* ! FLEXINT_H */ #ifdef __cplusplus /* The "const" storage-class-modifier is valid. */ #define YY_USE_CONST #else /* ! __cplusplus */ /* C99 requires __STDC__ to be defined as 1. */ #if defined (__STDC__) #define YY_USE_CONST #endif /* defined (__STDC__) */ #endif /* ! __cplusplus */ #ifdef YY_USE_CONST #define yyconst const #else #define yyconst #endif /* Returned upon end-of-file. */ #define YY_NULL 0 /* Promotes a possibly negative, possibly signed char to an unsigned * integer for use as an array index. If the signed char is negative, * we want to instead treat it as an 8-bit unsigned char, hence the * double cast. */ #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) /* Enter a start condition. This macro really ought to take a parameter, * but we do it the disgusting crufty way forced on us by the ()-less * definition of BEGIN. */ #define BEGIN (yy_start) = 1 + 2 * /* Translate the current start state into a value that can be later handed * to BEGIN to return to the state. The YYSTATE alias is for lex * compatibility. */ #define YY_START (((yy_start) - 1) / 2) #define YYSTATE YY_START /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) /* Special action meaning "start processing a new file". */ #define YY_NEW_FILE outlangdef_restart(outlangdef_in ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ #ifndef YY_BUF_SIZE #ifdef __ia64__ /* On IA-64, the buffer size is 16k, not 8k. * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. * Ditto for the __ia64__ case accordingly. */ #define YY_BUF_SIZE 32768 #else #define YY_BUF_SIZE 16384 #endif /* __ia64__ */ #endif /* The state buf must be large enough to hold one state per character in the main buffer. */ #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) #ifndef YY_TYPEDEF_YY_BUFFER_STATE #define YY_TYPEDEF_YY_BUFFER_STATE typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif extern int outlangdef_leng; extern FILE *outlangdef_in, *outlangdef_out; #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 #define YY_LESS_LINENO(n) /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ do \ { \ /* Undo effects of setting up outlangdef_text. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ *yy_cp = (yy_hold_char); \ YY_RESTORE_YY_MORE_OFFSET \ (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ YY_DO_BEFORE_ACTION; /* set up outlangdef_text again */ \ } \ while ( 0 ) #define unput(c) yyunput( c, (yytext_ptr) ) #ifndef YY_TYPEDEF_YY_SIZE_T #define YY_TYPEDEF_YY_SIZE_T typedef size_t yy_size_t; #endif #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state { FILE *yy_input_file; char *yy_ch_buf; /* input buffer */ char *yy_buf_pos; /* current position in input buffer */ /* Size of input buffer in bytes, not including room for EOB * characters. */ yy_size_t yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. */ int yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to * delete it. */ int yy_is_our_buffer; /* Whether this is an "interactive" input source; if so, and * if we're using stdio for input, then we want to use getc() * instead of fread(), to make sure we stop fetching input after * each newline. */ int yy_is_interactive; /* Whether we're considered to be at the beginning of a line. * If so, '^' rules will be active on the next match, otherwise * not. */ int yy_at_bol; int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ /* Whether to try to fill the input buffer when we reach the * end of it. */ int yy_fill_buffer; int yy_buffer_status; #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 /* When an EOF's been seen but there's still some text to process * then we mark the buffer as YY_EOF_PENDING, to indicate that we * shouldn't try reading from the input source any more. We might * still have a bunch of tokens to match, though, because of * possible backing-up. * * When we actually see the EOF, we change the status to "new" * (via outlangdef_restart()), so that the user can continue scanning by * just pointing outlangdef_in at a new input file. */ #define YY_BUFFER_EOF_PENDING 2 }; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ /* Stack of input buffers. */ static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ /* We provide macros for accessing buffer states in case in the * future we want to put the buffer states in a more general * "scanner state". * * Returns the top of the stack, or NULL. */ #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ : NULL) /* Same as previous macro, but useful when we know that the buffer stack is not * NULL or when we need an lvalue. For internal use only. */ #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] /* yy_hold_char holds the character lost when outlangdef_text is formed. */ static char yy_hold_char; static int yy_n_chars; /* number of characters read into yy_ch_buf */ int outlangdef_leng; /* Points to current character in buffer. */ static char *yy_c_buf_p = (char *) 0; static int yy_init = 0; /* whether we need to initialize */ static int yy_start = 0; /* start state number */ /* Flag which is used to allow outlangdef_wrap()'s to do buffer switches * instead of setting up a fresh outlangdef_in. A bit of a hack ... */ static int yy_did_buffer_switch_on_eof; void outlangdef_restart (FILE *input_file ); void outlangdef__switch_to_buffer (YY_BUFFER_STATE new_buffer ); YY_BUFFER_STATE outlangdef__create_buffer (FILE *file,int size ); void outlangdef__delete_buffer (YY_BUFFER_STATE b ); void outlangdef__flush_buffer (YY_BUFFER_STATE b ); void outlangdef_push_buffer_state (YY_BUFFER_STATE new_buffer ); void outlangdef_pop_buffer_state (void ); static void outlangdef_ensure_buffer_stack (void ); static void outlangdef__load_buffer_state (void ); static void outlangdef__init_buffer (YY_BUFFER_STATE b,FILE *file ); #define YY_FLUSH_BUFFER outlangdef__flush_buffer(YY_CURRENT_BUFFER ) YY_BUFFER_STATE outlangdef__scan_buffer (char *base,yy_size_t size ); YY_BUFFER_STATE outlangdef__scan_string (yyconst char *yy_str ); YY_BUFFER_STATE outlangdef__scan_bytes (yyconst char *bytes,int len ); void *outlangdef_alloc (yy_size_t ); void *outlangdef_realloc (void *,yy_size_t ); void outlangdef_free (void * ); #define yy_new_buffer outlangdef__create_buffer #define yy_set_interactive(is_interactive) \ { \ if ( ! YY_CURRENT_BUFFER ){ \ outlangdef_ensure_buffer_stack (); \ YY_CURRENT_BUFFER_LVALUE = \ outlangdef__create_buffer(outlangdef_in,YY_BUF_SIZE ); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ } #define yy_set_bol(at_bol) \ { \ if ( ! YY_CURRENT_BUFFER ){\ outlangdef_ensure_buffer_stack (); \ YY_CURRENT_BUFFER_LVALUE = \ outlangdef__create_buffer(outlangdef_in,YY_BUF_SIZE ); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ } #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) /* Begin user sect3 */ #define outlangdef_wrap(n) 1 #define YY_SKIP_YYWRAP typedef unsigned char YY_CHAR; FILE *outlangdef_in = (FILE *) 0, *outlangdef_out = (FILE *) 0; typedef int yy_state_type; extern int outlangdef_lineno; int outlangdef_lineno = 1; extern char *outlangdef_text; #define yytext_ptr outlangdef_text static yy_state_type yy_get_previous_state (void ); static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); static int yy_get_next_buffer (void ); static void yy_fatal_error (yyconst char msg[] ); /* Done after the current pattern has been matched and before the * corresponding action - sets up outlangdef_text. */ #define YY_DO_BEFORE_ACTION \ (yytext_ptr) = yy_bp; \ outlangdef_leng = (size_t) (yy_cp - yy_bp); \ (yy_hold_char) = *yy_cp; \ *yy_cp = '\0'; \ (yy_c_buf_p) = yy_cp; #define YY_NUM_RULES 57 #define YY_END_OF_BUFFER 58 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info { flex_int32_t yy_verify; flex_int32_t yy_nxt; }; static yyconst flex_int16_t yy_accept[282] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 58, 56, 1, 55, 2, 37, 3, 36, 35, 34, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 4, 5, 2, 42, 43, 2, 42, 41, 42, 57, 2, 57, 1, 44, 3, 50, 57, 54, 2, 53, 54, 49, 2, 49, 48, 45, 49, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 40, 39, 0, 0, 0, 52, 51, 47, 46, 33, 33, 33, 33, 33, 33, 33, 30, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 0, 32, 30, 33, 33, 33, 10, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 38, 33, 29, 33, 17, 33, 33, 33, 14, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 21, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 16, 33, 18, 33, 33, 33, 33, 11, 27, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 15, 33, 33, 31, 33, 33, 33, 13, 19, 33, 33, 33, 33, 33, 33, 33, 33, 20, 33, 33, 33, 33, 33, 25, 33, 33, 33, 12, 33, 33, 26, 33, 33, 33, 33, 33, 33, 7, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 28, 33, 6, 33, 33, 33, 8, 33, 33, 33, 9, 33, 33, 33, 22, 33, 33, 24, 33, 23, 0 } ; static yyconst flex_int32_t yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 6, 7, 8, 1, 1, 9, 10, 11, 12, 13, 14, 1, 15, 1, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 1, 1, 1, 17, 1, 18, 1, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 20, 21, 22, 23, 24, 1, 25, 26, 27, 28, 29, 30, 31, 32, 33, 19, 19, 34, 35, 36, 37, 38, 19, 39, 40, 41, 42, 19, 19, 43, 44, 19, 45, 46, 47, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } ; static yyconst flex_int32_t yy_meta[48] = { 0, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 3, 1, 1, 1, 1, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, 1, 1 } ; static yyconst flex_int16_t yy_base[291] = { 0, 0, 0, 45, 47, 49, 53, 56, 57, 73, 101, 62, 64, 128, 173, 82, 87, 369, 370, 370, 370, 370, 370, 370, 370, 370, 370, 0, 332, 80, 330, 35, 54, 333, 58, 332, 327, 327, 325, 332, 319, 320, 322, 370, 370, 370, 370, 370, 370, 370, 370, 75, 370, 370, 0, 370, 370, 370, 370, 321, 370, 370, 370, 91, 370, 370, 370, 370, 370, 92, 0, 329, 324, 327, 319, 318, 321, 323, 321, 307, 304, 87, 321, 309, 87, 315, 303, 312, 297, 315, 311, 370, 370, 0, 332, 309, 370, 370, 370, 370, 304, 302, 297, 305, 295, 306, 289, 0, 300, 299, 293, 293, 291, 295, 286, 292, 281, 279, 290, 284, 281, 287, 0, 370, 370, 278, 278, 279, 0, 273, 269, 281, 273, 280, 265, 270, 272, 84, 277, 270, 261, 67, 262, 271, 259, 259, 370, 258, 0, 259, 260, 260, 258, 252, 0, 263, 261, 262, 246, 248, 245, 242, 240, 246, 249, 252, 83, 246, 245, 0, 239, 252, 235, 237, 241, 244, 248, 231, 235, 240, 239, 238, 232, 238, 228, 227, 233, 232, 235, 226, 0, 220, 0, 223, 219, 114, 216, 0, 0, 224, 218, 224, 222, 226, 220, 221, 209, 209, 176, 180, 0, 190, 178, 370, 184, 179, 173, 0, 0, 171, 185, 179, 182, 168, 172, 175, 162, 0, 172, 158, 166, 170, 159, 0, 158, 158, 153, 0, 160, 158, 0, 157, 150, 143, 146, 145, 133, 0, 129, 126, 137, 135, 123, 122, 122, 132, 131, 120, 129, 120, 127, 0, 119, 0, 125, 114, 113, 0, 120, 109, 115, 0, 113, 110, 99, 0, 100, 100, 0, 97, 0, 370, 220, 224, 228, 232, 236, 238, 242, 122, 66 } ; static yyconst flex_int16_t yy_def[291] = { 0, 281, 1, 282, 282, 283, 283, 284, 284, 284, 284, 285, 285, 286, 286, 284, 284, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 288, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 281, 281, 289, 288, 281, 281, 281, 281, 281, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 290, 281, 281, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 281, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 281, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 0, 281, 281, 281, 281, 281, 281, 281, 281, 281 } ; static yyconst flex_int16_t yy_nxt[418] = { 0, 18, 19, 20, 21, 19, 22, 23, 18, 18, 18, 18, 18, 24, 25, 18, 18, 26, 18, 27, 18, 18, 18, 18, 27, 28, 29, 30, 31, 32, 33, 27, 27, 34, 35, 27, 36, 37, 38, 39, 40, 41, 42, 27, 27, 18, 18, 18, 44, 45, 44, 45, 47, 48, 49, 50, 47, 48, 49, 50, 53, 53, 54, 54, 76, 52, 61, 52, 61, 146, 51, 62, 77, 62, 51, 55, 20, 53, 55, 56, 57, 91, 58, 63, 55, 63, 53, 55, 56, 55, 78, 53, 55, 56, 81, 163, 92, 79, 98, 82, 96, 164, 59, 55, 20, 53, 55, 56, 57, 72, 58, 73, 97, 99, 110, 114, 213, 74, 93, 213, 158, 111, 159, 186, 187, 122, 280, 279, 115, 278, 59, 52, 65, 66, 67, 277, 68, 276, 68, 68, 68, 68, 275, 68, 274, 273, 68, 272, 68, 69, 68, 68, 271, 270, 269, 268, 267, 266, 265, 264, 263, 262, 261, 260, 259, 258, 257, 256, 255, 254, 253, 252, 251, 68, 68, 68, 52, 65, 66, 67, 250, 68, 249, 68, 68, 68, 68, 248, 68, 247, 246, 68, 245, 68, 69, 68, 68, 244, 243, 242, 241, 240, 239, 238, 237, 236, 235, 234, 233, 232, 231, 230, 229, 228, 227, 226, 225, 224, 68, 68, 68, 43, 43, 43, 43, 46, 46, 46, 46, 52, 52, 52, 52, 60, 60, 60, 60, 64, 64, 64, 64, 70, 70, 94, 223, 94, 94, 222, 221, 220, 219, 218, 217, 216, 215, 214, 212, 211, 210, 209, 208, 207, 206, 205, 204, 203, 202, 201, 200, 199, 198, 197, 196, 195, 194, 193, 192, 191, 190, 189, 188, 185, 184, 183, 182, 181, 180, 179, 178, 177, 176, 175, 174, 173, 172, 171, 170, 169, 168, 167, 166, 165, 162, 161, 160, 157, 156, 155, 154, 153, 152, 151, 150, 149, 148, 147, 145, 144, 143, 142, 141, 140, 139, 138, 137, 136, 135, 134, 133, 132, 131, 130, 129, 128, 127, 126, 125, 124, 123, 121, 120, 119, 118, 117, 116, 113, 112, 109, 108, 107, 106, 105, 104, 103, 102, 101, 100, 95, 90, 89, 88, 87, 86, 85, 84, 83, 80, 75, 71, 281, 17, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281 } ; static yyconst flex_int16_t yy_chk[418] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 8, 7, 8, 31, 11, 11, 12, 12, 290, 5, 11, 31, 12, 6, 9, 9, 9, 9, 9, 9, 51, 9, 11, 15, 12, 15, 15, 15, 16, 32, 16, 16, 16, 34, 141, 51, 32, 69, 34, 63, 141, 9, 10, 10, 10, 10, 10, 10, 29, 10, 29, 63, 69, 81, 84, 195, 29, 51, 195, 137, 81, 137, 166, 166, 289, 279, 277, 84, 276, 10, 13, 13, 13, 13, 274, 13, 273, 13, 13, 13, 13, 272, 13, 270, 269, 13, 268, 13, 13, 13, 13, 266, 265, 264, 262, 260, 259, 258, 257, 256, 255, 254, 253, 252, 251, 250, 249, 248, 246, 245, 244, 243, 13, 13, 13, 14, 14, 14, 14, 242, 14, 241, 14, 14, 14, 14, 239, 14, 238, 236, 14, 235, 14, 14, 14, 14, 234, 232, 231, 230, 229, 228, 226, 225, 224, 223, 222, 221, 220, 219, 216, 215, 214, 212, 211, 209, 208, 14, 14, 14, 282, 282, 282, 282, 283, 283, 283, 283, 284, 284, 284, 284, 285, 285, 285, 285, 286, 286, 286, 286, 287, 287, 288, 207, 288, 288, 206, 205, 204, 203, 202, 201, 200, 199, 196, 194, 193, 191, 189, 188, 187, 186, 185, 184, 183, 182, 181, 180, 179, 178, 177, 176, 175, 174, 173, 172, 171, 170, 168, 167, 165, 164, 163, 162, 161, 160, 159, 158, 157, 156, 155, 153, 152, 151, 150, 149, 147, 145, 144, 143, 142, 140, 139, 138, 136, 135, 134, 133, 132, 131, 130, 129, 127, 126, 125, 121, 120, 119, 118, 117, 116, 115, 114, 113, 112, 111, 110, 109, 108, 106, 105, 104, 103, 102, 101, 100, 95, 94, 90, 89, 88, 87, 86, 85, 83, 82, 80, 79, 78, 77, 76, 75, 74, 73, 72, 71, 59, 42, 41, 40, 39, 38, 37, 36, 35, 33, 30, 28, 17, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281 } ; static yy_state_type yy_last_accepting_state; static char *yy_last_accepting_cpos; extern int outlangdef__flex_debug; int outlangdef__flex_debug = 0; /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. */ #define REJECT reject_used_but_not_detected #define yymore() yymore_used_but_not_detected #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET char *outlangdef_text; #line 1 "../../../lib/srchilite/outlangdefscanner.ll" #line 2 "../../../lib/srchilite/outlangdefscanner.ll" /* * Copyright (C) 1999-2005, Lorenzo Bettini, http://www.lorenzobettini.it * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ #include <sstream> #include "outlangdefparser.h" #include "outlangdefscanner.h" #include "fileutil.h" #include "ioexception.h" #include <stack> #include <stdlib.h> using namespace srchilite; //#define DEBUG_SCANNER #ifdef DEBUG_SCANNER #include <iostream> // for debug #define DEB(s) std::cerr << s << std::endl; #define DEB2(s,s2) std::cerr << s << ": " << s2 << std::endl; #else #define DEB(s) #define DEB2(s,s2) #endif #define PUSH(s) yy_push_state(s); #define POP() yy_pop_state(); static std::ostringstream buff; static void buffer(const char *s); static void buffer(const char c); static void buffer_escape(const char *c); static const std::string *flush_buffer(); static void open_include_file(const char *file); static void close_include_file(); ParseStructPtr outlang_parsestruct; typedef std::stack<ParseStructPtr> ParseStructStack; static ParseStructStack parsestructstack; #line 724 "../../../lib/srchilite/outlangdefscanner.cc" #define INITIAL 0 #define COMMENT_STATE 1 #define STRING_STATE 2 #define INCLUDE_STATE 3 #define TRANSLATION_STATE 4 #define REGEX_STATE 5 #define LITERAL_STATE 6 #define TRANSLATED_STATE 7 #ifndef YY_NO_UNISTD_H /* Special case for "unistd.h", since it is non-ANSI. We include it way * down here because we want the user's section 1 to have been scanned first. * The user has a chance to override it with an option. */ #include <unistd.h> #endif #ifndef YY_EXTRA_TYPE #define YY_EXTRA_TYPE void * #endif static int yy_init_globals (void ); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ int outlangdef_lex_destroy (void ); int outlangdef_get_debug (void ); void outlangdef_set_debug (int debug_flag ); YY_EXTRA_TYPE outlangdef_get_extra (void ); void outlangdef_set_extra (YY_EXTRA_TYPE user_defined ); FILE *outlangdef_get_in (void ); void outlangdef_set_in (FILE * in_str ); FILE *outlangdef_get_out (void ); void outlangdef_set_out (FILE * out_str ); int outlangdef_get_leng (void ); char *outlangdef_get_text (void ); int outlangdef_get_lineno (void ); void outlangdef_set_lineno (int line_number ); /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus extern "C" int outlangdef_wrap (void ); #else extern int outlangdef_wrap (void ); #endif #endif static void yyunput (int c,char *buf_ptr ); #ifndef yytext_ptr static void yy_flex_strncpy (char *,yyconst char *,int ); #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * ); #endif #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (void ); #else static int input (void ); #endif #endif static int yy_start_stack_ptr = 0; static int yy_start_stack_depth = 0; static int *yy_start_stack = NULL; static void yy_push_state (int new_state ); static void yy_pop_state (void ); static int yy_top_state (void ); /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE #ifdef __ia64__ /* On IA-64, the buffer size is 16k, not 8k */ #define YY_READ_BUF_SIZE 16384 #else #define YY_READ_BUF_SIZE 8192 #endif /* __ia64__ */ #endif /* Copy whatever the last rule matched to the standard output. */ #ifndef ECHO /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ #define ECHO do { if (fwrite( outlangdef_text, outlangdef_leng, 1, outlangdef_out )) {} } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, * is returned in "result". */ #ifndef YY_INPUT #define YY_INPUT(buf,result,max_size) \ if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ size_t n; \ for ( n = 0; n < max_size && \ (c = getc( outlangdef_in )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ if ( c == '\n' ) \ buf[n++] = (char) c; \ if ( c == EOF && ferror( outlangdef_in ) ) \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ result = n; \ } \ else \ { \ errno=0; \ while ( (result = fread(buf, 1, max_size, outlangdef_in))==0 && ferror(outlangdef_in)) \ { \ if( errno != EINTR) \ { \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ break; \ } \ errno=0; \ clearerr(outlangdef_in); \ } \ }\ \ #endif /* No semi-colon after return; correct usage is to write "yyterminate();" - * we don't want an extra ';' after the "return" because that will cause * some compilers to complain about unreachable statements. */ #ifndef yyterminate #define yyterminate() return YY_NULL #endif /* Number of entries by which start-condition stack grows. */ #ifndef YY_START_STACK_INCR #define YY_START_STACK_INCR 25 #endif /* Report a fatal error. */ #ifndef YY_FATAL_ERROR #define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) #endif /* end tables serialization structures and prototypes */ /* Default declaration of generated scanner - a define so the user can * easily add parameters. */ #ifndef YY_DECL #define YY_DECL_IS_OURS 1 extern int outlangdef_lex (void); #define YY_DECL int outlangdef_lex (void) #endif /* !YY_DECL */ /* Code executed at the beginning of each rule, after outlangdef_text and outlangdef_leng * have been set up. */ #ifndef YY_USER_ACTION #define YY_USER_ACTION #endif /* Code executed at the end of each rule. */ #ifndef YY_BREAK #define YY_BREAK break; #endif #define YY_RULE_SETUP \ YY_USER_ACTION /** The main scanner function which does all the work. */ YY_DECL { register yy_state_type yy_current_state; register char *yy_cp, *yy_bp; register int yy_act; #line 77 "../../../lib/srchilite/outlangdefscanner.ll" #line 931 "../../../lib/srchilite/outlangdefscanner.cc" if ( !(yy_init) ) { (yy_init) = 1; #ifdef YY_USER_INIT YY_USER_INIT; #endif if ( ! (yy_start) ) (yy_start) = 1; /* first start state */ if ( ! outlangdef_in ) outlangdef_in = stdin; if ( ! outlangdef_out ) outlangdef_out = stdout; if ( ! YY_CURRENT_BUFFER ) { outlangdef_ensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = outlangdef__create_buffer(outlangdef_in,YY_BUF_SIZE ); } outlangdef__load_buffer_state( ); } while ( 1 ) /* loops until end-of-file is reached */ { yy_cp = (yy_c_buf_p); /* Support of outlangdef_text. */ *yy_cp = (yy_hold_char); /* yy_bp points to the position in yy_ch_buf of the start of * the current run. */ yy_bp = yy_cp; yy_current_state = (yy_start); yy_match: do { register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 282 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ++yy_cp; } while ( yy_base[yy_current_state] != 370 ); yy_find_action: yy_act = yy_accept[yy_current_state]; if ( yy_act == 0 ) { /* have to back up */ yy_cp = (yy_last_accepting_cpos); yy_current_state = (yy_last_accepting_state); yy_act = yy_accept[yy_current_state]; } YY_DO_BEFORE_ACTION; do_action: /* This label is used only to access EOF actions. */ switch ( yy_act ) { /* beginning of action switch */ case 0: /* must back up */ /* undo the effects of YY_DO_BEFORE_ACTION */ *yy_cp = (yy_hold_char); yy_cp = (yy_last_accepting_cpos); yy_current_state = (yy_last_accepting_state); goto yy_find_action; case 1: YY_RULE_SETUP #line 79 "../../../lib/srchilite/outlangdefscanner.ll" {} YY_BREAK case 2: YY_RULE_SETUP #line 81 "../../../lib/srchilite/outlangdefscanner.ll" {} YY_BREAK case 3: YY_RULE_SETUP #line 83 "../../../lib/srchilite/outlangdefscanner.ll" { PUSH(COMMENT_STATE); } YY_BREAK case 4: YY_RULE_SETUP #line 84 "../../../lib/srchilite/outlangdefscanner.ll" {} YY_BREAK case 5: /* rule 5 can match eol */ YY_RULE_SETUP #line 85 "../../../lib/srchilite/outlangdefscanner.ll" { ++(outlang_parsestruct->line); POP(); } YY_BREAK case 6: YY_RULE_SETUP #line 87 "../../../lib/srchilite/outlangdefscanner.ll" { return NODOC_TEMPLATE_T ; } YY_BREAK case 7: YY_RULE_SETUP #line 88 "../../../lib/srchilite/outlangdefscanner.ll" { return DOC_TEMPLATE_T ; } YY_BREAK case 8: YY_RULE_SETUP #line 89 "../../../lib/srchilite/outlangdefscanner.ll" { return STYLE_TEMPLATE_T ; } YY_BREAK case 9: YY_RULE_SETUP #line 90 "../../../lib/srchilite/outlangdefscanner.ll" { return STYLE_SEPARATOR_T ; } YY_BREAK case 10: YY_RULE_SETUP #line 91 "../../../lib/srchilite/outlangdefscanner.ll" { return BOLD_T ; } YY_BREAK case 11: YY_RULE_SETUP #line 92 "../../../lib/srchilite/outlangdefscanner.ll" { return ITALICS_T ; } YY_BREAK case 12: YY_RULE_SETUP #line 93 "../../../lib/srchilite/outlangdefscanner.ll" { return UNDERLINE_T ; } YY_BREAK case 13: YY_RULE_SETUP #line 94 "../../../lib/srchilite/outlangdefscanner.ll" { return NOTFIXED_T ; } YY_BREAK case 14: YY_RULE_SETUP #line 95 "../../../lib/srchilite/outlangdefscanner.ll" { return FIXED_T ; } YY_BREAK case 15: YY_RULE_SETUP #line 96 "../../../lib/srchilite/outlangdefscanner.ll" { return COLORMAP_T ; } YY_BREAK case 16: YY_RULE_SETUP #line 97 "../../../lib/srchilite/outlangdefscanner.ll" { return BG_COLOR_T ; } YY_BREAK case 17: YY_RULE_SETUP #line 98 "../../../lib/srchilite/outlangdefscanner.ll" { return COLOR_T ; } YY_BREAK case 18: YY_RULE_SETUP #line 99 "../../../lib/srchilite/outlangdefscanner.ll" { return DEFAULT_T ; } YY_BREAK case 19: YY_RULE_SETUP #line 100 "../../../lib/srchilite/outlangdefscanner.ll" { return ONESTYLE_T ; } YY_BREAK case 20: YY_RULE_SETUP #line 101 "../../../lib/srchilite/outlangdefscanner.ll" { return EXTENSION_T ; } YY_BREAK case 21: YY_RULE_SETUP #line 102 "../../../lib/srchilite/outlangdefscanner.ll" { return ANCHOR_T ; } YY_BREAK case 22: YY_RULE_SETUP #line 103 "../../../lib/srchilite/outlangdefscanner.ll" { return INLINE_REFERENCE_T ; } YY_BREAK case 23: YY_RULE_SETUP #line 104 "../../../lib/srchilite/outlangdefscanner.ll" { return POSTLINE_REFERENCE_T ; } YY_BREAK case 24: YY_RULE_SETUP #line 105 "../../../lib/srchilite/outlangdefscanner.ll" { return POSTDOC_REFERENCE_T ; } YY_BREAK case 25: YY_RULE_SETUP #line 106 "../../../lib/srchilite/outlangdefscanner.ll" { return REFERENCE_T ; } YY_BREAK case 26: YY_RULE_SETUP #line 107 "../../../lib/srchilite/outlangdefscanner.ll" { return LINE_PREFIX_T; } YY_BREAK case 27: YY_RULE_SETUP #line 108 "../../../lib/srchilite/outlangdefscanner.ll" { return LINENUM_T; } YY_BREAK case 28: YY_RULE_SETUP #line 109 "../../../lib/srchilite/outlangdefscanner.ll" { BEGIN(TRANSLATION_STATE); return TRANSLATIONS_T ; } YY_BREAK case 29: YY_RULE_SETUP #line 110 "../../../lib/srchilite/outlangdefscanner.ll" { return BEGIN_T ; } YY_BREAK case 30: YY_RULE_SETUP #line 111 "../../../lib/srchilite/outlangdefscanner.ll" { BEGIN(INITIAL); return END_T ; } YY_BREAK case 31: YY_RULE_SETUP #line 113 "../../../lib/srchilite/outlangdefscanner.ll" { BEGIN(INCLUDE_STATE); } YY_BREAK case 32: YY_RULE_SETUP #line 114 "../../../lib/srchilite/outlangdefscanner.ll" { char *file_name = &outlangdef_text[1]; file_name[strlen(file_name)-1] = '\0'; try { open_include_file(file_name); } catch (IOException &e) { outlangdef_lval.string = new std::string(e.filename); return WRONG_INCLUDE_FILE; } outlangdef_push_buffer_state(outlangdef__create_buffer(outlangdef_in,YY_BUF_SIZE)); BEGIN(INITIAL); } YY_BREAK case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(COMMENT_STATE): case YY_STATE_EOF(STRING_STATE): case YY_STATE_EOF(INCLUDE_STATE): case YY_STATE_EOF(TRANSLATION_STATE): case YY_STATE_EOF(REGEX_STATE): case YY_STATE_EOF(LITERAL_STATE): case YY_STATE_EOF(TRANSLATED_STATE): #line 130 "../../../lib/srchilite/outlangdefscanner.ll" { fclose(outlangdef_in); outlangdef_in = 0; outlangdef_pop_buffer_state(); if ( !YY_CURRENT_BUFFER ) { yyterminate(); } else close_include_file(); } YY_BREAK case 33: YY_RULE_SETUP #line 143 "../../../lib/srchilite/outlangdefscanner.ll" { DEB2("KEY",outlangdef_text); outlangdef_lval.string = new std::string(outlangdef_text) ; return KEY ; } YY_BREAK case 34: YY_RULE_SETUP #line 144 "../../../lib/srchilite/outlangdefscanner.ll" { return '=' ; } YY_BREAK case 35: YY_RULE_SETUP #line 145 "../../../lib/srchilite/outlangdefscanner.ll" { return ',' ; } YY_BREAK case 36: YY_RULE_SETUP #line 146 "../../../lib/srchilite/outlangdefscanner.ll" { return '+' ; } YY_BREAK case 37: YY_RULE_SETUP #line 148 "../../../lib/srchilite/outlangdefscanner.ll" { BEGIN(STRING_STATE) ; } YY_BREAK case 38: YY_RULE_SETUP #line 149 "../../../lib/srchilite/outlangdefscanner.ll" { string s = &outlangdef_text[1]; s = "0" + s; int i = strtol(s.c_str(), (char **)NULL, 0); buffer( (char)i ) ; } YY_BREAK case 39: YY_RULE_SETUP #line 155 "../../../lib/srchilite/outlangdefscanner.ll" { buffer( outlangdef_text ) ; } YY_BREAK case 40: YY_RULE_SETUP #line 156 "../../../lib/srchilite/outlangdefscanner.ll" { buffer( "\"" ) ; } YY_BREAK case 41: YY_RULE_SETUP #line 157 "../../../lib/srchilite/outlangdefscanner.ll" { BEGIN(INITIAL) ; outlangdef_lval.string = flush_buffer() ; DEB2("STRINGDEF",outlangdef_lval.string); return STRINGDEF; } YY_BREAK case 42: YY_RULE_SETUP #line 158 "../../../lib/srchilite/outlangdefscanner.ll" { buffer( outlangdef_text ) ; } YY_BREAK case 43: /* rule 43 can match eol */ YY_RULE_SETUP #line 159 "../../../lib/srchilite/outlangdefscanner.ll" { buffer( "\n" ) ; } YY_BREAK case 44: YY_RULE_SETUP #line 161 "../../../lib/srchilite/outlangdefscanner.ll" { BEGIN(LITERAL_STATE) ; } YY_BREAK case 45: YY_RULE_SETUP #line 162 "../../../lib/srchilite/outlangdefscanner.ll" { buffer_escape( outlangdef_text ) ; } YY_BREAK case 46: YY_RULE_SETUP #line 163 "../../../lib/srchilite/outlangdefscanner.ll" { buffer( outlangdef_text ) ; } YY_BREAK case 47: YY_RULE_SETUP #line 164 "../../../lib/srchilite/outlangdefscanner.ll" { buffer( outlangdef_text ) ; } YY_BREAK case 48: YY_RULE_SETUP #line 165 "../../../lib/srchilite/outlangdefscanner.ll" { BEGIN(TRANSLATION_STATE) ; outlangdef_lval.string = flush_buffer() ; DEB2("STRINGDEF",loutlangdef_lval.string); return REGEXDEF; } YY_BREAK case 49: YY_RULE_SETUP #line 166 "../../../lib/srchilite/outlangdefscanner.ll" { buffer( outlangdef_text ) ; } YY_BREAK case 50: YY_RULE_SETUP #line 168 "../../../lib/srchilite/outlangdefscanner.ll" { BEGIN(REGEX_STATE) ; } YY_BREAK case 51: YY_RULE_SETUP #line 169 "../../../lib/srchilite/outlangdefscanner.ll" { buffer( outlangdef_text ) ; } YY_BREAK case 52: YY_RULE_SETUP #line 170 "../../../lib/srchilite/outlangdefscanner.ll" { buffer( "'" ) ; } YY_BREAK case 53: YY_RULE_SETUP #line 171 "../../../lib/srchilite/outlangdefscanner.ll" { BEGIN(TRANSLATED_STATE) ; // entering TRANSLATED_STATE makes sure that 'regex' is used only // for specifying the sequence to be translated, and not the translated sequence outlangdef_lval.string = flush_buffer() ; DEB2("STRINGDEF",outlangdef_lval.string); return REGEXDEF; } YY_BREAK case 54: YY_RULE_SETUP #line 178 "../../../lib/srchilite/outlangdefscanner.ll" { buffer( outlangdef_text ) ; } YY_BREAK case 55: /* rule 55 can match eol */ YY_RULE_SETUP #line 180 "../../../lib/srchilite/outlangdefscanner.ll" { DEB("NEWLINE"); ++(outlang_parsestruct->line) ; } YY_BREAK case 56: YY_RULE_SETUP #line 182 "../../../lib/srchilite/outlangdefscanner.ll" { return outlangdef_text[0] ; } YY_BREAK case 57: YY_RULE_SETUP #line 184 "../../../lib/srchilite/outlangdefscanner.ll" ECHO; YY_BREAK #line 1349 "../../../lib/srchilite/outlangdefscanner.cc" case YY_END_OF_BUFFER: { /* Amount of text matched not including the EOB char. */ int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; /* Undo the effects of YY_DO_BEFORE_ACTION. */ *yy_cp = (yy_hold_char); YY_RESTORE_YY_MORE_OFFSET if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) { /* We're scanning a new file or input source. It's * possible that this happened because the user * just pointed outlangdef_in at a new source and called * outlangdef_lex(). If so, then we have to assure * consistency between YY_CURRENT_BUFFER and our * globals. Here is the right place to do so, because * this is the first action (other than possibly a * back-up) that will match for the new input source. */ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; YY_CURRENT_BUFFER_LVALUE->yy_input_file = outlangdef_in; YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; } /* Note that here we test for yy_c_buf_p "<=" to the position * of the first EOB in the buffer, since yy_c_buf_p will * already have been incremented past the NUL character * (since all states make transitions on EOB to the * end-of-buffer state). Contrast this with the test * in input(). */ if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) { /* This was really a NUL. */ yy_state_type yy_next_state; (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state( ); /* Okay, we're now positioned to make the NUL * transition. We couldn't have * yy_get_previous_state() go ahead and do it * for us because it doesn't know how to deal * with the possibility of jamming (and we don't * want to build jamming into it because then it * will run more slowly). */ yy_next_state = yy_try_NUL_trans( yy_current_state ); yy_bp = (yytext_ptr) + YY_MORE_ADJ; if ( yy_next_state ) { /* Consume the NUL. */ yy_cp = ++(yy_c_buf_p); yy_current_state = yy_next_state; goto yy_match; } else { yy_cp = (yy_c_buf_p); goto yy_find_action; } } else switch ( yy_get_next_buffer( ) ) { case EOB_ACT_END_OF_FILE: { (yy_did_buffer_switch_on_eof) = 0; if ( outlangdef_wrap( ) ) { /* Note: because we've taken care in * yy_get_next_buffer() to have set up * outlangdef_text, we can now set up * yy_c_buf_p so that if some total * hoser (like flex itself) wants to * call the scanner after we return the * YY_NULL, it'll still work - another * YY_NULL will get returned. */ (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; yy_act = YY_STATE_EOF(YY_START); goto do_action; } else { if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; } break; } case EOB_ACT_CONTINUE_SCAN: (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state( ); yy_cp = (yy_c_buf_p); yy_bp = (yytext_ptr) + YY_MORE_ADJ; goto yy_match; case EOB_ACT_LAST_MATCH: (yy_c_buf_p) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; yy_current_state = yy_get_previous_state( ); yy_cp = (yy_c_buf_p); yy_bp = (yytext_ptr) + YY_MORE_ADJ; goto yy_find_action; } break; } default: YY_FATAL_ERROR( "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ } /* end of outlangdef_lex */ /* yy_get_next_buffer - try to read in a new buffer * * Returns a code representing an action: * EOB_ACT_LAST_MATCH - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ static int yy_get_next_buffer (void) { register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; register char *source = (yytext_ptr); register int number_to_move, i; int ret_val; if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) YY_FATAL_ERROR( "fatal flex scanner internal error--end of buffer missed" ); if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) { /* Don't try to fill the buffer, so this is an EOF. */ if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) { /* We matched a single character, the EOB, so * treat this as a final EOF. */ return EOB_ACT_END_OF_FILE; } else { /* We matched some text prior to the EOB, first * process it. */ return EOB_ACT_LAST_MATCH; } } /* Try to read more data. */ /* First move last chars to start of buffer. */ number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) /* don't do the read, it's not guaranteed to return an EOF, * just force an EOF */ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; else { int num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) { /* Not enough room in the buffer - grow it. */ /* just a shorter name for the current buffer */ YY_BUFFER_STATE b = YY_CURRENT_BUFFER; int yy_c_buf_p_offset = (int) ((yy_c_buf_p) - b->yy_ch_buf); if ( b->yy_is_our_buffer ) { int new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; else b->yy_buf_size *= 2; b->yy_ch_buf = (char *) /* Include room in for 2 EOB chars. */ outlangdef_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); } else /* Can't grow it, we don't own it. */ b->yy_ch_buf = 0; if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "fatal error - scanner input buffer overflow" ); (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; } if ( num_to_read > YY_READ_BUF_SIZE ) num_to_read = YY_READ_BUF_SIZE; /* Read in more data. */ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), (yy_n_chars), (size_t) num_to_read ); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } if ( (yy_n_chars) == 0 ) { if ( number_to_move == YY_MORE_ADJ ) { ret_val = EOB_ACT_END_OF_FILE; outlangdef_restart(outlangdef_in ); } else { ret_val = EOB_ACT_LAST_MATCH; YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_EOF_PENDING; } } else ret_val = EOB_ACT_CONTINUE_SCAN; if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { /* Extend the array by 50%, plus the number we really need. */ yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) outlangdef_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); } (yy_n_chars) += number_to_move; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; return ret_val; } /* yy_get_previous_state - get the state just before the EOB char was reached */ static yy_state_type yy_get_previous_state (void) { register yy_state_type yy_current_state; register char *yy_cp; yy_current_state = (yy_start); for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) { register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 282 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; } return yy_current_state; } /* yy_try_NUL_trans - try to make a transition on the NUL character * * synopsis * next_state = yy_try_NUL_trans( current_state ); */ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) { register int yy_is_jam; register char *yy_cp = (yy_c_buf_p); register YY_CHAR yy_c = 1; if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 282 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; yy_is_jam = (yy_current_state == 281); return yy_is_jam ? 0 : yy_current_state; } static void yyunput (int c, register char * yy_bp ) { register char *yy_cp; yy_cp = (yy_c_buf_p); /* undo effects of setting up outlangdef_text */ *yy_cp = (yy_hold_char); if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) { /* need to shift things up to make room */ /* +2 for EOB chars. */ register int number_to_move = (yy_n_chars) + 2; register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; register char *source = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) *--dest = *--source; yy_cp += (int) (dest - source); yy_bp += (int) (dest - source); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) YY_FATAL_ERROR( "flex scanner push-back overflow" ); } *--yy_cp = (char) c; (yytext_ptr) = yy_bp; (yy_hold_char) = *yy_cp; (yy_c_buf_p) = yy_cp; } #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (void) #else static int input (void) #endif { int c; *(yy_c_buf_p) = (yy_hold_char); if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) { /* yy_c_buf_p now points to the character we want to return. * If this occurs *before* the EOB characters, then it's a * valid NUL; if not, then we've hit the end of the buffer. */ if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) /* This was really a NUL. */ *(yy_c_buf_p) = '\0'; else { /* need more input */ int offset = (yy_c_buf_p) - (yytext_ptr); ++(yy_c_buf_p); switch ( yy_get_next_buffer( ) ) { case EOB_ACT_LAST_MATCH: /* This happens because yy_g_n_b() * sees that we've accumulated a * token and flags that we need to * try matching the token before * proceeding. But for input(), * there's no matching to consider. * So convert the EOB_ACT_LAST_MATCH * to EOB_ACT_END_OF_FILE. */ /* Reset buffer status. */ outlangdef_restart(outlangdef_in ); /*FALLTHROUGH*/ case EOB_ACT_END_OF_FILE: { if ( outlangdef_wrap( ) ) return EOF; if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; #ifdef __cplusplus return yyinput(); #else return input(); #endif } case EOB_ACT_CONTINUE_SCAN: (yy_c_buf_p) = (yytext_ptr) + offset; break; } } } c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ *(yy_c_buf_p) = '\0'; /* preserve outlangdef_text */ (yy_hold_char) = *++(yy_c_buf_p); return c; } #endif /* ifndef YY_NO_INPUT */ /** Immediately switch to a different input stream. * @param input_file A readable stream. * * @note This function does not reset the start condition to @c INITIAL . */ void outlangdef_restart (FILE * input_file ) { if ( ! YY_CURRENT_BUFFER ){ outlangdef_ensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = outlangdef__create_buffer(outlangdef_in,YY_BUF_SIZE ); } outlangdef__init_buffer(YY_CURRENT_BUFFER,input_file ); outlangdef__load_buffer_state( ); } /** Switch to a different input buffer. * @param new_buffer The new input buffer. * */ void outlangdef__switch_to_buffer (YY_BUFFER_STATE new_buffer ) { /* TODO. We should be able to replace this entire function body * with * outlangdef_pop_buffer_state(); * outlangdef_push_buffer_state(new_buffer); */ outlangdef_ensure_buffer_stack (); if ( YY_CURRENT_BUFFER == new_buffer ) return; if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ *(yy_c_buf_p) = (yy_hold_char); YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } YY_CURRENT_BUFFER_LVALUE = new_buffer; outlangdef__load_buffer_state( ); /* We don't actually know whether we did this switch during * EOF (outlangdef_wrap()) processing, but the only time this flag * is looked at is after outlangdef_wrap() is called, so it's safe * to go ahead and always set it. */ (yy_did_buffer_switch_on_eof) = 1; } static void outlangdef__load_buffer_state (void) { (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; outlangdef_in = YY_CURRENT_BUFFER_LVALUE->yy_input_file; (yy_hold_char) = *(yy_c_buf_p); } /** Allocate and initialize an input buffer state. * @param file A readable stream. * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. * * @return the allocated buffer state. */ YY_BUFFER_STATE outlangdef__create_buffer (FILE * file, int size ) { YY_BUFFER_STATE b; b = (YY_BUFFER_STATE) outlangdef_alloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in outlangdef__create_buffer()" ); b->yy_buf_size = size; /* yy_ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. */ b->yy_ch_buf = (char *) outlangdef_alloc(b->yy_buf_size + 2 ); if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in outlangdef__create_buffer()" ); b->yy_is_our_buffer = 1; outlangdef__init_buffer(b,file ); return b; } /** Destroy the buffer. * @param b a buffer created with outlangdef__create_buffer() * */ void outlangdef__delete_buffer (YY_BUFFER_STATE b ) { if ( ! b ) return; if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; if ( b->yy_is_our_buffer ) outlangdef_free((void *) b->yy_ch_buf ); outlangdef_free((void *) b ); } #ifndef __cplusplus extern int isatty (int ); #endif /* __cplusplus */ /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a outlangdef_restart() or at EOF. */ static void outlangdef__init_buffer (YY_BUFFER_STATE b, FILE * file ) { int oerrno = errno; outlangdef__flush_buffer(b ); b->yy_input_file = file; b->yy_fill_buffer = 1; /* If b is the current buffer, then outlangdef__init_buffer was _probably_ * called from outlangdef_restart() or through yy_get_next_buffer. * In that case, we don't want to reset the lineno or column. */ if (b != YY_CURRENT_BUFFER){ b->yy_bs_lineno = 1; b->yy_bs_column = 0; } b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; errno = oerrno; } /** Discard all buffered characters. On the next scan, YY_INPUT will be called. * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. * */ void outlangdef__flush_buffer (YY_BUFFER_STATE b ) { if ( ! b ) return; b->yy_n_chars = 0; /* We always need two end-of-buffer characters. The first causes * a transition to the end-of-buffer state. The second causes * a jam in that state. */ b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; b->yy_buf_pos = &b->yy_ch_buf[0]; b->yy_at_bol = 1; b->yy_buffer_status = YY_BUFFER_NEW; if ( b == YY_CURRENT_BUFFER ) outlangdef__load_buffer_state( ); } /** Pushes the new state onto the stack. The new state becomes * the current state. This function will allocate the stack * if necessary. * @param new_buffer The new state. * */ void outlangdef_push_buffer_state (YY_BUFFER_STATE new_buffer ) { if (new_buffer == NULL) return; outlangdef_ensure_buffer_stack(); /* This block is copied from outlangdef__switch_to_buffer. */ if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ *(yy_c_buf_p) = (yy_hold_char); YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } /* Only push if top exists. Otherwise, replace top. */ if (YY_CURRENT_BUFFER) (yy_buffer_stack_top)++; YY_CURRENT_BUFFER_LVALUE = new_buffer; /* copied from outlangdef__switch_to_buffer. */ outlangdef__load_buffer_state( ); (yy_did_buffer_switch_on_eof) = 1; } /** Removes and deletes the top of the stack, if present. * The next element becomes the new top. * */ void outlangdef_pop_buffer_state (void) { if (!YY_CURRENT_BUFFER) return; outlangdef__delete_buffer(YY_CURRENT_BUFFER ); YY_CURRENT_BUFFER_LVALUE = NULL; if ((yy_buffer_stack_top) > 0) --(yy_buffer_stack_top); if (YY_CURRENT_BUFFER) { outlangdef__load_buffer_state( ); (yy_did_buffer_switch_on_eof) = 1; } } /* Allocates the stack if it does not exist. * Guarantees space for at least one push. */ static void outlangdef_ensure_buffer_stack (void) { int num_to_alloc; if (!(yy_buffer_stack)) { /* First allocation is just for 2 elements, since we don't know if this * scanner will even need a stack. We use 2 instead of 1 to avoid an * immediate realloc on the next call. */ num_to_alloc = 1; (yy_buffer_stack) = (struct yy_buffer_state**)outlangdef_alloc (num_to_alloc * sizeof(struct yy_buffer_state*) ); if ( ! (yy_buffer_stack) ) YY_FATAL_ERROR( "out of dynamic memory in outlangdef_ensure_buffer_stack()" ); memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); (yy_buffer_stack_max) = num_to_alloc; (yy_buffer_stack_top) = 0; return; } if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ /* Increase the buffer to prepare for a possible push. */ int grow_size = 8 /* arbitrary grow size */; num_to_alloc = (yy_buffer_stack_max) + grow_size; (yy_buffer_stack) = (struct yy_buffer_state**)outlangdef_realloc ((yy_buffer_stack), num_to_alloc * sizeof(struct yy_buffer_state*) ); if ( ! (yy_buffer_stack) ) YY_FATAL_ERROR( "out of dynamic memory in outlangdef_ensure_buffer_stack()" ); /* zero only the new slots.*/ memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); (yy_buffer_stack_max) = num_to_alloc; } } /** Setup the input buffer state to scan directly from a user-specified character buffer. * @param base the character buffer * @param size the size in bytes of the character buffer * * @return the newly allocated buffer state object. */ YY_BUFFER_STATE outlangdef__scan_buffer (char * base, yy_size_t size ) { YY_BUFFER_STATE b; if ( size < 2 || base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) /* They forgot to leave room for the EOB's. */ return 0; b = (YY_BUFFER_STATE) outlangdef_alloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in outlangdef__scan_buffer()" ); b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ b->yy_buf_pos = b->yy_ch_buf = base; b->yy_is_our_buffer = 0; b->yy_input_file = 0; b->yy_n_chars = b->yy_buf_size; b->yy_is_interactive = 0; b->yy_at_bol = 1; b->yy_fill_buffer = 0; b->yy_buffer_status = YY_BUFFER_NEW; outlangdef__switch_to_buffer(b ); return b; } /** Setup the input buffer state to scan a string. The next call to outlangdef_lex() will * scan from a @e copy of @a str. * @param yystr a NUL-terminated string to scan * * @return the newly allocated buffer state object. * @note If you want to scan bytes that may contain NUL values, then use * outlangdef__scan_bytes() instead. */ YY_BUFFER_STATE outlangdef__scan_string (yyconst char * yystr ) { return outlangdef__scan_bytes(yystr,strlen(yystr) ); } /** Setup the input buffer state to scan the given bytes. The next call to outlangdef_lex() will * scan from a @e copy of @a bytes. * @param yybytes the byte buffer to scan * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. * * @return the newly allocated buffer state object. */ YY_BUFFER_STATE outlangdef__scan_bytes (yyconst char * yybytes, int _yybytes_len ) { YY_BUFFER_STATE b; char *buf; yy_size_t n; int i; /* Get memory for full buffer, including space for trailing EOB's. */ n = _yybytes_len + 2; buf = (char *) outlangdef_alloc(n ); if ( ! buf ) YY_FATAL_ERROR( "out of dynamic memory in outlangdef__scan_bytes()" ); for ( i = 0; i < _yybytes_len; ++i ) buf[i] = yybytes[i]; buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; b = outlangdef__scan_buffer(buf,n ); if ( ! b ) YY_FATAL_ERROR( "bad buffer in outlangdef__scan_bytes()" ); /* It's okay to grow etc. this buffer, and we should throw it * away when we're done. */ b->yy_is_our_buffer = 1; return b; } static void yy_push_state (int new_state ) { if ( (yy_start_stack_ptr) >= (yy_start_stack_depth) ) { yy_size_t new_size; (yy_start_stack_depth) += YY_START_STACK_INCR; new_size = (yy_start_stack_depth) * sizeof( int ); if ( ! (yy_start_stack) ) (yy_start_stack) = (int *) outlangdef_alloc(new_size ); else (yy_start_stack) = (int *) outlangdef_realloc((void *) (yy_start_stack),new_size ); if ( ! (yy_start_stack) ) YY_FATAL_ERROR( "out of memory expanding start-condition stack" ); } (yy_start_stack)[(yy_start_stack_ptr)++] = YY_START; BEGIN(new_state); } static void yy_pop_state (void) { if ( --(yy_start_stack_ptr) < 0 ) YY_FATAL_ERROR( "start-condition stack underflow" ); BEGIN((yy_start_stack)[(yy_start_stack_ptr)]); } static int yy_top_state (void) { return (yy_start_stack)[(yy_start_stack_ptr) - 1]; } #ifndef YY_EXIT_FAILURE #define YY_EXIT_FAILURE 2 #endif static void yy_fatal_error (yyconst char* msg ) { (void) fprintf( stderr, "%s\n", msg ); exit( YY_EXIT_FAILURE ); } /* Redefine yyless() so it works in section 3 code. */ #undef yyless #define yyless(n) \ do \ { \ /* Undo effects of setting up outlangdef_text. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ outlangdef_text[outlangdef_leng] = (yy_hold_char); \ (yy_c_buf_p) = outlangdef_text + yyless_macro_arg; \ (yy_hold_char) = *(yy_c_buf_p); \ *(yy_c_buf_p) = '\0'; \ outlangdef_leng = yyless_macro_arg; \ } \ while ( 0 ) /* Accessor methods (get/set functions) to struct members. */ /** Get the current line number. * */ int outlangdef_get_lineno (void) { return outlangdef_lineno; } /** Get the input stream. * */ FILE *outlangdef_get_in (void) { return outlangdef_in; } /** Get the output stream. * */ FILE *outlangdef_get_out (void) { return outlangdef_out; } /** Get the length of the current token. * */ int outlangdef_get_leng (void) { return outlangdef_leng; } /** Get the current token. * */ char *outlangdef_get_text (void) { return outlangdef_text; } /** Set the current line number. * @param line_number * */ void outlangdef_set_lineno (int line_number ) { outlangdef_lineno = line_number; } /** Set the input stream. This does not discard the current * input buffer. * @param in_str A readable stream. * * @see outlangdef__switch_to_buffer */ void outlangdef_set_in (FILE * in_str ) { outlangdef_in = in_str ; } void outlangdef_set_out (FILE * out_str ) { outlangdef_out = out_str ; } int outlangdef_get_debug (void) { return outlangdef__flex_debug; } void outlangdef_set_debug (int bdebug ) { outlangdef__flex_debug = bdebug ; } static int yy_init_globals (void) { /* Initialization is the same as for the non-reentrant scanner. * This function is called from outlangdef_lex_destroy(), so don't allocate here. */ (yy_buffer_stack) = 0; (yy_buffer_stack_top) = 0; (yy_buffer_stack_max) = 0; (yy_c_buf_p) = (char *) 0; (yy_init) = 0; (yy_start) = 0; (yy_start_stack_ptr) = 0; (yy_start_stack_depth) = 0; (yy_start_stack) = NULL; /* Defined in main.c */ #ifdef YY_STDINIT outlangdef_in = stdin; outlangdef_out = stdout; #else outlangdef_in = (FILE *) 0; outlangdef_out = (FILE *) 0; #endif /* For future reference: Set errno on error, since we are called by * outlangdef_lex_init() */ return 0; } /* outlangdef_lex_destroy is for both reentrant and non-reentrant scanners. */ int outlangdef_lex_destroy (void) { /* Pop the buffer stack, destroying each element. */ while(YY_CURRENT_BUFFER){ outlangdef__delete_buffer(YY_CURRENT_BUFFER ); YY_CURRENT_BUFFER_LVALUE = NULL; outlangdef_pop_buffer_state(); } /* Destroy the stack itself. */ outlangdef_free((yy_buffer_stack) ); (yy_buffer_stack) = NULL; /* Destroy the start condition stack. */ outlangdef_free((yy_start_stack) ); (yy_start_stack) = NULL; /* Reset the globals. This is important in a non-reentrant scanner so the next time * outlangdef_lex() is called, initialization will occur. */ yy_init_globals( ); return 0; } /* * Internal utility routines. */ #ifndef yytext_ptr static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) { register int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * s ) { register int n; for ( n = 0; s[n]; ++n ) ; return n; } #endif void *outlangdef_alloc (yy_size_t size ) { return (void *) malloc( size ); } void *outlangdef_realloc (void * ptr, yy_size_t size ) { /* The cast to (char *) in the following accommodates both * implementations that use char* generic pointers, and those * that use void* generic pointers. It works with the latter * because both ANSI C and C++ allow castless assignment from * any pointer type to void*, and deal with argument conversions * as though doing an assignment. */ return (void *) realloc( (char *) ptr, size ); } void outlangdef_free (void * ptr ) { free( (char *) ptr ); /* see outlangdef_realloc() for (char *) cast */ } #define YYTABLES_NAME "yytables" #line 184 "../../../lib/srchilite/outlangdefscanner.ll" void buffer(const char *s) { buff << s; } void buffer(const char s) { buff << s; } void buffer_escape(const char *s) { buff << "\\" << s; } const std::string *flush_buffer() { const std::string *ret = new std::string(buff.str()); buff.str(""); return ret; } void open_include_file(const char *name) { string file_name = name; string path = outlang_parsestruct->path; if (! contains_path(name) && contains_path(outlang_parsestruct->file_name)) path = get_file_path(outlang_parsestruct->file_name); parsestructstack.push(outlang_parsestruct); outlang_parsestruct = ParseStructPtr(new ParseStruct(path, file_name)); open_outlang_file_to_scan(path.c_str(), file_name.c_str()); } void close_include_file() { outlang_parsestruct = parsestructstack.top(); parsestructstack.pop(); } namespace srchilite { void open_outlang_file_to_scan(const string &path, const string &name) { outlangdef_in = open_data_file_stream(path, name); } void clear_outlangdefscanner() { //delete stringTable; outlangdef_lex_destroy(); } void close_outlangdefinputfile() { // also close possible open files due to inclusions do { if (outlangdef_in) fclose(outlangdef_in); outlangdef_pop_buffer_state(); } while ( YY_CURRENT_BUFFER ); } } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/readtags.c�����������������������������������������������������0000644�0001750�0001750�00000054576�11672675563�016444� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: readtags.c,v 1.3 2009-05-10 12:58:46 bettini Exp $ * * Copyright (c) 1996-2003, Darren Hiebert * * This source code is released into the public domain. * * This module contains functions for reading tag files. */ /* * INCLUDE FILES */ #include <stdlib.h> #include <string.h> #include <ctype.h> #include <stdio.h> #include <errno.h> #include <sys/types.h> /* to declare off_t */ #include "readtags.h" /* * MACROS */ #define TAB '\t' /* * DATA DECLARATIONS */ typedef struct { size_t size; char *buffer; } vstring; /* Information about current tag file */ struct sTagFile { /* has the file been opened and this structure initialized? */ short initialized; /* format of tag file */ short format; /* how is the tag file sorted? */ sortType sortMethod; /* pointer to file structure */ FILE* fp; /* file position of first character of `line' */ off_t pos; /* size of tag file in seekable positions */ off_t size; /* last line read */ vstring line; /* name of tag in last line read */ vstring name; /* defines tag search state */ struct { /* file position of last match for tag */ off_t pos; /* name of tag last searched for */ const char *name; /* length of name for partial matches */ size_t nameLength; /* peforming partial match */ short partial; /* ignoring case */ short ignorecase; } search; /* miscellaneous extension fields */ struct { /* number of entries in `list' */ unsigned short max; /* list of key value pairs */ tagExtensionField *list; } fields; /* buffers to be freed at close */ struct { /* name of program author */ char *author; /* name of program */ char *name; /* URL of distribution */ char *url; /* program version */ char *version; } program; }; /* * DATA DEFINITIONS */ const char *const EmptyString = ""; const char *const PseudoTagPrefix = "!_"; /* * FUNCTION DEFINITIONS */ /* * Compare two strings, ignoring case. * Return 0 for match, < 0 for smaller, > 0 for bigger * Make sure case is folded to uppercase in comparison (like for 'sort -f') * This makes a difference when one of the chars lies between upper and lower * ie. one of the chars [ \ ] ^ _ ` for ascii. (The '_' in particular !) */ static int struppercmp (const char *s1, const char *s2) { int result; do { result = toupper ((int) *s1) - toupper ((int) *s2); } while (result == 0 && *s1++ != '\0' && *s2++ != '\0'); return result; } static int strnuppercmp (const char *s1, const char *s2, size_t n) { int result; do { result = toupper ((int) *s1) - toupper ((int) *s2); } while (result == 0 && --n > 0 && *s1++ != '\0' && *s2++ != '\0'); return result; } static int growString (vstring *s) { int result = 0; size_t newLength; char *newLine; if (s->size == 0) { newLength = 128; newLine = (char*) malloc (newLength); *newLine = '\0'; } else { newLength = 2 * s->size; newLine = (char*) realloc (s->buffer, newLength); } if (newLine == NULL) perror ("string too large"); else { s->buffer = newLine; s->size = newLength; result = 1; } return result; } /* Copy name of tag out of tag line */ static void copyName (tagFile *const file) { size_t length; const char *end = strchr (file->line.buffer, '\t'); if (end == NULL) { end = strchr (file->line.buffer, '\n'); if (end == NULL) end = strchr (file->line.buffer, '\r'); } if (end != NULL) length = end - file->line.buffer; else length = strlen (file->line.buffer); while (length >= file->name.size) growString (&file->name); strncpy (file->name.buffer, file->line.buffer, length); file->name.buffer [length] = '\0'; } static int readTagLineRaw (tagFile *const file) { int result = 1; int reReadLine; /* If reading the line places any character other than a null or a * newline at the last character position in the buffer (one less than * the buffer size), then we must resize the buffer and reattempt to read * the line. */ do { char *const pLastChar = file->line.buffer + file->line.size - 2; char *line; file->pos = ftell (file->fp); reReadLine = 0; *pLastChar = '\0'; line = fgets (file->line.buffer, (int) file->line.size, file->fp); if (line == NULL) { /* read error */ if (! feof (file->fp)) perror ("readTagLine"); result = 0; } else if (*pLastChar != '\0' && *pLastChar != '\n' && *pLastChar != '\r') { /* buffer overflow */ growString (&file->line); fseek (file->fp, file->pos, SEEK_SET); reReadLine = 1; } else { size_t i = strlen (file->line.buffer); while (i > 0 && (file->line.buffer [i - 1] == '\n' || file->line.buffer [i - 1] == '\r')) { file->line.buffer [i - 1] = '\0'; --i; } } } while (reReadLine && result); if (result) copyName (file); return result; } static int readTagLine (tagFile *const file) { int result; do { result = readTagLineRaw (file); } while (result && *file->name.buffer == '\0'); return result; } static tagResult growFields (tagFile *const file) { tagResult result = TagFailure; unsigned short newCount = 2 * file->fields.max; tagExtensionField *newFields = (tagExtensionField*) realloc (file->fields.list, newCount * sizeof (tagExtensionField)); if (newFields == NULL) perror ("too many extension fields"); else { file->fields.list = newFields; file->fields.max = newCount; result = TagSuccess; } return result; } static void parseExtensionFields (tagFile *const file, tagEntry *const entry, char *const string) { char *p = string; while (p != NULL && *p != '\0') { while (*p == TAB) *p++ = '\0'; if (*p != '\0') { char *colon; char *field = p; p = strchr (p, TAB); if (p != NULL) *p++ = '\0'; colon = strchr (field, ':'); if (colon == NULL) entry->kind = field; else { const char *key = field; const char *value = colon + 1; *colon = '\0'; if (strcmp (key, "kind") == 0) entry->kind = value; else if (strcmp (key, "file") == 0) entry->fileScope = 1; else if (strcmp (key, "line") == 0) entry->address.lineNumber = atol (value); else { if (entry->fields.count == file->fields.max) growFields (file); file->fields.list [entry->fields.count].key = key; file->fields.list [entry->fields.count].value = value; ++entry->fields.count; } } } } } static void parseTagLine (tagFile *file, tagEntry *const entry) { int i; char *p = file->line.buffer; char *tab = strchr (p, TAB); int fieldsPresent = 0; entry->fields.list = NULL; entry->fields.count = 0; entry->kind = NULL; entry->fileScope = 0; entry->name = p; if (tab != NULL) { *tab = '\0'; p = tab + 1; entry->file = p; tab = strchr (p, TAB); if (tab != NULL) { *tab = '\0'; p = tab + 1; if (*p == '/' || *p == '?') { /* parse pattern */ int delimiter = *(unsigned char*) p; entry->address.lineNumber = 0; entry->address.pattern = p; do { p = strchr (p + 1, delimiter); } while (p != NULL && *(p - 1) == '\\'); if (p == NULL) { /* invalid pattern */ } else ++p; } else if (isdigit ((int) *(unsigned char*) p)) { /* parse line number */ entry->address.pattern = p; entry->address.lineNumber = atol (p); while (isdigit ((int) *(unsigned char*) p)) ++p; } else { /* invalid pattern */ } fieldsPresent = (strncmp (p, ";\"", 2) == 0); *p = '\0'; if (fieldsPresent) parseExtensionFields (file, entry, p + 2); } } if (entry->fields.count > 0) entry->fields.list = file->fields.list; for (i = entry->fields.count ; i < file->fields.max ; ++i) { file->fields.list [i].key = NULL; file->fields.list [i].value = NULL; } } static char *duplicate (const char *str) { char *result = NULL; if (str != NULL) { result = (char*) malloc (strlen (str) + 1); if (result == NULL) perror (NULL); else strcpy (result, str); } return result; } static void readPseudoTags (tagFile *const file, tagFileInfo *const info) { fpos_t startOfLine; const size_t prefixLength = strlen (PseudoTagPrefix); if (info != NULL) { info->file.format = 1; info->file.sort = TAG_UNSORTED; info->program.author = NULL; info->program.name = NULL; info->program.url = NULL; info->program.version = NULL; } while (1) { fgetpos (file->fp, &startOfLine); if (! readTagLine (file)) break; if (strncmp (file->line.buffer, PseudoTagPrefix, prefixLength) != 0) break; else { tagEntry entry; const char *key, *value; parseTagLine (file, &entry); key = entry.name + prefixLength; value = entry.file; if (strcmp (key, "TAG_FILE_SORTED") == 0) file->sortMethod = (sortType) atoi (value); else if (strcmp (key, "TAG_FILE_FORMAT") == 0) file->format = atoi (value); else if (strcmp (key, "TAG_PROGRAM_AUTHOR") == 0) file->program.author = duplicate (value); else if (strcmp (key, "TAG_PROGRAM_NAME") == 0) file->program.name = duplicate (value); else if (strcmp (key, "TAG_PROGRAM_URL") == 0) file->program.url = duplicate (value); else if (strcmp (key, "TAG_PROGRAM_VERSION") == 0) file->program.version = duplicate (value); if (info != NULL) { info->file.format = file->format; info->file.sort = file->sortMethod; info->program.author = file->program.author; info->program.name = file->program.name; info->program.url = file->program.url; info->program.version = file->program.version; } } } fsetpos (file->fp, &startOfLine); } static void gotoFirstLogicalTag (tagFile *const file) { fpos_t startOfLine; const size_t prefixLength = strlen (PseudoTagPrefix); rewind (file->fp); while (1) { fgetpos (file->fp, &startOfLine); if (! readTagLine (file)) break; if (strncmp (file->line.buffer, PseudoTagPrefix, prefixLength) != 0) break; } fsetpos (file->fp, &startOfLine); } static tagFile *initialize (const char *const filePath, tagFileInfo *const info) { tagFile *result = (tagFile*) malloc (sizeof (tagFile)); if (result != NULL) { memset (result, 0, sizeof (tagFile)); growString (&result->line); growString (&result->name); result->fields.max = 20; result->fields.list = (tagExtensionField*) malloc ( result->fields.max * sizeof (tagExtensionField)); result->fp = fopen (filePath, "r"); if (result->fp == NULL) { /* added by Lorenzo Bettini, to avoid memory leaks */ free (result->line.buffer); free (result->name.buffer); free (result->fields.list); free (result); result = NULL; info->status.error_number = errno; } else { fseek (result->fp, 0, SEEK_END); result->size = ftell (result->fp); rewind (result->fp); readPseudoTags (result, info); info->status.opened = 1; result->initialized = 1; } } return result; } static void terminate (tagFile *const file) { fclose (file->fp); free (file->line.buffer); free (file->name.buffer); free (file->fields.list); if (file->program.author != NULL) free (file->program.author); if (file->program.name != NULL) free (file->program.name); if (file->program.url != NULL) free (file->program.url); if (file->program.version != NULL) free (file->program.version); memset (file, 0, sizeof (tagFile)); free (file); } static tagResult readNext (tagFile *const file, tagEntry *const entry) { tagResult result = TagFailure; if (file == NULL || ! file->initialized) result = TagFailure; else if (! readTagLine (file)) result = TagFailure; else { if (entry != NULL) parseTagLine (file, entry); result = TagSuccess; } return result; } static const char *readFieldValue ( const tagEntry *const entry, const char *const key) { const char *result = NULL; int i; if (strcmp (key, "kind") == 0) result = entry->kind; else if (strcmp (key, "file") == 0) result = EmptyString; else for (i = 0 ; i < entry->fields.count && result == NULL ; ++i) if (strcmp (entry->fields.list [i].key, key) == 0) result = entry->fields.list [i].value; return result; } static int readTagLineSeek (tagFile *const file, const off_t pos) { int result = 0; if (fseek (file->fp, pos, SEEK_SET) == 0) { result = readTagLine (file); /* read probable partial line */ if (pos > 0 && result) result = readTagLine (file); /* read complete line */ } return result; } static int nameComparison (tagFile *const file) { int result; if (file->search.ignorecase) { if (file->search.partial) result = strnuppercmp (file->search.name, file->name.buffer, file->search.nameLength); else result = struppercmp (file->search.name, file->name.buffer); } else { if (file->search.partial) result = strncmp (file->search.name, file->name.buffer, file->search.nameLength); else result = strcmp (file->search.name, file->name.buffer); } return result; } static void findFirstNonMatchBefore (tagFile *const file) { #define JUMP_BACK 512 int more_lines; int comp; off_t start = file->pos; off_t pos = start; do { if (pos < (off_t) JUMP_BACK) pos = 0; else pos = pos - JUMP_BACK; more_lines = readTagLineSeek (file, pos); comp = nameComparison (file); } while (more_lines && comp == 0 && pos > 0 && pos < start); } static tagResult findFirstMatchBefore (tagFile *const file) { tagResult result = TagFailure; int more_lines; off_t start = file->pos; findFirstNonMatchBefore (file); do { more_lines = readTagLine (file); if (nameComparison (file) == 0) result = TagSuccess; } while (more_lines && result != TagSuccess && file->pos < start); return result; } static tagResult findBinary (tagFile *const file) { tagResult result = TagFailure; off_t lower_limit = 0; off_t upper_limit = file->size; off_t last_pos = 0; off_t pos = upper_limit / 2; while (result != TagSuccess) { if (! readTagLineSeek (file, pos)) { /* in case we fell off end of file */ result = findFirstMatchBefore (file); break; } else if (pos == last_pos) { /* prevent infinite loop if we backed up to beginning of file */ break; } else { const int comp = nameComparison (file); last_pos = pos; if (comp < 0) { upper_limit = pos; pos = lower_limit + ((upper_limit - lower_limit) / 2); } else if (comp > 0) { lower_limit = pos; pos = lower_limit + ((upper_limit - lower_limit) / 2); } else if (pos == 0) result = TagSuccess; else result = findFirstMatchBefore (file); } } return result; } static tagResult findSequential (tagFile *const file) { tagResult result = TagFailure; if (file->initialized) { while (result == TagFailure && readTagLine (file)) { if (nameComparison (file) == 0) result = TagSuccess; } } return result; } static tagResult find (tagFile *const file, tagEntry *const entry, const char *const name, const int options) { tagResult result = TagFailure; file->search.name = name; file->search.nameLength = strlen (name); file->search.partial = (options & TAG_PARTIALMATCH) != 0; file->search.ignorecase = (options & TAG_IGNORECASE) != 0; fseek (file->fp, 0, SEEK_END); file->size = ftell (file->fp); rewind (file->fp); if ((file->sortMethod == TAG_SORTED && !file->search.ignorecase) || (file->sortMethod == TAG_FOLDSORTED && file->search.ignorecase)) { #ifdef DEBUG printf ("<performing binary search>\n"); #endif result = findBinary (file); } else { #ifdef DEBUG printf ("<performing sequential search>\n"); #endif result = findSequential (file); } if (result != TagSuccess) file->search.pos = file->size; else { file->search.pos = file->pos; if (entry != NULL) parseTagLine (file, entry); } return result; } static tagResult findNext (tagFile *const file, tagEntry *const entry) { tagResult result = TagFailure; if ((file->sortMethod == TAG_SORTED && !file->search.ignorecase) || (file->sortMethod == TAG_FOLDSORTED && file->search.ignorecase)) { result = tagsNext (file, entry); if (result == TagSuccess && nameComparison (file) != 0) result = TagFailure; } else { result = findSequential (file); if (result == TagSuccess && entry != NULL) parseTagLine (file, entry); } return result; } /* * EXTERNAL INTERFACE */ extern tagFile *tagsOpen (const char *const filePath, tagFileInfo *const info) { return initialize (filePath, info); } extern tagResult tagsSetSortType (tagFile *const file, const sortType type) { tagResult result = TagFailure; if (file != NULL && file->initialized) { file->sortMethod = type; result = TagSuccess; } return result; } extern tagResult tagsFirst (tagFile *const file, tagEntry *const entry) { tagResult result = TagFailure; if (file != NULL && file->initialized) { gotoFirstLogicalTag (file); result = readNext (file, entry); } return result; } extern tagResult tagsNext (tagFile *const file, tagEntry *const entry) { tagResult result = TagFailure; if (file != NULL && file->initialized) result = readNext (file, entry); return result; } extern const char *tagsField (const tagEntry *const entry, const char *const key) { const char *result = NULL; if (entry != NULL) result = readFieldValue (entry, key); return result; } extern tagResult tagsFind (tagFile *const file, tagEntry *const entry, const char *const name, const int options) { tagResult result = TagFailure; if (file != NULL && file->initialized) result = find (file, entry, name, options); return result; } extern tagResult tagsFindNext (tagFile *const file, tagEntry *const entry) { tagResult result = TagFailure; if (file != NULL && file->initialized) result = findNext (file, entry); return result; } extern tagResult tagsClose (tagFile *const file) { tagResult result = TagFailure; if (file != NULL && file->initialized) { terminate (file); result = TagSuccess; } return result; } /* * TEST FRAMEWORK */ #ifdef READTAGS_MAIN static const char *TagFileName = "tags"; static const char *ProgramName; static int extensionFields; static int SortOverride; static sortType SortMethod; static void printTag (const tagEntry *entry) { int i; int first = 1; const char* separator = ";\""; const char* const empty = ""; /* "sep" returns a value only the first time it is evaluated */ #define sep (first ? (first = 0, separator) : empty) printf ("%s\t%s\t%s", entry->name, entry->file, entry->address.pattern); if (extensionFields) { if (entry->kind != NULL && entry->kind [0] != '\0') printf ("%s\tkind:%s", sep, entry->kind); if (entry->fileScope) printf ("%s\tfile:", sep); #if 0 if (entry->address.lineNumber > 0) printf ("%s\tline:%lu", sep, entry->address.lineNumber); #endif for (i = 0 ; i < entry->fields.count ; ++i) printf ("%s\t%s:%s", sep, entry->fields.list [i].key, entry->fields.list [i].value); } putchar ('\n'); #undef sep } static void findTag (const char *const name, const int options) { tagFileInfo info; tagEntry entry; tagFile *const file = tagsOpen (TagFileName, &info); if (file == NULL) { fprintf (stderr, "%s: cannot open tag file: %s: %s\n", ProgramName, strerror (info.status.error_number), name); exit (1); } else { if (SortOverride) tagsSetSortType (file, SortMethod); if (tagsFind (file, &entry, name, options) == TagSuccess) { do { printTag (&entry); } while (tagsFindNext (file, &entry) == TagSuccess); } tagsClose (file); } } static void listTags (void) { tagFileInfo info; tagEntry entry; tagFile *const file = tagsOpen (TagFileName, &info); if (file == NULL) { fprintf (stderr, "%s: cannot open tag file: %s: %s\n", ProgramName, strerror (info.status.error_number), TagFileName); exit (1); } else { while (tagsNext (file, &entry) == TagSuccess) printTag (&entry); tagsClose (file); } } const char *const Usage = "Find tag file entries matching specified names.\n\n" "Usage: %s [-ilp] [-s[0|1]] [-t file] [name(s)]\n\n" "Options:\n" " -e Include extension fields in output.\n" " -i Perform case-insensitive matching.\n" " -l List all tags.\n" " -p Perform partial matching.\n" " -s[0|1|2] Override sort detection of tag file.\n" " -t file Use specified tag file (default: \"tags\").\n" "Note that options are acted upon as encountered, so order is significant.\n"; extern int main (int argc, char **argv) { int options = 0; int actionSupplied = 0; int i; ProgramName = argv [0]; if (argc == 1) { fprintf (stderr, Usage, ProgramName); exit (1); } for (i = 1 ; i < argc ; ++i) { const char *const arg = argv [i]; if (arg [0] != '-') { findTag (arg, options); actionSupplied = 1; } else { size_t j; for (j = 1 ; arg [j] != '\0' ; ++j) { switch (arg [j]) { case 'e': extensionFields = 1; break; case 'i': options |= TAG_IGNORECASE; break; case 'p': options |= TAG_PARTIALMATCH; break; case 'l': listTags (); actionSupplied = 1; break; case 't': if (arg [j+1] != '\0') { TagFileName = arg + j + 1; j += strlen (TagFileName); } else if (i + 1 < argc) TagFileName = argv [++i]; else { fprintf (stderr, Usage, ProgramName); exit (1); } break; case 's': SortOverride = 1; ++j; if (arg [j] == '\0') SortMethod = TAG_SORTED; else if (strchr ("012", arg[j]) != NULL) SortMethod = (sortType) (arg[j] - '0'); else { fprintf (stderr, Usage, ProgramName); exit (1); } break; default: fprintf (stderr, "%s: unknown option: %c\n", ProgramName, arg[j]); exit (1); break; } } } } if (! actionSupplied) { fprintf (stderr, "%s: no action specified: specify tag name(s) or -l option\n", ProgramName); exit (1); } return 0; } #endif /* vi:set tabstop=8 shiftwidth=4: */ ����������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/keys.h���������������������������������������������������������0000644�0001750�0001750�00000000131�11672675563�015604� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef KEYS_H #define KEYS_H namespace srchilite { #define NORMAL "normal" } #endif ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/highlightstatebuilder_dbtab.cc���������������������������������0000644�0001750�0001750�00000002133�11672675563�022506� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#include "stringlistlangelem.h" #include "statelangelem.h" #include "namedsubexpslangelem.h" #include "delimitedlangelem.h" #include "langelem.h" #include "highlightstatebuilder.hpp" void HighlightStateBuilder::build_DB(LangElem * elem, HighlightState * state) { elem->dispatch_build(this, state); } void DelimitedLangElem::dispatch_build(HighlightStateBuilder *HighlightStateBuilder_o, HighlightState * state) { HighlightStateBuilder_o->build(this, state); } void LangElem::dispatch_build(HighlightStateBuilder *HighlightStateBuilder_o, HighlightState * state) { HighlightStateBuilder_o->build(this, state); } void NamedSubExpsLangElem::dispatch_build(HighlightStateBuilder *HighlightStateBuilder_o, HighlightState * state) { HighlightStateBuilder_o->build(this, state); } void StateLangElem::dispatch_build(HighlightStateBuilder *HighlightStateBuilder_o, HighlightState * state) { HighlightStateBuilder_o->build(this, state); } void StringListLangElem::dispatch_build(HighlightStateBuilder *HighlightStateBuilder_o, HighlightState * state) { HighlightStateBuilder_o->build(this, state); } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/formattermanager.h���������������������������������������������0000644�0001750�0001750�00000004607�11672675563�020203� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2008 // // Copyright: See COPYING file that comes with this distribution // #ifndef FORMATTERMANAGER_H_ #define FORMATTERMANAGER_H_ #include <string> #include <map> #include "formatter.h" namespace srchilite { /// the map for formatters typedef std::map<std::string, FormatterPtr> FormatterMap; /** * Associates to an element name the corresponding formatter. * This class uses shared pointers for formatters */ class FormatterManager { /// the map associating to each element name a formatter mutable FormatterMap formatterMap; /// the default formatter, i.e., the one that is used when there's no /// formatter associated to an element name FormatterPtr defaultFormatter; public: /** * @param _defaultFormatter the default formatter, i.e., the one that is used when there's no * formatter associated to an element name */ FormatterManager(FormatterPtr _defaultFormatter); ~FormatterManager(); /** * Returns the formatter for the specific element (this function always returns * a valid pointer, since if no formatter is found for the specified element, it will * return the default formatter) * @param elem * @return the formatter for the specific element */ FormatterPtr getFormatter(const std::string &elem) const; FormatterPtr getDefaultFormatter() const { return defaultFormatter; } void setDefaultFormatter(FormatterPtr def) { defaultFormatter = def; } /** * Returns the formatter for the specific element or an empty pointer if there's * no such formatter * @param elem * @return the formatter for the specific element or an empty pointer */ FormatterPtr hasFormatter(const std::string &elem) const; /** * Associates the formatter to the element name (possible previous associated formatter * is discarded). * @param elem * @param formatter */ void addFormatter(const std::string &elem, FormatterPtr formatter); /** * Resets this formatter manager: it removes all the current associations. */ void reset() { formatterMap.clear(); } /** * @return the formatter map of this formatter manager */ const FormatterMap &getFormatterMap() const { return formatterMap; } }; } #endif /*FORMATTERMANAGER_H_*/ �������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/test_readtags_main.cpp�����������������������������������������0000644�0001750�0001750�00000002470�11672675563�021031� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// test the readtags library #include "readtags.h" #include <stdio.h> #include <string.h> #include <stdlib.h> static int extensionFields; static void printTag (const tagEntry *entry) { int i; int first = 1; const char* separator = ";\""; const char* const empty = ""; /* "sep" returns a value only the first time it is evaluated */ #define sep (first ? (first = 0, separator) : empty) printf ("%s\t%s\t%s", entry->name, entry->file, entry->address.pattern); if (extensionFields) { if (entry->kind != NULL && entry->kind [0] != '\0') printf ("%s\tkind:%s", sep, entry->kind); if (entry->fileScope) printf ("%s\tfile:", sep); for (i = 0 ; i < entry->fields.count ; ++i) printf ("%s\t%s:%s", sep, entry->fields.list [i].key, entry->fields.list [i].value); } putchar ('\n'); #undef sep } static void listTags (const char *TagFileName) { tagFileInfo info; tagEntry entry; tagFile *const file = tagsOpen (TagFileName, &info); if (file == NULL) { fprintf (stderr, "%s: cannot open tag file: %s: %s\n", "test_readtags", strerror (info.status.error_number), TagFileName); exit (1); } else { while (tagsNext (file, &entry) == TagSuccess) printTag (&entry); tagsClose (file); } } int main() { listTags("mytags"); return 0; } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/debuglistener.cpp����������������������������������������������0000644�0001750�0001750�00000003604�11672675563�020030� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2008 // // Copyright: See COPYING file that comes with this distribution // #include "debuglistener.h" #include "highlightevent.h" #include "highlighttoken.h" #include "highlightrule.h" using namespace std; namespace srchilite { DebugListener::DebugListener(std::ostream &_os) : os(_os), interactive(false) { } DebugListener::~DebugListener() { } //> TEXINFO void DebugListener::notify(const HighlightEvent &event) { switch (event.type) { case HighlightEvent::FORMAT: // print information about the rule if (event.token.rule) { os << event.token.rule->getAdditionalInfo() << endl; os << "expression: \"" << event.token.rule->toString() << "\"" << endl; } // now format the matched strings for (MatchedElements::const_iterator it = event.token.matched.begin(); it != event.token.matched.end(); ++it) { os << "formatting \"" << it->second << "\" as " << it->first << endl; } step(); break; case HighlightEvent::FORMATDEFAULT: os << "formatting \"" << event.token.matched.front().second << "\" as default" << endl; step(); break; case HighlightEvent::ENTERSTATE: os << "entering state: " << event.token.rule->getNextState()->getId() << endl; break; case HighlightEvent::EXITSTATE: int level = event.token.rule->getExitLevel(); os << "exiting state, level: "; if (level < 0) os << "all"; else os << level; os << endl; break; } } //> TEXINFO void DebugListener::step() { if (!interactive) { return; } // this is only a quick solution to perform interaction string cmd; getline(cin, cmd); } } ����������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/tostringcollection.h�������������������������������������������0000644�0001750�0001750�00000005474�11672675564�020576� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Description: given a collection generates a string representation // // // Author: Lorenzo Bettini, 1999-2007 <http://www.lorenzobettini.it> // // Copyright: See COPYING file that comes with this distribution // // #ifndef TOSTRINGCOLLECTION_H #define TOSTRINGCOLLECTION_H #include <string> #include <sstream> namespace srchilite { /** * Converts a collection of objects with method toString into a string, * using the passed separator to separate the elements. * * @param collection * @param sep */ template <class T> const std::string toStringCollection(const T *collection, char sep = ' ') { std::ostringstream buf; for (typename T::const_iterator it = collection->begin(); it != collection->end(); ) { buf << (*it)->toString(); if (++it != collection->end()) buf << sep; } return buf.str(); } /** * Converts a collection of objects into a string (relying on its stream representation), * using the passed separator to separate the elements. * * @param collection * @param sep */ template <class T> const std::string toStringCollection(const T &collection, char sep = ' ') { std::ostringstream buf; for (typename T::const_iterator it = collection.begin(); it != collection.end(); ) { buf << (*it); if (++it != collection.end()) buf << sep; } return buf.str(); } /** * Converts a collection of objects with method toStringOriginal into a string, * using the passed separator to separate the elements. * * @param collection * @param sep */ template <class T> const std::string toStringOriginalCollection(const T *collection, char sep = ' ') { std::ostringstream buf; for (typename T::const_iterator it = collection->begin(); it != collection->end(); ) { buf << (*it)->toStringOriginal(); if (++it != collection->end()) buf << sep; } return buf.str(); } /** * Converts a collection of objects into a string, * using the passed separator to separate the elements. * * @param collection * @param sep */ template <class T> const std::string collectionToString(const T *collection, char sep = ' ') { std::ostringstream buf; for (typename T::const_iterator it = collection->begin(); it != collection->end(); ) { buf << (*it); if (++it != collection->end() && sep) buf << sep; } return buf.str(); } /** * Converts a collection of objects into a string, * using the passed separator to separate the elements. * * @param collection * @param sep */ template <class T> const std::string collectionRefToString(const T &collection, char sep = ' ') { std::ostringstream buf; for (typename T::const_iterator it = collection.begin(); it != collection.end(); ) { buf << (*it); if (++it != collection.end() && sep) buf << sep; } return buf.str(); } } #endif // TOSTRINGCOLLECTION_H ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/formattermanager.cpp�������������������������������������������0000644�0001750�0001750�00000002052�11672675563�020526� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2008 // // Copyright: See COPYING file that comes with this distribution // #include "formattermanager.h" namespace srchilite { FormatterManager::FormatterManager(FormatterPtr _defaultFormatter) : defaultFormatter(_defaultFormatter) { } FormatterManager::~FormatterManager() { } FormatterPtr FormatterManager::getFormatter(const std::string &elem) const { // the formatter for this element is not present if (!formatterMap[elem].get()) { // use the default formatter and store it for future requests formatterMap[elem] = defaultFormatter; } return formatterMap[elem]; } FormatterPtr FormatterManager::hasFormatter(const std::string &elem) const { FormatterMap::const_iterator formatter = formatterMap.find(elem); if (formatter == formatterMap.end()) return FormatterPtr(); return formatter->second; } void FormatterManager::addFormatter(const std::string &elem, FormatterPtr formatter) { formatterMap[elem] = formatter; } } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/bufferedoutput.h�����������������������������������������������0000644�0001750�0001750�00000006416�11672675562�017707� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2008 // // Copyright: See COPYING file that comes with this distribution // #ifndef BUFFEREDOUTPUT_H_ #define BUFFEREDOUTPUT_H_ #include <ostream> #include <string> #include <set> namespace srchilite { /// the contents to be put after a line or after the document typedef std::set<std::string> PostContents; /** * The main class for writing into the output. It wraps an ostream object * and can perform buffering. Moreover, it provides functionalities * to write something after a line or after an entire document (these contents * are buffered so that they can be inserted at any time, with * postLineInsert and postDocInsert * and will be actually inserted in the output * with writePostLine and writePostDoc). */ class BufferedOutput { /// the stream used to output strings std::ostream &outputBuff; /// whether to flush the output stream at each output operation bool alwaysFlush; /// the contents to be output after each line PostContents postLineContents; /// the contents to be output after the entire document PostContents postDocContents; /** * Writes all the (buffered) elements (and clear the buffer) * @param post the buffered elements * @param prefix the string to prefix all the elements */ void writePostInfo(PostContents &post, const std::string &prefix = ""); public: /** * @param os the ostream where data will be written */ BufferedOutput(std::ostream &os); ~BufferedOutput(); /** * Whether to flush the output stream at each output operation * @param a */ void setAlwaysFlush(bool a = true) { alwaysFlush = a; } /** * Writes the passed string into the output * @param s */ void output(const std::string &s); /** * Writes the passed string into the contents to be output after the current line * @param s */ void postLineInsert(const std::string &s); /** * Writes the passed string into the contents to be output after the entire document * @param s */ void postDocInsert(const std::string &s); /** * Writes the elements of the passed generic collection * into the contents to be output after the current line * @param s */ template<typename T> void postLineInsertFrom(const T &s) { for (typename T::const_iterator it = s.begin(); it != s.end(); ++it) postLineInsert(*it); } /** * Writes the elements of the passed generic collection * into the contents to be output after the entire document * @param s */ template<typename T> void postDocInsertFrom(const T &s) { for (typename T::const_iterator it = s.begin(); it != s.end(); ++it) postDocInsert(*it); } /** * Writes all the (buffered) elements after the current line (and clear the buffer) * @param prefix the string to prefix all the elements */ void writePostLine(const std::string &prefix = ""); /** * Writes all the (buffered) elements after the current document (and clear the buffer) * @param prefix the string to prefix all the elements */ void writePostDoc(const std::string &prefix = ""); }; } #endif /*BUFFEREDOUTPUT_H_*/ ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/regexhighlightrule.cpp�����������������������������������������0000644�0001750�0001750�00000004715�11672675563�021072� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2008 // // Copyright: See COPYING file that comes with this distribution // #include "regexhighlightrule.h" #include "highlighttoken.h" #include "matchingparameters.h" #include "regexpreprocessor.h" namespace srchilite { /// the only spaces regular expression static boost::regex onlySpaces("[[:blank:]]*"); RegexHighlightRule::RegexHighlightRule(const std::string &s) : regExp(s) { } RegexHighlightRule::RegexHighlightRule(const std::string &name, const std::string &s) : HighlightRule(name), regExp(s) { } RegexHighlightRule::~RegexHighlightRule() { } bool RegexHighlightRule::tryToMatch(std::string::const_iterator start, std::string::const_iterator end, HighlightToken &token, const MatchingParameters &params) { boost::smatch match; boost::match_flag_type flags = boost::match_default; // whether this rule represents multiple elements bool hasMultipleElements = (getElemList().size() > 1); if (!params.beginningOfLine) { // the start of the string must not be interpreted as the beginning of the line flags |= boost::match_not_bol; } if (boost::regex_search(start, end, match, regExp, flags)) { token.prefix = match.prefix(); token.suffix = match.suffix(); // check that the prefix is empty or contains only spaces token.prefixOnlySpaces = boost::regex_match(token.prefix, onlySpaces); if (getHasSubexpressions()) { // record all the matched subexpressions for (unsigned int i = 1; i < match.size(); ++i) { token.matchedSubExps.push_back(match[i]); } } if (hasMultipleElements) { for (unsigned int i = 1; i < match.size(); ++i) { if (match[i].matched) { token.addMatched(getElemList()[i - 1], match[i]); } } } else { token.addMatched(getElemList()[0], match[0]); } return true; } return false; } const std::string RegexHighlightRule::toString() const { return regExp.str(); } void RegexHighlightRule::replaceReferences(const ReplacementList &rep) { regExp.assign(RegexPreProcessor::replace_references(regExp.str(), rep)); } HighlightRule *RegexHighlightRule::clone() { return new RegexHighlightRule(*this); } void RegexHighlightRule::setRegExp(const std::string &s) { regExp.assign(s); } } ���������������������������������������������������source-highlight-3.1.6/lib/srchilite/sourcehighlighter.cpp������������������������������������������0000644�0001750�0001750�00000017122�11672675563�020713� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2008 // // Copyright: See COPYING file that comes with this distribution // #include "sourcehighlighter.h" #include "highlighttoken.h" #include "matchingparameters.h" #include "highlightrule.h" #include "formattermanager.h" #include "highlightevent.h" #include "highlighteventlistener.h" #include "formatterparams.h" using namespace std; namespace srchilite { /// represents highlighting as default static HighlightToken defaultHighlightToken; static HighlightEvent defaultHighlightEvent(defaultHighlightToken, HighlightEvent::FORMATDEFAULT); /// avoid generate an event if there's no one listening #define GENERATE_EVENT(token, type) if (hasListeners()) notify(HighlightEvent(token, type)); #define GENERATE_DEFAULT_EVENT(s) \ if (hasListeners()) { \ defaultHighlightToken.clearMatched(); \ defaultHighlightToken.addMatched("default", s); \ notify(defaultHighlightEvent); \ } #define UPDATE_START_IN_FORMATTER_PARAMS(start_index) if (formatterParams) formatterParams->start = start_index; SourceHighlighter::SourceHighlighter(HighlightStatePtr mainState) : mainHighlightState(mainState), currentHighlightState(mainState), stateStack(HighlightStateStackPtr(new HighlightStateStack)), formatterManager(0), optimize(false), suspended(false), formatterParams(0) { } SourceHighlighter::~SourceHighlighter() { } void SourceHighlighter::highlightParagraph(const std::string &paragraph) { std::string::const_iterator start = paragraph.begin(); std::string::const_iterator end = paragraph.end(); bool matched = true; HighlightToken token; MatchingParameters params; // we're at the beginning UPDATE_START_IN_FORMATTER_PARAMS(0); // note that we go on even if the string is empty, since it is crucial // to try to match also the end of buffer (some rules rely on that) while (matched) { matched = currentHighlightState->findBestMatch(start, end, token, params); if (matched) { if (token.prefix.size()) { // this is the index in the paragraph of the matched part UPDATE_START_IN_FORMATTER_PARAMS((std::distance(paragraph.begin(), start))); // format non matched part with the current state's default element format(currentHighlightState->getDefaultElement(), token.prefix); GENERATE_DEFAULT_EVENT(token.prefix); } // the length of the previous matched string in the matched elem list int prevLen = 0; // now format the matched strings for (MatchedElements::const_iterator it = token.matched.begin(); it != token.matched.end(); ++it) { // this is the index in the paragraph of the matched part UPDATE_START_IN_FORMATTER_PARAMS((std::distance(paragraph.begin(), start) + token.prefix.size() + prevLen)); format(it->first, it->second); GENERATE_EVENT(token, HighlightEvent::FORMAT); prevLen += it->second.size(); } // now we're not at the beginning of line anymore, if we matched some chars if (token.matchedSize) params.beginningOfLine = false; // check whether we must enter a new state HighlightStatePtr nextState = getNextState(token); if (nextState.get()) { enterState(nextState); GENERATE_EVENT(token, HighlightEvent::ENTERSTATE); } else if (token.rule->getExitLevel()) { // the rule requires to exit some states if (token.rule->getExitLevel() < 0) { exitAll(); } else { exitState(token.rule->getExitLevel()); } GENERATE_EVENT(token, HighlightEvent::EXITSTATE); } // advance in the string, so that the part not matched // can be highlighted in the next loop start += (token.prefix.size() + token.matchedSize); } else { // no rule matched, so we highlight it with the current state's default element // provided the string is not empty (if it is empty this is really useless) if (start != end) { // this is the index in the paragraph of the matched part UPDATE_START_IN_FORMATTER_PARAMS((std::distance(paragraph.begin(), start))); const string s(start, end); format(currentHighlightState->getDefaultElement(), s); GENERATE_DEFAULT_EVENT(s); } } } if (optimize) flush(); // flush what we have buffered } HighlightStatePtr SourceHighlighter::getNextState(const HighlightToken &token) { HighlightStatePtr nextState = token.rule->getNextState(); if (token.rule->isNested()) { // we must enter another instance of the current state nextState = currentHighlightState; } if (nextState.get() && nextState->getNeedsReferenceReplacement()) { // perform replacement for the next state // in case use the original state if (nextState->getOriginalState().get()) { // in case we had already performed replacements on the next state nextState = nextState->getOriginalState(); } HighlightStatePtr copyState = HighlightStatePtr(new HighlightState( *nextState)); copyState->setOriginalState(nextState); copyState->replaceReferences(token.matchedSubExps); return copyState; } return nextState; } void SourceHighlighter::enterState(HighlightStatePtr state) { stateStack->push(currentHighlightState); currentHighlightState = state; } /** * Exits level states (-1 means exit all states) * @param level */ void SourceHighlighter::exitState(int level) { // remove additional levels for (int l = 1; l < level; ++l) stateStack->pop(); currentHighlightState = stateStack->top(); stateStack->pop(); } void SourceHighlighter::exitAll() { currentHighlightState = mainHighlightState; clearStateStack(); } void SourceHighlighter::clearStateStack() { while (!stateStack->empty()) stateStack->pop(); } void SourceHighlighter::format(const std::string &elem, const std::string &s) { if (suspended) return; if (!s.size()) return; // the formatter is allowed to be null if (formatterManager) { if (!optimize) { formatterManager->getFormatter(elem)->format(s, formatterParams); } else { // otherwise we optmize output generation: delay formatting a specific // element until we deal with another element; this way strings that belong // to the same element are formatted using only one tag: e.g., // <comment>/* mycomment */</comment> // instead of // <comment>/*</comment><comment>mycomment</comment><comment>*/</comment> if (elem != currentElement) { if (currentElement.size()) flush(); } currentElement = elem; currentElementBuffer << s; } } } void SourceHighlighter::flush() { if (formatterManager) { // flush the buffer for the current element formatterManager->getFormatter(currentElement)->format( currentElementBuffer.str(), formatterParams); // reset current element information currentElement = ""; currentElementBuffer.str(""); } } } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/Makefile.in����������������������������������������������������0000664�0001750�0001750�00000144625�11675044677�016547� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Copyright (C) 1999-2009 Lorenzo Bettini <http://www.lorenzobettini.it> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. #SUBDIRS = includes VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @NO_CTAGS_FALSE@EXTRA_PROGRAMS = test_readtags$(EXEEXT) subdir = lib/srchilite DIST_COMMON = $(library_include_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/srchilite.doxyfile.in yywrap.c ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/gl/m4/00gnulib.m4 \ $(top_srcdir)/gl/m4/ac_prog_doxygen.m4 \ $(top_srcdir)/gl/m4/dirent_h.m4 $(top_srcdir)/gl/m4/dirname.m4 \ $(top_srcdir)/gl/m4/double-slash-root.m4 \ $(top_srcdir)/gl/m4/extensions.m4 \ $(top_srcdir)/gl/m4/getopt.m4 \ $(top_srcdir)/gl/m4/gnulib-common.m4 \ $(top_srcdir)/gl/m4/gnulib-comp.m4 \ $(top_srcdir)/gl/m4/include_next.m4 \ $(top_srcdir)/gl/m4/malloc.m4 $(top_srcdir)/gl/m4/memset.m4 \ $(top_srcdir)/gl/m4/mkdir.m4 $(top_srcdir)/gl/m4/nocrash.m4 \ $(top_srcdir)/gl/m4/ssize_t.m4 $(top_srcdir)/gl/m4/stdbool.m4 \ $(top_srcdir)/gl/m4/stddef_h.m4 \ $(top_srcdir)/gl/m4/stdlib_h.m4 $(top_srcdir)/gl/m4/strdup.m4 \ $(top_srcdir)/gl/m4/string_h.m4 \ $(top_srcdir)/gl/m4/sys_stat_h.m4 \ $(top_srcdir)/gl/m4/time_h.m4 $(top_srcdir)/gl/m4/unistd_h.m4 \ $(top_srcdir)/gl/m4/warn-on-use.m4 \ $(top_srcdir)/gl/m4/wchar_t.m4 \ $(top_srcdir)/m4/ax_boost_base.m4 \ $(top_srcdir)/m4/ax_boost_regex.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = srchilite.doxyfile CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(libdir)" \ "$(DESTDIR)$(library_includedir)" LTLIBRARIES = $(lib_LTLIBRARIES) am__DEPENDENCIES_1 = libsource_highlight_la_DEPENDENCIES = $(top_builddir)/gl/libgnu.la \ @LTLIBOBJS@ $(am__DEPENDENCIES_1) am_libsource_highlight_la_OBJECTS = fileutil.lo substfun.lo \ stopwatch.lo utils.lo ioexception.lo settings.lo versions.lo \ verbosity.lo sourcehighlight.lo styleparser.lo stylescanner.lo \ outlangdefparser.lo stylecssparser.lo stylecssscanner.lo \ outlangdefscanner.lo debuglistener.lo langmap.lo \ stylefileparser.lo langelem.lo statelangelem.lo langelems.lo \ statestartlangelem.lo stringlistlangelem.lo \ delimitedlangelem.lo langelemsprinter.lo \ namedsubexpslangelem.lo stringdef.lo highlightrule.lo \ highlighttoken.lo highlightstate.lo highlightrulefactory.lo \ highlightstateprinter.lo sourcehighlighter.lo \ sourcefilehighlighter.lo linenumgenerator.lo lineranges.lo \ regexranges.lo formatter.lo formattermanager.lo textstyle.lo \ textstyleformatter.lo bufferedoutput.lo preformatter.lo \ wordtokenizer.lo ctagscollector.lo readtags.lo \ ctagsformatter.lo srcuntabifier.lo \ textstyleformatterfactory.lo docgenerator.lo doctemplate.lo \ chartranslator.lo textstylebuilder.lo fileinfo.lo \ ctagsmanager.lo regexhighlightrule.lo regexrulefactory.lo \ regexpreprocessor.lo highlightstatebuilder.lo \ highlightbuilderexception.lo langdefmanager.lo \ langdefparser.lo langdefscanner.lo languageinfer.lo \ parserexception.lo stringtable.lo vardefinitions.lo \ sourcehighlightutils.lo instances.lo libsource_highlight_la_OBJECTS = $(am_libsource_highlight_la_OBJECTS) libsource_highlight_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(libsource_highlight_la_LDFLAGS) $(LDFLAGS) -o $@ am_test_readtags_OBJECTS = test_readtags_main.$(OBJEXT) test_readtags_OBJECTS = $(am_test_readtags_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libsource_highlight_la_SOURCES) $(test_readtags_SOURCES) DIST_SOURCES = $(libsource_highlight_la_SOURCES) \ $(test_readtags_SOURCES) HEADERS = $(library_include_HEADERS) ETAGS = etags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ABSOLUTEDATADIR = @ABSOLUTEDATADIR@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ ARFLAGS = @ARFLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASH_COMPLETION_DIR = @BASH_COMPLETION_DIR@ BASH_SHELL = @BASH_SHELL@ BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ BOOST_LDFLAGS = @BOOST_LDFLAGS@ BOOST_REGEX_LIB = @BOOST_REGEX_LIB@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHROOT_INPUT_DIR = @CHROOT_INPUT_DIR@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOUBLECPP = @DOUBLECPP@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GENGETOPT = @GENGETOPT@ GETOPT_H = @GETOPT_H@ GNULIB_ALPHASORT = @GNULIB_ALPHASORT@ GNULIB_ATOLL = @GNULIB_ATOLL@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ GNULIB_CHDIR = @GNULIB_CHDIR@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@ GNULIB_DIRFD = @GNULIB_DIRFD@ GNULIB_DUP = @GNULIB_DUP@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ GNULIB_FDATASYNC = @GNULIB_FDATASYNC@ GNULIB_FDOPENDIR = @GNULIB_FDOPENDIR@ GNULIB_FFSL = @GNULIB_FFSL@ GNULIB_FFSLL = @GNULIB_FFSLL@ GNULIB_FSTAT = @GNULIB_FSTAT@ GNULIB_FSTATAT = @GNULIB_FSTATAT@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@ GNULIB_GRANTPT = @GNULIB_GRANTPT@ GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@ GNULIB_LCHMOD = @GNULIB_LCHMOD@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MBTOWC = @GNULIB_MBTOWC@ GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_MKDIRAT = @GNULIB_MKDIRAT@ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ GNULIB_MKFIFO = @GNULIB_MKFIFO@ GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@ GNULIB_MKNOD = @GNULIB_MKNOD@ GNULIB_MKNODAT = @GNULIB_MKNODAT@ GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_MKTIME = @GNULIB_MKTIME@ GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@ GNULIB_OPENDIR = @GNULIB_OPENDIR@ GNULIB_PIPE = @GNULIB_PIPE@ GNULIB_PIPE2 = @GNULIB_PIPE2@ GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PTSNAME = @GNULIB_PTSNAME@ GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PWRITE = @GNULIB_PWRITE@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_READ = @GNULIB_READ@ GNULIB_READDIR = @GNULIB_READDIR@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ GNULIB_REWINDDIR = @GNULIB_REWINDDIR@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SCANDIR = @GNULIB_SCANDIR@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_STAT = @GNULIB_STAT@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRERROR_R = @GNULIB_STRERROR_R@ GNULIB_STRNCAT = @GNULIB_STRNCAT@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRPTIME = @GNULIB_STRPTIME@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOD = @GNULIB_STRTOD@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRTOLL = @GNULIB_STRTOLL@ GNULIB_STRTOULL = @GNULIB_STRTOULL@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@ GNULIB_TIMEGM = @GNULIB_TIMEGM@ GNULIB_TIME_R = @GNULIB_TIME_R@ GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@ GNULIB_UNSETENV = @GNULIB_UNSETENV@ GNULIB_USLEEP = @GNULIB_USLEEP@ GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@ GNULIB_WCTOMB = @GNULIB_WCTOMB@ GNULIB_WRITE = @GNULIB_WRITE@ GNULIB__EXIT = @GNULIB__EXIT@ GREP = @GREP@ HAVE_ALPHASORT = @HAVE_ALPHASORT@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ HAVE_CHOWN = @HAVE_CHOWN@ HAVE_CLOSEDIR = @HAVE_CLOSEDIR@ HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@ HAVE_DECL_FDOPENDIR = @HAVE_DECL_FDOPENDIR@ HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ HAVE_DIRENT_H = @HAVE_DIRENT_H@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHDIR = @HAVE_FCHDIR@ HAVE_FCHMODAT = @HAVE_FCHMODAT@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FDATASYNC = @HAVE_FDATASYNC@ HAVE_FDOPENDIR = @HAVE_FDOPENDIR@ HAVE_FFSL = @HAVE_FFSL@ HAVE_FFSLL = @HAVE_FFSLL@ HAVE_FSTATAT = @HAVE_FSTATAT@ HAVE_FSYNC = @HAVE_FSYNC@ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ HAVE_FUTIMENS = @HAVE_FUTIMENS@ HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ HAVE_GETGROUPS = @HAVE_GETGROUPS@ HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ HAVE_GETLOGIN = @HAVE_GETLOGIN@ HAVE_GETOPT_H = @HAVE_GETOPT_H@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GRANTPT = @HAVE_GRANTPT@ HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LCHOWN = @HAVE_LCHOWN@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ HAVE_LSTAT = @HAVE_LSTAT@ HAVE_MBSLEN = @HAVE_MBSLEN@ HAVE_MEMCHR = @HAVE_MEMCHR@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_MKDIRAT = @HAVE_MKDIRAT@ HAVE_MKDTEMP = @HAVE_MKDTEMP@ HAVE_MKFIFO = @HAVE_MKFIFO@ HAVE_MKFIFOAT = @HAVE_MKFIFOAT@ HAVE_MKNOD = @HAVE_MKNOD@ HAVE_MKNODAT = @HAVE_MKNODAT@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMP = @HAVE_MKSTEMP@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ HAVE_NANOSLEEP = @HAVE_NANOSLEEP@ HAVE_OPENDIR = @HAVE_OPENDIR@ HAVE_OS_H = @HAVE_OS_H@ HAVE_PIPE = @HAVE_PIPE@ HAVE_PIPE2 = @HAVE_PIPE2@ HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@ HAVE_PREAD = @HAVE_PREAD@ HAVE_PTSNAME = @HAVE_PTSNAME@ HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ HAVE_PWRITE = @HAVE_PWRITE@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_READDIR = @HAVE_READDIR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ HAVE_REALPATH = @HAVE_REALPATH@ HAVE_REWINDDIR = @HAVE_REWINDDIR@ HAVE_RPMATCH = @HAVE_RPMATCH@ HAVE_SCANDIR = @HAVE_SCANDIR@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@ HAVE_SLEEP = @HAVE_SLEEP@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRPTIME = @HAVE_STRPTIME@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ HAVE_TIMEGM = @HAVE_TIMEGM@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ HAVE_USLEEP = @HAVE_USLEEP@ HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE__BOOL = @HAVE__BOOL@ HAVE__EXIT = @HAVE__EXIT@ HELP2MAN = @HELP2MAN@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBRARY_NAMESPACE = @LIBRARY_NAMESPACE@ LIBRARY_VERSION = @LIBRARY_VERSION@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@ NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ NEXT_DIRENT_H = @NEXT_DIRENT_H@ NEXT_GETOPT_H = @NEXT_GETOPT_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PRAGMA_COLUMNS = @PRAGMA_COLUMNS@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ RANLIB = @RANLIB@ REPLACE_CALLOC = @REPLACE_CALLOC@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ REPLACE_CHOWN = @REPLACE_CHOWN@ REPLACE_CLOSE = @REPLACE_CLOSE@ REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@ REPLACE_DIRFD = @REPLACE_DIRFD@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@ REPLACE_FSTAT = @REPLACE_FSTAT@ REPLACE_FSTATAT = @REPLACE_FSTATAT@ REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_LSTAT = @REPLACE_LSTAT@ REPLACE_MALLOC = @REPLACE_MALLOC@ REPLACE_MBTOWC = @REPLACE_MBTOWC@ REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKDIR = @REPLACE_MKDIR@ REPLACE_MKFIFO = @REPLACE_MKFIFO@ REPLACE_MKNOD = @REPLACE_MKNOD@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OPENDIR = @REPLACE_OPENDIR@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_PWRITE = @REPLACE_PWRITE@ REPLACE_READ = @REPLACE_READ@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_REALLOC = @REPLACE_REALLOC@ REPLACE_REALPATH = @REPLACE_REALPATH@ REPLACE_RMDIR = @REPLACE_RMDIR@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_STAT = @REPLACE_STAT@ REPLACE_STPNCPY = @REPLACE_STPNCPY@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRERROR_R = @REPLACE_STRERROR_R@ REPLACE_STRNCAT = @REPLACE_STRNCAT@ REPLACE_STRNDUP = @REPLACE_STRNDUP@ REPLACE_STRNLEN = @REPLACE_STRNLEN@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ REPLACE_UNLINK = @REPLACE_UNLINK@ REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ REPLACE_UNSETENV = @REPLACE_UNSETENV@ REPLACE_USLEEP = @REPLACE_USLEEP@ REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@ REPLACE_WCTOMB = @REPLACE_WCTOMB@ REPLACE_WRITE = @REPLACE_WRITE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STRIP = @STRIP@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TAR = @TAR@ TEXI2HTML = @TEXI2HTML@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ VALGRIND = @VALGRIND@ VERSION = @VERSION@ YACC = @YACC@ YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bash_completiondir = @bash_completiondir@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ gltests_WITNESS = @gltests_WITNESS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ source_highlightdatadir = @source_highlightdatadir@ source_highlightdocdir = @source_highlightdocdir@ source_highlightlibdocdir = @source_highlightlibdocdir@ source_highlightlibexampledir = @source_highlightlibexampledir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @NO_DOUBLECPP_FALSE@SUFFIXES = .hpp .h # for doxygen documentation @HAVE_DOXYGEN_TRUE@DOXYFILE = $(builddir)/srchilite.doxyfile @HAVE_DOXYGEN_TRUE@help_dir = $(htmldir)/api AM_CPPFLAGS = -I$(top_srcdir)/gl -I$(top_builddir)/gl $(BOOST_CPPFLAGS) AM_LDFLAGS = $(BOOST_LDFLAGS) LDADD = $(top_builddir)/gl/libgnu.la lib_LTLIBRARIES = libsource-highlight.la libsource_highlight_la_SOURCES = \ fileutil.cc \ substfun.cpp \ stopwatch.cpp utils.cpp \ ioexception.cpp \ settings.cpp \ versions.cpp \ verbosity.cpp \ sourcehighlight.cpp styleparser.cc \ stylescanner.cc outlangdefparser.cc \ stylecssparser.cc stylecssscanner.cc outlangdefscanner.cc \ debuglistener.cpp langmap.cpp stylefileparser.cpp \ langelem.cpp statelangelem.cpp \ langelems.cpp statestartlangelem.cpp stringlistlangelem.cpp \ delimitedlangelem.cpp langelemsprinter.cpp langelemsprinter.hpp \ namedsubexpslangelem.cpp stringdef.cpp \ highlightrule.cpp highlighttoken.cpp \ highlightstate.cpp highlightrulefactory.cpp highlightstateprinter.cpp \ sourcehighlighter.cpp sourcefilehighlighter.cpp \ linenumgenerator.cpp lineranges.cpp regexranges.cpp \ formatter.cpp formattermanager.cpp \ textstyle.cpp textstyleformatter.cpp bufferedoutput.cpp \ preformatter.cpp wordtokenizer.cpp ctagscollector.cpp readtags.c ctagsformatter.cpp \ srcuntabifier.cpp textstyleformatterfactory.cpp \ docgenerator.cc doctemplate.cpp chartranslator.cc \ textstylebuilder.cpp fileinfo.cpp ctagsmanager.cpp \ regexhighlightrule.cpp regexrulefactory.cpp \ regexpreprocessor.cpp \ highlightstatebuilder.cpp highlightstatebuilder.hpp \ highlightbuilderexception.cpp langdefmanager.cpp \ langdefparser.cc langdefscanner.cc \ languageinfer.cpp \ parserexception.cpp \ stringtable.cpp vardefinitions.cpp \ sourcehighlightutils.cpp \ instances.cpp libsource_highlight_la_LIBADD = $(top_builddir)/gl/libgnu.la \ @LTLIBOBJS@ $(BOOST_REGEX_LIB) libsource_highlight_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LIBRARY_VERSION) library_includedir = $(includedir)/$(LIBRARY_NAMESPACE) library_include_HEADERS = $(h_sources) h_sources = parsestyles.h \ stringdef.h langelem.h \ statelangelem.h langelems.h langdefparserfun.h outlangdefparserfun.h \ tostringcollection.h regexpreprocessor.h \ langdefscanner.h outlangdefscanner.h parsestruct.h langmap.h statestartlangelem.h \ stringlistlangelem.h delimitedlangelem.h vardefinitions.h textstyle.h \ textstyles.h textstylebuilder.h doctemplate.h substfun.h \ parserinfo.h readtags.h fileinfo.h linebuffer.h preformatter.h \ langelemsprinter.h languageinfer.h stopwatch.h stylekey.h \ namedsubexpslangelem.h refposition.h \ highlightrule.h highlighttoken.h highlightrulefactory.h highlightstate.h \ regexhighlightrule.h regexrulefactory.h \ highlightstateprinter.h sourcehighlighter.h matchingparameters.h \ formatter.h formattermanager.h \ highlightstatebuilder.h highlightbuilderexception.h \ wordtokenizer.h ctagscollector.h formatterparams.h ctagsformatter.h \ sourcefilehighlighter.h linenumgenerator.h \ textstyleformatter.h formatterfactory.h textstyleformatterfactory.h \ langdefmanager.h sourcehighlight.h \ textstyleformattercollection.h \ ioexception.h parserexception.h stringtable.h \ eventgenerator.h highlightevent.h highlighteventlistener.h \ debuglistener.h ctagsmanager.h bufferedoutput.h lineranges.h regexranges.h \ colors.h \ keys.h styleparser.h stylecssparser.h \ fileutil.h \ chartranslator.h \ docgenerator.h \ srcuntabifier.h colormap.h \ langdefparser.h outlangdefparser.h \ stylefileparser.h \ settings.h \ versions.h \ verbosity.h \ sourcehighlightutils.h utils.h \ instances.h INCLUDES = -I@top_srcdir@/src EXTRA_DIST = $(h_sources) \ langelemsprinter_dbtab.cc \ highlightstatebuilder_dbtab.cc \ srchilite.doxyfile.in \ srchilite.pro \ styleparser.yy \ stylescanner.ll outlangdefparser.yy \ stylecssparser.yy stylecssscanner.ll outlangdefscanner.ll \ langdefparser.yy langdefscanner.ll BUILT_SOURCES = \ langdefparser.cc langdefparser.h langdefscanner.cc \ outlangdefparser.cc outlangdefparser.h outlangdefscanner.cc \ styleparser.cc styleparser.h \ stylecssparser.cc stylecssparser.h \ stylescanner.cc stylecssscanner.cc \ langelemsprinter.hpp langelemsprinter_dbtab.cc \ highlightstatebuilder.hpp highlightstatebuilder_dbtab.cc test_readtags_SOURCES = test_readtags_main.cpp readtags.h test_readtags_DEPENDENCIES = mytags test_readtags_LDADD = readtags.$(OBJEXT) CLEANFILES = doxygen.stamp DISTCLEANFILES = mytags MAINTAINERCLEANFILES = styleparser.cc styleparser.h stylescanner.cc \ langdefparser.cc langdefparser.h langdefscanner.cc \ outlangdefparser.cc outlangdefparser.h outlangdefscanner.cc all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .hpp .h .c .cc .cpp .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/srchilite/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu lib/srchilite/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): srchilite.doxyfile: $(top_builddir)/config.status $(srcdir)/srchilite.doxyfile.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libsource-highlight.la: $(libsource_highlight_la_OBJECTS) $(libsource_highlight_la_DEPENDENCIES) $(libsource_highlight_la_LINK) -rpath $(libdir) $(libsource_highlight_la_OBJECTS) $(libsource_highlight_la_LIBADD) $(LIBS) test_readtags$(EXEEXT): $(test_readtags_OBJECTS) $(test_readtags_DEPENDENCIES) @rm -f test_readtags$(EXEEXT) $(CXXLINK) $(test_readtags_OBJECTS) $(test_readtags_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/yywrap.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bufferedoutput.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chartranslator.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ctagscollector.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ctagsformatter.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ctagsmanager.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/debuglistener.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/delimitedlangelem.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/docgenerator.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/doctemplate.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fileinfo.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fileutil.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/formatter.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/formattermanager.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/highlightbuilderexception.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/highlightrule.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/highlightrulefactory.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/highlightstate.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/highlightstatebuilder.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/highlightstateprinter.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/highlighttoken.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/instances.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioexception.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/langdefmanager.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/langdefparser.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/langdefscanner.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/langelem.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/langelems.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/langelemsprinter.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/langmap.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/languageinfer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/linenumgenerator.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lineranges.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/namedsubexpslangelem.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/outlangdefparser.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/outlangdefscanner.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parserexception.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/preformatter.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readtags.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regexhighlightrule.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regexpreprocessor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regexranges.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regexrulefactory.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/settings.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sourcefilehighlighter.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sourcehighlight.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sourcehighlighter.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sourcehighlightutils.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/srcuntabifier.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/statelangelem.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/statestartlangelem.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stopwatch.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stringdef.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stringlistlangelem.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stringtable.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stylecssparser.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stylecssscanner.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stylefileparser.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/styleparser.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stylescanner.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/substfun.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_readtags_main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/textstyle.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/textstylebuilder.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/textstyleformatter.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/textstyleformatterfactory.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utils.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vardefinitions.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/verbosity.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/versions.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wordtokenizer.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< .cc.o: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cc.lo: @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< .cpp.o: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-library_includeHEADERS: $(library_include_HEADERS) @$(NORMAL_INSTALL) test -z "$(library_includedir)" || $(MKDIR_P) "$(DESTDIR)$(library_includedir)" @list='$(library_include_HEADERS)'; test -n "$(library_includedir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(library_includedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(library_includedir)" || exit $$?; \ done uninstall-library_includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(library_include_HEADERS)'; test -n "$(library_includedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(library_includedir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(library_includedir)" && rm -f $$files ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(library_includedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) @HAVE_DOXYGEN_FALSE@uninstall-local: @HAVE_DOXYGEN_FALSE@install-data-local: @HAVE_DOXYGEN_FALSE@clean-local: clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool clean-local \ mostlyclean-am distclean: distclean-am -rm -rf $(DEPDIR) ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-data-local install-library_includeHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf $(DEPDIR) ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES \ uninstall-library_includeHEADERS uninstall-local .MAKE: all check install install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool clean-local ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am \ install-data-local install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-libLTLIBRARIES \ install-library_includeHEADERS install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-libLTLIBRARIES \ uninstall-library_includeHEADERS uninstall-local # we need to put doublecpp generated files in the srcdir # since we want to distribute them @NO_DOUBLECPP_FALSE@.h.hpp: @NO_DOUBLECPP_FALSE@ cd $(srcdir) && \ @NO_DOUBLECPP_FALSE@ $(DOUBLECPP) --output-source-ext cc --invade-target --input-header-ext h --output-header-ext hpp --output-source-suff=_dbtab --verbose --assume-virtual -i $(notdir $<) @NO_DOUBLECPP_FALSE@ touch $@ @HAVE_DOXYGEN_TRUE@doxygen.stamp: $(DOXYFILE) @HAVE_DOXYGEN_TRUE@ $(DOXYGEN) $(DOXYFLAGS) $< @HAVE_DOXYGEN_TRUE@ echo Timestamp > $@ @HAVE_DOXYGEN_TRUE@install-data-local: doxygen.stamp @HAVE_DOXYGEN_TRUE@ @$(NORMAL_INSTALL) @HAVE_DOXYGEN_TRUE@ $(MKDIR_P) $(DESTDIR)$(help_dir) @HAVE_DOXYGEN_TRUE@ $(INSTALL_DATA) $(builddir)/html/* $(DESTDIR)$(help_dir) @HAVE_DOXYGEN_TRUE@uninstall-local: @HAVE_DOXYGEN_TRUE@ @$(NORMAL_UNINSTALL) @HAVE_DOXYGEN_TRUE@ rm -f $(DESTDIR)$(help_dir)/* @HAVE_DOXYGEN_TRUE@clean-local: @HAVE_DOXYGEN_TRUE@ rm -f $(builddir)/html/* langdefscanner.cc: $(srcdir)/langdefscanner.ll $(LEX) $(LFLAGS) -o $(srcdir)/langdefscanner.cc $(srcdir)/langdefscanner.ll langdefparser.cc: $(srcdir)/langdefparser.yy $(YACC) -p langdef_ -o $(srcdir)/langdefparser.cc $(srcdir)/langdefparser.yy --defines=$(srcdir)/langdefparser.h langdefparser.h: langdefparser.cc outlangdefscanner.cc: $(srcdir)/outlangdefscanner.ll $(LEX) $(LFLAGS) -o $(srcdir)/outlangdefscanner.cc $(srcdir)/outlangdefscanner.ll outlangdefparser.cc outlangdefparser.h: $(srcdir)/outlangdefparser.yy $(YACC) -p outlangdef_ -o $(srcdir)/outlangdefparser.cc $(srcdir)/outlangdefparser.yy --defines=$(srcdir)/outlangdefparser.h stylescanner.cc: $(srcdir)/stylescanner.ll $(LEX) $(LFLAGS) -o $(srcdir)/stylescanner.cc $(srcdir)/stylescanner.ll stylecssscanner.cc: $(srcdir)/stylecssscanner.ll $(LEX) $(LFLAGS) -o $(srcdir)/stylecssscanner.cc $(srcdir)/stylecssscanner.ll styleparser.cc styleparser.h: $(srcdir)/styleparser.yy $(YACC) -p stylesc_ -o $(srcdir)/styleparser.cc $(srcdir)/styleparser.yy --defines=$(srcdir)/styleparser.h stylecssparser.cc stylecssparser.h: $(srcdir)/stylecssparser.yy $(YACC) -p stylecsssc_ -o $(srcdir)/stylecssparser.cc $(srcdir)/stylecssparser.yy --defines=$(srcdir)/stylecssparser.h mytags: $(srcdir)/test_readtags_main.cpp $(CTAGS) --excmd=n --fields=+n -o mytags $(srcdir)/test_readtags_main.cpp $(srcdir)/readtags.h # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: �����������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/outlangdefscanner.ll�������������������������������������������0000644�0001750�0001750�00000015523�11672675563�020526� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������%{ /* * Copyright (C) 1999-2005, Lorenzo Bettini, http://www.lorenzobettini.it * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ #include <sstream> #include "outlangdefparser.h" #include "outlangdefscanner.h" #include "fileutil.h" #include "ioexception.h" #include <stack> #include <stdlib.h> using namespace srchilite; //#define DEBUG_SCANNER #ifdef DEBUG_SCANNER #include <iostream> // for debug #define DEB(s) std::cerr << s << std::endl; #define DEB2(s,s2) std::cerr << s << ": " << s2 << std::endl; #else #define DEB(s) #define DEB2(s,s2) #endif #define PUSH(s) yy_push_state(s); #define POP() yy_pop_state(); static std::ostringstream buff; static void buffer(const char *s); static void buffer(const char c); static void buffer_escape(const char *c); static const std::string *flush_buffer(); static void open_include_file(const char *file); static void close_include_file(); ParseStructPtr outlang_parsestruct; typedef std::stack<ParseStructPtr> ParseStructStack; static ParseStructStack parsestructstack; %} %option prefix="outlangdef_" %option noyywrap ws [ ]+ tabs [\t]+ nl \n cr \r IDE [a-zA-Z_]([a-zA-Z0-9_])* STRING \"[^\n"]+\" %option stack %s COMMENT_STATE STRING_STATE INCLUDE_STATE TRANSLATION_STATE REGEX_STATE LITERAL_STATE TRANSLATED_STATE %% <INITIAL,TRANSLATION_STATE,TRANSLATED_STATE>[ \t] {} \r {} <INITIAL,TRANSLATION_STATE>"#" { PUSH(COMMENT_STATE); } <COMMENT_STATE>[^\n] {} <COMMENT_STATE>\n { ++(outlang_parsestruct->line); POP(); } <INITIAL>"nodoctemplate" { return NODOC_TEMPLATE_T ; } <INITIAL>"doctemplate" { return DOC_TEMPLATE_T ; } <INITIAL>"styletemplate" { return STYLE_TEMPLATE_T ; } <INITIAL>"styleseparator" { return STYLE_SEPARATOR_T ; } <INITIAL>"bold" { return BOLD_T ; } <INITIAL>"italics" { return ITALICS_T ; } <INITIAL>"underline" { return UNDERLINE_T ; } <INITIAL>"notfixed" { return NOTFIXED_T ; } <INITIAL>"fixed" { return FIXED_T ; } <INITIAL>"colormap" { return COLORMAP_T ; } <INITIAL>"bgcolor" { return BG_COLOR_T ; } <INITIAL>"color" { return COLOR_T ; } <INITIAL>"default" { return DEFAULT_T ; } <INITIAL>"onestyle" { return ONESTYLE_T ; } <INITIAL>"extension" { return EXTENSION_T ; } <INITIAL>"anchor" { return ANCHOR_T ; } <INITIAL>"inline_reference" { return INLINE_REFERENCE_T ; } <INITIAL>"postline_reference" { return POSTLINE_REFERENCE_T ; } <INITIAL>"postdoc_reference" { return POSTDOC_REFERENCE_T ; } <INITIAL>"reference" { return REFERENCE_T ; } <INITIAL>"lineprefix" { return LINE_PREFIX_T; } <INITIAL>"linenum" { return LINENUM_T; } <INITIAL>"translations" { BEGIN(TRANSLATION_STATE); return TRANSLATIONS_T ; } <INITIAL>"begin" { return BEGIN_T ; } <INITIAL,TRANSLATION_STATE>"end" { BEGIN(INITIAL); return END_T ; } <INITIAL>"include"[ \t] { BEGIN(INCLUDE_STATE); } <INCLUDE_STATE>{STRING} { char *file_name = &yytext[1]; file_name[strlen(file_name)-1] = '\0'; try { open_include_file(file_name); } catch (IOException &e) { outlangdef_lval.string = new std::string(e.filename); return WRONG_INCLUDE_FILE; } yypush_buffer_state(yy_create_buffer( outlangdef_in, YY_BUF_SIZE)); BEGIN(INITIAL); } <<EOF>> { fclose(outlangdef_in); outlangdef_in = 0; yypop_buffer_state(); if ( !YY_CURRENT_BUFFER ) { yyterminate(); } else close_include_file(); } <INITIAL>{IDE} { DEB2("KEY",yytext); outlangdef_lval.string = new std::string(yytext) ; return KEY ; } <INITIAL>"=" { return '=' ; } <INITIAL>"," { return ',' ; } <INITIAL>"+" { return '+' ; } <INITIAL>\" { BEGIN(STRING_STATE) ; } <STRING_STATE>"\\x"[0-9a-zA-Z][0-9a-zA-Z] { string s = &yytext[1]; s = "0" + s; int i = strtol(s.c_str(), (char **)NULL, 0); buffer( (char)i ) ; } <STRING_STATE>\\\\ { buffer( yytext ) ; } <STRING_STATE>"\\\"" { buffer( "\"" ) ; } <STRING_STATE>\" { BEGIN(INITIAL) ; outlangdef_lval.string = flush_buffer() ; DEB2("STRINGDEF",outlangdef_lval.string); return STRINGDEF; } <STRING_STATE>[^\n]|" " { buffer( yytext ) ; } <STRING_STATE>\n { buffer( "\n" ) ; } <TRANSLATION_STATE,TRANSLATED_STATE>\" { BEGIN(LITERAL_STATE) ; } <LITERAL_STATE>("*"|"."|"?"|"+"|"("|")"|"{"|"}"|"["|"]"|"^"|"$"|"|") { buffer_escape( yytext ) ; } <LITERAL_STATE>\\\\ { buffer( yytext ) ; } <LITERAL_STATE>"\\\"" { buffer( yytext ) ; } <LITERAL_STATE>\" { BEGIN(TRANSLATION_STATE) ; outlangdef_lval.string = flush_buffer() ; DEB2("STRINGDEF",loutlangdef_lval.string); return REGEXDEF; } <LITERAL_STATE>[^\n]|" " { buffer( yytext ) ; } <TRANSLATION_STATE>\' { BEGIN(REGEX_STATE) ; } <REGEX_STATE>\\\\ { buffer( yytext ) ; } <REGEX_STATE>"\\'" { buffer( "'" ) ; } <REGEX_STATE>\' { BEGIN(TRANSLATED_STATE) ; // entering TRANSLATED_STATE makes sure that 'regex' is used only // for specifying the sequence to be translated, and not the translated sequence outlangdef_lval.string = flush_buffer() ; DEB2("STRINGDEF",outlangdef_lval.string); return REGEXDEF; } <REGEX_STATE>[^\n] { buffer( yytext ) ; } <INITIAL,TRANSLATION_STATE>{nl} { DEB("NEWLINE"); ++(outlang_parsestruct->line) ; } <INITIAL>. { return yytext[0] ; } %% void buffer(const char *s) { buff << s; } void buffer(const char s) { buff << s; } void buffer_escape(const char *s) { buff << "\\" << s; } const std::string *flush_buffer() { const std::string *ret = new std::string(buff.str()); buff.str(""); return ret; } void open_include_file(const char *name) { string file_name = name; string path = outlang_parsestruct->path; if (! contains_path(name) && contains_path(outlang_parsestruct->file_name)) path = get_file_path(outlang_parsestruct->file_name); parsestructstack.push(outlang_parsestruct); outlang_parsestruct = ParseStructPtr(new ParseStruct(path, file_name)); open_outlang_file_to_scan(path.c_str(), file_name.c_str()); } void close_include_file() { outlang_parsestruct = parsestructstack.top(); parsestructstack.pop(); } namespace srchilite { void open_outlang_file_to_scan(const string &path, const string &name) { outlangdef_in = open_data_file_stream(path, name); } void clear_outlangdefscanner() { //delete stringTable; outlangdef_lex_destroy(); } void close_outlangdefinputfile() { // also close possible open files due to inclusions do { if (outlangdef_in) fclose(outlangdef_in); yypop_buffer_state(); } while ( YY_CURRENT_BUFFER ); } } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/highlightstateprinter.h����������������������������������������0000644�0001750�0001750�00000001741�11672675563�021255� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2008 // // Copyright: See COPYING file that comes with this distribution // #ifndef HIGHLIGHTSTATEPRINTER_H_ #define HIGHLIGHTSTATEPRINTER_H_ #include <set> #include <iostream> namespace srchilite { class HighlightState; class HighlightRule; struct HighlightToken; typedef std::set<int> StateIdSet; /** * Prints an HighlightState (and all its rules) */ class HighlightStatePrinter { private: /// the indentation level int indent; /// to avoid infinite loops due to recursive states StateIdSet stateidset; /// the stream to print the state (default cout) std::ostream &stream; public: HighlightStatePrinter(std::ostream &s = std::cout); ~HighlightStatePrinter(); void printHighlightState(const HighlightState *state); void printHighlightRule(const HighlightRule *rule); void printHighlightToken(const HighlightToken *token); }; } #endif /*HIGHLIGHTSTATEPRINTER_H_*/ �������������������������������source-highlight-3.1.6/lib/srchilite/fileutil.cc����������������������������������������������������0000644�0001750�0001750�00000020614�11672675563�016614� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (C) 2000-2008 Lorenzo Bettini <http://www.lorenzobettini.it> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include <iostream> #include <fstream> #include <cstdlib> #include "fileutil.h" #include "verbosity.h" #include "ioexception.h" #ifndef CHROOT_INPUT_DIR #define CHROOT_INPUT_DIR "" #endif using namespace std; namespace srchilite { static bool verbose = false; void set_file_util_verbose(bool b) { verbose = b; } // global for the path to start to look for if no // path was specified // FIXME avoid using a global variable std::string start_path; string readFile(const string &fileName) throw (IOException) { ifstream file(fileName.c_str()); if (!file.is_open()) { throw IOException("cannot open", fileName); } string s, line; while (getline(file, line)) { s += line + "\n"; } return s; } /* char * read_file(const string &fileName) { char *buffer = 0; long int char_count; // we open it as binary otherwise we may experience problems under // Windows system: when we fread, the number of char read can be // less then char_count, and thus we'd get an error... ifstream file(fileName.c_str(), ios_base::binary); if (!file.is_open() ) file_error("Error operning", fileName); else { // let's go to the end of the file... file.seekg(0, ios::end); if (!file) file_error("Error positioning", fileName); // ...to read the dimension char_count = file.tellg(); if (!file) file_error("Error reading position", fileName); buffer = new char [char_count + 1]; if (!buffer) internal_error("Memory allocation failed"); file.seekg(0, ios::beg); if (!file) file_error("Error positioning to start", fileName); //copy file into memory file.read(buffer, char_count); buffer[char_count] = '\0'; file.close(); } return buffer; } */ string createOutputFileName(const string &inputFileName, const string &outputDir, const string &ext) { string input_file_name; char path_separator = '/'; if (!outputDir.size()) input_file_name = inputFileName; else { string::size_type pos_of_sep; pos_of_sep = inputFileName.find_last_of('/'); if (pos_of_sep == string::npos) // try with DOS separator { pos_of_sep = inputFileName.find_last_of('\\'); if (pos_of_sep != string::npos) path_separator = '\\'; } if (pos_of_sep != string::npos) input_file_name = inputFileName.substr(pos_of_sep + 1); else input_file_name = inputFileName; } string outputFileName; if (outputDir.size()) { outputFileName += outputDir; outputFileName += path_separator; } outputFileName += input_file_name; outputFileName += (ext.size() ? "." + ext : ""); return outputFileName; } unsigned int get_line_count(istream &input) { unsigned int count = 0; string line; while (true) { getline(input, line); if (!input.eof()) ++count; else break; } return count; } string get_file_extension(const string &s) { string::size_type pos_of_sep; pos_of_sep = s.rfind("."); if (pos_of_sep == string::npos) return ""; // no extension return s.substr(pos_of_sep + 1); } FILE *open_file_stream(const string &input_file_name) { FILE *in = fopen(input_file_name.c_str(), "r"); return in; } istream *open_file_istream(const string &input_file_name) { ifstream *in = new ifstream(input_file_name.c_str()); if (!in || !(*in)) { if (!in) throw IOException("no more free memory", ""); else delete in; return 0; } return in; } istream *open_file_istream_or_error(const string &input_file_name) { istream *in = open_file_istream(input_file_name); if (!in) throw IOException("cannot open", input_file_name); return in; } istream *_open_data_file_istream(const string &path, const string &input_file_name) { const string file = (path.size() ? path + "/" : "") + input_file_name; VERBOSELN("opening " + file); return open_file_istream(file); } istream *open_data_file_istream(const string &path, const string &input_file_name, const string &start) { if (!input_file_name.size()) throw IOException("empty file name", input_file_name); istream *in = 0; if (input_file_name.size() && contains_path(input_file_name)) { in = _open_data_file_istream("", input_file_name); if (!in) { throw IOException("cannot open", input_file_name); } } else if (path.size() && input_file_name.size()) { const string file = (path.size() ? path + "/" : "") + input_file_name; in = _open_data_file_istream(path, input_file_name); if (!in) { throw IOException("cannot open", file); } } else { string _path = path; string _file = input_file_name; bool has_path = contains_path(input_file_name); if (!path.size() && !has_path) _path = "."; in = _open_data_file_istream(_path, _file); if (!in && !path.size() && !has_path) in = _open_data_file_istream(start, _file); } if (!in) throw IOException("cannot find input file anywhere", input_file_name); return in; } // FIXME: duplicate for istream and FILE *, make it uniform! FILE *_open_data_file_stream(const string &path, const string &input_file_name) { const string file = (path.size() ? path + "/" : "") + input_file_name; VERBOSELN("opening " + file); return open_file_stream(file); } FILE *open_data_file_stream(const string &path, const string &input_file_name, const string &start) { if (!input_file_name.size()) throw IOException("empty file name", input_file_name); FILE *in = 0; if (input_file_name.size() && contains_path(input_file_name)) { in = _open_data_file_stream("", input_file_name); if (!in) { throw IOException("cannot open", input_file_name); } } else if (path.size() && input_file_name.size()) { const string file = (path.size() ? path + "/" : "") + input_file_name; in = _open_data_file_stream(path, input_file_name); if (!in) { throw IOException("cannot open", file); } } else { string _path = path; string _file = input_file_name; bool has_path = contains_path(input_file_name); if (!path.size() && !has_path) _path = "."; in = _open_data_file_stream(_path, _file); if (!in && !path.size() && !has_path) in = _open_data_file_stream(start, _file); } if (!in) throw IOException("cannot find input file anywhere", input_file_name); return in; } bool read_line(istream *in, string &line) { if (in->eof()) return false; getline(*in, line); return true; } string get_file_path(const string &s) { string::size_type pos_of_sep; pos_of_sep = s.rfind("/"); if (pos_of_sep == string::npos) pos_of_sep = s.rfind("\\"); // try also with DOS path sep if (pos_of_sep == string::npos) return ""; // no path return s.substr(0, pos_of_sep + 1); } bool contains_path(const string &s) { return (get_file_path(s).size() > 0); } string strip_file_path(const string &s) { string::size_type pos_of_sep; pos_of_sep = s.rfind("/"); if (pos_of_sep == string::npos) pos_of_sep = s.rfind("\\"); // try also with DOS path sep if (pos_of_sep == string::npos) return s; // no path return s.substr(pos_of_sep + 1); } string get_input_file_name(const string &file_name) { if (!file_name.size()) return ""; return CHROOT_INPUT_DIR + file_name; } } ��������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/doctemplate.cpp������������������������������������������������0000644�0001750�0001750�00000006327�11672675563�017502� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/** * C++ class: doctemplate.h * * Description: The template for a document containing the output of * highlighting * * Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2005-2007 * Copyright: See COPYING file that comes with this distribution */ #include "doctemplate.h" #include "substfun.h" namespace srchilite { #define TITLE_VAR_TEXT "$title" // the text of the title variable #define INPUT_LANG_VAR_TEXT "$inputlang" // the text of the input lang variable #define CSS_VAR_TEXT "$css" // the text of the css variable #define ADDITIONAL_VAR_TEXT "$additional" // the text of the additional text variable #define HEADER_VAR_TEXT "$header" // the text of the header variable #define FOOTER_VAR_TEXT "$footer" // the text of the footer variable #define BACKGROUND_VAR_TEXT "$docbgcolor" // the text of the background variable #define TITLE_VAR "\\" TITLE_VAR_TEXT // the name of the title variable as regexp #define INPUT_LANG_VAR "\\" INPUT_LANG_VAR_TEXT // the name of the input lang variable as regexp #define CSS_VAR "\\" CSS_VAR_TEXT // the name of the css variable as regexp #define ADDITIONAL_VAR "\\" ADDITIONAL_VAR_TEXT // the text of the additional text variable as regexp #define HEADER_VAR "\\" HEADER_VAR_TEXT // the text of the header variable as regexp #define FOOTER_VAR "\\" FOOTER_VAR_TEXT // the text of the footer variable as regexp #define BACKGROUND_VAR "\\" BACKGROUND_VAR_TEXT // the text of the background variable as regexp using namespace std; DocTemplate::DocTemplate(const string &begin, const string &end) : begin_repr(begin), end_repr(end) { } string DocTemplate::output_begin(const string &title, const string &cs, const string &add, const string &header, const string &footer, const std::string &background, const string &input_lang) { boost::regex title_exp(TITLE_VAR); boost::regex css_exp(CSS_VAR); boost::regex additional_exp(ADDITIONAL_VAR); boost::regex header_exp(HEADER_VAR); boost::regex footer_exp(FOOTER_VAR); boost::regex background_exp(BACKGROUND_VAR); boost::regex input_lang_exp(INPUT_LANG_VAR); string ret = subst(title_exp, begin_repr, title); ret = subst(css_exp, ret, cs); ret = subst(additional_exp, ret, add); ret = subst(header_exp, ret, header); ret = subst(footer_exp, ret, footer); ret = subst(background_exp, ret, background); ret = subst(input_lang_exp, ret, input_lang); return ret; } string DocTemplate::output_end(const string &title, const string &cs, const string &add, const string &header, const string &footer, const std::string &background, const string &input_lang) { boost::regex title_exp(TITLE_VAR); boost::regex css_exp(CSS_VAR); boost::regex additional_exp(ADDITIONAL_VAR); boost::regex header_exp(HEADER_VAR); boost::regex footer_exp(FOOTER_VAR); boost::regex background_exp(BACKGROUND_VAR); boost::regex input_lang_exp(INPUT_LANG_VAR); string ret = subst(title_exp, end_repr, title); ret = subst(css_exp, ret, cs); ret = subst(additional_exp, ret, add); ret = subst(header_exp, ret, header); ret = subst(footer_exp, ret, footer); ret = subst(background_exp, ret, background); ret = subst(input_lang_exp, ret, input_lang); return ret; } } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/langelem.cpp���������������������������������������������������0000644�0001750�0001750�00000000607�11672675563�016760� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2008 // // Copyright: See COPYING file that comes with this distribution // #include "langelem.h" #include <sstream> namespace srchilite { const std::string LangElem::toStringParserInfo() const { std::ostringstream os; os << filename; if (line > 0) os << ":" << line; return os.str(); } } �������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/wordtokenizer.h������������������������������������������������0000644�0001750�0001750�00000001662�11672675564�017552� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2008 // // Copyright: See COPYING file that comes with this distribution // #ifndef WORDTOKENIZER_H_ #define WORDTOKENIZER_H_ #include <string> #include <algorithm> #include <list> namespace srchilite { /** * Tokenizes a paragraph separating words from spaces */ class WordTokenizer { public: /** * Results of the tokenizer; each element is a pair where the first * string represents a possible space and the second string a possible word. * The two elements are mutually exclusive */ typedef std::list<std::pair<std::string, std::string> > WordTokenizerResults; /** * Tokenizes the passed string and stores the results. * @param s the string to tokenize * @param results where to store the results */ static void tokenize(const std::string &s, WordTokenizerResults &results); }; } #endif /*WORDTOKENIZER_H_*/ ������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/styleparser.cc�������������������������������������������������0000644�0001750�0001750�00000150507�11675044736�017354� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������ /* A Bison parser, made by GNU Bison 2.4.1. */ /* Skeleton implementation for Bison's Yacc-like parsers in C Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work under terms of your choice, so long as that work isn't itself a parser generator using the skeleton or a modified version thereof as a parser skeleton. Alternatively, if you modify or redistribute the parser skeleton itself, you may (at your option) remove this special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ /* C LALR(1) parser skeleton written by Richard Stallman, by simplifying the original so-called "semantic" parser. */ /* All symbols defined below should begin with yy or YY, to avoid infringing on user name space. This should be done even for local variables, as they might otherwise be expanded by user macros. There are some unavoidable exceptions within include files to define necessary library symbols; they are noted "INFRINGES ON USER NAME SPACE" below. */ /* Identify Bison output. */ #define YYBISON 1 /* Bison version. */ #define YYBISON_VERSION "2.4.1" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" /* Pure parsers. */ #define YYPURE 0 /* Push parsers. */ #define YYPUSH 0 /* Pull parsers. */ #define YYPULL 1 /* Using locations. */ #define YYLSP_NEEDED 0 /* Substitute the variable and function names. */ #define yyparse stylesc_parse #define yylex stylesc_lex #define yyerror stylesc_error #define yylval stylesc_lval #define yychar stylesc_char #define yydebug stylesc_debug #define yynerrs stylesc_nerrs /* Copy the first part of user declarations. */ /* Line 189 of yacc.c */ #line 1 "../../../lib/srchilite/styleparser.yy" /* * Copyright (C) 1999-2007 Lorenzo Bettini <http://www.lorenzobettini.it> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ #include <stdio.h> #include <stdlib.h> #include <iostream> #include <string> #include "formatterfactory.h" #include "colors.h" #include "keys.h" #include "parsestyles.h" #include "fileutil.h" #include "stylekey.h" #include "parserexception.h" #include "settings.h" using std::cerr; using std::string; using namespace srchilite; static int yyparse() ; static void yyerror( const char *s ) ; static void yyerror( const string &s ) ; int line = 1 ; extern int stylesc_lex() ; extern FILE *stylesc_in ; extern int stylesc_lex_destroy (void); static string bodyBgColor; static void updateBgColor(const std::string *); // to generate the formatter for each language element static FormatterFactory *formatterFactory; /// where we store possible errors static string errorBuffer; /* Line 189 of yacc.c */ #line 143 "../../../lib/srchilite/styleparser.cc" /* Enabling traces. */ #ifndef YYDEBUG # define YYDEBUG 0 #endif /* Enabling verbose error messages. */ #ifdef YYERROR_VERBOSE # undef YYERROR_VERBOSE # define YYERROR_VERBOSE 1 #else # define YYERROR_VERBOSE 0 #endif /* Enabling the token table. */ #ifndef YYTOKEN_TABLE # define YYTOKEN_TABLE 0 #endif /* Tokens. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE /* Put the tokens into the symbol table, so that GDB and other debuggers know about them. */ enum yytokentype { BOLD = 258, ITALICS = 259, UNDERLINE = 260, FIXED = 261, NOTFIXED = 262, NOREF = 263, KEY = 264, COLOR = 265, BG_COLOR = 266, STRINGDEF = 267, BG_T = 268, BODY_BG_COLOR = 269 }; #endif /* Tokens. */ #define BOLD 258 #define ITALICS 259 #define UNDERLINE 260 #define FIXED 261 #define NOTFIXED 262 #define NOREF 263 #define KEY 264 #define COLOR 265 #define BG_COLOR 266 #define STRINGDEF 267 #define BG_T 268 #define BODY_BG_COLOR 269 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE { /* Line 214 of yacc.c */ #line 62 "../../../lib/srchilite/styleparser.yy" int tok ; /* command */ const std::string * string ; /* string : id, ... */ srchilite::StyleConstant flag ; srchilite::StyleConstants *styleconstants; srchilite::KeyList *keylist; /* Line 214 of yacc.c */ #line 217 "../../../lib/srchilite/styleparser.cc" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 #endif /* Copy the second part of user declarations. */ /* Line 264 of yacc.c */ #line 229 "../../../lib/srchilite/styleparser.cc" #ifdef short # undef short #endif #ifdef YYTYPE_UINT8 typedef YYTYPE_UINT8 yytype_uint8; #else typedef unsigned char yytype_uint8; #endif #ifdef YYTYPE_INT8 typedef YYTYPE_INT8 yytype_int8; #elif (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) typedef signed char yytype_int8; #else typedef short int yytype_int8; #endif #ifdef YYTYPE_UINT16 typedef YYTYPE_UINT16 yytype_uint16; #else typedef unsigned short int yytype_uint16; #endif #ifdef YYTYPE_INT16 typedef YYTYPE_INT16 yytype_int16; #else typedef short int yytype_int16; #endif #ifndef YYSIZE_T # ifdef __SIZE_TYPE__ # define YYSIZE_T __SIZE_TYPE__ # elif defined size_t # define YYSIZE_T size_t # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # else # define YYSIZE_T unsigned int # endif #endif #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) #ifndef YY_ # if YYENABLE_NLS # if ENABLE_NLS # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ # define YY_(msgid) dgettext ("bison-runtime", msgid) # endif # endif # ifndef YY_ # define YY_(msgid) msgid # endif #endif /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ # define YYUSE(e) ((void) (e)) #else # define YYUSE(e) /* empty */ #endif /* Identity function, used to suppress warnings about constant conditions. */ #ifndef lint # define YYID(n) (n) #else #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static int YYID (int yyi) #else static int YYID (yyi) int yyi; #endif { return yyi; } #endif #if ! defined yyoverflow || YYERROR_VERBOSE /* The parser invokes alloca or malloc; define the necessary symbols. */ # ifdef YYSTACK_USE_ALLOCA # if YYSTACK_USE_ALLOCA # ifdef __GNUC__ # define YYSTACK_ALLOC __builtin_alloca # elif defined __BUILTIN_VA_ARG_INCR # include <alloca.h> /* INFRINGES ON USER NAME SPACE */ # elif defined _AIX # define YYSTACK_ALLOC __alloca # elif defined _MSC_VER # include <malloc.h> /* INFRINGES ON USER NAME SPACE */ # define alloca _alloca # else # define YYSTACK_ALLOC alloca # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ # ifndef _STDLIB_H # define _STDLIB_H 1 # endif # endif # endif # endif # endif # ifdef YYSTACK_ALLOC /* Pacify GCC's `empty if-body' warning. */ # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) # ifndef YYSTACK_ALLOC_MAXIMUM /* The OS might guarantee only one guard page at the bottom of the stack, and a page size can be as small as 4096 bytes. So we cannot safely invoke alloca (N) if N exceeds 4096. Use a slightly smaller number to allow for a few compiler-allocated temporary stack slots. */ # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ # endif # else # define YYSTACK_ALLOC YYMALLOC # define YYSTACK_FREE YYFREE # ifndef YYSTACK_ALLOC_MAXIMUM # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM # endif # if (defined __cplusplus && ! defined _STDLIB_H \ && ! ((defined YYMALLOC || defined malloc) \ && (defined YYFREE || defined free))) # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ # ifndef _STDLIB_H # define _STDLIB_H 1 # endif # endif # ifndef YYMALLOC # define YYMALLOC malloc # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ # endif # endif # ifndef YYFREE # define YYFREE free # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif # endif # endif #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ #if (! defined yyoverflow \ && (! defined __cplusplus \ || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc { yytype_int16 yyss_alloc; YYSTYPE yyvs_alloc; }; /* The size of the maximum gap between one aligned stack and the next. */ # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) /* The size of an array large to enough to hold all stacks, each with N elements. */ # define YYSTACK_BYTES(N) \ ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + YYSTACK_GAP_MAXIMUM) /* Copy COUNT objects from FROM to TO. The source and destination do not overlap. */ # ifndef YYCOPY # if defined __GNUC__ && 1 < __GNUC__ # define YYCOPY(To, From, Count) \ __builtin_memcpy (To, From, (Count) * sizeof (*(From))) # else # define YYCOPY(To, From, Count) \ do \ { \ YYSIZE_T yyi; \ for (yyi = 0; yyi < (Count); yyi++) \ (To)[yyi] = (From)[yyi]; \ } \ while (YYID (0)) # endif # endif /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ do \ { \ YYSIZE_T yynewbytes; \ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ Stack = &yyptr->Stack_alloc; \ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ while (YYID (0)) #endif /* YYFINAL -- State number of the termination state. */ #define YYFINAL 11 /* YYLAST -- Last index in YYTABLE. */ #define YYLAST 24 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 18 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 13 /* YYNRULES -- Number of rules. */ #define YYNRULES 29 /* YYNRULES -- Number of states. */ #define YYNSTATES 38 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 #define YYMAXUTOK 269 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ static const yytype_uint8 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 16, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 17, 15, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 }; #if YYDEBUG /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in YYRHS. */ static const yytype_uint8 yyprhs[] = { 0, 0, 3, 4, 6, 9, 11, 13, 15, 16, 23, 27, 29, 30, 32, 34, 35, 39, 43, 47, 51, 52, 54, 58, 60, 62, 64, 66, 68, 70 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ static const yytype_int8 yyrhs[] = { 19, 0, -1, -1, 20, -1, 20, 21, -1, 21, -1, 22, -1, 27, -1, -1, 24, 25, 26, 23, 28, 15, -1, 24, 16, 9, -1, 9, -1, -1, 10, -1, 12, -1, -1, 13, 17, 10, -1, 13, 17, 12, -1, 14, 10, 15, -1, 14, 12, 15, -1, -1, 29, -1, 29, 16, 30, -1, 30, -1, 3, -1, 4, -1, 5, -1, 6, -1, 7, -1, 8, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint8 yyrline[] = { 0, 86, 86, 87, 90, 91, 94, 95, 99, 98, 134, 140, 148, 149, 150, 153, 154, 155, 158, 159, 162, 163, 166, 167, 170, 171, 172, 173, 174, 175 }; #endif #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { "$end", "error", "$undefined", "BOLD", "ITALICS", "UNDERLINE", "FIXED", "NOTFIXED", "NOREF", "KEY", "COLOR", "BG_COLOR", "STRINGDEF", "BG_T", "BODY_BG_COLOR", "';'", "','", "':'", "$accept", "stylefile", "statements", "statement", "option", "$@1", "keylist", "color", "bgcolor", "bodybgcolor", "stylevalues", "values", "value", 0 }; #endif # ifdef YYPRINT /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to token YYLEX-NUM. */ static const yytype_uint16 yytoknum[] = { 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 59, 44, 58 }; # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_uint8 yyr1[] = { 0, 18, 19, 19, 20, 20, 21, 21, 23, 22, 24, 24, 25, 25, 25, 26, 26, 26, 27, 27, 28, 28, 29, 29, 30, 30, 30, 30, 30, 30 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ static const yytype_uint8 yyr2[] = { 0, 2, 0, 1, 2, 1, 1, 1, 0, 6, 3, 1, 0, 1, 1, 0, 3, 3, 3, 3, 0, 1, 3, 1, 1, 1, 1, 1, 1, 1 }; /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state STATE-NUM when YYTABLE doesn't specify something else to do. Zero means the default is an error. */ static const yytype_uint8 yydefact[] = { 2, 11, 0, 0, 3, 5, 6, 12, 7, 0, 0, 1, 4, 13, 14, 0, 15, 18, 19, 10, 0, 8, 0, 20, 16, 17, 24, 25, 26, 27, 28, 29, 0, 21, 23, 9, 0, 22 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int8 yydefgoto[] = { -1, 3, 4, 5, 6, 23, 7, 16, 21, 8, 32, 33, 34 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ #define YYPACT_NINF -14 static const yytype_int8 yypact[] = { 5, -14, -9, 16, 5, -14, -14, -10, -14, -11, 2, -14, -14, -14, -14, -4, 7, -14, -14, -14, 1, -14, 3, 4, -14, -14, -14, -14, -14, -14, -14, -14, 6, 8, -14, -14, 4, -14 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int8 yypgoto[] = { -14, -14, -14, 18, -14, -14, -14, -14, -14, -14, -14, -14, -13 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule which number is the opposite. If zero, do what YYDEFACT says. If YYTABLE_NINF, syntax error. */ #define YYTABLE_NINF -1 static const yytype_uint8 yytable[] = { 13, 9, 14, 10, 17, 19, 15, 26, 27, 28, 29, 30, 31, 24, 1, 25, 11, 18, 22, 2, 20, 35, 12, 37, 36 }; static const yytype_uint8 yycheck[] = { 10, 10, 12, 12, 15, 9, 16, 3, 4, 5, 6, 7, 8, 10, 9, 12, 0, 15, 17, 14, 13, 15, 4, 36, 16 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { 0, 9, 14, 19, 20, 21, 22, 24, 27, 10, 12, 0, 21, 10, 12, 16, 25, 15, 15, 9, 13, 26, 17, 23, 10, 12, 3, 4, 5, 6, 7, 8, 28, 29, 30, 15, 16, 30 }; #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) #define YYEMPTY (-2) #define YYEOF 0 #define YYACCEPT goto yyacceptlab #define YYABORT goto yyabortlab #define YYERROR goto yyerrorlab /* Like YYERROR except do call yyerror. This remains here temporarily to ease the transition to the new meaning of YYERROR, for GCC. Once GCC version 2 has supplanted version 1, this can go. */ #define YYFAIL goto yyerrlab #define YYRECOVERING() (!!yyerrstatus) #define YYBACKUP(Token, Value) \ do \ if (yychar == YYEMPTY && yylen == 1) \ { \ yychar = (Token); \ yylval = (Value); \ yytoken = YYTRANSLATE (yychar); \ YYPOPSTACK (1); \ goto yybackup; \ } \ else \ { \ yyerror (YY_("syntax error: cannot back up")); \ YYERROR; \ } \ while (YYID (0)) #define YYTERROR 1 #define YYERRCODE 256 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. If N is 0, then set CURRENT to the empty location which ends the previous symbol: RHS[0] (always defined). */ #define YYRHSLOC(Rhs, K) ((Rhs)[K]) #ifndef YYLLOC_DEFAULT # define YYLLOC_DEFAULT(Current, Rhs, N) \ do \ if (YYID (N)) \ { \ (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ } \ else \ { \ (Current).first_line = (Current).last_line = \ YYRHSLOC (Rhs, 0).last_line; \ (Current).first_column = (Current).last_column = \ YYRHSLOC (Rhs, 0).last_column; \ } \ while (YYID (0)) #endif /* YY_LOCATION_PRINT -- Print the location on the stream. This macro was not mandated originally: define only if we know we won't break user code: when these are the locations we know. */ #ifndef YY_LOCATION_PRINT # if YYLTYPE_IS_TRIVIAL # define YY_LOCATION_PRINT(File, Loc) \ fprintf (File, "%d.%d-%d.%d", \ (Loc).first_line, (Loc).first_column, \ (Loc).last_line, (Loc).last_column) # else # define YY_LOCATION_PRINT(File, Loc) ((void) 0) # endif #endif /* YYLEX -- calling `yylex' with the right arguments. */ #ifdef YYLEX_PARAM # define YYLEX yylex (YYLEX_PARAM) #else # define YYLEX yylex () #endif /* Enable debugging if requested. */ #if YYDEBUG # ifndef YYFPRINTF # include <stdio.h> /* INFRINGES ON USER NAME SPACE */ # define YYFPRINTF fprintf # endif # define YYDPRINTF(Args) \ do { \ if (yydebug) \ YYFPRINTF Args; \ } while (YYID (0)) # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ do { \ if (yydebug) \ { \ YYFPRINTF (stderr, "%s ", Title); \ yy_symbol_print (stderr, \ Type, Value); \ YYFPRINTF (stderr, "\n"); \ } \ } while (YYID (0)) /*--------------------------------. | Print this symbol on YYOUTPUT. | `--------------------------------*/ /*ARGSUSED*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) #else static void yy_symbol_value_print (yyoutput, yytype, yyvaluep) FILE *yyoutput; int yytype; YYSTYPE const * const yyvaluep; #endif { if (!yyvaluep) return; # ifdef YYPRINT if (yytype < YYNTOKENS) YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); # else YYUSE (yyoutput); # endif switch (yytype) { default: break; } } /*--------------------------------. | Print this symbol on YYOUTPUT. | `--------------------------------*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) #else static void yy_symbol_print (yyoutput, yytype, yyvaluep) FILE *yyoutput; int yytype; YYSTYPE const * const yyvaluep; #endif { if (yytype < YYNTOKENS) YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); else YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); yy_symbol_value_print (yyoutput, yytype, yyvaluep); YYFPRINTF (yyoutput, ")"); } /*------------------------------------------------------------------. | yy_stack_print -- Print the state stack from its BOTTOM up to its | | TOP (included). | `------------------------------------------------------------------*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) #else static void yy_stack_print (yybottom, yytop) yytype_int16 *yybottom; yytype_int16 *yytop; #endif { YYFPRINTF (stderr, "Stack now"); for (; yybottom <= yytop; yybottom++) { int yybot = *yybottom; YYFPRINTF (stderr, " %d", yybot); } YYFPRINTF (stderr, "\n"); } # define YY_STACK_PRINT(Bottom, Top) \ do { \ if (yydebug) \ yy_stack_print ((Bottom), (Top)); \ } while (YYID (0)) /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_reduce_print (YYSTYPE *yyvsp, int yyrule) #else static void yy_reduce_print (yyvsp, yyrule) YYSTYPE *yyvsp; int yyrule; #endif { int yynrhs = yyr2[yyrule]; int yyi; unsigned long int yylno = yyrline[yyrule]; YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", yyrule - 1, yylno); /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { YYFPRINTF (stderr, " $%d = ", yyi + 1); yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], &(yyvsp[(yyi + 1) - (yynrhs)]) ); YYFPRINTF (stderr, "\n"); } } # define YY_REDUCE_PRINT(Rule) \ do { \ if (yydebug) \ yy_reduce_print (yyvsp, Rule); \ } while (YYID (0)) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ # define YYDPRINTF(Args) # define YY_SYMBOL_PRINT(Title, Type, Value, Location) # define YY_STACK_PRINT(Bottom, Top) # define YY_REDUCE_PRINT(Rule) #endif /* !YYDEBUG */ /* YYINITDEPTH -- initial size of the parser's stacks. */ #ifndef YYINITDEPTH # define YYINITDEPTH 200 #endif /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only if the built-in stack extension method is used). Do not make this value too large; the results are undefined if YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) evaluated with infinite-precision integer arithmetic. */ #ifndef YYMAXDEPTH # define YYMAXDEPTH 10000 #endif #if YYERROR_VERBOSE # ifndef yystrlen # if defined __GLIBC__ && defined _STRING_H # define yystrlen strlen # else /* Return the length of YYSTR. */ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static YYSIZE_T yystrlen (const char *yystr) #else static YYSIZE_T yystrlen (yystr) const char *yystr; #endif { YYSIZE_T yylen; for (yylen = 0; yystr[yylen]; yylen++) continue; return yylen; } # endif # endif # ifndef yystpcpy # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE # define yystpcpy stpcpy # else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static char * yystpcpy (char *yydest, const char *yysrc) #else static char * yystpcpy (yydest, yysrc) char *yydest; const char *yysrc; #endif { char *yyd = yydest; const char *yys = yysrc; while ((*yyd++ = *yys++) != '\0') continue; return yyd - 1; } # endif # endif # ifndef yytnamerr /* Copy to YYRES the contents of YYSTR after stripping away unnecessary quotes and backslashes, so that it's suitable for yyerror. The heuristic is that double-quoting is unnecessary unless the string contains an apostrophe, a comma, or backslash (other than backslash-backslash). YYSTR is taken from yytname. If YYRES is null, do not copy; instead, return the length of what the result would have been. */ static YYSIZE_T yytnamerr (char *yyres, const char *yystr) { if (*yystr == '"') { YYSIZE_T yyn = 0; char const *yyp = yystr; for (;;) switch (*++yyp) { case '\'': case ',': goto do_not_strip_quotes; case '\\': if (*++yyp != '\\') goto do_not_strip_quotes; /* Fall through. */ default: if (yyres) yyres[yyn] = *yyp; yyn++; break; case '"': if (yyres) yyres[yyn] = '\0'; return yyn; } do_not_strip_quotes: ; } if (! yyres) return yystrlen (yystr); return yystpcpy (yyres, yystr) - yyres; } # endif /* Copy into YYRESULT an error message about the unexpected token YYCHAR while in state YYSTATE. Return the number of bytes copied, including the terminating null byte. If YYRESULT is null, do not copy anything; just return the number of bytes that would be copied. As a special case, return 0 if an ordinary "syntax error" message will do. Return YYSIZE_MAXIMUM if overflow occurs during size calculation. */ static YYSIZE_T yysyntax_error (char *yyresult, int yystate, int yychar) { int yyn = yypact[yystate]; if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) return 0; else { int yytype = YYTRANSLATE (yychar); YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); YYSIZE_T yysize = yysize0; YYSIZE_T yysize1; int yysize_overflow = 0; enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; int yyx; # if 0 /* This is so xgettext sees the translatable formats that are constructed on the fly. */ YY_("syntax error, unexpected %s"); YY_("syntax error, unexpected %s, expecting %s"); YY_("syntax error, unexpected %s, expecting %s or %s"); YY_("syntax error, unexpected %s, expecting %s or %s or %s"); YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); # endif char *yyfmt; char const *yyf; static char const yyunexpected[] = "syntax error, unexpected %s"; static char const yyexpecting[] = ", expecting %s"; static char const yyor[] = " or %s"; char yyformat[sizeof yyunexpected + sizeof yyexpecting - 1 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) * (sizeof yyor - 1))]; char const *yyprefix = yyexpecting; /* Start YYX at -YYN if negative to avoid negative indexes in YYCHECK. */ int yyxbegin = yyn < 0 ? -yyn : 0; /* Stay within bounds of both yycheck and yytname. */ int yychecklim = YYLAST - yyn + 1; int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; int yycount = 1; yyarg[0] = yytname[yytype]; yyfmt = yystpcpy (yyformat, yyunexpected); for (yyx = yyxbegin; yyx < yyxend; ++yyx) if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) { if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) { yycount = 1; yysize = yysize0; yyformat[sizeof yyunexpected - 1] = '\0'; break; } yyarg[yycount++] = yytname[yyx]; yysize1 = yysize + yytnamerr (0, yytname[yyx]); yysize_overflow |= (yysize1 < yysize); yysize = yysize1; yyfmt = yystpcpy (yyfmt, yyprefix); yyprefix = yyor; } yyf = YY_(yyformat); yysize1 = yysize + yystrlen (yyf); yysize_overflow |= (yysize1 < yysize); yysize = yysize1; if (yysize_overflow) return YYSIZE_MAXIMUM; if (yyresult) { /* Avoid sprintf, as that infringes on the user's name space. Don't have undefined behavior even if the translation produced a string with the wrong number of "%s"s. */ char *yyp = yyresult; int yyi = 0; while ((*yyp = *yyf) != '\0') { if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) { yyp += yytnamerr (yyp, yyarg[yyi++]); yyf += 2; } else { yyp++; yyf++; } } } return yysize; } } #endif /* YYERROR_VERBOSE */ /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ /*ARGSUSED*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) #else static void yydestruct (yymsg, yytype, yyvaluep) const char *yymsg; int yytype; YYSTYPE *yyvaluep; #endif { YYUSE (yyvaluep); if (!yymsg) yymsg = "Deleting"; YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); switch (yytype) { case 9: /* "KEY" */ /* Line 1000 of yacc.c */ #line 79 "../../../lib/srchilite/styleparser.yy" { if ((yyvaluep->string)) delete (yyvaluep->string); }; /* Line 1000 of yacc.c */ #line 1148 "../../../lib/srchilite/styleparser.cc" break; case 10: /* "COLOR" */ /* Line 1000 of yacc.c */ #line 79 "../../../lib/srchilite/styleparser.yy" { if ((yyvaluep->string)) delete (yyvaluep->string); }; /* Line 1000 of yacc.c */ #line 1160 "../../../lib/srchilite/styleparser.cc" break; case 11: /* "BG_COLOR" */ /* Line 1000 of yacc.c */ #line 79 "../../../lib/srchilite/styleparser.yy" { if ((yyvaluep->string)) delete (yyvaluep->string); }; /* Line 1000 of yacc.c */ #line 1172 "../../../lib/srchilite/styleparser.cc" break; case 12: /* "STRINGDEF" */ /* Line 1000 of yacc.c */ #line 79 "../../../lib/srchilite/styleparser.yy" { if ((yyvaluep->string)) delete (yyvaluep->string); }; /* Line 1000 of yacc.c */ #line 1184 "../../../lib/srchilite/styleparser.cc" break; case 24: /* "keylist" */ /* Line 1000 of yacc.c */ #line 79 "../../../lib/srchilite/styleparser.yy" { if ((yyvaluep->keylist)) delete (yyvaluep->keylist); }; /* Line 1000 of yacc.c */ #line 1196 "../../../lib/srchilite/styleparser.cc" break; case 25: /* "color" */ /* Line 1000 of yacc.c */ #line 79 "../../../lib/srchilite/styleparser.yy" { if ((yyvaluep->string)) delete (yyvaluep->string); }; /* Line 1000 of yacc.c */ #line 1208 "../../../lib/srchilite/styleparser.cc" break; case 26: /* "bgcolor" */ /* Line 1000 of yacc.c */ #line 79 "../../../lib/srchilite/styleparser.yy" { if ((yyvaluep->string)) delete (yyvaluep->string); }; /* Line 1000 of yacc.c */ #line 1220 "../../../lib/srchilite/styleparser.cc" break; default: break; } } /* Prevent warnings from -Wmissing-prototypes. */ #ifdef YYPARSE_PARAM #if defined __STDC__ || defined __cplusplus int yyparse (void *YYPARSE_PARAM); #else int yyparse (); #endif #else /* ! YYPARSE_PARAM */ #if defined __STDC__ || defined __cplusplus int yyparse (void); #else int yyparse (); #endif #endif /* ! YYPARSE_PARAM */ /* The lookahead symbol. */ int yychar; /* The semantic value of the lookahead symbol. */ YYSTYPE yylval; /* Number of syntax errors so far. */ int yynerrs; /*-------------------------. | yyparse or yypush_parse. | `-------------------------*/ #ifdef YYPARSE_PARAM #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) int yyparse (void *YYPARSE_PARAM) #else int yyparse (YYPARSE_PARAM) void *YYPARSE_PARAM; #endif #else /* ! YYPARSE_PARAM */ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) int yyparse (void) #else int yyparse () #endif #endif { int yystate; /* Number of tokens to shift before error messages enabled. */ int yyerrstatus; /* The stacks and their tools: `yyss': related to states. `yyvs': related to semantic values. Refer to the stacks thru separate pointers, to allow yyoverflow to reallocate them elsewhere. */ /* The state stack. */ yytype_int16 yyssa[YYINITDEPTH]; yytype_int16 *yyss; yytype_int16 *yyssp; /* The semantic value stack. */ YYSTYPE yyvsa[YYINITDEPTH]; YYSTYPE *yyvs; YYSTYPE *yyvsp; YYSIZE_T yystacksize; int yyn; int yyresult; /* Lookahead token as an internal (translated) token number. */ int yytoken; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; #if YYERROR_VERBOSE /* Buffer for error messages, and its allocated size. */ char yymsgbuf[128]; char *yymsg = yymsgbuf; YYSIZE_T yymsg_alloc = sizeof yymsgbuf; #endif #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) /* The number of symbols on the RHS of the reduced rule. Keep to zero when no symbol should be popped. */ int yylen = 0; yytoken = 0; yyss = yyssa; yyvs = yyvsa; yystacksize = YYINITDEPTH; YYDPRINTF ((stderr, "Starting parse\n")); yystate = 0; yyerrstatus = 0; yynerrs = 0; yychar = YYEMPTY; /* Cause a token to be read. */ /* Initialize stack pointers. Waste one element of value and location stack so that they stay on the same level as the state stack. The wasted elements are never initialized. */ yyssp = yyss; yyvsp = yyvs; goto yysetstate; /*------------------------------------------------------------. | yynewstate -- Push a new state, which is found in yystate. | `------------------------------------------------------------*/ yynewstate: /* In all cases, when you get here, the value and location stacks have just been pushed. So pushing a state here evens the stacks. */ yyssp++; yysetstate: *yyssp = yystate; if (yyss + yystacksize - 1 <= yyssp) { /* Get the current used size of the three stacks, in elements. */ YYSIZE_T yysize = yyssp - yyss + 1; #ifdef yyoverflow { /* Give user a chance to reallocate the stack. Use copies of these so that the &'s don't force the real ones into memory. */ YYSTYPE *yyvs1 = yyvs; yytype_int16 *yyss1 = yyss; /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. This used to be a conditional around just the two extra args, but that might be undefined if yyoverflow is a macro. */ yyoverflow (YY_("memory exhausted"), &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), &yystacksize); yyss = yyss1; yyvs = yyvs1; } #else /* no yyoverflow */ # ifndef YYSTACK_RELOCATE goto yyexhaustedlab; # else /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) goto yyexhaustedlab; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) yystacksize = YYMAXDEPTH; { yytype_int16 *yyss1 = yyss; union yyalloc *yyptr = (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) goto yyexhaustedlab; YYSTACK_RELOCATE (yyss_alloc, yyss); YYSTACK_RELOCATE (yyvs_alloc, yyvs); # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); } # endif #endif /* no yyoverflow */ yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; YYDPRINTF ((stderr, "Stack size increased to %lu\n", (unsigned long int) yystacksize)); if (yyss + yystacksize - 1 <= yyssp) YYABORT; } YYDPRINTF ((stderr, "Entering state %d\n", yystate)); if (yystate == YYFINAL) YYACCEPT; goto yybackup; /*-----------. | yybackup. | `-----------*/ yybackup: /* Do appropriate processing given the current state. Read a lookahead token if we need one and don't already have one. */ /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; if (yyn == YYPACT_NINF) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); yychar = YYLEX; } if (yychar <= YYEOF) { yychar = yytoken = YYEOF; YYDPRINTF ((stderr, "Now at end of input.\n")); } else { yytoken = YYTRANSLATE (yychar); YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); } /* If the proper action on seeing token YYTOKEN is to reduce or to detect an error, take that action. */ yyn += yytoken; if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) goto yydefault; yyn = yytable[yyn]; if (yyn <= 0) { if (yyn == 0 || yyn == YYTABLE_NINF) goto yyerrlab; yyn = -yyn; goto yyreduce; } /* Count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; /* Shift the lookahead token. */ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); /* Discard the shifted token. */ yychar = YYEMPTY; yystate = yyn; *++yyvsp = yylval; goto yynewstate; /*-----------------------------------------------------------. | yydefault -- do the default action for the current state. | `-----------------------------------------------------------*/ yydefault: yyn = yydefact[yystate]; if (yyn == 0) goto yyerrlab; goto yyreduce; /*-----------------------------. | yyreduce -- Do a reduction. | `-----------------------------*/ yyreduce: /* yyn is the number of a rule to reduce with. */ yylen = yyr2[yyn]; /* If YYLEN is nonzero, implement the default value of the action: `$$ = $1'. Otherwise, the following line sets YYVAL to garbage. This behavior is undocumented and Bison users should not rely upon it. Assigning to YYVAL unconditionally makes the parser a bit smaller, and it avoids a GCC warning that YYVAL may be used uninitialized. */ yyval = yyvsp[1-yylen]; YY_REDUCE_PRINT (yyn); switch (yyn) { case 2: /* Line 1455 of yacc.c */ #line 86 "../../../lib/srchilite/styleparser.yy" { /* allow empty files */ } break; case 8: /* Line 1455 of yacc.c */ #line 99 "../../../lib/srchilite/styleparser.yy" { //printSequence( $1 ) ; //printMessage_noln( ": " ) ; //printMessage_noln( ($2 ? *$2 : "") ) ; //printMessage_noln( " bg: " ) ; //printMessage_noln( ($3 ? *$3 : "") ) ; } break; case 9: /* Line 1455 of yacc.c */ #line 107 "../../../lib/srchilite/styleparser.yy" { KeyType key; KeyList *keylist = (yyvsp[(1) - (6)].keylist); StyleConstantsPtr stylevalues = StyleConstantsPtr((yyvsp[(5) - (6)].styleconstants)); for (KeyList::const_iterator it = keylist->begin(); it != keylist->end(); ++it) { key = *it; if (!formatterFactory->createFormatter(key, ((yyvsp[(2) - (6)].string) ? *(yyvsp[(2) - (6)].string) : ""), ((yyvsp[(3) - (6)].string) ? *(yyvsp[(3) - (6)].string) : ""), stylevalues)) { errorBuffer = "already defined " + *it; //yyerror(alreadydef); delete keylist; if ((yyvsp[(2) - (6)].string)) delete (yyvsp[(2) - (6)].string); if ((yyvsp[(3) - (6)].string)) delete (yyvsp[(3) - (6)].string); YYERROR; } } delete keylist; if ((yyvsp[(2) - (6)].string)) delete (yyvsp[(2) - (6)].string); if ((yyvsp[(3) - (6)].string)) delete (yyvsp[(3) - (6)].string); } break; case 10: /* Line 1455 of yacc.c */ #line 135 "../../../lib/srchilite/styleparser.yy" { (yyvsp[(1) - (3)].keylist)->push_back(*(yyvsp[(3) - (3)].string)); (yyval.keylist) = (yyvsp[(1) - (3)].keylist); delete (yyvsp[(3) - (3)].string); } break; case 11: /* Line 1455 of yacc.c */ #line 141 "../../../lib/srchilite/styleparser.yy" { (yyval.keylist) = new KeyList; (yyval.keylist)->push_back(*(yyvsp[(1) - (1)].string)); delete (yyvsp[(1) - (1)].string); } break; case 12: /* Line 1455 of yacc.c */ #line 148 "../../../lib/srchilite/styleparser.yy" { (yyval.string) = 0; } break; case 13: /* Line 1455 of yacc.c */ #line 149 "../../../lib/srchilite/styleparser.yy" { (yyval.string) = (yyvsp[(1) - (1)].string);} break; case 14: /* Line 1455 of yacc.c */ #line 150 "../../../lib/srchilite/styleparser.yy" { (yyval.string) = (yyvsp[(1) - (1)].string); } break; case 15: /* Line 1455 of yacc.c */ #line 153 "../../../lib/srchilite/styleparser.yy" { (yyval.string) = 0; } break; case 16: /* Line 1455 of yacc.c */ #line 154 "../../../lib/srchilite/styleparser.yy" { (yyval.string) = (yyvsp[(3) - (3)].string);} break; case 17: /* Line 1455 of yacc.c */ #line 155 "../../../lib/srchilite/styleparser.yy" { (yyval.string) = (yyvsp[(3) - (3)].string); } break; case 18: /* Line 1455 of yacc.c */ #line 158 "../../../lib/srchilite/styleparser.yy" { updateBgColor((yyvsp[(2) - (3)].string)); } break; case 19: /* Line 1455 of yacc.c */ #line 159 "../../../lib/srchilite/styleparser.yy" { updateBgColor((yyvsp[(2) - (3)].string)); } break; case 20: /* Line 1455 of yacc.c */ #line 162 "../../../lib/srchilite/styleparser.yy" { (yyval.styleconstants) = 0 ; } break; case 21: /* Line 1455 of yacc.c */ #line 163 "../../../lib/srchilite/styleparser.yy" { (yyval.styleconstants) = (yyvsp[(1) - (1)].styleconstants); } break; case 22: /* Line 1455 of yacc.c */ #line 166 "../../../lib/srchilite/styleparser.yy" { (yyval.styleconstants) = (yyvsp[(1) - (3)].styleconstants); (yyval.styleconstants)->push_back((yyvsp[(3) - (3)].flag)) ; } break; case 23: /* Line 1455 of yacc.c */ #line 167 "../../../lib/srchilite/styleparser.yy" { (yyval.styleconstants) = new StyleConstants; (yyval.styleconstants)->push_back((yyvsp[(1) - (1)].flag)); } break; case 24: /* Line 1455 of yacc.c */ #line 170 "../../../lib/srchilite/styleparser.yy" { (yyval.flag) = ISBOLD ; } break; case 25: /* Line 1455 of yacc.c */ #line 171 "../../../lib/srchilite/styleparser.yy" { (yyval.flag) = ISITALIC ; } break; case 26: /* Line 1455 of yacc.c */ #line 172 "../../../lib/srchilite/styleparser.yy" { (yyval.flag) = ISUNDERLINE ; } break; case 27: /* Line 1455 of yacc.c */ #line 173 "../../../lib/srchilite/styleparser.yy" { (yyval.flag) = ISFIXED ; } break; case 28: /* Line 1455 of yacc.c */ #line 174 "../../../lib/srchilite/styleparser.yy" { (yyval.flag) = ISNOTFIXED ; } break; case 29: /* Line 1455 of yacc.c */ #line 175 "../../../lib/srchilite/styleparser.yy" { (yyval.flag) = ISNOREF ; } break; /* Line 1455 of yacc.c */ #line 1724 "../../../lib/srchilite/styleparser.cc" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); YYPOPSTACK (yylen); yylen = 0; YY_STACK_PRINT (yyss, yyssp); *++yyvsp = yyval; /* Now `shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ yyn = yyr1[yyn]; yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) yystate = yytable[yystate]; else yystate = yydefgoto[yyn - YYNTOKENS]; goto yynewstate; /*------------------------------------. | yyerrlab -- here on detecting error | `------------------------------------*/ yyerrlab: /* If not already recovering from an error, report this error. */ if (!yyerrstatus) { ++yynerrs; #if ! YYERROR_VERBOSE yyerror (YY_("syntax error")); #else { YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) { YYSIZE_T yyalloc = 2 * yysize; if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) yyalloc = YYSTACK_ALLOC_MAXIMUM; if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); yymsg = (char *) YYSTACK_ALLOC (yyalloc); if (yymsg) yymsg_alloc = yyalloc; else { yymsg = yymsgbuf; yymsg_alloc = sizeof yymsgbuf; } } if (0 < yysize && yysize <= yymsg_alloc) { (void) yysyntax_error (yymsg, yystate, yychar); yyerror (yymsg); } else { yyerror (YY_("syntax error")); if (yysize != 0) goto yyexhaustedlab; } } #endif } if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an error, discard it. */ if (yychar <= YYEOF) { /* Return failure if at end of input. */ if (yychar == YYEOF) YYABORT; } else { yydestruct ("Error: discarding", yytoken, &yylval); yychar = YYEMPTY; } } /* Else will try to reuse lookahead token after shifting the error token. */ goto yyerrlab1; /*---------------------------------------------------. | yyerrorlab -- error raised explicitly by YYERROR. | `---------------------------------------------------*/ yyerrorlab: /* Pacify compilers like GCC when the user code never invokes YYERROR and the label yyerrorlab therefore never appears in user code. */ if (/*CONSTCOND*/ 0) goto yyerrorlab; /* Do not reclaim the symbols of the rule which action triggered this YYERROR. */ YYPOPSTACK (yylen); yylen = 0; YY_STACK_PRINT (yyss, yyssp); yystate = *yyssp; goto yyerrlab1; /*-------------------------------------------------------------. | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ yyerrlab1: yyerrstatus = 3; /* Each real token shifted decrements this. */ for (;;) { yyn = yypact[yystate]; if (yyn != YYPACT_NINF) { yyn += YYTERROR; if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) { yyn = yytable[yyn]; if (0 < yyn) break; } } /* Pop the current state because it cannot handle the error token. */ if (yyssp == yyss) YYABORT; yydestruct ("Error: popping", yystos[yystate], yyvsp); YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); } *++yyvsp = yylval; /* Shift the error token. */ YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); yystate = yyn; goto yynewstate; /*-------------------------------------. | yyacceptlab -- YYACCEPT comes here. | `-------------------------------------*/ yyacceptlab: yyresult = 0; goto yyreturn; /*-----------------------------------. | yyabortlab -- YYABORT comes here. | `-----------------------------------*/ yyabortlab: yyresult = 1; goto yyreturn; #if !defined(yyoverflow) || YYERROR_VERBOSE /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ yyexhaustedlab: yyerror (YY_("memory exhausted")); yyresult = 2; /* Fall through. */ #endif yyreturn: if (yychar != YYEMPTY) yydestruct ("Cleanup: discarding lookahead", yytoken, &yylval); /* Do not reclaim the symbols of the rule which action triggered this YYABORT or YYACCEPT. */ YYPOPSTACK (yylen); YY_STACK_PRINT (yyss, yyssp); while (yyssp != yyss) { yydestruct ("Cleanup: popping", yystos[*yyssp], yyvsp); YYPOPSTACK (1); } #ifndef yyoverflow if (yyss != yyssa) YYSTACK_FREE (yyss); #endif #if YYERROR_VERBOSE if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); #endif /* Make sure YYID is used. */ return YYID (yyresult); } /* Line 1675 of yacc.c */ #line 178 "../../../lib/srchilite/styleparser.yy" string current_file; namespace srchilite { void parseStyles(const string &name, FormatterFactory *genFactory, string &bodyBgColor_) { parseStyles(Settings::retrieveDataDir(), name, genFactory, bodyBgColor_); } void parseStyles(const string &path, const string &name, FormatterFactory *genFactory, string &bodyBgColor_) { formatterFactory = genFactory; errorBuffer = ""; int result = 1; line = 1; // opens the file for yylex stylesc_in = open_data_file_stream(path, name); if (contains_path(name)) current_file = name; else current_file = (path.size() ? path + "/" : "") + name; bodyBgColor = ""; result = yyparse() ; bodyBgColor_ = bodyBgColor; fclose(stylesc_in); // free scanner memory stylesc_lex_destroy(); if (result != 0 || errorBuffer.size()) { throw ParserException(errorBuffer, current_file, line); } } } void yyerror( const char *s ) { errorBuffer = s; } void yyerror(const string &s) { yyerror(s.c_str()); } void parseStyleError(const std::string &error) { yyerror(error); } void updateBgColor(const std::string *c) { if (bodyBgColor != "") yyerror("bgcolor already defined"); else bodyBgColor = *c; // we don't need it anymore delete c; } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/stylecssscanner.cc���������������������������������������������0000644�0001750�0001750�00000204137�11675044736�020221� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#line 2 "../../../lib/srchilite/stylecssscanner.cc" #line 4 "../../../lib/srchilite/stylecssscanner.cc" #define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ #define yy_create_buffer stylecsssc__create_buffer #define yy_delete_buffer stylecsssc__delete_buffer #define yy_flex_debug stylecsssc__flex_debug #define yy_init_buffer stylecsssc__init_buffer #define yy_flush_buffer stylecsssc__flush_buffer #define yy_load_buffer_state stylecsssc__load_buffer_state #define yy_switch_to_buffer stylecsssc__switch_to_buffer #define yyin stylecsssc_in #define yyleng stylecsssc_leng #define yylex stylecsssc_lex #define yylineno stylecsssc_lineno #define yyout stylecsssc_out #define yyrestart stylecsssc_restart #define yytext stylecsssc_text #define yywrap stylecsssc_wrap #define yyalloc stylecsssc_alloc #define yyrealloc stylecsssc_realloc #define yyfree stylecsssc_free #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 #define YY_FLEX_SUBMINOR_VERSION 35 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif /* First, we deal with platform-specific or compiler-specific issues. */ /* begin standard C headers. */ #include <stdio.h> #include <string.h> #include <errno.h> #include <stdlib.h> /* end standard C headers. */ /* flex integer type definitions */ #ifndef FLEXINT_H #define FLEXINT_H /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */ #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include <inttypes.h> typedef int8_t flex_int8_t; typedef uint8_t flex_uint8_t; typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; #else typedef signed char flex_int8_t; typedef short int flex_int16_t; typedef int flex_int32_t; typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; /* Limits of integral types. */ #ifndef INT8_MIN #define INT8_MIN (-128) #endif #ifndef INT16_MIN #define INT16_MIN (-32767-1) #endif #ifndef INT32_MIN #define INT32_MIN (-2147483647-1) #endif #ifndef INT8_MAX #define INT8_MAX (127) #endif #ifndef INT16_MAX #define INT16_MAX (32767) #endif #ifndef INT32_MAX #define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX #define UINT8_MAX (255U) #endif #ifndef UINT16_MAX #define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX #define UINT32_MAX (4294967295U) #endif #endif /* ! C99 */ #endif /* ! FLEXINT_H */ #ifdef __cplusplus /* The "const" storage-class-modifier is valid. */ #define YY_USE_CONST #else /* ! __cplusplus */ /* C99 requires __STDC__ to be defined as 1. */ #if defined (__STDC__) #define YY_USE_CONST #endif /* defined (__STDC__) */ #endif /* ! __cplusplus */ #ifdef YY_USE_CONST #define yyconst const #else #define yyconst #endif /* Returned upon end-of-file. */ #define YY_NULL 0 /* Promotes a possibly negative, possibly signed char to an unsigned * integer for use as an array index. If the signed char is negative, * we want to instead treat it as an 8-bit unsigned char, hence the * double cast. */ #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) /* Enter a start condition. This macro really ought to take a parameter, * but we do it the disgusting crufty way forced on us by the ()-less * definition of BEGIN. */ #define BEGIN (yy_start) = 1 + 2 * /* Translate the current start state into a value that can be later handed * to BEGIN to return to the state. The YYSTATE alias is for lex * compatibility. */ #define YY_START (((yy_start) - 1) / 2) #define YYSTATE YY_START /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) /* Special action meaning "start processing a new file". */ #define YY_NEW_FILE stylecsssc_restart(stylecsssc_in ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ #ifndef YY_BUF_SIZE #ifdef __ia64__ /* On IA-64, the buffer size is 16k, not 8k. * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. * Ditto for the __ia64__ case accordingly. */ #define YY_BUF_SIZE 32768 #else #define YY_BUF_SIZE 16384 #endif /* __ia64__ */ #endif /* The state buf must be large enough to hold one state per character in the main buffer. */ #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) #ifndef YY_TYPEDEF_YY_BUFFER_STATE #define YY_TYPEDEF_YY_BUFFER_STATE typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif extern int stylecsssc_leng; extern FILE *stylecsssc_in, *stylecsssc_out; #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 #define YY_LESS_LINENO(n) /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ do \ { \ /* Undo effects of setting up stylecsssc_text. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ *yy_cp = (yy_hold_char); \ YY_RESTORE_YY_MORE_OFFSET \ (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ YY_DO_BEFORE_ACTION; /* set up stylecsssc_text again */ \ } \ while ( 0 ) #define unput(c) yyunput( c, (yytext_ptr) ) #ifndef YY_TYPEDEF_YY_SIZE_T #define YY_TYPEDEF_YY_SIZE_T typedef size_t yy_size_t; #endif #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state { FILE *yy_input_file; char *yy_ch_buf; /* input buffer */ char *yy_buf_pos; /* current position in input buffer */ /* Size of input buffer in bytes, not including room for EOB * characters. */ yy_size_t yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. */ int yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to * delete it. */ int yy_is_our_buffer; /* Whether this is an "interactive" input source; if so, and * if we're using stdio for input, then we want to use getc() * instead of fread(), to make sure we stop fetching input after * each newline. */ int yy_is_interactive; /* Whether we're considered to be at the beginning of a line. * If so, '^' rules will be active on the next match, otherwise * not. */ int yy_at_bol; int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ /* Whether to try to fill the input buffer when we reach the * end of it. */ int yy_fill_buffer; int yy_buffer_status; #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 /* When an EOF's been seen but there's still some text to process * then we mark the buffer as YY_EOF_PENDING, to indicate that we * shouldn't try reading from the input source any more. We might * still have a bunch of tokens to match, though, because of * possible backing-up. * * When we actually see the EOF, we change the status to "new" * (via stylecsssc_restart()), so that the user can continue scanning by * just pointing stylecsssc_in at a new input file. */ #define YY_BUFFER_EOF_PENDING 2 }; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ /* Stack of input buffers. */ static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ /* We provide macros for accessing buffer states in case in the * future we want to put the buffer states in a more general * "scanner state". * * Returns the top of the stack, or NULL. */ #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ : NULL) /* Same as previous macro, but useful when we know that the buffer stack is not * NULL or when we need an lvalue. For internal use only. */ #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] /* yy_hold_char holds the character lost when stylecsssc_text is formed. */ static char yy_hold_char; static int yy_n_chars; /* number of characters read into yy_ch_buf */ int stylecsssc_leng; /* Points to current character in buffer. */ static char *yy_c_buf_p = (char *) 0; static int yy_init = 0; /* whether we need to initialize */ static int yy_start = 0; /* start state number */ /* Flag which is used to allow stylecsssc_wrap()'s to do buffer switches * instead of setting up a fresh stylecsssc_in. A bit of a hack ... */ static int yy_did_buffer_switch_on_eof; void stylecsssc_restart (FILE *input_file ); void stylecsssc__switch_to_buffer (YY_BUFFER_STATE new_buffer ); YY_BUFFER_STATE stylecsssc__create_buffer (FILE *file,int size ); void stylecsssc__delete_buffer (YY_BUFFER_STATE b ); void stylecsssc__flush_buffer (YY_BUFFER_STATE b ); void stylecsssc_push_buffer_state (YY_BUFFER_STATE new_buffer ); void stylecsssc_pop_buffer_state (void ); static void stylecsssc_ensure_buffer_stack (void ); static void stylecsssc__load_buffer_state (void ); static void stylecsssc__init_buffer (YY_BUFFER_STATE b,FILE *file ); #define YY_FLUSH_BUFFER stylecsssc__flush_buffer(YY_CURRENT_BUFFER ) YY_BUFFER_STATE stylecsssc__scan_buffer (char *base,yy_size_t size ); YY_BUFFER_STATE stylecsssc__scan_string (yyconst char *yy_str ); YY_BUFFER_STATE stylecsssc__scan_bytes (yyconst char *bytes,int len ); void *stylecsssc_alloc (yy_size_t ); void *stylecsssc_realloc (void *,yy_size_t ); void stylecsssc_free (void * ); #define yy_new_buffer stylecsssc__create_buffer #define yy_set_interactive(is_interactive) \ { \ if ( ! YY_CURRENT_BUFFER ){ \ stylecsssc_ensure_buffer_stack (); \ YY_CURRENT_BUFFER_LVALUE = \ stylecsssc__create_buffer(stylecsssc_in,YY_BUF_SIZE ); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ } #define yy_set_bol(at_bol) \ { \ if ( ! YY_CURRENT_BUFFER ){\ stylecsssc_ensure_buffer_stack (); \ YY_CURRENT_BUFFER_LVALUE = \ stylecsssc__create_buffer(stylecsssc_in,YY_BUF_SIZE ); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ } #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) /* Begin user sect3 */ #define stylecsssc_wrap(n) 1 #define YY_SKIP_YYWRAP typedef unsigned char YY_CHAR; FILE *stylecsssc_in = (FILE *) 0, *stylecsssc_out = (FILE *) 0; typedef int yy_state_type; extern int stylecsssc_lineno; int stylecsssc_lineno = 1; extern char *stylecsssc_text; #define yytext_ptr stylecsssc_text static yy_state_type yy_get_previous_state (void ); static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); static int yy_get_next_buffer (void ); static void yy_fatal_error (yyconst char msg[] ); /* Done after the current pattern has been matched and before the * corresponding action - sets up stylecsssc_text. */ #define YY_DO_BEFORE_ACTION \ (yytext_ptr) = yy_bp; \ stylecsssc_leng = (size_t) (yy_cp - yy_bp); \ (yy_hold_char) = *yy_cp; \ *yy_cp = '\0'; \ (yy_c_buf_p) = yy_cp; #define YY_NUM_RULES 31 #define YY_END_OF_BUFFER 32 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info { flex_int32_t yy_verify; flex_int32_t yy_nxt; }; static yyconst flex_int16_t yy_accept[274] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 30, 1, 8, 2, 1, 9, 30, 30, 31, 1, 2, 1, 31, 4, 1, 5, 2, 1, 4, 6, 11, 7, 12, 29, 1, 2, 1, 29, 29, 29, 29, 29, 27, 1, 1, 15, 28, 15, 15, 15, 15, 15, 15, 15, 15, 15, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 20, 20, 22, 22, 24, 24, 26, 26, 1, 1, 3, 0, 7, 0, 0, 0, 0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 20, 3, 22, 3, 24, 3, 26, 3, 0, 0, 0, 0, 0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 15, 15, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 17, 18, 18, 10, 0, 0, 0, 0, 15, 15, 15, 15, 15, 15, 15, 15, 18, 18, 18, 18, 18, 18, 18, 18, 0, 13, 0, 0, 15, 15, 15, 15, 15, 15, 15, 18, 18, 18, 18, 18, 18, 18, 0, 0, 0, 0, 0, 15, 15, 15, 15, 18, 18, 18, 18, 0, 0, 0, 0, 0, 15, 15, 15, 15, 18, 18, 18, 18, 0, 0, 0, 0, 0, 15, 15, 15, 18, 18, 18, 0, 0, 0, 0, 0, 15, 15, 18, 18, 0, 0, 21, 0, 0, 15, 15, 18, 18, 0, 23, 19, 0, 15, 18, 0, 0, 0, 0, 0, 0, 0, 25, 16, 0 } ; static yyconst flex_int32_t yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 1, 6, 1, 1, 1, 1, 1, 1, 7, 1, 8, 9, 10, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 14, 1, 1, 1, 1, 1, 15, 16, 15, 17, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 18, 15, 15, 15, 15, 15, 15, 15, 15, 15, 19, 15, 1, 1, 1, 1, 20, 1, 21, 22, 23, 24, 25, 26, 27, 28, 29, 15, 30, 31, 32, 33, 34, 35, 15, 36, 37, 38, 39, 15, 40, 41, 42, 15, 43, 1, 44, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } ; static yyconst flex_int32_t yy_meta[45] = { 0, 1, 2, 2, 2, 2, 3, 1, 1, 1, 1, 1, 4, 2, 2, 4, 4, 4, 4, 4, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1 } ; static yyconst flex_int16_t yy_base[290] = { 0, 0, 21, 4, 16, 31, 36, 46, 50, 61, 105, 148, 191, 235, 0, 279, 0, 322, 335, 348, 361, 374, 387, 400, 413, 541, 542, 538, 542, 542, 534, 542, 531, 10, 542, 535, 542, 531, 528, 542, 532, 542, 542, 528, 525, 542, 542, 0, 542, 542, 529, 542, 525, 522, 507, 493, 492, 500, 542, 522, 518, 0, 542, 45, 480, 500, 484, 483, 17, 493, 492, 491, 0, 46, 473, 493, 477, 476, 49, 486, 485, 484, 0, 501, 0, 500, 0, 499, 0, 498, 502, 498, 542, 62, 0, 479, 470, 467, 458, 0, 59, 55, 474, 454, 62, 464, 447, 389, 399, 401, 390, 0, 64, 61, 399, 383, 71, 391, 377, 373, 384, 386, 375, 0, 0, 0, 0, 0, 0, 0, 0, 78, 369, 363, 358, 357, 371, 368, 359, 344, 350, 352, 339, 355, 340, 341, 335, 0, 338, 337, 344, 335, 331, 317, 323, 325, 312, 322, 312, 314, 308, 0, 311, 310, 542, 307, 296, 322, 321, 299, 300, 201, 99, 200, 205, 200, 196, 198, 199, 193, 100, 192, 197, 192, 188, 185, 542, 97, 196, 181, 187, 180, 190, 187, 186, 170, 171, 177, 171, 181, 180, 179, 163, 167, 179, 161, 173, 172, 66, 152, 165, 165, 67, 149, 162, 161, 145, 151, 140, 152, 157, 143, 142, 152, 151, 139, 137, 147, 144, 135, 138, 135, 138, 130, 138, 141, 128, 135, 137, 124, 132, 124, 129, 119, 110, 120, 111, 118, 109, 132, 98, 542, 101, 117, 100, 105, 98, 103, 106, 542, 542, 90, 100, 99, 68, 70, 60, 26, 25, 25, 9, 542, 542, 542, 427, 432, 437, 442, 447, 452, 457, 462, 467, 469, 472, 474, 478, 483, 488, 493 } ; static yyconst flex_int16_t yy_def[290] = { 0, 274, 274, 275, 275, 276, 276, 275, 275, 277, 277, 278, 278, 273, 13, 273, 15, 279, 279, 280, 280, 281, 281, 282, 282, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 283, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 284, 273, 284, 284, 284, 284, 284, 284, 284, 284, 284, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 286, 286, 287, 287, 288, 288, 289, 289, 273, 273, 273, 273, 283, 273, 273, 273, 273, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 286, 286, 287, 287, 288, 288, 289, 289, 273, 273, 273, 273, 273, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 273, 273, 273, 273, 273, 284, 284, 284, 284, 284, 284, 284, 284, 285, 285, 285, 285, 285, 285, 285, 285, 273, 273, 273, 273, 284, 284, 284, 284, 284, 284, 284, 285, 285, 285, 285, 285, 285, 285, 273, 273, 273, 273, 273, 284, 284, 284, 284, 285, 285, 285, 285, 273, 273, 273, 273, 273, 284, 284, 284, 284, 285, 285, 285, 285, 273, 273, 273, 273, 273, 284, 284, 284, 285, 285, 285, 273, 273, 273, 273, 273, 284, 284, 285, 285, 273, 273, 273, 273, 273, 284, 284, 285, 285, 273, 273, 273, 273, 284, 285, 273, 273, 273, 273, 273, 273, 273, 273, 273, 0, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273 } ; static yyconst flex_int16_t yy_nxt[587] = { 0, 273, 27, 28, 29, 30, 35, 28, 36, 37, 31, 32, 273, 273, 273, 38, 33, 273, 35, 28, 36, 37, 33, 27, 28, 29, 30, 38, 93, 273, 273, 31, 32, 40, 41, 42, 43, 33, 40, 41, 42, 43, 44, 33, 93, 272, 106, 44, 35, 28, 36, 37, 35, 28, 36, 37, 107, 38, 271, 270, 269, 38, 34, 35, 28, 36, 37, 34, 34, 45, 34, 46, 38, 34, 34, 34, 100, 112, 118, 131, 136, 101, 113, 142, 138, 150, 131, 143, 119, 139, 152, 268, 156, 221, 225, 153, 157, 164, 137, 267, 222, 226, 266, 151, 48, 34, 34, 35, 28, 36, 37, 34, 34, 45, 34, 46, 38, 34, 34, 34, 164, 190, 197, 204, 161, 147, 191, 198, 265, 264, 263, 161, 262, 147, 205, 192, 199, 206, 261, 260, 259, 258, 257, 256, 255, 254, 253, 252, 48, 34, 50, 28, 51, 52, 251, 250, 249, 161, 248, 53, 247, 147, 246, 245, 244, 243, 242, 241, 240, 239, 54, 55, 161, 238, 56, 237, 236, 147, 235, 234, 233, 232, 231, 230, 229, 161, 57, 228, 227, 147, 224, 223, 58, 50, 28, 51, 52, 220, 219, 218, 217, 216, 53, 161, 161, 161, 215, 214, 213, 212, 147, 147, 147, 54, 55, 211, 210, 56, 209, 208, 207, 203, 202, 201, 200, 161, 161, 196, 161, 57, 195, 194, 193, 147, 147, 58, 34, 59, 28, 36, 60, 61, 34, 34, 34, 34, 38, 61, 62, 62, 61, 61, 61, 61, 61, 34, 61, 63, 64, 65, 61, 61, 66, 61, 61, 61, 61, 61, 61, 67, 68, 69, 61, 70, 61, 61, 61, 71, 34, 34, 34, 59, 28, 36, 60, 72, 34, 34, 34, 34, 38, 72, 62, 62, 72, 72, 72, 72, 72, 34, 72, 73, 74, 75, 72, 72, 76, 72, 72, 72, 72, 72, 72, 77, 78, 79, 72, 80, 72, 72, 72, 81, 34, 34, 59, 28, 36, 60, 189, 147, 188, 187, 186, 83, 185, 62, 62, 59, 28, 36, 60, 184, 161, 183, 161, 182, 83, 181, 62, 62, 59, 28, 36, 60, 161, 180, 161, 179, 178, 85, 161, 62, 62, 59, 28, 36, 60, 177, 176, 147, 175, 147, 85, 174, 62, 62, 59, 28, 36, 60, 173, 147, 172, 147, 171, 87, 170, 62, 62, 59, 28, 36, 60, 147, 169, 168, 167, 166, 87, 165, 62, 62, 59, 28, 36, 60, 163, 162, 161, 160, 159, 89, 158, 62, 62, 59, 28, 36, 60, 155, 154, 149, 148, 147, 89, 146, 62, 62, 26, 26, 26, 26, 26, 34, 34, 34, 34, 34, 39, 39, 39, 39, 39, 47, 47, 47, 47, 47, 49, 49, 49, 49, 49, 82, 82, 82, 82, 82, 84, 84, 84, 84, 84, 86, 86, 86, 86, 86, 88, 88, 88, 88, 88, 94, 94, 99, 99, 111, 111, 123, 145, 123, 123, 123, 125, 144, 125, 125, 125, 127, 141, 127, 127, 127, 129, 140, 129, 129, 129, 135, 134, 133, 132, 91, 90, 130, 128, 126, 124, 122, 121, 120, 117, 116, 115, 114, 110, 109, 108, 105, 104, 103, 102, 91, 90, 98, 97, 96, 95, 92, 91, 90, 92, 91, 90, 92, 91, 90, 92, 91, 90, 273, 25, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273 } ; static yyconst flex_int16_t yy_chk[587] = { 0, 0, 1, 1, 1, 1, 3, 3, 3, 3, 1, 1, 0, 0, 0, 3, 1, 0, 4, 4, 4, 4, 1, 2, 2, 2, 2, 4, 33, 0, 0, 2, 2, 5, 5, 5, 5, 2, 6, 6, 6, 6, 5, 2, 33, 270, 68, 6, 7, 7, 7, 7, 8, 8, 8, 8, 68, 7, 269, 268, 267, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 63, 73, 78, 93, 100, 63, 73, 104, 101, 112, 93, 104, 78, 101, 113, 266, 116, 208, 212, 113, 116, 131, 100, 265, 208, 212, 264, 112, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 131, 172, 180, 187, 263, 262, 172, 180, 261, 258, 257, 256, 255, 254, 187, 172, 180, 187, 253, 252, 250, 249, 248, 247, 246, 245, 244, 243, 10, 10, 11, 11, 11, 11, 242, 241, 240, 239, 238, 11, 237, 236, 235, 234, 233, 232, 231, 230, 229, 228, 11, 11, 227, 226, 11, 225, 224, 223, 222, 221, 220, 219, 218, 217, 216, 215, 11, 214, 213, 211, 210, 209, 11, 12, 12, 12, 12, 207, 206, 205, 204, 203, 12, 202, 201, 200, 199, 198, 197, 196, 195, 194, 193, 12, 12, 192, 191, 12, 190, 189, 188, 185, 184, 183, 182, 181, 179, 178, 177, 12, 176, 175, 174, 173, 171, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 17, 17, 17, 17, 170, 169, 168, 167, 166, 17, 165, 17, 17, 18, 18, 18, 18, 163, 162, 160, 159, 158, 18, 157, 18, 18, 19, 19, 19, 19, 156, 155, 154, 153, 152, 19, 151, 19, 19, 20, 20, 20, 20, 150, 149, 148, 146, 145, 20, 144, 20, 20, 21, 21, 21, 21, 143, 142, 141, 140, 139, 21, 138, 21, 21, 22, 22, 22, 22, 137, 136, 135, 134, 133, 22, 132, 22, 22, 23, 23, 23, 23, 122, 121, 120, 119, 118, 23, 117, 23, 23, 24, 24, 24, 24, 115, 114, 110, 109, 108, 24, 107, 24, 24, 274, 274, 274, 274, 274, 275, 275, 275, 275, 275, 276, 276, 276, 276, 276, 277, 277, 277, 277, 277, 278, 278, 278, 278, 278, 279, 279, 279, 279, 279, 280, 280, 280, 280, 280, 281, 281, 281, 281, 281, 282, 282, 282, 282, 282, 283, 283, 284, 284, 285, 285, 286, 106, 286, 286, 286, 287, 105, 287, 287, 287, 288, 103, 288, 288, 288, 289, 102, 289, 289, 289, 98, 97, 96, 95, 91, 90, 89, 87, 85, 83, 81, 80, 79, 77, 76, 75, 74, 71, 70, 69, 67, 66, 65, 64, 60, 59, 57, 56, 55, 54, 53, 52, 50, 44, 43, 40, 38, 37, 35, 32, 30, 27, 25, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273 } ; static yy_state_type yy_last_accepting_state; static char *yy_last_accepting_cpos; extern int stylecsssc__flex_debug; int stylecsssc__flex_debug = 0; /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. */ #define REJECT reject_used_but_not_detected #define yymore() yymore_used_but_not_detected #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET char *stylecsssc_text; #line 1 "../../../lib/srchilite/stylecssscanner.ll" #line 2 "../../../lib/srchilite/stylecssscanner.ll" /* * Copyright (C) 1999-2007 Lorenzo Bettini, http://www.lorenzobettini.it * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ #include <stdlib.h> #include <string.h> #include "stylekey.h" #include "formatterfactory.h" #include "stylecssparser.h" #include <sstream> #include "parsestyles.h" using namespace srchilite; static std::ostringstream buff; extern int line ; //#define DEBUG_SCANNER #ifdef DEBUG_SCANNER #include <iostream> // for debug #define DEB(s) std::cerr << s << std::endl; #define DEB2(s,s2) std::cerr << s << ": " << s2 << std::endl; #else #define DEB(s) #define DEB2(s,s2) #endif #line 747 "../../../lib/srchilite/stylecssscanner.cc" #define INITIAL 0 #define COMMENT_STATE 1 #define MULTI_COMMENT_STATE 2 #define STRING_STATE 3 #define CSS_SELECTOR 4 #define CSS_PROPERTIES 5 #define CSS_COLOR 6 #define CSS_BG_COLOR 7 #define CSS_FONT_WEIGHT 8 #define CSS_FONT_STYLE 9 #define CSS_FONT_FAMILY 10 #define CSS_TEXT_DECORATION 11 #ifndef YY_NO_UNISTD_H /* Special case for "unistd.h", since it is non-ANSI. We include it way * down here because we want the user's section 1 to have been scanned first. * The user has a chance to override it with an option. */ #include <unistd.h> #endif #ifndef YY_EXTRA_TYPE #define YY_EXTRA_TYPE void * #endif static int yy_init_globals (void ); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ int stylecsssc_lex_destroy (void ); int stylecsssc_get_debug (void ); void stylecsssc_set_debug (int debug_flag ); YY_EXTRA_TYPE stylecsssc_get_extra (void ); void stylecsssc_set_extra (YY_EXTRA_TYPE user_defined ); FILE *stylecsssc_get_in (void ); void stylecsssc_set_in (FILE * in_str ); FILE *stylecsssc_get_out (void ); void stylecsssc_set_out (FILE * out_str ); int stylecsssc_get_leng (void ); char *stylecsssc_get_text (void ); int stylecsssc_get_lineno (void ); void stylecsssc_set_lineno (int line_number ); /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus extern "C" int stylecsssc_wrap (void ); #else extern int stylecsssc_wrap (void ); #endif #endif static void yyunput (int c,char *buf_ptr ); #ifndef yytext_ptr static void yy_flex_strncpy (char *,yyconst char *,int ); #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * ); #endif #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (void ); #else static int input (void ); #endif #endif /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE #ifdef __ia64__ /* On IA-64, the buffer size is 16k, not 8k */ #define YY_READ_BUF_SIZE 16384 #else #define YY_READ_BUF_SIZE 8192 #endif /* __ia64__ */ #endif /* Copy whatever the last rule matched to the standard output. */ #ifndef ECHO /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ #define ECHO do { if (fwrite( stylecsssc_text, stylecsssc_leng, 1, stylecsssc_out )) {} } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, * is returned in "result". */ #ifndef YY_INPUT #define YY_INPUT(buf,result,max_size) \ if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ size_t n; \ for ( n = 0; n < max_size && \ (c = getc( stylecsssc_in )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ if ( c == '\n' ) \ buf[n++] = (char) c; \ if ( c == EOF && ferror( stylecsssc_in ) ) \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ result = n; \ } \ else \ { \ errno=0; \ while ( (result = fread(buf, 1, max_size, stylecsssc_in))==0 && ferror(stylecsssc_in)) \ { \ if( errno != EINTR) \ { \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ break; \ } \ errno=0; \ clearerr(stylecsssc_in); \ } \ }\ \ #endif /* No semi-colon after return; correct usage is to write "yyterminate();" - * we don't want an extra ';' after the "return" because that will cause * some compilers to complain about unreachable statements. */ #ifndef yyterminate #define yyterminate() return YY_NULL #endif /* Number of entries by which start-condition stack grows. */ #ifndef YY_START_STACK_INCR #define YY_START_STACK_INCR 25 #endif /* Report a fatal error. */ #ifndef YY_FATAL_ERROR #define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) #endif /* end tables serialization structures and prototypes */ /* Default declaration of generated scanner - a define so the user can * easily add parameters. */ #ifndef YY_DECL #define YY_DECL_IS_OURS 1 extern int stylecsssc_lex (void); #define YY_DECL int stylecsssc_lex (void) #endif /* !YY_DECL */ /* Code executed at the beginning of each rule, after stylecsssc_text and stylecsssc_leng * have been set up. */ #ifndef YY_USER_ACTION #define YY_USER_ACTION #endif /* Code executed at the end of each rule. */ #ifndef YY_BREAK #define YY_BREAK break; #endif #define YY_RULE_SETUP \ YY_USER_ACTION /** The main scanner function which does all the work. */ YY_DECL { register yy_state_type yy_current_state; register char *yy_cp, *yy_bp; register int yy_act; #line 65 "../../../lib/srchilite/stylecssscanner.ll" #line 948 "../../../lib/srchilite/stylecssscanner.cc" if ( !(yy_init) ) { (yy_init) = 1; #ifdef YY_USER_INIT YY_USER_INIT; #endif if ( ! (yy_start) ) (yy_start) = 1; /* first start state */ if ( ! stylecsssc_in ) stylecsssc_in = stdin; if ( ! stylecsssc_out ) stylecsssc_out = stdout; if ( ! YY_CURRENT_BUFFER ) { stylecsssc_ensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = stylecsssc__create_buffer(stylecsssc_in,YY_BUF_SIZE ); } stylecsssc__load_buffer_state( ); } while ( 1 ) /* loops until end-of-file is reached */ { yy_cp = (yy_c_buf_p); /* Support of stylecsssc_text. */ *yy_cp = (yy_hold_char); /* yy_bp points to the position in yy_ch_buf of the start of * the current run. */ yy_bp = yy_cp; yy_current_state = (yy_start); yy_match: do { register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 274 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ++yy_cp; } while ( yy_base[yy_current_state] != 542 ); yy_find_action: yy_act = yy_accept[yy_current_state]; if ( yy_act == 0 ) { /* have to back up */ yy_cp = (yy_last_accepting_cpos); yy_current_state = (yy_last_accepting_state); yy_act = yy_accept[yy_current_state]; } YY_DO_BEFORE_ACTION; do_action: /* This label is used only to access EOF actions. */ switch ( yy_act ) { /* beginning of action switch */ case 0: /* must back up */ /* undo the effects of YY_DO_BEFORE_ACTION */ *yy_cp = (yy_hold_char); yy_cp = (yy_last_accepting_cpos); yy_current_state = (yy_last_accepting_state); goto yy_find_action; case 1: YY_RULE_SETUP #line 67 "../../../lib/srchilite/stylecssscanner.ll" {} YY_BREAK case 2: YY_RULE_SETUP #line 69 "../../../lib/srchilite/stylecssscanner.ll" {} YY_BREAK case 3: YY_RULE_SETUP #line 71 "../../../lib/srchilite/stylecssscanner.ll" { BEGIN(MULTI_COMMENT_STATE); } YY_BREAK case 4: YY_RULE_SETUP #line 72 "../../../lib/srchilite/stylecssscanner.ll" {} YY_BREAK case 5: /* rule 5 can match eol */ YY_RULE_SETUP #line 73 "../../../lib/srchilite/stylecssscanner.ll" { ++line; BEGIN(INITIAL); } YY_BREAK case 6: YY_RULE_SETUP #line 76 "../../../lib/srchilite/stylecssscanner.ll" { return ',' ; } YY_BREAK case 7: YY_RULE_SETUP #line 77 "../../../lib/srchilite/stylecssscanner.ll" { stylecsssc_lval.string = new std::string(stylecsssc_text) ; return KEY ; } YY_BREAK case 8: /* rule 8 can match eol */ YY_RULE_SETUP #line 79 "../../../lib/srchilite/stylecssscanner.ll" { ++line ; } YY_BREAK case 9: YY_RULE_SETUP #line 81 "../../../lib/srchilite/stylecssscanner.ll" { BEGIN(CSS_SELECTOR) ; DEB("CSS SELECTOR"); } YY_BREAK case 10: YY_RULE_SETUP #line 85 "../../../lib/srchilite/stylecssscanner.ll" { BEGIN(CSS_SELECTOR) ; DEB("BODY CSS SELECTOR"); stylecsssc_lval.string = new std::string(stylecsssc_text) ; return KEY; } YY_BREAK case 11: YY_RULE_SETUP #line 92 "../../../lib/srchilite/stylecssscanner.ll" { // in case of comma separated selectors DEB("CSS SELECTOR"); } YY_BREAK case 12: YY_RULE_SETUP #line 96 "../../../lib/srchilite/stylecssscanner.ll" { BEGIN(CSS_PROPERTIES); DEB("CSS PROPERTIES"); } YY_BREAK case 13: YY_RULE_SETUP #line 100 "../../../lib/srchilite/stylecssscanner.ll" { BEGIN(CSS_COLOR); DEB("CSS COLOR"); } YY_BREAK case 14: YY_RULE_SETUP #line 104 "../../../lib/srchilite/stylecssscanner.ll" { BEGIN(CSS_PROPERTIES); stylecsssc_lval.string = new std::string(stylecsssc_text) ; DEB2("CSS COLOR", stylecsssc_text); return COLOR ; } YY_BREAK case 15: YY_RULE_SETUP #line 110 "../../../lib/srchilite/stylecssscanner.ll" { BEGIN(CSS_PROPERTIES); DEB2("CSS COLOR", stylecsssc_text); /* we need to add the " in order to make source-highlight realize that this is a direct color specification */ stylecsssc_lval.string = new std::string("\"" + std::string(stylecsssc_text) + "\""); return STRINGDEF; } YY_BREAK case 16: YY_RULE_SETUP #line 120 "../../../lib/srchilite/stylecssscanner.ll" { BEGIN(CSS_BG_COLOR); DEB("CSS BACKGROUND COLOR"); } YY_BREAK case 17: YY_RULE_SETUP #line 124 "../../../lib/srchilite/stylecssscanner.ll" { BEGIN(CSS_PROPERTIES); stylecsssc_lval.string = new std::string(stylecsssc_text) ; DEB2("CSS BG COLOR", stylecsssc_text); return BG_COLOR ; } YY_BREAK case 18: YY_RULE_SETUP #line 130 "../../../lib/srchilite/stylecssscanner.ll" { BEGIN(CSS_PROPERTIES); DEB2("CSS BG COLOR", stylecsssc_text); /* we need to add the " in order to make source-highlight realize that this is a direct color specification */ stylecsssc_lval.string = new std::string("\"" + std::string(stylecsssc_text) + "\""); return BG_STRINGDEF; } YY_BREAK case 19: YY_RULE_SETUP #line 140 "../../../lib/srchilite/stylecssscanner.ll" { BEGIN(CSS_FONT_WEIGHT); DEB("CSS FONT WEIGHT"); } YY_BREAK case 20: YY_RULE_SETUP #line 144 "../../../lib/srchilite/stylecssscanner.ll" { BEGIN(CSS_PROPERTIES); if (strcmp(stylecsssc_text, "bold") == 0) { DEB("CSS BOLD"); stylecsssc_lval.flag = srchilite::ISBOLD ; return BOLD ; } DEB2("discarding not handled value", stylecsssc_text); } YY_BREAK case 21: YY_RULE_SETUP #line 153 "../../../lib/srchilite/stylecssscanner.ll" { BEGIN(CSS_FONT_STYLE); DEB("CSS FONT STYLE"); } YY_BREAK case 22: YY_RULE_SETUP #line 157 "../../../lib/srchilite/stylecssscanner.ll" { BEGIN(CSS_PROPERTIES); if (strcmp(stylecsssc_text, "italic") == 0) { DEB("CSS ITALIC"); stylecsssc_lval.flag = srchilite::ISITALIC ; return ITALICS ; } DEB2("discarding not handled value", stylecsssc_text); } YY_BREAK case 23: YY_RULE_SETUP #line 166 "../../../lib/srchilite/stylecssscanner.ll" { BEGIN(CSS_FONT_FAMILY); DEB("CSS FONT FAMILY"); } YY_BREAK case 24: YY_RULE_SETUP #line 170 "../../../lib/srchilite/stylecssscanner.ll" { BEGIN(CSS_PROPERTIES); if (strcmp(stylecsssc_text, "monospace") == 0) { DEB("CSS FIXED"); stylecsssc_lval.flag = srchilite::ISFIXED ; return FIXED ; } DEB2("discarding not handled value", stylecsssc_text); } YY_BREAK case 25: YY_RULE_SETUP #line 179 "../../../lib/srchilite/stylecssscanner.ll" { BEGIN(CSS_TEXT_DECORATION); DEB("CSS TEXT DECORATION"); } YY_BREAK case 26: YY_RULE_SETUP #line 183 "../../../lib/srchilite/stylecssscanner.ll" { BEGIN(CSS_PROPERTIES); if (strcmp(stylecsssc_text, "underline") == 0) { DEB("CSS UNDERLINE"); stylecsssc_lval.flag = srchilite::ISUNDERLINE ; return UNDERLINE ; } DEB2("discarding not handled value", stylecsssc_text); } YY_BREAK case 27: YY_RULE_SETUP #line 192 "../../../lib/srchilite/stylecssscanner.ll" { BEGIN(INITIAL); DEB("CSS END PROPERTIES"); /* we must return ; since this is the terminator of a style option so we simulate it in case of css files */ return ';' ; } YY_BREAK case 28: YY_RULE_SETUP #line 201 "../../../lib/srchilite/stylecssscanner.ll" { /* discard other characters */ DEB2("CSS discarding", stylecsssc_text); } YY_BREAK case 29: YY_RULE_SETUP #line 205 "../../../lib/srchilite/stylecssscanner.ll" { /* discard other properties */ DEB2("CSS PROPERTIES discarding", stylecsssc_text); } YY_BREAK case 30: YY_RULE_SETUP #line 210 "../../../lib/srchilite/stylecssscanner.ll" { return stylecsssc_text[0] ; } YY_BREAK case 31: YY_RULE_SETUP #line 212 "../../../lib/srchilite/stylecssscanner.ll" ECHO; YY_BREAK #line 1294 "../../../lib/srchilite/stylecssscanner.cc" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(COMMENT_STATE): case YY_STATE_EOF(MULTI_COMMENT_STATE): case YY_STATE_EOF(STRING_STATE): case YY_STATE_EOF(CSS_SELECTOR): case YY_STATE_EOF(CSS_PROPERTIES): case YY_STATE_EOF(CSS_COLOR): case YY_STATE_EOF(CSS_BG_COLOR): case YY_STATE_EOF(CSS_FONT_WEIGHT): case YY_STATE_EOF(CSS_FONT_STYLE): case YY_STATE_EOF(CSS_FONT_FAMILY): case YY_STATE_EOF(CSS_TEXT_DECORATION): yyterminate(); case YY_END_OF_BUFFER: { /* Amount of text matched not including the EOB char. */ int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; /* Undo the effects of YY_DO_BEFORE_ACTION. */ *yy_cp = (yy_hold_char); YY_RESTORE_YY_MORE_OFFSET if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) { /* We're scanning a new file or input source. It's * possible that this happened because the user * just pointed stylecsssc_in at a new source and called * stylecsssc_lex(). If so, then we have to assure * consistency between YY_CURRENT_BUFFER and our * globals. Here is the right place to do so, because * this is the first action (other than possibly a * back-up) that will match for the new input source. */ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; YY_CURRENT_BUFFER_LVALUE->yy_input_file = stylecsssc_in; YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; } /* Note that here we test for yy_c_buf_p "<=" to the position * of the first EOB in the buffer, since yy_c_buf_p will * already have been incremented past the NUL character * (since all states make transitions on EOB to the * end-of-buffer state). Contrast this with the test * in input(). */ if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) { /* This was really a NUL. */ yy_state_type yy_next_state; (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state( ); /* Okay, we're now positioned to make the NUL * transition. We couldn't have * yy_get_previous_state() go ahead and do it * for us because it doesn't know how to deal * with the possibility of jamming (and we don't * want to build jamming into it because then it * will run more slowly). */ yy_next_state = yy_try_NUL_trans( yy_current_state ); yy_bp = (yytext_ptr) + YY_MORE_ADJ; if ( yy_next_state ) { /* Consume the NUL. */ yy_cp = ++(yy_c_buf_p); yy_current_state = yy_next_state; goto yy_match; } else { yy_cp = (yy_c_buf_p); goto yy_find_action; } } else switch ( yy_get_next_buffer( ) ) { case EOB_ACT_END_OF_FILE: { (yy_did_buffer_switch_on_eof) = 0; if ( stylecsssc_wrap( ) ) { /* Note: because we've taken care in * yy_get_next_buffer() to have set up * stylecsssc_text, we can now set up * yy_c_buf_p so that if some total * hoser (like flex itself) wants to * call the scanner after we return the * YY_NULL, it'll still work - another * YY_NULL will get returned. */ (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; yy_act = YY_STATE_EOF(YY_START); goto do_action; } else { if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; } break; } case EOB_ACT_CONTINUE_SCAN: (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state( ); yy_cp = (yy_c_buf_p); yy_bp = (yytext_ptr) + YY_MORE_ADJ; goto yy_match; case EOB_ACT_LAST_MATCH: (yy_c_buf_p) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; yy_current_state = yy_get_previous_state( ); yy_cp = (yy_c_buf_p); yy_bp = (yytext_ptr) + YY_MORE_ADJ; goto yy_find_action; } break; } default: YY_FATAL_ERROR( "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ } /* end of stylecsssc_lex */ /* yy_get_next_buffer - try to read in a new buffer * * Returns a code representing an action: * EOB_ACT_LAST_MATCH - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ static int yy_get_next_buffer (void) { register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; register char *source = (yytext_ptr); register int number_to_move, i; int ret_val; if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) YY_FATAL_ERROR( "fatal flex scanner internal error--end of buffer missed" ); if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) { /* Don't try to fill the buffer, so this is an EOF. */ if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) { /* We matched a single character, the EOB, so * treat this as a final EOF. */ return EOB_ACT_END_OF_FILE; } else { /* We matched some text prior to the EOB, first * process it. */ return EOB_ACT_LAST_MATCH; } } /* Try to read more data. */ /* First move last chars to start of buffer. */ number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) /* don't do the read, it's not guaranteed to return an EOF, * just force an EOF */ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; else { int num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) { /* Not enough room in the buffer - grow it. */ /* just a shorter name for the current buffer */ YY_BUFFER_STATE b = YY_CURRENT_BUFFER; int yy_c_buf_p_offset = (int) ((yy_c_buf_p) - b->yy_ch_buf); if ( b->yy_is_our_buffer ) { int new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; else b->yy_buf_size *= 2; b->yy_ch_buf = (char *) /* Include room in for 2 EOB chars. */ stylecsssc_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); } else /* Can't grow it, we don't own it. */ b->yy_ch_buf = 0; if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "fatal error - scanner input buffer overflow" ); (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; } if ( num_to_read > YY_READ_BUF_SIZE ) num_to_read = YY_READ_BUF_SIZE; /* Read in more data. */ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), (yy_n_chars), (size_t) num_to_read ); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } if ( (yy_n_chars) == 0 ) { if ( number_to_move == YY_MORE_ADJ ) { ret_val = EOB_ACT_END_OF_FILE; stylecsssc_restart(stylecsssc_in ); } else { ret_val = EOB_ACT_LAST_MATCH; YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_EOF_PENDING; } } else ret_val = EOB_ACT_CONTINUE_SCAN; if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { /* Extend the array by 50%, plus the number we really need. */ yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) stylecsssc_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); } (yy_n_chars) += number_to_move; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; return ret_val; } /* yy_get_previous_state - get the state just before the EOB char was reached */ static yy_state_type yy_get_previous_state (void) { register yy_state_type yy_current_state; register char *yy_cp; yy_current_state = (yy_start); for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) { register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 274 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; } return yy_current_state; } /* yy_try_NUL_trans - try to make a transition on the NUL character * * synopsis * next_state = yy_try_NUL_trans( current_state ); */ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) { register int yy_is_jam; register char *yy_cp = (yy_c_buf_p); register YY_CHAR yy_c = 1; if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 274 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; yy_is_jam = (yy_current_state == 273); return yy_is_jam ? 0 : yy_current_state; } static void yyunput (int c, register char * yy_bp ) { register char *yy_cp; yy_cp = (yy_c_buf_p); /* undo effects of setting up stylecsssc_text */ *yy_cp = (yy_hold_char); if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) { /* need to shift things up to make room */ /* +2 for EOB chars. */ register int number_to_move = (yy_n_chars) + 2; register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; register char *source = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) *--dest = *--source; yy_cp += (int) (dest - source); yy_bp += (int) (dest - source); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) YY_FATAL_ERROR( "flex scanner push-back overflow" ); } *--yy_cp = (char) c; (yytext_ptr) = yy_bp; (yy_hold_char) = *yy_cp; (yy_c_buf_p) = yy_cp; } #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (void) #else static int input (void) #endif { int c; *(yy_c_buf_p) = (yy_hold_char); if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) { /* yy_c_buf_p now points to the character we want to return. * If this occurs *before* the EOB characters, then it's a * valid NUL; if not, then we've hit the end of the buffer. */ if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) /* This was really a NUL. */ *(yy_c_buf_p) = '\0'; else { /* need more input */ int offset = (yy_c_buf_p) - (yytext_ptr); ++(yy_c_buf_p); switch ( yy_get_next_buffer( ) ) { case EOB_ACT_LAST_MATCH: /* This happens because yy_g_n_b() * sees that we've accumulated a * token and flags that we need to * try matching the token before * proceeding. But for input(), * there's no matching to consider. * So convert the EOB_ACT_LAST_MATCH * to EOB_ACT_END_OF_FILE. */ /* Reset buffer status. */ stylecsssc_restart(stylecsssc_in ); /*FALLTHROUGH*/ case EOB_ACT_END_OF_FILE: { if ( stylecsssc_wrap( ) ) return EOF; if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; #ifdef __cplusplus return yyinput(); #else return input(); #endif } case EOB_ACT_CONTINUE_SCAN: (yy_c_buf_p) = (yytext_ptr) + offset; break; } } } c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ *(yy_c_buf_p) = '\0'; /* preserve stylecsssc_text */ (yy_hold_char) = *++(yy_c_buf_p); return c; } #endif /* ifndef YY_NO_INPUT */ /** Immediately switch to a different input stream. * @param input_file A readable stream. * * @note This function does not reset the start condition to @c INITIAL . */ void stylecsssc_restart (FILE * input_file ) { if ( ! YY_CURRENT_BUFFER ){ stylecsssc_ensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = stylecsssc__create_buffer(stylecsssc_in,YY_BUF_SIZE ); } stylecsssc__init_buffer(YY_CURRENT_BUFFER,input_file ); stylecsssc__load_buffer_state( ); } /** Switch to a different input buffer. * @param new_buffer The new input buffer. * */ void stylecsssc__switch_to_buffer (YY_BUFFER_STATE new_buffer ) { /* TODO. We should be able to replace this entire function body * with * stylecsssc_pop_buffer_state(); * stylecsssc_push_buffer_state(new_buffer); */ stylecsssc_ensure_buffer_stack (); if ( YY_CURRENT_BUFFER == new_buffer ) return; if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ *(yy_c_buf_p) = (yy_hold_char); YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } YY_CURRENT_BUFFER_LVALUE = new_buffer; stylecsssc__load_buffer_state( ); /* We don't actually know whether we did this switch during * EOF (stylecsssc_wrap()) processing, but the only time this flag * is looked at is after stylecsssc_wrap() is called, so it's safe * to go ahead and always set it. */ (yy_did_buffer_switch_on_eof) = 1; } static void stylecsssc__load_buffer_state (void) { (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; stylecsssc_in = YY_CURRENT_BUFFER_LVALUE->yy_input_file; (yy_hold_char) = *(yy_c_buf_p); } /** Allocate and initialize an input buffer state. * @param file A readable stream. * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. * * @return the allocated buffer state. */ YY_BUFFER_STATE stylecsssc__create_buffer (FILE * file, int size ) { YY_BUFFER_STATE b; b = (YY_BUFFER_STATE) stylecsssc_alloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in stylecsssc__create_buffer()" ); b->yy_buf_size = size; /* yy_ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. */ b->yy_ch_buf = (char *) stylecsssc_alloc(b->yy_buf_size + 2 ); if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in stylecsssc__create_buffer()" ); b->yy_is_our_buffer = 1; stylecsssc__init_buffer(b,file ); return b; } /** Destroy the buffer. * @param b a buffer created with stylecsssc__create_buffer() * */ void stylecsssc__delete_buffer (YY_BUFFER_STATE b ) { if ( ! b ) return; if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; if ( b->yy_is_our_buffer ) stylecsssc_free((void *) b->yy_ch_buf ); stylecsssc_free((void *) b ); } #ifndef __cplusplus extern int isatty (int ); #endif /* __cplusplus */ /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a stylecsssc_restart() or at EOF. */ static void stylecsssc__init_buffer (YY_BUFFER_STATE b, FILE * file ) { int oerrno = errno; stylecsssc__flush_buffer(b ); b->yy_input_file = file; b->yy_fill_buffer = 1; /* If b is the current buffer, then stylecsssc__init_buffer was _probably_ * called from stylecsssc_restart() or through yy_get_next_buffer. * In that case, we don't want to reset the lineno or column. */ if (b != YY_CURRENT_BUFFER){ b->yy_bs_lineno = 1; b->yy_bs_column = 0; } b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; errno = oerrno; } /** Discard all buffered characters. On the next scan, YY_INPUT will be called. * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. * */ void stylecsssc__flush_buffer (YY_BUFFER_STATE b ) { if ( ! b ) return; b->yy_n_chars = 0; /* We always need two end-of-buffer characters. The first causes * a transition to the end-of-buffer state. The second causes * a jam in that state. */ b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; b->yy_buf_pos = &b->yy_ch_buf[0]; b->yy_at_bol = 1; b->yy_buffer_status = YY_BUFFER_NEW; if ( b == YY_CURRENT_BUFFER ) stylecsssc__load_buffer_state( ); } /** Pushes the new state onto the stack. The new state becomes * the current state. This function will allocate the stack * if necessary. * @param new_buffer The new state. * */ void stylecsssc_push_buffer_state (YY_BUFFER_STATE new_buffer ) { if (new_buffer == NULL) return; stylecsssc_ensure_buffer_stack(); /* This block is copied from stylecsssc__switch_to_buffer. */ if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ *(yy_c_buf_p) = (yy_hold_char); YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } /* Only push if top exists. Otherwise, replace top. */ if (YY_CURRENT_BUFFER) (yy_buffer_stack_top)++; YY_CURRENT_BUFFER_LVALUE = new_buffer; /* copied from stylecsssc__switch_to_buffer. */ stylecsssc__load_buffer_state( ); (yy_did_buffer_switch_on_eof) = 1; } /** Removes and deletes the top of the stack, if present. * The next element becomes the new top. * */ void stylecsssc_pop_buffer_state (void) { if (!YY_CURRENT_BUFFER) return; stylecsssc__delete_buffer(YY_CURRENT_BUFFER ); YY_CURRENT_BUFFER_LVALUE = NULL; if ((yy_buffer_stack_top) > 0) --(yy_buffer_stack_top); if (YY_CURRENT_BUFFER) { stylecsssc__load_buffer_state( ); (yy_did_buffer_switch_on_eof) = 1; } } /* Allocates the stack if it does not exist. * Guarantees space for at least one push. */ static void stylecsssc_ensure_buffer_stack (void) { int num_to_alloc; if (!(yy_buffer_stack)) { /* First allocation is just for 2 elements, since we don't know if this * scanner will even need a stack. We use 2 instead of 1 to avoid an * immediate realloc on the next call. */ num_to_alloc = 1; (yy_buffer_stack) = (struct yy_buffer_state**)stylecsssc_alloc (num_to_alloc * sizeof(struct yy_buffer_state*) ); if ( ! (yy_buffer_stack) ) YY_FATAL_ERROR( "out of dynamic memory in stylecsssc_ensure_buffer_stack()" ); memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); (yy_buffer_stack_max) = num_to_alloc; (yy_buffer_stack_top) = 0; return; } if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ /* Increase the buffer to prepare for a possible push. */ int grow_size = 8 /* arbitrary grow size */; num_to_alloc = (yy_buffer_stack_max) + grow_size; (yy_buffer_stack) = (struct yy_buffer_state**)stylecsssc_realloc ((yy_buffer_stack), num_to_alloc * sizeof(struct yy_buffer_state*) ); if ( ! (yy_buffer_stack) ) YY_FATAL_ERROR( "out of dynamic memory in stylecsssc_ensure_buffer_stack()" ); /* zero only the new slots.*/ memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); (yy_buffer_stack_max) = num_to_alloc; } } /** Setup the input buffer state to scan directly from a user-specified character buffer. * @param base the character buffer * @param size the size in bytes of the character buffer * * @return the newly allocated buffer state object. */ YY_BUFFER_STATE stylecsssc__scan_buffer (char * base, yy_size_t size ) { YY_BUFFER_STATE b; if ( size < 2 || base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) /* They forgot to leave room for the EOB's. */ return 0; b = (YY_BUFFER_STATE) stylecsssc_alloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in stylecsssc__scan_buffer()" ); b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ b->yy_buf_pos = b->yy_ch_buf = base; b->yy_is_our_buffer = 0; b->yy_input_file = 0; b->yy_n_chars = b->yy_buf_size; b->yy_is_interactive = 0; b->yy_at_bol = 1; b->yy_fill_buffer = 0; b->yy_buffer_status = YY_BUFFER_NEW; stylecsssc__switch_to_buffer(b ); return b; } /** Setup the input buffer state to scan a string. The next call to stylecsssc_lex() will * scan from a @e copy of @a str. * @param yystr a NUL-terminated string to scan * * @return the newly allocated buffer state object. * @note If you want to scan bytes that may contain NUL values, then use * stylecsssc__scan_bytes() instead. */ YY_BUFFER_STATE stylecsssc__scan_string (yyconst char * yystr ) { return stylecsssc__scan_bytes(yystr,strlen(yystr) ); } /** Setup the input buffer state to scan the given bytes. The next call to stylecsssc_lex() will * scan from a @e copy of @a bytes. * @param yybytes the byte buffer to scan * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. * * @return the newly allocated buffer state object. */ YY_BUFFER_STATE stylecsssc__scan_bytes (yyconst char * yybytes, int _yybytes_len ) { YY_BUFFER_STATE b; char *buf; yy_size_t n; int i; /* Get memory for full buffer, including space for trailing EOB's. */ n = _yybytes_len + 2; buf = (char *) stylecsssc_alloc(n ); if ( ! buf ) YY_FATAL_ERROR( "out of dynamic memory in stylecsssc__scan_bytes()" ); for ( i = 0; i < _yybytes_len; ++i ) buf[i] = yybytes[i]; buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; b = stylecsssc__scan_buffer(buf,n ); if ( ! b ) YY_FATAL_ERROR( "bad buffer in stylecsssc__scan_bytes()" ); /* It's okay to grow etc. this buffer, and we should throw it * away when we're done. */ b->yy_is_our_buffer = 1; return b; } #ifndef YY_EXIT_FAILURE #define YY_EXIT_FAILURE 2 #endif static void yy_fatal_error (yyconst char* msg ) { (void) fprintf( stderr, "%s\n", msg ); exit( YY_EXIT_FAILURE ); } /* Redefine yyless() so it works in section 3 code. */ #undef yyless #define yyless(n) \ do \ { \ /* Undo effects of setting up stylecsssc_text. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ stylecsssc_text[stylecsssc_leng] = (yy_hold_char); \ (yy_c_buf_p) = stylecsssc_text + yyless_macro_arg; \ (yy_hold_char) = *(yy_c_buf_p); \ *(yy_c_buf_p) = '\0'; \ stylecsssc_leng = yyless_macro_arg; \ } \ while ( 0 ) /* Accessor methods (get/set functions) to struct members. */ /** Get the current line number. * */ int stylecsssc_get_lineno (void) { return stylecsssc_lineno; } /** Get the input stream. * */ FILE *stylecsssc_get_in (void) { return stylecsssc_in; } /** Get the output stream. * */ FILE *stylecsssc_get_out (void) { return stylecsssc_out; } /** Get the length of the current token. * */ int stylecsssc_get_leng (void) { return stylecsssc_leng; } /** Get the current token. * */ char *stylecsssc_get_text (void) { return stylecsssc_text; } /** Set the current line number. * @param line_number * */ void stylecsssc_set_lineno (int line_number ) { stylecsssc_lineno = line_number; } /** Set the input stream. This does not discard the current * input buffer. * @param in_str A readable stream. * * @see stylecsssc__switch_to_buffer */ void stylecsssc_set_in (FILE * in_str ) { stylecsssc_in = in_str ; } void stylecsssc_set_out (FILE * out_str ) { stylecsssc_out = out_str ; } int stylecsssc_get_debug (void) { return stylecsssc__flex_debug; } void stylecsssc_set_debug (int bdebug ) { stylecsssc__flex_debug = bdebug ; } static int yy_init_globals (void) { /* Initialization is the same as for the non-reentrant scanner. * This function is called from stylecsssc_lex_destroy(), so don't allocate here. */ (yy_buffer_stack) = 0; (yy_buffer_stack_top) = 0; (yy_buffer_stack_max) = 0; (yy_c_buf_p) = (char *) 0; (yy_init) = 0; (yy_start) = 0; /* Defined in main.c */ #ifdef YY_STDINIT stylecsssc_in = stdin; stylecsssc_out = stdout; #else stylecsssc_in = (FILE *) 0; stylecsssc_out = (FILE *) 0; #endif /* For future reference: Set errno on error, since we are called by * stylecsssc_lex_init() */ return 0; } /* stylecsssc_lex_destroy is for both reentrant and non-reentrant scanners. */ int stylecsssc_lex_destroy (void) { /* Pop the buffer stack, destroying each element. */ while(YY_CURRENT_BUFFER){ stylecsssc__delete_buffer(YY_CURRENT_BUFFER ); YY_CURRENT_BUFFER_LVALUE = NULL; stylecsssc_pop_buffer_state(); } /* Destroy the stack itself. */ stylecsssc_free((yy_buffer_stack) ); (yy_buffer_stack) = NULL; /* Reset the globals. This is important in a non-reentrant scanner so the next time * stylecsssc_lex() is called, initialization will occur. */ yy_init_globals( ); return 0; } /* * Internal utility routines. */ #ifndef yytext_ptr static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) { register int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * s ) { register int n; for ( n = 0; s[n]; ++n ) ; return n; } #endif void *stylecsssc_alloc (yy_size_t size ) { return (void *) malloc( size ); } void *stylecsssc_realloc (void * ptr, yy_size_t size ) { /* The cast to (char *) in the following accommodates both * implementations that use char* generic pointers, and those * that use void* generic pointers. It works with the latter * because both ANSI C and C++ allow castless assignment from * any pointer type to void*, and deal with argument conversions * as though doing an assignment. */ return (void *) realloc( (char *) ptr, size ); } void stylecsssc_free (void * ptr ) { free( (char *) ptr ); /* see stylecsssc_realloc() for (char *) cast */ } #define YYTABLES_NAME "yytables" #line 212 "../../../lib/srchilite/stylecssscanner.ll" ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/formatterparams.h����������������������������������������������0000644�0001750�0001750�00000002044�11672675563�020045� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2008 // // Copyright: See COPYING file that comes with this distribution // #ifndef FORMATTERPARAMS_H_ #define FORMATTERPARAMS_H_ #include "parserinfo.h" #include "fileutil.h" namespace srchilite { /** * Additional parameters that can be passed to a formatter */ struct FormatterParams: public ParserInfo { /// file name without path std::string fileNameNoPath; /** * The start position of the string to format within the whole string (line). * Note that this makes sense only for strings that are not to be formatted * as normal. * A negative value means "not specified" * IMPORTANT: do not use this if formatting optimization is on. */ int start; FormatterParams() : start(-1) { } /** * @param the file name (possible path will be stripped) */ FormatterParams(const std::string &n) : ParserInfo(n), fileNameNoPath(strip_file_path(n)), start(-1) { } }; } #endif /*FORMATTERPARAMS_H_*/ ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/stringlistlangelem.h�������������������������������������������0000644�0001750�0001750�00000003167�11672675563�020554� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // C++ Interface: stringlistlangelem // // Description: // // // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2009 // // Copyright: See COPYING file that comes with this distribution // // #ifndef STRINGLISTLANGELEM_H #define STRINGLISTLANGELEM_H #include "statestartlangelem.h" namespace srchilite { class StringDefs; /** * @class StringListLangElem A language element consisting of a list of strings */ // doublecpp: forward declarations, DO NOT MODIFY class HighlightState; // file: highlightstate.h class HighlightStateBuilder; // file: highlightstatebuilder.h // doublecpp: end, DO NOT MODIFY class StringListLangElem : public StateStartLangElem { private: StringDefs *alternatives; bool nonsensitive; public: /** * @param n the name for this element * @param defs the alternatives for this element * @param nons whether the alternatives are to be considered case unsensitive */ StringListLangElem(const std::string &n, StringDefs *defs, bool nons); virtual ~StringListLangElem(); virtual const std::string toString() const; virtual const std::string toStringOriginal() const; /** * @return the collection of all the alternatives of this element */ StringDefs *getAlternatives() const { return alternatives; } /** * @return whether the alternatives are case sensitive */ bool isCaseSensitive() const { return !nonsensitive; } // doublecpp: dispatch methods, DO NOT MODIFY public: virtual void dispatch_build(HighlightStateBuilder *, HighlightState * state); // doublecpp: end, DO NOT MODIFY }; } #endif ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/textstyles.h���������������������������������������������������0000644�0001750�0001750�00000003613�11672675564�017072� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/** * C++ class: textstyles.h * * Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2005-2009 * Copyright: See COPYING file that comes with this distribution */ #ifndef _TEXTSTYLES_H_ #define _TEXTSTYLES_H_ #include "textstyle.h" #include "colormap.h" #include "chartranslator.h" #include "doctemplate.h" namespace srchilite { /** * Contains TextStyle objects for all formats (e.g., bold, italics, etc), and * other templates (e.g., for the document header, etc.); it also contains the color * map and the char translator. */ struct TextStyles { /// the TextStyle for bold TextStyle bold; /// the TextStyle for italics TextStyle italics; /// the TextStyle for underline TextStyle underline; /// the TextStyle for non fixed width font TextStyle notfixed; /// the TextStyle for fixed width font TextStyle fixed; /// the TextStyle for color specification TextStyle color; /// the TextStyle for background color specification TextStyle bg_color; /// the TextStyle used when there's only one specification for all formats TextStyle onestyle; /// the TextStyle for line numbering TextStyle linenum; /** * The TextStyle objects for reference formatting */ struct RefTextStyle { TextStyle anchor, inline_reference, postline_reference, postdoc_reference; } refstyle; std::string starting_template, style_separator, file_extension, line_prefix; CharTranslatorPtr charTranslator; ColorMapPtr colorMap; /// template used when generating entire document DocTemplate docTemplate; /// template used when not generating entire document DocTemplate noDocTemplate; TextStyles() : charTranslator(new CharTranslator), colorMap(new ColorMap) { } }; /// shared pointer typedef boost::shared_ptr<TextStyles> TextStylesPtr; } #endif /*_TEXTSTYLES_H_*/ ���������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/sourcehighlight.h����������������������������������������������0000644�0001750�0001750�00000024743�11672675563�020040� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2008 // // Copyright: See COPYING file that comes with this distribution // #ifndef SOURCEHIGHLIGHT_H_ #define SOURCEHIGHLIGHT_H_ #include <string> #include <istream> #include <ostream> #include "textstyleformattercollection.h" namespace srchilite { class FormatterManager; class PreFormatter; class LangDefManager; class BufferedOutput; class LineNumGenerator; class DocGenerator; class CharTranslator; class HighlightEventListener; class CTagsManager; class CTagsFormatter; class LineRanges; class RegexRanges; /** * The main class performing highlighting of an input file generating * an output file. */ class SourceHighlight { /// the output language file name std::string outputLang; /** * Path for several configuration files. * By default it contains the absolute data dir corresponding to the installation * path, e.g., "$prefix/share/source-highlight" */ std::string dataDir; /// the background color std::string backgroundColor; /// the style file std::string styleFile; /// the css style file std::string styleCssFile; /// the style defaults file std::string styleDefaultFile; /// the prefix for all the output lines std::string linePrefix; /// the separator for ranges std::string rangeSeparator; /// the title for the output document (defaults to the source file name) std::string title; /// the input lang for the output document std::string inputLang; /// the value for the css std::string css; /// the file name of the header std::string headerFileName; /// the file name of the footer std::string footerFileName; /// the file extension for output files std::string outputFileExtension; /// the directory for output files std::string outputFileDir; /// the formatter manager FormatterManager *formatterManager; /// the preformatter PreFormatter *preFormatter; /// all the formatters that are created TextStyleFormatterCollection formatterCollection; /// for loading language definitions LangDefManager *langDefManager; /// the generator for line numbers LineNumGenerator *lineNumGenerator; /** * the generator of the start and end of the output document */ DocGenerator *docGenerator; /** * the generator of the start and end of the output document when NOT generating * an entire document */ DocGenerator *noDocGenerator; /** * The listener for highlight events */ HighlightEventListener *highlightEventListener; /// the CTagsManager for creating CTagsFormatters CTagsManager *ctagsManager; /// the CTagsFormatter for formatting references and anchors CTagsFormatter *ctagsFormatter; /// the possible LineRanges (to check which lines should be printed) LineRanges *lineRanges; /// the possible RegexRanges (to check which lines should be printed) RegexRanges *regexRanges; /** * Whether to optmize output (e.g., adiacent text parts belonging * to the same element will be buffered and generated as a single text part) */ bool optimize; /// whether to generate line numbers bool generateLineNumbers; /// whether to generate line numbers with references bool generateLineNumberRefs; /// the prefix for the line number anchors std::string lineNumberAnchorPrefix; /// the line number padding char (default '0') char lineNumberPad; /** * the number of digits for line numbers (if not specified this is * computed automatically according to the lines in the input, if the * input is a file name, otherwise it is set to a default value of 5) */ unsigned int lineNumberDigits; /// whether to generate an entire document (default false) bool generateEntireDoc; /// whether to generate the program version in the output file (default=true) bool generateVersion; /// whether we can use stdout for generating the output (default true) bool canUseStdOut; /// whether to open output files in binary mode (default false) bool binaryOutput; /** * If greater than 0 it means that tabs will be replaced by tabSpaces * blank characters */ unsigned int tabSpaces; /** * Sets the specified buffered output to all the formatters * @param output */ void updateBufferedOutput(BufferedOutput *output); public: /** * @param outputLang the output lang file (default: html.outlang) */ SourceHighlight(const std::string &outputLang = "html.outlang"); ~SourceHighlight(); /** * performs initialization of fields, if not already initialized. * There's no need to call it directly, since the highlight functions always * check initialization. */ void initialize(); /** * Highlights the contents of the input file into the output file, using * the specified inputLang definition * @param input the input file name, if empty stdin will be used * @param output the output file name, if empty (or equal to STDOUT) the stdout will be used * @param inputLang the language definition file */ void highlight(const std::string &input, const std::string &output, const std::string &inputLang); /** * Highlights the contents of the input stream into the output stream, using * the specified inputLang definition * @param input the input stream * @param output the output stream * @param inputLang the language definition file * @param inputFileName the input file name */ void highlight(std::istream &input, std::ostream &output, const std::string &inputLang, const std::string &inputFileName = ""); /** * Only check the validity of the language definition file. * If the language definition is valid it simply returns, otherwise, * it throws an exception (with the details of the problems found) * @param langFile * @throws HighlightBuilderException */ void checkLangDef(const std::string &langFile); /** * Only check the validity of the out language definition file. * If the language definition is valid it simply returns, otherwise, * it throws an exception (with the details of the problems found) * @param langFile * @throws ParserException */ void checkOutLangDef(const std::string &langFile); /** * Prints the HighlightState corresponding to the language definition file. * If the language definition is valid it simply prints the state and returns, otherwise, * it throws an exception (with the details of the problems found) * @param langFile * @param os where to print the highlight state * @throws HighlightBuilderException */ void printHighlightState(const std::string &langFile, std::ostream &os); /** * Prints the language elements corresponding to the language definition file. * If the language definition is valid it simply prints the state and returns, otherwise, * it throws an exception (with the details of the problems found) * @param langFile * @param os where to print the highlight state * @throws HighlightBuilderException */ void printLangElems(const std::string &langFile, std::ostream &os); /** * Given the input file name creates an output file name. * * @return the output file name */ const std::string createOutputFileName(const std::string &inputFile); void setDataDir(const std::string &_datadir) { dataDir = _datadir; } void setStyleFile(const std::string &_styleFile) { styleFile = _styleFile; } void setStyleCssFile(const std::string &_styleFile) { styleCssFile = _styleFile; } void setStyleDefaultFile(const std::string &_styleDefaultFile) { styleDefaultFile = _styleDefaultFile; } void setTitle(const std::string &_title) { title = _title; } void setInputLang(const std::string &_inputLang) { inputLang = _inputLang; } void setCss(const std::string &_css) { css = _css; } void setHeaderFileName(const std::string &h) { headerFileName = h; } void setFooterFileName(const std::string &f) { footerFileName = f; } void setOutputDir(const std::string &_outputDir) { outputFileDir = _outputDir; } const TextStyleFormatterCollection &getFormatterCollection() const { return formatterCollection; } void setOptimize(bool b = true) { optimize = b; } void setGenerateLineNumbers(bool b = true) { generateLineNumbers = b; } void setGenerateLineNumberRefs(bool b = true) { generateLineNumberRefs = b; } void setLineNumberPad(char c) { lineNumberPad = c; } void setLineNumberAnchorPrefix(const std::string &_prefix) { lineNumberAnchorPrefix = _prefix; } void setLineNumberDigits(unsigned int d) { lineNumberDigits = d; } void setGenerateEntireDoc(bool b = true) { generateEntireDoc = b; } void setGenerateVersion(bool b = true) { generateVersion = b; } void setCanUseStdOut(bool b = true) { canUseStdOut = b; } void setBinaryOutput(bool b = true) { binaryOutput = b; } void setHighlightEventListener(HighlightEventListener *l) { highlightEventListener = l; } void setRangeSeparator(const std::string &sep) { rangeSeparator = sep; } DocGenerator *getDocGenerator() const { return docGenerator; } DocGenerator *getNoDocGenerator() const { return noDocGenerator; } LineRanges *getLineRanges() const { return lineRanges; } void setLineRanges(LineRanges *lr) { lineRanges = lr; } RegexRanges *getRegexRanges() const { return regexRanges; } void setRegexRanges(RegexRanges *rr) { regexRanges = rr; } void setCTagsManager(CTagsManager *m) { ctagsManager = m; } void setTabSpaces(unsigned int i) { tabSpaces = i; } /** * Returns the file extension for the output file as specified in * the output format definition file (initialize must have been called). * @return the output file extension */ const std::string &getOutputFileExtension() const { return outputFileExtension; } }; } #endif /*SOURCEHIGHLIGHT_H_*/ �����������������������������source-highlight-3.1.6/lib/srchilite/languageinfer.h������������������������������������������������0000644�0001750�0001750�00000002127�11672675563�017447� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // C++ Interface: languageinfer // // Description: // // // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2006 // // Copyright: See COPYING file that comes with this distribution // // #ifndef LANGUAGEINFER_H #define LANGUAGEINFER_H #include <string> #include <iostream> namespace srchilite { /** Tries to infer the language by inspecting the input file. For instance, it looks for something like <pre> #!/bin/bash </pre> at the beginning of the file, or other expression to infer the language */ class LanguageInfer { public: LanguageInfer(); ~LanguageInfer(); /** * Tries to infer the language of the specified inputfile. * @param filename The file to inspect * @return The inferred language, or "" if inference failed */ const std::string infer(const std::string &filename); /** * Tries to infer the language of the specified input stream. * @param stream The stream to inspect * @return The inferred language, or "" if inference failed */ const std::string infer(std::istream &stream = std::cin); }; } #endif �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/highlighteventlistener.h���������������������������������������0000644�0001750�0001750�00000001311�11672675563�021411� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2008 // // Copyright: See COPYING file that comes with this distribution // #ifndef HIGHLIGHTEVENTLISTENER_H_ #define HIGHLIGHTEVENTLISTENER_H_ namespace srchilite { struct HighlightEvent; /** * Base class for listeners of HighlightEvent. Subclasses must implement notify() */ class HighlightEventListener { public: HighlightEventListener() {} virtual ~HighlightEventListener() {} /** * The method called to notify the listener about an event. * This must be implemented by subclasses. * @param event the generated event */ virtual void notify(const HighlightEvent &event) = 0; }; } #endif /*HIGHLIGHTEVENTLISTENER_H_*/ �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/wordtokenizer.cpp����������������������������������������������0000644�0001750�0001750�00000001636�11672675564�020106� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2008 // // Copyright: See COPYING file that comes with this distribution // #include <boost/regex.hpp> #include "wordtokenizer.h" namespace srchilite { /** * the regular expression for detecting spaces and words */ static boost::regex string_or_space_regex("([^[:blank:]]+)|([[:blank:]]+)"); using namespace std; #define SPACE 2 #define NOT_SPACE 1 void WordTokenizer::tokenize(const std::string &s, WordTokenizerResults &results) { boost::sregex_iterator i(s.begin(), s.end(), string_or_space_regex); boost::sregex_iterator j; while (i != j) { if ((*i)[SPACE].matched) { results.push_back(make_pair(string((*i)[SPACE].first, (*i)[SPACE].second), "")); } else { results.push_back(make_pair("", string((*i)[NOT_SPACE].first, (*i)[NOT_SPACE].second))); } ++i; } } } ��������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/textstyleformatterfactory.cpp����������������������������������0000644�0001750�0001750�00000012735�11672675563�022562� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2008 // // Copyright: See COPYING file that comes with this distribution // #include "textstyleformatterfactory.h" #include "formattermanager.h" #include "textstylebuilder.h" #include "textstyleformatter.h" #include "keys.h" namespace srchilite { TextStyleFormatterFactory::TextStyleFormatterFactory(TextStylesPtr _textStyles, PreFormatter *_preformatter, CTagsFormatter *_ctagsFormatter, FormatterManager *_formatterManager) : textStyles(_textStyles), preformatter(_preformatter), ctagsFormatter(_ctagsFormatter), formatterManager(_formatterManager) { } TextStyleFormatterFactory::~TextStyleFormatterFactory() { } bool TextStyleFormatterFactory::createFormatter(const string &key, const string &color, const string &bgcolor, StyleConstantsPtr styleconstants) { if (formatterManager->hasFormatter(key).get()) return false; if (!textStyles->onestyle.empty()) { TextStyleFormatter *textStyleFormatter = new TextStyleFormatter(textStyles->onestyle.subst_style(key)); formatterManager->addFormatter(key, FormatterPtr(textStyleFormatter)); formatterCollection.push_back(textStyleFormatter); bool noref = false; // whether this element must not have references // we still check the noref property in the style file, and set the // ctags formatter accordingly if (styleconstants.get()) { for (StyleConstantsIterator it = styleconstants->begin(); it != styleconstants->end(); ++it) { if ((*it) == ISNOREF) { noref = true; break; } } } if (!noref) textStyleFormatter->setCTagsFormatter(ctagsFormatter); return true; } TextStyleBuilder textStyleBuilder(textStyles->starting_template, textStyles->style_separator); textStyleBuilder.start(); bool noref = false; // whether this element must not have references if (key == "linenum") { // for line numbers we have the style for the container of the linenum // and the style of the line number (e.g., the line number can be // generated in bold, and inside a table column) textStyleBuilder.add(textStyles->linenum); } if (styleconstants.get()) { for (StyleConstantsIterator it = styleconstants->begin(); it != styleconstants->end(); ++it) { switch (*it) { case ISBOLD: textStyleBuilder.add(textStyles->bold); break; case ISITALIC: textStyleBuilder.add(textStyles->italics); break; case ISUNDERLINE: textStyleBuilder.add(textStyles->underline); break; case ISFIXED: textStyleBuilder.add(textStyles->fixed); break; case ISNOTFIXED: textStyleBuilder.add(textStyles->notfixed); break; case ISNOREF: noref = true; break; } } } if (color.size()) { textStyleBuilder.add(textStyles->color.subst_style(preprocessColor(color))); } if (bgcolor.size()) { textStyleBuilder.add(textStyles->bg_color.subst_style(preprocessColor(bgcolor))); } TextStyle style = textStyleBuilder.end(); TextStyleFormatter *textStyleFormatter = new TextStyleFormatter(style); if (!noref) textStyleFormatter->setCTagsFormatter(ctagsFormatter); formatterManager->addFormatter(key, FormatterPtr(textStyleFormatter)); formatterCollection.push_back(textStyleFormatter); return true; } string TextStyleFormatterFactory::preprocessColor(const string &color) { if (color[0] == '"' && color[color.size()-1] == '"') return color.substr(1, color.size()-2); else return textStyles->colorMap->getColor(color); } bool TextStyleFormatterFactory::createMissingFormatter(const string &key1, const string &key2) { // the formatter for key1 is not missing if (formatterManager->hasFormatter(key1).get()) return false; // the formatter for key2 is missing if (!formatterManager->hasFormatter(key2).get()) return false; // the formatter for key1 will have the same style as the formatter for key2 formatterManager->addFormatter(key1, formatterManager->getFormatter(key2)); // there's no need to update the formatterCollection, since no new formatter was created return true; } void TextStyleFormatterFactory::addDefaultFormatter() { FormatterPtr defaultFormatter = formatterManager->hasFormatter(NORMAL); // if the style for normal was not specified if (!defaultFormatter.get()) { TextStyleFormatter *textStyleFormatter = 0; if (textStyles->onestyle.empty()) textStyleFormatter = new TextStyleFormatter(); else textStyleFormatter = new TextStyleFormatter(textStyles->onestyle.subst_style(NORMAL)); defaultFormatter = FormatterPtr(textStyleFormatter); formatterManager->addFormatter(NORMAL, defaultFormatter); textStyleFormatter->setCTagsFormatter(ctagsFormatter); formatterCollection.push_back(textStyleFormatter); } else { formatterCollection.push_back(dynamic_cast<TextStyleFormatter *>(defaultFormatter.get())); } formatterManager->setDefaultFormatter(defaultFormatter); } } �����������������������������������source-highlight-3.1.6/lib/srchilite/langmap.h������������������������������������������������������0000644�0001750�0001750�00000012343�11672675563�016260� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004 // // Copyright: See COPYING file that comes with this distribution // // #ifndef LANGMAP_H #define LANGMAP_H #include <string> #include <map> #include <set> namespace srchilite { /** * A map stored in a file with the format * key = elem. * * Comment line start with a # * * This is used for lang.map, outlang.map and style.defaults (and for any other * files that have this simple syntax). * * Methods of this class can throw ParserException if they can't parse * the map file because of a syntax error. * */ class LangMap { typedef std::map<std::string, std::string> Map; Map langmap; /// whether the corresponding file is opened bool isOpen; /// the path for searching for the map file name std::string path; /// the map file name std::string filename; public: /** * A LangMap object based on the passed map file (using the specified * path). * @param path the path where to search for the filename * @param filename the map file */ LangMap(const std::string &path, const std::string &filename); /** * A LangMap object based on the passed map file (using the * path stored in the settings or the default hardcoded one). * @param filename the map file */ LangMap(const std::string &filename); ~LangMap(); typedef Map::const_iterator const_iterator; const_iterator begin() { return langmap.begin(); } const_iterator end() { return langmap.end(); } /** * Prints the contents on the map to the standard output. * This is basically for testing purposes. */ void print(); /** * Open the corresponding file (if it is not already opened) and read * and parse its contents. If the map file has been already opened * (and parsed) this does nothing. * @throws ParserException in case the lang map file is not correct. */ void open(); /** * Returns the lang file name corresponding to the passed language name. * The lang map file must have already been opened (if you want to be sure * of that, use getMappedFileName instead). * * @param lang the language name whose lang definition file name we want * to retrieve * @return the file name of the lang definition file corresponding to * the specified language (or the empty string if there's no such * association) */ const std::string getFileName(const std::string &lang) { return langmap[lang]; } /** * Returns the lang file name corresponding to the passed language name. * The lang map file is opened and parsed if it has not been inspected yet. * * @param lang the language name whose lang definition file name we want * to retrieve * @return the file name of the lang definition file corresponding to * the specified language (or the empty string if there's no such * association) * @throws ParserException in case the lang map file is not correct. */ const std::string getMappedFileName(const std::string &lang); /** * Tries to detect the corresponding lang file name, from the file name * passed as parameter. * In order to do so it proceeds as follows (until it succeeds): * -# Use the file extension if any (for instance, if the passed file name * is <em>foo.cpp</em> it looks for the lang def file associated to <em>cpp</em>) * -# Use the lower case file extension if any * -# Use the file name if it has no extension (for instance, if the * passed file name is <em>changelog</em>, then looks for the lang file associated * to <em>changelog</em>) * -# Use the file name in lowercase (for instance, if the * passed file name is <em>ChangeLog</em>, then looks for the lang file to <em>changelog</em>) * * This is useful, e.g., for highlighting a file using its file name * for detecting its source language. Similarly, for choosing the * output format by using the name of the output file. * * This method opens the lang map file if it hasn't been parsed yet. * * @param fileName the language name whose lang definition file name we want * to retrieve * @return the file name of the lang definition file corresponding to * the specified file name (or the empty string if there's no such * association) * @throws ParserException in case the lang map file is not correct. */ const std::string getMappedFileNameFromFileName(const std::string &fileName); /** * Returns a set (i.e., an ordered list) of all the lang names of this * map. * @return the lang names of this map */ std::set<std::string> getLangNames() const; /** * Returns a set (i.e., an ordered list) of all the mapped lang file names of this * map. * @return the lang file names of this map */ std::set<std::string> getMappedFileNames() const; /** * Reloads the contents of this map, using the (new) path and * filename * @param path the path where to search for the filename * @param filename the map file */ void reload(const std::string &path, const std::string &filename); }; } #endif ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/chartranslator.cc����������������������������������������������0000644�0001750�0001750�00000004722�11672675562�020027� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (C) 1999-2009 Lorenzo Bettini, http://www.lorenzobettini.it * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ #include "chartranslator.h" #include <sstream> using namespace std; namespace srchilite { CharTranslator::CharTranslator(PreFormatterPtr f) : PreFormatter(f), counter(0), reg_exp(0), bol(true) { } CharTranslator::~CharTranslator() { if (reg_exp) delete reg_exp; } void CharTranslator::set_translation(const std::string &to_translate, const std::string &translate_into) { // here we only buffer the translation regular expression ostringstream exp; exp << (translation_exp.size() ? "|" : "") << "(" << to_translate << ")"; translation_exp += exp.str(); ostringstream format; // the translation format corresponding to "to_translate" format << "(?" << ++counter << translate_into << ")"; translation_format += format.str(); } const string CharTranslator::doPreformat(const string &text) { if (!translation_exp.size()) { return text; } // we finally build the actual regular expression if (!reg_exp) reg_exp = new boost::regex(translation_exp); boost::match_flag_type flags = boost::match_default | boost::format_all; if (!bol) flags |= boost::match_not_bol; // if we're not at the beginning of the line, then we must not match the // beginning of the string as the beginning of a line std::ostringstream preformat_text(std::ios::out | std::ios::binary); std::ostream_iterator<char, char> oi(preformat_text); boost::regex_replace(oi, text.begin(), text.end(), *reg_exp, translation_format, flags); // keep track of the fact that we begin a new line if (text.find('\n') != string::npos) bol = true; else bol = false; return preformat_text.str(); } } ����������������������������������������������source-highlight-3.1.6/lib/srchilite/fileutil.h�����������������������������������������������������0000644�0001750�0001750�00000003473�11672675563�016462� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2008 // // Copyright: See COPYING file that comes with this distribution // #ifndef _FILEUTIL_H #define _FILEUTIL_H #include <iostream> #include <string> #include <cstdio> #include "ioexception.h" using std::istream; using std::string; using std::FILE; namespace srchilite { extern std::string start_path; /** * Reads the contents of the file into a string and returns it * * @param fileName * @return the contents of the file * @throw IOException */ string readFile(const string &fileName) throw (IOException); //char *read_file(const string &fileName); /** * Creates the output file name as outputDir + input file name + ext * * @param inputFileName * @param outputDir * @param ext * @return the output file (including the path) */ string createOutputFileName(const string &inputFileName, const string &outputDir, const string &ext); /** * @param input * @return returns the number of lines of the passed input stream */ unsigned int get_line_count(istream &input); /** * @param filename * @return returns the file extension (without the dot) */ string get_file_extension(const string &filename); FILE * open_file_stream(const string &input_file_name); istream * open_file_istream(const string &filename); istream * open_file_istream_or_error(const string &filename); istream * open_data_file_istream(const string &path, const string &filename, const string &start = start_path); FILE * open_data_file_stream(const string &path, const string &filename, const string &start = start_path); bool read_line(istream *in, string &line); string get_file_path(const string &s); bool contains_path(const string &); string strip_file_path(const string &); string get_input_file_name(const string &file_name); } #endif //_FILEUTIL_H �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/ioexception.h��������������������������������������������������0000644�0001750�0001750�00000001476�11672675563�017174� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2008 // // Copyright: See COPYING file that comes with this distribution // #ifndef IOEXCEPTION_H_ #define IOEXCEPTION_H_ #include <ostream> #include <exception> #include <string> namespace srchilite { /** * Exception representing an error in an input/output operation. */ struct IOException : public std::exception { /// detailed message for this exception std::string message; /// filename of the element that caused this exception std::string filename; IOException(const std::string &_message, const std::string &_filename); virtual ~IOException() throw() ; virtual const char* what ( ) const throw (); }; std::ostream& operator<<(std::ostream& os, const IOException &entry); } #endif /*IOEXCEPTION_H_*/ ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/regexrulefactory.h���������������������������������������������0000644�0001750�0001750�00000002613�11672675563�020232� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2008 // // Copyright: See COPYING file that comes with this distribution // #ifndef REGEXRULEFACTORY_H_ #define REGEXRULEFACTORY_H_ #include "highlightrulefactory.h" namespace srchilite { /** * Implementation of the abstract factory, creating highlighting rules * based on boost::regex regular expressions. */ class RegexRuleFactory : public HighlightRuleFactory { public: RegexRuleFactory(); virtual ~RegexRuleFactory(); virtual HighlightRule *createSimpleRule(const std::string &name, const std::string &s); virtual HighlightRule *createWordListRule(const std::string &name, const WordList &list, bool caseSensitve = true); virtual HighlightRule *createListRule(const std::string &name, const WordList &list, bool caseSensitve = true); virtual HighlightRule *createLineRule(const std::string &name, const std::string &start, const std::string &end, const std::string &escape = "", bool nested = false); virtual HighlightRule *createMultiLineRule(const std::string &name, const std::string &start, const std::string &end, const std::string &escape, bool nested); virtual HighlightRule *createCompoundRule(const ElemNameList &nameList, const std::string &rep); }; } #endif /*REGEXRULEFACTORY_H_*/ ���������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/langelems.cpp��������������������������������������������������0000644�0001750�0001750�00000003111�11672675563�017134� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // C++ Implementation: %{MODULE} // // Description: // // // Author: %{AUTHOR} <%{EMAIL}>, (C) %{YEAR} // // Copyright: See COPYING file that comes with this distribution // // #include "langelems.h" #include <sstream> #include "tostringcollection.h" using namespace std; namespace srchilite { LangElems::LangElems() { } LangElems::~LangElems() { for (LangElemsBase::iterator it = begin(); it != end(); ++it) delete *it; } const string LangElems::toString() const { return toStringCollection<LangElems>(this, '\n'); } const string LangElems::toStringOriginal() const { return toStringOriginalCollection<LangElems>(this, '\n'); } void LangElems::add(LangElem *el) { push_back(el); // store the pointer to the element just inserted in the list elem_map[el->getName()].push_back((++rbegin()).base()); } void LangElems::redef(LangElem *el) { const string &name = el->getName(); for (PointerList::iterator it = elem_map[name].begin(); it != elem_map[name].end(); ++it) { erase(*it); // remove previous elements with this name } elem_map[name].clear(); add(el); } void LangElems::subst(LangElem *el) { // replace the first occurrence with this lang element // remove the other occurrences if any const string &name = el->getName(); Pointer first = end(); for (PointerList::iterator it = elem_map[name].begin(); it != elem_map[name].end(); ++it) { if (first == end()) { **it = el; first = *it; } else { erase(*it); // remove remaining elements with this name } } elem_map[name].clear(); elem_map[name].push_back(first); } } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/regexrulefactory.cpp�������������������������������������������0000644�0001750�0001750�00000013014�11672675563�020562� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2008 // // Copyright: See COPYING file that comes with this distribution // #include "regexrulefactory.h" #include "regexhighlightrule.h" #include "tostringcollection.h" #include "highlightstate.h" #include "regexpreprocessor.h" namespace srchilite { /** * Build a non-marking group (i.e., (? ... ) starting from s * @param s * @return */ static const std::string non_marking_group(const std::string &s) { return "(?:" + s + ")"; } /** * Whether the passed string consists of a single char (escluding * the escape char back slash) * @param s * @return */ static bool is_single_char(const std::string &s) { if (s.size() && s[0] == '\\') return (s.size() == 2); return (s.size() == 1); } RegexRuleFactory::RegexRuleFactory() { } RegexRuleFactory::~RegexRuleFactory() { } HighlightRule *RegexRuleFactory::createSimpleRule(const std::string &name, const std::string &s) { return new RegexHighlightRule(name, s); } HighlightRule *RegexRuleFactory::createWordListRule(const std::string &name, const WordList &list, bool caseSensitive) { // \< and \> are word boundaries // we must make a non-marking group since the string can contain // alternative symbols. For instance, // \<(?:class|for|else)\> // correctly detects 'for' only in isolation, while // (?:\<class|for|else\>) // will not std::string alternatives = toStringCollection(list, '|'); if (!caseSensitive) alternatives = RegexPreProcessor::make_nonsensitive(alternatives); return new RegexHighlightRule(name, "\\<" + non_marking_group(alternatives) + "\\>"); } HighlightRule *RegexRuleFactory::createListRule(const std::string &name, const WordList &list, bool caseSensitive) { std::string alternatives = toStringCollection(list, '|'); if (!caseSensitive) alternatives = RegexPreProcessor::make_nonsensitive(alternatives); return new RegexHighlightRule(name, non_marking_group(alternatives)); } HighlightRule *RegexRuleFactory::createLineRule(const std::string &name, const std::string &start, const std::string &end, const std::string &escape, bool nested) { // if start or end is not a single char we cannot create a regexp directly: // we need to use states, and this is achieved by switching to a multi line rule if (nested || !is_single_char(start) || !is_single_char(end)) { return createMultiLineRule(name, start, end, escape, nested); } std::string exp_string; /* in case the expression is not the start element of a State/Environment and it must not spawn multiple lines, and the delimiters are only one character, build a regular expression of the shape <startdelim>(everything but delimiters)<enddelim> For instance if delimiters are "<" and ">" the built regular expression is "<(?:[^<>])*>" */ if (!escape.size()) { exp_string = start + non_marking_group("[^" + start + (end != start ? end : "") + "]") + "*" + end; } else { /* in case of a specified escape character it will use it for the (everything but delimiters) part. For instace, if in the example above the escape character is the backslash, the generated expression is <(?:[^\\<\\>]|\\.)*> */ exp_string = start + non_marking_group("[^" + escape + start + (end != start ? escape + end : "") + "]|"+ escape + ".") + "*" + end; } return createSimpleRule(name, exp_string); } HighlightRule *RegexRuleFactory::createMultiLineRule(const std::string &name, const std::string &start, const std::string &_end, const std::string &escape, bool nested) { std::string end = _end; if (!end.size()) { // if end is not specified, then end of buffer is assumed end = "\\z"; } // rule matching the start expression HighlightRule *startRule = createSimpleRule(name, start); // rule matching the end expression HighlightRule *endRule = createSimpleRule(name, end); // when we match the end we must exit one level endRule->setExitLevel(1); // the state to enter when we match the start expression HighlightStatePtr innerState = HighlightStatePtr(new HighlightState); // this is the rule for exiting the inner state innerState->addRule(HighlightRulePtr(endRule)); // if escape is given, we must not match the end string when preceeded by the // escape string, thus we build an expression that matches the escape sequence // followed by one character if (escape.size()) { HighlightRule *escapeRule = createSimpleRule(name, escape + "."); innerState->addRule(HighlightRulePtr(escapeRule)); } if (nested) { // if the rule is nested it means that the start expression will // enter the same inner state. // rule matching the start expression within the inner state HighlightRule *nestedStartRule = createSimpleRule(name, start); nestedStartRule->setNested(true); innerState->addRule(HighlightRulePtr(nestedStartRule)); } startRule->setNextState(innerState); return startRule; } HighlightRule *RegexRuleFactory::createCompoundRule( const ElemNameList &nameList, const std::string &rep) { HighlightRule *rule = new RegexHighlightRule(rep); for (ElemNameList::const_iterator it = nameList.begin(); it != nameList.end(); ++it) { rule->addElem(*it); } return rule; } } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/utils.h��������������������������������������������������������0000644�0001750�0001750�00000002010�11672675564�015770� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2006 // // Copyright: See COPYING file that comes with this distribution // // #ifndef UTILS_H #define UTILS_H #include <string> namespace srchilite { /** generic utils functions (e.g., string manipulation) */ class Utils{ public: /** * Capitalizes the passed string * @param s the string to capitalize */ static void toUpper(std::string &s); /** * Lowerizes the passed string * @param s the string to lowerize */ static void toLower(std::string &s); /** * returns a capitalized version of the passed string * @param s the string to capitalize * @return a capitalized version of the passed string */ static std::string toupper(const std::string &s); /** * returns a lowerized version of the passed string * @param s the string to lowerize * @return a lowerized version of the passed string */ static std::string tolower(const std::string &s); }; } #endif ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/stylecssparser.yy����������������������������������������������0000644�0001750�0001750�00000014267�11672675563�020150� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������%{ /* * Copyright (C) 1999-2007 Lorenzo Bettini <http://www.lorenzobettini.it> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ #include <stdio.h> #include <stdlib.h> #include <iostream> #include <string> #include "formatterfactory.h" #include "colors.h" #include "keys.h" #include "parsestyles.h" #include "fileutil.h" #include "stylekey.h" #include "utils.h" #include "parserexception.h" using std::cerr; using namespace srchilite; extern int line; static int yyparse() ; static void yyerror( const char *s ) ; // line is defined in styleparser // to generate the formatter for each language element static FormatterFactory *formatterFactory; static void updateBgColor(const std::string &c); // for the background color of the entire output static string bodyBgColor; extern int stylecsssc_lex() ; extern FILE *stylecsssc_in ; extern int stylecsssc_lex_destroy (void); /// the global pointer to style constant for a specific element static StyleConstantsPtr currentStyleConstants; /// the global pointer to the current color static string currentColor; /// the global pointer to the current bg color static string currentBGColor; /// where we store possible errors static string errorBuffer; %} %union { int tok ; /* command */ const std::string * string ; /* string : id, ... */ srchilite::StyleConstant flag ; srchilite::StyleConstants *styleconstants; srchilite::KeyList *keylist; } ; %token <flag> BOLD ITALICS UNDERLINE FIXED NOTFIXED NOREF %token <string> KEY COLOR BG_COLOR STRINGDEF BG_STRINGDEF %type <keylist> keylist %destructor { if ($$) delete $$; } keylist KEY COLOR BG_COLOR STRINGDEF %% stylefile : { /* allow empty files */ } | statements ; statements : statements statement | statement ; statement : option ; option : keylist { //printSequence( $1 ) ; //printMessage_noln( ": " ) ; currentStyleConstants = StyleConstantsPtr(new StyleConstants); currentColor = ""; currentBGColor = ""; } optionspecs ';' { KeyType key; KeyList *keylist = $1; for (KeyList::const_iterator it = keylist->begin(); it != keylist->end(); ++it) { key = *it; // check whether it's the body specification if (Utils::tolower(key) == "body") { updateBgColor(currentBGColor); // notice that for text style specification for the body, the background // is assumed for the entire document and not for the normal text // following the semantics of css // avoid adding an empty style definition for normal if (currentColor != "" || currentStyleConstants->size()) { if (!formatterFactory->createFormatter(NORMAL, currentColor, "", currentStyleConstants)) { errorBuffer = "already defined " NORMAL; delete keylist; YYERROR; } } } else { if (!formatterFactory->createFormatter(key, currentColor, currentBGColor, currentStyleConstants)) { errorBuffer = "already defined " + key; delete keylist; YYERROR; } } } delete keylist; } ; keylist : keylist ',' KEY { $1->push_back(*$3); $$ = $1; delete $3; } | KEY { $$ = new KeyList; $$->push_back(*$1); delete $1; } ; optionspecs : {} | optionspecs optionspec ; optionspec : color | bgcolor | styleconstant ; color : COLOR { currentColor = *$1; delete $1; } | STRINGDEF { currentColor = *$1; delete $1; } ; bgcolor : BG_COLOR { currentBGColor = *$1; delete $1; } | BG_STRINGDEF { currentBGColor = *$1; delete $1; } ; styleconstant : BOLD { currentStyleConstants->push_back(ISBOLD); } | ITALICS { currentStyleConstants->push_back(ISITALIC); } | UNDERLINE { currentStyleConstants->push_back(ISUNDERLINE); } | FIXED { currentStyleConstants->push_back(ISFIXED); } | NOTFIXED { currentStyleConstants->push_back(ISNOTFIXED); } | NOREF { currentStyleConstants->push_back(ISNOREF); } ; %% // string current_file; defined in styleparser extern string current_file; void yyerror( const char *s ) { errorBuffer = s; } void updateBgColor(const std::string &c) { if (bodyBgColor != "") yyerror("bgcolor already defined"); else bodyBgColor = c; } namespace srchilite { void parseCssStyles(const string &path, const string &name, FormatterFactory *genFactory, string &bodyBgColor_) { formatterFactory = genFactory; errorBuffer = ""; int result = 1; line = 1; // opens the file for yylex stylecsssc_in = open_data_file_stream(path, name); if (contains_path(name)) current_file = name; else current_file = (path.size() ? path + "/" : "") + name; bodyBgColor = ""; result = yyparse() ; bodyBgColor_ = bodyBgColor; fclose(stylecsssc_in); // release scanner memory stylecsssc_lex_destroy(); if (result != 0 || errorBuffer.size()) { throw ParserException(errorBuffer, current_file, line); } } } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/highlightstate.cpp���������������������������������������������0000644�0001750�0001750�00000006000�11672675563�020175� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2008 // // Copyright: See COPYING file that comes with this distribution // #include "highlightstate.h" #include "highlightrule.h" #include "tostringcollection.h" #include "highlighttoken.h" namespace srchilite { unsigned int HighlightState::global_id = 1; HighlightState::HighlightState(const std::string &e) : id(global_id++), defaultElement(e), needsReferenceReplacement(false) { } HighlightState::HighlightState(const HighlightState &copy) : id(global_id++), defaultElement(copy.defaultElement), ruleList(copy.ruleList), needsReferenceReplacement(copy.needsReferenceReplacement) { } HighlightState::~HighlightState() { } void HighlightState::addRule(HighlightRulePtr rule) { ruleList.push_back(rule); } HighlightRulePtr HighlightState::replaceRule(RuleList::size_type index, HighlightRulePtr rule) { HighlightRulePtr old = ruleList[index]; ruleList[index] = rule; return old; } bool HighlightState::betterThan(const HighlightToken &t1, const HighlightToken &t2) { return (t1.prefix.size() < t2.prefix.size() || (t1.prefix.size() == t2.prefix.size() && t1.matchedSize > t2.matchedSize)); } bool HighlightState::findBestMatch(std::string::const_iterator start, std::string::const_iterator end, HighlightToken &token, const MatchingParameters &params) const { HighlightToken bestToken, tempToken; const HighlightRule *bestMatchingRule = 0; HighlightRule *currentRule = 0; bool first = true; for (RuleList::const_iterator it = ruleList.begin(); it != ruleList.end(); ++it) { currentRule = (*it).get(); tempToken.clearMatched(); if (currentRule->tryToMatch(start, end, tempToken, params)) { if (first || betterThan(tempToken, bestToken)) { // the first one, it's always the best if (first) { first = false; } bestToken.copyFrom(tempToken); bestMatchingRule = currentRule; // if we matched something with no prefix (or only spaces)... if (tempToken.prefixOnlySpaces) { // ...don't try any other rule break; } } } } if (!first) { // we found the best matching rule token.copyFrom(bestToken); token.rule = bestMatchingRule; return true; } return false; } bool HighlightState::findBestMatch(const std::string &s, HighlightToken &token, const MatchingParameters &params) const { return findBestMatch(s.begin(), s.end(), token, params); } void HighlightState::replaceReferences(const ReplacementList &rep) { for (size_t i = 0; i < ruleList.size(); ++i) { if (ruleList[i]->getNeedsReferenceReplacement()) { // create a copy ruleList[i] = HighlightRulePtr(ruleList[i]->clone()); ruleList[i]->replaceReferences(rep); } } } } source-highlight-3.1.6/lib/srchilite/textstyleformatterfactory.h������������������������������������0000644�0001750�0001750�00000005200�11672675563�022214� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2008 // // Copyright: See COPYING file that comes with this distribution // #ifndef TEXTSTYLEFORMATTERFACTORY_H_ #define TEXTSTYLEFORMATTERFACTORY_H_ #include <string> #include <list> #include <boost/shared_ptr.hpp> #include "formatterfactory.h" #include "textstyles.h" #include "textstyleformattercollection.h" namespace srchilite { using std::string; class PreFormatter; class CTagsFormatter; class FormatterManager; class TextStyleFormatter; /** * Generates TextStyleFormatters based on TextStyles */ class TextStyleFormatterFactory : public FormatterFactory { /// contains all the styles for formatting TextStylesPtr textStyles; /// to preformat text PreFormatter *preformatter; /// for ctgas reference generation (can be null) CTagsFormatter *ctagsFormatter; /// the formatter manager (associating a formatter to an element) FormatterManager *formatterManager; /// all the formatters that are created by this factory TextStyleFormatterCollection formatterCollection; public: TextStyleFormatterFactory(TextStylesPtr textStyles, PreFormatter *preformatter, CTagsFormatter *ctagsFormatter, FormatterManager *formatterManager); ~TextStyleFormatterFactory(); /** * Creates a formatter for the specific language element (identified by * key) with the passed style parameters * * @param key * @param color * @param bgcolor * @param styleconstants * @return false if a formatter for the specific key is already present */ bool createFormatter(const string &key, const string &color, const string &bgcolor, StyleConstantsPtr styleconstants); /** * Check whether the color must be translated with the color map or * left as it is (in that case, remove the ") * @param color * @return */ string preprocessColor(const string &color); /** * Creates a formatter for key1, if not already present, that has the same * style as the formatter for key2 * * @return false if the formatter for key1 is already present, or there's * no formatter for key2 */ bool createMissingFormatter(const string &key1, const string &key2); /** * Adds the formatter for the normal style if not already present. * * This must be called after all the formatter for the language elements were generated */ void addDefaultFormatter(); const TextStyleFormatterCollection &getFormatterCollection() const { return formatterCollection; } }; } #endif /*TEXTSTYLEFORMATTERFACTORY_H_*/ ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/highlightevent.h�����������������������������������������������0000644�0001750�0001750�00000001762�11672675563�017655� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2008 // // Copyright: See COPYING file that comes with this distribution // #ifndef HIGHLIGHTEVENT_H_ #define HIGHLIGHTEVENT_H_ namespace srchilite { struct HighlightToken; /** * Event concerning an highlighting operation (e.g., formatting, entering * a new state, exiting a state, etc.) */ struct HighlightEvent { /// the type of the event enum HighlightEventType { FORMAT = 0, ///< a standard formatting event FORMATDEFAULT, ///< formatting something as normal ENTERSTATE, ///< entering a new formatting state EXITSTATE ///< exiting a formatting state }; /// the token corresponding to the event const HighlightToken &token; /// the type of event HighlightEventType type; HighlightEvent(const HighlightToken &_token, HighlightEventType _type = FORMAT) : token(_token), type(_type) { } ~HighlightEvent() { } }; } #endif /*HIGHLIGHTEVENT_H_*/ ��������������source-highlight-3.1.6/lib/srchilite/srchilite.pro��������������������������������������������������0000644�0001750�0001750�00000007130�11672675563�017176� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������include(../../defines.pri) TEMPLATE = lib # save information about the library: CONFIG += create_prl TARGET = $$LIBRARY_NAME LIBS += $$ADDITIONAL_LIBRARIES HEADERS = parsestyles.h \ stringdef.h langelem.h \ statelangelem.h langelems.h langdefparserfun.h outlangdefparserfun.h \ tostringcollection.h regexpreprocessor.h \ langdefscanner.h outlangdefscanner.h parsestruct.h langmap.h statestartlangelem.h \ stringlistlangelem.h delimitedlangelem.h vardefinitions.h textstyle.h \ textstyles.h textstylebuilder.h doctemplate.h substfun.h \ parserinfo.h readtags.h fileinfo.h linebuffer.h preformatter.h \ langelemsprinter.h languageinfer.h stopwatch.h stylekey.h \ namedsubexpslangelem.h refposition.h \ highlightrule.h highlighttoken.h highlightrulefactory.h highlightstate.h \ regexhighlightrule.h regexrulefactory.h \ highlightstateprinter.h sourcehighlighter.h matchingparameters.h \ formatter.h formattermanager.h \ highlightstatebuilder.h highlightbuilderexception.h \ wordtokenizer.h ctagscollector.h formatterparams.h ctagsformatter.h \ sourcefilehighlighter.h linenumgenerator.h \ textstyleformatter.h formatterfactory.h textstyleformatterfactory.h \ langdefmanager.h sourcehighlight.h \ textstyleformattercollection.h \ ioexception.h parserexception.h stringtable.h \ eventgenerator.h highlightevent.h highlighteventlistener.h \ debuglistener.h ctagsmanager.h bufferedoutput.h lineranges.h regexranges.h \ colors.h \ keys.h styleparser.h stylecssparser.h \ fileutil.h \ chartranslator.h \ docgenerator.h \ srcuntabifier.h colormap.h \ langdefparser.h outlangdefparser.h \ stylefileparser.h \ settings.h \ versions.h \ verbosity.h \ sourcehighlightutils.h utils.h \ instances.h SOURCES += \ fileutil.cc \ substfun.cpp \ stopwatch.cpp utils.cpp \ ioexception.cpp \ settings.cpp \ versions.cpp \ verbosity.cpp \ sourcehighlight.cpp styleparser.cc \ stylescanner.cc outlangdefparser.cc \ stylecssparser.cc stylecssscanner.cc outlangdefscanner.cc \ debuglistener.cpp langmap.cpp stylefileparser.cpp \ langelem.cpp statelangelem.cpp \ langelems.cpp statestartlangelem.cpp stringlistlangelem.cpp \ delimitedlangelem.cpp langelemsprinter.cpp \ namedsubexpslangelem.cpp stringdef.cpp \ highlightrule.cpp highlighttoken.cpp \ highlightstate.cpp highlightrulefactory.cpp highlightstateprinter.cpp \ sourcehighlighter.cpp sourcefilehighlighter.cpp \ linenumgenerator.cpp lineranges.cpp regexranges.cpp \ formatter.cpp formattermanager.cpp \ textstyle.cpp textstyleformatter.cpp bufferedoutput.cpp \ preformatter.cpp wordtokenizer.cpp ctagscollector.cpp readtags.c ctagsformatter.cpp \ srcuntabifier.cpp textstyleformatterfactory.cpp \ docgenerator.cc doctemplate.cpp chartranslator.cc \ textstylebuilder.cpp fileinfo.cpp ctagsmanager.cpp \ regexhighlightrule.cpp regexrulefactory.cpp \ regexpreprocessor.cpp \ highlightstatebuilder.cpp \ highlightbuilderexception.cpp langdefmanager.cpp \ $$PWD/langdefparser.cc $$PWD/langdefscanner.cc \ languageinfer.cpp \ parserexception.cpp \ stringtable.cpp vardefinitions.cpp \ sourcehighlightutils.cpp \ instances.cpp \ langelemsprinter_dbtab.cc \ highlightstatebuilder_dbtab.cc contains(COMPILER, msvc) { # custom implementation of dirent.h functions SOURCES += ../compat/compat_dirent.cpp INCLUDEPATH += ../compat DEPENDPATH += ../compat } DESTDIR = ../../lib target.path = /lib headers.files = $$HEADERS headers.path = /include/srchilite INSTALLS += target headers ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/highlightstate.h�����������������������������������������������0000644�0001750�0001750�00000012753�11672675563�017656� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2008 // // Copyright: See COPYING file that comes with this distribution // #ifndef HIGHLIGHTSTATE_H_ #define HIGHLIGHTSTATE_H_ #include <deque> #include <vector> #include <string> #include <boost/shared_ptr.hpp> namespace srchilite { class HighlightRule; struct HighlightToken; struct MatchingParameters; /** * Shared pointer for HighlightRule. * * We need to use shared pointers because if we need to substitute some variables * in a rule, we need to create a brand new copy of it, while we keep on using * the same rules that do not need substitutions. Using shared pointers will * automatically keep track of those that need to be removed. */ typedef boost::shared_ptr<HighlightRule> HighlightRulePtr; /// List of rules. typedef std::deque<HighlightRulePtr> RuleList; /// the values for replacing references (it should contain 9 possibly empty elements, because /// 9 is usually the limit for backreferences in regular expressions) typedef std::vector<std::string> ReplacementList; class HighlightState; /// the reference to an HighlightState typedef boost::shared_ptr<HighlightState> HighlightStatePtr; /** * Represents a state during the highlighting (e.g., comment state, * string state, etc.) */ class HighlightState { /// the global counter to assign unique state ids static unsigned int global_id; /// the identifier of the state const unsigned int id; /// the name of the element for strings when no rule matches (default: "normal") /// for states this should always be "normal" while for environments it should /// be the same element that represents the new state (e.g., "comment", "string", etc.) std::string defaultElement; /// the list of rules of this state RuleList ruleList; /// whether one of the contained rules has dynamic references to be replaced bool needsReferenceReplacement; /** * In case this state is a copy of another state, in this field we * store the original state */ HighlightStatePtr originalState; public: /** * @param e the element for strings when no rule matches (default: "normal") */ HighlightState(const std::string &e = "normal"); /** * Copies all the elements of the highlight state, except for the id: a new * id will be used. * @param copy */ HighlightState(const HighlightState &copy); ~HighlightState(); /** * Adss a rule to this state * @param rule the rule to add at the end of the list */ void addRule(HighlightRulePtr rule); /** * Substitutes the rule at the specified position. The rule must exit at the * specified position. * @param index * @param rule the new rule * @return the old rule */ HighlightRulePtr replaceRule(RuleList::size_type index, HighlightRulePtr rule); unsigned int getId() const { return id; } const RuleList &getRuleList() const { return ruleList; } const std::string &getDefaultElement() const { return defaultElement; } void setDefaultElement(const std::string &e) { defaultElement = e; } /** * Tries to find the rule that matches best (and first): the first rule with * the smallest prefix and longest matching sequence * @param s the string for trying to match the rule * @param token where results will be inserted, if the rule matched * @param params additional arguments for the matching * @return whether a matching rule was found */ bool findBestMatch(const std::string &s, HighlightToken &token, const MatchingParameters &params) const; /** * Tries to find the rule that matches best (and first): the first rule with * the smallest prefix and longest matching sequence * @param start the beginning of the string for trying to match the rule * @param end the beginning of the string for trying to match the rule * @param token where results will be inserted, if the rule matched * @param params additional arguments for the matching * @return whether a matching rule was found */ bool findBestMatch(std::string::const_iterator start, std::string::const_iterator end, HighlightToken &token, const MatchingParameters &params) const; /** * Whether t1 is better than t2: t1 has a non-longer prefix and a longer matching string * (this makes sense only if a string was matched, and in fact this should be used * only after having matched something) * @param t1 * @param t2 * @return */ static bool betterThan(const HighlightToken &t1, const HighlightToken &t2); /** * Performs replacement of references in the rules of this state. * For each rule that needs replacement, it creates a copy of the rule. * @param the list of values for the replacement; the first element * is the value for replacing the first dynamic back reference, and so on. * (it should contain 9 possibly empty elements) */ void replaceReferences(const ReplacementList &rep); bool getNeedsReferenceReplacement() const { return needsReferenceReplacement; } void setNeedsReferenceReplacement(bool b = true) { needsReferenceReplacement = b; } HighlightStatePtr getOriginalState() const { return originalState; } void setOriginalState(HighlightStatePtr orig) { originalState = orig; } }; } #endif /*HIGHLIGHTSTATE_H_*/ ���������������������source-highlight-3.1.6/lib/srchilite/highlightrule.h������������������������������������������������0000644�0001750�0001750�00000011113�11672675563�017472� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2008 // // Copyright: See COPYING file that comes with this distribution // #ifndef HIGHLIGHTRULE_H_ #define HIGHLIGHTRULE_H_ #include <string> #include <boost/shared_ptr.hpp> #include "highlightstate.h" namespace srchilite { struct HighlightToken; struct MatchingParameters; /// list representing the names of parts of a program typedef std::deque<std::string> ElemList; /** * Base class for highlight rules. This abstracts from the actual * implementation for matching. */ class HighlightRule { /// the list of program elements detected by this rule ElemList elemList; /// if set, it represents the state to enter if this rule matches /// this class does not delete nextState HighlightStatePtr nextState; /// additional information about this rule std::string additionalInfo; /// how many state must we exit if we match this rule: /// 0: none, -1: all, otherwise the number of states to exit int exitLevel; /// tells that if this rule matches we must enter the same state once again bool nested; /// whether this rule has dynamic references to be replaced bool needsReferenceReplacement; /// whether this rule can match subexpressions bool hasSubexpressions; public: HighlightRule(); /** * Creates a rule for the given element (Although each rule can concern * more than one program element, we provide only this convenience constructor with * only one name: if the rule concerns more than one element one can use * addElem method) * @param name the element name of this rule */ HighlightRule(const std::string &name); virtual ~HighlightRule(); /** * Try to match this rule against the passed string (implemented by calling * the pure virtual function tryToMatch below). The passed token is assumed to be * reset (i.e., no existing matching information is stored in it when passing it to * this method). * * @param s the string for trying to match the rule * @param token where results will be inserted, if the rule matched * @param params additional arguments for the matching * @return the result of this matching */ virtual bool tryToMatch(const std::string &s, HighlightToken &token, const MatchingParameters &params); /** * Try to match this rule against the passed string * * @param start the beginning of the string for trying to match the rule * @param end the beginning of the string for trying to match the rule * @param token where results will be inserted, if the rule matched * @param params additional arguments for the matching * @return the result of this matching */ virtual bool tryToMatch(std::string::const_iterator start, std::string::const_iterator end, HighlightToken &token, const MatchingParameters &params) = 0; virtual const std::string toString() const = 0; /** * Performs replacement of references in this rule. * @param the list of values for the replacement; the first element * is the value for replacing the first dynamic back reference, and so on. * (it should contain 9 possibly empty elements) */ virtual void replaceReferences(const ReplacementList &rep) = 0; /** * @return a copy of this rule. */ virtual HighlightRule *clone() = 0; const HighlightStatePtr getNextState() const { return nextState; } void setNextState(HighlightStatePtr _nextState) { nextState = _nextState; } /** * Adds an element name to the list of this rule * @param name the name to add */ void addElem(const std::string &name); const ElemList &getElemList() const { return elemList; } int getExitLevel() const { return exitLevel; } void setExitLevel(int l) { exitLevel = l; } bool isNested() const { return nested; } void setNested(bool n) { nested = n; } bool getNeedsReferenceReplacement() const { return needsReferenceReplacement; } void setNeedsReferenceReplacement(bool b = true) { needsReferenceReplacement = b; } bool getHasSubexpressions() const { return hasSubexpressions; } void setHasSubexpressions(bool b = true) { hasSubexpressions = b; } std::string getAdditionalInfo() const { return additionalInfo; } void setAdditionalInfo(const std::string &info) { additionalInfo = info; } }; } #endif /*HIGHLIGHTRULE_H_*/ �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/langdefparser.cc�����������������������������������������������0000644�0001750�0001750�00000203563�11675044735�017614� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������ /* A Bison parser, made by GNU Bison 2.4.1. */ /* Skeleton implementation for Bison's Yacc-like parsers in C Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work under terms of your choice, so long as that work isn't itself a parser generator using the skeleton or a modified version thereof as a parser skeleton. Alternatively, if you modify or redistribute the parser skeleton itself, you may (at your option) remove this special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ /* C LALR(1) parser skeleton written by Richard Stallman, by simplifying the original so-called "semantic" parser. */ /* All symbols defined below should begin with yy or YY, to avoid infringing on user name space. This should be done even for local variables, as they might otherwise be expanded by user macros. There are some unavoidable exceptions within include files to define necessary library symbols; they are noted "INFRINGES ON USER NAME SPACE" below. */ /* Identify Bison output. */ #define YYBISON 1 /* Bison version. */ #define YYBISON_VERSION "2.4.1" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" /* Pure parsers. */ #define YYPURE 0 /* Push parsers. */ #define YYPUSH 0 /* Pull parsers. */ #define YYPULL 1 /* Using locations. */ #define YYLSP_NEEDED 1 /* Substitute the variable and function names. */ #define yyparse langdef_parse #define yylex langdef_lex #define yyerror langdef_error #define yylval langdef_lval #define yychar langdef_char #define yydebug langdef_debug #define yynerrs langdef_nerrs #define yylloc langdef_lloc /* Copy the first part of user declarations. */ /* Line 189 of yacc.c */ #line 1 "../../../lib/srchilite/langdefparser.yy" /* * Copyright (C) 1999-2009 Lorenzo Bettini <http://www.lorenzobettini.it> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <iostream> #include <string> #include "stringdef.h" #include "statelangelem.h" #include "statestartlangelem.h" #include "stringlistlangelem.h" #include "delimitedlangelem.h" #include "langelems.h" #include "langdefparserfun.h" #include "langdefscanner.h" #include "vardefinitions.h" #include "namedsubexpslangelem.h" #include "parserexception.h" #include "ioexception.h" using std::cerr; using std::string; using namespace srchilite; extern int langdef_lex() ; extern FILE *langdef_in; extern ParseStructPtr parsestruct; static void yyerror( const char *s ) ; static void yyerror( const string &s ) ; /// the buffer for storing errors static string errorBuffer; /// this is where the parsed elements are store LangElems *current_lang_elems = 0; VarDefinitions *vardefinitions = 0; /// used to record that the error is due to an included file not found static bool includedFileNotFound = false; #define UPDATE_REDEF(el, r) if (r == 1) { el->setRedef(); } else if (r == 2) { el->setSubst(); } #define ADD_ELEMENT(elems, elem) \ if (elem) { \ if (elem->isRedef()) \ elems->redef(elem); \ else if (elem->isSubst()) \ elems->subst(elem); \ else \ elems->add(elem); \ } struct Key : public ParserInfo { const string *key; ~Key() { /* the string belongs to the string table so it is deallocated automatically by clearing the scanner */ } }; // this is a trick since ElementNames is a typedef and cannot // be used in the union below struct ElementNamesList : ElementNames { }; /* Line 189 of yacc.c */ #line 172 "../../../lib/srchilite/langdefparser.cc" /* Enabling traces. */ #ifndef YYDEBUG # define YYDEBUG 0 #endif /* Enabling verbose error messages. */ #ifdef YYERROR_VERBOSE # undef YYERROR_VERBOSE # define YYERROR_VERBOSE 1 #else # define YYERROR_VERBOSE 0 #endif /* Enabling the token table. */ #ifndef YYTOKEN_TABLE # define YYTOKEN_TABLE 0 #endif /* Tokens. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE /* Put the tokens into the symbol table, so that GDB and other debuggers know about them. */ enum yytokentype { BEGIN_T = 258, END_T = 259, ENVIRONMENT_T = 260, STATE_T = 261, MULTILINE_T = 262, DELIM_T = 263, START_T = 264, ESCAPE_T = 265, NESTED_T = 266, EXIT_ALL = 267, EXIT_T = 268, VARDEF_T = 269, REDEF_T = 270, SUBST_T = 271, NONSENSITIVE_T = 272, WRONG_BACKREFERENCE = 273, LEVEL = 274, KEY = 275, STRINGDEF = 276, REGEXPNOPREPROC = 277, VARUSE = 278, BACKREFVAR = 279, WRONG_INCLUDE_FILE = 280, REGEXPDEF = 281 }; #endif /* Tokens. */ #define BEGIN_T 258 #define END_T 259 #define ENVIRONMENT_T 260 #define STATE_T 261 #define MULTILINE_T 262 #define DELIM_T 263 #define START_T 264 #define ESCAPE_T 265 #define NESTED_T 266 #define EXIT_ALL 267 #define EXIT_T 268 #define VARDEF_T 269 #define REDEF_T 270 #define SUBST_T 271 #define NONSENSITIVE_T 272 #define WRONG_BACKREFERENCE 273 #define LEVEL 274 #define KEY 275 #define STRINGDEF 276 #define REGEXPNOPREPROC 277 #define VARUSE 278 #define BACKREFVAR 279 #define WRONG_INCLUDE_FILE 280 #define REGEXPDEF 281 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE { /* Line 214 of yacc.c */ #line 91 "../../../lib/srchilite/langdefparser.yy" int tok ; /* command */ bool booloption ; const std::string * string ; /* string : id, ... */ class srchilite::StringDef *stringdef; class StringDefs *stringdefs; class LangElem *langelem; class StateLangElem *statelangelem; class StateStartLangElem *statestartlangelem; class LangElems *langelems; class NamedSubExpsLangElem *namedsubexpslangelem; struct Key *key; struct ElementNamesList *keys; int flag ; unsigned int level; /* Line 214 of yacc.c */ #line 279 "../../../lib/srchilite/langdefparser.cc" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 #endif #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED typedef struct YYLTYPE { int first_line; int first_column; int last_line; int last_column; } YYLTYPE; # define yyltype YYLTYPE /* obsolescent; will be withdrawn */ # define YYLTYPE_IS_DECLARED 1 # define YYLTYPE_IS_TRIVIAL 1 #endif /* Copy the second part of user declarations. */ /* Line 264 of yacc.c */ #line 304 "../../../lib/srchilite/langdefparser.cc" #ifdef short # undef short #endif #ifdef YYTYPE_UINT8 typedef YYTYPE_UINT8 yytype_uint8; #else typedef unsigned char yytype_uint8; #endif #ifdef YYTYPE_INT8 typedef YYTYPE_INT8 yytype_int8; #elif (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) typedef signed char yytype_int8; #else typedef short int yytype_int8; #endif #ifdef YYTYPE_UINT16 typedef YYTYPE_UINT16 yytype_uint16; #else typedef unsigned short int yytype_uint16; #endif #ifdef YYTYPE_INT16 typedef YYTYPE_INT16 yytype_int16; #else typedef short int yytype_int16; #endif #ifndef YYSIZE_T # ifdef __SIZE_TYPE__ # define YYSIZE_T __SIZE_TYPE__ # elif defined size_t # define YYSIZE_T size_t # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # else # define YYSIZE_T unsigned int # endif #endif #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) #ifndef YY_ # if YYENABLE_NLS # if ENABLE_NLS # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ # define YY_(msgid) dgettext ("bison-runtime", msgid) # endif # endif # ifndef YY_ # define YY_(msgid) msgid # endif #endif /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ # define YYUSE(e) ((void) (e)) #else # define YYUSE(e) /* empty */ #endif /* Identity function, used to suppress warnings about constant conditions. */ #ifndef lint # define YYID(n) (n) #else #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static int YYID (int yyi) #else static int YYID (yyi) int yyi; #endif { return yyi; } #endif #if ! defined yyoverflow || YYERROR_VERBOSE /* The parser invokes alloca or malloc; define the necessary symbols. */ # ifdef YYSTACK_USE_ALLOCA # if YYSTACK_USE_ALLOCA # ifdef __GNUC__ # define YYSTACK_ALLOC __builtin_alloca # elif defined __BUILTIN_VA_ARG_INCR # include <alloca.h> /* INFRINGES ON USER NAME SPACE */ # elif defined _AIX # define YYSTACK_ALLOC __alloca # elif defined _MSC_VER # include <malloc.h> /* INFRINGES ON USER NAME SPACE */ # define alloca _alloca # else # define YYSTACK_ALLOC alloca # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ # ifndef _STDLIB_H # define _STDLIB_H 1 # endif # endif # endif # endif # endif # ifdef YYSTACK_ALLOC /* Pacify GCC's `empty if-body' warning. */ # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) # ifndef YYSTACK_ALLOC_MAXIMUM /* The OS might guarantee only one guard page at the bottom of the stack, and a page size can be as small as 4096 bytes. So we cannot safely invoke alloca (N) if N exceeds 4096. Use a slightly smaller number to allow for a few compiler-allocated temporary stack slots. */ # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ # endif # else # define YYSTACK_ALLOC YYMALLOC # define YYSTACK_FREE YYFREE # ifndef YYSTACK_ALLOC_MAXIMUM # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM # endif # if (defined __cplusplus && ! defined _STDLIB_H \ && ! ((defined YYMALLOC || defined malloc) \ && (defined YYFREE || defined free))) # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ # ifndef _STDLIB_H # define _STDLIB_H 1 # endif # endif # ifndef YYMALLOC # define YYMALLOC malloc # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ # endif # endif # ifndef YYFREE # define YYFREE free # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif # endif # endif #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ #if (! defined yyoverflow \ && (! defined __cplusplus \ || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \ && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc { yytype_int16 yyss_alloc; YYSTYPE yyvs_alloc; YYLTYPE yyls_alloc; }; /* The size of the maximum gap between one aligned stack and the next. */ # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) /* The size of an array large to enough to hold all stacks, each with N elements. */ # define YYSTACK_BYTES(N) \ ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \ + 2 * YYSTACK_GAP_MAXIMUM) /* Copy COUNT objects from FROM to TO. The source and destination do not overlap. */ # ifndef YYCOPY # if defined __GNUC__ && 1 < __GNUC__ # define YYCOPY(To, From, Count) \ __builtin_memcpy (To, From, (Count) * sizeof (*(From))) # else # define YYCOPY(To, From, Count) \ do \ { \ YYSIZE_T yyi; \ for (yyi = 0; yyi < (Count); yyi++) \ (To)[yyi] = (From)[yyi]; \ } \ while (YYID (0)) # endif # endif /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ do \ { \ YYSIZE_T yynewbytes; \ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ Stack = &yyptr->Stack_alloc; \ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ while (YYID (0)) #endif /* YYFINAL -- State number of the termination state. */ #define YYFINAL 10 /* YYLAST -- Last index in YYTABLE. */ #define YYLAST 81 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 32 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 18 /* YYNRULES -- Number of rules. */ #define YYNRULES 49 /* YYNRULES -- Number of states. */ #define YYNSTATES 71 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 #define YYMAXUTOK 281 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ static const yytype_uint8 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 28, 29, 2, 31, 30, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 27, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26 }; #if YYDEBUG /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in YYRHS. */ static const yytype_uint8 yyprhs[] = { 0, 0, 3, 4, 6, 9, 11, 15, 22, 27, 29, 37, 41, 46, 52, 54, 58, 60, 63, 64, 66, 69, 70, 72, 73, 75, 77, 79, 80, 82, 84, 85, 87, 88, 90, 91, 95, 97, 99, 101, 103, 105, 107, 111, 113, 115, 117, 119, 121, 125 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ static const yytype_int8 yyrhs[] = { 33, 0, -1, -1, 34, -1, 34, 35, -1, 35, -1, 44, 36, 40, -1, 44, 42, 36, 3, 34, 4, -1, 14, 20, 27, 47, -1, 25, -1, 37, 8, 49, 48, 39, 43, 45, -1, 37, 9, 49, -1, 37, 27, 47, 46, -1, 28, 38, 29, 27, 22, -1, 20, -1, 38, 30, 20, -1, 20, -1, 10, 49, -1, -1, 12, -1, 13, 41, -1, -1, 19, -1, -1, 5, -1, 6, -1, 7, -1, -1, 15, -1, 16, -1, -1, 11, -1, -1, 17, -1, -1, 47, 30, 49, -1, 49, -1, 26, -1, 21, -1, 22, -1, 23, -1, 24, -1, 48, 31, 48, -1, 18, -1, 26, -1, 21, -1, 22, -1, 23, -1, 49, 31, 49, -1, 18, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { 0, 134, 134, 143, 146, 150, 156, 165, 173, 177, 188, 195, 200, 206, 212, 219, 224, 231, 232, 235, 236, 237, 240, 241, 244, 245, 248, 249, 252, 253, 254, 257, 258, 261, 262, 265, 266, 271, 274, 277, 280, 287, 291, 296, 306, 309, 312, 315, 322, 327 }; #endif #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { "$end", "error", "$undefined", "BEGIN_T", "END_T", "ENVIRONMENT_T", "STATE_T", "MULTILINE_T", "DELIM_T", "START_T", "ESCAPE_T", "NESTED_T", "EXIT_ALL", "EXIT_T", "VARDEF_T", "REDEF_T", "SUBST_T", "NONSENSITIVE_T", "WRONG_BACKREFERENCE", "LEVEL", "KEY", "STRINGDEF", "REGEXPNOPREPROC", "VARUSE", "BACKREFVAR", "WRONG_INCLUDE_FILE", "REGEXPDEF", "'='", "'('", "')'", "','", "'+'", "$accept", "allelements", "elemdefs", "elemdef", "complexelem", "key", "keys", "escapedef", "exitlevel", "level", "startnewenv", "multiline", "redefsubst", "nested", "nonsensitive", "stringdefs", "stringdefwreferences", "stringdef", 0 }; #endif # ifdef YYPRINT /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to token YYLEX-NUM. */ static const yytype_uint16 yytoknum[] = { 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 61, 40, 41, 44, 43 }; # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_uint8 yyr1[] = { 0, 32, 33, 33, 34, 34, 35, 35, 35, 35, 36, 36, 36, 36, 37, 38, 38, 39, 39, 40, 40, 40, 41, 41, 42, 42, 43, 43, 44, 44, 44, 45, 45, 46, 46, 47, 47, 48, 48, 48, 48, 48, 48, 48, 49, 49, 49, 49, 49, 49 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ static const yytype_uint8 yyr2[] = { 0, 2, 0, 1, 2, 1, 3, 6, 4, 1, 7, 3, 4, 5, 1, 3, 1, 2, 0, 1, 2, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 3, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 3, 1 }; /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state STATE-NUM when YYTABLE doesn't specify something else to do. Zero means the default is an error. */ static const yytype_uint8 yydefact[] = { 30, 0, 28, 29, 9, 0, 30, 5, 0, 0, 1, 4, 24, 25, 14, 0, 21, 0, 0, 0, 16, 0, 19, 23, 6, 0, 0, 0, 0, 49, 45, 46, 47, 44, 8, 36, 0, 0, 22, 20, 0, 11, 34, 30, 0, 0, 0, 15, 43, 38, 39, 40, 41, 37, 18, 33, 12, 30, 35, 48, 13, 0, 0, 27, 7, 17, 42, 26, 32, 31, 10 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int8 yydefgoto[] = { -1, 5, 6, 7, 16, 17, 21, 63, 24, 39, 18, 68, 8, 70, 56, 34, 54, 35 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ #define YYPACT_NINF -25 static const yytype_int8 yypact[] = { 3, -13, -25, -25, -25, 31, 8, -25, 6, 11, -25, -25, -25, -25, -25, 23, -3, 21, -15, 50, -25, 17, -25, 16, -25, 50, 50, 50, 47, -25, -25, -25, -25, -25, 25, 26, 29, 39, -25, -25, 18, 26, 15, 38, 50, 50, 36, -25, -25, -25, -25, -25, -25, -25, -4, -25, -25, 0, 26, 26, -25, 50, 43, 53, -25, 26, 44, -25, 51, -25, -25 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int8 yypgoto[] = { -25, -25, 27, -6, 56, -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, 52, 19, -24 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule which number is the opposite. If zero, do what YYDEFACT says. If YYTABLE_NINF, syntax error. */ #define YYTABLE_NINF -4 static const yytype_int8 yytable[] = { 11, 40, 41, -2, 64, 14, 61, 9, -3, 22, 23, 12, 13, 15, 1, 2, 3, 1, 2, 3, 58, 59, 1, 2, 3, 4, 14, 62, 4, 25, 26, 10, 55, 4, 15, 38, 48, 65, 19, 49, 50, 51, 52, 20, 53, 44, 36, 37, 27, 45, 43, 11, 1, 2, 3, 44, 46, 45, 60, 47, 67, 48, 69, 4, 49, 50, 51, 52, 29, 53, 57, 30, 31, 32, 28, 62, 33, 0, 0, 42, 0, 66 }; static const yytype_int8 yycheck[] = { 6, 25, 26, 0, 4, 20, 10, 20, 0, 12, 13, 5, 6, 28, 14, 15, 16, 14, 15, 16, 44, 45, 14, 15, 16, 25, 20, 31, 25, 8, 9, 0, 17, 25, 28, 19, 18, 61, 27, 21, 22, 23, 24, 20, 26, 30, 29, 30, 27, 31, 3, 57, 14, 15, 16, 30, 27, 31, 22, 20, 7, 18, 11, 25, 21, 22, 23, 24, 18, 26, 43, 21, 22, 23, 18, 31, 26, -1, -1, 27, -1, 62 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { 0, 14, 15, 16, 25, 33, 34, 35, 44, 20, 0, 35, 5, 6, 20, 28, 36, 37, 42, 27, 20, 38, 12, 13, 40, 8, 9, 27, 36, 18, 21, 22, 23, 26, 47, 49, 29, 30, 19, 41, 49, 49, 47, 3, 30, 31, 27, 20, 18, 21, 22, 23, 24, 26, 48, 17, 46, 34, 49, 49, 22, 10, 31, 39, 4, 49, 48, 7, 43, 11, 45 }; #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) #define YYEMPTY (-2) #define YYEOF 0 #define YYACCEPT goto yyacceptlab #define YYABORT goto yyabortlab #define YYERROR goto yyerrorlab /* Like YYERROR except do call yyerror. This remains here temporarily to ease the transition to the new meaning of YYERROR, for GCC. Once GCC version 2 has supplanted version 1, this can go. */ #define YYFAIL goto yyerrlab #define YYRECOVERING() (!!yyerrstatus) #define YYBACKUP(Token, Value) \ do \ if (yychar == YYEMPTY && yylen == 1) \ { \ yychar = (Token); \ yylval = (Value); \ yytoken = YYTRANSLATE (yychar); \ YYPOPSTACK (1); \ goto yybackup; \ } \ else \ { \ yyerror (YY_("syntax error: cannot back up")); \ YYERROR; \ } \ while (YYID (0)) #define YYTERROR 1 #define YYERRCODE 256 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. If N is 0, then set CURRENT to the empty location which ends the previous symbol: RHS[0] (always defined). */ #define YYRHSLOC(Rhs, K) ((Rhs)[K]) #ifndef YYLLOC_DEFAULT # define YYLLOC_DEFAULT(Current, Rhs, N) \ do \ if (YYID (N)) \ { \ (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ } \ else \ { \ (Current).first_line = (Current).last_line = \ YYRHSLOC (Rhs, 0).last_line; \ (Current).first_column = (Current).last_column = \ YYRHSLOC (Rhs, 0).last_column; \ } \ while (YYID (0)) #endif /* YY_LOCATION_PRINT -- Print the location on the stream. This macro was not mandated originally: define only if we know we won't break user code: when these are the locations we know. */ #ifndef YY_LOCATION_PRINT # if YYLTYPE_IS_TRIVIAL # define YY_LOCATION_PRINT(File, Loc) \ fprintf (File, "%d.%d-%d.%d", \ (Loc).first_line, (Loc).first_column, \ (Loc).last_line, (Loc).last_column) # else # define YY_LOCATION_PRINT(File, Loc) ((void) 0) # endif #endif /* YYLEX -- calling `yylex' with the right arguments. */ #ifdef YYLEX_PARAM # define YYLEX yylex (YYLEX_PARAM) #else # define YYLEX yylex () #endif /* Enable debugging if requested. */ #if YYDEBUG # ifndef YYFPRINTF # include <stdio.h> /* INFRINGES ON USER NAME SPACE */ # define YYFPRINTF fprintf # endif # define YYDPRINTF(Args) \ do { \ if (yydebug) \ YYFPRINTF Args; \ } while (YYID (0)) # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ do { \ if (yydebug) \ { \ YYFPRINTF (stderr, "%s ", Title); \ yy_symbol_print (stderr, \ Type, Value, Location); \ YYFPRINTF (stderr, "\n"); \ } \ } while (YYID (0)) /*--------------------------------. | Print this symbol on YYOUTPUT. | `--------------------------------*/ /*ARGSUSED*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp) #else static void yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp) FILE *yyoutput; int yytype; YYSTYPE const * const yyvaluep; YYLTYPE const * const yylocationp; #endif { if (!yyvaluep) return; YYUSE (yylocationp); # ifdef YYPRINT if (yytype < YYNTOKENS) YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); # else YYUSE (yyoutput); # endif switch (yytype) { default: break; } } /*--------------------------------. | Print this symbol on YYOUTPUT. | `--------------------------------*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp) #else static void yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp) FILE *yyoutput; int yytype; YYSTYPE const * const yyvaluep; YYLTYPE const * const yylocationp; #endif { if (yytype < YYNTOKENS) YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); else YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); YY_LOCATION_PRINT (yyoutput, *yylocationp); YYFPRINTF (yyoutput, ": "); yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp); YYFPRINTF (yyoutput, ")"); } /*------------------------------------------------------------------. | yy_stack_print -- Print the state stack from its BOTTOM up to its | | TOP (included). | `------------------------------------------------------------------*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) #else static void yy_stack_print (yybottom, yytop) yytype_int16 *yybottom; yytype_int16 *yytop; #endif { YYFPRINTF (stderr, "Stack now"); for (; yybottom <= yytop; yybottom++) { int yybot = *yybottom; YYFPRINTF (stderr, " %d", yybot); } YYFPRINTF (stderr, "\n"); } # define YY_STACK_PRINT(Bottom, Top) \ do { \ if (yydebug) \ yy_stack_print ((Bottom), (Top)); \ } while (YYID (0)) /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_reduce_print (YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule) #else static void yy_reduce_print (yyvsp, yylsp, yyrule) YYSTYPE *yyvsp; YYLTYPE *yylsp; int yyrule; #endif { int yynrhs = yyr2[yyrule]; int yyi; unsigned long int yylno = yyrline[yyrule]; YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", yyrule - 1, yylno); /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { YYFPRINTF (stderr, " $%d = ", yyi + 1); yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], &(yyvsp[(yyi + 1) - (yynrhs)]) , &(yylsp[(yyi + 1) - (yynrhs)]) ); YYFPRINTF (stderr, "\n"); } } # define YY_REDUCE_PRINT(Rule) \ do { \ if (yydebug) \ yy_reduce_print (yyvsp, yylsp, Rule); \ } while (YYID (0)) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ # define YYDPRINTF(Args) # define YY_SYMBOL_PRINT(Title, Type, Value, Location) # define YY_STACK_PRINT(Bottom, Top) # define YY_REDUCE_PRINT(Rule) #endif /* !YYDEBUG */ /* YYINITDEPTH -- initial size of the parser's stacks. */ #ifndef YYINITDEPTH # define YYINITDEPTH 200 #endif /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only if the built-in stack extension method is used). Do not make this value too large; the results are undefined if YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) evaluated with infinite-precision integer arithmetic. */ #ifndef YYMAXDEPTH # define YYMAXDEPTH 10000 #endif #if YYERROR_VERBOSE # ifndef yystrlen # if defined __GLIBC__ && defined _STRING_H # define yystrlen strlen # else /* Return the length of YYSTR. */ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static YYSIZE_T yystrlen (const char *yystr) #else static YYSIZE_T yystrlen (yystr) const char *yystr; #endif { YYSIZE_T yylen; for (yylen = 0; yystr[yylen]; yylen++) continue; return yylen; } # endif # endif # ifndef yystpcpy # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE # define yystpcpy stpcpy # else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static char * yystpcpy (char *yydest, const char *yysrc) #else static char * yystpcpy (yydest, yysrc) char *yydest; const char *yysrc; #endif { char *yyd = yydest; const char *yys = yysrc; while ((*yyd++ = *yys++) != '\0') continue; return yyd - 1; } # endif # endif # ifndef yytnamerr /* Copy to YYRES the contents of YYSTR after stripping away unnecessary quotes and backslashes, so that it's suitable for yyerror. The heuristic is that double-quoting is unnecessary unless the string contains an apostrophe, a comma, or backslash (other than backslash-backslash). YYSTR is taken from yytname. If YYRES is null, do not copy; instead, return the length of what the result would have been. */ static YYSIZE_T yytnamerr (char *yyres, const char *yystr) { if (*yystr == '"') { YYSIZE_T yyn = 0; char const *yyp = yystr; for (;;) switch (*++yyp) { case '\'': case ',': goto do_not_strip_quotes; case '\\': if (*++yyp != '\\') goto do_not_strip_quotes; /* Fall through. */ default: if (yyres) yyres[yyn] = *yyp; yyn++; break; case '"': if (yyres) yyres[yyn] = '\0'; return yyn; } do_not_strip_quotes: ; } if (! yyres) return yystrlen (yystr); return yystpcpy (yyres, yystr) - yyres; } # endif /* Copy into YYRESULT an error message about the unexpected token YYCHAR while in state YYSTATE. Return the number of bytes copied, including the terminating null byte. If YYRESULT is null, do not copy anything; just return the number of bytes that would be copied. As a special case, return 0 if an ordinary "syntax error" message will do. Return YYSIZE_MAXIMUM if overflow occurs during size calculation. */ static YYSIZE_T yysyntax_error (char *yyresult, int yystate, int yychar) { int yyn = yypact[yystate]; if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) return 0; else { int yytype = YYTRANSLATE (yychar); YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); YYSIZE_T yysize = yysize0; YYSIZE_T yysize1; int yysize_overflow = 0; enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; int yyx; # if 0 /* This is so xgettext sees the translatable formats that are constructed on the fly. */ YY_("syntax error, unexpected %s"); YY_("syntax error, unexpected %s, expecting %s"); YY_("syntax error, unexpected %s, expecting %s or %s"); YY_("syntax error, unexpected %s, expecting %s or %s or %s"); YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); # endif char *yyfmt; char const *yyf; static char const yyunexpected[] = "syntax error, unexpected %s"; static char const yyexpecting[] = ", expecting %s"; static char const yyor[] = " or %s"; char yyformat[sizeof yyunexpected + sizeof yyexpecting - 1 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) * (sizeof yyor - 1))]; char const *yyprefix = yyexpecting; /* Start YYX at -YYN if negative to avoid negative indexes in YYCHECK. */ int yyxbegin = yyn < 0 ? -yyn : 0; /* Stay within bounds of both yycheck and yytname. */ int yychecklim = YYLAST - yyn + 1; int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; int yycount = 1; yyarg[0] = yytname[yytype]; yyfmt = yystpcpy (yyformat, yyunexpected); for (yyx = yyxbegin; yyx < yyxend; ++yyx) if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) { if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) { yycount = 1; yysize = yysize0; yyformat[sizeof yyunexpected - 1] = '\0'; break; } yyarg[yycount++] = yytname[yyx]; yysize1 = yysize + yytnamerr (0, yytname[yyx]); yysize_overflow |= (yysize1 < yysize); yysize = yysize1; yyfmt = yystpcpy (yyfmt, yyprefix); yyprefix = yyor; } yyf = YY_(yyformat); yysize1 = yysize + yystrlen (yyf); yysize_overflow |= (yysize1 < yysize); yysize = yysize1; if (yysize_overflow) return YYSIZE_MAXIMUM; if (yyresult) { /* Avoid sprintf, as that infringes on the user's name space. Don't have undefined behavior even if the translation produced a string with the wrong number of "%s"s. */ char *yyp = yyresult; int yyi = 0; while ((*yyp = *yyf) != '\0') { if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) { yyp += yytnamerr (yyp, yyarg[yyi++]); yyf += 2; } else { yyp++; yyf++; } } } return yysize; } } #endif /* YYERROR_VERBOSE */ /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ /*ARGSUSED*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp) #else static void yydestruct (yymsg, yytype, yyvaluep, yylocationp) const char *yymsg; int yytype; YYSTYPE *yyvaluep; YYLTYPE *yylocationp; #endif { YYUSE (yyvaluep); YYUSE (yylocationp); if (!yymsg) yymsg = "Deleting"; YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); switch (yytype) { case 34: /* "elemdefs" */ /* Line 1000 of yacc.c */ #line 126 "../../../lib/srchilite/langdefparser.yy" { //std::cout << "freeing discarded symbol" << std::endl; delete (yyvaluep->langelems); }; /* Line 1000 of yacc.c */ #line 1278 "../../../lib/srchilite/langdefparser.cc" break; case 35: /* "elemdef" */ /* Line 1000 of yacc.c */ #line 126 "../../../lib/srchilite/langdefparser.yy" { //std::cout << "freeing discarded symbol" << std::endl; delete (yyvaluep->langelem); }; /* Line 1000 of yacc.c */ #line 1290 "../../../lib/srchilite/langdefparser.cc" break; case 37: /* "key" */ /* Line 1000 of yacc.c */ #line 126 "../../../lib/srchilite/langdefparser.yy" { //std::cout << "freeing discarded symbol" << std::endl; delete (yyvaluep->key); }; /* Line 1000 of yacc.c */ #line 1302 "../../../lib/srchilite/langdefparser.cc" break; case 38: /* "keys" */ /* Line 1000 of yacc.c */ #line 126 "../../../lib/srchilite/langdefparser.yy" { //std::cout << "freeing discarded symbol" << std::endl; delete (yyvaluep->keys); }; /* Line 1000 of yacc.c */ #line 1314 "../../../lib/srchilite/langdefparser.cc" break; case 47: /* "stringdefs" */ /* Line 1000 of yacc.c */ #line 126 "../../../lib/srchilite/langdefparser.yy" { //std::cout << "freeing discarded symbol" << std::endl; delete (yyvaluep->stringdefs); }; /* Line 1000 of yacc.c */ #line 1326 "../../../lib/srchilite/langdefparser.cc" break; case 49: /* "stringdef" */ /* Line 1000 of yacc.c */ #line 126 "../../../lib/srchilite/langdefparser.yy" { //std::cout << "freeing discarded symbol" << std::endl; delete (yyvaluep->stringdef); }; /* Line 1000 of yacc.c */ #line 1338 "../../../lib/srchilite/langdefparser.cc" break; default: break; } } /* Prevent warnings from -Wmissing-prototypes. */ #ifdef YYPARSE_PARAM #if defined __STDC__ || defined __cplusplus int yyparse (void *YYPARSE_PARAM); #else int yyparse (); #endif #else /* ! YYPARSE_PARAM */ #if defined __STDC__ || defined __cplusplus int yyparse (void); #else int yyparse (); #endif #endif /* ! YYPARSE_PARAM */ /* The lookahead symbol. */ int yychar; /* The semantic value of the lookahead symbol. */ YYSTYPE yylval; /* Location data for the lookahead symbol. */ YYLTYPE yylloc; /* Number of syntax errors so far. */ int yynerrs; /*-------------------------. | yyparse or yypush_parse. | `-------------------------*/ #ifdef YYPARSE_PARAM #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) int yyparse (void *YYPARSE_PARAM) #else int yyparse (YYPARSE_PARAM) void *YYPARSE_PARAM; #endif #else /* ! YYPARSE_PARAM */ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) int yyparse (void) #else int yyparse () #endif #endif { int yystate; /* Number of tokens to shift before error messages enabled. */ int yyerrstatus; /* The stacks and their tools: `yyss': related to states. `yyvs': related to semantic values. `yyls': related to locations. Refer to the stacks thru separate pointers, to allow yyoverflow to reallocate them elsewhere. */ /* The state stack. */ yytype_int16 yyssa[YYINITDEPTH]; yytype_int16 *yyss; yytype_int16 *yyssp; /* The semantic value stack. */ YYSTYPE yyvsa[YYINITDEPTH]; YYSTYPE *yyvs; YYSTYPE *yyvsp; /* The location stack. */ YYLTYPE yylsa[YYINITDEPTH]; YYLTYPE *yyls; YYLTYPE *yylsp; /* The locations where the error started and ended. */ YYLTYPE yyerror_range[2]; YYSIZE_T yystacksize; int yyn; int yyresult; /* Lookahead token as an internal (translated) token number. */ int yytoken; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; YYLTYPE yyloc; #if YYERROR_VERBOSE /* Buffer for error messages, and its allocated size. */ char yymsgbuf[128]; char *yymsg = yymsgbuf; YYSIZE_T yymsg_alloc = sizeof yymsgbuf; #endif #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) /* The number of symbols on the RHS of the reduced rule. Keep to zero when no symbol should be popped. */ int yylen = 0; yytoken = 0; yyss = yyssa; yyvs = yyvsa; yyls = yylsa; yystacksize = YYINITDEPTH; YYDPRINTF ((stderr, "Starting parse\n")); yystate = 0; yyerrstatus = 0; yynerrs = 0; yychar = YYEMPTY; /* Cause a token to be read. */ /* Initialize stack pointers. Waste one element of value and location stack so that they stay on the same level as the state stack. The wasted elements are never initialized. */ yyssp = yyss; yyvsp = yyvs; yylsp = yyls; #if YYLTYPE_IS_TRIVIAL /* Initialize the default location before parsing starts. */ yylloc.first_line = yylloc.last_line = 1; yylloc.first_column = yylloc.last_column = 1; #endif goto yysetstate; /*------------------------------------------------------------. | yynewstate -- Push a new state, which is found in yystate. | `------------------------------------------------------------*/ yynewstate: /* In all cases, when you get here, the value and location stacks have just been pushed. So pushing a state here evens the stacks. */ yyssp++; yysetstate: *yyssp = yystate; if (yyss + yystacksize - 1 <= yyssp) { /* Get the current used size of the three stacks, in elements. */ YYSIZE_T yysize = yyssp - yyss + 1; #ifdef yyoverflow { /* Give user a chance to reallocate the stack. Use copies of these so that the &'s don't force the real ones into memory. */ YYSTYPE *yyvs1 = yyvs; yytype_int16 *yyss1 = yyss; YYLTYPE *yyls1 = yyls; /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. This used to be a conditional around just the two extra args, but that might be undefined if yyoverflow is a macro. */ yyoverflow (YY_("memory exhausted"), &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), &yyls1, yysize * sizeof (*yylsp), &yystacksize); yyls = yyls1; yyss = yyss1; yyvs = yyvs1; } #else /* no yyoverflow */ # ifndef YYSTACK_RELOCATE goto yyexhaustedlab; # else /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) goto yyexhaustedlab; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) yystacksize = YYMAXDEPTH; { yytype_int16 *yyss1 = yyss; union yyalloc *yyptr = (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) goto yyexhaustedlab; YYSTACK_RELOCATE (yyss_alloc, yyss); YYSTACK_RELOCATE (yyvs_alloc, yyvs); YYSTACK_RELOCATE (yyls_alloc, yyls); # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); } # endif #endif /* no yyoverflow */ yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; yylsp = yyls + yysize - 1; YYDPRINTF ((stderr, "Stack size increased to %lu\n", (unsigned long int) yystacksize)); if (yyss + yystacksize - 1 <= yyssp) YYABORT; } YYDPRINTF ((stderr, "Entering state %d\n", yystate)); if (yystate == YYFINAL) YYACCEPT; goto yybackup; /*-----------. | yybackup. | `-----------*/ yybackup: /* Do appropriate processing given the current state. Read a lookahead token if we need one and don't already have one. */ /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; if (yyn == YYPACT_NINF) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); yychar = YYLEX; } if (yychar <= YYEOF) { yychar = yytoken = YYEOF; YYDPRINTF ((stderr, "Now at end of input.\n")); } else { yytoken = YYTRANSLATE (yychar); YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); } /* If the proper action on seeing token YYTOKEN is to reduce or to detect an error, take that action. */ yyn += yytoken; if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) goto yydefault; yyn = yytable[yyn]; if (yyn <= 0) { if (yyn == 0 || yyn == YYTABLE_NINF) goto yyerrlab; yyn = -yyn; goto yyreduce; } /* Count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; /* Shift the lookahead token. */ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); /* Discard the shifted token. */ yychar = YYEMPTY; yystate = yyn; *++yyvsp = yylval; *++yylsp = yylloc; goto yynewstate; /*-----------------------------------------------------------. | yydefault -- do the default action for the current state. | `-----------------------------------------------------------*/ yydefault: yyn = yydefact[yystate]; if (yyn == 0) goto yyerrlab; goto yyreduce; /*-----------------------------. | yyreduce -- Do a reduction. | `-----------------------------*/ yyreduce: /* yyn is the number of a rule to reduce with. */ yylen = yyr2[yyn]; /* If YYLEN is nonzero, implement the default value of the action: `$$ = $1'. Otherwise, the following line sets YYVAL to garbage. This behavior is undocumented and Bison users should not rely upon it. Assigning to YYVAL unconditionally makes the parser a bit smaller, and it avoids a GCC warning that YYVAL may be used uninitialized. */ yyval = yyvsp[1-yylen]; /* Default location. */ YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); YY_REDUCE_PRINT (yyn); switch (yyn) { case 2: /* Line 1455 of yacc.c */ #line 134 "../../../lib/srchilite/langdefparser.yy" { /* no definitions (i.e., empty a .lang file with no definition) */ /* such as, default.lang */ /* synthetize a normal elem that catches everything */ current_lang_elems = new LangElems; StringDefs *defs = new StringDefs; defs->push_back (new StringDef("(?:.+)")); current_lang_elems->add(new StringListLangElem("normal", defs, false)); } break; case 3: /* Line 1455 of yacc.c */ #line 143 "../../../lib/srchilite/langdefparser.yy" { current_lang_elems = (yyvsp[(1) - (1)].langelems); } break; case 4: /* Line 1455 of yacc.c */ #line 146 "../../../lib/srchilite/langdefparser.yy" { (yyval.langelems) = (yyvsp[(1) - (2)].langelems); ADD_ELEMENT((yyval.langelems), (yyvsp[(2) - (2)].langelem)); } break; case 5: /* Line 1455 of yacc.c */ #line 150 "../../../lib/srchilite/langdefparser.yy" { (yyval.langelems) = new LangElems; ADD_ELEMENT((yyval.langelems), (yyvsp[(1) - (1)].langelem)); } break; case 6: /* Line 1455 of yacc.c */ #line 157 "../../../lib/srchilite/langdefparser.yy" { (yyval.langelem) = (yyvsp[(2) - (3)].statestartlangelem); if ((yyvsp[(3) - (3)].tok) < 0) (yyvsp[(2) - (3)].statestartlangelem)->setExitAll(); if ((yyvsp[(3) - (3)].tok) > 0) (yyvsp[(2) - (3)].statestartlangelem)->setExit((yyvsp[(3) - (3)].tok)); UPDATE_REDEF((yyvsp[(2) - (3)].statestartlangelem), (yyvsp[(1) - (3)].tok)); } break; case 7: /* Line 1455 of yacc.c */ #line 166 "../../../lib/srchilite/langdefparser.yy" { StateLangElem *statelangelem = new StateLangElem((yyvsp[(3) - (6)].statestartlangelem)->getName(), (yyvsp[(3) - (6)].statestartlangelem), (yyvsp[(5) - (6)].langelems), !(yyvsp[(2) - (6)].booloption)); (yyval.langelem) = statelangelem; (yyvsp[(3) - (6)].statestartlangelem)->setStateLangElem(statelangelem); UPDATE_REDEF((yyval.langelem), (yyvsp[(1) - (6)].tok)); } break; case 8: /* Line 1455 of yacc.c */ #line 173 "../../../lib/srchilite/langdefparser.yy" { vardefinitions->add(*(yyvsp[(2) - (4)].string), (yyvsp[(4) - (4)].stringdefs)); (yyval.langelem) = 0; } break; case 9: /* Line 1455 of yacc.c */ #line 177 "../../../lib/srchilite/langdefparser.yy" { // this token is used by the scanner to signal an error // in opening an include file includedFileNotFound = true; yyerror("cannot open include file " + *(yyvsp[(1) - (1)].string)); YYERROR; (yyval.langelem) = 0; } break; case 10: /* Line 1455 of yacc.c */ #line 189 "../../../lib/srchilite/langdefparser.yy" { (yyval.statestartlangelem) = new DelimitedLangElem(*((yyvsp[(1) - (7)].key)->key), (yyvsp[(3) - (7)].stringdef), (yyvsp[(4) - (7)].stringdef), (yyvsp[(5) - (7)].stringdef), (yyvsp[(6) - (7)].booloption), (yyvsp[(7) - (7)].booloption)); (yyval.statestartlangelem)->setParserInfo((yyvsp[(1) - (7)].key)); delete (yyvsp[(1) - (7)].key); } break; case 11: /* Line 1455 of yacc.c */ #line 195 "../../../lib/srchilite/langdefparser.yy" { (yyval.statestartlangelem) = new DelimitedLangElem(*((yyvsp[(1) - (3)].key)->key), (yyvsp[(3) - (3)].stringdef), 0, 0, false, false); (yyval.statestartlangelem)->setParserInfo((yyvsp[(1) - (3)].key)); delete (yyvsp[(1) - (3)].key); } break; case 12: /* Line 1455 of yacc.c */ #line 200 "../../../lib/srchilite/langdefparser.yy" { (yyval.statestartlangelem) = new StringListLangElem(*((yyvsp[(1) - (4)].key)->key), (yyvsp[(3) - (4)].stringdefs), (yyvsp[(4) - (4)].booloption)); (yyval.statestartlangelem)->setParserInfo((yyvsp[(1) - (4)].key)); delete (yyvsp[(1) - (4)].key); } break; case 13: /* Line 1455 of yacc.c */ #line 206 "../../../lib/srchilite/langdefparser.yy" { (yyval.statestartlangelem) = new NamedSubExpsLangElem((yyvsp[(2) - (5)].keys), new StringDef(*(yyvsp[(5) - (5)].string))); (yyval.statestartlangelem)->setParserInfo(parsestruct->file_name, (yylsp[(1) - (5)]).first_line); } break; case 14: /* Line 1455 of yacc.c */ #line 212 "../../../lib/srchilite/langdefparser.yy" { (yyval.key) = new Key; (yyval.key)->key = (yyvsp[(1) - (1)].string); (yyval.key)->setParserInfo(parsestruct->file_name, (yylsp[(1) - (1)]).first_line); } break; case 15: /* Line 1455 of yacc.c */ #line 220 "../../../lib/srchilite/langdefparser.yy" { (yyval.keys) = (yyvsp[(1) - (3)].keys); (yyval.keys)->push_back(*(yyvsp[(3) - (3)].string)); } break; case 16: /* Line 1455 of yacc.c */ #line 225 "../../../lib/srchilite/langdefparser.yy" { (yyval.keys) = new ElementNamesList; (yyval.keys)->push_back(*(yyvsp[(1) - (1)].string)); } break; case 17: /* Line 1455 of yacc.c */ #line 231 "../../../lib/srchilite/langdefparser.yy" { (yyval.stringdef) = (yyvsp[(2) - (2)].stringdef); } break; case 18: /* Line 1455 of yacc.c */ #line 232 "../../../lib/srchilite/langdefparser.yy" { (yyval.stringdef) = 0; } break; case 19: /* Line 1455 of yacc.c */ #line 235 "../../../lib/srchilite/langdefparser.yy" { (yyval.tok) = -1; } break; case 20: /* Line 1455 of yacc.c */ #line 236 "../../../lib/srchilite/langdefparser.yy" { (yyval.tok) = (yyvsp[(2) - (2)].level); } break; case 21: /* Line 1455 of yacc.c */ #line 237 "../../../lib/srchilite/langdefparser.yy" { (yyval.tok) = 0; } break; case 22: /* Line 1455 of yacc.c */ #line 240 "../../../lib/srchilite/langdefparser.yy" { (yyval.level) = (yyvsp[(1) - (1)].level); } break; case 23: /* Line 1455 of yacc.c */ #line 241 "../../../lib/srchilite/langdefparser.yy" { (yyval.level) = 1; } break; case 24: /* Line 1455 of yacc.c */ #line 244 "../../../lib/srchilite/langdefparser.yy" { (yyval.booloption) = true; } break; case 25: /* Line 1455 of yacc.c */ #line 245 "../../../lib/srchilite/langdefparser.yy" { (yyval.booloption) = false; } break; case 26: /* Line 1455 of yacc.c */ #line 248 "../../../lib/srchilite/langdefparser.yy" { (yyval.booloption) = true; } break; case 27: /* Line 1455 of yacc.c */ #line 249 "../../../lib/srchilite/langdefparser.yy" { (yyval.booloption) = false; } break; case 28: /* Line 1455 of yacc.c */ #line 252 "../../../lib/srchilite/langdefparser.yy" { (yyval.tok) = 1; } break; case 29: /* Line 1455 of yacc.c */ #line 253 "../../../lib/srchilite/langdefparser.yy" { (yyval.tok) = 2; } break; case 30: /* Line 1455 of yacc.c */ #line 254 "../../../lib/srchilite/langdefparser.yy" { (yyval.tok) = 0; } break; case 31: /* Line 1455 of yacc.c */ #line 257 "../../../lib/srchilite/langdefparser.yy" { (yyval.booloption) = true; } break; case 32: /* Line 1455 of yacc.c */ #line 258 "../../../lib/srchilite/langdefparser.yy" { (yyval.booloption) = false; } break; case 33: /* Line 1455 of yacc.c */ #line 261 "../../../lib/srchilite/langdefparser.yy" { (yyval.booloption) = true; } break; case 34: /* Line 1455 of yacc.c */ #line 262 "../../../lib/srchilite/langdefparser.yy" { (yyval.booloption) = false; } break; case 35: /* Line 1455 of yacc.c */ #line 265 "../../../lib/srchilite/langdefparser.yy" { (yyval.stringdefs) = (yyvsp[(1) - (3)].stringdefs); (yyval.stringdefs)->push_back((yyvsp[(3) - (3)].stringdef)); } break; case 36: /* Line 1455 of yacc.c */ #line 266 "../../../lib/srchilite/langdefparser.yy" { (yyval.stringdefs) = new StringDefs; (yyval.stringdefs)->push_back((yyvsp[(1) - (1)].stringdef)); } break; case 37: /* Line 1455 of yacc.c */ #line 271 "../../../lib/srchilite/langdefparser.yy" { (yyval.stringdef) = (yyvsp[(1) - (1)].stringdef); } break; case 38: /* Line 1455 of yacc.c */ #line 274 "../../../lib/srchilite/langdefparser.yy" { (yyval.stringdef) = new StringDef(*(yyvsp[(1) - (1)].string), true); } break; case 39: /* Line 1455 of yacc.c */ #line 277 "../../../lib/srchilite/langdefparser.yy" { (yyval.stringdef) = new StringDef(*(yyvsp[(1) - (1)].string)); } break; case 40: /* Line 1455 of yacc.c */ #line 280 "../../../lib/srchilite/langdefparser.yy" { if (! vardefinitions->contains(*(yyvsp[(1) - (1)].string))) { yyerror("undefined variable " + *(yyvsp[(1) - (1)].string)); YYERROR; } (yyval.stringdef) = new StringDef(vardefinitions->getVar(*(yyvsp[(1) - (1)].string))); } break; case 41: /* Line 1455 of yacc.c */ #line 287 "../../../lib/srchilite/langdefparser.yy" { (yyval.stringdef) = new StringDef(*(yyvsp[(1) - (1)].string)); (yyval.stringdef)->setBackRef(true); } break; case 42: /* Line 1455 of yacc.c */ #line 291 "../../../lib/srchilite/langdefparser.yy" { (yyval.stringdef) = StringDef::concat((yyvsp[(1) - (3)].stringdef), (yyvsp[(3) - (3)].stringdef)); delete (yyvsp[(1) - (3)].stringdef); delete (yyvsp[(3) - (3)].stringdef); } break; case 43: /* Line 1455 of yacc.c */ #line 296 "../../../lib/srchilite/langdefparser.yy" { // this token is used by the scanner to signal an error // in scanning a string with backreference yyerror("backreferences are allowed only inside ` `"); YYERROR; (yyval.stringdef) = 0; } break; case 44: /* Line 1455 of yacc.c */ #line 306 "../../../lib/srchilite/langdefparser.yy" { (yyval.stringdef) = (yyvsp[(1) - (1)].stringdef); } break; case 45: /* Line 1455 of yacc.c */ #line 309 "../../../lib/srchilite/langdefparser.yy" { (yyval.stringdef) = new StringDef(*(yyvsp[(1) - (1)].string), true); } break; case 46: /* Line 1455 of yacc.c */ #line 312 "../../../lib/srchilite/langdefparser.yy" { (yyval.stringdef) = new StringDef(*(yyvsp[(1) - (1)].string)); } break; case 47: /* Line 1455 of yacc.c */ #line 315 "../../../lib/srchilite/langdefparser.yy" { if (! vardefinitions->contains(*(yyvsp[(1) - (1)].string))) { yyerror("undefined variable " + *(yyvsp[(1) - (1)].string)); YYERROR; } (yyval.stringdef) = new StringDef(vardefinitions->getVar(*(yyvsp[(1) - (1)].string))); } break; case 48: /* Line 1455 of yacc.c */ #line 322 "../../../lib/srchilite/langdefparser.yy" { (yyval.stringdef) = StringDef::concat((yyvsp[(1) - (3)].stringdef), (yyvsp[(3) - (3)].stringdef)); delete (yyvsp[(1) - (3)].stringdef); delete (yyvsp[(3) - (3)].stringdef); } break; case 49: /* Line 1455 of yacc.c */ #line 327 "../../../lib/srchilite/langdefparser.yy" { // this token is used by the scanner to signal an error // in scanning a string with backreference yyerror("backreferences are allowed only inside ` `"); YYERROR; (yyval.stringdef) = 0; } break; /* Line 1455 of yacc.c */ #line 2122 "../../../lib/srchilite/langdefparser.cc" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); YYPOPSTACK (yylen); yylen = 0; YY_STACK_PRINT (yyss, yyssp); *++yyvsp = yyval; *++yylsp = yyloc; /* Now `shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ yyn = yyr1[yyn]; yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) yystate = yytable[yystate]; else yystate = yydefgoto[yyn - YYNTOKENS]; goto yynewstate; /*------------------------------------. | yyerrlab -- here on detecting error | `------------------------------------*/ yyerrlab: /* If not already recovering from an error, report this error. */ if (!yyerrstatus) { ++yynerrs; #if ! YYERROR_VERBOSE yyerror (YY_("syntax error")); #else { YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) { YYSIZE_T yyalloc = 2 * yysize; if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) yyalloc = YYSTACK_ALLOC_MAXIMUM; if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); yymsg = (char *) YYSTACK_ALLOC (yyalloc); if (yymsg) yymsg_alloc = yyalloc; else { yymsg = yymsgbuf; yymsg_alloc = sizeof yymsgbuf; } } if (0 < yysize && yysize <= yymsg_alloc) { (void) yysyntax_error (yymsg, yystate, yychar); yyerror (yymsg); } else { yyerror (YY_("syntax error")); if (yysize != 0) goto yyexhaustedlab; } } #endif } yyerror_range[0] = yylloc; if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an error, discard it. */ if (yychar <= YYEOF) { /* Return failure if at end of input. */ if (yychar == YYEOF) YYABORT; } else { yydestruct ("Error: discarding", yytoken, &yylval, &yylloc); yychar = YYEMPTY; } } /* Else will try to reuse lookahead token after shifting the error token. */ goto yyerrlab1; /*---------------------------------------------------. | yyerrorlab -- error raised explicitly by YYERROR. | `---------------------------------------------------*/ yyerrorlab: /* Pacify compilers like GCC when the user code never invokes YYERROR and the label yyerrorlab therefore never appears in user code. */ if (/*CONSTCOND*/ 0) goto yyerrorlab; yyerror_range[0] = yylsp[1-yylen]; /* Do not reclaim the symbols of the rule which action triggered this YYERROR. */ YYPOPSTACK (yylen); yylen = 0; YY_STACK_PRINT (yyss, yyssp); yystate = *yyssp; goto yyerrlab1; /*-------------------------------------------------------------. | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ yyerrlab1: yyerrstatus = 3; /* Each real token shifted decrements this. */ for (;;) { yyn = yypact[yystate]; if (yyn != YYPACT_NINF) { yyn += YYTERROR; if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) { yyn = yytable[yyn]; if (0 < yyn) break; } } /* Pop the current state because it cannot handle the error token. */ if (yyssp == yyss) YYABORT; yyerror_range[0] = *yylsp; yydestruct ("Error: popping", yystos[yystate], yyvsp, yylsp); YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); } *++yyvsp = yylval; yyerror_range[1] = yylloc; /* Using YYLLOC is tempting, but would change the location of the lookahead. YYLOC is available though. */ YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2); *++yylsp = yyloc; /* Shift the error token. */ YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); yystate = yyn; goto yynewstate; /*-------------------------------------. | yyacceptlab -- YYACCEPT comes here. | `-------------------------------------*/ yyacceptlab: yyresult = 0; goto yyreturn; /*-----------------------------------. | yyabortlab -- YYABORT comes here. | `-----------------------------------*/ yyabortlab: yyresult = 1; goto yyreturn; #if !defined(yyoverflow) || YYERROR_VERBOSE /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ yyexhaustedlab: yyerror (YY_("memory exhausted")); yyresult = 2; /* Fall through. */ #endif yyreturn: if (yychar != YYEMPTY) yydestruct ("Cleanup: discarding lookahead", yytoken, &yylval, &yylloc); /* Do not reclaim the symbols of the rule which action triggered this YYABORT or YYACCEPT. */ YYPOPSTACK (yylen); YY_STACK_PRINT (yyss, yyssp); while (yyssp != yyss) { yydestruct ("Cleanup: popping", yystos[*yyssp], yyvsp, yylsp); YYPOPSTACK (1); } #ifndef yyoverflow if (yyss != yyssa) YYSTACK_FREE (yyss); #endif #if YYERROR_VERBOSE if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); #endif /* Make sure YYID is used. */ return YYID (yyresult); } /* Line 1675 of yacc.c */ #line 337 "../../../lib/srchilite/langdefparser.yy" extern int langdef_lex_destroy (void); void yyerror( const char *s ) { errorBuffer = s; } void yyerror( const string &s ) { yyerror(s.c_str()); } namespace srchilite { LangElems * parse_lang_def() { return parse_lang_def("", "stdin"); } LangElems * parse_lang_def(const char *path, const char *name) { current_lang_elems = 0; includedFileNotFound = false; vardefinitions = new VarDefinitions; parsestruct = ParseStructPtr(new ParseStruct(path, name)); errorBuffer = ""; int result = 1; bool fileNotFound = false; try { if (strcmp(name, "stdin") != 0) open_file_to_scan(path, name); } catch (IOException &e) { errorBuffer = e.message; fileNotFound = true; } if (!fileNotFound) result = langdef_parse(); delete vardefinitions; vardefinitions = 0; if (result != 0 && ! fileNotFound) { // make sure the input file is closed close_langdefinputfile(); // close it before clearing the scanner } // release scanner memory clear_langdefscanner (); if (result != 0 || errorBuffer.size()) { if (fileNotFound || includedFileNotFound) { if (current_lang_elems) delete current_lang_elems; throw ParserException(errorBuffer); } else { ParserException e(errorBuffer, parsestruct.get()); if (current_lang_elems) delete current_lang_elems; throw e; } } return current_lang_elems; } } ���������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/statelangelem.h������������������������������������������������0000644�0001750�0001750�00000003123�11672675563�017462� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // C++ Interface: %{MODULE} // // Description: // // // Author: %{AUTHOR} <%{EMAIL}>, (C) %{YEAR} // // Copyright: See COPYING file that comes with this distribution // // #ifndef STATELANGELEM_H #define STATELANGELEM_H #include "statestartlangelem.h" #include "langelems.h" namespace srchilite { class StringDef; class StringDefs; class StateStartLangElem; /** * @class StateLangElem a language element that introduces a new state pattern Composite @author Lorenzo Bettini */ // doublecpp: forward declarations, DO NOT MODIFY class HighlightState; // file: highlightstate.h class HighlightStateBuilder; // file: highlightstatebuilder.h class LangElemsPrinter; // file: langelemsprinter.h // doublecpp: end, DO NOT MODIFY class StateLangElem : public LangElem { private: StateStartLangElem *statestartlangelem; LangElems *langelems; bool state; public: StateLangElem(const std::string &n, StateStartLangElem *start, LangElems *elems, bool st = false); ~StateLangElem(); void set_elems(LangElems *elems) { langelems = elems; } void set_state() { state = true; } virtual const std::string toString() const; virtual const std::string toStringOriginal() const; StateStartLangElem *getStateStart() const { return statestartlangelem; } bool isState() const { return state; } LangElems *getElems() const { return langelems; } // doublecpp: dispatch methods, DO NOT MODIFY public: virtual void dispatch_build(HighlightStateBuilder *, HighlightState * state); virtual void dispatch_collect_const(LangElemsPrinter *); // doublecpp: end, DO NOT MODIFY }; } #endif ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/sourcehighlightutils.h�����������������������������������������0000644�0001750�0001750�00000004326�11672675563�021114� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * sourcehighlightutils.h * * Created on: May 19, 2009 * Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2008 * Copyright: See COPYING file that comes with this distribution */ #ifndef SOURCEHIGHLIGHTUTILS_H_ #define SOURCEHIGHLIGHTUTILS_H_ #include <set> #include <string> namespace srchilite { /// a set of strings typedef std::set<std::string> StringSet; /** * Class with some utility static methods. * * @since 3.1 */ class SourceHighlightUtils { public: /** * @param path the path to search for files * @param fileExtension the file extension for files (without the dot) * @return a set of string with file names matching the specified file extension in * the specified path * @throw IOException if it cannot open the specified path */ static StringSet getFileNames(const std::string path, const std::string fileExtension); /** * @param path the path to search for files (if left empty, it uses the standard data dir path) * @return a set of string with file names of style files * @throw IOException if it cannot open the specified path */ static StringSet getStyleFileNames(const std::string path = ""); /** * @param path the path to search for files (if left empty, it uses the standard data dir path) * @return a set of string with file names of css style files * @throw IOException if it cannot open the specified path */ static StringSet getCssStyleFileNames(const std::string path = ""); /** * @param path the path to search for files (if left empty, it uses the standard data dir path) * @return a set of string with file names of lang definition files * @throw IOException if it cannot open the specified path * @since 3.1.1 */ static StringSet getLangFileNames(const std::string path = ""); /** * @param path the path to search for files (if left empty, it uses the standard data dir path) * @return a set of string with file names of outlang definition files * @throw IOException if it cannot open the specified path * @since 3.1.1 */ static StringSet getOutLangFileNames(const std::string path = ""); }; } #endif /* SOURCEHIGHLIGHTUTILS_H_ */ ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/langelemsprinter.h���������������������������������������������0000644�0001750�0001750�00000002131�11672675563�020206� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // C++ Interface: langelemsprinter // // Description: // // // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2006 // // Copyright: See COPYING file that comes with this distribution // // #ifndef LANGELEMSPRINTER_H #define LANGELEMSPRINTER_H #include <set> #include <string> #include <ostream> namespace srchilite { /** * Prints all the language elements. * his class uses dynamic overloading and it must be processed by doublecpp, * http://doublecpp.sf.net, in case you need to modify it. */ class LangElemsPrinter { typedef std::set<std::string> SetOfElements; SetOfElements setOfElements; public: LangElemsPrinter(); virtual ~LangElemsPrinter(); /** * Prints all the elements contained in the passed LangElems * to the specified ostream. * @param elems * @param os */ void print(const LangElems *elems, std::ostream &os); protected: branches collect void (const StateLangElem *elem); void (const LangElem *elem); void (const LangElems *elem); void (const NamedSubExpsLangElem *elem); endbranches }; } #endif ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/instances.cpp��������������������������������������������������0000644�0001750�0001750�00000003142�11672675563�017160� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * instances.cpp * * Created on: Aug 21, 2009 * Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2008 * Copyright: See COPYING file that comes with this distribution */ #include "instances.h" #include "regexrulefactory.h" #include "langdefmanager.h" #include "langmap.h" #include "settings.h" namespace srchilite { static LangDefManager *langDefManager = 0; static LangMap *langMap = 0; static LangMap *outlangMap = 0; LangDefManager *Instances::getLangDefManager() { if (!langDefManager) langDefManager = new LangDefManager(new RegexRuleFactory); return langDefManager; } LangMap *Instances::getLangMap() { if (!langMap) langMap = new LangMap(Settings::retrieveDataDir(), "lang.map"); return langMap; } LangMap *Instances::getOutLangMap() { if (!outlangMap) outlangMap = new LangMap(Settings::retrieveDataDir(), "outlang.map"); return outlangMap; } void Instances::reload() { if (!langMap) langMap = new LangMap(Settings::retrieveDataDir(), "lang.map"); else langMap->reload(Settings::retrieveDataDir(), "lang.map"); if (!outlangMap) outlangMap = new LangMap(Settings::retrieveDataDir(), "outlang.map"); else outlangMap->reload(Settings::retrieveDataDir(), "outlang.map"); } void Instances::unload() { if (langDefManager) { delete langDefManager->getRuleFactory(); delete langDefManager; langDefManager = 0; } if (langMap) { delete langMap; langMap = 0; } if (outlangMap) { delete outlangMap; outlangMap = 0; } } } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/srcuntabifier.h������������������������������������������������0000644�0001750�0001750�00000001427�11672675563�017502� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2008 // // Copyright: See COPYING file that comes with this distribution // #ifndef SRCUNTABIFIER_H #define SRCUNTABIFIER_H #include "preformatter.h" namespace srchilite { using std::string; /** * PerFormratter to convert tabs to spaces before generation */ class Untabifier : public PreFormatter { public: Untabifier(unsigned int nSpacesPerTab, PreFormatterPtr f = PreFormatterPtr()) : PreFormatter(f), nSpacesPerTab_(nSpacesPerTab), n_(0) { } virtual const string doPreformat(const std::string &text); private: /// the number of spaces corresponding to a tab char const int nSpacesPerTab_; /// the counter of characters unsigned int n_; }; } #endif // SRCUNTABIFIER_H �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/textstyleformatter.h�������������������������������������������0000644�0001750�0001750�00000004466�11672675563�020641� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/** * C++ class: textstyleformatter.h * * Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2005-2008 * Copyright: See COPYING file that comes with this distribution */ #ifndef _TEXTSTYLEFORMATTER_H_ #define _TEXTSTYLEFORMATTER_H_ #include "textstyle.h" #include "formatter.h" namespace srchilite { class BufferedOutput; class PreFormatter; class CTagsFormatter; /** * An implementation of Formatter, based on source-highlight TextStyle */ class TextStyleFormatter : public Formatter { private: /// the TextStyle for formatting TextStyle textstyle; /// where to output the formatting BufferedOutput *output; /// the possible pre formatter for text PreFormatter *preFormatter; /// the possible formatter for ctags (references and anchors) CTagsFormatter *ctagsFormatter; public: TextStyleFormatter(const TextStyle &style, BufferedOutput *o = 0); TextStyleFormatter(const std::string &repr = "$text", BufferedOutput *o = 0); virtual ~TextStyleFormatter() { } virtual void format(const std::string &s, const FormatterParams *params = 0); BufferedOutput *getBufferedOutput() const { return output; } CTagsFormatter *getCTagsFormatter() const { return ctagsFormatter; } void setBufferedOutput(BufferedOutput *o) { output = o; } void setPreFormatter(PreFormatter *p) { preFormatter = p; } void setCTagsFormatter(CTagsFormatter *f) { ctagsFormatter = f; } /** * @return a string representation of this formatter */ const std::string &toString() const { return textstyle.toString(); } protected: /** * Actually performs formatting (no reference formatting); this is used * internally * @param s the string to format. * @param preformat whether to perform preformatting */ void doFormat(const std::string &s, bool preformat = true); /** * Performs reference formatting (by relying on the CTagsFormatter) * @param s the string to format. * @param params additional parameters * @return true if an anchor or reference was found and formatted */ bool formatReferences(const std::string &s, const FormatterParams *params); }; } #endif /* _TEXTSTYLEFORMATTER_H_ */ ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/sourcehighlight.cpp��������������������������������������������0000644�0001750�0001750�00000030367�11672675563�020372� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2008 // // Copyright: See COPYING file that comes with this distribution // #include <fstream> #include "sourcehighlight.h" #include "fileutil.h" #include "formattermanager.h" #include "textstyles.h" #include "preformatter.h" #include "parsestyles.h" #include "textstyleformatter.h" #include "textstyleformatterfactory.h" #include "outlangdefparserfun.h" #include "langdefmanager.h" #include "regexrulefactory.h" #include "highlightstate.h" #include "sourcehighlighter.h" #include "bufferedoutput.h" #include "sourcefilehighlighter.h" #include "linenumgenerator.h" #include "ioexception.h" #include "docgenerator.h" #include "srcuntabifier.h" #include "langmap.h" #include "parserexception.h" #include "ctagsmanager.h" #include "ctagsformatter.h" #include "highlightstateprinter.h" #include "langelemsprinter.hpp" #include "langelems.h" #include "verbosity.h" #include "settings.h" using namespace std; namespace srchilite { SourceHighlight::SourceHighlight(const std::string &_outputLang) : outputLang(_outputLang), dataDir(Settings::retrieveDataDir()), styleFile( "default.style"), formatterManager(0), preFormatter(0), langDefManager(new LangDefManager(new RegexRuleFactory)), lineNumGenerator(0), docGenerator(0), noDocGenerator(0), highlightEventListener(0), ctagsManager(0), ctagsFormatter(0), lineRanges(0), regexRanges(0), optimize(true), generateLineNumbers( false), generateLineNumberRefs(false), lineNumberPad('0'), lineNumberDigits(0), generateEntireDoc(false), generateVersion(true), canUseStdOut(true), binaryOutput(false), tabSpaces(0) { } SourceHighlight::~SourceHighlight() { if (formatterManager) delete formatterManager; if (preFormatter) delete preFormatter; delete langDefManager->getRuleFactory(); delete langDefManager; if (lineNumGenerator) delete lineNumGenerator; if (docGenerator) delete docGenerator; if (noDocGenerator) delete noDocGenerator; if (ctagsFormatter) delete ctagsFormatter; } void SourceHighlight::initialize() { if (formatterManager) return; // already initialized TextStylesPtr textStyles = parse_outlang_def(dataDir.c_str(), outputLang.c_str()); FormatterPtr defaultFormatter(new TextStyleFormatter("$text")); formatterManager = new FormatterManager(defaultFormatter); if (tabSpaces) { preFormatter = new Untabifier(tabSpaces); preFormatter->setPreFormatter(PreFormatterPtr(new PreFormatter( textStyles->charTranslator))); } else { preFormatter = new PreFormatter(textStyles->charTranslator); } linePrefix = textStyles->line_prefix; if (ctagsManager) { ctagsFormatter = ctagsManager->createCTagsFormatter( textStyles->refstyle); ctagsFormatter->setPreFormatter(preFormatter); } TextStyleFormatterFactory formatterFactory(textStyles, preFormatter, ctagsFormatter, formatterManager); if (styleCssFile.size()) parseCssStyles(dataDir, styleCssFile, &formatterFactory, backgroundColor); else parseStyles(dataDir, styleFile, &formatterFactory, backgroundColor); // keep the background color empty if none is specified if (backgroundColor != "") backgroundColor = formatterFactory.preprocessColor(backgroundColor); formatterFactory.addDefaultFormatter(); // use the style default file to build missing formatters if (styleDefaultFile.size()) { LangMap defaultStyles(dataDir, styleDefaultFile); defaultStyles.open(); for (LangMap::const_iterator it = defaultStyles.begin(); it != defaultStyles.end(); ++it) { formatterFactory.createMissingFormatter(it->first, it->second); } } formatterCollection = formatterFactory.getFormatterCollection(); // initialize the line number generator TextStyleFormatter *lineNumFormatter = dynamic_cast<TextStyleFormatter *> (formatterManager->getFormatter( "linenum").get()); lineNumGenerator = new LineNumGenerator(lineNumFormatter->toString(), 5, lineNumberPad); lineNumGenerator->setAnchorPrefix(lineNumberAnchorPrefix); if (generateLineNumberRefs) lineNumGenerator->setAnchorStyle(textStyles->refstyle.anchor); docGenerator = new DocGenerator(textStyles->docTemplate.toStringBegin(), textStyles->docTemplate.toStringEnd()); noDocGenerator = new DocGenerator( textStyles->noDocTemplate.toStringBegin(), textStyles->noDocTemplate.toStringEnd()); docGenerator->set_gen_version(generateVersion); noDocGenerator->set_gen_version(generateVersion); docGenerator->setBackgroundColor(backgroundColor); noDocGenerator->setBackgroundColor(backgroundColor); docGenerator->setCss(css); noDocGenerator->setCss(css); // open possible header and footer files if (headerFileName.size()) { const string &header = readFile(headerFileName); docGenerator->setHeader(header); noDocGenerator->setHeader(header); } if (footerFileName.size()) { const string &footer = readFile(footerFileName); docGenerator->setFooter(footer); noDocGenerator->setFooter(footer); } // set the preformatter in all the formatters for (TextStyleFormatterCollection::const_iterator it = formatterCollection.begin(); it != formatterCollection.end(); ++it) { (*it)->setPreFormatter(preFormatter); } outputFileExtension = textStyles->file_extension; } void SourceHighlight::highlight(const std::string &input, const std::string &_output, const std::string &inputLang) { initialize(); // the output file name could be empty, and we might generate it, so make a copy string output = _output; HighlightStatePtr highlightState = langDefManager->getHighlightState( dataDir, inputLang); // compute line number digits (if a file name is specified) if (generateLineNumbers && input.size()) { ifstream is(input.c_str()); if (!is) { throw IOException("cannot open input file", input); } unsigned int lines = get_line_count(is); int line_num_digit = 0; while (lines) { ++line_num_digit; lines /= 10; } lineNumGenerator->setDigitNum(line_num_digit); } ifstream is; ofstream os; bool use_stdin = !input.size(); // in case of multiple files we must disable generation to stdout. bool use_stdout = (!output.size() && canUseStdOut) || output == "STDOUT"; if (!use_stdin) { is.open(input.c_str()); if (!is) { throw IOException("cannot open input file", input); } } if (!use_stdout) { // in case the output file is not specified if (!output.size()) { // in this case we need the extension defined in the outlang if (!outputFileExtension.size()) { // we can't continue ParserException e("missing file extension in " + outputLang, "source-highlight"); e.additional = "this is needed when the output file is not specified"; throw e; } // generate the output file name starting from known info output = createOutputFileName(input); } if (binaryOutput) { os.open(output.c_str(), std::ios::out | std::ios::binary); } else { os.open(output.c_str()); } if (!os) { throw IOException("cannot open output file", output); } } docGenerator->setInputFileName(input); noDocGenerator->setInputFileName(input); if (!title.size()) { // if the title was not set, then use the input file name docGenerator->setTitle(input); noDocGenerator->setTitle(input); } docGenerator->setInputLang(inputLang); noDocGenerator->setInputLang(inputLang); if (ctagsFormatter) { // if we need to generate references, then set the file info ctagsFormatter->setFileInfo(input, output); } highlight((use_stdin ? cin : is), (use_stdout ? cout : os), inputLang, input); if (is.is_open()) is.close(); if (os.is_open()) os.close(); } const string SourceHighlight::createOutputFileName(const std::string &inputFile) { return srchilite::createOutputFileName(inputFile, outputFileDir, outputFileExtension); } void SourceHighlight::highlight(std::istream &input, std::ostream &output, const std::string &inputLang, const std::string &inputFileName) { initialize(); HighlightStatePtr highlightState = langDefManager->getHighlightState( dataDir, inputLang); SourceHighlighter highlighter(highlightState); highlighter.setFormatterManager(formatterManager); highlighter.setOptimize(optimize); if (highlightEventListener) highlighter.addListener(highlightEventListener); BufferedOutput bufferedOutput(output); // if no optimization, then always flush the output if (!optimize) bufferedOutput.setAlwaysFlush(true); updateBufferedOutput(&bufferedOutput); SourceFileHighlighter fileHighlighter(inputFileName, &highlighter, &bufferedOutput); fileHighlighter.setLineRanges(lineRanges); fileHighlighter.setRegexRanges(regexRanges); if (generateLineNumbers) { fileHighlighter.setLineNumGenerator(lineNumGenerator); if (lineNumberDigits != 0) { lineNumGenerator->setDigitNum(lineNumberDigits); } } // set the prefix for all lines fileHighlighter.setLinePrefix(linePrefix); fileHighlighter.setPreformatter(preFormatter); // set the range separator only after the preformatter! // since the separator itself might have to be preformatted if (rangeSeparator.size()) { fileHighlighter.setRangeSeparator(rangeSeparator); } // the formatter for possible context lines fileHighlighter.setContextFormatter(formatterManager->getFormatter( "context").get()); DocGenerator *documentGenerator = (generateEntireDoc ? docGenerator : noDocGenerator); if (title.size()) { // for each output set the title documentGenerator->setTitle(title); } documentGenerator->setInputLang(inputLang); // first generate the start of the output file documentGenerator->generate_start_doc(&output); fileHighlighter.highlight(input); // finally generate the end of the output file documentGenerator->generate_end_doc(&output); // since the highlighter can be re-used, we need to remove the // listener for other runs if (highlightEventListener) highlighter.removeListener(highlightEventListener); } void SourceHighlight::checkLangDef(const std::string &langFile) { // make sure to build the highlight state each time langDefManager->buildHighlightState(dataDir, langFile); // if we get here, no problems were found, otherwise this method // exits with an exception } void SourceHighlight::checkOutLangDef(const std::string &outlangFile) { // make sure to build the highlight state each time parse_outlang_def(dataDir.c_str(), outlangFile.c_str()); // if we get here, no problems were found, otherwise this method // exits with an exception } void SourceHighlight::printHighlightState(const std::string &langFile, std::ostream &os) { HighlightStatePrinter printer(os); printer.printHighlightState(langDefManager->buildHighlightState(dataDir, langFile).get()); } void SourceHighlight::printLangElems(const std::string &langFile, std::ostream &os) { LangElemsPrinter printer; LangElems *elems = langDefManager->getLangElems(dataDir, langFile); printer.print(elems, os); delete elems; } void SourceHighlight::updateBufferedOutput(BufferedOutput *output) { for (TextStyleFormatterCollection::const_iterator it = formatterCollection.begin(); it != formatterCollection.end(); ++it) { (*it)->setBufferedOutput(output); } } } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/formatterfactory.h���������������������������������������������0000644�0001750�0001750�00000003577�11672675563�020245� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2008 // // Copyright: See COPYING file that comes with this distribution // #ifndef FORMATTERFACTORY_H_ #define FORMATTERFACTORY_H_ #include <string> #include <list> #include <boost/shared_ptr.hpp> using std::string; namespace srchilite { /// constants indicating boldface, italics, etc. enum StyleConstant { ISBOLD = 1, ///< bold ISITALIC, ///< italics ISUNDERLINE, ///< underline ISFIXED, ///< fixed size ISNOTFIXED, ///< non fixed size ISNOREF ///< must not contain references }; /// collection of StyleConstant objects typedef std::list<StyleConstant> StyleConstants; /// shared pointer for StyleConstants typedef boost::shared_ptr<StyleConstants> StyleConstantsPtr; /// iterator for StyleConstants typedef StyleConstants::const_iterator StyleConstantsIterator; /** * The generic abstract factory to create Formatter objects, during the * parsing of style files. Note that creation methods do not return a specific * object, so that the implementation of where to store the Formatter objects * themselves is left completely to the programmer (and does not couple the factory * to a specific collection). */ class FormatterFactory { public: virtual ~FormatterFactory() { } /** * Creates a formatter for the specific language element (identified by * key) with the passed style parameters * * @param key the language element represented * @param color the color * @param bgcolor the background color * @param styleconstants additional formatting information (e.g., bold, italics, etc.) * @return false if a formatter for the specific key is already present */ virtual bool createFormatter(const string &key, const string &color, const string &bgcolor, StyleConstantsPtr styleconstants) = 0; }; } #endif /*FORMATTERFACTORY_H_*/ ���������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/readtags.h�����������������������������������������������������0000644�0001750�0001750�00000020346�11672675563�016435� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: readtags.h,v 1.3 2009-05-10 12:58:46 bettini Exp $ * * Copyright (c) 1996-2003, Darren Hiebert * * This source code is released for the public domain. * * This file defines the public interface for looking up tag entries in tag * files. * * The functions defined in this interface are intended to provide tag file * support to a software tool. The tag lookups provided are sufficiently fast * enough to permit opening a sorted tag file, searching for a matching tag, * then closing the tag file each time a tag is looked up (search times are * on the order of hundreths of a second, even for huge tag files). This is * the recommended use of this library for most tool applications. Adhering * to this approach permits a user to regenerate a tag file at will without * the tool needing to detect and resynchronize with changes to the tag file. * Even for an unsorted 24MB tag file, tag searches take about one second. */ #ifndef READTAGS_H #define READTAGS_H #ifdef __cplusplus extern "C" { #endif /* * MACROS */ /* Options for tagsSetSortType() */ typedef enum { TAG_UNSORTED, TAG_SORTED, TAG_FOLDSORTED } sortType ; /* Options for tagsFind() */ #define TAG_FULLMATCH 0x0 #define TAG_PARTIALMATCH 0x1 #define TAG_OBSERVECASE 0x0 #define TAG_IGNORECASE 0x2 /* * DATA DECLARATIONS */ typedef enum { TagFailure = 0, TagSuccess = 1 } tagResult; struct sTagFile; typedef struct sTagFile tagFile; /* This structure contains information about the tag file. */ typedef struct { struct { /* was the tag file successfully opened? */ int opened; /* errno value when 'opened' is false */ int error_number; } status; /* information about the structure of the tag file */ struct { /* format of tag file (1 = original, 2 = extended) */ short format; /* how is the tag file sorted? */ sortType sort; } file; /* information about the program which created this tag file */ struct { /* name of author of generating program (may be null) */ const char *author; /* name of program (may be null) */ const char *name; /* URL of distribution (may be null) */ const char *url; /* program version (may be null) */ const char *version; } program; } tagFileInfo; /* This structure contains information about an extension field for a tag. * These exist at the end of the tag in the form "key:value"). */ typedef struct { /* the key of the extension field */ const char *key; /* the value of the extension field (may be an empty string) */ const char *value; } tagExtensionField; /* This structure contains information about a specific tag. */ typedef struct { /* name of tag */ const char *name; /* path of source file containing definition of tag */ const char *file; /* address for locating tag in source file */ struct { /* pattern for locating source line * (may be NULL if not present) */ const char *pattern; /* line number in source file of tag definition * (may be zero if not known) */ unsigned long lineNumber; } address; /* kind of tag (may by name, character, or NULL if not known) */ const char *kind; /* is tag of file-limited scope? */ short fileScope; /* miscellaneous extension fields */ struct { /* number of entries in `list' */ unsigned short count; /* list of key value pairs */ tagExtensionField *list; } fields; } tagEntry; /* * FUNCTION PROTOTYPES */ /* * This function must be called before calling other functions in this * library. It is passed the path to the tag file to read and a (possibly * null) pointer to a structure which, if not null, will be populated with * information about the tag file. If successful, the function will return a * handle which must be supplied to other calls to read information from the * tag file, and info.status.opened will be set to true. If unsuccessful, * info.status.opened will be set to false and info.status.error_number will * be set to the errno value representing the system error preventing the tag * file from being successfully opened. */ extern tagFile *tagsOpen (const char *const filePath, tagFileInfo *const info); /* * This function allows the client to override the normal automatic detection * of how a tag file is sorted. Permissible values for `type' are * TAG_UNSORTED, TAG_SORTED, TAG_FOLDSORTED. Tag files in the new extended * format contain a key indicating whether or not they are sorted. However, * tag files in the original format do not contain such a key even when * sorted, preventing this library from taking advantage of fast binary * lookups. If the client knows that such an unmarked tag file is indeed * sorted (or not), it can override the automatic detection. Note that * incorrect lookup results will result if a tag file is marked as sorted when * it actually is not. The function will return TagSuccess if called on an * open tag file or TagFailure if not. */ extern tagResult tagsSetSortType (tagFile *const file, const sortType type); /* * Reads the first tag in the file, if any. It is passed the handle to an * opened tag file and a (possibly null) pointer to a structure which, if not * null, will be populated with information about the first tag file entry. * The function will return TagSuccess another tag entry is found, or * TagFailure if not (i.e. it reached end of file). */ extern tagResult tagsFirst (tagFile *const file, tagEntry *const entry); /* * Step to the next tag in the file, if any. It is passed the handle to an * opened tag file and a (possibly null) pointer to a structure which, if not * null, will be populated with information about the next tag file entry. The * function will return TagSuccess another tag entry is found, or TagFailure * if not (i.e. it reached end of file). It will always read the first tag in * the file immediately after calling tagsOpen(). */ extern tagResult tagsNext (tagFile *const file, tagEntry *const entry); /* * Retrieve the value associated with the extension field for a specified key. * It is passed a pointer to a structure already populated with values by a * previous call to tagsNext(), tagsFind(), or tagsFindNext(), and a string * containing the key of the desired extension field. If no such field of the * specified key exists, the function will return null. */ extern const char *tagsField (const tagEntry *const entry, const char *const key); /* * Find the first tag matching `name'. The structure pointed to by `entry' * will be populated with information about the tag file entry. If a tag file * is sorted using the C locale, a binary search algorithm is used to search * the tag file, resulting in very fast tag lookups, even in huge tag files. * Various options controlling the matches can be combined by bit-wise or-ing * certain values together. The available values are: * * TAG_PARTIALMATCH * Tags whose leading characters match `name' will qualify. * * TAG_FULLMATCH * Only tags whose full lengths match `name' will qualify. * * TAG_IGNORECASE * Matching will be performed in a case-insenstive manner. Note that * this disables binary searches of the tag file. * * TAG_OBSERVECASE * Matching will be performed in a case-senstive manner. Note that * this enables binary searches of the tag file. * * The function will return TagSuccess if a tag matching the name is found, or * TagFailure if not. */ extern tagResult tagsFind (tagFile *const file, tagEntry *const entry, const char *const name, const int options); /* * Find the next tag matching the name and options supplied to the most recent * call to tagsFind() for the same tag file. The structure pointed to by * `entry' will be populated with information about the tag file entry. The * function will return TagSuccess if another tag matching the name is found, * or TagFailure if not. */ extern tagResult tagsFindNext (tagFile *const file, tagEntry *const entry); /* * Call tagsTerminate() at completion of reading the tag file, which will * close the file and free any internal memory allocated. The function will * return TagFailure is no file is currently open, TagSuccess otherwise. */ extern tagResult tagsClose (tagFile *const file); #ifdef __cplusplus }; #endif #endif /* vi:set tabstop=8 shiftwidth=4: */ ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/highlightstatebuilder.hpp��������������������������������������0000644�0001750�0001750�00000004444�11672675563�021563� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2008 // // Copyright: See COPYING file that comes with this distribution // #ifndef HIGHLIGHTSTATEBUILDER_H_ #define HIGHLIGHTSTATEBUILDER_H_ #include "highlightstate.h" namespace srchilite { class LangElems; class HighlightRuleFactory; /** * Builds an HighlightState from the language definition file collected structures. * This class uses dynamic overloading and it must be processed by doublecpp, * http://doublecpp.sf.net, in case you need to modify it. */ // doublecpp: forward declarations, DO NOT MODIFY class DelimitedLangElem; // file: delimitedlangelem.h class HighlightState; // file: highlightstate.h class LangElem; // file: langelem.h class NamedSubExpsLangElem; // file: namedsubexpslangelem.h class StateLangElem; // file: statelangelem.h class StringListLangElem; // file: stringlistlangelem.h // doublecpp: end, DO NOT MODIFY #line 22 "highlightstatebuilder.h" class HighlightStateBuilder { /// the factory for creating rules HighlightRuleFactory *highlightRuleFactory; public: HighlightStateBuilder(HighlightRuleFactory *_highlightRuleFactory); virtual ~HighlightStateBuilder(); /** * Builds all the rules into the passed mainState as specified in the * passed LangElems * * @param elems the element definitions retrieved from the lang file * @param mainState the main state where to store all the rules */ void build(LangElems *elems, HighlightStatePtr mainState); /// the following is a multi-method that needs to be processed by doublecpp // doublecpp: method branches, DO NOT MODIFY #line 40 "highlightstatebuilder.h" virtual void build(LangElem * elem, HighlightState * state); #line 41 "highlightstatebuilder.h" virtual void build(StringListLangElem * elem, HighlightState * state); #line 42 "highlightstatebuilder.h" virtual void build(DelimitedLangElem * elem, HighlightState * state); #line 43 "highlightstatebuilder.h" virtual void build(NamedSubExpsLangElem * elem, HighlightState * state); #line 44 "highlightstatebuilder.h" virtual void build(StateLangElem * elem, HighlightState * state); virtual void build_DB(LangElem * elem, HighlightState * state); #line 44 "highlightstatebuilder.h" // doublecpp: end, DO NOT MODIFY }; } #endif /*HIGHLIGHTSTATEBUILDER_H_*/ ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/stringlistlangelem.cpp�����������������������������������������0000644�0001750�0001750�00000001646�11672675563�021107� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // C++ Implementation: stringlistlangelem // // Description: // // // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004 // // Copyright: See COPYING file that comes with this distribution // // #include "stringlistlangelem.h" #include "stringdef.h" #include "tostringcollection.h" using namespace std; namespace srchilite { StringListLangElem::StringListLangElem(const string &n, StringDefs *al, bool nons) : StateStartLangElem(n), alternatives(al), nonsensitive(nons) { } StringListLangElem::~StringListLangElem() { delete alternatives; } const std::string StringListLangElem::toString() const { string res = StateStartLangElem::toString() + " " + toStringCollection<StringDefs>(alternatives); return res; } const std::string StringListLangElem::toStringOriginal() const { string res = StateStartLangElem::toString() + " " + toStringOriginalCollection<StringDefs>(alternatives); return res; } } ������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/srchilite.doxyfile.in������������������������������������������0000644�0001750�0001750�00000153600�11672675563�020632� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Doxyfile 1.5.5 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project # # All text after a hash (#) is considered a comment and will be ignored # The format is: # TAG = value [value, ...] # For lists items can also be appended using: # TAG += value [value, ...] # Values that contain spaces should be placed between quotes (" ") #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- # This tag specifies the encoding used for all characters in the config file # that follow. The default is UTF-8 which is also the encoding used for all # text before the first occurrence of this tag. Doxygen uses libiconv (or the # iconv built into libc) for the transcoding. See # http://www.gnu.org/software/libiconv for the list of possible encodings. DOXYFILE_ENCODING = UTF-8 # The PROJECT_NAME tag is a single word (or a sequence of words surrounded # by quotes) that should identify the project. PROJECT_NAME = "Source-highlight Library" # The PROJECT_NUMBER tag can be used to enter a project or revision number. # This could be handy for archiving the generated documentation or # if some version control system is used. PROJECT_NUMBER = # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. # If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used. OUTPUT_DIRECTORY = # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create # 4096 sub-directories (in 2 levels) under the output directory of each output # format and will distribute the generated files over these directories. # Enabling this option can be useful when feeding doxygen a huge amount of # source files, where putting all generated files in the same directory would # otherwise cause performance problems for the file system. CREATE_SUBDIRS = NO # The OUTPUT_LANGUAGE tag is used to specify the language in which all # documentation generated by doxygen is written. Doxygen will use this # information to generate all constant output in the proper language. # The default language is English, other supported languages are: # Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, # Croatian, Czech, Danish, Dutch, Farsi, Finnish, French, German, Greek, # Hungarian, Italian, Japanese, Japanese-en (Japanese with English messages), # Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, Polish, # Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish, # and Ukrainian. OUTPUT_LANGUAGE = English # If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will # include brief member descriptions after the members that are listed in # the file and class documentation (similar to JavaDoc). # Set to NO to disable this. BRIEF_MEMBER_DESC = YES # If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend # the brief description of a member or function before the detailed description. # Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. REPEAT_BRIEF = YES # This tag implements a quasi-intelligent brief description abbreviator # that is used to form the text in various listings. Each string # in this list, if found as the leading text of the brief description, will be # stripped from the text and the result after processing the whole list, is # used as the annotated text. Otherwise, the brief description is used as-is. # If left blank, the following values are used ("$name" is automatically # replaced with the name of the entity): "The $name class" "The $name widget" # "The $name file" "is" "provides" "specifies" "contains" # "represents" "a" "an" "the" ABBREVIATE_BRIEF = # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then # Doxygen will generate a detailed section even if there is only a brief # description. ALWAYS_DETAILED_SEC = NO # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all # inherited members of a class in the documentation of that class as if those # members were ordinary class members. Constructors, destructors and assignment # operators of the base classes will not be shown. INLINE_INHERITED_MEMB = YES # If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full # path before files name in the file list and in the header files. If set # to NO the shortest path that makes the file name unique will be used. FULL_PATH_NAMES = YES # If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag # can be used to strip a user-defined part of the path. Stripping is # only done if one of the specified strings matches the left-hand part of # the path. The tag can be used to show relative paths in the file list. # If left blank the directory from which doxygen is run is used as the # path to strip. STRIP_FROM_PATH = # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of # the path mentioned in the documentation of a class, which tells # the reader which header file to include in order to use a class. # If left blank only the name of the header file containing the class # definition is used. Otherwise one should specify the include paths that # are normally passed to the compiler using the -I flag. STRIP_FROM_INC_PATH = # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter # (but less readable) file names. This can be useful is your file systems # doesn't support long names like on DOS, Mac, or CD-ROM. SHORT_NAMES = NO # If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen # will interpret the first line (until the first dot) of a JavaDoc-style # comment as the brief description. If set to NO, the JavaDoc # comments will behave just like regular Qt-style comments # (thus requiring an explicit @brief command for a brief description.) JAVADOC_AUTOBRIEF = YES # If the QT_AUTOBRIEF tag is set to YES then Doxygen will # interpret the first line (until the first dot) of a Qt-style # comment as the brief description. If set to NO, the comments # will behave just like regular Qt-style comments (thus requiring # an explicit \brief command for a brief description.) QT_AUTOBRIEF = NO # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen # treat a multi-line C++ special comment block (i.e. a block of //! or /// # comments) as a brief description. This used to be the default behaviour. # The new default is to treat a multi-line C++ comment block as a detailed # description. Set this tag to YES if you prefer the old behaviour instead. MULTILINE_CPP_IS_BRIEF = NO # If the DETAILS_AT_TOP tag is set to YES then Doxygen # will output the detailed description near the top, like JavaDoc. # If set to NO, the detailed description appears after the member # documentation. DETAILS_AT_TOP = NO # If the INHERIT_DOCS tag is set to YES (the default) then an undocumented # member inherits the documentation from any documented member that it # re-implements. INHERIT_DOCS = YES # If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce # a new page for each member. If set to NO, the documentation of a member will # be part of the file/class/namespace that contains it. SEPARATE_MEMBER_PAGES = NO # The TAB_SIZE tag can be used to set the number of spaces in a tab. # Doxygen uses this value to replace tabs by spaces in code fragments. TAB_SIZE = 8 # This tag can be used to specify a number of aliases that acts # as commands in the documentation. An alias has the form "name=value". # For example adding "sideeffect=\par Side Effects:\n" will allow you to # put the command \sideeffect (or @sideeffect) in the documentation, which # will result in a user-defined paragraph with heading "Side Effects:". # You can put \n's in the value part of an alias to insert newlines. ALIASES = # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C # sources only. Doxygen will then generate output that is more tailored for C. # For instance, some of the names that are used will be different. The list # of all members will be omitted, etc. OPTIMIZE_OUTPUT_FOR_C = NO # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java # sources only. Doxygen will then generate output that is more tailored for # Java. For instance, namespaces will be presented as packages, qualified # scopes will look different, etc. OPTIMIZE_OUTPUT_JAVA = NO # Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran # sources only. Doxygen will then generate output that is more tailored for # Fortran. OPTIMIZE_FOR_FORTRAN = NO # Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL # sources. Doxygen will then generate output that is tailored for # VHDL. OPTIMIZE_OUTPUT_VHDL = NO # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want # to include (a tag file for) the STL sources as input, then you should # set this tag to YES in order to let doxygen match functions declarations and # definitions whose arguments contain STL classes (e.g. func(std::string); v.s. # func(std::string) {}). This also make the inheritance and collaboration # diagrams that involve STL classes more complete and accurate. BUILTIN_STL_SUPPORT = YES # If you use Microsoft's C++/CLI language, you should set this option to YES to # enable parsing support. CPP_CLI_SUPPORT = NO # Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. # Doxygen will parse them like normal C++ but will assume all classes use public # instead of private inheritance when no explicit protection keyword is present. SIP_SUPPORT = NO # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC # tag is set to YES, then doxygen will reuse the documentation of the first # member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. DISTRIBUTE_GROUP_DOC = NO # Set the SUBGROUPING tag to YES (the default) to allow class member groups of # the same type (for instance a group of public functions) to be put as a # subgroup of that type (e.g. under the Public Functions section). Set it to # NO to prevent subgrouping. Alternatively, this can be done per class using # the \nosubgrouping command. SUBGROUPING = YES # When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum # is documented as struct, union, or enum with the name of the typedef. So # typedef struct TypeS {} TypeT, will appear in the documentation as a struct # with name TypeT. When disabled the typedef will appear as a member of a file, # namespace, or class. And the struct will be named TypeS. This can typically # be useful for C code in case the coding convention dictates that all compound # types are typedef'ed and only the typedef is referenced, never the tag name. TYPEDEF_HIDES_STRUCT = NO #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- # If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in # documentation are documented, even if no documentation was available. # Private class members and static file members will be hidden unless # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES EXTRACT_ALL = NO # If the EXTRACT_PRIVATE tag is set to YES all private members of a class # will be included in the documentation. EXTRACT_PRIVATE = YES # If the EXTRACT_STATIC tag is set to YES all static members of a file # will be included in the documentation. EXTRACT_STATIC = NO # If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) # defined locally in source files will be included in the documentation. # If set to NO only classes defined in header files are included. EXTRACT_LOCAL_CLASSES = YES # This flag is only useful for Objective-C code. When set to YES local # methods, which are defined in the implementation section but not in # the interface are included in the documentation. # If set to NO (the default) only methods in the interface are included. EXTRACT_LOCAL_METHODS = NO # If this flag is set to YES, the members of anonymous namespaces will be # extracted and appear in the documentation as a namespace called # 'anonymous_namespace{file}', where file will be replaced with the base # name of the file that contains the anonymous namespace. By default # anonymous namespace are hidden. EXTRACT_ANON_NSPACES = NO # If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all # undocumented members of documented classes, files or namespaces. # If set to NO (the default) these members will be included in the # various overviews, but no documentation section is generated. # This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_MEMBERS = NO # If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all # undocumented classes that are normally visible in the class hierarchy. # If set to NO (the default) these classes will be included in the various # overviews. This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_CLASSES = NO # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all # friend (class|struct|union) declarations. # If set to NO (the default) these declarations will be included in the # documentation. HIDE_FRIEND_COMPOUNDS = NO # If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any # documentation blocks found inside the body of a function. # If set to NO (the default) these blocks will be appended to the # function's detailed documentation block. HIDE_IN_BODY_DOCS = NO # The INTERNAL_DOCS tag determines if documentation # that is typed after a \internal command is included. If the tag is set # to NO (the default) then the documentation will be excluded. # Set it to YES to include the internal documentation. INTERNAL_DOCS = NO # If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate # file names in lower-case letters. If set to YES upper-case letters are also # allowed. This is useful if you have classes or files whose names only differ # in case and if your file system supports case sensitive file names. Windows # and Mac users are advised to set this option to NO. CASE_SENSE_NAMES = YES # If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen # will show members with their full class and namespace scopes in the # documentation. If set to YES the scope will be hidden. HIDE_SCOPE_NAMES = NO # If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen # will put a list of the files that are included by a file in the documentation # of that file. SHOW_INCLUDE_FILES = YES # If the INLINE_INFO tag is set to YES (the default) then a tag [inline] # is inserted in the documentation for inline members. INLINE_INFO = YES # If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen # will sort the (detailed) documentation of file and class members # alphabetically by member name. If set to NO the members will appear in # declaration order. SORT_MEMBER_DOCS = YES # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the # brief documentation of file, namespace and class members alphabetically # by member name. If set to NO (the default) the members will appear in # declaration order. SORT_BRIEF_DOCS = NO # If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the # hierarchy of group names into alphabetical order. If set to NO (the default) # the group names will appear in their defined order. SORT_GROUP_NAMES = NO # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be # sorted by fully-qualified names, including namespaces. If set to # NO (the default), the class list will be sorted only by class name, # not including the namespace part. # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. # Note: This option applies only to the class list, not to the # alphabetical list. SORT_BY_SCOPE_NAME = NO # The GENERATE_TODOLIST tag can be used to enable (YES) or # disable (NO) the todo list. This list is created by putting \todo # commands in the documentation. GENERATE_TODOLIST = YES # The GENERATE_TESTLIST tag can be used to enable (YES) or # disable (NO) the test list. This list is created by putting \test # commands in the documentation. GENERATE_TESTLIST = YES # The GENERATE_BUGLIST tag can be used to enable (YES) or # disable (NO) the bug list. This list is created by putting \bug # commands in the documentation. GENERATE_BUGLIST = YES # The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or # disable (NO) the deprecated list. This list is created by putting # \deprecated commands in the documentation. GENERATE_DEPRECATEDLIST = YES # The ENABLED_SECTIONS tag can be used to enable conditional # documentation sections, marked by \if sectionname ... \endif. ENABLED_SECTIONS = # The MAX_INITIALIZER_LINES tag determines the maximum number of lines # the initial value of a variable or define consists of for it to appear in # the documentation. If the initializer consists of more lines than specified # here it will be hidden. Use a value of 0 to hide initializers completely. # The appearance of the initializer of individual variables and defines in the # documentation can be controlled using \showinitializer or \hideinitializer # command in the documentation regardless of this setting. MAX_INITIALIZER_LINES = 30 # Set the SHOW_USED_FILES tag to NO to disable the list of files generated # at the bottom of the documentation of classes and structs. If set to YES the # list will mention the files that were used to generate the documentation. SHOW_USED_FILES = YES # If the sources in your project are distributed over multiple directories # then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy # in the documentation. The default is NO. SHOW_DIRECTORIES = NO # The FILE_VERSION_FILTER tag can be used to specify a program or script that # doxygen should invoke to get the current version for each file (typically from # the version control system). Doxygen will invoke the program by executing (via # popen()) the command <command> <input-file>, where <command> is the value of # the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file # provided by doxygen. Whatever the program writes to standard output # is used as the file version. See the manual for examples. FILE_VERSION_FILTER = #--------------------------------------------------------------------------- # configuration options related to warning and progress messages #--------------------------------------------------------------------------- # The QUIET tag can be used to turn on/off the messages that are generated # by doxygen. Possible values are YES and NO. If left blank NO is used. QUIET = NO # The WARNINGS tag can be used to turn on/off the warning messages that are # generated by doxygen. Possible values are YES and NO. If left blank # NO is used. WARNINGS = YES # If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings # for undocumented members. If EXTRACT_ALL is set to YES then this flag will # automatically be disabled. WARN_IF_UNDOCUMENTED = YES # If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for # potential errors in the documentation, such as not documenting some # parameters in a documented function, or documenting parameters that # don't exist or using markup commands wrongly. WARN_IF_DOC_ERROR = YES # This WARN_NO_PARAMDOC option can be abled to get warnings for # functions that are documented, but have no documentation for their parameters # or return value. If set to NO (the default) doxygen will only warn about # wrong or incomplete parameter documentation, but not about the absence of # documentation. WARN_NO_PARAMDOC = NO # The WARN_FORMAT tag determines the format of the warning messages that # doxygen can produce. The string should contain the $file, $line, and $text # tags, which will be replaced by the file and line number from which the # warning originated and the warning text. Optionally the format may contain # $version, which will be replaced by the version of the file (if it could # be obtained via FILE_VERSION_FILTER) WARN_FORMAT = "$file:$line: $text" # The WARN_LOGFILE tag can be used to specify a file to which warning # and error messages should be written. If left blank the output is written # to stderr. WARN_LOGFILE = #--------------------------------------------------------------------------- # configuration options related to the input files #--------------------------------------------------------------------------- # The INPUT tag can be used to specify the files and/or directories that contain # documented source files. You may enter file names like "myfile.cpp" or # directories like "/usr/src/myproject". Separate the files or directories # with spaces. INPUT = @srcdir@ # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is # also the default input encoding. Doxygen uses libiconv (or the iconv built # into libc) for the transcoding. See http://www.gnu.org/software/libiconv for # the list of possible encodings. INPUT_ENCODING = UTF-8 # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank the following patterns are tested: # *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx # *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90 FILE_PATTERNS = # The RECURSIVE tag can be used to turn specify whether or not subdirectories # should be searched for input files as well. Possible values are YES and NO. # If left blank NO is used. RECURSIVE = NO # The EXCLUDE tag can be used to specify files and/or directories that should # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. EXCLUDE = # The EXCLUDE_SYMLINKS tag can be used select whether or not files or # directories that are symbolic links (a Unix filesystem feature) are excluded # from the input. EXCLUDE_SYMLINKS = NO # If the value of the INPUT tag contains directories, you can use the # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude # certain files from those directories. Note that the wildcards are matched # against the file with absolute path, so to exclude all test directories # for example use the pattern */test/* EXCLUDE_PATTERNS = # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names # (namespaces, classes, functions, etc.) that should be excluded from the # output. The symbol name can be a fully qualified name, a word, or if the # wildcard * is used, a substring. Examples: ANamespace, AClass, # AClass::ANamespace, ANamespace::*Test EXCLUDE_SYMBOLS = # The EXAMPLE_PATH tag can be used to specify one or more files or # directories that contain example code fragments that are included (see # the \include command). EXAMPLE_PATH = # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank all files are included. EXAMPLE_PATTERNS = # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be # searched for input files to be used with the \include or \dontinclude # commands irrespective of the value of the RECURSIVE tag. # Possible values are YES and NO. If left blank NO is used. EXAMPLE_RECURSIVE = NO # The IMAGE_PATH tag can be used to specify one or more files or # directories that contain image that are included in the documentation (see # the \image command). IMAGE_PATH = # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program # by executing (via popen()) the command <filter> <input-file>, where <filter> # is the value of the INPUT_FILTER tag, and <input-file> is the name of an # input file. Doxygen will then use the output that the filter program writes # to standard output. If FILTER_PATTERNS is specified, this tag will be # ignored. INPUT_FILTER = # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern # basis. Doxygen will compare the file name with each pattern and apply the # filter if there is a match. The filters are a list of the form: # pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further # info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER # is applied to all files. FILTER_PATTERNS = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using # INPUT_FILTER) will be used to filter the input files when producing source # files to browse (i.e. when SOURCE_BROWSER is set to YES). FILTER_SOURCE_FILES = NO #--------------------------------------------------------------------------- # configuration options related to source browsing #--------------------------------------------------------------------------- # If the SOURCE_BROWSER tag is set to YES then a list of source files will # be generated. Documented entities will be cross-referenced with these sources. # Note: To get rid of all source code in the generated output, make sure also # VERBATIM_HEADERS is set to NO. SOURCE_BROWSER = NO # Setting the INLINE_SOURCES tag to YES will include the body # of functions and classes directly in the documentation. INLINE_SOURCES = NO # Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct # doxygen to hide any special comment blocks from generated source code # fragments. Normal C and C++ comments will always remain visible. STRIP_CODE_COMMENTS = YES # If the REFERENCED_BY_RELATION tag is set to YES (the default) # then for each documented function all documented # functions referencing it will be listed. REFERENCED_BY_RELATION = NO # If the REFERENCES_RELATION tag is set to YES (the default) # then for each documented function all documented entities # called/used by that function will be listed. REFERENCES_RELATION = NO # If the REFERENCES_LINK_SOURCE tag is set to YES (the default) # and SOURCE_BROWSER tag is set to YES, then the hyperlinks from # functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will # link to the source code. Otherwise they will link to the documentstion. REFERENCES_LINK_SOURCE = YES # If the USE_HTAGS tag is set to YES then the references to source code # will point to the HTML generated by the htags(1) tool instead of doxygen # built-in source browser. The htags tool is part of GNU's global source # tagging system (see http://www.gnu.org/software/global/global.html). You # will need version 4.8.6 or higher. USE_HTAGS = NO # If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen # will generate a verbatim copy of the header file for each class for # which an include is specified. Set to NO to disable this. VERBATIM_HEADERS = YES #--------------------------------------------------------------------------- # configuration options related to the alphabetical class index #--------------------------------------------------------------------------- # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index # of all compounds will be generated. Enable this if the project # contains a lot of classes, structs, unions or interfaces. ALPHABETICAL_INDEX = NO # If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then # the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns # in which this list will be split (can be a number in the range [1..20]) COLS_IN_ALPHA_INDEX = 5 # In case all classes in a project start with a common prefix, all # classes will be put under the same header in the alphabetical index. # The IGNORE_PREFIX tag can be used to specify one or more prefixes that # should be ignored while generating the index headers. IGNORE_PREFIX = #--------------------------------------------------------------------------- # configuration options related to the HTML output #--------------------------------------------------------------------------- # If the GENERATE_HTML tag is set to YES (the default) Doxygen will # generate HTML output. GENERATE_HTML = YES # The HTML_OUTPUT tag is used to specify where the HTML docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `html' will be used as the default path. HTML_OUTPUT = html # The HTML_FILE_EXTENSION tag can be used to specify the file extension for # each generated HTML page (for example: .htm,.php,.asp). If it is left blank # doxygen will generate files with .html extension. HTML_FILE_EXTENSION = .html # The HTML_HEADER tag can be used to specify a personal HTML header for # each generated HTML page. If it is left blank doxygen will generate a # standard header. HTML_HEADER = # The HTML_FOOTER tag can be used to specify a personal HTML footer for # each generated HTML page. If it is left blank doxygen will generate a # standard footer. HTML_FOOTER = # The HTML_STYLESHEET tag can be used to specify a user-defined cascading # style sheet that is used by each HTML page. It can be used to # fine-tune the look of the HTML output. If the tag is left blank doxygen # will generate a default style sheet. Note that doxygen will try to copy # the style sheet file to the HTML output directory, so don't put your own # stylesheet in the HTML output directory as well, or it will be erased! HTML_STYLESHEET = # If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, # files or namespaces will be aligned in HTML using tables. If set to # NO a bullet list will be used. HTML_ALIGN_MEMBERS = YES # If the GENERATE_HTMLHELP tag is set to YES, additional index files # will be generated that can be used as input for tools like the # Microsoft HTML help workshop to generate a compiled HTML help file (.chm) # of the generated HTML documentation. GENERATE_HTMLHELP = NO # If the GENERATE_DOCSET tag is set to YES, additional index files # will be generated that can be used as input for Apple's Xcode 3 # integrated development environment, introduced with OSX 10.5 (Leopard). # To create a documentation set, doxygen will generate a Makefile in the # HTML output directory. Running make will produce the docset in that # directory and running "make install" will install the docset in # ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find # it at startup. GENERATE_DOCSET = NO # When GENERATE_DOCSET tag is set to YES, this tag determines the name of the # feed. A documentation feed provides an umbrella under which multiple # documentation sets from a single provider (such as a company or product suite) # can be grouped. DOCSET_FEEDNAME = "Doxygen generated docs" # When GENERATE_DOCSET tag is set to YES, this tag specifies a string that # should uniquely identify the documentation set bundle. This should be a # reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen # will append .docset to the name. DOCSET_BUNDLE_ID = org.doxygen.Project # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML # documentation will contain sections that can be hidden and shown after the # page has loaded. For this to work a browser that supports # JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox # Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). HTML_DYNAMIC_SECTIONS = NO # If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can # be used to specify the file name of the resulting .chm file. You # can add a path in front of the file if the result should not be # written to the html output directory. CHM_FILE = # If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can # be used to specify the location (absolute path including file name) of # the HTML help compiler (hhc.exe). If non-empty doxygen will try to run # the HTML help compiler on the generated index.hhp. HHC_LOCATION = # If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag # controls if a separate .chi index file is generated (YES) or that # it should be included in the master .chm file (NO). GENERATE_CHI = NO # If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag # controls whether a binary table of contents is generated (YES) or a # normal table of contents (NO) in the .chm file. BINARY_TOC = NO # The TOC_EXPAND flag can be set to YES to add extra items for group members # to the contents of the HTML help documentation and to the tree view. TOC_EXPAND = NO # The DISABLE_INDEX tag can be used to turn on/off the condensed index at # top of each HTML page. The value NO (the default) enables the index and # the value YES disables it. DISABLE_INDEX = NO # This tag can be used to set the number of enum values (range [1..20]) # that doxygen will group on one line in the generated HTML documentation. ENUM_VALUES_PER_LINE = 4 # If the GENERATE_TREEVIEW tag is set to YES, a side panel will be # generated containing a tree-like index structure (just like the one that # is generated for HTML Help). For this to work a browser that supports # JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, # Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are # probably better off using the HTML help feature. GENERATE_TREEVIEW = YES # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be # used to set the initial width (in pixels) of the frame in which the tree # is shown. TREEVIEW_WIDTH = 250 #--------------------------------------------------------------------------- # configuration options related to the LaTeX output #--------------------------------------------------------------------------- # If the GENERATE_LATEX tag is set to YES (the default) Doxygen will # generate Latex output. GENERATE_LATEX = NO # The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `latex' will be used as the default path. LATEX_OUTPUT = latex # The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be # invoked. If left blank `latex' will be used as the default command name. LATEX_CMD_NAME = latex # The MAKEINDEX_CMD_NAME tag can be used to specify the command name to # generate index for LaTeX. If left blank `makeindex' will be used as the # default command name. MAKEINDEX_CMD_NAME = makeindex # If the COMPACT_LATEX tag is set to YES Doxygen generates more compact # LaTeX documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_LATEX = NO # The PAPER_TYPE tag can be used to set the paper type that is used # by the printer. Possible values are: a4, a4wide, letter, legal and # executive. If left blank a4wide will be used. PAPER_TYPE = a4wide # The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX # packages that should be included in the LaTeX output. EXTRA_PACKAGES = # The LATEX_HEADER tag can be used to specify a personal LaTeX header for # the generated latex document. The header should contain everything until # the first chapter. If it is left blank doxygen will generate a # standard header. Notice: only use this tag if you know what you are doing! LATEX_HEADER = # If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated # is prepared for conversion to pdf (using ps2pdf). The pdf file will # contain links (just like the HTML output) instead of page references # This makes the output suitable for online browsing using a pdf viewer. PDF_HYPERLINKS = YES # If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of # plain latex in the generated Makefile. Set this option to YES to get a # higher quality PDF documentation. USE_PDFLATEX = YES # If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. # command to the generated LaTeX files. This will instruct LaTeX to keep # running if errors occur, instead of asking the user for help. # This option is also used when generating formulas in HTML. LATEX_BATCHMODE = NO # If LATEX_HIDE_INDICES is set to YES then doxygen will not # include the index chapters (such as File Index, Compound Index, etc.) # in the output. LATEX_HIDE_INDICES = NO #--------------------------------------------------------------------------- # configuration options related to the RTF output #--------------------------------------------------------------------------- # If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output # The RTF output is optimized for Word 97 and may not look very pretty with # other RTF readers or editors. GENERATE_RTF = NO # The RTF_OUTPUT tag is used to specify where the RTF docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `rtf' will be used as the default path. RTF_OUTPUT = rtf # If the COMPACT_RTF tag is set to YES Doxygen generates more compact # RTF documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_RTF = NO # If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated # will contain hyperlink fields. The RTF file will # contain links (just like the HTML output) instead of page references. # This makes the output suitable for online browsing using WORD or other # programs which support those fields. # Note: wordpad (write) and others do not support links. RTF_HYPERLINKS = NO # Load stylesheet definitions from file. Syntax is similar to doxygen's # config file, i.e. a series of assignments. You only have to provide # replacements, missing definitions are set to their default value. RTF_STYLESHEET_FILE = # Set optional variables used in the generation of an rtf document. # Syntax is similar to doxygen's config file. RTF_EXTENSIONS_FILE = #--------------------------------------------------------------------------- # configuration options related to the man page output #--------------------------------------------------------------------------- # If the GENERATE_MAN tag is set to YES (the default) Doxygen will # generate man pages GENERATE_MAN = NO # The MAN_OUTPUT tag is used to specify where the man pages will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `man' will be used as the default path. MAN_OUTPUT = man # The MAN_EXTENSION tag determines the extension that is added to # the generated man pages (default is the subroutine's section .3) MAN_EXTENSION = .3 # If the MAN_LINKS tag is set to YES and Doxygen generates man output, # then it will generate one additional man file for each entity # documented in the real man page(s). These additional files # only source the real man page, but without them the man command # would be unable to find the correct page. The default is NO. MAN_LINKS = NO #--------------------------------------------------------------------------- # configuration options related to the XML output #--------------------------------------------------------------------------- # If the GENERATE_XML tag is set to YES Doxygen will # generate an XML file that captures the structure of # the code including all documentation. GENERATE_XML = NO # The XML_OUTPUT tag is used to specify where the XML pages will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `xml' will be used as the default path. XML_OUTPUT = xml # The XML_SCHEMA tag can be used to specify an XML schema, # which can be used by a validating XML parser to check the # syntax of the XML files. XML_SCHEMA = # The XML_DTD tag can be used to specify an XML DTD, # which can be used by a validating XML parser to check the # syntax of the XML files. XML_DTD = # If the XML_PROGRAMLISTING tag is set to YES Doxygen will # dump the program listings (including syntax highlighting # and cross-referencing information) to the XML output. Note that # enabling this will significantly increase the size of the XML output. XML_PROGRAMLISTING = YES #--------------------------------------------------------------------------- # configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- # If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will # generate an AutoGen Definitions (see autogen.sf.net) file # that captures the structure of the code including all # documentation. Note that this feature is still experimental # and incomplete at the moment. GENERATE_AUTOGEN_DEF = NO #--------------------------------------------------------------------------- # configuration options related to the Perl module output #--------------------------------------------------------------------------- # If the GENERATE_PERLMOD tag is set to YES Doxygen will # generate a Perl module file that captures the structure of # the code including all documentation. Note that this # feature is still experimental and incomplete at the # moment. GENERATE_PERLMOD = NO # If the PERLMOD_LATEX tag is set to YES Doxygen will generate # the necessary Makefile rules, Perl scripts and LaTeX code to be able # to generate PDF and DVI output from the Perl module output. PERLMOD_LATEX = NO # If the PERLMOD_PRETTY tag is set to YES the Perl module output will be # nicely formatted so it can be parsed by a human reader. This is useful # if you want to understand what is going on. On the other hand, if this # tag is set to NO the size of the Perl module output will be much smaller # and Perl will parse it just the same. PERLMOD_PRETTY = YES # The names of the make variables in the generated doxyrules.make file # are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. # This is useful so different doxyrules.make files included by the same # Makefile don't overwrite each other's variables. PERLMOD_MAKEVAR_PREFIX = #--------------------------------------------------------------------------- # Configuration options related to the preprocessor #--------------------------------------------------------------------------- # If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will # evaluate all C-preprocessor directives found in the sources and include # files. ENABLE_PREPROCESSING = YES # If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro # names in the source code. If set to NO (the default) only conditional # compilation will be performed. Macro expansion can be done in a controlled # way by setting EXPAND_ONLY_PREDEF to YES. MACRO_EXPANSION = NO # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES # then the macro expansion is limited to the macros specified with the # PREDEFINED and EXPAND_AS_DEFINED tags. EXPAND_ONLY_PREDEF = NO # If the SEARCH_INCLUDES tag is set to YES (the default) the includes files # in the INCLUDE_PATH (see below) will be search if a #include is found. SEARCH_INCLUDES = YES # The INCLUDE_PATH tag can be used to specify one or more directories that # contain include files that are not input files but should be processed by # the preprocessor. INCLUDE_PATH = # You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard # patterns (like *.h and *.hpp) to filter out the header-files in the # directories. If left blank, the patterns specified with FILE_PATTERNS will # be used. INCLUDE_FILE_PATTERNS = # The PREDEFINED tag can be used to specify one or more macro names that # are defined before the preprocessor is started (similar to the -D option of # gcc). The argument of the tag is a list of macros of the form: name # or name=definition (no spaces). If the definition and the = are # omitted =1 is assumed. To prevent a macro definition from being # undefined via #undef or recursively expanded use the := operator # instead of the = operator. PREDEFINED = # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then # this tag can be used to specify a list of macro names that should be expanded. # The macro definition that is found in the sources will be used. # Use the PREDEFINED tag if you want to use a different macro definition. EXPAND_AS_DEFINED = # If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then # doxygen's preprocessor will remove all function-like macros that are alone # on a line, have an all uppercase name, and do not end with a semicolon. Such # function macros are typically used for boiler-plate code, and will confuse # the parser if not removed. SKIP_FUNCTION_MACROS = YES #--------------------------------------------------------------------------- # Configuration::additions related to external references #--------------------------------------------------------------------------- # The TAGFILES option can be used to specify one or more tagfiles. # Optionally an initial location of the external documentation # can be added for each tagfile. The format of a tag file without # this location is as follows: # TAGFILES = file1 file2 ... # Adding location for the tag files is done as follows: # TAGFILES = file1=loc1 "file2 = loc2" ... # where "loc1" and "loc2" can be relative or absolute paths or # URLs. If a location is present for each tag, the installdox tool # does not have to be run to correct the links. # Note that each tag file must have a unique name # (where the name does NOT include the path) # If a tag file is not located in the directory in which doxygen # is run, you must also specify the path to the tagfile here. TAGFILES = # When a file name is specified after GENERATE_TAGFILE, doxygen will create # a tag file that is based on the input files it reads. GENERATE_TAGFILE = # If the ALLEXTERNALS tag is set to YES all external classes will be listed # in the class index. If set to NO only the inherited external classes # will be listed. ALLEXTERNALS = NO # If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed # in the modules index. If set to NO, only the current project's groups will # be listed. EXTERNAL_GROUPS = YES # The PERL_PATH should be the absolute path and name of the perl script # interpreter (i.e. the result of `which perl'). PERL_PATH = /usr/bin/perl #--------------------------------------------------------------------------- # Configuration options related to the dot tool #--------------------------------------------------------------------------- # If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will # generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base # or super classes. Setting the tag to NO turns the diagrams off. Note that # this option is superseded by the HAVE_DOT option below. This is only a # fallback. It is recommended to install and use dot, since it yields more # powerful graphs. CLASS_DIAGRAMS = NO # You can define message sequence charts within doxygen comments using the \msc # command. Doxygen will then run the mscgen tool (see # http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the # documentation. The MSCGEN_PATH tag allows you to specify the directory where # the mscgen tool resides. If left empty the tool is assumed to be found in the # default search path. MSCGEN_PATH = # If set to YES, the inheritance and collaboration graphs will hide # inheritance and usage relations if the target is undocumented # or is not a class. HIDE_UNDOC_RELATIONS = YES # If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is # available from the path. This tool is part of Graphviz, a graph visualization # toolkit from AT&T and Lucent Bell Labs. The other options in this section # have no effect if this option is set to NO (the default) HAVE_DOT = YES # If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect inheritance relations. Setting this tag to YES will force the # the CLASS_DIAGRAMS tag to NO. CLASS_GRAPH = YES # If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect implementation dependencies (inheritance, containment, and # class references variables) of the class with other documented classes. COLLABORATION_GRAPH = YES # If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen # will generate a graph for groups, showing the direct groups dependencies GROUP_GRAPHS = YES # If the UML_LOOK tag is set to YES doxygen will generate inheritance and # collaboration diagrams in a style similar to the OMG's Unified Modeling # Language. UML_LOOK = NO # If set to YES, the inheritance and collaboration graphs will show the # relations between templates and their instances. TEMPLATE_RELATIONS = NO # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT # tags are set to YES then doxygen will generate a graph for each documented # file showing the direct and indirect include dependencies of the file with # other documented files. INCLUDE_GRAPH = YES # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and # HAVE_DOT tags are set to YES then doxygen will generate a graph for each # documented header file showing the documented files that directly or # indirectly include this file. INCLUDED_BY_GRAPH = YES # If the CALL_GRAPH and HAVE_DOT options are set to YES then # doxygen will generate a call dependency graph for every global function # or class method. Note that enabling this option will significantly increase # the time of a run. So in most cases it will be better to enable call graphs # for selected functions only using the \callgraph command. CALL_GRAPH = NO # If the CALLER_GRAPH and HAVE_DOT tags are set to YES then # doxygen will generate a caller dependency graph for every global function # or class method. Note that enabling this option will significantly increase # the time of a run. So in most cases it will be better to enable caller # graphs for selected functions only using the \callergraph command. CALLER_GRAPH = NO # If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen # will graphical hierarchy of all classes instead of a textual one. GRAPHICAL_HIERARCHY = YES # If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES # then doxygen will show the dependencies a directory has on other directories # in a graphical way. The dependency relations are determined by the #include # relations between the files in the directories. DIRECTORY_GRAPH = YES # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images # generated by dot. Possible values are png, jpg, or gif # If left blank png will be used. DOT_IMAGE_FORMAT = png # The tag DOT_PATH can be used to specify the path where the dot tool can be # found. If left blank, it is assumed the dot tool can be found in the path. DOT_PATH = # The DOTFILE_DIRS tag can be used to specify one or more directories that # contain dot files that are included in the documentation (see the # \dotfile command). DOTFILE_DIRS = # The MAX_DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of # nodes that will be shown in the graph. If the number of nodes in a graph # becomes larger than this value, doxygen will truncate the graph, which is # visualized by representing a node as a red box. Note that doxygen if the # number of direct children of the root node in a graph is already larger than # DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note # that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. DOT_GRAPH_MAX_NODES = 50 # The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the # graphs generated by dot. A depth value of 3 means that only nodes reachable # from the root by following a path via at most 3 edges will be shown. Nodes # that lay further from the root node will be omitted. Note that setting this # option to 1 or 2 may greatly reduce the computation time needed for large # code bases. Also note that the size of a graph can be further restricted by # DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. MAX_DOT_GRAPH_DEPTH = 0 # Set the DOT_TRANSPARENT tag to YES to generate images with a transparent # background. This is enabled by default, which results in a transparent # background. Warning: Depending on the platform used, enabling this option # may lead to badly anti-aliased labels on the edges of a graph (i.e. they # become hard to read). DOT_TRANSPARENT = YES # Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output # files in one run (i.e. multiple -o and -T options on the command line). This # makes dot run faster, but since only newer versions of dot (>1.8.10) # support this, this feature is disabled by default. DOT_MULTI_TARGETS = NO # If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will # generate a legend page explaining the meaning of the various boxes and # arrows in the dot generated graphs. GENERATE_LEGEND = YES # If the DOT_CLEANUP tag is set to YES (the default) Doxygen will # remove the intermediate dot files that are used to generate # the various graphs. DOT_CLEANUP = YES #--------------------------------------------------------------------------- # Configuration::additions related to the search engine #--------------------------------------------------------------------------- # The SEARCHENGINE tag specifies whether or not a search engine should be # used. If set to NO the values of all tags below this one will be ignored. SEARCHENGINE = NO ��������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/styleparser.yy�������������������������������������������������0000644�0001750�0001750�00000013211�11672675563�017423� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������%{ /* * Copyright (C) 1999-2007 Lorenzo Bettini <http://www.lorenzobettini.it> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ #include <stdio.h> #include <stdlib.h> #include <iostream> #include <string> #include "formatterfactory.h" #include "colors.h" #include "keys.h" #include "parsestyles.h" #include "fileutil.h" #include "stylekey.h" #include "parserexception.h" #include "settings.h" using std::cerr; using std::string; using namespace srchilite; static int yyparse() ; static void yyerror( const char *s ) ; static void yyerror( const string &s ) ; int line = 1 ; extern int stylesc_lex() ; extern FILE *stylesc_in ; extern int stylesc_lex_destroy (void); static string bodyBgColor; static void updateBgColor(const std::string *); // to generate the formatter for each language element static FormatterFactory *formatterFactory; /// where we store possible errors static string errorBuffer; %} %union { int tok ; /* command */ const std::string * string ; /* string : id, ... */ srchilite::StyleConstant flag ; srchilite::StyleConstants *styleconstants; srchilite::KeyList *keylist; } ; %token <flag> BOLD ITALICS UNDERLINE FIXED NOTFIXED NOREF %token <string> KEY COLOR BG_COLOR STRINGDEF %token <tok> BG_T BODY_BG_COLOR %type <flag> value %type <styleconstants> stylevalues values %type <string> color bgcolor %type <keylist> keylist %destructor { if ($$) delete $$; } keylist KEY COLOR BG_COLOR STRINGDEF color bgcolor %% stylefile : { /* allow empty files */ } | statements ; statements : statements statement | statement ; statement : option | bodybgcolor ; option : keylist color bgcolor { //printSequence( $1 ) ; //printMessage_noln( ": " ) ; //printMessage_noln( ($2 ? *$2 : "") ) ; //printMessage_noln( " bg: " ) ; //printMessage_noln( ($3 ? *$3 : "") ) ; } stylevalues ';' { KeyType key; KeyList *keylist = $1; StyleConstantsPtr stylevalues = StyleConstantsPtr($5); for (KeyList::const_iterator it = keylist->begin(); it != keylist->end(); ++it) { key = *it; if (!formatterFactory->createFormatter(key, ($2 ? *$2 : ""), ($3 ? *$3 : ""), stylevalues)) { errorBuffer = "already defined " + *it; //yyerror(alreadydef); delete keylist; if ($2) delete $2; if ($3) delete $3; YYERROR; } } delete keylist; if ($2) delete $2; if ($3) delete $3; } ; keylist : keylist ',' KEY { $1->push_back(*$3); $$ = $1; delete $3; } | KEY { $$ = new KeyList; $$->push_back(*$1); delete $1; } ; color : { $$ = 0; } | COLOR { $$ = $1;} | STRINGDEF { $$ = $1; } ; bgcolor : { $$ = 0; } | BG_T ':' COLOR { $$ = $3;} | BG_T ':' STRINGDEF { $$ = $3; } ; bodybgcolor : BODY_BG_COLOR COLOR ';' { updateBgColor($2); } | BODY_BG_COLOR STRINGDEF ';' { updateBgColor($2); } ; stylevalues : { $$ = 0 ; } | values { $$ = $1; } ; values : values ',' value { $$ = $1; $$->push_back($3) ; } | value { $$ = new StyleConstants; $$->push_back($1); } ; value : BOLD { $$ = ISBOLD ; } | ITALICS { $$ = ISITALIC ; } | UNDERLINE { $$ = ISUNDERLINE ; } | FIXED { $$ = ISFIXED ; } | NOTFIXED { $$ = ISNOTFIXED ; } | NOREF { $$ = ISNOREF ; } ; %% string current_file; namespace srchilite { void parseStyles(const string &name, FormatterFactory *genFactory, string &bodyBgColor_) { parseStyles(Settings::retrieveDataDir(), name, genFactory, bodyBgColor_); } void parseStyles(const string &path, const string &name, FormatterFactory *genFactory, string &bodyBgColor_) { formatterFactory = genFactory; errorBuffer = ""; int result = 1; line = 1; // opens the file for yylex stylesc_in = open_data_file_stream(path, name); if (contains_path(name)) current_file = name; else current_file = (path.size() ? path + "/" : "") + name; bodyBgColor = ""; result = yyparse() ; bodyBgColor_ = bodyBgColor; fclose(stylesc_in); // free scanner memory stylesc_lex_destroy(); if (result != 0 || errorBuffer.size()) { throw ParserException(errorBuffer, current_file, line); } } } void yyerror( const char *s ) { errorBuffer = s; } void yyerror(const string &s) { yyerror(s.c_str()); } void parseStyleError(const std::string &error) { yyerror(error); } void updateBgColor(const std::string *c) { if (bodyBgColor != "") yyerror("bgcolor already defined"); else bodyBgColor = *c; // we don't need it anymore delete c; } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/stylescanner.cc������������������������������������������������0000644�0001750�0001750�00000155110�11675044736�017504� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#line 2 "../../../lib/srchilite/stylescanner.cc" #line 4 "../../../lib/srchilite/stylescanner.cc" #define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ #define yy_create_buffer stylesc__create_buffer #define yy_delete_buffer stylesc__delete_buffer #define yy_flex_debug stylesc__flex_debug #define yy_init_buffer stylesc__init_buffer #define yy_flush_buffer stylesc__flush_buffer #define yy_load_buffer_state stylesc__load_buffer_state #define yy_switch_to_buffer stylesc__switch_to_buffer #define yyin stylesc_in #define yyleng stylesc_leng #define yylex stylesc_lex #define yylineno stylesc_lineno #define yyout stylesc_out #define yyrestart stylesc_restart #define yytext stylesc_text #define yywrap stylesc_wrap #define yyalloc stylesc_alloc #define yyrealloc stylesc_realloc #define yyfree stylesc_free #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 #define YY_FLEX_SUBMINOR_VERSION 35 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif /* First, we deal with platform-specific or compiler-specific issues. */ /* begin standard C headers. */ #include <stdio.h> #include <string.h> #include <errno.h> #include <stdlib.h> /* end standard C headers. */ /* flex integer type definitions */ #ifndef FLEXINT_H #define FLEXINT_H /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */ #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include <inttypes.h> typedef int8_t flex_int8_t; typedef uint8_t flex_uint8_t; typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; #else typedef signed char flex_int8_t; typedef short int flex_int16_t; typedef int flex_int32_t; typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; /* Limits of integral types. */ #ifndef INT8_MIN #define INT8_MIN (-128) #endif #ifndef INT16_MIN #define INT16_MIN (-32767-1) #endif #ifndef INT32_MIN #define INT32_MIN (-2147483647-1) #endif #ifndef INT8_MAX #define INT8_MAX (127) #endif #ifndef INT16_MAX #define INT16_MAX (32767) #endif #ifndef INT32_MAX #define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX #define UINT8_MAX (255U) #endif #ifndef UINT16_MAX #define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX #define UINT32_MAX (4294967295U) #endif #endif /* ! C99 */ #endif /* ! FLEXINT_H */ #ifdef __cplusplus /* The "const" storage-class-modifier is valid. */ #define YY_USE_CONST #else /* ! __cplusplus */ /* C99 requires __STDC__ to be defined as 1. */ #if defined (__STDC__) #define YY_USE_CONST #endif /* defined (__STDC__) */ #endif /* ! __cplusplus */ #ifdef YY_USE_CONST #define yyconst const #else #define yyconst #endif /* Returned upon end-of-file. */ #define YY_NULL 0 /* Promotes a possibly negative, possibly signed char to an unsigned * integer for use as an array index. If the signed char is negative, * we want to instead treat it as an 8-bit unsigned char, hence the * double cast. */ #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) /* Enter a start condition. This macro really ought to take a parameter, * but we do it the disgusting crufty way forced on us by the ()-less * definition of BEGIN. */ #define BEGIN (yy_start) = 1 + 2 * /* Translate the current start state into a value that can be later handed * to BEGIN to return to the state. The YYSTATE alias is for lex * compatibility. */ #define YY_START (((yy_start) - 1) / 2) #define YYSTATE YY_START /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) /* Special action meaning "start processing a new file". */ #define YY_NEW_FILE stylesc_restart(stylesc_in ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ #ifndef YY_BUF_SIZE #ifdef __ia64__ /* On IA-64, the buffer size is 16k, not 8k. * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. * Ditto for the __ia64__ case accordingly. */ #define YY_BUF_SIZE 32768 #else #define YY_BUF_SIZE 16384 #endif /* __ia64__ */ #endif /* The state buf must be large enough to hold one state per character in the main buffer. */ #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) #ifndef YY_TYPEDEF_YY_BUFFER_STATE #define YY_TYPEDEF_YY_BUFFER_STATE typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif extern int stylesc_leng; extern FILE *stylesc_in, *stylesc_out; #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 #define YY_LESS_LINENO(n) /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ do \ { \ /* Undo effects of setting up stylesc_text. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ *yy_cp = (yy_hold_char); \ YY_RESTORE_YY_MORE_OFFSET \ (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ YY_DO_BEFORE_ACTION; /* set up stylesc_text again */ \ } \ while ( 0 ) #define unput(c) yyunput( c, (yytext_ptr) ) #ifndef YY_TYPEDEF_YY_SIZE_T #define YY_TYPEDEF_YY_SIZE_T typedef size_t yy_size_t; #endif #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state { FILE *yy_input_file; char *yy_ch_buf; /* input buffer */ char *yy_buf_pos; /* current position in input buffer */ /* Size of input buffer in bytes, not including room for EOB * characters. */ yy_size_t yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. */ int yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to * delete it. */ int yy_is_our_buffer; /* Whether this is an "interactive" input source; if so, and * if we're using stdio for input, then we want to use getc() * instead of fread(), to make sure we stop fetching input after * each newline. */ int yy_is_interactive; /* Whether we're considered to be at the beginning of a line. * If so, '^' rules will be active on the next match, otherwise * not. */ int yy_at_bol; int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ /* Whether to try to fill the input buffer when we reach the * end of it. */ int yy_fill_buffer; int yy_buffer_status; #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 /* When an EOF's been seen but there's still some text to process * then we mark the buffer as YY_EOF_PENDING, to indicate that we * shouldn't try reading from the input source any more. We might * still have a bunch of tokens to match, though, because of * possible backing-up. * * When we actually see the EOF, we change the status to "new" * (via stylesc_restart()), so that the user can continue scanning by * just pointing stylesc_in at a new input file. */ #define YY_BUFFER_EOF_PENDING 2 }; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ /* Stack of input buffers. */ static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ /* We provide macros for accessing buffer states in case in the * future we want to put the buffer states in a more general * "scanner state". * * Returns the top of the stack, or NULL. */ #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ : NULL) /* Same as previous macro, but useful when we know that the buffer stack is not * NULL or when we need an lvalue. For internal use only. */ #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] /* yy_hold_char holds the character lost when stylesc_text is formed. */ static char yy_hold_char; static int yy_n_chars; /* number of characters read into yy_ch_buf */ int stylesc_leng; /* Points to current character in buffer. */ static char *yy_c_buf_p = (char *) 0; static int yy_init = 0; /* whether we need to initialize */ static int yy_start = 0; /* start state number */ /* Flag which is used to allow stylesc_wrap()'s to do buffer switches * instead of setting up a fresh stylesc_in. A bit of a hack ... */ static int yy_did_buffer_switch_on_eof; void stylesc_restart (FILE *input_file ); void stylesc__switch_to_buffer (YY_BUFFER_STATE new_buffer ); YY_BUFFER_STATE stylesc__create_buffer (FILE *file,int size ); void stylesc__delete_buffer (YY_BUFFER_STATE b ); void stylesc__flush_buffer (YY_BUFFER_STATE b ); void stylesc_push_buffer_state (YY_BUFFER_STATE new_buffer ); void stylesc_pop_buffer_state (void ); static void stylesc_ensure_buffer_stack (void ); static void stylesc__load_buffer_state (void ); static void stylesc__init_buffer (YY_BUFFER_STATE b,FILE *file ); #define YY_FLUSH_BUFFER stylesc__flush_buffer(YY_CURRENT_BUFFER ) YY_BUFFER_STATE stylesc__scan_buffer (char *base,yy_size_t size ); YY_BUFFER_STATE stylesc__scan_string (yyconst char *yy_str ); YY_BUFFER_STATE stylesc__scan_bytes (yyconst char *bytes,int len ); void *stylesc_alloc (yy_size_t ); void *stylesc_realloc (void *,yy_size_t ); void stylesc_free (void * ); #define yy_new_buffer stylesc__create_buffer #define yy_set_interactive(is_interactive) \ { \ if ( ! YY_CURRENT_BUFFER ){ \ stylesc_ensure_buffer_stack (); \ YY_CURRENT_BUFFER_LVALUE = \ stylesc__create_buffer(stylesc_in,YY_BUF_SIZE ); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ } #define yy_set_bol(at_bol) \ { \ if ( ! YY_CURRENT_BUFFER ){\ stylesc_ensure_buffer_stack (); \ YY_CURRENT_BUFFER_LVALUE = \ stylesc__create_buffer(stylesc_in,YY_BUF_SIZE ); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ } #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) /* Begin user sect3 */ #define stylesc_wrap(n) 1 #define YY_SKIP_YYWRAP typedef unsigned char YY_CHAR; FILE *stylesc_in = (FILE *) 0, *stylesc_out = (FILE *) 0; typedef int yy_state_type; extern int stylesc_lineno; int stylesc_lineno = 1; extern char *stylesc_text; #define yytext_ptr stylesc_text static yy_state_type yy_get_previous_state (void ); static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); static int yy_get_next_buffer (void ); static void yy_fatal_error (yyconst char msg[] ); /* Done after the current pattern has been matched and before the * corresponding action - sets up stylesc_text. */ #define YY_DO_BEFORE_ACTION \ (yytext_ptr) = yy_bp; \ stylesc_leng = (size_t) (yy_cp - yy_bp); \ (yy_hold_char) = *yy_cp; \ *yy_cp = '\0'; \ (yy_c_buf_p) = yy_cp; #define YY_NUM_RULES 27 #define YY_END_OF_BUFFER 28 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info { flex_int32_t yy_verify; flex_int32_t yy_nxt; }; static yyconst flex_int16_t yy_accept[122] = { 0, 0, 0, 0, 0, 0, 0, 28, 26, 1, 25, 2, 1, 19, 15, 26, 17, 16, 18, 9, 18, 18, 12, 18, 10, 18, 18, 18, 18, 18, 11, 18, 18, 4, 1, 5, 2, 1, 23, 1, 24, 2, 1, 22, 23, 1, 1, 3, 18, 8, 18, 18, 18, 18, 18, 13, 18, 18, 18, 18, 18, 18, 18, 18, 21, 20, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 6, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 14, 18, 18, 18, 18, 18, 18, 18, 18, 7, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 0 } ; static yyconst flex_int32_t yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 1, 1, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 11, 1, 1, 1, 1, 1, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 1, 13, 1, 1, 12, 1, 14, 15, 16, 17, 18, 19, 20, 21, 22, 12, 23, 24, 12, 25, 26, 27, 12, 28, 12, 29, 30, 12, 31, 12, 32, 12, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } ; static yyconst flex_int32_t yy_meta[33] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 } ; static yyconst flex_int16_t yy_base[125] = { 0, 0, 0, 31, 35, 39, 51, 156, 157, 153, 157, 157, 149, 157, 157, 145, 157, 157, 0, 38, 120, 137, 0, 122, 0, 41, 121, 29, 130, 129, 0, 125, 127, 157, 142, 157, 157, 138, 157, 140, 157, 157, 136, 157, 55, 138, 134, 157, 0, 122, 33, 24, 123, 108, 51, 0, 107, 120, 108, 104, 114, 116, 107, 104, 157, 157, 101, 110, 107, 104, 92, 97, 98, 88, 101, 100, 92, 93, 88, 0, 90, 84, 88, 87, 87, 88, 83, 55, 82, 87, 85, 80, 85, 76, 75, 71, 75, 70, 79, 0, 78, 77, 63, 65, 51, 62, 73, 73, 0, 61, 60, 64, 63, 62, 65, 53, 58, 49, 48, 52, 31, 157, 83, 85, 46 } ; static yyconst flex_int16_t yy_def[125] = { 0, 121, 1, 122, 122, 123, 123, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 121, 121, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 0, 121, 121, 121 } ; static yyconst flex_int16_t yy_nxt[190] = { 0, 8, 9, 10, 11, 12, 13, 14, 15, 8, 16, 17, 18, 8, 18, 19, 20, 21, 18, 22, 23, 18, 24, 18, 18, 25, 26, 27, 28, 29, 30, 31, 32, 34, 35, 36, 37, 34, 35, 36, 37, 39, 40, 41, 42, 43, 69, 67, 48, 79, 70, 58, 44, 39, 40, 41, 42, 43, 49, 59, 55, 64, 50, 68, 44, 73, 51, 56, 65, 74, 96, 109, 120, 79, 119, 97, 118, 110, 79, 117, 116, 115, 79, 98, 33, 33, 38, 38, 114, 113, 79, 112, 111, 108, 79, 79, 79, 107, 106, 105, 104, 103, 102, 79, 101, 100, 99, 79, 79, 95, 79, 94, 93, 92, 79, 91, 79, 90, 89, 88, 79, 87, 79, 86, 85, 79, 84, 83, 82, 81, 80, 79, 78, 77, 76, 75, 72, 71, 66, 46, 45, 46, 45, 46, 45, 63, 62, 61, 60, 57, 54, 53, 52, 47, 46, 45, 121, 7, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121 } ; static yyconst flex_int16_t yy_chk[190] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 51, 50, 124, 120, 51, 27, 5, 6, 6, 6, 6, 6, 19, 27, 25, 44, 19, 50, 6, 54, 19, 25, 44, 54, 87, 104, 119, 118, 117, 87, 116, 104, 115, 114, 113, 112, 111, 87, 122, 122, 123, 123, 110, 109, 107, 106, 105, 103, 102, 101, 100, 98, 97, 96, 95, 94, 93, 92, 91, 90, 89, 88, 86, 85, 84, 83, 82, 81, 80, 78, 77, 76, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 63, 62, 61, 60, 59, 58, 57, 56, 53, 52, 49, 46, 45, 42, 39, 37, 34, 32, 31, 29, 28, 26, 23, 21, 20, 15, 12, 9, 7, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121 } ; static yy_state_type yy_last_accepting_state; static char *yy_last_accepting_cpos; extern int stylesc__flex_debug; int stylesc__flex_debug = 0; /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. */ #define REJECT reject_used_but_not_detected #define yymore() yymore_used_but_not_detected #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET char *stylesc_text; #line 1 "../../../lib/srchilite/stylescanner.ll" #line 2 "../../../lib/srchilite/stylescanner.ll" /* * Copyright (C) 1999-2007 Lorenzo Bettini, http://www.lorenzobettini.it * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ #include <stdlib.h> #include "stylekey.h" #include "formatterfactory.h" #include "styleparser.h" #include <sstream> #include "parsestyles.h" using namespace srchilite; static std::ostringstream buff; extern int line ; //#define DEBUG_SCANNER #ifdef DEBUG_SCANNER #include <iostream> // for debug #define DEB(s) std::cerr << s << std::endl; #define DEB2(s,s2) std::cerr << s << ": " << s2 << std::endl; #else #define DEB(s) #define DEB2(s,s2) #endif static void buffer(const char *s); static const std::string *flush_buffer(); #line 611 "../../../lib/srchilite/stylescanner.cc" #define INITIAL 0 #define COMMENT_STATE 1 #define STRING_STATE 2 #ifndef YY_NO_UNISTD_H /* Special case for "unistd.h", since it is non-ANSI. We include it way * down here because we want the user's section 1 to have been scanned first. * The user has a chance to override it with an option. */ #include <unistd.h> #endif #ifndef YY_EXTRA_TYPE #define YY_EXTRA_TYPE void * #endif static int yy_init_globals (void ); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ int stylesc_lex_destroy (void ); int stylesc_get_debug (void ); void stylesc_set_debug (int debug_flag ); YY_EXTRA_TYPE stylesc_get_extra (void ); void stylesc_set_extra (YY_EXTRA_TYPE user_defined ); FILE *stylesc_get_in (void ); void stylesc_set_in (FILE * in_str ); FILE *stylesc_get_out (void ); void stylesc_set_out (FILE * out_str ); int stylesc_get_leng (void ); char *stylesc_get_text (void ); int stylesc_get_lineno (void ); void stylesc_set_lineno (int line_number ); /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus extern "C" int stylesc_wrap (void ); #else extern int stylesc_wrap (void ); #endif #endif static void yyunput (int c,char *buf_ptr ); #ifndef yytext_ptr static void yy_flex_strncpy (char *,yyconst char *,int ); #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * ); #endif #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (void ); #else static int input (void ); #endif #endif /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE #ifdef __ia64__ /* On IA-64, the buffer size is 16k, not 8k */ #define YY_READ_BUF_SIZE 16384 #else #define YY_READ_BUF_SIZE 8192 #endif /* __ia64__ */ #endif /* Copy whatever the last rule matched to the standard output. */ #ifndef ECHO /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ #define ECHO do { if (fwrite( stylesc_text, stylesc_leng, 1, stylesc_out )) {} } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, * is returned in "result". */ #ifndef YY_INPUT #define YY_INPUT(buf,result,max_size) \ if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ size_t n; \ for ( n = 0; n < max_size && \ (c = getc( stylesc_in )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ if ( c == '\n' ) \ buf[n++] = (char) c; \ if ( c == EOF && ferror( stylesc_in ) ) \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ result = n; \ } \ else \ { \ errno=0; \ while ( (result = fread(buf, 1, max_size, stylesc_in))==0 && ferror(stylesc_in)) \ { \ if( errno != EINTR) \ { \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ break; \ } \ errno=0; \ clearerr(stylesc_in); \ } \ }\ \ #endif /* No semi-colon after return; correct usage is to write "yyterminate();" - * we don't want an extra ';' after the "return" because that will cause * some compilers to complain about unreachable statements. */ #ifndef yyterminate #define yyterminate() return YY_NULL #endif /* Number of entries by which start-condition stack grows. */ #ifndef YY_START_STACK_INCR #define YY_START_STACK_INCR 25 #endif /* Report a fatal error. */ #ifndef YY_FATAL_ERROR #define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) #endif /* end tables serialization structures and prototypes */ /* Default declaration of generated scanner - a define so the user can * easily add parameters. */ #ifndef YY_DECL #define YY_DECL_IS_OURS 1 extern int stylesc_lex (void); #define YY_DECL int stylesc_lex (void) #endif /* !YY_DECL */ /* Code executed at the beginning of each rule, after stylesc_text and stylesc_leng * have been set up. */ #ifndef YY_USER_ACTION #define YY_USER_ACTION #endif /* Code executed at the end of each rule. */ #ifndef YY_BREAK #define YY_BREAK break; #endif #define YY_RULE_SETUP \ YY_USER_ACTION /** The main scanner function which does all the work. */ YY_DECL { register yy_state_type yy_current_state; register char *yy_cp, *yy_bp; register int yy_act; #line 66 "../../../lib/srchilite/stylescanner.ll" #line 803 "../../../lib/srchilite/stylescanner.cc" if ( !(yy_init) ) { (yy_init) = 1; #ifdef YY_USER_INIT YY_USER_INIT; #endif if ( ! (yy_start) ) (yy_start) = 1; /* first start state */ if ( ! stylesc_in ) stylesc_in = stdin; if ( ! stylesc_out ) stylesc_out = stdout; if ( ! YY_CURRENT_BUFFER ) { stylesc_ensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = stylesc__create_buffer(stylesc_in,YY_BUF_SIZE ); } stylesc__load_buffer_state( ); } while ( 1 ) /* loops until end-of-file is reached */ { yy_cp = (yy_c_buf_p); /* Support of stylesc_text. */ *yy_cp = (yy_hold_char); /* yy_bp points to the position in yy_ch_buf of the start of * the current run. */ yy_bp = yy_cp; yy_current_state = (yy_start); yy_match: do { register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 122 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ++yy_cp; } while ( yy_base[yy_current_state] != 157 ); yy_find_action: yy_act = yy_accept[yy_current_state]; if ( yy_act == 0 ) { /* have to back up */ yy_cp = (yy_last_accepting_cpos); yy_current_state = (yy_last_accepting_state); yy_act = yy_accept[yy_current_state]; } YY_DO_BEFORE_ACTION; do_action: /* This label is used only to access EOF actions. */ switch ( yy_act ) { /* beginning of action switch */ case 0: /* must back up */ /* undo the effects of YY_DO_BEFORE_ACTION */ *yy_cp = (yy_hold_char); yy_cp = (yy_last_accepting_cpos); yy_current_state = (yy_last_accepting_state); goto yy_find_action; case 1: YY_RULE_SETUP #line 68 "../../../lib/srchilite/stylescanner.ll" {} YY_BREAK case 2: YY_RULE_SETUP #line 70 "../../../lib/srchilite/stylescanner.ll" {} YY_BREAK case 3: YY_RULE_SETUP #line 72 "../../../lib/srchilite/stylescanner.ll" { BEGIN(COMMENT_STATE); } YY_BREAK case 4: YY_RULE_SETUP #line 73 "../../../lib/srchilite/stylescanner.ll" {} YY_BREAK case 5: /* rule 5 can match eol */ YY_RULE_SETUP #line 74 "../../../lib/srchilite/stylescanner.ll" { ++line; BEGIN(INITIAL); } YY_BREAK case 6: YY_RULE_SETUP #line 76 "../../../lib/srchilite/stylescanner.ll" { stylesc_lval.string = new std::string(stylesc_text) ; return COLOR ; } YY_BREAK case 7: YY_RULE_SETUP #line 78 "../../../lib/srchilite/stylescanner.ll" { return BODY_BG_COLOR ; } YY_BREAK case 8: YY_RULE_SETUP #line 80 "../../../lib/srchilite/stylescanner.ll" { return BG_T ; } YY_BREAK case 9: YY_RULE_SETUP #line 82 "../../../lib/srchilite/stylescanner.ll" { stylesc_lval.flag = ISBOLD ; return BOLD ; } YY_BREAK case 10: YY_RULE_SETUP #line 83 "../../../lib/srchilite/stylescanner.ll" { stylesc_lval.flag = ISITALIC ; return ITALICS ; } YY_BREAK case 11: YY_RULE_SETUP #line 84 "../../../lib/srchilite/stylescanner.ll" { stylesc_lval.flag = ISUNDERLINE ; return UNDERLINE ; } YY_BREAK case 12: YY_RULE_SETUP #line 85 "../../../lib/srchilite/stylescanner.ll" { stylesc_lval.flag = ISFIXED; return FIXED; } YY_BREAK case 13: YY_RULE_SETUP #line 86 "../../../lib/srchilite/stylescanner.ll" { stylesc_lval.flag = ISNOTFIXED; return NOTFIXED; } YY_BREAK case 14: YY_RULE_SETUP #line 87 "../../../lib/srchilite/stylescanner.ll" { stylesc_lval.flag = ISNOREF; return NOREF; } YY_BREAK case 15: YY_RULE_SETUP #line 89 "../../../lib/srchilite/stylescanner.ll" { return ',' ; } YY_BREAK case 16: YY_RULE_SETUP #line 90 "../../../lib/srchilite/stylescanner.ll" { return ';' ; } YY_BREAK case 17: YY_RULE_SETUP #line 91 "../../../lib/srchilite/stylescanner.ll" { return ':' ; } YY_BREAK case 18: YY_RULE_SETUP #line 93 "../../../lib/srchilite/stylescanner.ll" { stylesc_lval.string = new std::string(stylesc_text) ; return KEY ; } YY_BREAK case 19: YY_RULE_SETUP #line 95 "../../../lib/srchilite/stylescanner.ll" { BEGIN(STRING_STATE); DEB("STRING_STATE"); buffer( stylesc_text ) ; } YY_BREAK case 20: YY_RULE_SETUP #line 96 "../../../lib/srchilite/stylescanner.ll" { buffer( stylesc_text ) ; } YY_BREAK case 21: YY_RULE_SETUP #line 97 "../../../lib/srchilite/stylescanner.ll" { buffer( "\"" ) ; } YY_BREAK case 22: YY_RULE_SETUP #line 98 "../../../lib/srchilite/stylescanner.ll" { BEGIN(INITIAL) ; buffer( stylesc_text ) ; DEB("END STRING_STATE"); stylesc_lval.string = flush_buffer() ; return STRINGDEF; } YY_BREAK case 23: YY_RULE_SETUP #line 99 "../../../lib/srchilite/stylescanner.ll" { buffer( stylesc_text ) ; } YY_BREAK case 24: /* rule 24 can match eol */ YY_RULE_SETUP #line 100 "../../../lib/srchilite/stylescanner.ll" { buffer( "\n" ) ; } YY_BREAK case 25: /* rule 25 can match eol */ YY_RULE_SETUP #line 102 "../../../lib/srchilite/stylescanner.ll" { ++line ; } YY_BREAK case 26: YY_RULE_SETUP #line 104 "../../../lib/srchilite/stylescanner.ll" { /* anything else will generate a parsing error */ return stylesc_text[0] ; } YY_BREAK case 27: YY_RULE_SETUP #line 106 "../../../lib/srchilite/stylescanner.ll" ECHO; YY_BREAK #line 1024 "../../../lib/srchilite/stylescanner.cc" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(COMMENT_STATE): case YY_STATE_EOF(STRING_STATE): yyterminate(); case YY_END_OF_BUFFER: { /* Amount of text matched not including the EOB char. */ int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; /* Undo the effects of YY_DO_BEFORE_ACTION. */ *yy_cp = (yy_hold_char); YY_RESTORE_YY_MORE_OFFSET if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) { /* We're scanning a new file or input source. It's * possible that this happened because the user * just pointed stylesc_in at a new source and called * stylesc_lex(). If so, then we have to assure * consistency between YY_CURRENT_BUFFER and our * globals. Here is the right place to do so, because * this is the first action (other than possibly a * back-up) that will match for the new input source. */ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; YY_CURRENT_BUFFER_LVALUE->yy_input_file = stylesc_in; YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; } /* Note that here we test for yy_c_buf_p "<=" to the position * of the first EOB in the buffer, since yy_c_buf_p will * already have been incremented past the NUL character * (since all states make transitions on EOB to the * end-of-buffer state). Contrast this with the test * in input(). */ if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) { /* This was really a NUL. */ yy_state_type yy_next_state; (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state( ); /* Okay, we're now positioned to make the NUL * transition. We couldn't have * yy_get_previous_state() go ahead and do it * for us because it doesn't know how to deal * with the possibility of jamming (and we don't * want to build jamming into it because then it * will run more slowly). */ yy_next_state = yy_try_NUL_trans( yy_current_state ); yy_bp = (yytext_ptr) + YY_MORE_ADJ; if ( yy_next_state ) { /* Consume the NUL. */ yy_cp = ++(yy_c_buf_p); yy_current_state = yy_next_state; goto yy_match; } else { yy_cp = (yy_c_buf_p); goto yy_find_action; } } else switch ( yy_get_next_buffer( ) ) { case EOB_ACT_END_OF_FILE: { (yy_did_buffer_switch_on_eof) = 0; if ( stylesc_wrap( ) ) { /* Note: because we've taken care in * yy_get_next_buffer() to have set up * stylesc_text, we can now set up * yy_c_buf_p so that if some total * hoser (like flex itself) wants to * call the scanner after we return the * YY_NULL, it'll still work - another * YY_NULL will get returned. */ (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; yy_act = YY_STATE_EOF(YY_START); goto do_action; } else { if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; } break; } case EOB_ACT_CONTINUE_SCAN: (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state( ); yy_cp = (yy_c_buf_p); yy_bp = (yytext_ptr) + YY_MORE_ADJ; goto yy_match; case EOB_ACT_LAST_MATCH: (yy_c_buf_p) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; yy_current_state = yy_get_previous_state( ); yy_cp = (yy_c_buf_p); yy_bp = (yytext_ptr) + YY_MORE_ADJ; goto yy_find_action; } break; } default: YY_FATAL_ERROR( "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ } /* end of stylesc_lex */ /* yy_get_next_buffer - try to read in a new buffer * * Returns a code representing an action: * EOB_ACT_LAST_MATCH - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ static int yy_get_next_buffer (void) { register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; register char *source = (yytext_ptr); register int number_to_move, i; int ret_val; if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) YY_FATAL_ERROR( "fatal flex scanner internal error--end of buffer missed" ); if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) { /* Don't try to fill the buffer, so this is an EOF. */ if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) { /* We matched a single character, the EOB, so * treat this as a final EOF. */ return EOB_ACT_END_OF_FILE; } else { /* We matched some text prior to the EOB, first * process it. */ return EOB_ACT_LAST_MATCH; } } /* Try to read more data. */ /* First move last chars to start of buffer. */ number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) /* don't do the read, it's not guaranteed to return an EOF, * just force an EOF */ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; else { int num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) { /* Not enough room in the buffer - grow it. */ /* just a shorter name for the current buffer */ YY_BUFFER_STATE b = YY_CURRENT_BUFFER; int yy_c_buf_p_offset = (int) ((yy_c_buf_p) - b->yy_ch_buf); if ( b->yy_is_our_buffer ) { int new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; else b->yy_buf_size *= 2; b->yy_ch_buf = (char *) /* Include room in for 2 EOB chars. */ stylesc_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); } else /* Can't grow it, we don't own it. */ b->yy_ch_buf = 0; if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "fatal error - scanner input buffer overflow" ); (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; } if ( num_to_read > YY_READ_BUF_SIZE ) num_to_read = YY_READ_BUF_SIZE; /* Read in more data. */ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), (yy_n_chars), (size_t) num_to_read ); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } if ( (yy_n_chars) == 0 ) { if ( number_to_move == YY_MORE_ADJ ) { ret_val = EOB_ACT_END_OF_FILE; stylesc_restart(stylesc_in ); } else { ret_val = EOB_ACT_LAST_MATCH; YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_EOF_PENDING; } } else ret_val = EOB_ACT_CONTINUE_SCAN; if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { /* Extend the array by 50%, plus the number we really need. */ yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) stylesc_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); } (yy_n_chars) += number_to_move; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; return ret_val; } /* yy_get_previous_state - get the state just before the EOB char was reached */ static yy_state_type yy_get_previous_state (void) { register yy_state_type yy_current_state; register char *yy_cp; yy_current_state = (yy_start); for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) { register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 122 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; } return yy_current_state; } /* yy_try_NUL_trans - try to make a transition on the NUL character * * synopsis * next_state = yy_try_NUL_trans( current_state ); */ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) { register int yy_is_jam; register char *yy_cp = (yy_c_buf_p); register YY_CHAR yy_c = 1; if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 122 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; yy_is_jam = (yy_current_state == 121); return yy_is_jam ? 0 : yy_current_state; } static void yyunput (int c, register char * yy_bp ) { register char *yy_cp; yy_cp = (yy_c_buf_p); /* undo effects of setting up stylesc_text */ *yy_cp = (yy_hold_char); if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) { /* need to shift things up to make room */ /* +2 for EOB chars. */ register int number_to_move = (yy_n_chars) + 2; register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; register char *source = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) *--dest = *--source; yy_cp += (int) (dest - source); yy_bp += (int) (dest - source); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) YY_FATAL_ERROR( "flex scanner push-back overflow" ); } *--yy_cp = (char) c; (yytext_ptr) = yy_bp; (yy_hold_char) = *yy_cp; (yy_c_buf_p) = yy_cp; } #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (void) #else static int input (void) #endif { int c; *(yy_c_buf_p) = (yy_hold_char); if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) { /* yy_c_buf_p now points to the character we want to return. * If this occurs *before* the EOB characters, then it's a * valid NUL; if not, then we've hit the end of the buffer. */ if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) /* This was really a NUL. */ *(yy_c_buf_p) = '\0'; else { /* need more input */ int offset = (yy_c_buf_p) - (yytext_ptr); ++(yy_c_buf_p); switch ( yy_get_next_buffer( ) ) { case EOB_ACT_LAST_MATCH: /* This happens because yy_g_n_b() * sees that we've accumulated a * token and flags that we need to * try matching the token before * proceeding. But for input(), * there's no matching to consider. * So convert the EOB_ACT_LAST_MATCH * to EOB_ACT_END_OF_FILE. */ /* Reset buffer status. */ stylesc_restart(stylesc_in ); /*FALLTHROUGH*/ case EOB_ACT_END_OF_FILE: { if ( stylesc_wrap( ) ) return EOF; if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; #ifdef __cplusplus return yyinput(); #else return input(); #endif } case EOB_ACT_CONTINUE_SCAN: (yy_c_buf_p) = (yytext_ptr) + offset; break; } } } c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ *(yy_c_buf_p) = '\0'; /* preserve stylesc_text */ (yy_hold_char) = *++(yy_c_buf_p); return c; } #endif /* ifndef YY_NO_INPUT */ /** Immediately switch to a different input stream. * @param input_file A readable stream. * * @note This function does not reset the start condition to @c INITIAL . */ void stylesc_restart (FILE * input_file ) { if ( ! YY_CURRENT_BUFFER ){ stylesc_ensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = stylesc__create_buffer(stylesc_in,YY_BUF_SIZE ); } stylesc__init_buffer(YY_CURRENT_BUFFER,input_file ); stylesc__load_buffer_state( ); } /** Switch to a different input buffer. * @param new_buffer The new input buffer. * */ void stylesc__switch_to_buffer (YY_BUFFER_STATE new_buffer ) { /* TODO. We should be able to replace this entire function body * with * stylesc_pop_buffer_state(); * stylesc_push_buffer_state(new_buffer); */ stylesc_ensure_buffer_stack (); if ( YY_CURRENT_BUFFER == new_buffer ) return; if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ *(yy_c_buf_p) = (yy_hold_char); YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } YY_CURRENT_BUFFER_LVALUE = new_buffer; stylesc__load_buffer_state( ); /* We don't actually know whether we did this switch during * EOF (stylesc_wrap()) processing, but the only time this flag * is looked at is after stylesc_wrap() is called, so it's safe * to go ahead and always set it. */ (yy_did_buffer_switch_on_eof) = 1; } static void stylesc__load_buffer_state (void) { (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; stylesc_in = YY_CURRENT_BUFFER_LVALUE->yy_input_file; (yy_hold_char) = *(yy_c_buf_p); } /** Allocate and initialize an input buffer state. * @param file A readable stream. * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. * * @return the allocated buffer state. */ YY_BUFFER_STATE stylesc__create_buffer (FILE * file, int size ) { YY_BUFFER_STATE b; b = (YY_BUFFER_STATE) stylesc_alloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in stylesc__create_buffer()" ); b->yy_buf_size = size; /* yy_ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. */ b->yy_ch_buf = (char *) stylesc_alloc(b->yy_buf_size + 2 ); if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in stylesc__create_buffer()" ); b->yy_is_our_buffer = 1; stylesc__init_buffer(b,file ); return b; } /** Destroy the buffer. * @param b a buffer created with stylesc__create_buffer() * */ void stylesc__delete_buffer (YY_BUFFER_STATE b ) { if ( ! b ) return; if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; if ( b->yy_is_our_buffer ) stylesc_free((void *) b->yy_ch_buf ); stylesc_free((void *) b ); } #ifndef __cplusplus extern int isatty (int ); #endif /* __cplusplus */ /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a stylesc_restart() or at EOF. */ static void stylesc__init_buffer (YY_BUFFER_STATE b, FILE * file ) { int oerrno = errno; stylesc__flush_buffer(b ); b->yy_input_file = file; b->yy_fill_buffer = 1; /* If b is the current buffer, then stylesc__init_buffer was _probably_ * called from stylesc_restart() or through yy_get_next_buffer. * In that case, we don't want to reset the lineno or column. */ if (b != YY_CURRENT_BUFFER){ b->yy_bs_lineno = 1; b->yy_bs_column = 0; } b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; errno = oerrno; } /** Discard all buffered characters. On the next scan, YY_INPUT will be called. * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. * */ void stylesc__flush_buffer (YY_BUFFER_STATE b ) { if ( ! b ) return; b->yy_n_chars = 0; /* We always need two end-of-buffer characters. The first causes * a transition to the end-of-buffer state. The second causes * a jam in that state. */ b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; b->yy_buf_pos = &b->yy_ch_buf[0]; b->yy_at_bol = 1; b->yy_buffer_status = YY_BUFFER_NEW; if ( b == YY_CURRENT_BUFFER ) stylesc__load_buffer_state( ); } /** Pushes the new state onto the stack. The new state becomes * the current state. This function will allocate the stack * if necessary. * @param new_buffer The new state. * */ void stylesc_push_buffer_state (YY_BUFFER_STATE new_buffer ) { if (new_buffer == NULL) return; stylesc_ensure_buffer_stack(); /* This block is copied from stylesc__switch_to_buffer. */ if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ *(yy_c_buf_p) = (yy_hold_char); YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } /* Only push if top exists. Otherwise, replace top. */ if (YY_CURRENT_BUFFER) (yy_buffer_stack_top)++; YY_CURRENT_BUFFER_LVALUE = new_buffer; /* copied from stylesc__switch_to_buffer. */ stylesc__load_buffer_state( ); (yy_did_buffer_switch_on_eof) = 1; } /** Removes and deletes the top of the stack, if present. * The next element becomes the new top. * */ void stylesc_pop_buffer_state (void) { if (!YY_CURRENT_BUFFER) return; stylesc__delete_buffer(YY_CURRENT_BUFFER ); YY_CURRENT_BUFFER_LVALUE = NULL; if ((yy_buffer_stack_top) > 0) --(yy_buffer_stack_top); if (YY_CURRENT_BUFFER) { stylesc__load_buffer_state( ); (yy_did_buffer_switch_on_eof) = 1; } } /* Allocates the stack if it does not exist. * Guarantees space for at least one push. */ static void stylesc_ensure_buffer_stack (void) { int num_to_alloc; if (!(yy_buffer_stack)) { /* First allocation is just for 2 elements, since we don't know if this * scanner will even need a stack. We use 2 instead of 1 to avoid an * immediate realloc on the next call. */ num_to_alloc = 1; (yy_buffer_stack) = (struct yy_buffer_state**)stylesc_alloc (num_to_alloc * sizeof(struct yy_buffer_state*) ); if ( ! (yy_buffer_stack) ) YY_FATAL_ERROR( "out of dynamic memory in stylesc_ensure_buffer_stack()" ); memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); (yy_buffer_stack_max) = num_to_alloc; (yy_buffer_stack_top) = 0; return; } if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ /* Increase the buffer to prepare for a possible push. */ int grow_size = 8 /* arbitrary grow size */; num_to_alloc = (yy_buffer_stack_max) + grow_size; (yy_buffer_stack) = (struct yy_buffer_state**)stylesc_realloc ((yy_buffer_stack), num_to_alloc * sizeof(struct yy_buffer_state*) ); if ( ! (yy_buffer_stack) ) YY_FATAL_ERROR( "out of dynamic memory in stylesc_ensure_buffer_stack()" ); /* zero only the new slots.*/ memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); (yy_buffer_stack_max) = num_to_alloc; } } /** Setup the input buffer state to scan directly from a user-specified character buffer. * @param base the character buffer * @param size the size in bytes of the character buffer * * @return the newly allocated buffer state object. */ YY_BUFFER_STATE stylesc__scan_buffer (char * base, yy_size_t size ) { YY_BUFFER_STATE b; if ( size < 2 || base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) /* They forgot to leave room for the EOB's. */ return 0; b = (YY_BUFFER_STATE) stylesc_alloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in stylesc__scan_buffer()" ); b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ b->yy_buf_pos = b->yy_ch_buf = base; b->yy_is_our_buffer = 0; b->yy_input_file = 0; b->yy_n_chars = b->yy_buf_size; b->yy_is_interactive = 0; b->yy_at_bol = 1; b->yy_fill_buffer = 0; b->yy_buffer_status = YY_BUFFER_NEW; stylesc__switch_to_buffer(b ); return b; } /** Setup the input buffer state to scan a string. The next call to stylesc_lex() will * scan from a @e copy of @a str. * @param yystr a NUL-terminated string to scan * * @return the newly allocated buffer state object. * @note If you want to scan bytes that may contain NUL values, then use * stylesc__scan_bytes() instead. */ YY_BUFFER_STATE stylesc__scan_string (yyconst char * yystr ) { return stylesc__scan_bytes(yystr,strlen(yystr) ); } /** Setup the input buffer state to scan the given bytes. The next call to stylesc_lex() will * scan from a @e copy of @a bytes. * @param yybytes the byte buffer to scan * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. * * @return the newly allocated buffer state object. */ YY_BUFFER_STATE stylesc__scan_bytes (yyconst char * yybytes, int _yybytes_len ) { YY_BUFFER_STATE b; char *buf; yy_size_t n; int i; /* Get memory for full buffer, including space for trailing EOB's. */ n = _yybytes_len + 2; buf = (char *) stylesc_alloc(n ); if ( ! buf ) YY_FATAL_ERROR( "out of dynamic memory in stylesc__scan_bytes()" ); for ( i = 0; i < _yybytes_len; ++i ) buf[i] = yybytes[i]; buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; b = stylesc__scan_buffer(buf,n ); if ( ! b ) YY_FATAL_ERROR( "bad buffer in stylesc__scan_bytes()" ); /* It's okay to grow etc. this buffer, and we should throw it * away when we're done. */ b->yy_is_our_buffer = 1; return b; } #ifndef YY_EXIT_FAILURE #define YY_EXIT_FAILURE 2 #endif static void yy_fatal_error (yyconst char* msg ) { (void) fprintf( stderr, "%s\n", msg ); exit( YY_EXIT_FAILURE ); } /* Redefine yyless() so it works in section 3 code. */ #undef yyless #define yyless(n) \ do \ { \ /* Undo effects of setting up stylesc_text. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ stylesc_text[stylesc_leng] = (yy_hold_char); \ (yy_c_buf_p) = stylesc_text + yyless_macro_arg; \ (yy_hold_char) = *(yy_c_buf_p); \ *(yy_c_buf_p) = '\0'; \ stylesc_leng = yyless_macro_arg; \ } \ while ( 0 ) /* Accessor methods (get/set functions) to struct members. */ /** Get the current line number. * */ int stylesc_get_lineno (void) { return stylesc_lineno; } /** Get the input stream. * */ FILE *stylesc_get_in (void) { return stylesc_in; } /** Get the output stream. * */ FILE *stylesc_get_out (void) { return stylesc_out; } /** Get the length of the current token. * */ int stylesc_get_leng (void) { return stylesc_leng; } /** Get the current token. * */ char *stylesc_get_text (void) { return stylesc_text; } /** Set the current line number. * @param line_number * */ void stylesc_set_lineno (int line_number ) { stylesc_lineno = line_number; } /** Set the input stream. This does not discard the current * input buffer. * @param in_str A readable stream. * * @see stylesc__switch_to_buffer */ void stylesc_set_in (FILE * in_str ) { stylesc_in = in_str ; } void stylesc_set_out (FILE * out_str ) { stylesc_out = out_str ; } int stylesc_get_debug (void) { return stylesc__flex_debug; } void stylesc_set_debug (int bdebug ) { stylesc__flex_debug = bdebug ; } static int yy_init_globals (void) { /* Initialization is the same as for the non-reentrant scanner. * This function is called from stylesc_lex_destroy(), so don't allocate here. */ (yy_buffer_stack) = 0; (yy_buffer_stack_top) = 0; (yy_buffer_stack_max) = 0; (yy_c_buf_p) = (char *) 0; (yy_init) = 0; (yy_start) = 0; /* Defined in main.c */ #ifdef YY_STDINIT stylesc_in = stdin; stylesc_out = stdout; #else stylesc_in = (FILE *) 0; stylesc_out = (FILE *) 0; #endif /* For future reference: Set errno on error, since we are called by * stylesc_lex_init() */ return 0; } /* stylesc_lex_destroy is for both reentrant and non-reentrant scanners. */ int stylesc_lex_destroy (void) { /* Pop the buffer stack, destroying each element. */ while(YY_CURRENT_BUFFER){ stylesc__delete_buffer(YY_CURRENT_BUFFER ); YY_CURRENT_BUFFER_LVALUE = NULL; stylesc_pop_buffer_state(); } /* Destroy the stack itself. */ stylesc_free((yy_buffer_stack) ); (yy_buffer_stack) = NULL; /* Reset the globals. This is important in a non-reentrant scanner so the next time * stylesc_lex() is called, initialization will occur. */ yy_init_globals( ); return 0; } /* * Internal utility routines. */ #ifndef yytext_ptr static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) { register int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * s ) { register int n; for ( n = 0; s[n]; ++n ) ; return n; } #endif void *stylesc_alloc (yy_size_t size ) { return (void *) malloc( size ); } void *stylesc_realloc (void * ptr, yy_size_t size ) { /* The cast to (char *) in the following accommodates both * implementations that use char* generic pointers, and those * that use void* generic pointers. It works with the latter * because both ANSI C and C++ allow castless assignment from * any pointer type to void*, and deal with argument conversions * as though doing an assignment. */ return (void *) realloc( (char *) ptr, size ); } void stylesc_free (void * ptr ) { free( (char *) ptr ); /* see stylesc_realloc() for (char *) cast */ } #define YYTABLES_NAME "yytables" #line 106 "../../../lib/srchilite/stylescanner.ll" void buffer(const char *s) { DEB2("BUFFERING ", s); buff << s; } const std::string *flush_buffer() { const std::string *ret = new std::string(buff.str()); buff.str(""); return ret; } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/langdefscanner.ll����������������������������������������������0000644�0001750�0001750�00000016350�11672675563�017775� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������%{ /* * Copyright (C) 1999-2009, Lorenzo Bettini, http://www.lorenzobettini.it * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ #include <cstdlib> #include <sstream> #include "stringdef.h" #include "stringtable.h" #include "langdefparser.h" #include "langdefscanner.h" #include "fileutil.h" #include "regexpreprocessor.h" #include "ioexception.h" #include <stack> //#define DEBUG_SCANNER #ifdef DEBUG_SCANNER #include <iostream> // for debug #define DEB(s) std::cerr << s << std::endl; #define DEB2(s,s2) std::cerr << s << ": " << s2 << std::endl; #else #define DEB(s) #define DEB2(s,s2) #endif //using srchilite::StringDef; //using namespace srchilite; static std::ostringstream buff; static srchilite::StringTable *stringTable = 0; static void buffer(const char *s); static void buffer_escape(const char *c); static const std::string *flush_buffer(); static srchilite::StringDef *flush_buffer_preproc(); static void open_include_file(const char *file); static void close_include_file(); srchilite::ParseStructPtr parsestruct; typedef std::stack<srchilite::ParseStructPtr> ParseStructStack; static ParseStructStack parsestructstack; void updateTokenInfo() { langdef_lloc.first_line = parsestruct->line ; } %} %option prefix="langdef_" %option noyywrap ws [ ]+ tabs [\t]+ nl \n cr \r IDE [a-zA-Z_]([a-zA-Z0-9_])* STRING \"[^\n"]+\" %s COMMENT_STATE STRING_STATE REGEXP_STATE REGEXP_NOPREPROC_STATE INCLUDE_STATE %% <INITIAL,COMMENT_STATE,INCLUDE_STATE>[ \t] {} \r {} <INITIAL>"#" { BEGIN(COMMENT_STATE); } <COMMENT_STATE>[^\n] {} <COMMENT_STATE>\n { ++(parsestruct->line); BEGIN(INITIAL); } <INITIAL>"begin" { return BEGIN_T ; } <INITIAL>"end" { return END_T ; } <INITIAL>"environment" { return ENVIRONMENT_T; } <INITIAL>"state" { return STATE_T; } <INITIAL>"multiline" { return MULTILINE_T; } <INITIAL>"delim" { return DELIM_T; } <INITIAL>"start" { return START_T; } <INITIAL>"escape" { return ESCAPE_T; } <INITIAL>"nested" { return NESTED_T; } <INITIAL>"exitall" { return EXIT_ALL; } <INITIAL>"exit" { return EXIT_T; } <INITIAL>"vardef" { return VARDEF_T; } <INITIAL>"redef" { return REDEF_T; } <INITIAL>"subst" { return SUBST_T; } <INITIAL>"nonsensitive" { return NONSENSITIVE_T; } <INITIAL>"include" { BEGIN(INCLUDE_STATE); } <INCLUDE_STATE>{STRING} { DEB2("inclusion of ", yytext); char *file_name = &yytext[1]; file_name[strlen(file_name)-1] = '\0'; try { open_include_file(file_name); } catch (srchilite::IOException &e) { langdef_lval.string = stringTable->newString(e.filename); return WRONG_INCLUDE_FILE; } yypush_buffer_state(yy_create_buffer( langdef_in, YY_BUF_SIZE)); BEGIN(INITIAL); } <<EOF>> { DEB("END OF FILE"); fclose(langdef_in); langdef_in = 0; yypop_buffer_state(); if ( !YY_CURRENT_BUFFER ) { yyterminate(); } else close_include_file(); } <INITIAL>"$"{IDE} { DEB2("VAR",yytext); langdef_lval.string = stringTable->newString(&yytext[1]) ; return VARUSE ; } <INITIAL>"@{"[[:digit:]]"}" { DEB2("BACKREFVAR",yytext); langdef_lval.string = stringTable->newString(yytext); return BACKREFVAR ; } <INITIAL>{IDE} { DEB2("KEY",yytext); langdef_lval.string = stringTable->newString(yytext) ; updateTokenInfo(); return KEY ; } <INITIAL>"=" { return '=' ; } <INITIAL>"," { return ',' ; } <INITIAL>"+" { return '+' ; } <INITIAL>"(" { updateTokenInfo(); return '(' ; } <INITIAL>")" { return ')' ; } <INITIAL>\" { BEGIN(STRING_STATE) ; } <STRING_STATE>("*"|"."|"?"|"+"|"("|")"|"{"|"}"|"["|"]"|"^"|"$"|"@") { buffer_escape( yytext ) ; } <STRING_STATE>\\\| { buffer( yytext ) ; } <STRING_STATE>\\\\ { buffer( yytext ) ; } <STRING_STATE>\\[[:digit:]] { return WRONG_BACKREFERENCE ; } <STRING_STATE>"\\\"" { buffer( yytext ) ; } <STRING_STATE>\" { BEGIN(INITIAL) ; langdef_lval.string = flush_buffer() ; DEB2("STRINGDEF",langdef_lval.string); return STRINGDEF; } <STRING_STATE>[^\n] { buffer( yytext ) ; } <STRING_STATE>{nl} { DEB("NEWLINE"); ++(parsestruct->line) ; } <INITIAL>\' { BEGIN(REGEXP_STATE) ; } <REGEXP_STATE>"@" { buffer_escape( yytext ) ; } <REGEXP_STATE>\\\\ { buffer( yytext ) ; } <REGEXP_STATE>\\[[:digit:]] { return WRONG_BACKREFERENCE ; } <REGEXP_STATE>"\\'" { buffer( "'" ) ; } <REGEXP_STATE>\' { BEGIN(INITIAL) ; langdef_lval.stringdef = flush_buffer_preproc() ; DEB2("REGEXPDEF",langdef_lval.string); return REGEXPDEF; } <REGEXP_STATE>[^\n] { buffer( yytext ) ; } <REGEXP_STATE>{nl} { DEB("NEWLINE"); ++(parsestruct->line) ; } <INITIAL>` { BEGIN(REGEXP_NOPREPROC_STATE) ; } <REGEXP_NOPREPROC_STATE>"@" { buffer_escape( yytext ) ; } <REGEXP_NOPREPROC_STATE>\\\\ { buffer( yytext ) ; } <REGEXP_NOPREPROC_STATE>"\\`" { buffer( "'" ) ; } <REGEXP_NOPREPROC_STATE>` { BEGIN(INITIAL) ; langdef_lval.string = flush_buffer() ; DEB2("REGEXPNOPREPROCDEF",langdef_lval.string); return REGEXPNOPREPROC; } <REGEXP_NOPREPROC_STATE>[^\n] { buffer( yytext ) ; } <REGEXP_NOPREPROC_STATE>{nl} { DEB("NEWLINE"); ++(parsestruct->line) ; } <INITIAL>{nl} { DEB("NEWLINE"); ++(parsestruct->line) ; } <INITIAL>[[:digit:]]+ { langdef_lval.level = atoi(yytext); return LEVEL ; } <INITIAL>. { return yytext[0] ; } %% void buffer(const char *s) { buff << s; } void buffer_escape(const char *s) { buff << "\\" << s; } const std::string *flush_buffer() { const std::string *ret = stringTable->newString(buff.str()); buff.str(""); return ret; } srchilite::StringDef *flush_buffer_preproc() { srchilite::StringDef *sd = new srchilite::StringDef (srchilite::RegexPreProcessor::preprocess(buff.str()), buff.str()); buff.str(""); return sd; } void _open_file_to_scan(const string &path, const string &name) { langdef_in = srchilite::open_data_file_stream(path, name); } void open_include_file(const char *name) { string file_name = name; string path = parsestruct->path; if (! srchilite::contains_path(name) && srchilite::contains_path(parsestruct->file_name)) path = srchilite::get_file_path(parsestruct->file_name); parsestructstack.push(parsestruct); parsestruct = srchilite::ParseStructPtr(new srchilite::ParseStruct(path, file_name)); _open_file_to_scan(path.c_str(), file_name.c_str()); } void close_include_file() { parsestruct = parsestructstack.top(); parsestructstack.pop(); } namespace srchilite { void open_file_to_scan(const string &path, const string &name) { stringTable = new StringTable; _open_file_to_scan(path, name); langdef_restart(langdef_in); } void clear_langdefscanner() { delete stringTable; langdef_lex_destroy(); } void close_langdefinputfile() { // also close possible open files due to inclusions do { if (langdef_in) fclose(langdef_in); yypop_buffer_state(); } while ( YY_CURRENT_BUFFER ); } } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/stylekey.h�����������������������������������������������������0000644�0001750�0001750�00000000772�11672675563�016515� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // C++ Interface: stylekey // // Description: Structure for storing the keys of a style file. // // // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2007 // // Copyright: See COPYING file that comes with this distribution // // #ifndef STYLEKEY_H #define STYLEKEY_H #include <string> #include <list> using std::list; using std::string; namespace srchilite { // used to store a key typedef string KeyType; // used to store the keys of styles typedef list<KeyType> KeyList; } #endif ������source-highlight-3.1.6/lib/srchilite/colormap.h�����������������������������������������������������0000644�0001750�0001750�00000004262�11672675563�016456� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (C) 1999-2009 Lorenzo Bettini, http://www.lorenzobettini.it * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ #ifndef COLORMAP_H #define COLORMAP_H #include <map> #include <string> #include <boost/shared_ptr.hpp> #include <sstream> using std::map; using std::string; using std::ostringstream; namespace srchilite { /** * Simple map for colors (maps a color constant string to the * corresponding color of the output format) */ class ColorMap: public map<string, string> { protected: /// when no color corresponds to the requested one string default_color; public: /** * Sets the default color * @param d the default color */ void setDefault(const string &d) { default_color = d; } /** * @param key the color we're looking for * @return the color corresponding to the specified key, or the * default color if we don't have the requested key */ const string getColor(const string &key) { const_iterator it = find(key); if (it == end()) return default_color; else return it->second; } /** * Returns a string representation of the map. */ const string toString() const { ostringstream s; for (const_iterator it = begin(); it != end(); ++it) s << "[" << it->first << "]=" << it->second << "\n"; s << "default=" << default_color; return s.str(); } }; /// shared pointer for ColorMap typedef boost::shared_ptr<ColorMap> ColorMapPtr; } #endif // COLORMAP_H ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/verbosity.cpp��������������������������������������������������0000644�0001750�0001750�00000000431�11672675564�017216� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * verbosity.cpp * * Created on: Apr 19, 2009 * Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2008 * Copyright: See COPYING file that comes with this distribution */ #include "verbosity.h" namespace srchilite { bool Verbosity::verbosity = false; } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/textstyle.h����������������������������������������������������0000644�0001750�0001750�00000007035�11672675563�016710� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // C++ Interface: textstyle // // Description: // // // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2005-2009 // // Copyright: See COPYING file that comes with this distribution // // #ifndef _TEXTSTYLE_H_ #define _TEXTSTYLE_H_ #include <string> #include <vector> #include <map> #include <boost/regex.hpp> namespace srchilite { #define STYLE_VAR_TEXT "$style" // the text of the style variable #define TEXT_VAR_TEXT "$text" // the text of the text variable #define STYLE_VAR "\\" STYLE_VAR_TEXT // the name of the style variable as regexp #define TEXT_VAR "\\" TEXT_VAR_TEXT // the name of the text variable as regexp /// map for substitutions typedef std::map<std::string, std::string> SubstitutionMapping; /** * Represents a formatting template where there can be some * variables (starting with $, e.g., $style, $text, etc.) that will be replaced * with specific elements, e.g., the actual style for the formatting, the * text to format, etc. */ class TextStyle { private: typedef std::vector<std::string> StringVector; typedef std::vector<int> IndexVector; typedef std::map<std::string, IndexVector> SubstitutionIndexes; /// the regular expression to find variable occurrences boost::regex var_exp; std::string repr; /// contains all the string parts of this TextStyle. StringVector parts; /// contains the indexes of parts where to substitute $vars. SubstitutionIndexes substitutions; /// whether to rebuild the vectors bool invalid; void build_vectors(); public: /** * @param s the representation * @param vars an array of string representing the variables in this TextStyle * (e.g., {"linenum", "infilename", "infile", "outfile", 0}), the last element must * be 0 */ TextStyle(const std::string &s = "", const char **vars = 0); ~TextStyle(); /** * substitutes $text with text and $style with style * @param text * @param style * @return the string after substitutions */ std::string output(const std::string &text, const std::string &style = ""); /** * for each i substitutes: subst_map[i].first occurrence with subst_map[i].second * @param subst_map * @return the string after substitutions */ std::string output(SubstitutionMapping &subst_map); /** * substitutes $style with style * @param style * @return the string after substitutions */ std::string subst_style(const std::string &style = ""); /** * @return the string representation */ const std::string &toString() const { return repr; } /** * substitutes $text with the string representation of inner * e.g., if this is <b>$text</b> and inner is <i>$text</i> * this will return <b><i>$text</i></b> * @param inner * @return a new TextStyle after substitution */ TextStyle compose(const TextStyle &inner); /** * as compose, but acts on this instance * @param inner */ void update(const TextStyle &inner); /** * as compose, but acts on this instance * @param inner */ void update(const std::string &inner); /** * as output, but acts on this instance * @param text * @param style */ void update(const std::string &text, const std::string &style); /** * @return whether this TextStyle contains the $style variable */ bool containsStyleVar() const; /** * @return whether it is only $style or $text */ bool empty() const; }; } #endif /*_TEXTSTYLE_H_*/ ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/outlangdefscanner.h��������������������������������������������0000644�0001750�0001750�00000001520�11672675563�020336� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // C++ Interface: outlangdefscanner // // Description: // // // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004 // // Copyright: See COPYING file that comes with this distribution // // #ifndef OUTLANGDEFSCANNER_H #define OUTLANGDEFSCANNER_H #include "parsestruct.h" extern int outlangdef_lex() ; extern FILE *outlangdef_in; extern srchilite::ParseStructPtr outlang_parsestruct; namespace srchilite { void open_outlang_file_to_scan(const std::string &path, const std::string &file); /** * Closes the input file. This is required only in case of errors during * parsing (otherwise the file is closed automatically when the scanner * reaches the end of file). */ void close_outlangdefinputfile(); /** * Releases resources allocated by the scanner */ void clear_outlangdefscanner(); } #endif // OUTLANGDEFSCANNER_H ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/stringtable.cpp������������������������������������������������0000644�0001750�0001750�00000001045�11672675563�017507� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2008 // // Copyright: See COPYING file that comes with this distribution // #include "stringtable.h" using namespace std; namespace srchilite { StringTable::StringTable() { } StringTable::~StringTable() { // delete all the store strings for (const_iterator it = begin(); it != end(); ++it) delete *it; } std::string *StringTable::newString(const std::string &s) { string *newstring = new string(s); push_back(newstring); return newstring; } } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/doctemplate.h��������������������������������������������������0000644�0001750�0001750�00000002242�11672675563�017137� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/** * C++ class: doctemplate.h * * Description: The template for a document containing the output of * highlighting * * Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2005-2007 * Copyright: See COPYING file that comes with this distribution */ #ifndef _DOCTEMPLATE_H_ #define _DOCTEMPLATE_H_ #include <string> namespace srchilite { class DocTemplate { std::string begin_repr, end_repr; public: DocTemplate(const std::string &begin = "", const std::string &end = ""); std::string output_begin(const std::string &title, const std::string &cs, const std::string &add, const std::string &header, const std::string &footer, const std::string &background, const std::string &input_lang); std::string output_end(const std::string &title, const std::string &cs, const std::string &add, const std::string &header, const std::string &footer, const std::string &background, const std::string &input_lang); const std::string &toStringBegin() const { return begin_repr; } const std::string &toStringEnd() const { return end_repr; } }; } #endif /*_DOCTEMPLATE_H_*/ ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/ctagsmanager.h�������������������������������������������������0000644�0001750�0001750�00000003147�11672675563�017277� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2008 // // Copyright: See COPYING file that comes with this distribution // #ifndef CTAGSMANAGER_H_ #define CTAGSMANAGER_H_ #include <string> #include "refposition.h" #include "textstyles.h" namespace srchilite { class CTagsCollector; class CTagsFormatter; /** * Takes care of running ctags and to generate a CTagsFormmatter */ class CTagsManager { /// the ctags file name std::string ctagsFile; /// the possible ctags command to execute std::string ctagsCmd; /// whether to run ctags command bool runCTags; /// the position for generated references RefPosition refPosition; /// the shared instance shared by all the created CTagsFormatters CTagsCollector *ctagsCollector; public: /** * @param _ctagsFile the ctags file name * @param _ctagsCmd the ctags line command * @param _runCTags whether to run the ctags command * @param _refPosition the position for generated references */ CTagsManager(const std::string &_ctagsFile, const std::string &_ctagsCmd, bool _runCTags, RefPosition _refPosition); ~CTagsManager(); /** * Runs the ctags program. * @throws IOException if the run fails */ void runCTagsCmd(); /** * Creates a CTagsFormatter (if required, it previously run the ctags * command). * @param r the style for references and anchors * @throws IOException if running the ctags command fails */ CTagsFormatter *createCTagsFormatter(const TextStyles::RefTextStyle &r); }; } #endif /*CTAGSMANAGER_H_*/ �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/docgenerator.cc������������������������������������������������0000644�0001750�0001750�00000003652�11672675563�017456� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (C) 1999-2011 Lorenzo Bettini <http://www.lorenzobettini.it> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "docgenerator.h" using std::endl; namespace srchilite { void DocGenerator::generate_start_doc(std::ostream *sout) { bool docTitle = (title.size () > 0); bool docInputLang = (input_lang.size () > 0); bool inputFileName = (input_file_name.size () > 0); *sout << docTemplate.output_begin( ( docTitle ? title : ( inputFileName ? input_file_name : "source file" ) ), css_url, "GNU " PACKAGE " " + string((gen_source_highlight_version ? VERSION : "")) + "\nby Lorenzo Bettini\nhttp://www.lorenzobettini.it\nhttp://www.gnu.org/software/src-highlite", doc_header, doc_footer, doc_background, docInputLang ? input_lang: "unknown" ); } void DocGenerator::generate_end_doc(std::ostream *sout) { *sout << docTemplate.output_end( "", css_url, "\nby Lorenzo Bettini\nhttp://www.lorenzobettini.it\nhttp://www.gnu.org/software/src-highlite", doc_header, doc_footer, doc_background, "" ); } } ��������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/stringdef.cpp��������������������������������������������������0000644�0001750�0001750�00000002176�11672675563�017164� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (C) 1999-2007 Lorenzo Bettini <http://www.lorenzobettini.it> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ #include <algorithm> #include "stringdef.h" namespace srchilite { StringDef *StringDef::concat(const StringDef *s1, const StringDef *s2) { StringDef *ret = new StringDef(s1->stringdef + s2->stringdef); ret->setBackRef(s1->hasBackRef() || s2->hasBackRef()); return ret; } const std::string StringDef::toString() const { return stringdef; } } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/parsestruct.h��������������������������������������������������0000644�0001750�0001750�00000001203�11672675563�017211� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // C++ Interface: parsestruct // // Description: // // // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004 // // Copyright: See COPYING file that comes with this distribution // // #ifndef PARSESTRUCT_H #define PARSESTRUCT_H #include <string> #include <boost/shared_ptr.hpp> namespace srchilite { struct ParseStruct { const std::string path; const std::string file_name; unsigned int line; unsigned int pos; ParseStruct(const std::string &pa, const std::string &name) : path(pa), file_name(name), line(1), pos(0) {} }; typedef boost::shared_ptr<ParseStruct> ParseStructPtr; } #endif // PARSESTRUCT_H ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/linenumgenerator.h���������������������������������������������0000644�0001750�0001750�00000002643�11672675563�020221� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2008 // // Copyright: See COPYING file that comes with this distribution // #ifndef LINENUMGENERATOR_H_ #define LINENUMGENERATOR_H_ #include <string> #include "textstyle.h" namespace srchilite { /** * Generates line numbers in the output. */ class LineNumGenerator { /// number of digits to represent line number unsigned int digitNum; /// character to use for padding the line number char padding; /// for actually formatting the line number TextStyle lineStyle; /// for possible line anchor generation (can be null) TextStyle anchorStyle; /// when generating an anchor for a line, use this prefix for the anchor name std::string anchorLinePrefix; public: LineNumGenerator(const TextStyle &lineStyle, unsigned int digitNum, char padding = '0'); ~LineNumGenerator(); void setAnchorStyle(const TextStyle &_anchorStyle) { anchorStyle = _anchorStyle; } void setAnchorPrefix(const std::string &_anchorLinePrefix) { anchorLinePrefix = _anchorLinePrefix; } void setDigitNum(unsigned int _digitNum) { digitNum = _digitNum; } /** * Generates a string representing the formatting of the passed line number * @param line * @return the formatted line */ const std::string generateLine(unsigned int line); }; } #endif /*LINENUMGENERATOR_H_*/ ���������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/sourcehighlighter.h��������������������������������������������0000644�0001750�0001750�00000011235�11672675563�020357� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2008 // // Copyright: See COPYING file that comes with this distribution // #ifndef SOURCEHIGHLIGHTER_H_ #define SOURCEHIGHLIGHTER_H_ #include <string> #include <stack> #include <sstream> #include <boost/shared_ptr.hpp> #include "highlightstate.h" #include "eventgenerator.h" namespace srchilite { class FormatterManager; struct HighlightToken; struct FormatterParams; class HighlightEventListener; struct HighlightEvent; typedef std::stack<HighlightStatePtr> HighlightStateStack; typedef boost::shared_ptr<HighlightStateStack> HighlightStateStackPtr; /** * The main class performing the highlighting of a single line. It relies on a HighlightState * (and its HighlightRule objects). * * It provides the method highlightParagraph() to highlight a single line. * * The current highlighting state can be retrieved with getCurrentState(). * * The highlighting state is not reset after highlighting a line, thus, the * same object can be used to highlight, for instance, an entire file, by * calling highlightParagraph on each line. * * An example of use of this class is in infoformatter-main.cpp */ class SourceHighlighter: public EventGenerator<HighlightEventListener, HighlightEvent> { /// the main (and initial) highlight state HighlightStatePtr mainHighlightState; /// the current highlight state HighlightStatePtr currentHighlightState; /// the stack for the highlight states HighlightStateStackPtr stateStack; /// the formatter manager, used to format element strings const FormatterManager *formatterManager; /** * Whether to optimize output (e.g., adjacent text parts belonging * to the same element will be buffered and generated as a single text part) */ bool optimize; /** * Whether formatting is currently suspended. Note that matching for * regular expressions is not suspended: only the actual output of formatted * code is suspended. */ bool suspended; /** * Additional parameters for the formatters */ FormatterParams *formatterParams; /** * The current element being formatted (used for optmization and buffering) */ std::string currentElement; /** * The buffer for the text for the current element */ std::ostringstream currentElementBuffer; /** * Enters a new state (using the stack) * @param state */ void enterState(HighlightStatePtr state); /** * Exits level states (-1 means exit all states) * @param level */ void exitState(int level); /** * Exits all states in the stack (and thus go back to the initial main state) */ void exitAll(); /** * Computes the (possible) next state for the given rule (if required, also * performs reference replacement) * @param token */ HighlightStatePtr getNextState(const HighlightToken &token); /** * Formats the given string as the specified element * @param elem * @param s */ void format(const std::string &elem, const std::string &s); /** * Makes sure to flush the possible buffer of the current element * (e.g., during optimizations) */ void flush(); public: /** * @param mainState the main and initial state for highlighting */ SourceHighlighter(HighlightStatePtr mainState); ~SourceHighlighter(); /** * Highlights a paragraph (a line actually) * @param paragraph */ void highlightParagraph(const std::string &paragraph); HighlightStatePtr getCurrentState() const { return currentHighlightState; } void setCurrentState(HighlightStatePtr state) { currentHighlightState = state; } HighlightStateStackPtr getStateStack() { return stateStack; } void setStateStack(HighlightStateStackPtr state) { stateStack = state; } /** * Clears the statck of states */ void clearStateStack(); HighlightStatePtr getMainState() const { return mainHighlightState; } const FormatterManager *getFormatterManager() const { return formatterManager; } void setFormatterManager(const FormatterManager *_formatterManager) { formatterManager = _formatterManager; } bool getOptimize() const { return optimize; } void setOptimize(bool b = true) { optimize = b; } void setFormatterParams(FormatterParams *p) { formatterParams = p; } bool isSuspended() const { return suspended; } void setSuspended(bool b = true) { suspended = b; } }; } #endif /*SOURCEHIGHLIGHTER_H_*/ �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/srcuntabifier.cpp����������������������������������������������0000644�0001750�0001750�00000002241�11672675563�020030� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // C++ Implementation: srcuntabifier // // Description: // // // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004 // // Copyright: See COPYING file that comes with this distribution // // #include "srcuntabifier.h" #include <sstream> #include <boost/regex.hpp> namespace srchilite { const boost::regex tabexp("[\\t]"); const string Untabifier::doPreformat(const string &s) { boost::sregex_iterator m1(s.begin(), s.end(), tabexp); boost::sregex_iterator m2; if (m1 == m2) { if (s[0] == '\n') n_ = 0; // reset char counter else n_ += s.size(); return s; } std::ostringstream buffer; string prefix; string suffix; for (boost::sregex_iterator it = m1; it != m2; ++it) { prefix = it->prefix(); suffix = it->suffix(); if (prefix.size()) { buffer << prefix; n_ += prefix.size(); } int nSpaces = nSpacesPerTab_ - n_ % nSpacesPerTab_; buffer << string(nSpaces, ' '); n_ += nSpaces; } if (suffix.size()) { buffer << suffix; n_ += suffix.size(); } return buffer.str(); } } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/sourcefilehighlighter.cpp��������������������������������������0000644�0001750�0001750�00000011473�11672675563�021556� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // C++ Implementation: SourceFileHighlighter // // Description: // // // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2008 // // Copyright: See COPYING file that comes with this distribution // // #include <iostream> #include <fstream> #include "sourcefilehighlighter.h" #include "sourcehighlighter.h" #include "formatterparams.h" #include "bufferedoutput.h" #include "preformatter.h" #include "formatter.h" #include "linenumgenerator.h" #include <sstream> #include "ioexception.h" #include "lineranges.h" #include "regexranges.h" using namespace std; namespace srchilite { typedef enum { FOUND_EOF = 0, FOUND_NL, FOUND_END } load_line_ret; static load_line_ret load_line(std::string& s, std::istream& is); SourceFileHighlighter::SourceFileHighlighter(const std::string &file, SourceHighlighter *_sourceHighlighter, BufferedOutput *_output) : fileName(file), sourceHighlighter(_sourceHighlighter), output(_output), debugPolicy(NO_DEBUG), preformatter(0), lineNumGenerator(0), lineRanges(0), regexRanges(0), contextFormatter(0) { } load_line_ret load_line(std::string& s, std::istream& is) { s.erase(); if (is.bad() || is.eof()) return FOUND_EOF; char c; while (is.get(c)) { if (c == '\n') return FOUND_NL; if (c != '\r') s.append(1, c); } return FOUND_END; } void SourceFileHighlighter::setRangeSeparator(const std::string &rangeSep) { if (preformatter) { rangeSeparator = preformatter->preformat(rangeSep + "\n"); } else { rangeSeparator = rangeSep + "\n"; } } void SourceFileHighlighter::highlight() { istream *is = 0; if (fileName != "") { is = new ifstream(fileName.c_str()); if (!is || !(*is)) { throw IOException("cannot open for input", fileName); } } else is = &cin; highlight(*is); if (fileName != "") delete is; } void SourceFileHighlighter::highlight(istream &is) { std::string s; FormatterParams params(fileName); params.line = 1; bool rangeSeparatorPrinted = false; sourceHighlighter->setFormatterParams(&params); sourceHighlighter->setSuspended(false); // if we have a LineRanges, make sure we reset it if (lineRanges) { lineRanges->reset(); } if (regexRanges) { regexRanges->reset(); } load_line_ret ret; RangeResult rangeResult = IN_RANGE; while ((ret = load_line(s, is)) != FOUND_EOF) { // first check whether we must highlight only a specific range of lines if (lineRanges) { rangeResult = lineRanges->isInRange(params.line); if (rangeResult == IN_RANGE) { sourceHighlighter->setSuspended(false); rangeSeparatorPrinted = false; } else { sourceHighlighter->setSuspended(true); } } else if (regexRanges) { // we assume that regex range is set only if line range is not set if (regexRanges->isInRange(s)) { rangeResult = IN_RANGE; sourceHighlighter->setSuspended(false); } else { rangeResult = NOT_IN_RANGE; sourceHighlighter->setSuspended(true); } } if (rangeResult != NOT_IN_RANGE) { output->output(linePrefix); if (lineNumGenerator) { output->output(lineNumGenerator->generateLine(params.line)); } } else { // check whether we must print the range separator if (!rangeSeparatorPrinted && params.line != 1) { if (rangeSeparator.size()) { output->output(linePrefix); output->output(rangeSeparator); rangeSeparatorPrinted = true; } } } if (rangeResult == CONTEXT_RANGE) { // the whole line must be formatted using the "context" style contextFormatter->format(s, &params); } // highlighting must be performed anyway, since this will keep track // of the current state; if we've set suspended, simply no output will be produced sourceHighlighter->highlightParagraph(s); if (rangeResult != NOT_IN_RANGE) { // format the newline if (ret == FOUND_NL) { // the newline char is not highlighted, but only generated // possibly after a transformation output->output((preformatter ? preformatter->preformat("\n") : "\n")); } output->writePostLine(linePrefix); } (params.line)++; } output->writePostDoc(linePrefix); } void SourceFileHighlighter::highlight(const string &s) { istringstream is(s); highlight(is); } } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/delimitedlangelem.cpp������������������������������������������0000644�0001750�0001750�00000002033�11672675563�020634� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // C++ Implementation: delimitedlangelem // // Description: // // // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004 // // Copyright: See COPYING file that comes with this distribution // // #include "delimitedlangelem.h" #include "stringdef.h" using namespace std; namespace srchilite { DelimitedLangElem::DelimitedLangElem(const string &n, StringDef *s, StringDef *e, StringDef *es, bool multi, bool nes) : StateStartLangElem(n), start(s), end(e), escape(es), multiline(multi), nested(nes) { } DelimitedLangElem::~DelimitedLangElem() { if (start) delete start; if (end) delete end; if (escape) delete escape; } const std::string DelimitedLangElem::toString() const { string res = StateStartLangElem::toString() + " " + start->toString() + (end ? " " + end->toString() : ""); return res; } const std::string DelimitedLangElem::toStringOriginal() const { string res = StateStartLangElem::toString() + " " + start->toStringOriginal() + (end ? " " + end->toStringOriginal() : ""); return res; } } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/stringtable.h��������������������������������������������������0000644�0001750�0001750�00000001111�11672675563�017146� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2008 // // Copyright: See COPYING file that comes with this distribution // #ifndef STRINGTABLE_H_ #define STRINGTABLE_H_ #include <list> #include <string> namespace srchilite { /** * Stores dynamically allocated strings (used by the scanners), so that, * later on, we can easily free all the memory for these strings. */ class StringTable : public std::list<std::string *> { public: StringTable(); ~StringTable(); std::string *newString(const std::string &s); }; } #endif /*STRINGTABLE_H_*/ �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/matchingparameters.h�������������������������������������������0000644�0001750�0001750�00000001070�11672675563�020512� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2008 // // Copyright: See COPYING file that comes with this distribution // #ifndef MATCHINGPARAMETERS_H_ #define MATCHINGPARAMETERS_H_ namespace srchilite { /** * Structure for passing parameters to the matching algorithm, * for instance, "not beginning of line", etc. */ struct MatchingParameters { /// whether we are inspecting the beginning of a line bool beginningOfLine; MatchingParameters() : beginningOfLine(true) { } }; } #endif /*MATCHINGPARAMETERS_H_*/ ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/statestartlangelem.h�������������������������������������������0000644�0001750�0001750�00000004222�11672675563�020541� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // C++ Interface: statestartlangelem // // Description: // // // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004 // // Copyright: See COPYING file that comes with this distribution // // #ifndef STATESTARTLANGELEM_H #define STATESTARTLANGELEM_H #include "langelem.h" namespace srchilite { class StringDef; class StateLangElem; /** A language element that may start a new state/environment */ class StateStartLangElem: public LangElem { private: /// the exit level unsigned int exit; /// whether to exit all states bool exit_all; /// the possible State of which we represent the start. StateLangElem *statelangelem; public: /** * @param names the element names (one for each subexpression) * @param exit whether to exit a number of states (default 0) * @param all whether to exit all states */ StateStartLangElem(const std::string &n, unsigned int exit = 0, bool all = false); virtual ~StateStartLangElem(); virtual const std::string toString() const; /** * Sets the "exit" property of this element (i.e., if the element is match * then exit one state) * @param level the exit level (default to 1) */ void setExit(unsigned int level = 1) { exit = level; } /** * Sets the "exit all" property of this element (i.e., if the element is match * then exit all states and get back to the main initial state) */ void setExitAll() { exit_all = true; } /** * @return whether the "exit" property is set */ bool exitAll() const { return exit_all; } /** * @return whether the "exit all" property is set */ unsigned int getExit() const { return exit; } /** * @return the state for which this element represents the start */ StateLangElem *getStateLangElem() const { return statelangelem; } /** * Sets the state for which this element represents the start * @param s the state for which this element represents the start */ void setStateLangElem(StateLangElem *s) { statelangelem = s; } }; } #endif ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/Makefile.am����������������������������������������������������0000644�0001750�0001750�00000016603�11672675562�016526� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Copyright (C) 1999-2009 Lorenzo Bettini <http://www.lorenzobettini.it> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. #SUBDIRS = includes if NO_DOUBLECPP else SUFFIXES = .hpp .h # we need to put doublecpp generated files in the srcdir # since we want to distribute them .h.hpp: cd $(srcdir) && \ $(DOUBLECPP) --output-source-ext cc --invade-target --input-header-ext h --output-header-ext hpp --output-source-suff=_dbtab --verbose --assume-virtual -i $(notdir $<) touch $@ endif # for doxygen documentation if HAVE_DOXYGEN DOXYFILE=$(builddir)/srchilite.doxyfile help_dir=$(htmldir)/api doxygen.stamp: $(DOXYFILE) $(DOXYGEN) $(DOXYFLAGS) $< echo Timestamp > $@ ## This rule requires Autoconf 2.62 or newer. install-data-local: doxygen.stamp @$(NORMAL_INSTALL) $(MKDIR_P) $(DESTDIR)$(help_dir) $(INSTALL_DATA) $(builddir)/html/* $(DESTDIR)$(help_dir) ## Warning: the following rule assumes that this package is the ## sole owner of files below $(help_dir)! uninstall-local: @$(NORMAL_UNINSTALL) rm -f $(DESTDIR)$(help_dir)/* clean-local: rm -f $(builddir)/html/* endif AM_CPPFLAGS = -I$(top_srcdir)/gl -I$(top_builddir)/gl $(BOOST_CPPFLAGS) AM_LDFLAGS = $(BOOST_LDFLAGS) LDADD = $(top_builddir)/gl/libgnu.la lib_LTLIBRARIES = libsource-highlight.la libsource_highlight_la_SOURCES = \ fileutil.cc \ substfun.cpp \ stopwatch.cpp utils.cpp \ ioexception.cpp \ settings.cpp \ versions.cpp \ verbosity.cpp \ sourcehighlight.cpp styleparser.cc \ stylescanner.cc outlangdefparser.cc \ stylecssparser.cc stylecssscanner.cc outlangdefscanner.cc \ debuglistener.cpp langmap.cpp stylefileparser.cpp \ langelem.cpp statelangelem.cpp \ langelems.cpp statestartlangelem.cpp stringlistlangelem.cpp \ delimitedlangelem.cpp langelemsprinter.cpp langelemsprinter.hpp \ namedsubexpslangelem.cpp stringdef.cpp \ highlightrule.cpp highlighttoken.cpp \ highlightstate.cpp highlightrulefactory.cpp highlightstateprinter.cpp \ sourcehighlighter.cpp sourcefilehighlighter.cpp \ linenumgenerator.cpp lineranges.cpp regexranges.cpp \ formatter.cpp formattermanager.cpp \ textstyle.cpp textstyleformatter.cpp bufferedoutput.cpp \ preformatter.cpp wordtokenizer.cpp ctagscollector.cpp readtags.c ctagsformatter.cpp \ srcuntabifier.cpp textstyleformatterfactory.cpp \ docgenerator.cc doctemplate.cpp chartranslator.cc \ textstylebuilder.cpp fileinfo.cpp ctagsmanager.cpp \ regexhighlightrule.cpp regexrulefactory.cpp \ regexpreprocessor.cpp \ highlightstatebuilder.cpp highlightstatebuilder.hpp \ highlightbuilderexception.cpp langdefmanager.cpp \ langdefparser.cc langdefscanner.cc \ languageinfer.cpp \ parserexception.cpp \ stringtable.cpp vardefinitions.cpp \ sourcehighlightutils.cpp \ instances.cpp libsource_highlight_la_LIBADD = $(top_builddir)/gl/libgnu.la \ @LTLIBOBJS@ $(BOOST_REGEX_LIB) libsource_highlight_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LIBRARY_VERSION) library_includedir=$(includedir)/$(LIBRARY_NAMESPACE) library_include_HEADERS = $(h_sources) h_sources = parsestyles.h \ stringdef.h langelem.h \ statelangelem.h langelems.h langdefparserfun.h outlangdefparserfun.h \ tostringcollection.h regexpreprocessor.h \ langdefscanner.h outlangdefscanner.h parsestruct.h langmap.h statestartlangelem.h \ stringlistlangelem.h delimitedlangelem.h vardefinitions.h textstyle.h \ textstyles.h textstylebuilder.h doctemplate.h substfun.h \ parserinfo.h readtags.h fileinfo.h linebuffer.h preformatter.h \ langelemsprinter.h languageinfer.h stopwatch.h stylekey.h \ namedsubexpslangelem.h refposition.h \ highlightrule.h highlighttoken.h highlightrulefactory.h highlightstate.h \ regexhighlightrule.h regexrulefactory.h \ highlightstateprinter.h sourcehighlighter.h matchingparameters.h \ formatter.h formattermanager.h \ highlightstatebuilder.h highlightbuilderexception.h \ wordtokenizer.h ctagscollector.h formatterparams.h ctagsformatter.h \ sourcefilehighlighter.h linenumgenerator.h \ textstyleformatter.h formatterfactory.h textstyleformatterfactory.h \ langdefmanager.h sourcehighlight.h \ textstyleformattercollection.h \ ioexception.h parserexception.h stringtable.h \ eventgenerator.h highlightevent.h highlighteventlistener.h \ debuglistener.h ctagsmanager.h bufferedoutput.h lineranges.h regexranges.h \ colors.h \ keys.h styleparser.h stylecssparser.h \ fileutil.h \ chartranslator.h \ docgenerator.h \ srcuntabifier.h colormap.h \ langdefparser.h outlangdefparser.h \ stylefileparser.h \ settings.h \ versions.h \ verbosity.h \ sourcehighlightutils.h utils.h \ instances.h INCLUDES = -I@top_srcdir@/src EXTRA_DIST = $(h_sources) \ langelemsprinter_dbtab.cc \ highlightstatebuilder_dbtab.cc \ srchilite.doxyfile.in \ srchilite.pro \ styleparser.yy \ stylescanner.ll outlangdefparser.yy \ stylecssparser.yy stylecssscanner.ll outlangdefscanner.ll \ langdefparser.yy langdefscanner.ll BUILT_SOURCES = \ langdefparser.cc langdefparser.h langdefscanner.cc \ outlangdefparser.cc outlangdefparser.h outlangdefscanner.cc \ styleparser.cc styleparser.h \ stylecssparser.cc stylecssparser.h \ stylescanner.cc stylecssscanner.cc \ langelemsprinter.hpp langelemsprinter_dbtab.cc \ highlightstatebuilder.hpp highlightstatebuilder_dbtab.cc langdefscanner.cc: $(srcdir)/langdefscanner.ll $(LEX) $(LFLAGS) -o $(srcdir)/langdefscanner.cc $(srcdir)/langdefscanner.ll langdefparser.cc: $(srcdir)/langdefparser.yy $(YACC) -p langdef_ -o $(srcdir)/langdefparser.cc $(srcdir)/langdefparser.yy --defines=$(srcdir)/langdefparser.h langdefparser.h: langdefparser.cc outlangdefscanner.cc: $(srcdir)/outlangdefscanner.ll $(LEX) $(LFLAGS) -o $(srcdir)/outlangdefscanner.cc $(srcdir)/outlangdefscanner.ll outlangdefparser.cc outlangdefparser.h: $(srcdir)/outlangdefparser.yy $(YACC) -p outlangdef_ -o $(srcdir)/outlangdefparser.cc $(srcdir)/outlangdefparser.yy --defines=$(srcdir)/outlangdefparser.h stylescanner.cc: $(srcdir)/stylescanner.ll $(LEX) $(LFLAGS) -o $(srcdir)/stylescanner.cc $(srcdir)/stylescanner.ll stylecssscanner.cc: $(srcdir)/stylecssscanner.ll $(LEX) $(LFLAGS) -o $(srcdir)/stylecssscanner.cc $(srcdir)/stylecssscanner.ll styleparser.cc styleparser.h: $(srcdir)/styleparser.yy $(YACC) -p stylesc_ -o $(srcdir)/styleparser.cc $(srcdir)/styleparser.yy --defines=$(srcdir)/styleparser.h stylecssparser.cc stylecssparser.h: $(srcdir)/stylecssparser.yy $(YACC) -p stylecsssc_ -o $(srcdir)/stylecssparser.cc $(srcdir)/stylecssparser.yy --defines=$(srcdir)/stylecssparser.h if !NO_CTAGS EXTRA_PROGRAMS = test_readtags endif test_readtags_SOURCES = test_readtags_main.cpp readtags.h test_readtags_DEPENDENCIES = mytags test_readtags_LDADD = readtags.$(OBJEXT) mytags: $(srcdir)/test_readtags_main.cpp $(CTAGS) --excmd=n --fields=+n -o mytags $(srcdir)/test_readtags_main.cpp $(srcdir)/readtags.h CLEANFILES = doxygen.stamp DISTCLEANFILES = mytags MAINTAINERCLEANFILES = styleparser.cc styleparser.h stylescanner.cc \ langdefparser.cc langdefparser.h langdefscanner.cc \ outlangdefparser.cc outlangdefparser.h outlangdefscanner.cc �����������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/srchilite/langelem.h�����������������������������������������������������0000644�0001750�0001750�00000003742�11672675563�016430� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 1999-2009 // // Copyright: See COPYING file that comes with this distribution // #ifndef LANGELEM_H #define LANGELEM_H #include "parserinfo.h" namespace srchilite { /** * Represents a generic language definition element */ // doublecpp: forward declarations, DO NOT MODIFY class HighlightState; // file: highlightstate.h class HighlightStateBuilder; // file: highlightstatebuilder.h class LangElemsPrinter; // file: langelemsprinter.h // doublecpp: end, DO NOT MODIFY class LangElem : public ParserInfo { private: /// the name for this language element const std::string name; /// whether this redefs an existing language element bool redef; // whether this substitutes an existing language element bool subst; public: LangElem(const std::string &n) : name(n), redef(false), subst(false) { } virtual ~LangElem() { } const std::string getName() const { return name; } /** * return the string representation (with preprocessing) * @return the string representation */ virtual const std::string toString() const { return name; } /** * return the original representation (without any preprocessing); * this is useful for printing errors * @return the original representation */ virtual const std::string toStringOriginal() const = 0; bool isRedef() const { return redef; } void setRedef() { redef = true; } bool isSubst() const { return subst; } void setSubst() { subst = true; } /** * @return a string representation of the ParserInfo struct */ const std::string toStringParserInfo() const; // doublecpp: dispatch methods, DO NOT MODIFY public: virtual void dispatch_build(HighlightStateBuilder *, HighlightState * state); virtual void dispatch_collect_const(LangElemsPrinter *); // doublecpp: end, DO NOT MODIFY }; } #endif ������������������������������source-highlight-3.1.6/lib/srchilite/langdefmanager.h�����������������������������������������������0000644�0001750�0001750�00000005505�11672675563�017576� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2008 // // Copyright: See COPYING file that comes with this distribution // #ifndef LANGDEFMANAGER_H_ #define LANGDEFMANAGER_H_ #include <map> #include "highlightstate.h" namespace srchilite { /// store already generated HighlightState specific to a given file name typedef std::map<std::string, HighlightStatePtr> HighlightStateCache; class HighlightRuleFactory; class LangElems; /** * Handles langdef language definition files */ class LangDefManager { /// the factory for creating highlight rules HighlightRuleFactory *ruleFactory; /// store already generated HighlightState specific to a given file name HighlightStateCache highlightStateCache; public: /** * @param ruleFactory the factory for creating highlight rules */ LangDefManager(HighlightRuleFactory *ruleFactory); ~LangDefManager(); /** * Builds the HighlightState corresponding to the * language definition by the specified file, using the specified path. * @param path the path that is used for searching for the file and included files * @param file the name of the language definition file * @return the HighlightState built using the language definitions */ HighlightStatePtr buildHighlightState(const std::string &path, const std::string &file); /** * Gets the HighlightState corresponding to the * language definition file, using the specified * path. If the language definition file was already inspected, then it * won't rebuild the HighlightState, but it will reuse the previously built one. * @param path the path that is used for searching for the file and included files * @param file the name of the language definition file * @return the HighlightState built using the language definitions */ HighlightStatePtr getHighlightState(const std::string &path, const std::string &file); /** * Gets the HighlightState corresponding to the * language definition by the specified file, using the default path * for language definition files (either stored in the user home setting * configuration file or the default hardcoded one). * @param file the name of the language definition file * @return the HighlightState built using the language definitions */ HighlightStatePtr getHighlightState(const std::string &file); /** * Returns the language elements of the specified language definition file. * @param path * @param file * @return the language elements of the specified language definition file. */ LangElems *getLangElems(const std::string &path, const std::string &file); const HighlightRuleFactory *getRuleFactory() const { return ruleFactory; } }; } #endif /*LANGDEFMANAGER_H_*/ �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/Makefile.in��������������������������������������������������������������0000664�0001750�0001750�00000077411�11675044677�014557� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Copyright (C) 1999-2008 Lorenzo Bettini <http://www.lorenzobettini.it> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = lib DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/gl/m4/00gnulib.m4 \ $(top_srcdir)/gl/m4/ac_prog_doxygen.m4 \ $(top_srcdir)/gl/m4/dirent_h.m4 $(top_srcdir)/gl/m4/dirname.m4 \ $(top_srcdir)/gl/m4/double-slash-root.m4 \ $(top_srcdir)/gl/m4/extensions.m4 \ $(top_srcdir)/gl/m4/getopt.m4 \ $(top_srcdir)/gl/m4/gnulib-common.m4 \ $(top_srcdir)/gl/m4/gnulib-comp.m4 \ $(top_srcdir)/gl/m4/include_next.m4 \ $(top_srcdir)/gl/m4/malloc.m4 $(top_srcdir)/gl/m4/memset.m4 \ $(top_srcdir)/gl/m4/mkdir.m4 $(top_srcdir)/gl/m4/nocrash.m4 \ $(top_srcdir)/gl/m4/ssize_t.m4 $(top_srcdir)/gl/m4/stdbool.m4 \ $(top_srcdir)/gl/m4/stddef_h.m4 \ $(top_srcdir)/gl/m4/stdlib_h.m4 $(top_srcdir)/gl/m4/strdup.m4 \ $(top_srcdir)/gl/m4/string_h.m4 \ $(top_srcdir)/gl/m4/sys_stat_h.m4 \ $(top_srcdir)/gl/m4/time_h.m4 $(top_srcdir)/gl/m4/unistd_h.m4 \ $(top_srcdir)/gl/m4/warn-on-use.m4 \ $(top_srcdir)/gl/m4/wchar_t.m4 \ $(top_srcdir)/m4/ax_boost_base.m4 \ $(top_srcdir)/m4/ax_boost_regex.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ABSOLUTEDATADIR = @ABSOLUTEDATADIR@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ ARFLAGS = @ARFLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASH_COMPLETION_DIR = @BASH_COMPLETION_DIR@ BASH_SHELL = @BASH_SHELL@ BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ BOOST_LDFLAGS = @BOOST_LDFLAGS@ BOOST_REGEX_LIB = @BOOST_REGEX_LIB@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHROOT_INPUT_DIR = @CHROOT_INPUT_DIR@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOUBLECPP = @DOUBLECPP@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GENGETOPT = @GENGETOPT@ GETOPT_H = @GETOPT_H@ GNULIB_ALPHASORT = @GNULIB_ALPHASORT@ GNULIB_ATOLL = @GNULIB_ATOLL@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ GNULIB_CHDIR = @GNULIB_CHDIR@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@ GNULIB_DIRFD = @GNULIB_DIRFD@ GNULIB_DUP = @GNULIB_DUP@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ GNULIB_FDATASYNC = @GNULIB_FDATASYNC@ GNULIB_FDOPENDIR = @GNULIB_FDOPENDIR@ GNULIB_FFSL = @GNULIB_FFSL@ GNULIB_FFSLL = @GNULIB_FFSLL@ GNULIB_FSTAT = @GNULIB_FSTAT@ GNULIB_FSTATAT = @GNULIB_FSTATAT@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@ GNULIB_GRANTPT = @GNULIB_GRANTPT@ GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@ GNULIB_LCHMOD = @GNULIB_LCHMOD@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MBTOWC = @GNULIB_MBTOWC@ GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_MKDIRAT = @GNULIB_MKDIRAT@ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ GNULIB_MKFIFO = @GNULIB_MKFIFO@ GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@ GNULIB_MKNOD = @GNULIB_MKNOD@ GNULIB_MKNODAT = @GNULIB_MKNODAT@ GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_MKTIME = @GNULIB_MKTIME@ GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@ GNULIB_OPENDIR = @GNULIB_OPENDIR@ GNULIB_PIPE = @GNULIB_PIPE@ GNULIB_PIPE2 = @GNULIB_PIPE2@ GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PTSNAME = @GNULIB_PTSNAME@ GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PWRITE = @GNULIB_PWRITE@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_READ = @GNULIB_READ@ GNULIB_READDIR = @GNULIB_READDIR@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ GNULIB_REWINDDIR = @GNULIB_REWINDDIR@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SCANDIR = @GNULIB_SCANDIR@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_STAT = @GNULIB_STAT@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRERROR_R = @GNULIB_STRERROR_R@ GNULIB_STRNCAT = @GNULIB_STRNCAT@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRPTIME = @GNULIB_STRPTIME@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOD = @GNULIB_STRTOD@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRTOLL = @GNULIB_STRTOLL@ GNULIB_STRTOULL = @GNULIB_STRTOULL@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@ GNULIB_TIMEGM = @GNULIB_TIMEGM@ GNULIB_TIME_R = @GNULIB_TIME_R@ GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@ GNULIB_UNSETENV = @GNULIB_UNSETENV@ GNULIB_USLEEP = @GNULIB_USLEEP@ GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@ GNULIB_WCTOMB = @GNULIB_WCTOMB@ GNULIB_WRITE = @GNULIB_WRITE@ GNULIB__EXIT = @GNULIB__EXIT@ GREP = @GREP@ HAVE_ALPHASORT = @HAVE_ALPHASORT@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ HAVE_CHOWN = @HAVE_CHOWN@ HAVE_CLOSEDIR = @HAVE_CLOSEDIR@ HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@ HAVE_DECL_FDOPENDIR = @HAVE_DECL_FDOPENDIR@ HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ HAVE_DIRENT_H = @HAVE_DIRENT_H@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHDIR = @HAVE_FCHDIR@ HAVE_FCHMODAT = @HAVE_FCHMODAT@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FDATASYNC = @HAVE_FDATASYNC@ HAVE_FDOPENDIR = @HAVE_FDOPENDIR@ HAVE_FFSL = @HAVE_FFSL@ HAVE_FFSLL = @HAVE_FFSLL@ HAVE_FSTATAT = @HAVE_FSTATAT@ HAVE_FSYNC = @HAVE_FSYNC@ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ HAVE_FUTIMENS = @HAVE_FUTIMENS@ HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ HAVE_GETGROUPS = @HAVE_GETGROUPS@ HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ HAVE_GETLOGIN = @HAVE_GETLOGIN@ HAVE_GETOPT_H = @HAVE_GETOPT_H@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GRANTPT = @HAVE_GRANTPT@ HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LCHOWN = @HAVE_LCHOWN@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ HAVE_LSTAT = @HAVE_LSTAT@ HAVE_MBSLEN = @HAVE_MBSLEN@ HAVE_MEMCHR = @HAVE_MEMCHR@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_MKDIRAT = @HAVE_MKDIRAT@ HAVE_MKDTEMP = @HAVE_MKDTEMP@ HAVE_MKFIFO = @HAVE_MKFIFO@ HAVE_MKFIFOAT = @HAVE_MKFIFOAT@ HAVE_MKNOD = @HAVE_MKNOD@ HAVE_MKNODAT = @HAVE_MKNODAT@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMP = @HAVE_MKSTEMP@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ HAVE_NANOSLEEP = @HAVE_NANOSLEEP@ HAVE_OPENDIR = @HAVE_OPENDIR@ HAVE_OS_H = @HAVE_OS_H@ HAVE_PIPE = @HAVE_PIPE@ HAVE_PIPE2 = @HAVE_PIPE2@ HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@ HAVE_PREAD = @HAVE_PREAD@ HAVE_PTSNAME = @HAVE_PTSNAME@ HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ HAVE_PWRITE = @HAVE_PWRITE@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_READDIR = @HAVE_READDIR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ HAVE_REALPATH = @HAVE_REALPATH@ HAVE_REWINDDIR = @HAVE_REWINDDIR@ HAVE_RPMATCH = @HAVE_RPMATCH@ HAVE_SCANDIR = @HAVE_SCANDIR@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@ HAVE_SLEEP = @HAVE_SLEEP@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRPTIME = @HAVE_STRPTIME@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ HAVE_TIMEGM = @HAVE_TIMEGM@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ HAVE_USLEEP = @HAVE_USLEEP@ HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE__BOOL = @HAVE__BOOL@ HAVE__EXIT = @HAVE__EXIT@ HELP2MAN = @HELP2MAN@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBRARY_NAMESPACE = @LIBRARY_NAMESPACE@ LIBRARY_VERSION = @LIBRARY_VERSION@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@ NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ NEXT_DIRENT_H = @NEXT_DIRENT_H@ NEXT_GETOPT_H = @NEXT_GETOPT_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PRAGMA_COLUMNS = @PRAGMA_COLUMNS@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ RANLIB = @RANLIB@ REPLACE_CALLOC = @REPLACE_CALLOC@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ REPLACE_CHOWN = @REPLACE_CHOWN@ REPLACE_CLOSE = @REPLACE_CLOSE@ REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@ REPLACE_DIRFD = @REPLACE_DIRFD@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@ REPLACE_FSTAT = @REPLACE_FSTAT@ REPLACE_FSTATAT = @REPLACE_FSTATAT@ REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_LSTAT = @REPLACE_LSTAT@ REPLACE_MALLOC = @REPLACE_MALLOC@ REPLACE_MBTOWC = @REPLACE_MBTOWC@ REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKDIR = @REPLACE_MKDIR@ REPLACE_MKFIFO = @REPLACE_MKFIFO@ REPLACE_MKNOD = @REPLACE_MKNOD@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OPENDIR = @REPLACE_OPENDIR@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_PWRITE = @REPLACE_PWRITE@ REPLACE_READ = @REPLACE_READ@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_REALLOC = @REPLACE_REALLOC@ REPLACE_REALPATH = @REPLACE_REALPATH@ REPLACE_RMDIR = @REPLACE_RMDIR@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_STAT = @REPLACE_STAT@ REPLACE_STPNCPY = @REPLACE_STPNCPY@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRERROR_R = @REPLACE_STRERROR_R@ REPLACE_STRNCAT = @REPLACE_STRNCAT@ REPLACE_STRNDUP = @REPLACE_STRNDUP@ REPLACE_STRNLEN = @REPLACE_STRNLEN@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ REPLACE_UNLINK = @REPLACE_UNLINK@ REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ REPLACE_UNSETENV = @REPLACE_UNSETENV@ REPLACE_USLEEP = @REPLACE_USLEEP@ REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@ REPLACE_WCTOMB = @REPLACE_WCTOMB@ REPLACE_WRITE = @REPLACE_WRITE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STRIP = @STRIP@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TAR = @TAR@ TEXI2HTML = @TEXI2HTML@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ VALGRIND = @VALGRIND@ VERSION = @VERSION@ YACC = @YACC@ YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bash_completiondir = @bash_completiondir@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ gltests_WITNESS = @gltests_WITNESS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ source_highlightdatadir = @source_highlightdatadir@ source_highlightdocdir = @source_highlightdocdir@ source_highlightlibdocdir = @source_highlightlibdocdir@ source_highlightlibexampledir = @source_highlightlibexampledir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = srchilite tests examples compat DIST_SUBDIRS = $(SUBDIRS) EXTRA_DIST = lib.pro all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu lib/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ ctags ctags-recursive distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/lib.pro������������������������������������������������������������������0000644�0001750�0001750�00000000051�11672675562�013762� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������TEMPLATE = subdirs SUBDIRS = srchilite ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/compat/������������������������������������������������������������������0000775�0001750�0001750�00000000000�11676051671�014034� 5����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/compat/compat_dirent.h���������������������������������������������������0000644�0001750�0001750�00000005624�11672675562�016771� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * DIRENT.H (formerly DIRLIB.H) * This file has no copyright assigned and is placed in the Public Domain. * This file is a part of the mingw-runtime package. * * The mingw-runtime package and its code is distributed in the hope that it * will be useful but WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESSED OR * IMPLIED ARE HEREBY DISCLAIMED. This includes but is not limited to * warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * * You are free to use this package and its code without limitation. */ #ifndef _DIRENT_H_ #define _DIRENT_H_ #include <io.h> #include <stdio.h> #define PATH_MAX 512 struct dirent { long d_ino; /* Always zero. */ unsigned short d_reclen; /* Always zero. */ unsigned short d_namlen; /* Length of name in d_name. */ char d_name[FILENAME_MAX]; /* File name. */ }; /* * This is an internal data structure. Good programmers will not use it * except as an argument to one of the functions below. * dd_stat field is now int (was short in older versions). */ typedef struct { /* disk transfer area for this dir */ struct _finddata_t dd_dta; /* dirent struct to return from dir (NOTE: this makes this thread * safe as long as only one thread uses a particular DIR struct at * a time) */ struct dirent dd_dir; /* _findnext handle */ long dd_handle; /* * Status of search: * 0 = not started yet (next entry to read is first entry) * -1 = off the end * positive = 0 based index of next entry */ int dd_stat; /* given path for dir with search pattern (struct is extended) */ char dd_name[PATH_MAX+3]; } DIR; struct _wdirent { long d_ino; /* Always zero. */ unsigned short d_reclen; /* Always zero. */ unsigned short d_namlen; /* Length of name in d_name. */ wchar_t d_name[FILENAME_MAX]; /* File name. */ }; /* * This is an internal data structure. Good programmers will not use it * except as an argument to one of the functions below. */ typedef struct { /* disk transfer area for this dir */ //struct _wfinddata_t dd_dta; /* dirent struct to return from dir (NOTE: this makes this thread * safe as long as only one thread uses a particular DIR struct at * a time) */ struct _wdirent dd_dir; /* _findnext handle */ long dd_handle; /* * Status of search: * 0 = not started yet (next entry to read is first entry) * -1 = off the end * positive = 0 based index of next entry */ int dd_stat; /* given path for dir with search pattern (struct is extended) */ wchar_t dd_name[1]; } _WDIR; DIR *opendir(const char *); int closedir(DIR *); struct dirent *readdir(DIR *); #endif /* Not _DIRENT_H_ */ ������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/compat/getopt.c����������������������������������������������������������0000644�0001750�0001750�00000076235�11672675562�015444� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Getopt for GNU. NOTE: getopt is now part of the C library, so if you don't know what "Keep this file name-space clean" means, talk to drepper@gnu.org before changing it! Copyright (C) 1987,88,89,90,91,92,93,94,95,96,98,99,2000,2001,2002,2003,2004,2006,2008 Free Software Foundation, Inc. This file is part of the GNU C Library. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include "getopt.h" #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> # define _(msgid) (msgid) #if defined _LIBC && defined USE_IN_LIBIO # include <wchar.h> #endif #ifndef attribute_hidden # define attribute_hidden #endif /* Unlike standard Unix `getopt', functions like `getopt_long' let the user intersperse the options with the other arguments. As `getopt_long' works, it permutes the elements of ARGV so that, when it is done, all the options precede everything else. Thus all application programs are extended to handle flexible argument order. Using `getopt' or setting the environment variable POSIXLY_CORRECT disables permutation. Then the application's behavior is completely standard. GNU application programs can use a third alternative mode in which they can distinguish the relative order of options and other arguments. */ #include "getopt_int.h" /* For communication from `getopt' to the caller. When `getopt' finds an option that takes an argument, the argument value is returned here. Also, when `ordering' is RETURN_IN_ORDER, each non-option ARGV-element is returned here. */ char *optarg; /* Index in ARGV of the next element to be scanned. This is used for communication to and from the caller and for communication between successive calls to `getopt'. On entry to `getopt', zero means this is the first call; initialize. When `getopt' returns -1, this is the index of the first of the non-option elements that the caller should itself scan. Otherwise, `optind' communicates from one call to the next how much of ARGV has been scanned so far. */ /* 1003.2 says this must be 1 before any call. */ int optind = 1; /* Callers store zero here to inhibit the error message for unrecognized options. */ int opterr = 1; /* Set to an option character which was unrecognized. This must be initialized on some systems to avoid linking in the system's own getopt implementation. */ int optopt = '?'; /* Keep a global copy of all internal members of getopt_data. */ static struct _getopt_data getopt_data; #if defined HAVE_DECL_GETENV && !HAVE_DECL_GETENV extern char *getenv (); #endif #ifdef _LIBC /* Stored original parameters. XXX This is no good solution. We should rather copy the args so that we can compare them later. But we must not use malloc(3). */ extern int __libc_argc; extern char **__libc_argv; /* Bash 2.0 gives us an environment variable containing flags indicating ARGV elements that should not be considered arguments. */ # ifdef USE_NONOPTION_FLAGS /* Defined in getopt_init.c */ extern char *__getopt_nonoption_flags; # endif # ifdef USE_NONOPTION_FLAGS # define SWAP_FLAGS(ch1, ch2) \ if (d->__nonoption_flags_len > 0) \ { \ char __tmp = __getopt_nonoption_flags[ch1]; \ __getopt_nonoption_flags[ch1] = __getopt_nonoption_flags[ch2]; \ __getopt_nonoption_flags[ch2] = __tmp; \ } # else # define SWAP_FLAGS(ch1, ch2) # endif #else /* !_LIBC */ # define SWAP_FLAGS(ch1, ch2) #endif /* _LIBC */ /* Exchange two adjacent subsequences of ARGV. One subsequence is elements [first_nonopt,last_nonopt) which contains all the non-options that have been skipped so far. The other is elements [last_nonopt,optind), which contains all the options processed since those non-options were skipped. `first_nonopt' and `last_nonopt' are relocated so that they describe the new indices of the non-options in ARGV after they are moved. */ static void exchange (char **argv, struct _getopt_data *d) { int bottom = d->__first_nonopt; int middle = d->__last_nonopt; int top = d->optind; char *tem; /* Exchange the shorter segment with the far end of the longer segment. That puts the shorter segment into the right place. It leaves the longer segment in the right place overall, but it consists of two parts that need to be swapped next. */ #if defined _LIBC && defined USE_NONOPTION_FLAGS /* First make sure the handling of the `__getopt_nonoption_flags' string can work normally. Our top argument must be in the range of the string. */ if (d->__nonoption_flags_len > 0 && top >= d->__nonoption_flags_max_len) { /* We must extend the array. The user plays games with us and presents new arguments. */ char *new_str = malloc (top + 1); if (new_str == NULL) d->__nonoption_flags_len = d->__nonoption_flags_max_len = 0; else { memset (__mempcpy (new_str, __getopt_nonoption_flags, d->__nonoption_flags_max_len), '\0', top + 1 - d->__nonoption_flags_max_len); d->__nonoption_flags_max_len = top + 1; __getopt_nonoption_flags = new_str; } } #endif while (top > middle && middle > bottom) { if (top - middle > middle - bottom) { /* Bottom segment is the short one. */ int len = middle - bottom; register int i; /* Swap it with the top part of the top segment. */ for (i = 0; i < len; i++) { tem = argv[bottom + i]; argv[bottom + i] = argv[top - (middle - bottom) + i]; argv[top - (middle - bottom) + i] = tem; SWAP_FLAGS (bottom + i, top - (middle - bottom) + i); } /* Exclude the moved bottom segment from further swapping. */ top -= len; } else { /* Top segment is the short one. */ int len = top - middle; register int i; /* Swap it with the bottom part of the bottom segment. */ for (i = 0; i < len; i++) { tem = argv[bottom + i]; argv[bottom + i] = argv[middle + i]; argv[middle + i] = tem; SWAP_FLAGS (bottom + i, middle + i); } /* Exclude the moved top segment from further swapping. */ bottom += len; } } /* Update records for the slots the non-options now occupy. */ d->__first_nonopt += (d->optind - d->__last_nonopt); d->__last_nonopt = d->optind; } /* Initialize the internal data when the first call is made. */ static const char * _getopt_initialize (int argc, char **argv, const char *optstring, int posixly_correct, struct _getopt_data *d) { /* Start processing options with ARGV-element 1 (since ARGV-element 0 is the program name); the sequence of previously skipped non-option ARGV-elements is empty. */ d->__first_nonopt = d->__last_nonopt = d->optind; d->__nextchar = NULL; d->__posixly_correct = posixly_correct || !!getenv ("POSIXLY_CORRECT"); /* Determine how to handle the ordering of options and nonoptions. */ if (optstring[0] == '-') { d->__ordering = RETURN_IN_ORDER; ++optstring; } else if (optstring[0] == '+') { d->__ordering = REQUIRE_ORDER; ++optstring; } else if (d->__posixly_correct) d->__ordering = REQUIRE_ORDER; else d->__ordering = PERMUTE; #if defined _LIBC && defined USE_NONOPTION_FLAGS if (!d->__posixly_correct && argc == __libc_argc && argv == __libc_argv) { if (d->__nonoption_flags_max_len == 0) { if (__getopt_nonoption_flags == NULL || __getopt_nonoption_flags[0] == '\0') d->__nonoption_flags_max_len = -1; else { const char *orig_str = __getopt_nonoption_flags; int len = d->__nonoption_flags_max_len = strlen (orig_str); if (d->__nonoption_flags_max_len < argc) d->__nonoption_flags_max_len = argc; __getopt_nonoption_flags = (char *) malloc (d->__nonoption_flags_max_len); if (__getopt_nonoption_flags == NULL) d->__nonoption_flags_max_len = -1; else memset (__mempcpy (__getopt_nonoption_flags, orig_str, len), '\0', d->__nonoption_flags_max_len - len); } } d->__nonoption_flags_len = d->__nonoption_flags_max_len; } else d->__nonoption_flags_len = 0; #endif return optstring; } /* Scan elements of ARGV (whose length is ARGC) for option characters given in OPTSTRING. If an element of ARGV starts with '-', and is not exactly "-" or "--", then it is an option element. The characters of this element (aside from the initial '-') are option characters. If `getopt' is called repeatedly, it returns successively each of the option characters from each of the option elements. If `getopt' finds another option character, it returns that character, updating `optind' and `nextchar' so that the next call to `getopt' can resume the scan with the following option character or ARGV-element. If there are no more option characters, `getopt' returns -1. Then `optind' is the index in ARGV of the first ARGV-element that is not an option. (The ARGV-elements have been permuted so that those that are not options now come last.) OPTSTRING is a string containing the legitimate option characters. If an option character is seen that is not listed in OPTSTRING, return '?' after printing an error message. If you set `opterr' to zero, the error message is suppressed but we still return '?'. If a char in OPTSTRING is followed by a colon, that means it wants an arg, so the following text in the same ARGV-element, or the text of the following ARGV-element, is returned in `optarg'. Two colons mean an option that wants an optional arg; if there is text in the current ARGV-element, it is returned in `optarg', otherwise `optarg' is set to zero. If OPTSTRING starts with `-' or `+', it requests different methods of handling the non-option ARGV-elements. See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above. Long-named options begin with `--' instead of `-'. Their names may be abbreviated as long as the abbreviation is unique or is an exact match for some defined option. If they have an argument, it follows the option name in the same ARGV-element, separated from the option name by a `=', or else the in next ARGV-element. When `getopt' finds a long-named option, it returns 0 if that option's `flag' field is nonzero, the value of the option's `val' field if the `flag' field is zero. LONGOPTS is a vector of `struct option' terminated by an element containing a name which is zero. LONGIND returns the index in LONGOPT of the long-named option found. It is only valid when a long-named option has been found by the most recent call. If LONG_ONLY is nonzero, '-' as well as '--' can introduce long-named options. If POSIXLY_CORRECT is nonzero, behave as if the POSIXLY_CORRECT environment variable were set. */ int _getopt_internal_r (int argc, char **argv, const char *optstring, const struct option *longopts, int *longind, int long_only, int posixly_correct, struct _getopt_data *d) { int print_errors = d->opterr; if (optstring[0] == ':') print_errors = 0; if (argc < 1) return -1; d->optarg = NULL; if (d->optind == 0 || !d->__initialized) { if (d->optind == 0) d->optind = 1; /* Don't scan ARGV[0], the program name. */ optstring = _getopt_initialize (argc, argv, optstring, posixly_correct, d); d->__initialized = 1; } /* Test whether ARGV[optind] points to a non-option argument. Either it does not have option syntax, or there is an environment flag from the shell indicating it is not an option. The later information is only used when the used in the GNU libc. */ #if defined _LIBC && defined USE_NONOPTION_FLAGS # define NONOPTION_P (argv[d->optind][0] != '-' || argv[d->optind][1] == '\0' \ || (d->optind < d->__nonoption_flags_len \ && __getopt_nonoption_flags[d->optind] == '1')) #else # define NONOPTION_P (argv[d->optind][0] != '-' || argv[d->optind][1] == '\0') #endif if (d->__nextchar == NULL || *d->__nextchar == '\0') { /* Advance to the next ARGV-element. */ /* Give FIRST_NONOPT & LAST_NONOPT rational values if OPTIND has been moved back by the user (who may also have changed the arguments). */ if (d->__last_nonopt > d->optind) d->__last_nonopt = d->optind; if (d->__first_nonopt > d->optind) d->__first_nonopt = d->optind; if (d->__ordering == PERMUTE) { /* If we have just processed some options following some non-options, exchange them so that the options come first. */ if (d->__first_nonopt != d->__last_nonopt && d->__last_nonopt != d->optind) exchange ((char **) argv, d); else if (d->__last_nonopt != d->optind) d->__first_nonopt = d->optind; /* Skip any additional non-options and extend the range of non-options previously skipped. */ while (d->optind < argc && NONOPTION_P) d->optind++; d->__last_nonopt = d->optind; } /* The special ARGV-element `--' means premature end of options. Skip it like a null option, then exchange with previous non-options as if it were an option, then skip everything else like a non-option. */ if (d->optind != argc && !strcmp (argv[d->optind], "--")) { d->optind++; if (d->__first_nonopt != d->__last_nonopt && d->__last_nonopt != d->optind) exchange ((char **) argv, d); else if (d->__first_nonopt == d->__last_nonopt) d->__first_nonopt = d->optind; d->__last_nonopt = argc; d->optind = argc; } /* If we have done all the ARGV-elements, stop the scan and back over any non-options that we skipped and permuted. */ if (d->optind == argc) { /* Set the next-arg-index to point at the non-options that we previously skipped, so the caller will digest them. */ if (d->__first_nonopt != d->__last_nonopt) d->optind = d->__first_nonopt; return -1; } /* If we have come to a non-option and did not permute it, either stop the scan or describe it to the caller and pass it by. */ if (NONOPTION_P) { if (d->__ordering == REQUIRE_ORDER) return -1; d->optarg = argv[d->optind++]; return 1; } /* We have found another option-ARGV-element. Skip the initial punctuation. */ d->__nextchar = (argv[d->optind] + 1 + (longopts != NULL && argv[d->optind][1] == '-')); } /* Decode the current option-ARGV-element. */ /* Check whether the ARGV-element is a long option. If long_only and the ARGV-element has the form "-f", where f is a valid short option, don't consider it an abbreviated form of a long option that starts with f. Otherwise there would be no way to give the -f short option. On the other hand, if there's a long option "fubar" and the ARGV-element is "-fu", do consider that an abbreviation of the long option, just like "--fu", and not "-f" with arg "u". This distinction seems to be the most useful approach. */ if (longopts != NULL && (argv[d->optind][1] == '-' || (long_only && (argv[d->optind][2] || !strchr (optstring, argv[d->optind][1]))))) { char *nameend; const struct option *p; const struct option *pfound = NULL; int exact = 0; int ambig = 0; int indfound = -1; int option_index; for (nameend = d->__nextchar; *nameend && *nameend != '='; nameend++) /* Do nothing. */ ; /* Test all long options for either exact match or abbreviated matches. */ for (p = longopts, option_index = 0; p->name; p++, option_index++) if (!strncmp (p->name, d->__nextchar, nameend - d->__nextchar)) { if ((unsigned int) (nameend - d->__nextchar) == (unsigned int) strlen (p->name)) { /* Exact match found. */ pfound = p; indfound = option_index; exact = 1; break; } else if (pfound == NULL) { /* First nonexact match found. */ pfound = p; indfound = option_index; } else if (long_only || pfound->has_arg != p->has_arg || pfound->flag != p->flag || pfound->val != p->val) /* Second or later nonexact match found. */ ambig = 1; } if (ambig && !exact) { if (print_errors) { #if defined _LIBC && defined USE_IN_LIBIO char *buf; if (__asprintf (&buf, _("%s: option `%s' is ambiguous\n"), argv[0], argv[d->optind]) >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #else fprintf (stderr, _("%s: option `%s' is ambiguous\n"), argv[0], argv[d->optind]); #endif } d->__nextchar += strlen (d->__nextchar); d->optind++; d->optopt = 0; return '?'; } if (pfound != NULL) { option_index = indfound; d->optind++; if (*nameend) { /* Don't test has_arg with >, because some C compilers don't allow it to be used on enums. */ if (pfound->has_arg) d->optarg = nameend + 1; else { if (print_errors) { #if defined _LIBC && defined USE_IN_LIBIO char *buf; int n; #endif if (argv[d->optind - 1][1] == '-') { /* --option */ #if defined _LIBC && defined USE_IN_LIBIO n = __asprintf (&buf, _("\ %s: option `--%s' doesn't allow an argument\n"), argv[0], pfound->name); #else fprintf (stderr, _("\ %s: option `--%s' doesn't allow an argument\n"), argv[0], pfound->name); #endif } else { /* +option or -option */ #if defined _LIBC && defined USE_IN_LIBIO n = __asprintf (&buf, _("\ %s: option `%c%s' doesn't allow an argument\n"), argv[0], argv[d->optind - 1][0], pfound->name); #else fprintf (stderr, _("\ %s: option `%c%s' doesn't allow an argument\n"), argv[0], argv[d->optind - 1][0], pfound->name); #endif } #if defined _LIBC && defined USE_IN_LIBIO if (n >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #endif } d->__nextchar += strlen (d->__nextchar); d->optopt = pfound->val; return '?'; } } else if (pfound->has_arg == 1) { if (d->optind < argc) d->optarg = argv[d->optind++]; else { if (print_errors) { #if defined _LIBC && defined USE_IN_LIBIO char *buf; if (__asprintf (&buf, _("\ %s: option `%s' requires an argument\n"), argv[0], argv[d->optind - 1]) >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #else fprintf (stderr, _("%s: option `%s' requires an argument\n"), argv[0], argv[d->optind - 1]); #endif } d->__nextchar += strlen (d->__nextchar); d->optopt = pfound->val; return optstring[0] == ':' ? ':' : '?'; } } d->__nextchar += strlen (d->__nextchar); if (longind != NULL) *longind = option_index; if (pfound->flag) { *(pfound->flag) = pfound->val; return 0; } return pfound->val; } /* Can't find it as a long option. If this is not getopt_long_only, or the option starts with '--' or is not a valid short option, then it's an error. Otherwise interpret it as a short option. */ if (!long_only || argv[d->optind][1] == '-' || strchr (optstring, *d->__nextchar) == NULL) { if (print_errors) { #if defined _LIBC && defined USE_IN_LIBIO char *buf; int n; #endif if (argv[d->optind][1] == '-') { /* --option */ #if defined _LIBC && defined USE_IN_LIBIO n = __asprintf (&buf, _("%s: unrecognized option `--%s'\n"), argv[0], d->__nextchar); #else fprintf (stderr, _("%s: unrecognized option `--%s'\n"), argv[0], d->__nextchar); #endif } else { /* +option or -option */ #if defined _LIBC && defined USE_IN_LIBIO n = __asprintf (&buf, _("%s: unrecognized option `%c%s'\n"), argv[0], argv[d->optind][0], d->__nextchar); #else fprintf (stderr, _("%s: unrecognized option `%c%s'\n"), argv[0], argv[d->optind][0], d->__nextchar); #endif } #if defined _LIBC && defined USE_IN_LIBIO if (n >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #endif } d->__nextchar = (char *) ""; d->optind++; d->optopt = 0; return '?'; } } /* Look at and handle the next short option-character. */ { char c = *d->__nextchar++; char *temp = strchr (optstring, c); /* Increment `optind' when we start to process its last character. */ if (*d->__nextchar == '\0') ++d->optind; if (temp == NULL || c == ':') { if (print_errors) { #if defined _LIBC && defined USE_IN_LIBIO char *buf; int n; #endif if (d->__posixly_correct) { /* 1003.2 specifies the format of this message. */ #if defined _LIBC && defined USE_IN_LIBIO n = __asprintf (&buf, _("%s: illegal option -- %c\n"), argv[0], c); #else fprintf (stderr, _("%s: illegal option -- %c\n"), argv[0], c); #endif } else { #if defined _LIBC && defined USE_IN_LIBIO n = __asprintf (&buf, _("%s: invalid option -- %c\n"), argv[0], c); #else fprintf (stderr, _("%s: invalid option -- %c\n"), argv[0], c); #endif } #if defined _LIBC && defined USE_IN_LIBIO if (n >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #endif } d->optopt = c; return '?'; } /* Convenience. Treat POSIX -W foo same as long option --foo */ if (temp[0] == 'W' && temp[1] == ';') { char *nameend; const struct option *p; const struct option *pfound = NULL; int exact = 0; int ambig = 0; int indfound = 0; int option_index; /* This is an option that requires an argument. */ if (*d->__nextchar != '\0') { d->optarg = d->__nextchar; /* If we end this ARGV-element by taking the rest as an arg, we must advance to the next element now. */ d->optind++; } else if (d->optind == argc) { if (print_errors) { /* 1003.2 specifies the format of this message. */ #if defined _LIBC && defined USE_IN_LIBIO char *buf; if (__asprintf (&buf, _("%s: option requires an argument -- %c\n"), argv[0], c) >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #else fprintf (stderr, _("%s: option requires an argument -- %c\n"), argv[0], c); #endif } d->optopt = c; if (optstring[0] == ':') c = ':'; else c = '?'; return c; } else /* We already incremented `d->optind' once; increment it again when taking next ARGV-elt as argument. */ d->optarg = argv[d->optind++]; /* optarg is now the argument, see if it's in the table of longopts. */ for (d->__nextchar = nameend = d->optarg; *nameend && *nameend != '='; nameend++) /* Do nothing. */ ; /* Test all long options for either exact match or abbreviated matches. */ for (p = longopts, option_index = 0; p->name; p++, option_index++) if (!strncmp (p->name, d->__nextchar, nameend - d->__nextchar)) { if ((unsigned int) (nameend - d->__nextchar) == strlen (p->name)) { /* Exact match found. */ pfound = p; indfound = option_index; exact = 1; break; } else if (pfound == NULL) { /* First nonexact match found. */ pfound = p; indfound = option_index; } else /* Second or later nonexact match found. */ ambig = 1; } if (ambig && !exact) { if (print_errors) { #if defined _LIBC && defined USE_IN_LIBIO char *buf; if (__asprintf (&buf, _("%s: option `-W %s' is ambiguous\n"), argv[0], argv[d->optind]) >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #else fprintf (stderr, _("%s: option `-W %s' is ambiguous\n"), argv[0], argv[d->optind]); #endif } d->__nextchar += strlen (d->__nextchar); d->optind++; return '?'; } if (pfound != NULL) { option_index = indfound; if (*nameend) { /* Don't test has_arg with >, because some C compilers don't allow it to be used on enums. */ if (pfound->has_arg) d->optarg = nameend + 1; else { if (print_errors) { #if defined _LIBC && defined USE_IN_LIBIO char *buf; if (__asprintf (&buf, _("\ %s: option `-W %s' doesn't allow an argument\n"), argv[0], pfound->name) >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #else fprintf (stderr, _("\ %s: option `-W %s' doesn't allow an argument\n"), argv[0], pfound->name); #endif } d->__nextchar += strlen (d->__nextchar); return '?'; } } else if (pfound->has_arg == 1) { if (d->optind < argc) d->optarg = argv[d->optind++]; else { if (print_errors) { #if defined _LIBC && defined USE_IN_LIBIO char *buf; if (__asprintf (&buf, _("\ %s: option `%s' requires an argument\n"), argv[0], argv[d->optind - 1]) >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #else fprintf (stderr, _("%s: option `%s' requires an argument\n"), argv[0], argv[d->optind - 1]); #endif } d->__nextchar += strlen (d->__nextchar); return optstring[0] == ':' ? ':' : '?'; } } d->__nextchar += strlen (d->__nextchar); if (longind != NULL) *longind = option_index; if (pfound->flag) { *(pfound->flag) = pfound->val; return 0; } return pfound->val; } d->__nextchar = NULL; return 'W'; /* Let the application handle it. */ } if (temp[1] == ':') { if (temp[2] == ':') { /* This is an option that accepts an argument optionally. */ if (*d->__nextchar != '\0') { d->optarg = d->__nextchar; d->optind++; } else d->optarg = NULL; d->__nextchar = NULL; } else { /* This is an option that requires an argument. */ if (*d->__nextchar != '\0') { d->optarg = d->__nextchar; /* If we end this ARGV-element by taking the rest as an arg, we must advance to the next element now. */ d->optind++; } else if (d->optind == argc) { if (print_errors) { /* 1003.2 specifies the format of this message. */ #if defined _LIBC && defined USE_IN_LIBIO char *buf; if (__asprintf (&buf, _("\ %s: option requires an argument -- %c\n"), argv[0], c) >= 0) { _IO_flockfile (stderr); int old_flags2 = ((_IO_FILE *) stderr)->_flags2; ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; __fxprintf (NULL, "%s", buf); ((_IO_FILE *) stderr)->_flags2 = old_flags2; _IO_funlockfile (stderr); free (buf); } #else fprintf (stderr, _("%s: option requires an argument -- %c\n"), argv[0], c); #endif } d->optopt = c; if (optstring[0] == ':') c = ':'; else c = '?'; } else /* We already incremented `optind' once; increment it again when taking next ARGV-elt as argument. */ d->optarg = argv[d->optind++]; d->__nextchar = NULL; } } return c; } } int _getopt_internal (int argc, char **argv, const char *optstring, const struct option *longopts, int *longind, int long_only, int posixly_correct) { int result; getopt_data.optind = optind; getopt_data.opterr = opterr; result = _getopt_internal_r (argc, argv, optstring, longopts, longind, long_only, posixly_correct, &getopt_data); optind = getopt_data.optind; optarg = getopt_data.optarg; optopt = getopt_data.optopt; return result; } /* glibc gets a LSB-compliant getopt. Standalone applications get a POSIX-compliant getopt. */ #if _LIBC enum { POSIXLY_CORRECT = 0 }; #else enum { POSIXLY_CORRECT = 1 }; #endif int getopt (int argc, char *const *argv, const char *optstring) { return _getopt_internal (argc, (char **) argv, optstring, NULL, NULL, 0, POSIXLY_CORRECT); } #ifdef TEST /* Compile with -DTEST to make an executable for use in testing the above definition of `getopt'. */ int main (int argc, char **argv) { int c; int digit_optind = 0; while (1) { int this_option_optind = optind ? optind : 1; c = getopt (argc, argv, "abc:d:0123456789"); if (c == -1) break; switch (c) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': if (digit_optind != 0 && digit_optind != this_option_optind) printf ("digits occur in two different argv-elements.\n"); digit_optind = this_option_optind; printf ("option %c\n", c); break; case 'a': printf ("option a\n"); break; case 'b': printf ("option b\n"); break; case 'c': printf ("option c with value `%s'\n", optarg); break; case '?': break; default: printf ("?? getopt returned character code 0%o ??\n", c); } } if (optind < argc) { printf ("non-option ARGV-elements: "); while (optind < argc) printf ("%s ", argv[optind++]); printf ("\n"); } exit (0); } #endif /* TEST */ �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/compat/getopt.h����������������������������������������������������������0000644�0001750�0001750�00000017516�11672675562�015446� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Declarations for getopt. Copyright (C) 1989-1994,1996-1999,2001,2003,2004,2005,2006,2007 Free Software Foundation, Inc. This file is part of the GNU C Library. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef _GETOPT_H #ifndef __need_getopt # define _GETOPT_H 1 #endif /* Standalone applications should #define __GETOPT_PREFIX to an identifier that prefixes the external functions and variables defined in this header. When this happens, include the headers that might declare getopt so that they will not cause confusion if included after this file. Then systematically rename identifiers so that they do not collide with the system functions and variables. Renaming avoids problems with some compilers and linkers. */ #if defined __GETOPT_PREFIX && !defined __need_getopt # include <stdlib.h> # include <stdio.h> # include <unistd.h> # undef __need_getopt # undef getopt # undef getopt_long # undef getopt_long_only # undef optarg # undef opterr # undef optind # undef optopt # define __GETOPT_CONCAT(x, y) x ## y # define __GETOPT_XCONCAT(x, y) __GETOPT_CONCAT (x, y) # define __GETOPT_ID(y) __GETOPT_XCONCAT (__GETOPT_PREFIX, y) # define getopt __GETOPT_ID (getopt) # define getopt_long __GETOPT_ID (getopt_long) # define getopt_long_only __GETOPT_ID (getopt_long_only) # define optarg __GETOPT_ID (optarg) # define opterr __GETOPT_ID (opterr) # define optind __GETOPT_ID (optind) # define optopt __GETOPT_ID (optopt) #endif /* Standalone applications get correct prototypes for getopt_long and getopt_long_only; they declare "char **argv". libc uses prototypes with "char *const *argv" that are incorrect because getopt_long and getopt_long_only can permute argv; this is required for backward compatibility (e.g., for LSB 2.0.1). This used to be `#if defined __GETOPT_PREFIX && !defined __need_getopt', but it caused redefinition warnings if both unistd.h and getopt.h were included, since unistd.h includes getopt.h having previously defined __need_getopt. The only place where __getopt_argv_const is used is in definitions of getopt_long and getopt_long_only below, but these are visible only if __need_getopt is not defined, so it is quite safe to rewrite the conditional as follows: */ #if !defined __need_getopt # if defined __GETOPT_PREFIX # define __getopt_argv_const /* empty */ # else # define __getopt_argv_const const # endif #endif /* If __GNU_LIBRARY__ is not already defined, either we are being used standalone, or this is the first header included in the source file. If we are being used with glibc, we need to include <features.h>, but that does not exist if we are standalone. So: if __GNU_LIBRARY__ is not defined, include <ctype.h>, which will pull in <features.h> for us if it's from glibc. (Why ctype.h? It's guaranteed to exist and it doesn't flood the namespace with stuff the way some other headers do.) */ #if !defined __GNU_LIBRARY__ # include <ctype.h> #endif #ifndef __THROW # ifndef __GNUC_PREREQ # define __GNUC_PREREQ(maj, min) (0) # endif # if defined __cplusplus && __GNUC_PREREQ (2,8) # define __THROW throw () # else # define __THROW # endif #endif #ifdef __cplusplus extern "C" { #endif /* For communication from `getopt' to the caller. When `getopt' finds an option that takes an argument, the argument value is returned here. Also, when `ordering' is RETURN_IN_ORDER, each non-option ARGV-element is returned here. */ extern char *optarg; /* Index in ARGV of the next element to be scanned. This is used for communication to and from the caller and for communication between successive calls to `getopt'. On entry to `getopt', zero means this is the first call; initialize. When `getopt' returns -1, this is the index of the first of the non-option elements that the caller should itself scan. Otherwise, `optind' communicates from one call to the next how much of ARGV has been scanned so far. */ extern int optind; /* Callers store zero here to inhibit the error message `getopt' prints for unrecognized options. */ extern int opterr; /* Set to an option character which was unrecognized. */ extern int optopt; #ifndef __need_getopt /* Describe the long-named options requested by the application. The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector of `struct option' terminated by an element containing a name which is zero. The field `has_arg' is: no_argument (or 0) if the option does not take an argument, required_argument (or 1) if the option requires an argument, optional_argument (or 2) if the option takes an optional argument. If the field `flag' is not NULL, it points to a variable that is set to the value given in the field `val' when the option is found, but left unchanged if the option is not found. To have a long-named option do something other than set an `int' to a compiled-in constant, such as set a value from `optarg', set the option's `flag' field to zero and its `val' field to a nonzero value (the equivalent single-letter option character, if there is one). For long options that have a zero `flag' field, `getopt' returns the contents of the `val' field. */ struct option { const char *name; /* has_arg can't be an enum because some compilers complain about type mismatches in all the code that assumes it is an int. */ int has_arg; int *flag; int val; }; /* Names for the values of the `has_arg' field of `struct option'. */ # define no_argument 0 # define required_argument 1 # define optional_argument 2 #endif /* need getopt */ /* Get definitions and prototypes for functions to process the arguments in ARGV (ARGC of them, minus the program name) for options given in OPTS. Return the option character from OPTS just read. Return -1 when there are no more options. For unrecognized options, or options missing arguments, `optopt' is set to the option letter, and '?' is returned. The OPTS string is a list of characters which are recognized option letters, optionally followed by colons, specifying that that letter takes an argument, to be placed in `optarg'. If a letter in OPTS is followed by two colons, its argument is optional. This behavior is specific to the GNU `getopt'. The argument `--' causes premature termination of argument scanning, explicitly telling `getopt' that there are no more options. If OPTS begins with `-', then non-option arguments are treated as arguments to the option '\1'. This behavior is specific to the GNU `getopt'. If OPTS begins with `+', or POSIXLY_CORRECT is set in the environment, then do not permute arguments. */ extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) __THROW; #ifndef __need_getopt extern int getopt_long (int ___argc, char *__getopt_argv_const *___argv, const char *__shortopts, const struct option *__longopts, int *__longind) __THROW; extern int getopt_long_only (int ___argc, char *__getopt_argv_const *___argv, const char *__shortopts, const struct option *__longopts, int *__longind) __THROW; #endif #ifdef __cplusplus } #endif /* Make sure we later can get all the definitions and declarations. */ #undef __need_getopt #endif /* getopt.h */ ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/compat/unistd.h����������������������������������������������������������0000644�0001750�0001750�00000000353�11672675562�015441� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef _UNISTD_H #define _UNISTD_H 1 /* This file intended to serve as a drop-in replacement for * unistd.h on Windows * Please add functionality as neeeded */ #include <stdlib.h> #include <io.h> #endif /* unistd.h */ �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/compat/Makefile.in�������������������������������������������������������0000664�0001750�0001750�00000061615�11675044677�016041� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Copyright (C) 1999-2009 Lorenzo Bettini <http://www.lorenzobettini.it> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # these are the files used when building source-highlight with qmake # and msvc (who does not provide these features) VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = lib/compat DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/gl/m4/00gnulib.m4 \ $(top_srcdir)/gl/m4/ac_prog_doxygen.m4 \ $(top_srcdir)/gl/m4/dirent_h.m4 $(top_srcdir)/gl/m4/dirname.m4 \ $(top_srcdir)/gl/m4/double-slash-root.m4 \ $(top_srcdir)/gl/m4/extensions.m4 \ $(top_srcdir)/gl/m4/getopt.m4 \ $(top_srcdir)/gl/m4/gnulib-common.m4 \ $(top_srcdir)/gl/m4/gnulib-comp.m4 \ $(top_srcdir)/gl/m4/include_next.m4 \ $(top_srcdir)/gl/m4/malloc.m4 $(top_srcdir)/gl/m4/memset.m4 \ $(top_srcdir)/gl/m4/mkdir.m4 $(top_srcdir)/gl/m4/nocrash.m4 \ $(top_srcdir)/gl/m4/ssize_t.m4 $(top_srcdir)/gl/m4/stdbool.m4 \ $(top_srcdir)/gl/m4/stddef_h.m4 \ $(top_srcdir)/gl/m4/stdlib_h.m4 $(top_srcdir)/gl/m4/strdup.m4 \ $(top_srcdir)/gl/m4/string_h.m4 \ $(top_srcdir)/gl/m4/sys_stat_h.m4 \ $(top_srcdir)/gl/m4/time_h.m4 $(top_srcdir)/gl/m4/unistd_h.m4 \ $(top_srcdir)/gl/m4/warn-on-use.m4 \ $(top_srcdir)/gl/m4/wchar_t.m4 \ $(top_srcdir)/m4/ax_boost_base.m4 \ $(top_srcdir)/m4/ax_boost_regex.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ABSOLUTEDATADIR = @ABSOLUTEDATADIR@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ ARFLAGS = @ARFLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASH_COMPLETION_DIR = @BASH_COMPLETION_DIR@ BASH_SHELL = @BASH_SHELL@ BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ BOOST_LDFLAGS = @BOOST_LDFLAGS@ BOOST_REGEX_LIB = @BOOST_REGEX_LIB@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHROOT_INPUT_DIR = @CHROOT_INPUT_DIR@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOUBLECPP = @DOUBLECPP@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GENGETOPT = @GENGETOPT@ GETOPT_H = @GETOPT_H@ GNULIB_ALPHASORT = @GNULIB_ALPHASORT@ GNULIB_ATOLL = @GNULIB_ATOLL@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ GNULIB_CHDIR = @GNULIB_CHDIR@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@ GNULIB_DIRFD = @GNULIB_DIRFD@ GNULIB_DUP = @GNULIB_DUP@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ GNULIB_FDATASYNC = @GNULIB_FDATASYNC@ GNULIB_FDOPENDIR = @GNULIB_FDOPENDIR@ GNULIB_FFSL = @GNULIB_FFSL@ GNULIB_FFSLL = @GNULIB_FFSLL@ GNULIB_FSTAT = @GNULIB_FSTAT@ GNULIB_FSTATAT = @GNULIB_FSTATAT@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@ GNULIB_GRANTPT = @GNULIB_GRANTPT@ GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@ GNULIB_LCHMOD = @GNULIB_LCHMOD@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MBTOWC = @GNULIB_MBTOWC@ GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_MKDIRAT = @GNULIB_MKDIRAT@ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ GNULIB_MKFIFO = @GNULIB_MKFIFO@ GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@ GNULIB_MKNOD = @GNULIB_MKNOD@ GNULIB_MKNODAT = @GNULIB_MKNODAT@ GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_MKTIME = @GNULIB_MKTIME@ GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@ GNULIB_OPENDIR = @GNULIB_OPENDIR@ GNULIB_PIPE = @GNULIB_PIPE@ GNULIB_PIPE2 = @GNULIB_PIPE2@ GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PTSNAME = @GNULIB_PTSNAME@ GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PWRITE = @GNULIB_PWRITE@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_READ = @GNULIB_READ@ GNULIB_READDIR = @GNULIB_READDIR@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ GNULIB_REWINDDIR = @GNULIB_REWINDDIR@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SCANDIR = @GNULIB_SCANDIR@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_STAT = @GNULIB_STAT@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRERROR_R = @GNULIB_STRERROR_R@ GNULIB_STRNCAT = @GNULIB_STRNCAT@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRPTIME = @GNULIB_STRPTIME@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOD = @GNULIB_STRTOD@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRTOLL = @GNULIB_STRTOLL@ GNULIB_STRTOULL = @GNULIB_STRTOULL@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@ GNULIB_TIMEGM = @GNULIB_TIMEGM@ GNULIB_TIME_R = @GNULIB_TIME_R@ GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@ GNULIB_UNSETENV = @GNULIB_UNSETENV@ GNULIB_USLEEP = @GNULIB_USLEEP@ GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@ GNULIB_WCTOMB = @GNULIB_WCTOMB@ GNULIB_WRITE = @GNULIB_WRITE@ GNULIB__EXIT = @GNULIB__EXIT@ GREP = @GREP@ HAVE_ALPHASORT = @HAVE_ALPHASORT@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ HAVE_CHOWN = @HAVE_CHOWN@ HAVE_CLOSEDIR = @HAVE_CLOSEDIR@ HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@ HAVE_DECL_FDOPENDIR = @HAVE_DECL_FDOPENDIR@ HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ HAVE_DIRENT_H = @HAVE_DIRENT_H@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHDIR = @HAVE_FCHDIR@ HAVE_FCHMODAT = @HAVE_FCHMODAT@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FDATASYNC = @HAVE_FDATASYNC@ HAVE_FDOPENDIR = @HAVE_FDOPENDIR@ HAVE_FFSL = @HAVE_FFSL@ HAVE_FFSLL = @HAVE_FFSLL@ HAVE_FSTATAT = @HAVE_FSTATAT@ HAVE_FSYNC = @HAVE_FSYNC@ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ HAVE_FUTIMENS = @HAVE_FUTIMENS@ HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ HAVE_GETGROUPS = @HAVE_GETGROUPS@ HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ HAVE_GETLOGIN = @HAVE_GETLOGIN@ HAVE_GETOPT_H = @HAVE_GETOPT_H@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GRANTPT = @HAVE_GRANTPT@ HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LCHOWN = @HAVE_LCHOWN@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ HAVE_LSTAT = @HAVE_LSTAT@ HAVE_MBSLEN = @HAVE_MBSLEN@ HAVE_MEMCHR = @HAVE_MEMCHR@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_MKDIRAT = @HAVE_MKDIRAT@ HAVE_MKDTEMP = @HAVE_MKDTEMP@ HAVE_MKFIFO = @HAVE_MKFIFO@ HAVE_MKFIFOAT = @HAVE_MKFIFOAT@ HAVE_MKNOD = @HAVE_MKNOD@ HAVE_MKNODAT = @HAVE_MKNODAT@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMP = @HAVE_MKSTEMP@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ HAVE_NANOSLEEP = @HAVE_NANOSLEEP@ HAVE_OPENDIR = @HAVE_OPENDIR@ HAVE_OS_H = @HAVE_OS_H@ HAVE_PIPE = @HAVE_PIPE@ HAVE_PIPE2 = @HAVE_PIPE2@ HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@ HAVE_PREAD = @HAVE_PREAD@ HAVE_PTSNAME = @HAVE_PTSNAME@ HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ HAVE_PWRITE = @HAVE_PWRITE@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_READDIR = @HAVE_READDIR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ HAVE_REALPATH = @HAVE_REALPATH@ HAVE_REWINDDIR = @HAVE_REWINDDIR@ HAVE_RPMATCH = @HAVE_RPMATCH@ HAVE_SCANDIR = @HAVE_SCANDIR@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@ HAVE_SLEEP = @HAVE_SLEEP@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRPTIME = @HAVE_STRPTIME@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ HAVE_TIMEGM = @HAVE_TIMEGM@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ HAVE_USLEEP = @HAVE_USLEEP@ HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE__BOOL = @HAVE__BOOL@ HAVE__EXIT = @HAVE__EXIT@ HELP2MAN = @HELP2MAN@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBRARY_NAMESPACE = @LIBRARY_NAMESPACE@ LIBRARY_VERSION = @LIBRARY_VERSION@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@ NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ NEXT_DIRENT_H = @NEXT_DIRENT_H@ NEXT_GETOPT_H = @NEXT_GETOPT_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PRAGMA_COLUMNS = @PRAGMA_COLUMNS@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ RANLIB = @RANLIB@ REPLACE_CALLOC = @REPLACE_CALLOC@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ REPLACE_CHOWN = @REPLACE_CHOWN@ REPLACE_CLOSE = @REPLACE_CLOSE@ REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@ REPLACE_DIRFD = @REPLACE_DIRFD@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@ REPLACE_FSTAT = @REPLACE_FSTAT@ REPLACE_FSTATAT = @REPLACE_FSTATAT@ REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_LSTAT = @REPLACE_LSTAT@ REPLACE_MALLOC = @REPLACE_MALLOC@ REPLACE_MBTOWC = @REPLACE_MBTOWC@ REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKDIR = @REPLACE_MKDIR@ REPLACE_MKFIFO = @REPLACE_MKFIFO@ REPLACE_MKNOD = @REPLACE_MKNOD@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OPENDIR = @REPLACE_OPENDIR@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_PWRITE = @REPLACE_PWRITE@ REPLACE_READ = @REPLACE_READ@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_REALLOC = @REPLACE_REALLOC@ REPLACE_REALPATH = @REPLACE_REALPATH@ REPLACE_RMDIR = @REPLACE_RMDIR@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_STAT = @REPLACE_STAT@ REPLACE_STPNCPY = @REPLACE_STPNCPY@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRERROR_R = @REPLACE_STRERROR_R@ REPLACE_STRNCAT = @REPLACE_STRNCAT@ REPLACE_STRNDUP = @REPLACE_STRNDUP@ REPLACE_STRNLEN = @REPLACE_STRNLEN@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ REPLACE_UNLINK = @REPLACE_UNLINK@ REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ REPLACE_UNSETENV = @REPLACE_UNSETENV@ REPLACE_USLEEP = @REPLACE_USLEEP@ REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@ REPLACE_WCTOMB = @REPLACE_WCTOMB@ REPLACE_WRITE = @REPLACE_WRITE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STRIP = @STRIP@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TAR = @TAR@ TEXI2HTML = @TEXI2HTML@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ VALGRIND = @VALGRIND@ VERSION = @VERSION@ YACC = @YACC@ YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bash_completiondir = @bash_completiondir@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ gltests_WITNESS = @gltests_WITNESS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ source_highlightdatadir = @source_highlightdatadir@ source_highlightdocdir = @source_highlightdocdir@ source_highlightlibdocdir = @source_highlightlibdocdir@ source_highlightlibexampledir = @source_highlightlibexampledir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = \ compat_dirent.h \ compat_dirent.cpp \ getopt_int.h \ getopt.h \ getopt.c \ getopt1.c \ unistd.h all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/compat/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu lib/compat/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: �������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/compat/getopt_int.h������������������������������������������������������0000644�0001750�0001750�00000011203�11672675562�016303� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Internal declarations for getopt. Copyright (C) 1989-1994,1996-1999,2001,2003,2004 Free Software Foundation, Inc. This file is part of the GNU C Library. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef _GETOPT_INT_H #define _GETOPT_INT_H 1 extern int _getopt_internal (int ___argc, char **___argv, const char *__shortopts, const struct option *__longopts, int *__longind, int __long_only, int __posixly_correct); /* Reentrant versions which can handle parsing multiple argument vectors at the same time. */ /* Data type for reentrant functions. */ struct _getopt_data { /* These have exactly the same meaning as the corresponding global variables, except that they are used for the reentrant versions of getopt. */ int optind; int opterr; int optopt; char *optarg; /* Internal members. */ /* True if the internal members have been initialized. */ int __initialized; /* The next char to be scanned in the option-element in which the last option character we returned was found. This allows us to pick up the scan where we left off. If this is zero, or a null string, it means resume the scan by advancing to the next ARGV-element. */ char *__nextchar; /* Describe how to deal with options that follow non-option ARGV-elements. If the caller did not specify anything, the default is REQUIRE_ORDER if the environment variable POSIXLY_CORRECT is defined, PERMUTE otherwise. REQUIRE_ORDER means don't recognize them as options; stop option processing when the first non-option is seen. This is what Unix does. This mode of operation is selected by either setting the environment variable POSIXLY_CORRECT, or using `+' as the first character of the list of option characters, or by calling getopt. PERMUTE is the default. We permute the contents of ARGV as we scan, so that eventually all the non-options are at the end. This allows options to be given in any order, even with programs that were not written to expect this. RETURN_IN_ORDER is an option available to programs that were written to expect options and other ARGV-elements in any order and that care about the ordering of the two. We describe each non-option ARGV-element as if it were the argument of an option with character code 1. Using `-' as the first character of the list of option characters selects this mode of operation. The special argument `--' forces an end of option-scanning regardless of the value of `ordering'. In the case of RETURN_IN_ORDER, only `--' can cause `getopt' to return -1 with `optind' != ARGC. */ enum { REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER } __ordering; /* If the POSIXLY_CORRECT environment variable is set or getopt was called. */ int __posixly_correct; /* Handle permutation of arguments. */ /* Describe the part of ARGV that contains non-options that have been skipped. `first_nonopt' is the index in ARGV of the first of them; `last_nonopt' is the index after the last of them. */ int __first_nonopt; int __last_nonopt; #if defined _LIBC && defined USE_NONOPTION_FLAGS int __nonoption_flags_max_len; int __nonoption_flags_len; # endif }; /* The initializer is necessary to set OPTIND and OPTERR to their default values and to clear the initialization flag. */ #define _GETOPT_DATA_INITIALIZER { 1, 1 } extern int _getopt_internal_r (int ___argc, char **___argv, const char *__shortopts, const struct option *__longopts, int *__longind, int __long_only, int __posixly_correct, struct _getopt_data *__data); extern int _getopt_long_r (int ___argc, char **___argv, const char *__shortopts, const struct option *__longopts, int *__longind, struct _getopt_data *__data); extern int _getopt_long_only_r (int ___argc, char **___argv, const char *__shortopts, const struct option *__longopts, int *__longind, struct _getopt_data *__data); #endif /* getopt_int.h */ ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/compat/compat_dirent.cpp�������������������������������������������������0000644�0001750�0001750�00000002135�11672675562�017316� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#include "compat_dirent.h" #include <stdlib.h> #include <string.h> #include <errno.h> DIR *opendir(const char *name) { int len; DIR *p; p = (DIR*)malloc(sizeof(DIR)); memset(p, 0, sizeof(DIR)); strncpy(p->dd_name, name, PATH_MAX); len = strlen(p->dd_name); p->dd_name[len] = '/'; p->dd_name[len+1] = '*'; if (p == NULL) return NULL; p->dd_handle = _findfirst(p->dd_name, &p->dd_dta); if (p->dd_handle == -1) { free(p); return NULL; } return p; } int closedir(DIR *dir) { _findclose(dir->dd_handle); free(dir); return 0; } struct dirent *readdir(DIR *dir) { struct dirent *result = 0; if(dir && dir->dd_handle != -1) { if(!dir->dd_dir.d_name || _findnext(dir->dd_handle, &dir->dd_dta) != -1) { result = &dir->dd_dir; strcpy(dir->dd_dir.d_name, dir->dd_dta.name); ++dir->dd_stat; } } else { errno = EBADF; } return result; } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/compat/getopt1.c���������������������������������������������������������0000644�0001750�0001750�00000007426�11672675562�015521� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* getopt_long and getopt_long_only entry points for GNU getopt. Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98,2004,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ # include "getopt.h" #include "getopt_int.h" #include <stdio.h> /* This needs to come after some library #include to get __GNU_LIBRARY__ defined. */ #ifdef __GNU_LIBRARY__ #include <stdlib.h> #endif #ifndef NULL #define NULL 0 #endif int getopt_long (int argc, char *__getopt_argv_const *argv, const char *options, const struct option *long_options, int *opt_index) { return _getopt_internal (argc, (char **) argv, options, long_options, opt_index, 0, 0); } int _getopt_long_r (int argc, char **argv, const char *options, const struct option *long_options, int *opt_index, struct _getopt_data *d) { return _getopt_internal_r (argc, argv, options, long_options, opt_index, 0, 0, d); } /* Like getopt_long, but '-' as well as '--' can indicate a long option. If an option that starts with '-' (not '--') doesn't match a long option, but does match a short option, it is parsed as a short option instead. */ int getopt_long_only (int argc, char *__getopt_argv_const *argv, const char *options, const struct option *long_options, int *opt_index) { return _getopt_internal (argc, (char **) argv, options, long_options, opt_index, 1, 0); } int _getopt_long_only_r (int argc, char **argv, const char *options, const struct option *long_options, int *opt_index, struct _getopt_data *d) { return _getopt_internal_r (argc, argv, options, long_options, opt_index, 1, 0, d); } #ifdef TEST #include <stdio.h> int main (int argc, char **argv) { int c; int digit_optind = 0; while (1) { int this_option_optind = optind ? optind : 1; int option_index = 0; static struct option long_options[] = { {"add", 1, 0, 0}, {"append", 0, 0, 0}, {"delete", 1, 0, 0}, {"verbose", 0, 0, 0}, {"create", 0, 0, 0}, {"file", 1, 0, 0}, {0, 0, 0, 0} }; c = getopt_long (argc, argv, "abc:d:0123456789", long_options, &option_index); if (c == -1) break; switch (c) { case 0: printf ("option %s", long_options[option_index].name); if (optarg) printf (" with arg %s", optarg); printf ("\n"); break; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': if (digit_optind != 0 && digit_optind != this_option_optind) printf ("digits occur in two different argv-elements.\n"); digit_optind = this_option_optind; printf ("option %c\n", c); break; case 'a': printf ("option a\n"); break; case 'b': printf ("option b\n"); break; case 'c': printf ("option c with value `%s'\n", optarg); break; case 'd': printf ("option d with value `%s'\n", optarg); break; case '?': break; default: printf ("?? getopt returned character code 0%o ??\n", c); } } if (optind < argc) { printf ("non-option ARGV-elements: "); while (optind < argc) printf ("%s ", argv[optind++]); printf ("\n"); } exit (0); } #endif /* TEST */ ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/compat/Makefile.am�������������������������������������������������������0000644�0001750�0001750�00000001325�11672675562�016016� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Copyright (C) 1999-2009 Lorenzo Bettini <http://www.lorenzobettini.it> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # these are the files used when building source-highlight with qmake # and msvc (who does not provide these features) EXTRA_DIST = \ compat_dirent.h \ compat_dirent.cpp \ getopt_int.h \ getopt.h \ getopt.c \ getopt1.c \ unistd.h�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/examples/����������������������������������������������������������������0000775�0001750�0001750�00000000000�11676051671�014367� 5����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/examples/infoformatter-main.cpp������������������������������������������0000644�0001750�0001750�00000004277�11672675562�020633� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * infoformatter-main.cpp * * Example of use of source-highlight library: * prints formatting information to the console: what is going to * be formatted and its position within the line * * Created on: May 7, 2009 * Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2008 * Copyright: See COPYING file that comes with this distribution *///> TEXINFO #include <iostream> #include "srchilite/langdefmanager.h" #include "srchilite/regexrulefactory.h" #include "srchilite/sourcehighlighter.h" #include "srchilite/formattermanager.h" #include "infoformatter.h" using namespace std; #ifndef DATADIR #define DATADIR "" #endif int main() { srchilite::RegexRuleFactory ruleFactory; srchilite::LangDefManager langDefManager(&ruleFactory); // we highlight C++ code for simplicity srchilite::SourceHighlighter highlighter(langDefManager.getHighlightState( DATADIR, "cpp.lang")); srchilite::FormatterManager formatterManager(InfoFormatterPtr( new InfoFormatter)); InfoFormatterPtr keywordFormatter(new InfoFormatter("keyword")); formatterManager.addFormatter("keyword", keywordFormatter); formatterManager.addFormatter("string", InfoFormatterPtr(new InfoFormatter( "string"))); // for "type" we use the same formatter as for "keyword" formatterManager.addFormatter("type", keywordFormatter); formatterManager.addFormatter("comment", InfoFormatterPtr( new InfoFormatter("comment"))); formatterManager.addFormatter("symbol", InfoFormatterPtr(new InfoFormatter( "symbol"))); formatterManager.addFormatter("number", InfoFormatterPtr(new InfoFormatter( "number"))); formatterManager.addFormatter("preproc", InfoFormatterPtr( new InfoFormatter("preproc"))); highlighter.setFormatterManager(&formatterManager); // make sure it uses additional information srchilite::FormatterParams params; highlighter.setFormatterParams(&params); string line; // we now highlight a line a time while (getline(cin, line)) { // reset position counter within a line params.start = 0; highlighter.highlightParagraph(line); } return 0; } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/examples/styleformatterfactory.h�����������������������������������������0000644�0001750�0001750�00000004427�11672675562�021150� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * styleformatterfactory.h * * Created on: Jun 7, 2009 * Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2008 * Copyright: See COPYING file that comes with this distribution */ #ifndef STYLEFORMATTERFACTORY_H_ #define STYLEFORMATTERFACTORY_H_ #include <map> #include "srchilite/formatterfactory.h" #include "styleformatter.h" typedef std::map<std::string, StyleFormatterPtr> StyleFormatterMap; /** * Specialization of FormatterFactory to create StyleFormatter objects * when reading a source-highlight style or css style file. * To avoid get/set methods, let's make all members * public, it is just an example anyway :-) *///> TEXINFO struct StyleFormatterFactory: public srchilite::FormatterFactory { StyleFormatterMap formatterMap; bool hasFormatter(const string &key) const { return formatterMap.find(key) != formatterMap.end(); } bool createFormatter(const string &key, const string &color, const string &bgcolor, srchilite::StyleConstantsPtr styleconstants) { if (hasFormatter(key)) return false; StyleFormatter *formatter = new StyleFormatter(key); formatterMap[key] = StyleFormatterPtr(formatter); if (styleconstants.get()) { for (srchilite::StyleConstantsIterator it = styleconstants->begin(); it != styleconstants->end(); ++it) { switch (*it) { case srchilite::ISBOLD: formatter->bold = true; break; case srchilite::ISITALIC: formatter->italic = true; break; case srchilite::ISUNDERLINE: formatter->underline = true; break; case srchilite::ISFIXED: formatter->fixed = true; break; case srchilite::ISNOTFIXED: formatter->not_fixed = true; break; case srchilite::ISNOREF: // ignore references here break; } } } formatter->color = color; formatter->bgColor = bgcolor; return true; } }; //> TEXINFO #endif /* STYLEFORMATTERFACTORY_H_ */ �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/examples/Makefile.in�����������������������������������������������������0000664�0001750�0001750�00000104135�11675044677�016367� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Copyright (C) 1999-2009 Lorenzo Bettini <http://www.lorenzobettini.it> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ check_PROGRAMS = source-highlight-console$(EXEEXT) \ infoformatter$(EXEEXT) styleformatter$(EXEEXT) subdir = lib/examples DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/gl/m4/00gnulib.m4 \ $(top_srcdir)/gl/m4/ac_prog_doxygen.m4 \ $(top_srcdir)/gl/m4/dirent_h.m4 $(top_srcdir)/gl/m4/dirname.m4 \ $(top_srcdir)/gl/m4/double-slash-root.m4 \ $(top_srcdir)/gl/m4/extensions.m4 \ $(top_srcdir)/gl/m4/getopt.m4 \ $(top_srcdir)/gl/m4/gnulib-common.m4 \ $(top_srcdir)/gl/m4/gnulib-comp.m4 \ $(top_srcdir)/gl/m4/include_next.m4 \ $(top_srcdir)/gl/m4/malloc.m4 $(top_srcdir)/gl/m4/memset.m4 \ $(top_srcdir)/gl/m4/mkdir.m4 $(top_srcdir)/gl/m4/nocrash.m4 \ $(top_srcdir)/gl/m4/ssize_t.m4 $(top_srcdir)/gl/m4/stdbool.m4 \ $(top_srcdir)/gl/m4/stddef_h.m4 \ $(top_srcdir)/gl/m4/stdlib_h.m4 $(top_srcdir)/gl/m4/strdup.m4 \ $(top_srcdir)/gl/m4/string_h.m4 \ $(top_srcdir)/gl/m4/sys_stat_h.m4 \ $(top_srcdir)/gl/m4/time_h.m4 $(top_srcdir)/gl/m4/unistd_h.m4 \ $(top_srcdir)/gl/m4/warn-on-use.m4 \ $(top_srcdir)/gl/m4/wchar_t.m4 \ $(top_srcdir)/m4/ax_boost_base.m4 \ $(top_srcdir)/m4/ax_boost_regex.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am_infoformatter_OBJECTS = infoformatter-main.$(OBJEXT) infoformatter_OBJECTS = $(am_infoformatter_OBJECTS) infoformatter_LDADD = $(LDADD) infoformatter_DEPENDENCIES = $(top_builddir)/gl/libgnu.la \ $(LIBDIR)/libsource-highlight.la am_source_highlight_console_OBJECTS = \ source-highlight-console-main.$(OBJEXT) source_highlight_console_OBJECTS = \ $(am_source_highlight_console_OBJECTS) source_highlight_console_LDADD = $(LDADD) source_highlight_console_DEPENDENCIES = $(top_builddir)/gl/libgnu.la \ $(LIBDIR)/libsource-highlight.la am_styleformatter_OBJECTS = styleformatter-main.$(OBJEXT) styleformatter_OBJECTS = $(am_styleformatter_OBJECTS) styleformatter_LDADD = $(LDADD) styleformatter_DEPENDENCIES = $(top_builddir)/gl/libgnu.la \ $(LIBDIR)/libsource-highlight.la DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(infoformatter_SOURCES) $(source_highlight_console_SOURCES) \ $(styleformatter_SOURCES) DIST_SOURCES = $(infoformatter_SOURCES) \ $(source_highlight_console_SOURCES) $(styleformatter_SOURCES) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(source_highlightlibexampledir)" DATA = $(source_highlightlibexample_DATA) ETAGS = etags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ABSOLUTEDATADIR = @ABSOLUTEDATADIR@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ ARFLAGS = @ARFLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASH_COMPLETION_DIR = @BASH_COMPLETION_DIR@ BASH_SHELL = @BASH_SHELL@ BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ BOOST_LDFLAGS = @BOOST_LDFLAGS@ BOOST_REGEX_LIB = @BOOST_REGEX_LIB@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHROOT_INPUT_DIR = @CHROOT_INPUT_DIR@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CTAGS = @CTAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOUBLECPP = @DOUBLECPP@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GENGETOPT = @GENGETOPT@ GETOPT_H = @GETOPT_H@ GNULIB_ALPHASORT = @GNULIB_ALPHASORT@ GNULIB_ATOLL = @GNULIB_ATOLL@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ GNULIB_CHDIR = @GNULIB_CHDIR@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@ GNULIB_DIRFD = @GNULIB_DIRFD@ GNULIB_DUP = @GNULIB_DUP@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ GNULIB_FDATASYNC = @GNULIB_FDATASYNC@ GNULIB_FDOPENDIR = @GNULIB_FDOPENDIR@ GNULIB_FFSL = @GNULIB_FFSL@ GNULIB_FFSLL = @GNULIB_FFSLL@ GNULIB_FSTAT = @GNULIB_FSTAT@ GNULIB_FSTATAT = @GNULIB_FSTATAT@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@ GNULIB_GRANTPT = @GNULIB_GRANTPT@ GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@ GNULIB_LCHMOD = @GNULIB_LCHMOD@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ GNULIB_MBTOWC = @GNULIB_MBTOWC@ GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ GNULIB_MKDIRAT = @GNULIB_MKDIRAT@ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ GNULIB_MKFIFO = @GNULIB_MKFIFO@ GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@ GNULIB_MKNOD = @GNULIB_MKNOD@ GNULIB_MKNODAT = @GNULIB_MKNODAT@ GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_MKTIME = @GNULIB_MKTIME@ GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@ GNULIB_OPENDIR = @GNULIB_OPENDIR@ GNULIB_PIPE = @GNULIB_PIPE@ GNULIB_PIPE2 = @GNULIB_PIPE2@ GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PTSNAME = @GNULIB_PTSNAME@ GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PWRITE = @GNULIB_PWRITE@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_READ = @GNULIB_READ@ GNULIB_READDIR = @GNULIB_READDIR@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ GNULIB_REWINDDIR = @GNULIB_REWINDDIR@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SCANDIR = @GNULIB_SCANDIR@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_STAT = @GNULIB_STAT@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRERROR_R = @GNULIB_STRERROR_R@ GNULIB_STRNCAT = @GNULIB_STRNCAT@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ GNULIB_STRPTIME = @GNULIB_STRPTIME@ GNULIB_STRSEP = @GNULIB_STRSEP@ GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ GNULIB_STRSTR = @GNULIB_STRSTR@ GNULIB_STRTOD = @GNULIB_STRTOD@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ GNULIB_STRTOLL = @GNULIB_STRTOLL@ GNULIB_STRTOULL = @GNULIB_STRTOULL@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@ GNULIB_TIMEGM = @GNULIB_TIMEGM@ GNULIB_TIME_R = @GNULIB_TIME_R@ GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@ GNULIB_UNSETENV = @GNULIB_UNSETENV@ GNULIB_USLEEP = @GNULIB_USLEEP@ GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@ GNULIB_WCTOMB = @GNULIB_WCTOMB@ GNULIB_WRITE = @GNULIB_WRITE@ GNULIB__EXIT = @GNULIB__EXIT@ GREP = @GREP@ HAVE_ALPHASORT = @HAVE_ALPHASORT@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ HAVE_CHOWN = @HAVE_CHOWN@ HAVE_CLOSEDIR = @HAVE_CLOSEDIR@ HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@ HAVE_DECL_FDOPENDIR = @HAVE_DECL_FDOPENDIR@ HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ HAVE_DIRENT_H = @HAVE_DIRENT_H@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHDIR = @HAVE_FCHDIR@ HAVE_FCHMODAT = @HAVE_FCHMODAT@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FDATASYNC = @HAVE_FDATASYNC@ HAVE_FDOPENDIR = @HAVE_FDOPENDIR@ HAVE_FFSL = @HAVE_FFSL@ HAVE_FFSLL = @HAVE_FFSLL@ HAVE_FSTATAT = @HAVE_FSTATAT@ HAVE_FSYNC = @HAVE_FSYNC@ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ HAVE_FUTIMENS = @HAVE_FUTIMENS@ HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ HAVE_GETGROUPS = @HAVE_GETGROUPS@ HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ HAVE_GETLOGIN = @HAVE_GETLOGIN@ HAVE_GETOPT_H = @HAVE_GETOPT_H@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GRANTPT = @HAVE_GRANTPT@ HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LCHOWN = @HAVE_LCHOWN@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ HAVE_LSTAT = @HAVE_LSTAT@ HAVE_MBSLEN = @HAVE_MBSLEN@ HAVE_MEMCHR = @HAVE_MEMCHR@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ HAVE_MKDIRAT = @HAVE_MKDIRAT@ HAVE_MKDTEMP = @HAVE_MKDTEMP@ HAVE_MKFIFO = @HAVE_MKFIFO@ HAVE_MKFIFOAT = @HAVE_MKFIFOAT@ HAVE_MKNOD = @HAVE_MKNOD@ HAVE_MKNODAT = @HAVE_MKNODAT@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMP = @HAVE_MKSTEMP@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ HAVE_NANOSLEEP = @HAVE_NANOSLEEP@ HAVE_OPENDIR = @HAVE_OPENDIR@ HAVE_OS_H = @HAVE_OS_H@ HAVE_PIPE = @HAVE_PIPE@ HAVE_PIPE2 = @HAVE_PIPE2@ HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@ HAVE_PREAD = @HAVE_PREAD@ HAVE_PTSNAME = @HAVE_PTSNAME@ HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ HAVE_PWRITE = @HAVE_PWRITE@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_READDIR = @HAVE_READDIR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ HAVE_REALPATH = @HAVE_REALPATH@ HAVE_REWINDDIR = @HAVE_REWINDDIR@ HAVE_RPMATCH = @HAVE_RPMATCH@ HAVE_SCANDIR = @HAVE_SCANDIR@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@ HAVE_SLEEP = @HAVE_SLEEP@ HAVE_STPCPY = @HAVE_STPCPY@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRPTIME = @HAVE_STRPTIME@ HAVE_STRSEP = @HAVE_STRSEP@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ HAVE_TIMEGM = @HAVE_TIMEGM@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ HAVE_USLEEP = @HAVE_USLEEP@ HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ HAVE_WCHAR_T = @HAVE_WCHAR_T@ HAVE__BOOL = @HAVE__BOOL@ HAVE__EXIT = @HAVE__EXIT@ HELP2MAN = @HELP2MAN@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBRARY_NAMESPACE = @LIBRARY_NAMESPACE@ LIBRARY_VERSION = @LIBRARY_VERSION@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@ NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ NEXT_DIRENT_H = @NEXT_DIRENT_H@ NEXT_GETOPT_H = @NEXT_GETOPT_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PRAGMA_COLUMNS = @PRAGMA_COLUMNS@ PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ RANLIB = @RANLIB@ REPLACE_CALLOC = @REPLACE_CALLOC@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ REPLACE_CHOWN = @REPLACE_CHOWN@ REPLACE_CLOSE = @REPLACE_CLOSE@ REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@ REPLACE_DIRFD = @REPLACE_DIRFD@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@ REPLACE_FSTAT = @REPLACE_FSTAT@ REPLACE_FSTATAT = @REPLACE_FSTATAT@ REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_LSTAT = @REPLACE_LSTAT@ REPLACE_MALLOC = @REPLACE_MALLOC@ REPLACE_MBTOWC = @REPLACE_MBTOWC@ REPLACE_MEMCHR = @REPLACE_MEMCHR@ REPLACE_MEMMEM = @REPLACE_MEMMEM@ REPLACE_MKDIR = @REPLACE_MKDIR@ REPLACE_MKFIFO = @REPLACE_MKFIFO@ REPLACE_MKNOD = @REPLACE_MKNOD@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NULL = @REPLACE_NULL@ REPLACE_OPENDIR = @REPLACE_OPENDIR@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_PWRITE = @REPLACE_PWRITE@ REPLACE_READ = @REPLACE_READ@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_REALLOC = @REPLACE_REALLOC@ REPLACE_REALPATH = @REPLACE_REALPATH@ REPLACE_RMDIR = @REPLACE_RMDIR@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_STAT = @REPLACE_STAT@ REPLACE_STPNCPY = @REPLACE_STPNCPY@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRERROR_R = @REPLACE_STRERROR_R@ REPLACE_STRNCAT = @REPLACE_STRNCAT@ REPLACE_STRNDUP = @REPLACE_STRNDUP@ REPLACE_STRNLEN = @REPLACE_STRNLEN@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ REPLACE_UNLINK = @REPLACE_UNLINK@ REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ REPLACE_UNSETENV = @REPLACE_UNSETENV@ REPLACE_USLEEP = @REPLACE_USLEEP@ REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@ REPLACE_WCTOMB = @REPLACE_WCTOMB@ REPLACE_WRITE = @REPLACE_WRITE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STRIP = @STRIP@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TAR = @TAR@ TEXI2HTML = @TEXI2HTML@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ VALGRIND = @VALGRIND@ VERSION = @VERSION@ YACC = @YACC@ YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bash_completiondir = @bash_completiondir@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ gltests_LIBOBJS = @gltests_LIBOBJS@ gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ gltests_WITNESS = @gltests_WITNESS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ source_highlightdatadir = @source_highlightdatadir@ source_highlightdocdir = @source_highlightdocdir@ source_highlightlibdocdir = @source_highlightlibdocdir@ source_highlightlibexampledir = @source_highlightlibexampledir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I$(top_srcdir)/gl -I$(top_builddir)/gl $(BOOST_CPPFLAGS) \ -D DATADIR="\"$(top_srcdir)/src/\"" AM_LDFLAGS = $(BOOST_LDFLAGS) -no-install LDADD = $(top_builddir)/gl/libgnu.la $(LIBDIR)/libsource-highlight.la #LIBDIR = $(top_builddir)/lib/srchilite/ LIBDIR = ../srchilite/ INCLUDES = -I@top_srcdir@/src -I@srcdir@/.. source_highlight_console_SOURCES = source-highlight-console-main.cpp infoformatter_SOURCES = infoformatter-main.cpp infoformatter.h styleformatter_SOURCES = styleformatter-main.cpp styleformatter.h styleformatterfactory.h source_highlightlibexample_DATA = $(source_highlight_console_SOURCES) \ $(infoformatter_SOURCES) $(styleformatter_SOURCES) all: all-am .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/examples/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu lib/examples/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-checkPROGRAMS: @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list infoformatter$(EXEEXT): $(infoformatter_OBJECTS) $(infoformatter_DEPENDENCIES) @rm -f infoformatter$(EXEEXT) $(CXXLINK) $(infoformatter_OBJECTS) $(infoformatter_LDADD) $(LIBS) source-highlight-console$(EXEEXT): $(source_highlight_console_OBJECTS) $(source_highlight_console_DEPENDENCIES) @rm -f source-highlight-console$(EXEEXT) $(CXXLINK) $(source_highlight_console_OBJECTS) $(source_highlight_console_LDADD) $(LIBS) styleformatter$(EXEEXT): $(styleformatter_OBJECTS) $(styleformatter_DEPENDENCIES) @rm -f styleformatter$(EXEEXT) $(CXXLINK) $(styleformatter_OBJECTS) $(styleformatter_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/infoformatter-main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/source-highlight-console-main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/styleformatter-main.Po@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-source_highlightlibexampleDATA: $(source_highlightlibexample_DATA) @$(NORMAL_INSTALL) test -z "$(source_highlightlibexampledir)" || $(MKDIR_P) "$(DESTDIR)$(source_highlightlibexampledir)" @list='$(source_highlightlibexample_DATA)'; test -n "$(source_highlightlibexampledir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(source_highlightlibexampledir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(source_highlightlibexampledir)" || exit $$?; \ done uninstall-source_highlightlibexampleDATA: @$(NORMAL_UNINSTALL) @list='$(source_highlightlibexample_DATA)'; test -n "$(source_highlightlibexampledir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(source_highlightlibexampledir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(source_highlightlibexampledir)" && rm -f $$files ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(source_highlightlibexampledir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-source_highlightlibexampleDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-source_highlightlibexampleDATA .MAKE: check-am install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean \ clean-checkPROGRAMS clean-generic clean-libtool ctags \ distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am \ install-source_highlightlibexampleDATA install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am \ uninstall-source_highlightlibexampleDATA # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/examples/infoformatter.h�������������������������������������������������0000644�0001750�0001750�00000002361�11672675562�017346� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2009 * Copyright: See COPYING file that comes with this distribution */ #ifndef INFOFORMATTER_H_ #define INFOFORMATTER_H_ #include <string> #include <iostream> #include <boost/shared_ptr.hpp> #include "srchilite/formatter.h" #include "srchilite/formatterparams.h" /** * A specialization of srchilite::Formatter so that it prints information * about the language element that is being highlighted. *///> TEXINFO class InfoFormatter: public srchilite::Formatter { /// the language element represented by this formatter std::string elem; public: InfoFormatter(const std::string &elem_ = "normal") : elem(elem_) { } virtual void format(const std::string &s, const srchilite::FormatterParams *params = 0) { // do not print anything if normal or string to format is empty if (elem != "normal" || !s.size()) { std::cout << elem << ": " << s; if (params) std::cout << ", start: " << params->start; std::cout << std::endl; } } }; /// shared pointer for InfoFormatter typedef boost::shared_ptr<InfoFormatter> InfoFormatterPtr; //> TEXINFO #endif /* INFOFORMATTER_H_ */ �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/examples/source-highlight-console-main.cpp�������������������������������0000644�0001750�0001750�00000002514�11672675562�022651� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * source-highlight-console.cpp * * Example of use of source-highlight library: * highlights a source to the console * * Created on: May 7, 2009 * Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2008 * Copyright: See COPYING file that comes with this distribution */ //> TEXINFO #include <iostream> #include "srchilite/sourcehighlight.h" #include "srchilite/langmap.h" using namespace std; #ifndef DATADIR #define DATADIR "" #endif int main(int argc, char *argv[]) { // we highlight to the console, through ANSI escape sequences srchilite::SourceHighlight sourceHighlight("esc.outlang"); // make sure we find the .lang and .outlang files sourceHighlight.setDataDir(DATADIR); // by default we highlight C++ code string inputLang = "cpp.lang"; if (argc > 1) { // we have a file name so we detect the input source language srchilite::LangMap langMap(DATADIR, "lang.map"); string lang = langMap.getMappedFileNameFromFileName(argv[1]); if (lang != "") { inputLang = lang; } // otherwise we default to C++ // output file name is empty => cout sourceHighlight.highlight(argv[1], "", inputLang); } else { // input file name is empty => cin sourceHighlight.highlight("", "", inputLang); } return 0; } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/examples/styleformatter-main.cpp�����������������������������������������0000644�0001750�0001750�00000003602�11672675562�021027� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * source-highlight-console.cpp * * Example of use of source-highlight library: * prints formatting information to the console: what is going to * be formatted and how it is formatted * * Created on: May 7, 2009 * Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2008 * Copyright: See COPYING file that comes with this distribution *///> TEXINFO #include <iostream> #include "srchilite/langdefmanager.h" #include "srchilite/regexrulefactory.h" #include "srchilite/sourcehighlighter.h" #include "srchilite/formattermanager.h" #include "srchilite/stylefileparser.h" // for parsing style files #include "styleformatterfactory.h" using namespace std; #ifndef DATADIR #define DATADIR "" #endif int main() { srchilite::RegexRuleFactory ruleFactory; srchilite::LangDefManager langDefManager(&ruleFactory); // we highlight C++ code for simplicity srchilite::SourceHighlighter highlighter(langDefManager.getHighlightState( DATADIR, "cpp.lang")); // our factory for our formatters StyleFormatterFactory factory; // the background color for the document (not used here) string docBgColor; // let's parse the default.style and create our formatters srchilite::StyleFileParser::parseStyleFile(DATADIR, "default.style", &factory, docBgColor); // now we need to fill up the formatter manager with our formatters srchilite::FormatterManager formatterManager(StyleFormatterPtr( new StyleFormatter)); for (StyleFormatterMap::const_iterator it = factory.formatterMap.begin(); it != factory.formatterMap.end(); ++it) { formatterManager.addFormatter(it->first, it->second); } highlighter.setFormatterManager(&formatterManager); string line; // we now highlight a line a time while (getline(cin, line)) { highlighter.highlightParagraph(line); } return 0; } ������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/examples/styleformatter.h������������������������������������������������0000644�0001750�0001750�00000003503�11672675562�017552� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2009 * Copyright: See COPYING file that comes with this distribution */ #ifndef STYLEFORMATTER_H_ #define STYLEFORMATTER_H_ #include <string> #include <iostream> #include <boost/shared_ptr.hpp> #include "srchilite/formatter.h" #include "srchilite/formatterparams.h" /** * A specialization of srchilite::Formatter so that it prints information * about the language element that is being highlighted, and the format (that is, * bold, italics, etc). To avoid get/set methods, let's make all members * public, it is just an example anyway :-) *///> TEXINFO struct StyleFormatter: public srchilite::Formatter { /// the language element represented by this formatter std::string elem; bool bold, italic, underline, fixed, not_fixed; std::string color; std::string bgColor; StyleFormatter(const std::string &elem_ = "normal") : elem(elem_), bold(false), italic(false), underline(false), fixed(false), not_fixed(false) { } virtual void format(const std::string &s, const srchilite::FormatterParams *params = 0) { // do not print anything if normal or string to format is empty if (elem != "normal" || !s.size()) { std::cout << elem << ": \"" << s << "\"" << std::endl; std::cout << "formatted as: " << (bold ? "bold " : "") << (italic ? "italic " : "") << (underline ? "underline " : ""); std::cout << (color.size() ? "color: " + color + " " : ""); std::cout << (bgColor.size() ? "bgcolor: " + bgColor : "") << std::endl; } } }; /// shared pointer for StyleFormatter typedef boost::shared_ptr<StyleFormatter> StyleFormatterPtr; //> TEXINFO #endif /* STYLEFORMATTER_H_ */ ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/examples/Makefile.am�����������������������������������������������������0000644�0001750�0001750�00000002333�11672675562�016351� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Copyright (C) 1999-2009 Lorenzo Bettini <http://www.lorenzobettini.it> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. AM_CPPFLAGS = -I$(top_srcdir)/gl -I$(top_builddir)/gl $(BOOST_CPPFLAGS) \ -D DATADIR="\"$(top_srcdir)/src/\"" AM_LDFLAGS = $(BOOST_LDFLAGS) -no-install LDADD = $(top_builddir)/gl/libgnu.la $(LIBDIR)/libsource-highlight.la #LIBDIR = $(top_builddir)/lib/srchilite/ LIBDIR = ../srchilite/ INCLUDES = -I@top_srcdir@/src -I@srcdir@/.. check_PROGRAMS = source-highlight-console infoformatter styleformatter source_highlight_console_SOURCES = source-highlight-console-main.cpp infoformatter_SOURCES = infoformatter-main.cpp infoformatter.h styleformatter_SOURCES = styleformatter-main.cpp styleformatter.h styleformatterfactory.h source_highlightlibexample_DATA = $(source_highlight_console_SOURCES) \ $(infoformatter_SOURCES) $(styleformatter_SOURCES) �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/lib/Makefile.am��������������������������������������������������������������0000644�0001750�0001750�00000001105�11672675562�014527� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Copyright (C) 1999-2008 Lorenzo Bettini <http://www.lorenzobettini.it> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. SUBDIRS = srchilite tests examples compat DIST_SUBDIRS = $(SUBDIRS) EXTRA_DIST = lib.pro �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/INSTALL����������������������������������������������������������������������0000644�0001750�0001750�00000030372�11672675560�012764� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Basic Installation ================== For more information specific to this package, please read the README file. This source code distribution is autoconfiguring and you should be able to compile it and install it without manual interventions such as editing Makefiles, configuration files, and so on. These are generic instructions for people who are not familiar with installing autoconfiguring software. The simplest way to compile this package is to enter the source code main directory and do the following: 1. Configure the source code by typing: % sh ./configure If you're planning to install the package into your home directory or to a location other than `/usr/local' then add the flag `--prefix=PATH' to `configure'. For example, if your home directory is `/home/luser' you can configure the package to install itself there by invoking: % sh ./configure --prefix=/home/luser While running, `configure' prints some messages telling which features is it checking for. 2. Compile the package by typing: % make Running `make' takes a while. If this is a very large package, now is the time to go make some coffee. 3. Some packages are bundled with self-tests for source-code verification. If this package includes such tests, you can optionally run them after compilation by typing % make check 4. Type `make install' to install the programs and any data files and documentation. Type `make uninstall' to undo the installation. During installation, the following files go to the following directories: Executables -> /prefix/bin docs and samples -> /prefix/share/doc/source-highlight conf files -> /prefix/share/source-highlight where `prefix' is either `/usr/local' or the PATH that you specified in the `--prefix' flag. If any of these directories do not presently exist, they will be created on demand. If you are installing in your home directory make sure that `/home/luser/bin' is in your path. If you're using the bash shell add this line at the end of your .cshrc file: PATH="/home/luser/bin:${PATH}" export PATH If you are using csh or tcsh, then use this line instead: setenv PATH /home/luser/bin:${PATH} By prepending your home directory to the rest of the PATH you can override systemwide installed software with your own custom installation. 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'. Building RPMs ============= You can build an .rpm by issuing the following command: rpm -tb source-highlight-@VERSION@.tar.gz and an .rpm.src with the following command: rpm -ts source-highlight-@VERSION@.tar.gz You may want to check the rpm documentation for further options. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix *Note Defining Variables::, for more details. 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=PREFIX'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you give `configure' the option `--exec-prefix=PREFIX', the package will use PREFIX 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=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Compiler configuration ====================== The `configure' shell script is responsible for choosing and configuring the compiler(s). The following options allow you to specify whether you want to enable or disable various debugging mechanisms: `--enable-warnings' Make the compilers very picky about warnings. Try this whenever you write new code since it may catch a few bugs. This is not active by default because all too often warnings can be too picky and scare the end-user. `--enable-input-chroot' hardcode in the program the path to prepend for input files. Useful when the programs are built for CGI, in order to hide, in the html page, the real structure of the server file system. All programs are compiled with optimization level 2 by default (-O2). Occasionally that confuses the debugger when code is inlined. To disable optimization and enable debugging, set the shell environment variables CFLAGS, CXXFLAGS, FFLAGS to `-g'. On the bash shell, you can do this like this: $ export CFLAGS="-g" $ export CXXFLAGS="-g" $ export FFLAGS="-g" On the tcsh shell, use the `setenv' command instead: % setenv CFLAGS "-g" ...etc... For other shell, please consult your shell's documentation. Similarly, you can increase the optimization level by assigning these variables to "-g -O3". Depending on what languages the package uses, some of these options may or may not be available. To see what is available, type: % sh ./configure --help About the configure script ========================== 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'. Advanced installation options. ============================== The `configure' script also understands the following more advanced options, to handle situations for which `--prefix' alone is not sufficient. 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' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the `--target=TYPE' option to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc will cause the specified gcc to be used as the C compiler (unless it is overridden in the site shell script). `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of the options to `configure', and exit. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. -------------------- Please send all bug reports by electronic mail to: bug-source-highlight at gnu.org My home page is http://www.lorenzobettini.it source-highlight is free GPL software. See the file COPYING for copying conditions. Anyway I won't get offended if you send me a postcard :-) ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������source-highlight-3.1.6/Makefile.am������������������������������������������������������������������0000664�0001750�0001750�00000002124�11672675560�013763� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Copyright (C) 1999, 2000, 2001 Lorenzo Bettini <http://www.lorenzobettini.it> # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. SUBDIRS = m4 gl lib src doc tests EXTRA_DIST = \ source-highlight.spec.in \ source-highlight.spec \ TODO.txt \ CREDITS gl/m4/gnulib-cache.m4 \ completion/source-highlight \ _sstream \ source-highlight.pro defines.pri source_highlightdoc_DATA = \ ChangeLog \ COPYING \ NEWS \ THANKS \ INSTALL \ README \ TODO.txt \ CREDITS if USE_BASH_COMPLETION bash_completion_DATA = completion/source-highlight else bash_completion_DATA = endif ACLOCAL_AMFLAGS = -I m4 -I gl/m4 pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = source-highlight.pc DISTCHECK_CONFIGURE_FLAGS=--with-doxygen ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������