graphthing-1.3.2/0000777000076500007650000000000010542622566014160 5ustar dsymondsdsymondsgraphthing-1.3.2/aclocal.m40000644000076500007650000001544210501136235016006 0ustar dsymondsdsymondsdnl Check if the C++ compiler supports exceptions handling dnl (try, throw and catch) AC_DEFUN([AC_CXX_EXCEPTIONS], [AC_CACHE_CHECK(whether the compiler supports exceptions, ac_cv_cxx_exceptions, [AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_TRY_COMPILE(,[try { throw 1; } catch (int i) { return i; }], ac_cv_cxx_exceptions=yes, ac_cv_cxx_exceptions=no) AC_LANG_RESTORE ]) if test "$ac_cv_cxx_exceptions" != yes; then AC_MSG_ERROR([no C++ exception support found]) fi ]) dnl Check if the compiler recognizes bool as a separate built-in type. AC_DEFUN([AC_CXX_BOOL], [AC_CACHE_CHECK(whether the compiler recognizes bool as a built-in type, ac_cv_cxx_bool, [AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_TRY_COMPILE([ int f(int x){return 1;} int f(char x){return 1;} int f(bool x){return 1;} ],[bool b = true; return f(b);], ac_cv_cxx_bool=yes, ac_cv_cxx_bool=no) AC_LANG_RESTORE ]) if test "$ac_cv_cxx_bool" != yes; then AC_MSG_ERROR([no built-in 'bool' C++ type]) fi ]) dnl Check if the compiler can prevent names clashes using namespaces. 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_MSG_ERROR([C++ namespaces not supported]) fi ]) dnl Check if the C++ library has a working stringstream. 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 ], [std::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_MSG_ERROR([no functional stringstream]) AC_DEFINE(HAVE_SSTREAM,,[define if the compiler has stringstream]) fi ]) dnl Check if the compiler supports ISO C++ standard library dnl (i.e., can include the files iostream, map, iomanip and cmath}). AC_DEFUN([AC_CXX_HAVE_STD], [AC_CACHE_CHECK(whether the compiler supports ISO C++ standard library, ac_cv_cxx_have_std, [AC_REQUIRE([AC_CXX_NAMESPACES]) AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_TRY_COMPILE([#include #include #include #include #ifdef HAVE_NAMESPACES using namespace std; #endif],[return 0;], ac_cv_cxx_have_std=yes, ac_cv_cxx_have_std=no) AC_LANG_RESTORE ]) if test "$ac_cv_cxx_have_std" != yes; then AC_MSG_ERROR([no support for ISO C++ standard library]) fi ]) dnl Check if the compiler supports the Standard Template Library. 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 #include ], [std::list x; x.push_back(5); std::list::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_MSG_ERROR([no support for C++ STL]) fi ]) dnl Check if the compiler supports member constants. AC_DEFUN([AC_CXX_MEMBER_CONSTANTS], [AC_CACHE_CHECK(whether the compiler supports member constants, ac_cv_cxx_member_constants, [AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_TRY_COMPILE([class C {public: static const int i = 0;}; const int C::i;], [return C::i;], ac_cv_cxx_member_constants=yes, ac_cv_cxx_member_constants=no) AC_LANG_RESTORE ]) if test "$ac_cv_cxx_member_constants" != yes; then AC_MSG_ERROR([no support by C++ compiler for members constants]) fi ]) AC_DEFUN( [CHECK_GNU_MAKE], [ AC_CACHE_CHECK( for GNU make,_cv_gnu_make_command, _cv_gnu_make_command='' ; dnl Search all the common names for GNU make for a in "$MAKE" make gmake gnumake ; do if test -z "$a" ; then continue ; fi ; if ( sh -c "$a --version" 2> /dev/null | grep GNU 2>&1 > /dev/null ) ; then _cv_gnu_make_command=$a ; break; fi done ; ) ; dnl If there was a GNU version, then set @ifGNUmake@ to the empty string, '#' otherwise if test "x$_cv_gnu_make_command" != "x" ; then ifGNUmake='' ; else ifGNUmake='#' ; AC_MSG_RESULT("Not found"); fi AC_SUBST(ifGNUmake) ] ) dnl Test for wxWidgets, and define WX_CXXFLAGS and WX_LIBS dnl to be used as follows: dnl AM_PATH_WXWIDGETS([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) dnl AC_DEFUN(AM_PATH_WXWIDGETS, [dnl dnl Get the cflags and libraries from the wx-config script dnl AC_ARG_WITH(wx-config, [[ --with-wx-config=FILE Use the given path to wx-config when determining wxWidgets configuration; defaults to "wx-config"]], [ if test "$withval" != "yes" -a "$withval" != ""; then WXCONFIG=$withval fi ]) AC_PATH_PROG(WXCONFIG, wx-config, no) min_wx_version=ifelse([$1], ,2.2.0,$1) if test "$WXCONFIG" != "no"; then AC_MSG_CHECKING(for wxWidgets version >= $min_wx_version) wx_version=`$WXCONFIG --version` if test "x$wx_version" = "x"; then AC_MSG_RESULT([not found]) AC_MSG_ERROR([wxWidgets is required. Try --with-wx-config.]) fi # TODO: test version v_maj=`echo $wx_version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` v_min=`echo $wx_version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` v_rev=`echo $wx_version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` req_maj=`echo $min_wx_version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` req_min=`echo $min_wx_version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` req_rev=`echo $min_wx_version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` proper_version=`expr \ $v_maj \> $req_maj \| \ $v_maj \= $req_maj \& \ $v_min \> $req_min \| \ $v_maj \= $req_maj \& \ $v_min \= $req_min \& \ $v_rev \>= $req_rev` if test "$proper_version" = "1"; then AC_MSG_RESULT([ok (found $wx_version)]) else AC_MSG_ERROR([sorry, found $wx_version]) fi WX_CXXFLAGS=`$WXCONFIG --cxxflags` WX_LIBS=`$WXCONFIG --libs` AC_SUBST(WX_CXXFLAGS) AC_SUBST(WX_LIBS) else # Die hard, with a vengeance! echo "#############################################" echo "# Sorry, wxWidgets is required to build. #" echo "# You can download it from: #" echo "# http://www.wxwidgets.org/ #" echo "#############################################" exit 1 fi ]) graphthing-1.3.2/configure0000755000076500007650000056577210504070065016076 0ustar dsymondsdsymonds#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.60 for GraphThing 1.3.2. # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' 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 # PATH needs CR # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false 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.) as_nl=' ' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. 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 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. 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 # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH if test "x$CONFIG_SHELL" = x; then if (eval ":") 2>/dev/null; then as_have_required=yes else as_have_required=no fi if test $as_have_required = yes && (eval ": (as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=\$LINENO as_lineno_2=\$LINENO test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } ") 2> /dev/null; then : else as_candidate_shells= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /usr/bin/posix$PATH_SEPARATOR/bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. case $as_dir in /*) for as_base in sh bash ksh sh5; do as_candidate_shells="$as_candidate_shells $as_dir/$as_base" done;; esac done IFS=$as_save_IFS for as_shell in $as_candidate_shells $SHELL; do # Try only shells that exist, to save several forks. if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { ("$as_shell") 2> /dev/null <<\_ASEOF # 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 : _ASEOF }; then CONFIG_SHELL=$as_shell as_have_required=yes if { "$as_shell" 2> /dev/null <<\_ASEOF # 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 : (as_func_return () { (exit $1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = "$1" ); then : else exitcode=1 echo positional parameters were not saved. fi test $exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } _ASEOF }; then break fi fi done if test "x$CONFIG_SHELL" != x; then for as_var in BASH_ENV ENV do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done export CONFIG_SHELL exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi if test $as_have_required = no; then echo This script requires a shell more modern than all the echo shells that I found on your system. Please install a echo modern shell, or manually run the script under such a echo shell if you do have one. { (exit 1); exit 1; } fi fi fi (eval "as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0") || { echo No shell found that supports shell functions. echo Please tell autoconf@gnu.org about your system, echo including any error possibly output before this echo message } as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. 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" || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi 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 fi echo >conf$$.file 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 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=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # Find out whether ``test -x'' works. Don't use a zero-byte file, as # systems may use methods other than mode bits to determine executability. cat >conf$$.file <<_ASEOF #! /bin/sh exit 0 _ASEOF chmod +x conf$$.file if test -x conf$$.file >/dev/null 2>&1; then as_executable_p="test -x" else as_executable_p=: fi rm -f conf$$.file # 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 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='GraphThing' PACKAGE_TARNAME='graphthing' PACKAGE_VERSION='1.3.2' PACKAGE_STRING='GraphThing 1.3.2' PACKAGE_BUGREPORT='' ac_unique_file="src/graph.h" # Factoring default headers for most tests. ac_includes_default="\ #include #if HAVE_SYS_TYPES_H # include #endif #if HAVE_SYS_STAT_H # include #endif #if STDC_HEADERS # include # include #else # if HAVE_STDLIB_H # include # endif #endif #if HAVE_STRING_H # if !STDC_HEADERS && HAVE_MEMORY_H # include # endif # include #endif #if HAVE_STRINGS_H # include #endif #if HAVE_INTTYPES_H # include #endif #if HAVE_STDINT_H # include #endif #if HAVE_UNISTD_H # include #endif" ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir localstatedir includedir oldincludedir docdir infodir htmldir dvidir pdfdir psdir libdir localedir mandir DEFS ECHO_C ECHO_N ECHO_T LIBS build_alias host_alias target_alias GT_VERSION CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX CPP GREP EGREP YACC YFLAGS LEX LEXLIB LEX_OUTPUT_ROOT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA SET_MAKE LN_S unamepath ifGNUmake WXCONFIG WX_CXXFLAGS WX_LIBS NLS_OBJS NLS_PARSERS EXTRA_CFLAGS EXTRA_PROGS EXTRA_LDFLAGS LIBOBJS LTLIBOBJS' ac_subst_files='' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS CPPFLAGS CXX CXXFLAGS CCC CPP YACC YFLAGS' # Initialize some variables set by options. ac_init_help= ac_init_version=false # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (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=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_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` eval enable_$ac_feature=no ;; -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_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` eval enable_$ac_feature=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -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_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package| sed 's/-/_/g'` eval with_$ac_package=\$ac_optarg ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/-/_/g'` eval with_$ac_package=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) { echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` { echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi # Be sure to have absolute directory names. 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 case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; } done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || { echo "$as_me: error: Working directory cannot be determined" >&2 { (exit 1); exit 1; }; } test "X$ac_ls_di" = "X$ac_pwd_ls_di" || { echo "$as_me: error: pwd does not report name of working directory" >&2 { (exit 1); exit 1; }; } # 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 -- "$0" || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X"$0" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 { (exit 1); exit 1; }; } 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 GraphThing 1.3.2 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/graphthing] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of GraphThing 1.3.2:";; esac cat <<\_ACEOF Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-nls Do not use Native Language Support --enable-langdialog Use the language selection dialog (needs NLS) Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-wx-config=FILE Use the given path to wx-config when determining wxWidgets configuration; defaults to "wx-config" --with-dev Enable developer flags --with-prof Enable profiling Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if you have headers in a nonstandard directory CXX C++ compiler command CXXFLAGS C++ compiler flags CPP C preprocessor YACC The `Yet Another C 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. _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" || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`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 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 GraphThing configure 1.3.2 generated by GNU Autoconf 2.60 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 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 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 GraphThing $as_me 1.3.2, which was generated by GNU Autoconf 2.60. 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=. 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=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac done done $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: 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 cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX 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_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( *) $as_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 cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------------- ## ## File substitutions. ## ## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo cat confdefs.h echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.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'; { (exit 1); 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 # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -n "$CONFIG_SITE"; then set x "$CONFIG_SITE" elif test "x$prefix" != xNONE; then set x "$prefix/share/config.site" "$prefix/etc/config.site" else set x "$ac_default_prefix/share/config.site" \ "$ac_default_prefix/etc/config.site" fi shift for ac_site_file do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { echo "$as_me:$LINENO: creating cache $cache_file" >&5 echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $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,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_config_headers="$ac_config_headers src/config.h" cat >>confdefs.h <<_ACEOF #define GT_VERSION "$PACKAGE_VERSION" _ACEOF # Check out C++ compiler ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done 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 { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. echo "$as_me:$LINENO: checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # # List of possible output files, starting from the most likely. # The algorithm is not robust to junk in `.', hence go to wildcards (a.*) # only as a last resort. b.out is created by i960 compilers. ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' # # The IRIX 6 linker writes into existing files which may not be # executable, retaining their permissions. Remove them first so a # subsequent execution test works. ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link_default") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; 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 | *.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 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 echo "$as_me: error: C compiler cannot create executables See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext { echo "$as_me:$LINENO: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6; } # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { echo "$as_me:$LINENO: checking whether the C compiler works" >&5 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi fi fi { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } { echo "$as_me:$LINENO: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6; } { echo "$as_me:$LINENO: checking for suffix of executables" >&5 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext { echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT { echo "$as_me:$LINENO: checking for suffix of object files" >&5 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; 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 ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 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 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* 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" 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_c89=$ac_arg else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 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) { echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6; } ;; xno) { echo "$as_me:$LINENO: result: unsupported" >&5 echo "${ECHO_T}unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" echo "$as_me:$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 { echo "$as_me:$LINENO: result: $CXX" >&5 echo "${ECHO_T}$CXX" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CXX="$ac_prog" echo "$as_me:$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 { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 echo "${ECHO_T}$ac_ct_CXX" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}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:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. echo "$as_me:$LINENO: checking for C++ compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; } if test "${ac_cv_cxx_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; } GXX=`test $ac_compiler_gnu = yes && echo yes` ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_cxx_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cxx_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CXXFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cxx_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 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 { echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 echo "${ECHO_T}$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 { echo "$as_me:$LINENO: checking whether the compiler implements namespaces" >&5 echo $ECHO_N "checking whether the compiler implements namespaces... $ECHO_C" >&6; } if test "${ac_cv_cxx_namespaces+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ namespace Outer { namespace Inner { int i = 0; }} int main () { using namespace Outer::Inner; return i; ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_cxx_namespaces=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_cxx_namespaces=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { echo "$as_me:$LINENO: result: $ac_cv_cxx_namespaces" >&5 echo "${ECHO_T}$ac_cv_cxx_namespaces" >&6; } if test "$ac_cv_cxx_namespaces" != yes; then { { echo "$as_me:$LINENO: error: C++ namespaces not supported" >&5 echo "$as_me: error: C++ namespaces not supported" >&2;} { (exit 1); exit 1; }; } fi { echo "$as_me:$LINENO: checking for function prototypes" >&5 echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6; } if test "$ac_cv_prog_cc_c89" != no; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } cat >>confdefs.h <<\_ACEOF #define PROTOTYPES 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define __PROTOTYPES 1 _ACEOF else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi # TODO: Check for PROTOTYPES being defined ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { echo "$as_me:$LINENO: result: $CPP" >&5 echo "${ECHO_T}$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } if test "${ac_cv_path_GREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Extract the first word of "grep ggrep" to use in msg output if test -z "$GREP"; then set dummy grep ggrep; ac_prog_name=$2 if test "${ac_cv_path_GREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else 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_executable_p "$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 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" 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 ac_count=`expr $ac_count + 1` 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 fi GREP="$ac_cv_path_GREP" if test -z "$GREP"; then { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_GREP=$GREP fi fi { echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 echo "${ECHO_T}$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { echo "$as_me:$LINENO: checking for egrep" >&5 echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } if test "${ac_cv_path_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else # Extract the first word of "egrep" to use in msg output if test -z "$EGREP"; then set dummy egrep; ac_prog_name=$2 if test "${ac_cv_path_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else 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_executable_p "$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 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" 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 ac_count=`expr $ac_count + 1` 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 fi EGREP="$ac_cv_path_EGREP" if test -z "$EGREP"; then { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_EGREP=$EGREP fi fi fi { echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { echo "$as_me:$LINENO: checking for preprocessor stringizing operator" >&5 echo $ECHO_N "checking for preprocessor stringizing operator... $ECHO_C" >&6; } if test "${ac_cv_c_stringize+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define x(y) #y char *s = x(teststring); _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "#teststring" >/dev/null 2>&1; then ac_cv_c_stringize=no else ac_cv_c_stringize=yes fi rm -f conftest* fi { echo "$as_me:$LINENO: result: $ac_cv_c_stringize" >&5 echo "${ECHO_T}$ac_cv_c_stringize" >&6; } if test $ac_cv_c_stringize = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_STRINGIZE 1 _ACEOF fi if test $ac_cv_c_stringize != yes; then { { echo "$as_me:$LINENO: error: no ANSI stringizing operator" >&5 echo "$as_me: error: no ANSI stringizing operator" >&2;} { (exit 1); exit 1; }; } fi { echo "$as_me:$LINENO: checking whether the compiler recognizes bool as a built-in type" >&5 echo $ECHO_N "checking whether the compiler recognizes bool as a built-in type... $ECHO_C" >&6; } if test "${ac_cv_cxx_bool+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int f(int x){return 1;} int f(char x){return 1;} int f(bool x){return 1;} int main () { bool b = true; return f(b); ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_cxx_bool=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_cxx_bool=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { echo "$as_me:$LINENO: result: $ac_cv_cxx_bool" >&5 echo "${ECHO_T}$ac_cv_cxx_bool" >&6; } if test "$ac_cv_cxx_bool" != yes; then { { echo "$as_me:$LINENO: error: no built-in 'bool' C++ type" >&5 echo "$as_me: error: no built-in 'bool' C++ type" >&2;} { (exit 1); exit 1; }; } fi { echo "$as_me:$LINENO: checking whether the compiler supports exceptions" >&5 echo $ECHO_N "checking whether the compiler supports exceptions... $ECHO_C" >&6; } if test "${ac_cv_cxx_exceptions+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { try { throw 1; } catch (int i) { return i; } ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_cxx_exceptions=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_cxx_exceptions=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { echo "$as_me:$LINENO: result: $ac_cv_cxx_exceptions" >&5 echo "${ECHO_T}$ac_cv_cxx_exceptions" >&6; } if test "$ac_cv_cxx_exceptions" != yes; then { { echo "$as_me:$LINENO: error: no C++ exception support found" >&5 echo "$as_me: error: no C++ exception support found" >&2;} { (exit 1); exit 1; }; } fi { echo "$as_me:$LINENO: checking whether the compiler has stringstream" >&5 echo $ECHO_N "checking whether the compiler has stringstream... $ECHO_C" >&6; } if test "${ac_cv_cxx_have_sstream+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { std::stringstream message; message << "Hello"; return 0; ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_cxx_have_sstream=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_cxx_have_sstream=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { echo "$as_me:$LINENO: result: $ac_cv_cxx_have_sstream" >&5 echo "${ECHO_T}$ac_cv_cxx_have_sstream" >&6; } if test "$ac_cv_cxx_have_sstream" != yes; then { { echo "$as_me:$LINENO: error: no functional stringstream" >&5 echo "$as_me: error: no functional stringstream" >&2;} { (exit 1); exit 1; }; } cat >>confdefs.h <<\_ACEOF #define HAVE_SSTREAM _ACEOF fi { echo "$as_me:$LINENO: checking whether the compiler supports ISO C++ standard library" >&5 echo $ECHO_N "checking whether the compiler supports ISO C++ standard library... $ECHO_C" >&6; } if test "${ac_cv_cxx_have_std+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include #ifdef HAVE_NAMESPACES using namespace std; #endif int main () { return 0; ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_cxx_have_std=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_cxx_have_std=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { echo "$as_me:$LINENO: result: $ac_cv_cxx_have_std" >&5 echo "${ECHO_T}$ac_cv_cxx_have_std" >&6; } if test "$ac_cv_cxx_have_std" != yes; then { { echo "$as_me:$LINENO: error: no support for ISO C++ standard library" >&5 echo "$as_me: error: no support for ISO C++ standard library" >&2;} { (exit 1); exit 1; }; } fi { echo "$as_me:$LINENO: checking whether the compiler supports Standard Template Library" >&5 echo $ECHO_N "checking whether the compiler supports Standard Template Library... $ECHO_C" >&6; } if test "${ac_cv_cxx_have_stl+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { std::list x; x.push_back(5); std::list::iterator iter = x.begin(); if (iter != x.end()) ++iter; return 0; ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_cxx_have_stl=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_cxx_have_stl=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { echo "$as_me:$LINENO: result: $ac_cv_cxx_have_stl" >&5 echo "${ECHO_T}$ac_cv_cxx_have_stl" >&6; } if test "$ac_cv_cxx_have_stl" != yes; then { { echo "$as_me:$LINENO: error: no support for C++ STL" >&5 echo "$as_me: error: no support for C++ STL" >&2;} { (exit 1); exit 1; }; } fi { echo "$as_me:$LINENO: checking whether the compiler supports member constants" >&5 echo $ECHO_N "checking whether the compiler supports member constants... $ECHO_C" >&6; } if test "${ac_cv_cxx_member_constants+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ class C {public: static const int i = 0;}; const int C::i; int main () { return C::i; ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_cxx_member_constants=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_cxx_member_constants=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { echo "$as_me:$LINENO: result: $ac_cv_cxx_member_constants" >&5 echo "${ECHO_T}$ac_cv_cxx_member_constants" >&6; } if test "$ac_cv_cxx_member_constants" != yes; then { { echo "$as_me:$LINENO: error: no support by C++ compiler for members constants" >&5 echo "$as_me: error: no support by C++ compiler for members constants" >&2;} { (exit 1); exit 1; }; } fi # Other programs 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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_YACC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_YACC="$ac_prog" echo "$as_me:$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 { echo "$as_me:$LINENO: result: $YACC" >&5 echo "${ECHO_T}$YACC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$YACC" && break done test -n "$YACC" || YACC="yacc" if test "$YACC" != "bison -y"; then { { echo "$as_me:$LINENO: error: I'd much prefer to use GNU bison" >&5 echo "$as_me: error: I'd much prefer to use GNU bison" >&2;} { (exit 1); exit 1; }; } fi 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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_LEX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_LEX="$ac_prog" echo "$as_me:$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 { echo "$as_me:$LINENO: result: $LEX" >&5 echo "${ECHO_T}$LEX" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$LEX" && break done test -n "$LEX" || LEX=":" if test -z "$LEXLIB" then { echo "$as_me:$LINENO: checking for yywrap in -lfl" >&5 echo $ECHO_N "checking for yywrap in -lfl... $ECHO_C" >&6; } if test "${ac_cv_lib_fl_yywrap+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* 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 yywrap (); int main () { return yywrap (); ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_fl_yywrap=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_fl_yywrap=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_fl_yywrap" >&5 echo "${ECHO_T}$ac_cv_lib_fl_yywrap" >&6; } if test $ac_cv_lib_fl_yywrap = yes; then LEXLIB="-lfl" else { echo "$as_me:$LINENO: checking for yywrap in -ll" >&5 echo $ECHO_N "checking for yywrap in -ll... $ECHO_C" >&6; } if test "${ac_cv_lib_l_yywrap+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ll $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* 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 yywrap (); int main () { return yywrap (); ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_l_yywrap=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_l_yywrap=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_l_yywrap" >&5 echo "${ECHO_T}$ac_cv_lib_l_yywrap" >&6; } if test $ac_cv_lib_l_yywrap = yes; then LEXLIB="-ll" fi fi fi if test "x$LEX" != "x:"; then { echo "$as_me:$LINENO: checking lex output file root" >&5 echo $ECHO_N "checking lex output file root... $ECHO_C" >&6; } if test "${ac_cv_prog_lex_root+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # The minimal lex program is just a single line: %%. But some broken lexes # (Solaris, I think it was) want two %% lines, so accommodate them. cat >conftest.l <<_ACEOF %% %% _ACEOF { (ac_try="$LEX conftest.l" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$LEX conftest.l") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 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 { { echo "$as_me:$LINENO: error: cannot find output from $LEX; giving up" >&5 echo "$as_me: error: cannot find output from $LEX; giving up" >&2;} { (exit 1); exit 1; }; } fi fi { echo "$as_me:$LINENO: result: $ac_cv_prog_lex_root" >&5 echo "${ECHO_T}$ac_cv_prog_lex_root" >&6; } rm -f conftest.l LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root { echo "$as_me:$LINENO: checking whether yytext is a pointer" >&5 echo $ECHO_N "checking whether yytext is a pointer... $ECHO_C" >&6; } if test "${ac_cv_prog_lex_yytext_pointer+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c ac_save_LIBS=$LIBS LIBS="$LIBS $LEXLIB" cat >conftest.$ac_ext <<_ACEOF `cat $LEX_OUTPUT_ROOT.c` _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_lex_yytext_pointer=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_save_LIBS rm -f "${LEX_OUTPUT_ROOT}.c" fi { echo "$as_me:$LINENO: result: $ac_cv_prog_lex_yytext_pointer" >&5 echo "${ECHO_T}$ac_cv_prog_lex_yytext_pointer" >&6; } if test $ac_cv_prog_lex_yytext_pointer = yes; then cat >>confdefs.h <<\_ACEOF #define YYTEXT_POINTER 1 _ACEOF fi fi if test "$LEX" != "flex"; then { { echo "$as_me:$LINENO: error: I'd much prefer to use GNU flex" >&5 echo "$as_me: error: I'd much prefer to use GNU flex" >&2;} { (exit 1); exit 1; }; } fi ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} { (exit 1); exit 1; }; } fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. { echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/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_executable_p "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done IFS=$as_save_IFS 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 { echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&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 { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } SET_MAKE= else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi { echo "$as_me:$LINENO: checking whether ln -s works" >&5 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else { echo "$as_me:$LINENO: result: no, using $LN_S" >&5 echo "${ECHO_T}no, using $LN_S" >&6; } fi # Extract the first word of "uname", so it can be a program name with args. set dummy uname; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_unamepath+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $unamepath in [\\/]* | ?:[\\/]*) ac_cv_path_unamepath="$unamepath" # 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_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_unamepath="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi unamepath=$ac_cv_path_unamepath if test -n "$unamepath"; then { echo "$as_me:$LINENO: result: $unamepath" >&5 echo "${ECHO_T}$unamepath" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$unamepath" = "x"; then system="unknown" else { echo "$as_me:$LINENO: checking system type" >&5 echo $ECHO_N "checking system type... $ECHO_C" >&6; } system=`$unamepath -s` { echo "$as_me:$LINENO: result: $system" >&5 echo "${ECHO_T}$system" >&6; } if test "$system" = "Linux"; then cat >>confdefs.h <<\_ACEOF #define USING_LINUX 1 _ACEOF fi if test "$system" = "FreeBSD"; then cat >>confdefs.h <<\_ACEOF #define USING_FREEBSD 1 _ACEOF fi if test "$system" = "Darwin"; then cat >>confdefs.h <<\_ACEOF #define USING_OSX 1 _ACEOF fi fi # Check for needed headers { echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f 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 >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in math.h stdio.h stdlib.h string.h time.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF else exit fi done # Check for maths library { echo "$as_me:$LINENO: checking for atan2 in -lm" >&5 echo $ECHO_N "checking for atan2 in -lm... $ECHO_C" >&6; } if test "${ac_cv_lib_m_atan2+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* 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 atan2 (); int main () { return atan2 (); ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_m_atan2=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_m_atan2=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_m_atan2" >&5 echo "${ECHO_T}$ac_cv_lib_m_atan2" >&6; } if test $ac_cv_lib_m_atan2 = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBM 1 _ACEOF LIBS="-lm $LIBS" else { { echo "$as_me:$LINENO: error: Missing maths library (-lm)" >&5 echo "$as_me: error: Missing maths library (-lm)" >&2;} { (exit 1); exit 1; }; } fi # Check for GNU make { echo "$as_me:$LINENO: checking for GNU make" >&5 echo $ECHO_N "checking for GNU make... $ECHO_C" >&6; } if test "${_cv_gnu_make_command+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else _cv_gnu_make_command='' ; for a in "$MAKE" make gmake gnumake ; do if test -z "$a" ; then continue ; fi ; if ( sh -c "$a --version" 2> /dev/null | grep GNU 2>&1 > /dev/null ) ; then _cv_gnu_make_command=$a ; break; fi done ; fi { echo "$as_me:$LINENO: result: $_cv_gnu_make_command" >&5 echo "${ECHO_T}$_cv_gnu_make_command" >&6; } ; if test "x$_cv_gnu_make_command" != "x" ; then ifGNUmake='' ; else ifGNUmake='#' ; { echo "$as_me:$LINENO: result: \"Not found\"" >&5 echo "${ECHO_T}\"Not found\"" >&6; }; fi if test "x$_cv_gnu_make_command" = "x"; then echo "#############################################" echo "# Sorry, GNU Make is required to build. #" echo "#############################################" exit 1 fi # Check for wxWidgets # Check whether --with-wx-config was given. if test "${with_wx_config+set}" = set; then withval=$with_wx_config; if test "$withval" != "yes" -a "$withval" != ""; then WXCONFIG=$withval fi fi # Extract the first word of "wx-config", so it can be a program name with args. set dummy wx-config; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_WXCONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $WXCONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_WXCONFIG="$WXCONFIG" # 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_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_WXCONFIG="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_WXCONFIG" && ac_cv_path_WXCONFIG="no" ;; esac fi WXCONFIG=$ac_cv_path_WXCONFIG if test -n "$WXCONFIG"; then { echo "$as_me:$LINENO: result: $WXCONFIG" >&5 echo "${ECHO_T}$WXCONFIG" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi min_wx_version=2.6.1 if test "$WXCONFIG" != "no"; then { echo "$as_me:$LINENO: checking for wxWidgets version >= $min_wx_version" >&5 echo $ECHO_N "checking for wxWidgets version >= $min_wx_version... $ECHO_C" >&6; } wx_version=`$WXCONFIG --version` if test "x$wx_version" = "x"; then { echo "$as_me:$LINENO: result: not found" >&5 echo "${ECHO_T}not found" >&6; } { { echo "$as_me:$LINENO: error: wxWidgets is required. Try --with-wx-config." >&5 echo "$as_me: error: wxWidgets is required. Try --with-wx-config." >&2;} { (exit 1); exit 1; }; } fi # TODO: test version v_maj=`echo $wx_version | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` v_min=`echo $wx_version | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` v_rev=`echo $wx_version | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` req_maj=`echo $min_wx_version | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` req_min=`echo $min_wx_version | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` req_rev=`echo $min_wx_version | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` proper_version=`expr \ $v_maj \> $req_maj \| \ $v_maj \= $req_maj \& \ $v_min \> $req_min \| \ $v_maj \= $req_maj \& \ $v_min \= $req_min \& \ $v_rev \>= $req_rev` if test "$proper_version" = "1"; then { echo "$as_me:$LINENO: result: ok (found $wx_version)" >&5 echo "${ECHO_T}ok (found $wx_version)" >&6; } else { { echo "$as_me:$LINENO: error: sorry, found $wx_version" >&5 echo "$as_me: error: sorry, found $wx_version" >&2;} { (exit 1); exit 1; }; } fi WX_CXXFLAGS=`$WXCONFIG --cxxflags` WX_LIBS=`$WXCONFIG --libs` else # Die hard, with a vengeance! echo "#############################################" echo "# Sorry, wxWidgets is required to build. #" echo "# You can download it from: #" echo "# http://www.wxwidgets.org/ #" echo "#############################################" exit 1 fi # Using '--disable-nls' removes the compilation of translation stuff turn_on_nls="yes" # Check whether --enable-nls was given. if test "${enable_nls+set}" = set; then enableval=$enable_nls; turn_on_nls="$enableval" else turn_on_nls="yes" fi if test "$turn_on_nls" = "yes"; then cat >>confdefs.h <<\_ACEOF #define ENABLE_NLS 1 _ACEOF NLS_OBJS="lang.o" NLS_PARSERS="lang." fi # Using '--enable-langdialog' turns on the LangDialog use_langdialog="no" # Check whether --enable-langdialog was given. if test "${enable_langdialog+set}" = set; then enableval=$enable_langdialog; use_langdialog="$enableval" else use_langdialog="no" fi if test "$use_langdialog" = "yes"; then if test "$turn_on_nls" = "yes"; then NLS_OBJS="$NLS_OBJS langdialog.o" else echo "###" echo "### ERROR: The language selection dialog (LangDialog)" echo "### requires NLS. Please don't use --disable-nls." echo "###" exit 1 fi else cat >>confdefs.h <<\_ACEOF #define LANG_DIALOG_IS_DISABLED 1 _ACEOF fi # Using '--with-dev' changes compile-time flags to be more strict turn_on_dev="no" # Check whether --with-dev was given. if test "${with_dev+set}" = set; then withval=$with_dev; turn_on_dev="yes" EXTRA_CFLAGS='-Wall \ -Wpointer-arith -Werror -ggdb'; EXTRA_PROGS='unit_test chrom' cat >>confdefs.h <<\_ACEOF #define GT_WITH_DEV 1 _ACEOF fi # Using '--with-prof' enables profiling turn_on_prof="no" # Check whether --with-prof was given. if test "${with_prof+set}" = set; then withval=$with_prof; turn_on_prof="yes" EXTRA_CFLAGS="$EXTRA_CFLAGS -g -pg" EXTRA_LDFLAGS="-g -pg" fi # Write stuff to Makefiles ac_config_files="$ac_config_files GNUmakefile src/GNUmakefile graphthing.1" 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_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( *) $as_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 test "x$cache_file" != "x/dev/null" && { echo "$as_me:$LINENO: updating cache $cache_file" >&5 echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 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= 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=`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. ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' 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 # PATH needs CR # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false 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.) as_nl=' ' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. 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 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. 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 # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. 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" || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi 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 fi echo >conf$$.file 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 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=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # Find out whether ``test -x'' works. Don't use a zero-byte file, as # systems may use methods other than mode bits to determine executability. cat >conf$$.file <<_ASEOF #! /bin/sh exit 0 _ASEOF chmod +x conf$$.file if test -x conf$$.file >/dev/null 2>&1; then as_executable_p="test -x" else as_executable_p=: fi rm -f conf$$.file # 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 # 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 GraphThing $as_me 1.3.2, which was generated by GNU Autoconf 2.60. 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 cat >>$CONFIG_STATUS <<_ACEOF # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ GraphThing config.status 1.3.2 configured by $0, generated by GNU Autoconf 2.60, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2006 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' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If no file are specified by the user, then we need to provide default # value. By we need to know if files were specified by the user. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; 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 ) echo "$ac_cs_version"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header { echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; };; --help | --hel | -h ) echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) { echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *) ac_config_targets="$ac_config_targets $1" 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 if \$ac_cs_recheck; then echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 CONFIG_SHELL=$SHELL export CONFIG_SHELL exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h" ;; "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;; "src/GNUmakefile") CONFIG_FILES="$CONFIG_FILES src/GNUmakefile" ;; "graphthing.1") CONFIG_FILES="$CONFIG_FILES graphthing.1" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason 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= trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } # # Set up the sed scripts for CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h if test -n "$CONFIG_FILES"; then _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF SHELL!$SHELL$ac_delim PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim PACKAGE_NAME!$PACKAGE_NAME$ac_delim PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim PACKAGE_STRING!$PACKAGE_STRING$ac_delim PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim exec_prefix!$exec_prefix$ac_delim prefix!$prefix$ac_delim program_transform_name!$program_transform_name$ac_delim bindir!$bindir$ac_delim sbindir!$sbindir$ac_delim libexecdir!$libexecdir$ac_delim datarootdir!$datarootdir$ac_delim datadir!$datadir$ac_delim sysconfdir!$sysconfdir$ac_delim sharedstatedir!$sharedstatedir$ac_delim localstatedir!$localstatedir$ac_delim includedir!$includedir$ac_delim oldincludedir!$oldincludedir$ac_delim docdir!$docdir$ac_delim infodir!$infodir$ac_delim htmldir!$htmldir$ac_delim dvidir!$dvidir$ac_delim pdfdir!$pdfdir$ac_delim psdir!$psdir$ac_delim libdir!$libdir$ac_delim localedir!$localedir$ac_delim mandir!$mandir$ac_delim DEFS!$DEFS$ac_delim ECHO_C!$ECHO_C$ac_delim ECHO_N!$ECHO_N$ac_delim ECHO_T!$ECHO_T$ac_delim LIBS!$LIBS$ac_delim build_alias!$build_alias$ac_delim host_alias!$host_alias$ac_delim target_alias!$target_alias$ac_delim GT_VERSION!$GT_VERSION$ac_delim CC!$CC$ac_delim CFLAGS!$CFLAGS$ac_delim LDFLAGS!$LDFLAGS$ac_delim CPPFLAGS!$CPPFLAGS$ac_delim ac_ct_CC!$ac_ct_CC$ac_delim EXEEXT!$EXEEXT$ac_delim OBJEXT!$OBJEXT$ac_delim CXX!$CXX$ac_delim CXXFLAGS!$CXXFLAGS$ac_delim ac_ct_CXX!$ac_ct_CXX$ac_delim CPP!$CPP$ac_delim GREP!$GREP$ac_delim EGREP!$EGREP$ac_delim YACC!$YACC$ac_delim YFLAGS!$YFLAGS$ac_delim LEX!$LEX$ac_delim LEXLIB!$LEXLIB$ac_delim LEX_OUTPUT_ROOT!$LEX_OUTPUT_ROOT$ac_delim INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim INSTALL_DATA!$INSTALL_DATA$ac_delim SET_MAKE!$SET_MAKE$ac_delim LN_S!$LN_S$ac_delim unamepath!$unamepath$ac_delim ifGNUmake!$ifGNUmake$ac_delim WXCONFIG!$WXCONFIG$ac_delim WX_CXXFLAGS!$WX_CXXFLAGS$ac_delim WX_LIBS!$WX_LIBS$ac_delim NLS_OBJS!$NLS_OBJS$ac_delim NLS_PARSERS!$NLS_PARSERS$ac_delim EXTRA_CFLAGS!$EXTRA_CFLAGS$ac_delim EXTRA_PROGS!$EXTRA_PROGS$ac_delim EXTRA_LDFLAGS!$EXTRA_LDFLAGS$ac_delim LIBOBJS!$LIBOBJS$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 73; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` if test -n "$ac_eof"; then ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` ac_eof=`expr $ac_eof + 1` fi cat >>$CONFIG_STATUS <<_ACEOF cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof /@[a-zA-Z_][a-zA-Z_0-9]*@/!b end _ACEOF sed ' s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g s/^/s,@/; s/!/@,|#_!!_#|/ :n t n s/'"$ac_delim"'$/,g/; t s/$/\\/; p N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n ' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF :end s/|#_!!_#|//g CEOF$ac_eof _ACEOF # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/ s/:*\${srcdir}:*/:/ s/:*@srcdir@:*/:/ s/^\([^=]*=[ ]*\):*/\1/ s/:*$// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF fi # test -n "$CONFIG_FILES" for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 echo "$as_me: error: Invalid tag $ac_tag." >&2;} { (exit 1); exit 1; }; };; :[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="$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 || { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 echo "$as_me: error: cannot find input file: $ac_f" >&2;} { (exit 1); exit 1; }; };; esac ac_file_inputs="$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 "`IFS=: echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} fi case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin";; 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 || 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" case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`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 || 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" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`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 _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # 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= case `sed -n '/datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p ' $ac_file_inputs` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF 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 sed "$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s&@configure_input@&$configure_input&;t t s&@top_builddir@&$ac_top_builddir_sub&;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 $ac_datarootdir_hack " $ac_file_inputs | sed -f "$tmp/subs-1.sed" >$tmp/out test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&5 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 "$tmp/stdin" case $ac_file in -) cat "$tmp/out"; rm -f "$tmp/out";; *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; esac ;; :H) # # CONFIG_HEADER # _ACEOF # Transform confdefs.h into a sed script `conftest.defines', that # substitutes the proper values into config.h.in to produce config.h. rm -f conftest.defines conftest.tail # First, append a space to every undef/define line, to ease matching. echo 's/$/ /' >conftest.defines # Then, protect against being on the right side of a sed subst, or in # an unquoted here document, in config.status. If some macros were # called several times there might be several #defines for the same # symbol, which is useless. But do not sort them, since the last # AC_DEFINE must be honored. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* # These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where # NAME is the cpp macro being defined, VALUE is the value it is being given. # PARAMS is the parameter list in the macro definition--in most cases, it's # just an empty string. ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*' ac_dB='\\)[ (].*,\\1define\\2' ac_dC=' ' ac_dD=' ,' uniq confdefs.h | sed -n ' t rset :rset s/^[ ]*#[ ]*define[ ][ ]*// t ok d :ok s/[\\&,]/\\&/g s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p ' >>conftest.defines # Remove the space that was appended to ease matching. # Then 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. # (The regexp can be short, since the line contains either #define or #undef.) echo 's/ $// s,^[ #]*u.*,/* & */,' >>conftest.defines # Break up conftest.defines: ac_max_sed_lines=50 # First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1" # Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2" # Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1" # et cetera. ac_in='$ac_file_inputs' ac_out='"$tmp/out1"' ac_nxt='"$tmp/out2"' while : do # Write a here document: cat >>$CONFIG_STATUS <<_ACEOF # First, check the format of the line: cat >"\$tmp/defines.sed" <<\\CEOF /^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def /^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def b :def _ACEOF sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS echo 'CEOF sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail grep . conftest.tail >/dev/null || break rm -f conftest.defines mv conftest.tail conftest.defines done rm -f conftest.defines conftest.tail echo "ac_result=$ac_in" >>$CONFIG_STATUS cat >>$CONFIG_STATUS <<\_ACEOF if test x"$ac_file" != x-; then echo "/* $configure_input */" >"$tmp/config.h" cat "$ac_result" >>"$tmp/config.h" if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else rm -f $ac_file mv "$tmp/config.h" $ac_file fi else echo "/* $configure_input */" cat "$ac_result" fi rm -f "$tmp/out12" ;; esac done # for ac_tag { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi #ln -sf src/config.h config.h # Tell them about the options they have selected echo "###" if test "$turn_on_nls" = "yes"; then echo "### * Native Language Support enabled." if test "$use_langdialog" = "yes"; then echo "### (with LangDialog enabled)." else echo "### (but no LangDialog)." fi else echo "### * Native Language Support disabled." fi echo "###" # If they've turned on Developer Flags, give a warning if test "$turn_on_dev" = "yes"; then echo "###" echo "### WARNING: You have enabled Developer flags. Unless you" echo "### are a developer, you are strongly advised to" echo "### leave developer flags turned off, or you may" echo "### have problems compiling GraphThing." echo "###" fi # If they've turned on Profiling, give a warning if test "$turn_on_prof" = "yes"; then echo "###" echo "### WARNING: You have enabled Profiling. Unless you are a" echo "### developer, you are strongly advised to leave" echo "### profiling turned off, or you may have problems" echo "### compiling or running GraphThing." echo "###" fi echo "##################################################" echo " GraphThing is now configured. Simply type... " echo " $_cv_gnu_make_command " echo " ... and GraphThing will be compiled. " echo "##################################################" graphthing-1.3.2/configure.in0000644000076500007650000001125310504070051016447 0ustar dsymondsdsymonds# script for autoconf AC_INIT([GraphThing],[1.3.2]) AC_PREREQ(2.53) AC_CONFIG_SRCDIR(src/graph.h) AC_CONFIG_HEADER(src/config.h) AC_DEFINE_UNQUOTED(GT_VERSION, "$PACKAGE_VERSION") AC_SUBST(GT_VERSION) # Check out C++ compiler AC_PROG_CC AC_PROG_CXX AC_CXX_NAMESPACES AC_C_PROTOTYPES # TODO: Check for PROTOTYPES being defined AC_C_STRINGIZE if test $ac_cv_c_stringize != yes; then AC_MSG_ERROR([no ANSI stringizing operator]) fi AC_CXX_BOOL AC_CXX_EXCEPTIONS AC_CXX_HAVE_SSTREAM AC_CXX_HAVE_STD AC_CXX_HAVE_STL AC_CXX_MEMBER_CONSTANTS # Other programs AC_PROG_YACC if test "$YACC" != "bison -y"; then AC_MSG_ERROR([I'd much prefer to use GNU bison]) fi AC_PROG_LEX if test "$LEX" != "flex"; then AC_MSG_ERROR([I'd much prefer to use GNU flex]) fi AC_PROG_INSTALL AC_PROG_MAKE_SET AC_PROG_LN_S AC_PATH_PROG(unamepath, uname) if test "x$unamepath" = "x"; then system="unknown" else AC_MSG_CHECKING(system type) system=`$unamepath -s` AC_MSG_RESULT($system) if test "$system" = "Linux"; then AC_DEFINE(USING_LINUX) fi if test "$system" = "FreeBSD"; then AC_DEFINE(USING_FREEBSD) fi if test "$system" = "Darwin"; then AC_DEFINE(USING_OSX) fi fi # Check for needed headers AC_CHECK_HEADERS([math.h stdio.h stdlib.h string.h time.h unistd.h], [], [exit]) # Check for maths library AC_CHECK_LIB(m, atan2, , AC_MSG_ERROR([Missing maths library (-lm)])) # Check for GNU make CHECK_GNU_MAKE if test "x$_cv_gnu_make_command" = "x"; then echo "#############################################" echo "# Sorry, GNU Make is required to build. #" echo "#############################################" exit 1 fi # Check for wxWidgets AM_PATH_WXWIDGETS(2.6.1, , exit) # Using '--disable-nls' removes the compilation of translation stuff turn_on_nls="yes" AC_ARG_ENABLE(nls, AS_HELP_STRING([--disable-nls], [Do not use Native Language Support]), [ turn_on_nls="$enableval" ], [ turn_on_nls="yes" ]) if test "$turn_on_nls" = "yes"; then AC_DEFINE(ENABLE_NLS) NLS_OBJS="lang.o" AC_SUBST(NLS_OBJS) NLS_PARSERS="lang." AC_SUBST(NLS_PARSERS) fi # Using '--enable-langdialog' turns on the LangDialog use_langdialog="no" AC_ARG_ENABLE(langdialog, AS_HELP_STRING([--enable-langdialog], [Use the language selection dialog (needs NLS)]), [ use_langdialog="$enableval" ], [ use_langdialog="no" ]) if test "$use_langdialog" = "yes"; then if test "$turn_on_nls" = "yes"; then NLS_OBJS="$NLS_OBJS langdialog.o" AC_SUBST(NLS_OBJS) else echo "###" echo "### ERROR: The language selection dialog (LangDialog)" echo "### requires NLS. Please don't use --disable-nls." echo "###" exit 1 fi else AC_DEFINE(LANG_DIALOG_IS_DISABLED) fi # Using '--with-dev' changes compile-time flags to be more strict turn_on_dev="no" AC_ARG_WITH(dev, [ --with-dev Enable developer flags], [ turn_on_dev="yes" EXTRA_CFLAGS='-Wall \ -Wpointer-arith -Werror -ggdb'; AC_SUBST(EXTRA_CFLAGS) EXTRA_PROGS='unit_test chrom' AC_SUBST(EXTRA_PROGS) AC_DEFINE(GT_WITH_DEV) ]) # Using '--with-prof' enables profiling turn_on_prof="no" AC_ARG_WITH(prof, [ --with-prof Enable profiling], [ turn_on_prof="yes" EXTRA_CFLAGS="$EXTRA_CFLAGS -g -pg" EXTRA_LDFLAGS="-g -pg" AC_SUBST(EXTRA_CFLAGS) AC_SUBST(EXTRA_LDFLAGS) ]) # Write stuff to Makefiles AC_CONFIG_FILES([GNUmakefile src/GNUmakefile graphthing.1]) AC_OUTPUT #ln -sf src/config.h config.h # Tell them about the options they have selected echo "###" if test "$turn_on_nls" = "yes"; then echo "### * Native Language Support enabled." if test "$use_langdialog" = "yes"; then echo "### (with LangDialog enabled)." else echo "### (but no LangDialog)." fi else echo "### * Native Language Support disabled." fi echo "###" # If they've turned on Developer Flags, give a warning if test "$turn_on_dev" = "yes"; then echo "###" echo "### WARNING: You have enabled Developer flags. Unless you" echo "### are a developer, you are strongly advised to" echo "### leave developer flags turned off, or you may" echo "### have problems compiling GraphThing." echo "###" fi # If they've turned on Profiling, give a warning if test "$turn_on_prof" = "yes"; then echo "###" echo "### WARNING: You have enabled Profiling. Unless you are a" echo "### developer, you are strongly advised to leave" echo "### profiling turned off, or you may have problems" echo "### compiling or running GraphThing." echo "###" fi echo "##################################################" echo " GraphThing is now configured. Simply type... " echo " $_cv_gnu_make_command " echo " ... and GraphThing will be compiled. " echo "##################################################" graphthing-1.3.2/COPYING0000644000076500007650000004312710501136235015202 0ustar dsymondsdsymonds GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19yy name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. graphthing-1.3.2/CREDITS0000644000076500007650000000241410542621045015164 0ustar dsymondsdsymondsThis is an informal list of all the people who have contributed in a significant way to GraphThing. If you feel you deserve to be on this list, and you aren't, feel free to send me an e-mail. This list is in chronological order according to the version of GraphThing that their first constribution affected. ------------------------------------------- David Symonds Creator and Primary Developer (0.0) Patrick Bernier Much early feedback (0.1) Sumit Khanna RPM packages (0.7) Redhat 8 fixes (0.7) Tilman Linneweh FreeBSD and GCC 3 fixes (0.7.1) German translation (0.7.1) Josep M. Lopez Besora Spanish translation (0.7.2) Catalan translation (0.7.3) Matteo Boccafoli Italian translation (0.9.2) Linc Davis MacOSX build (0.9.2) Ion Savin Romanian translation (0.9.5) Minimum Spanning Tree code (0.9.5) Daniel Simeone Maple export (0.9.5) Cyril Brulebois French translation (1.2) Debian packages (1.2) Christian Brown New icons and graphics (1.3) Guo Yixuan Chinese (Simplified) translation (1.3.2) graphthing-1.3.2/FeatureLog0000644000076500007650000001002510542622220016115 0ustar dsymondsdsymonds--------------------------------------------------------------- This is the feature-oriented ChangeLog for GraphThing. Key: + something added * something changed - something removed --------------------------------------------------------------- Version 1.3.2 (22 December 2006) + Chinese (Simplified) translation Version 1.3.1 (19 September 2006) * Build process fixes * 64-bit fixes + New manpage (very basic) Version 1.3 (6 September 2006) * Fixed up loading graphs from the command-line * Adjacency matrix reflects edge weights + New icons (thanks to Christian Brown ) Version 1.2.1 (12 November 2005) * Output bug fixes Version 1.2 (28 October 2005) * Major multi-lingual support fixes + French translation * Updated Catalan, Italian, Romanian and Spanish translations Version 1.1 (28 July 2005) + Network flow support and algorithms + File format update (better use of "info" block) + Experimental curved edges * Updated German translation * Quieter, improved build process (requiring GNU make) * Made parsers more permissive * Several minor bug fixes Version 1.0 (3 July 2005) + Spiffy new wxWidgets-based GUI + Chromatic index is now justified by demonstration, where possible * Updated translations * Fixed some GUI inconsistencies Version 0.9.5 (22 February 2004) + Romanian translation + Right-clicking on an edge cycles through its orientations * Made more actions undoable (clearing, loading and prefabs) + Exporter for Maple + Minimum Spanning Tree (thanks to Ion Savin ) Version 0.9.4 (15 January 2004) * Massive chromatic number optimisations for simple graphs * Unlimited undo + Edge orienting from inside GUI + Exporters for GraphML and Graphviz formats - Removed redundant pop-up menu Version 0.9.3 (18 December 2003) + Added full simple digraph support, including: digraph edge drawing and printing, with weights + Eulerian tours are constructed and demonstrated + Chromatic numbers are justified by demonstration, where possible * Large optimisations for colouring-related computations * Fixed matrix exponentiation for the A^0 case * gcc 3.2 fixes Version 0.9.2 (24 August 2003) + Italian translation * FreeBSD fix * Redraw speedup (thanks to Andrew Sampson ) + @prefix@/bin/graphthing is now a symlink to 'gt' in that directory * Added translation consistency checking Version 0.9.1 (5 March 2003) + Chromatic Index computation + Line Graph + More prefabs (Gear, Hanoi) * Several bug fixes for RedHat 7.3/gcc 2.96 Version 0.9 (18 February 2003) * Split vertex/edge editing mode * Fixed vertex renaming bug + Scrollable window for bigger graphs + Graph complements + Induced subgraphs + Swedish Chef translation Version 0.8.1 (23 January 2003) * Major chromatic polynomial bug fixed * Completed fixes for gcc 3 and RedHat 8 + More testing Version 0.8 (15 January 2003) + New progress meter for long operations + Adjacency matrix exponents + Translation definition language much more powerful * More fixes for gcc 3 * Several optimisations Version 0.7.3: (31 December 2002) * More fixes for gcc 3 and RedHat 8 + Catalan translation Version 0.7.2: (29 December 2002) * Replaced gettext usage with own translation facilities + Spanish translation Version 0.7.1: (26 October 2002) + German translation * Fixes for FreeBSD and gcc 3 Version 0.7: (3 April 2002) * Complete rewrite in C++ + Platonic prefabs Version 0.6: (6 October 2001) + Vertex and edge properties made editable Version 0.5: (7 August 2001) + Diameter and radius computation * Printing started + Some tooltips Version 0.4: (4 August 2001) * Fixed nasty chromatic polynomial bug (base case problem) Version 0.3: (30 July 2001) * File format changed * Prefab dialogs tweaked + More prefabs (Complete Bipartite) Version 0.2: (28 July 2001) + Connect-and-select interface (Ctrl+Shift) + More prefabs (Ladder, Petersen) * Massive acceleration for chromatic polynomials * Adjusted naming of new vertices * Many optimisations Version 0.1: (22 July 2001) * Initial release graphthing-1.3.2/GNUmakefile.in0000644000076500007650000000503710504067642016634 0ustar dsymondsdsymonds@SET_MAKE@ PACKAGE = graphthing VERSION = @PACKAGE_VERSION@ SUBDIRS = src prefix = @prefix@ DISTFILES = COPYING CREDITS FeatureLog GNUmakefile.in README TODO \ graphthing.1.in \ aclocal.m4 configure configure.in install-sh mkinstalldirs all: @dlist='$(SUBDIRS)' ; \ for subdir in $$dlist ; do \ (cd $$subdir && $(MAKE) all) ; \ done @echo "---------------------------------------------------" @echo " GraphThing is now compiled. It can be executed" @echo " by running it directly as:" @echo " src/graphthing@EXEEXT@" @echo " or by installing it:" @echo " $(MAKE) install" @echo " Installing may require superuser privileges." @echo "" @echo " Alternatively, for Mac OSX, create an App bundle:" @echo " $(MAKE) bundle" @echo "---------------------------------------------------" install: @dlist='$(SUBDIRS)' ; \ for subdir in $$dlist ; do \ (cd $$subdir && $(MAKE) install) ; \ done @INSTALL@ -d @mandir@/man1/ @INSTALL@ -c -m 644 graphthing.1 @mandir@/man1/ @echo "---------------------------------------------------" @echo " GraphThing is now installed. It can be executed" @echo " by running:" @echo " @prefix@/bin/graphthing@EXEEXT@" @echo "---------------------------------------------------" # For Mac OSX bundle: @mkdir -p GraphThing.app/Contents/MacOS @cp src/graphthing@EXEEXT@ GraphThing.app/Contents/MacOS/GraphThing @ls -ld GraphThing.app # For Win32 zipdir = $(PACKAGE)-$(VERSION) zip: rm -rf $(zipdir) mkdir $(zipdir) for file in COPYING CREDITS FeatureLog README ; do \ cat $$file | unix2dos > $(zipdir)/$$file.txt; \ done cp -p src/graphthing.exe $(zipdir) strip $(zipdir)/graphthing.exe zip -9r $(zipdir)-win32.zip $(zipdir) rm -rf $(zipdir) clean: @dlist='$(SUBDIRS)' ; \ for subdir in $$dlist ; do \ (cd $$subdir && $(MAKE) clean) ; \ done distclean: @dlist='$(SUBDIRS)' ; \ for subdir in $$dlist ; do \ (cd $$subdir && $(MAKE) distclean) ; \ done rm GNUmakefile graphthing.1 dep: @dlist='$(SUBDIRS)' ; \ for subdir in $$dlist ; do \ (cd $$subdir && $(MAKE) dep) ; \ done distdir = $(PACKAGE)-$(VERSION) dist: GNUmakefile rm -rf $(distdir) mkdir $(distdir) chmod 777 $(distdir) for file in $(DISTFILES) ; do \ ln $$file $(distdir) 2>/dev/null || \ cp -p $$file $(distdir); \ done for subdir in $(SUBDIRS) ; do \ mkdir $(distdir)/$$subdir || exit 1; \ chmod 777 $(distdir)/$$subdir; \ (cd $$subdir && $(MAKE) $@) || exit 1; \ done tar zchf $(distdir).tar.gz $(distdir) gunzip -c $(distdir).tar.gz | bzip2 -9 > $(distdir).tar.bz2 rm -rf $(distdir) graphthing-1.3.2/graphthing.1.in0000755000076500007650000000132210501136235016763 0ustar dsymondsdsymonds.TH GraphThing 1 Version\ @PACKAGE_VERSION@ .SH NAME GraphThing - graph creation, manipulation and study tool .SH SYNOPSIS .B "graphthing" [\fIfile\fP] .SH DESCRIPTION .PP .I GraphThing is a tool that allows you to create, manipulate and study graphs. These "graphs" are mathematical objects that describe relationships between sets; they are not 2D plots, charts, or anything similar to that. .SH OPTIONS .PP .TP 8 .B "\fIfile\fP" This argument allows the user to specify a file to load automatically. .SH ENVIRONMENT .PP .TP 8 .B LANGUAGE LC_ALL LANG Specify a localisation. These variables are tested in this order; the first one to contain a known localisation is taken. .SH AUTHORS David Symonds graphthing-1.3.2/install-sh0000755000076500007650000001272110501136235016147 0ustar dsymondsdsymonds#! /bin/sh # # install - install a program, script, or datafile # This comes from X11R5 (mit/util/scripts/install.sh). # # Copyright 1991 by the Massachusetts Institute of Technology # # Permission to use, copy, modify, distribute, and sell this software and its # documentation for any purpose is hereby granted without fee, provided that # the above copyright notice appear in all copies and that both that # copyright notice and this permission notice appear in supporting # documentation, and that the name of M.I.T. not be used in advertising or # publicity pertaining to distribution of the software without specific, # written prior permission. M.I.T. makes no representations about the # suitability of this software for any purpose. It is provided "as is" # without express or implied warranty. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. It can only install one file at a time, a restriction # shared with many OS's install programs. # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" # put in absolute paths if you don't have them in your path; or use env. vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" transformbasename="" transform_arg="" instcmd="$mvprog" chmodcmd="$chmodprog 0755" chowncmd="" chgrpcmd="" stripcmd="" rmcmd="$rmprog -f" mvcmd="$mvprog" src="" dst="" dir_arg="" while [ x"$1" != x ]; do case $1 in -c) instcmd="$cpprog" shift continue;; -d) dir_arg=true shift continue;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; -s) stripcmd="$stripprog" shift continue;; -t=*) transformarg=`echo $1 | sed 's/-t=//'` shift continue;; -b=*) transformbasename=`echo $1 | sed 's/-b=//'` shift continue;; *) if [ x"$src" = x ] then src=$1 else # this colon is to work around a 386BSD /bin/sh bug : dst=$1 fi shift continue;; esac done if [ x"$src" = x ] then echo "install: no input file specified" exit 1 else true fi if [ x"$dir_arg" != x ]; then dst=$src src="" if [ -d $dst ]; then instcmd=: else instcmd=mkdir fi else # Waiting for this to be detected by the "$instcmd $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if [ -f $src -o -d $src ] then true else echo "install: $src does not exist" exit 1 fi if [ x"$dst" = x ] then echo "install: no destination specified" exit 1 else true fi # If destination is a directory, append the input filename; if your system # does not like double slashes in filenames, you may need to add some logic if [ -d $dst ] then dst="$dst"/`basename $src` else true fi fi ## this sed command emulates the dirname command dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` # Make sure that the destination directory exists. # this part is taken from Noah Friedman's mkinstalldirs script # Skip lots of stat calls in the usual case. if [ ! -d "$dstdir" ]; then defaultIFS=' ' IFS="${IFS-${defaultIFS}}" oIFS="${IFS}" # Some sh's can't handle IFS=/ for some reason. IFS='%' set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` IFS="${oIFS}" pathcomp='' while [ $# -ne 0 ] ; do pathcomp="${pathcomp}${1}" shift if [ ! -d "${pathcomp}" ] ; then $mkdirprog "${pathcomp}" else true fi pathcomp="${pathcomp}/" done fi if [ x"$dir_arg" != x ] then $doit $instcmd $dst && if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi else # If we're going to rename the final executable, determine the name now. if [ x"$transformarg" = x ] then dstfile=`basename $dst` else dstfile=`basename $dst $transformbasename | sed $transformarg`$transformbasename fi # don't allow the sed command to completely eliminate the filename if [ x"$dstfile" = x ] then dstfile=`basename $dst` else true fi # Make a temp file name in the proper directory. dsttmp=$dstdir/#inst.$$# # Move or copy the file name to the temp name $doit $instcmd $src $dsttmp && trap "rm -f ${dsttmp}" 0 && # and set any options; do chmod last to preserve setuid bits # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $instcmd $src $dsttmp" command. if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && # Now rename the file to the real destination. $doit $rmcmd -f $dstdir/$dstfile && $doit $mvcmd $dsttmp $dstdir/$dstfile fi && exit 0 graphthing-1.3.2/mkinstalldirs0000755000076500007650000000132010501136235016742 0ustar dsymondsdsymonds#! /bin/sh # mkinstalldirs --- make directory hierarchy # Author: Noah Friedman # Created: 1993-05-16 # Public domain # $Id: mkinstalldirs,v 1.1 2002/04/05 01:06:09 ds Exp $ errstatus=0 for file do set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` shift pathcomp= for d do pathcomp="$pathcomp$d" case "$pathcomp" in -* ) pathcomp=./$pathcomp ;; esac if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" mkdir "$pathcomp" || lasterr=$? if test ! -d "$pathcomp"; then errstatus=$lasterr fi fi pathcomp="$pathcomp/" done done exit $errstatus # mkinstalldirs ends here graphthing-1.3.2/README0000644000076500007650000000630310542621077015032 0ustar dsymondsdsymonds-------------------------------------------------------------------------- GraphThing 1.3.2 (c) 2001-2006 David Symonds -------------------------------------------------------------------------- (See bottom of this file for copyright notice) This is GraphThing, a graph theory tool, written by David Symonds. You can email me at . INSTALLATION GraphThing requires wxWidgets 2.6.1 (or later). [http://www.wxwidgets.org] To build GraphThing, you'll also need GNU make, bison and flex. Run the following commands: * ./configure * make [ or "gmake" ] and optionally: * make install [ as root ] If you don't run "make install", you can execute the binary from the src/ directory. It is not uncommon for the configure script to be unable to find your wxWidgets installation. Pass it the full path to the wx-config script, as in: ./configure --with-wx-config=/usr/local/bin/wx-config The configuration script takes all the usual options. Use ./configure --help for a complete list. If you want to use an alternative C++ compiler, run the command CXX=/usr/g++295/bin/g++ ./configure where "/usr/g++295/bin/g++" is the command in question. OPERATION Most of the operations are intuitive, but there are a couple of confusing things: In Vertex Mode: * To create a vertex: Double click on a blank area * To move a vertex: Click and drag it * To select multiple vertices: Hold shift while clicking * To modify vertex properties: Double click on the vertex * To delete a vertex: Select it and press the Delete key In Edge Mode: * To create an edge: Click on first vertex, then click on second vertex * To select multiple edges: Hold shift while clicking * To modify edge properties: Double click on the edge * To delete an edge: Select it and press the Delete key INTERNATIONALISATION GraphThing includes some translations of the phrases it uses. The following languages (with their country codes) are listed below. Catalan (ca) Chinese (Simplified) (zh) French (fr) German (de) Italian (it) Romanian (ro) Spanish (es) Swedish Chef (sv_CK) To select a language, GraphThing inspects the following environment variables in order. The first one that is recognised as a valid language code is selected as the language to use. LANGUAGE LC_ALL LANG So, if you want GraphThing to be in German, simply start it with the command (in bash): LANGUAGE=de gt -------------------------------------------------------------------------- This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2, as published by the Free Software Foundation. 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 -------------------------------------------------------------------------- graphthing-1.3.2/src/0000777000076500007650000000000010542622566014747 5ustar dsymondsdsymondsgraphthing-1.3.2/src/aboutbox.cc0000644000076500007650000000355510501136234017070 0ustar dsymondsdsymonds// // aboutbox.cc // #include "wx/dialog.h" #include "wx/sizer.h" #include "wx/stattext.h" #include "wx/string.h" #include #include "aboutbox.h" #include "config.h" #include "lang.h" #ifdef ENABLE_NLS #include "wx/bitmap.h" #include "wx/bmpbuttn.h" #include "logo_sc.xpm" #endif AboutBox::AboutBox (wxWindow *parent) : wxDialog (parent, -1, _("About..."), wxDefaultPosition) { wxString msg; wxBoxSizer *vbox = new wxBoxSizer (wxVERTICAL); vbox->Add (new wxStaticText (this, -1, wxT("G r a p h T h i n g")), 0, wxALL | wxALIGN_CENTER, 10); msg << _("Version") << wxT(" " GT_VERSION); vbox->Add (new wxStaticText (this, -1, msg), 0, wxALL | wxALIGN_CENTER, 0); vbox->Add (new wxStaticText (this, -1, wxT("(c) 2001-2006 David Symonds")), 0, wxALL | wxALIGN_CENTER, 0); msg.Clear (); msg << _( "This program is free software; you can redistribute\n" "it and/or modify it under the terms of the GNU\n" "General Public License, version 2, as published by\n" "the Free Software Foundation.\n\n" "This program is distributed in the hope that it will\n" "be useful, but WITHOUT ANY WARRANTY; without even\n" "the implied warranty of MERCHANTABILITY or FITNESS\n" "FOR A PARTICULAR PURPOSE. See the GNU General\n" "Public License for more details."); wxStaticText *txt = new wxStaticText (this, -1, msg); vbox->Add (txt, 0, wxALL, 10); wxSizer *btns; #ifdef ENABLE_NLS if (translator->get_language () != SwedishChef) #endif btns = CreateStdDialogButtonSizer (wxOK); #ifdef ENABLE_NLS else { btns = new wxBoxSizer (wxHORIZONTAL); wxBitmapButton *btn = new wxBitmapButton (this, wxID_OK, wxBitmap (logo_sc_xpm)); btn->SetToolTip (wxT("Bork Bork Bork!")); btns->Add (btn); //btns->Layout (); } #endif vbox->Add (btns, 0, wxALL | wxEXPAND, 10); SetSizer (vbox); vbox->SetSizeHints (this); vbox->Fit (this); vbox->Layout (); } graphthing-1.3.2/src/aboutbox.h0000644000076500007650000000034610501136234016725 0ustar dsymondsdsymonds// // aboutbox.h // #ifndef __ABOUTBOX_H__ #define __ABOUTBOX_H__ #include "wx/dialog.h" class AboutBox : public wxDialog { private: //DECLARE_EVENT_TABLE() public: AboutBox (wxWindow *parent); }; #endif // __ABOUTBOX_H__ graphthing-1.3.2/src/big_circle.gt0000644000076500007650000000200610501136234017342 0ustar dsymondsdsymondsinfo { } vertex "A" at (249,54) vertex "B" at (290,63) vertex "C" at (325,86) vertex "D" at (348,121) vertex "E" at (356,162) vertex "F" at (348,204) vertex "G" at (325,239) vertex "H" at (290,262) vertex "I" at (249,270) vertex "J" at (207,262) vertex "K" at (172,239) vertex "L" at (149,204) vertex "M" at (140,163) vertex "N" at (149,121) vertex "O" at (172,86) vertex "P" at (207,63) edge "A" -- "B" edge "B" -- "C" edge "C" -- "D" edge "D" -- "E" edge "E" -- "F" edge "F" -- "G" edge "G" -- "H" edge "H" -- "I" edge "I" -- "J" edge "J" -- "K" edge "K" -- "L" edge "L" -- "M" edge "M" -- "N" edge "N" -- "O" edge "O" -- "P" edge "P" -- "A" edge "A" -- "I" edge "J" -- "P" edge "B" -- "H" edge "F" -- "L" edge "M" -- "E" edge "D" -- "N" edge "A" -- "L" edge "F" -- "A" edge "B" -- "L" edge "K" -- "B" edge "C" -- "K" edge "C" -- "L" edge "C" -- "J" edge "D" -- "J" edge "K" -- "D" edge "E" -- "J" edge "P" -- "F" edge "F" -- "O" edge "G" -- "O" edge "P" -- "G" edge "G" -- "N" edge "H" -- "O" edge "N" -- "H" edge "H" -- "M" graphthing-1.3.2/src/canvas.cc0000644000076500007650000002665210501136234016523 0ustar dsymondsdsymonds// // canvas.cc // #include "wx/brush.h" #include "wx/colour.h" #include "wx/dc.h" #include "wx/dcclient.h" #include "wx/font.h" #include "wx/gdicmn.h" #include "wx/pen.h" #include "wx/scrolwin.h" #include "wx/textdlg.h" #include "canvas.h" #include "edge.h" #include "graph.h" #include "gui.h" #include "lang.h" #include "paramdialog.h" #include "vertex.h" BEGIN_EVENT_TABLE(Canvas, wxScrolledWindow) EVT_PAINT (Canvas::OnPaint) EVT_ERASE_BACKGROUND(Canvas::OnEraseBackground) EVT_LEFT_DOWN (Canvas::OnClick) EVT_LEFT_DCLICK (Canvas::OnClick) EVT_RIGHT_DOWN (Canvas::OnClick) EVT_MOTION (Canvas::OnMouseMove) EVT_CHAR (Canvas::OnKeyPress) END_EVENT_TABLE() void Canvas::draw (wxDC &dc, Vertex *v) { int r = Canvas::vertex_radius; wxColour col = black; if (v->selected) { unsigned int idx = v->selection_colour % selection_colours.size (); col = selection_colours[idx]; } dc.SetBrush (wxBrush (col)); dc.SetPen (wxPen (col)); dc.DrawCircle (v->x, v->y, r); if (do_labels) { dc.SetFont (*bold_font); dc.SetTextForeground (col); dc.DrawText (v->label, v->x + r, v->y - 2 * r); } } void Canvas::draw (wxDC &dc, Edge *e, bool curved) { double dx, dy, r = Canvas::vertex_radius; double theta; wxColour col = black; if (e->selected) { unsigned int idx = e->selection_colour % selection_colours.size (); col = selection_colours[idx]; } wxPen pen (col, Canvas::edge_width); pen.SetCap (wxCAP_BUTT); pen.SetJoin (wxJOIN_MITER); dc.SetPen (pen); dc.SetBrush (wxBrush (col)); theta = atan2 (e->w->y - e->v->y, e->w->x - e->v->x); dx = r * cos (theta); dy = r * sin (theta); if (e->v->y == e->w->y) // horizontal line (dy = 0) dy = 0; else if (e->v->x == e->w->x) // vertical line (dx = 0) dx = 0; if (!curved) dc.DrawLine (int (e->v->x + dx), int (e->v->y + dy), int (e->w->x - dx), int (e->w->y - dy)); else { dc.SetBrush (wxBrush (white)); // TODO: get this right! double cx, cy; // mid-spline control point cx = (e->v->x + e->w->x) / 2 - 2 * dy; cy = (e->v->y + e->w->y) / 2 - 2 * dx; dc.DrawSpline (int (e->v->x + dx), int (e->v->y + dy), int (cx), int (cy), int (e->w->x - dx), int (e->w->y - dy)); dc.SetBrush (wxBrush (col)); } if (e->directed) { wxPoint tri[3]; double scale = 0.7; tri[0] = wxPoint (0, 0); tri[1] = wxPoint (int (scale * (dy - dx)), int (-scale * (dx + dy))); tri[2] = wxPoint (int (-scale * (dx + dy)), int (scale * (dx - dy))); dc.DrawPolygon (3, tri, int (e->w->x - dx), int (e->w->y - dy)); } if (do_weights) { wxString str; if (!do_flows) str = wxString::Format (wxT("%i"), e->weight); else str = wxString::Format (wxT("%i/%i"), e->flow, e->weight); double rx, ry; wxCoord w, h; dc.SetFont (*normal_font); dc.GetTextExtent (str, &w, &h); rx = (e->v->x + e->w->x) / 2 + dy; ry = (e->v->y + e->w->y) / 2 - dx; if (curved) { rx += dy; ry -= dy; } if (theta < 0) rx += w * sin (theta); ry -= h / 2; if (fabs (theta) > M_PI_2) ry -= dx / 2; dc.SetTextForeground (col); dc.DrawText (str, int (rx), int (ry)); } } Vertex *Canvas::findVertex (int x, int y) const { Graph::v_const_iterator vit; int r2 = Canvas::vertex_radius * Canvas::vertex_radius; Graph *g = *gg; for (vit = g->v_begin (); vit != g->v_end (); ++vit) { int dx = x - (*vit)->x, dy = y - (*vit)->y; if ((dx * dx + dy * dy) < r2) return *vit; } return 0; } Edge *Canvas::findEdge (int x, int y) const { Graph::e_const_iterator eit; double rad = Canvas::vertex_radius; double r2 = rad * rad; double best_dist = 0; // actually, best distance squared Edge *best_edge = 0; Graph *g = *gg; // find straight-line edge closest to (x,y) for (eit = g->e_begin (); eit != g->e_end (); ++eit) { double x1, y1, x2, y2, s2, num, d2; x1 = (*eit)->v->x; y1 = (*eit)->v->y; x2 = (*eit)->w->x; y2 = (*eit)->w->y; if (x1 < x2) { if ((x < (x1 - rad)) || ((x2 + rad) < x)) continue; } else if (x2 < x1) { if ((x < (x2 - rad)) || ((x1 + rad) < x)) continue; } if (y1 < y2) { if ((y < (y1 - rad)) || ((y2 + rad) < y)) continue; } else if (y2 < y1) { if ((y < (y2 - rad)) || ((y1 + rad) < y)) continue; } s2 = (x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1); if (s2 < 0.01) continue; // degenerate edge num = (y2 - y1) * (x - x1) - (x2 - x1) * (y - y1); d2 = num * num / s2; if ((d2 < best_dist) || !best_edge) { best_edge = *eit; best_dist = d2; } } // still only accept it if within a vertex of (x,y) if (best_dist <= r2) return best_edge; return 0; } void Canvas::cb_Properties () { Edge *e; Graph *g = *gg; Vertex *v; v = g->v_selected_head; e = g->e_selected_head; if (v && !e) { // Vertex Properties wxString str = wxGetTextFromUser (_("Label:"), _("Vertex Properties"), v->label, gui); if (str.IsEmpty ()) return; // Handle duplicate labels while (1) { Vertex *f = g->find (str); if (!f || (f == v)) break; str += wxT("-dup"); } if (str != v->label) { gui->undoableAction (_("Rename vertex")); g->rename (v, str); redraw (); } } else if (e) { // Edge Properties ParamDialogEdge dlg (gui, _("Edge Properties"), e); if (dlg.ShowModal () == wxID_CANCEL) return; int curr_dir = e->directed ? 1 : 0; int new_wt = dlg.GetWeight (), new_dir = dlg.GetDirection (); int new_flow = dlg.GetFlow (); if ((new_wt == e->weight) && (new_dir == curr_dir)) { if (e->flow != new_flow) { e->flow = new_flow; redraw (); } return; } if (new_wt == e->weight) gui->undoableAction (_("Change edge direction")); else if (new_dir == curr_dir) gui->undoableAction (_("Change edge weight")); else gui->undoableAction (_("Change edge weight and direction")); e->weight = new_wt; if (new_dir == 0) e->directed = false; else if (new_dir == 1) e->directed = true; else { e->directed = true; Vertex *tmp = e->v; e->v = e->w; e->w = tmp; } redraw (); } } Canvas::Canvas (GTFrame *gui, Graph **g) : wxScrolledWindow (gui, -1, wxPoint (0, 0), wxDefaultSize, // 0), wxNO_FULL_REPAINT_ON_RESIZE | wxCLIP_CHILDREN), gui (gui), gg (g) { vertex_mode = true; do_labels = true; do_weights = do_flows = false; white = wxColour (255, 255, 255); black = wxColour (0, 0, 0); // Selection colours const char *cols[] = { "red", "blue", "magenta", "green", "brown", "cyan", "black" }; for (unsigned int i = 0; i < (sizeof (cols) / sizeof (cols[0])); ++i) { wxColour col = wxTheColourDatabase->Find (wxString (cols[i], wxConvUTF8)); selection_colours.push_back (col); } red = selection_colours[0]; int pointSize = Canvas::font_height; normal_font = new wxFont (pointSize, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL); bold_font = new wxFont (pointSize, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD); SetScrollRate (10, 10); } #define USE_WXMEMORYDC #ifdef USE_WXMEMORYDC #include "wx/dcmemory.h" #endif void Canvas::OnPaint (wxPaintEvent &event) { #ifndef USE_WXMEMORYDC wxPaintDC dc (this); #else wxPaintDC dest_dc (this); int blit_width, blit_height; GetClientSize (&blit_width, &blit_height); wxBitmap bmp_blit (blit_width, blit_height); wxMemoryDC dc; dc.SelectObject (bmp_blit); #endif Graph *g = *gg; #ifndef USE_WXMEMORYDC DoPrepareDC (dc); #else DoPrepareDC (dc); DoPrepareDC (dest_dc); #endif dc.SetBackground (wxBrush (white)); dc.Clear (); Graph::e_const_iterator eit; for (eit = g->e_begin (); eit != g->e_end (); ++eit) { Edge *e = *eit; bool curved = false; if (e->directed) { if (g->find (e->w, e->v, true)) curved = true; } draw (dc, e, curved); } Graph::v_const_iterator vit; int maxx = 0, maxy = 0; for (vit = g->v_begin (); vit != g->v_end (); ++vit) { Vertex *v = *vit; draw (dc, v); if (v->x > maxx) maxx = v->x; if (v->y > maxy) maxy = v->y; } #ifdef USE_WXMEMORYDC // Blit! dest_dc.Blit (0, 0, blit_width, blit_height, &dc, 0, 0); #endif SetVirtualSize (maxx + 30, maxy + 30); } void Canvas::OnEraseBackground (wxEraseEvent &event) { wxDC *dc = event.GetDC (); dc->SetBackground (wxBrush (white)); dc->Clear (); } void Canvas::OnClick (wxMouseEvent &event) { Graph *g = *gg; Vertex *v; int m_x, m_y; bool left_click = event.LeftDown () || event.LeftDClick (), shifted = event.ShiftDown (), double_click = event.ButtonDClick (); CalcUnscrolledPosition (int (event.m_x), int (event.m_y), &m_x, &m_y); v = findVertex (m_x, m_y); // Assumptions: [lr]-click (or double click) if (vertex_mode && left_click) { if (!shifted) { // no shift key if (!double_click) { // Single click g->unselect_all (); if (v) g->select (v); redraw (); return; } else { // Double click if (v) cb_Properties (); else { gui->undoableAction (_("Add vertex")); g->add (new Vertex ("", m_x, m_y)); redraw (); } return; } } else { // shift key if (!double_click) { if (v) { v->selected ? g->unselect (v) : g->select (v); redraw (); } } return; } } else if (vertex_mode && !left_click) return; // do nothing // edge mode if (!v) { Edge *e = findEdge (m_x, m_y); if (!e) { if (left_click && !shifted) { g->unselect_all (); redraw (); } return; } // clicking on an edge if (!double_click) { // Single click if (left_click) { if (!shifted) { g->unselect_all (); g->select (e); } else { e->selected ? g->unselect (e) : g->select (e); } } else e->cycle_orientations (); } else { // Double click if (left_click) cb_Properties (); } redraw (); return; } if (!left_click) return; if (!v->selected) { Vertex *valt = g->v_selected_head; if (!valt) { g->select (v); redraw (); return; } if (!g->are_adjacent (valt, v)) { gui->undoableAction (_("Add edge")); g->add (new Edge (valt, v)); } g->unselect_all (); g->select (v); redraw (); return; } g->unselect (v); redraw (); } void Canvas::OnMouseMove (wxMouseEvent &event) { Graph *g = *gg; Vertex *v; int m_x, m_y; CalcUnscrolledPosition (int (event.m_x), int (event.m_y), &m_x, &m_y); if (event.Moving ()) { // Button not down => nothing to do motion_last_x = -1; motion_last_y = -1; return; } if (motion_last_x == -1) { // First motion event; record start only motion_last_x = m_x; motion_last_y = m_y; return; } // Move stuff for (v = g->v_selected_head; v; v = v->next) { v->x += (m_x - motion_last_x); v->y += (m_y - motion_last_y); } motion_last_x = m_x; motion_last_y = m_y; redraw (); } void Canvas::OnKeyPress (wxKeyEvent &event) { Graph *g = *gg; if (!event.HasModifiers () && (event.GetKeyCode () == WXK_DELETE)) { // delete selected objects // TODO: make this message more accurate gui->undoableAction (_("Delete objects")); Edge *prevE, *e = g->e_selected_head; while (e) { prevE = e; e = e->next; g->remove (prevE); } Vertex *prevV, *v = g->v_selected_head; while (v) { prevV = v; v = v->next; g->remove (prevV); } redraw (); return; } if (event.GetKeyCode () == ' ') { gui->toggleMode (); return; } // We don't want it - pass it back up event.Skip (); } void Canvas::redraw () { Refresh (); Update (); } void Canvas::setVertexMode (bool v_mode) { vertex_mode = v_mode; } void Canvas::setEdgeMode () { vertex_mode = false; } void Canvas::setParam (bool labels, bool weights, bool flows) { do_labels = labels; do_weights = weights; do_flows = flows; } graphthing-1.3.2/src/canvas.h0000644000076500007650000000236410501136234016357 0ustar dsymondsdsymonds// // canvas.h // #ifndef __CANVAS_H__ #define __CANVAS_H__ #include "wx/brush.h" #include "wx/colour.h" #include "wx/dc.h" #include "wx/scrolwin.h" #include class Edge; class GTFrame; // see gui.h class Graph; class Vertex; class wxFont; class Canvas : public wxScrolledWindow { private: static const int vertex_radius = 8; static const int edge_width = 2; static const int font_height = 8; GTFrame *gui; Graph **gg; bool vertex_mode; bool do_labels, do_weights, do_flows; std::vector selection_colours; wxColour white, black, red; wxFont *bold_font, *normal_font; int motion_last_x, motion_last_y; DECLARE_EVENT_TABLE() void draw (wxDC &dc, Vertex *v); void draw (wxDC &dc, Edge *e, bool curved = false); Vertex *findVertex (int x, int y) const; Edge *findEdge (int x, int y) const; void cb_Properties (); public: Canvas (GTFrame *gui, Graph **g); void OnPaint (wxPaintEvent &event); void OnEraseBackground (wxEraseEvent &event); void OnClick (wxMouseEvent &event); void OnMouseMove (wxMouseEvent &event); void OnKeyPress (wxKeyEvent &event); void redraw (); void setVertexMode (bool v_mode = true); void setEdgeMode (); void setParam (bool labels, bool weights, bool flows); }; #endif // __CANVAS_H__ graphthing-1.3.2/src/chrom.cc0000644000076500007650000000336410501136234016353 0ustar dsymondsdsymonds#include #include #include #include #include "edge.h" #include "factory.h" #include "graph.h" #include "polynomial.h" #include "vertex.h" #define RAND_SEED 109 #define VERTICES 12 // Kludge - fixes linking errors #include std::fstream *yy_gt_fs; int yy_gt_parse (void) { return 0; } int yy_gt_debug; Graph *new_graph; void setProgress (double frac) { } Graph *gen_graph (unsigned int vertices, unsigned int edges) { if ((2 * edges) > (vertices * (vertices - 1))) { std::cerr << "FATAL: Too many edges requested!\n"; return 0; } if ((2 * edges) == (vertices * (vertices - 1))) return Factory::K (vertices); Graph *g = Factory::N (vertices); while (g->num_edges () < edges) { // Pick two random vertices unsigned int n1, n2; n1 = int (double (vertices) * rand () / (RAND_MAX+1.0)); n2 = int (double (vertices) * rand () / (RAND_MAX+1.0)); if (n1 == n2) continue; //std::cerr << "[Picked (" << n1 << ", " << n2 << ")]"; Vertex *v1 = (*g)[n1], *v2 = (*g)[n2]; if (g->are_adjacent (v1, v2)) continue; g->add (new Edge (v1, v2)); } return g; } int main (void) { std::cerr << "\n\tChromatic Polynomial tester\n\n"; srand (RAND_SEED); for (unsigned int v = VERTICES; v <= VERTICES; ++v) { std::cerr << "v=" << v << ": "; for (unsigned int e = 0; e <= v*(v-1)/2; ++e) { Graph *g = gen_graph (v, e); struct timeval start_t, end_t; long total; Polynomial p; std::cerr << e << " "; gettimeofday (&start_t, 0); p = g->chromatic_polynomial (); gettimeofday (&end_t, 0); total = (end_t.tv_sec - start_t.tv_sec) * 1000 + (end_t.tv_usec - start_t.tv_usec) / 1000; std::cout << e << " " << total << "\n"; delete g; } std::cerr << "\n"; } return 0; } graphthing-1.3.2/src/config.h0000644000076500007650000000066410504070156016355 0ustar dsymondsdsymonds/* src/config.h. Generated from config.h.in by configure. */ // // config.h // #ifndef __CONFIG_H__ #define __CONFIG_H__ // GraphThing version information #define GT_VERSION "1.3.2" // was --with-dev passed to configure script? #define GT_WITH_DEV 1 // NLS stuff #define ENABLE_NLS 1 #define LANG_DIALOG_IS_DISABLED 1 // System type /* #undef USING_LINUX */ /* #undef USING_FREEBSD */ #define USING_OSX 1 #endif // __CONFIG_H__ graphthing-1.3.2/src/config.h.in0000644000076500007650000000053110501136234016750 0ustar dsymondsdsymonds// // config.h // #ifndef __CONFIG_H__ #define __CONFIG_H__ // GraphThing version information #define GT_VERSION "" // was --with-dev passed to configure script? #undef GT_WITH_DEV // NLS stuff #undef ENABLE_NLS #undef LANG_DIALOG_IS_DISABLED // System type #undef USING_LINUX #undef USING_FREEBSD #undef USING_OSX #endif // __CONFIG_H__ graphthing-1.3.2/src/depend.10000644000076500007650000000303210503344461016252 0ustar dsymondsdsymondsaboutbox.o: aboutbox.cc \ aboutbox.h config.h lang.h \ logo_sc.xpm canvas.o: canvas.cc \ canvas.h edge.h graph.h matrix.h gui.h \ undo.h lang.h config.h \ paramdialog.h \ vertex.h \ edge.o: edge.cc edge.h vertex.h \ exporter.o: exporter.cc \ config.h edge.h exporter.h graph.h \ matrix.h vertex.h factory.o: factory.cc \ edge.h factory.h graph.h matrix.h \ vertex.h fancyfileselection.o: fancyfileselection.cc \ fancyfileselection.h lang.h \ config.h graph.o: graph.cc \ config.h edge.h graph.h matrix.h \ vertex.h graph2.o: graph2.cc \ edge.h graph.h matrix.h main.h math.h \ polynomial.h vertex.h gui.o: gui.cc \ canvas.h \ config.h edge.h factory.h \ graph.h matrix.h gui.h undo.h lang.h vertex.h edge_mode.xpm \ vertex_mode.xpm logo.xpm gui_cb.o: gui_cb.cc \ aboutbox.h canvas.h \ config.h edge.h exporter.h \ factory.h fancyfileselection.h \ graph.h matrix.h gui.h \ undo.h lang.h matrixdialog.h \ paramdialog.h polynomial.h \ vertex.h main.o: main.cc \ config.h gui.h \ matrix.h undo.h lang.h math.o: math.cc math.h matrix.o: matrix.cc matrix.h matrixdialog.o: matrixdialog.cc \ graph.h matrix.h lang.h \ config.h matrixdialog.h vertex.h paramdialog.o: paramdialog.cc \ edge.h lang.h config.h \ paramdialog.h vertex.h polynomial.o: polynomial.cc math.h polynomial.h \ undo.o: undo.cc \ graph.h matrix.h undo.h vertex.o: vertex.cc \ edge.h vertex.h lang.o: lang.cc \ lang.h config.h phrases.h unit_test.o: unit_test.cc edge.h factory.h \ graph.h matrix.h polynomial.h vertex.h graphthing-1.3.2/src/dir_test.gt0000644000076500007650000000033210501136234017075 0ustar dsymondsdsymondsinfo { title = "Digraph test" } vertex "A" at (249,54) vertex "B" at (351,129) vertex "C" at (312,250) vertex "D" at (185,250) vertex "E" at (146,129) edge "A" -> "B" edge "B" -> "C" edge "C" -> "D" edge "D" -> "E" graphthing-1.3.2/src/edge.cc0000644000076500007650000000305010501136234016137 0ustar dsymondsdsymonds// // edge.cc // #include #include #include "edge.h" #include "vertex.h" Edge::Edge (Vertex *a, Vertex *b, bool dir, int wt) : v (a), w (b), flow (0), weight (wt), directed (dir), selected (false) { if (a == b) throw std::invalid_argument ("Loops not yet supported."); } Edge::Edge (const Edge &other) : v (other.v), w (other.w), flow (other.flow), weight (other.weight), directed (other.directed), selected (false) { } void Edge::cycle_orientations () { // NOTE: this relies on vertex comparability if (!directed) directed = true; else { if (v->label < w->label) directed = false; Vertex *tmp = v; v = w; w = tmp; } } Edge &Edge::operator= (const Edge &other) { if (this == &other) return *this; v = other.v; w = other.w; flow = other.flow; weight = other.weight; directed = other.directed; return *this; } bool Edge::operator== (const Edge &other) const { if (!directed) return (((v == other.v) && (w == other.w)) || ((v == other.w) && (w == other.v))); else return ((v == other.v) && (w == other.w)); } std::ostream &operator<< (std::ostream &o, const Edge &e) { o << "edge \"" << e.v->label.mb_str (wxConvUTF8) << "\" " << (e.directed ? "-> \"" : "-- \"") << e.w->label.mb_str (wxConvUTF8) << "\""; if (e.weight != 1) o << " with weight " << e.weight; o << '\n'; return o; } bool Edge::incident_to (const Vertex *v1) const { return ((v == v1) || (w == v1)); } bool Edge::incident_to (const Vertex *v1, const Vertex *v2) const { return (incident_to (v1) && incident_to (v2)); } graphthing-1.3.2/src/edge.h0000644000076500007650000000125410501136234016005 0ustar dsymondsdsymonds// // edge.h // #ifndef __EDGE_H__ #define __EDGE_H__ #include class Vertex; class Edge { public: Vertex *v, *w; int flow; // for networks (<= weight) int weight; bool directed; bool selected; int selection_colour; Edge *next; // selected chain long mark; Edge (Vertex *a, Vertex *b, bool dir = false, int wt = 1); Edge (const Edge &other); void cycle_orientations (); Edge &operator= (const Edge &other); bool operator== (const Edge &other) const; friend std::ostream &operator<< (std::ostream &o, const Edge &e); bool incident_to (const Vertex *v1) const; bool incident_to (const Vertex *v1, const Vertex *v2) const; }; #endif // __EDGE_H__ graphthing-1.3.2/src/edge_mode.xpm0000644000076500007650000000175110501136234017370 0ustar dsymondsdsymonds/* XPM */ static char * edge_mode_xpm[] = { "20 20 31 1", " c None", ". c #FFFFFF", "+ c #E3E3E3", "@ c #DFDFDF", "# c #F7F7F7", "$ c #BFBFBF", "% c #101010", "& c #000000", "* c #707070", "= c #040404", "- c #8F8F8F", "; c #808080", "> c #805050", ", c #FFF3F3", "' c #2C0000", ") c #DF0000", "! c #FF6060", "~ c #8F7070", "{ c #800000", "] c #803030", "^ c #DF7070", "/ c #FF0000", "( c #FF5050", "_ c #FFBFBF", ": c #FFFBFB", "< c #FF8F8F", "[ c #FF0808", "} c #FF5C5C", "| c #FFEFEF", "1 c #FF8383", "2 c #FF9B9B", "....................", "...+@@#.............", "..$%&&*.............", ".+%&&&=-............", ".@&&&&&;............", ".@&&&&&>,...........", ".#*=&&')!,..........", "...~{]^//(..........", "..._/!:<[/}|........", "..._/!..1//}........", "..._/!...2//(,......", "..._/!....1[/!,.....", "..._/!..... #include #include #include #include "config.h" #include "edge.h" #include "exporter.h" #include "graph.h" #include "vertex.h" Exporter *Exporter::make (const wxString format, const wxString fname) { if (format == wxT("GraphThing")) return new GraphThing_Exporter (fname); else if (format == wxT("GraphML")) return new GraphML_Exporter (fname); else if (format == wxT("Graphviz")) return new Graphviz_Exporter (fname); else if (format == wxT("Maple")) return new Maple_Exporter (fname); else if (format == wxT("Postscript")) return new Postscript_Exporter (fname); throw std::runtime_error ("Unknown output format!"); } Exporter::Exporter (const wxString fname) : filename (fname) { fs.open ((const char *) filename.mb_str (wxConvUTF8), std::fstream::out); if (!fs.is_open ()) throw std::runtime_error ("Couldn't open file."); } Exporter::~Exporter () { fs.close (); } void GraphThing_Exporter::output (const Graph *g, bool labels, bool weights) { fs << *g; } void GraphML_Exporter::output (const Graph *g, bool labels, bool weights) { fs << "\n"; fs << "\n"; fs << "\n"; fs << "\n"; fs << " \n"; fs << " \n"; fs << "\t\n"; fs << "\n"; // Vertices Graph::v_const_iterator vit; for (vit = g->v_begin (); vit != g->v_end (); ++vit) { Vertex *v = *vit; // TODO: filter out quotes and other nasties! fs << "\tlabel.mb_str (wxConvUTF8) << "\" />\n"; } fs << "\n"; // Edges Graph::e_const_iterator eit; for (eit = g->e_begin (); eit != g->e_end (); ++eit) { Edge *e = *eit; // TODO: filter out quotes and other nasties! fs << "\tv->label.mb_str (wxConvUTF8) << "\" target=\"" << e->w->label.mb_str (wxConvUTF8) << "\""; if (e->directed) fs << " directed=\"true\""; fs << ">\n"; fs << "\t " << e->weight << "\n"; fs << "\t\n"; } fs << " \n"; fs << "\n"; } void Graphviz_Exporter::output (const Graph *g, bool labels, bool weights) { Graph::e_const_iterator eit; bool digraph = false; for (eit = g->e_begin (); eit != g->e_end (); ++eit) { if ((*eit)->directed) { digraph = true; break; } } fs << (digraph ? "digraph" : "graph") << " \"G\" {\n"; // defaults fs << "\tnode [\n"; fs << "\t\tfontname = \"Arial\"\n"; fs << "\t\tlabel = \"\\N\"\n"; fs << "\t\tshape = \"circle\"\n"; fs << "\t\twidth = \"0.5\"\n"; fs << "\t\theight = \"0.5\"\n"; fs << "\t\tcolor = \"black\"\n"; fs << "\t]\n"; fs << "\tedge [\n"; fs << "\t\tcolor = \"black\"\n"; fs << "\t\tweight = \"1\"\n"; fs << "\t]\n"; fs << "\n"; // Vertices are combined with edges in this format for (eit = g->e_begin (); eit != g->e_end (); ++eit) { Edge *e = *eit; fs << "\t\"" << e->v->label.mb_str (wxConvUTF8) << "\" " << (e->directed ? "->" : "--") << " \"" << e->w->label.mb_str (wxConvUTF8) << "\""; if (e->weight != 1) fs << " [weight=\"" << e->weight << "\"]"; fs << ";\n"; } fs << "}\n"; } void Maple_Exporter::output (const Graph *g, bool labels, bool weights) { // TODO: handle digraphs fs << "> with(networks):\n"; // Vertex set fs << "> vertexset:=["; Graph::v_const_iterator vit; for (vit = g->v_begin (); vit != g->v_end (); ++vit) { if (vit != g->v_begin ()) fs << ","; fs << (*vit)->label.mb_str (wxConvUTF8); } fs << "];\n"; // Edge set fs << "> edgeset:=["; Graph::e_const_iterator eit; for (eit = g->e_begin (); eit != g->e_end (); ++eit) { Edge *e = *eit; if (eit != g->e_begin ()) fs << ","; fs << "{" << e->v->label.mb_str (wxConvUTF8) << "," << e->w->label.mb_str (wxConvUTF8) << "}"; } fs << "];\n"; // Edge weights fs << "> weightset:=["; for (eit = g->e_begin (); eit != g->e_end (); ++eit) { if (eit != g->e_begin ()) fs << ","; fs << (*eit)->weight; } fs << "];\n"; fs << "> new(G):\n" "> addvertex(vertexset,G);\n" "> addedge(edgeset,weights=weightset,G);\n"; } void Postscript_Exporter::output (const Graph *g, bool labels, bool weights) { int minx, miny, maxx, maxy, len; time_t timep; Graph::e_const_iterator eit; Graph::v_const_iterator vit; char *str; minx = miny = 999999; maxx = maxy = -1; for (vit = g->v_begin (); vit != g->v_end (); ++vit) { if (minx > (*vit)->x) minx = (*vit)->x; if (maxx < (*vit)->x) maxx = (*vit)->x; if (miny > (*vit)->y) miny = (*vit)->y; if (maxy < (*vit)->y) maxy = (*vit)->y; } if (g->order () < 1) { minx = miny = 10; maxx = maxy = 200; } minx -= 10; miny -= (labels ? 10 : 20); maxx += (labels ? 20 : 10); maxy += 20; timep = time (0); str = ctime (&timep); len = strlen (str); if (str[len - 1] == '\n') str[len - 1] = '\0'; // remove trailing newline fs << "%%!PS-Adobe-2.0\n" "%%%%Title: " << filename << "\n" "%%%%Creator: GraphThing " GT_VERSION " (c) 2001-2006 David Symonds\n" "%%%%CreationDate: " << str << "\n" "%%%%Pages: 1\n" "%%%%Origin: 0 0\n" "%%%%BoundingBox: " << minx << ' ' << miny << ' ' << maxx << ' ' << maxy << "\n\n"; fs << "/Helvetica findfont 12 scalefont setfont\n\n"; // Vertex macro fs << "%% Args: label, xcenter, ycenter\n" "/vertex {\n" "\t" << maxy << " exch sub\n" "\t1 index 1 index\n" "\tnewpath 5 0 360 arc fill\n"; if (labels) fs << "\texch 10 add exch 10 add moveto show\n"; else fs << "\tpop\n"; fs << "} bind def\n\n"; // Arrow head macros fs << "%% Arrow head stuff\n" "/ArrowHeadSize 15 def\n" "%% Args: x1 y1 x2 y2 (arrowhead at x2,y2; from x1,y1)\n" "%% Out: x1 y1 x2' y2' (draw line to x2', y2')\n" "/arrowhead {\n" "\t1 index 4 index sub\n" "\t1 index 4 index sub\n" "\texch atan\n" "\n" "\tArrowHeadSize -.8 mul\n" "\tdup\n" "\t2 index cos mul 4 index add\n" "\texch\n" "\t2 index sin mul 3 index add\n" "\n" "\t5 2 roll\n" "\n" "\tgsave\n" "\t\t3 1 roll\n" "\t\ttranslate\n" "\t\trotate\n" "\t\tnewpath\n" "\t\t0 0 moveto\n" "\t\tArrowHeadSize dup neg exch .25 mul\n" "\t\t2 copy lineto\n" "\t\tArrowHeadSize -.8 mul 0\n" "\t\t2 copy\n" "\t\t6 4 roll\n" "\t\tneg curveto\n" "\t\tclosepath fill\n" "\tgrestore\n" "} bind def\n\n"; // Edge macros fs << "%% Return point on line, given by t = [0, 1]\n" "%% Args: x1 y1 x2 y2 t\n" "%% Out: xt yt\n" "/linepositiondict 5 dict def\n" "/lineposition {\n" "\tlinepositiondict begin\n" "\t\t/t exch def\n" "\t\t/y2 exch def /x2 exch def\n" "\t\t/y1 exch def /x1 exch def\n" "\t\tx2 x1 sub t mul x1 add\n" "\t\ty2 y1 sub t mul y1 add\n" "\tend\n" "} bind def\n\n"; fs << "%% Args: label, startx, starty, endx, endy\n" "/edge {\n" "\t" << maxy << " exch sub 3 index 3 index " << maxy << " exch sub\n" "\t1 index 1 index moveto\n" "\t3 index 3 index lineto stroke\n"; if (labels) fs << "\t0.5 lineposition\n" "\texch 5 add exch 5 add moveto pop pop show\n"; else fs << "\tpop pop pop pop pop pop pop\n"; fs << "} bind def\n\n"; fs << "%% Args: label, startx, starty, endx, endy\n" "/dir_edge {\n" "\t" << maxy << " exch sub 3 index 3 index " << maxy << " exch sub\n" "\t3 index 3 index arrowhead\n" "\t3 index 3 index moveto\n" "\tlineto stroke\n"; if (labels) fs << "\t0.5 lineposition\n" "\texch 5 add exch 5 add moveto pop pop show\n"; else fs << "\tpop pop pop pop pop pop pop\n"; fs << "} bind def\n\n"; // We dump the edges first so that the vertices will be printed // "on top" of the edge ends // Dump edges first fs << "%% Edges\n"; for (eit = g->e_begin (); eit != g->e_end (); ++eit) { if (weights) fs << "(" << (*eit)->weight << ") "; else fs << "() "; fs << (*eit)->v->x << ' ' << (*eit)->v->y << ' ' << (*eit)->w->x << ' ' << (*eit)->w->y << ((*eit)->directed ? " dir_edge\n" : " edge\n"); } fs << '\n'; // Now dump the vertices fs << "%% Vertices\n"; // This bit needs a freshly created iterator. Why? I have no idea. // It crashes if we try to use the previous ('vit'). Graph::v_const_iterator vit2; for (vit2 = g->v_begin (); vit2 != g->v_end (); ++vit2) { Vertex *v = *vit2; //std::cerr << "* dumping '" << v->label << "'...\n"; fs << '(' << v->label.mb_str (wxConvUTF8) << ") " << v->x << ' ' << v->y << " vertex\n"; } fs << "\n\nshowpage\n"; } graphthing-1.3.2/src/exporter.h0000644000076500007650000000262710501136234016756 0ustar dsymondsdsymonds// // exporter.h // #ifndef __EXPORTER_H__ #define __EXPORTER_H__ #include #include "wx/string.h" class Graph; class Exporter { protected: const wxString &filename; std::fstream fs; Exporter (const wxString fname); public: bool failed; static Exporter *make (const wxString format, const wxString fname); virtual void output (const Graph *g, bool labels = true, bool weights = true) = 0; virtual ~Exporter (); }; class GraphThing_Exporter : public Exporter { public: GraphThing_Exporter (const wxString fname) : Exporter (fname) { } void output (const Graph *g, bool labels = true, bool weights = true); }; class GraphML_Exporter : public Exporter { public: GraphML_Exporter (const wxString fname) : Exporter (fname) { } void output (const Graph *g, bool labels = true, bool weights = true); }; class Graphviz_Exporter : public Exporter { public: Graphviz_Exporter (const wxString fname) : Exporter (fname) { } void output (const Graph *g, bool labels = true, bool weights = true); }; class Maple_Exporter : public Exporter { public: Maple_Exporter (const wxString fname) : Exporter (fname) { } void output (const Graph *g, bool labels = true, bool weights = true); }; class Postscript_Exporter : public Exporter { public: Postscript_Exporter (const wxString fname) : Exporter (fname) { } void output (const Graph *g, bool labels = true, bool weights = true); }; #endif // __EXPORTER_H__ graphthing-1.3.2/src/factory.cc0000644000076500007650000002577710501136234016726 0ustar dsymondsdsymonds// // factory.cc // #include "wx/string.h" #include #include #include "edge.h" #include "factory.h" #include "graph.h" #include "vertex.h" int Factory::width = 100, Factory::height = 100; Graph *Factory::grid (int rows, int columns) { Graph *g; Vertex *v; int sx, sy, x, y; g = new Graph (); sx = width / (columns + 1); sy = height / (rows + 1); for (y = 0; y < rows; ++y) { for (x = 0; x < columns; ++x) { v = new Vertex ("", (x + 1) * sx, (y + 1) * sy); g->add (v); } } return g; } void Factory::construct_hanoi (Graph *g, int n, Vertex *varray[3], const wxString &suffix) { if (n < 1) return; if (n == 1) { // just need to rename vertices and connect edges g->add (new Edge (varray[0], varray[1])); g->add (new Edge (varray[1], varray[2])); g->add (new Edge (varray[2], varray[0])); g->rename (varray[0], wxT("0") + suffix); g->rename (varray[1], wxT("1") + suffix); g->rename (varray[2], wxT("2") + suffix); return; } // create partial vertices Vertex *v01a, *v01b, *v12a, *v12b, *v20a, *v20b; int x0 = varray[0]->x, x1 = varray[1]->x, x2 = varray[2]->x, y0 = varray[0]->y, y1 = varray[1]->y, y2 = varray[2]->y; v01a = new Vertex ("", (4 * x0 + 3 * x1) / 7, (4 * y0 + 3 * y1) / 7); v01b = new Vertex ("", (3 * x0 + 4 * x1) / 7, (3 * y0 + 4 * y1) / 7); v12a = new Vertex ("", (4 * x1 + 3 * x2) / 7, (4 * y1 + 3 * y2) / 7); v12b = new Vertex ("", (3 * x1 + 4 * x2) / 7, (3 * y1 + 4 * y2) / 7); v20a = new Vertex ("", (4 * x2 + 3 * x0) / 7, (4 * y2 + 3 * y0) / 7); v20b = new Vertex ("", (3 * x2 + 4 * x0) / 7, (3 * y2 + 4 * y0) / 7); g->add (v01a); g->add (v01b); g->add (v12a); g->add (v12b); g->add (v20a); g->add (v20b); // connect partial vertices g->add (new Edge (v01a, v01b)); g->add (new Edge (v12a, v12b)); g->add (new Edge (v20a, v20b)); // recurse Vertex *varray0[3] = { varray[0], v20b, v01a }; Vertex *varray1[3] = { v12a, varray[1], v01b }; Vertex *varray2[3] = { v12b, v20a, varray[2] }; construct_hanoi (g, n - 1, varray0, wxT("0") + suffix); construct_hanoi (g, n - 1, varray1, wxT("1") + suffix); construct_hanoi (g, n - 1, varray2, wxT("2") + suffix); } Graph *Factory::C (int n) { Graph *g; Edge *e; Vertex *first, *prev; Graph::v_const_iterator vit; g = Factory::N (n); if (n < 2) return g; first = prev = 0; for (vit = g->v_begin (); vit != g->v_end (); ++vit) { if (prev) { e = new Edge (prev, *vit); g->add (e); } else first = *vit; prev = *vit; } if (n > 2) { e = new Edge (prev, first); g->add (e); } return g; } Graph *Factory::G (int n) { Graph *g; Vertex *hub; g = Factory::W (n + 1, &hub); // Not quite correct, but we'll ignore trivial cases if (n < 3) return g; Graph::e_const_iterator eit; std::queue eq; for (eit = g->e_begin (); eit != g->e_end (); ++eit) { Edge *e = *eit; if (e->incident_to (hub)) continue; eq.push (e); } while (!eq.empty ()) { Edge *e = eq.front (); eq.pop (); Vertex *a = e->v, *b = e->w; g->remove (e); Vertex *mid = new Vertex ("", (a->x + b->x) / 2, (a->y + b->y) / 2); g->add (mid); g->add (new Edge (a, mid)); g->add (new Edge (mid, b)); } return g; } Graph *Factory::H (int n) { Graph *g; #if 0 //g = Factory::N (3, 0.45 * (width > height ? height : width)); g = Factory::N (3); Vertex *varray[3] = { (*g)[0], (*g)[2], (*g)[1] }; // deliberate! construct_hanoi (g, n, varray, ""); #else g = new Graph; wxString em = wxT(""); g->add (new Vertex (em, int (width * 0.5), int (height * 0.1))); g->add (new Vertex (em, int (width * 0.9), int (height * 0.9))); g->add (new Vertex (em, int (width * 0.1), int (height * 0.9))); Vertex *varray[3] = { (*g)[0], (*g)[2], (*g)[1] }; // deliberate! construct_hanoi (g, n, varray, wxT("")); #endif return g; } Graph *Factory::K (int n) { Graph *g; Edge *e; Graph::v_const_iterator vit1, vit2; g = Factory::N (n); if (n < 2) return g; for (vit1 = g->v_begin (); vit1 != g->v_end (); ++vit1) for (vit2 = vit1 + 1; vit2 != g->v_end (); ++vit2) { e = new Edge (*vit1, *vit2); g->add (e); } return g; } Graph *Factory::K (int n, int m) { Graph *g; Vertex *v; int i, j, sx, sy, x; g = new Graph (); // Create vertices in two rows sy = height / 3; sx = width / (n + 1); for (x = 0; x < n; ++x) { v = new Vertex ("", (x + 1) * sx, sy); g->add (v); } sx = width / (m + 1); for (x = 0; x < m; ++x) { v = new Vertex ("", (x + 1) * sx, 2 * sy); g->add (v); } // Add edges for (i = 0; i < n; ++i) { for (j = 0; j < m; ++j) g->add (new Edge ((*g)[i], (*g)[n + j])); } return g; } Graph *Factory::L (int n) { Graph *g; Edge *e; Graph::v_const_iterator vit1, vit2; int i; g = grid (2, n); // vit1 follows the top row, vit2 follows the bottom row vit1 = g->v_begin (); for (vit2 = vit1, i = 0; i < n; ++i) ++vit2; for (i = 0; i < n; ++i, ++vit1, ++vit2) { e = new Edge (*vit1, *vit2); g->add (e); } return g; } Graph *Factory::N (int n, double radius) { Graph *g; double del_theta, phi; int i, cx, cy, x, y; g = new Graph (); // Null graph - arrange n vertices in a circle cx = width / 2; cy = height / 2; if (radius <= 0) radius = ((width > height) ? height : width) / 3; del_theta = 2 * M_PI / (double) n; phi = -M_PI_2; if (n == 4) phi = -0.75 * M_PI; if (n < 2) radius = 0; // place single vertex in middle for (i = 0; i < n; ++i) { x = cx + (int) ceil (radius * cos (i * del_theta + phi)); y = cy + (int) ceil (radius * sin (i * del_theta + phi)); g->add (new Vertex ("", x, y)); } return g; } Graph *Factory::S (int n) { Graph *g; Edge *e; Vertex *v; Graph::v_const_iterator vit; g = N (n - 1); v = new Vertex ("", width / 2, height / 2); g->add (v); for (vit = g->v_begin (); vit != g->v_end (); ++vit) { if (*vit == v) continue; e = new Edge (v, *vit); g->add (e); } return g; } Graph *Factory::W (int n, Vertex **hub) { Graph *g; Edge *e; Vertex *v; Graph::v_const_iterator vit; g = C (n - 1); v = new Vertex ("", width / 2, height / 2); g->add (v); if (hub) *hub = v; for (vit = g->v_begin (); vit != g->v_end (); ++vit) { if (*vit == v) continue; e = new Edge (v, *vit); g->add (e); } return g; } Graph *Factory::Lattice (int n, int m) { Graph *g; Edge *e; int i, j; g = grid (n, m); // Add horizontal edges for (j = 0; j < n; ++j) { for (i = 1; i < m; ++i) { e = new Edge ((*g)[j * m + i - 1], (*g)[j * m + i]); g->add (e); } } // Add vertical edges for (i = 0; i < m; ++i) { for (j = 0; j < (n - 1); ++j) { e = new Edge ((*g)[i + m * j], (*g)[i + m * (j+1)]); g->add (e); } } return g; } Graph *Factory::Petersen () { Graph *g; Edge *e; Vertex *v; double del_theta, r; int i, cx, cy, x, y; g = C (5); // Create the 5 inner vertices cx = width / 2; cy = height / 2; r = ((width < height) ? height : width) / 6; del_theta = M_PI * 0.4; for (i = 0; i < 5; ++i) { x = cx + (int) ceil (r * cos (i * del_theta - M_PI_2)); y = cy + (int) ceil (r * sin (i * del_theta - M_PI_2)); v = new Vertex ("", x, y); g->add (v); // Connect an edge to the corresponding vertices e = new Edge ((*g)[i], v); g->add (e); } // Make the star g->add (new Edge ((*g)[5], (*g)[7])); g->add (new Edge ((*g)[7], (*g)[9])); g->add (new Edge ((*g)[9], (*g)[6])); g->add (new Edge ((*g)[6], (*g)[8])); g->add (new Edge ((*g)[8], (*g)[5])); return g; } Graph *Factory::Tetrahedral () { return W (4); } Graph *Factory::Cubical () { Graph *g; Vertex *v; double del_theta, phi, r; int i, cx, cy, x, y; g = C (4); // Create the 4 inner vertices cx = width / 2; cy = height / 2; r = ((width < height) ? height : width) / 8; del_theta = M_PI_2; phi = -0.75 * M_PI; for (i = 0; i < 4; ++i) { x = cx + (int) ceil (r * cos (i * del_theta + phi)); y = cy + (int) ceil (r * sin (i * del_theta + phi)); v = new Vertex ("", x, y); g->add (v); // Connect an edge to the corresponding vertices g->add (new Edge ((*g)[i], v)); } // Join the inner vertices into a square g->add (new Edge ((*g)[4], (*g)[5])); g->add (new Edge ((*g)[5], (*g)[6])); g->add (new Edge ((*g)[6], (*g)[7])); g->add (new Edge ((*g)[7], (*g)[4])); return g; } Graph *Factory::Octahedral () { Graph *g; double del_theta, phi, r; int i, cx, cy, x, y; g = C (3); // Create the 3 inner vertices cx = width / 2; cy = height / 2; r = ((width < height) ? height : width) / 20; del_theta = M_PI * 2 / 3; phi = -M_PI * 5 / 6; for (i = 0; i < 3; ++i) { x = cx + (int) ceil (r * cos (i * del_theta + phi)); y = cy + (int) ceil (r * sin (i * del_theta + phi)); g->add (new Vertex ("", x, y)); } // Join the inner vertices into a cycle g->add (new Edge ((*g)[3], (*g)[4])); g->add (new Edge ((*g)[4], (*g)[5])); g->add (new Edge ((*g)[5], (*g)[3])); // Join the outer to the inner vertices g->add (new Edge ((*g)[0], (*g)[3])); g->add (new Edge ((*g)[0], (*g)[4])); g->add (new Edge ((*g)[1], (*g)[4])); g->add (new Edge ((*g)[1], (*g)[5])); g->add (new Edge ((*g)[2], (*g)[5])); g->add (new Edge ((*g)[2], (*g)[3])); return g; } Graph *Factory::Dodecahedral () { Graph *g; double del_theta, phi, r, rr; int layer, i, cx, cy, x, y; double layer_scale[4] = { 1, 0.8, 0.5, 0.3 }; struct { int a, b; } edges[30] = { {0,1}, {1,2}, {2,3}, {3,4}, {4,0}, {0,5}, {1,6}, {2,7}, {3,8}, {4,9}, {5,10}, {10,6}, {6,11}, {11,7}, {7,12}, {12,8}, {8,13}, {13,9}, {9,14}, {14,5}, {10,15}, {11,16}, {12,17}, {13,18}, {14,19}, {15,16}, {16,17}, {17,18}, {18,19}, {19,15} }; g = new Graph (); cx = width / 2; cy = height / 2; r = ((width < height) ? height : width) / 3.5; del_theta = M_PI * 2 / 5; phi = -M_PI_2; for (layer = 0; layer < 4; ++layer) { if (layer == 2) phi += del_theta / 2; rr = r * layer_scale[layer]; for (i = 0; i < 5; ++i) { x = cx + (int) ceil (rr * cos (i * del_theta + phi)); y = cy + (int) ceil (rr * sin (i * del_theta + phi)); g->add (new Vertex ("", x, y)); } } // Add edges for (i = 0; i < 30; ++i) g->add (new Edge ((*g)[edges[i].a], (*g)[edges[i].b])); return g; } Graph *Factory::Icosahedral () { Graph *g; double del_theta, phi, r, rr; int layer, i, cx, cy, x, y; double layer_scale[4] = { 1, 0.35, 0.35, 0.1 }; struct { int a, b; } edges[30] = { {0,1}, {1,2}, {2,0}, {0,8}, {0,3}, {0,6}, {1,6}, {1,4}, {1,7}, {2,7}, {2,5}, {2,8}, {3,6}, {6,4}, {4,7}, {7,5}, {5,8}, {8,3}, {3,11}, {3,9}, {4,9}, {4,10}, {5,10}, {5,11}, {6,9}, {7,10}, {8,11}, {9,10}, {10,11}, {11,9} }; g = new Graph (); cx = width / 2; cy = int (height * 0.6); //r = ((width < height) ? height : width) / 3.5; r = ((width < height) ? width : height) * 0.5; del_theta = M_PI * 2 / 3; phi = -M_PI_2; for (layer = 0; layer < 4; ++layer) { if (layer == 2) phi += del_theta / 2; rr = r * layer_scale[layer]; for (i = 0; i < 3; ++i) { x = cx + (int) ceil (rr * cos (i * del_theta + phi)); y = cy + (int) ceil (rr * sin (i * del_theta + phi)); g->add (new Vertex ("", x, y)); } } // Add edges for (i = 0; i < 30; ++i) g->add (new Edge ((*g)[edges[i].a], (*g)[edges[i].b])); return g; } graphthing-1.3.2/src/factory.h0000644000076500007650000000173010501136234016547 0ustar dsymondsdsymonds// // factory.h // #ifndef __FACTORY_H__ #define __FACTORY_H__ #include "wx/string.h" class Graph; class Vertex; class Factory { private: static Graph *grid (int rows, int columns); static void construct_hanoi (Graph *g, int n, Vertex *varray[3], const wxString &suffix); public: static int width; static int height; static Graph *C (int n); // cycle static Graph *G (int n); // gear static Graph *H (int n); // hanoi static Graph *K (int n); // complete static Graph *K (int n, int m); // complete bipartite static Graph *L (int n); // ladder static Graph *N (int n, double radius = -1); // null static Graph *S (int n); // star static Graph *W (int n, Vertex **hub = 0); // wheel static Graph *Lattice (int n, int m); static Graph *Petersen (); // Platonic solids static Graph *Tetrahedral (); static Graph *Cubical (); static Graph *Octahedral (); static Graph *Dodecahedral (); static Graph *Icosahedral (); }; #endif // __FACTORY_H__ graphthing-1.3.2/src/fancyfileselection.cc0000644000076500007650000000256010501136234021106 0ustar dsymondsdsymonds// // fancyfileselection.cc // #include "wx/filedlg.h" #include "wx/string.h" #include "wx/window.h" #include #include "fancyfileselection.h" #include "lang.h" static struct { const char *name, *extension; } file_formats[] = { { "GraphThing", ".gt" }, { "GraphML", ".graphml" }, { "Graphviz", ".dot" }, { "Maple", ".mws" }, { "Postscript", ".ps" } }; FancyFileSelection::FancyFileSelection (wxWindow *parent, const wxString &title, long style, bool file_types, const wxString &mask) : wxFileDialog (parent, title, wxT(""), wxT(""), wxT("*.*"), style) { if (style & wxOPEN) style |= wxHIDE_READONLY; else if (style & wxSAVE) style |= wxOVERWRITE_PROMPT; SetStyle (style); if (file_types) { wxString wc = wxT(""); int num = sizeof (file_formats) / sizeof (file_formats[0]); for (int i = 0; i < num; ++i) { if (i > 0) wc += wxT("|"); wc += wxString (file_formats[i].name, wxConvUTF8); wc += wxT(" (*"); wc += wxString (file_formats[i].extension, wxConvUTF8); wc += wxT(")|*"); wc += wxString (file_formats[i].extension, wxConvUTF8); wc += wxT(""); } SetWildcard (wc); } else { SetWildcard (mask); } } wxString FancyFileSelection::GetFileType () const { return wxString (file_formats[GetFilterIndex ()].name, wxConvUTF8); } wxString FancyFileSelection::GetFileName () const { return wxFileDialog::GetPath (); } graphthing-1.3.2/src/fancyfileselection.h0000644000076500007650000000076410501136234020754 0ustar dsymondsdsymonds// // fancyfileselection.h // #ifndef __FANCYFILESELECTION_H__ #define __FANCYFILESELECTION_H__ #include "wx/filedlg.h" #include "wx/string.h" class wxWindow; class FancyFileSelection : public wxFileDialog { public: FancyFileSelection (wxWindow *parent, const wxString &title, long style = 0, bool file_types = false, const wxString &mask = wxT("GraphThing (*.gt)|*.gt")); wxString GetFileType () const; virtual wxString GetFileName () const; }; #endif // __FANCYFILESELECTION_H__ graphthing-1.3.2/src/flags/0000755000076500007650000000000010542622566016037 5ustar dsymondsdsymondsgraphthing-1.3.2/src/flags/cat.xpm0000644000076500007650000000065110501136233017320 0ustar dsymondsdsymonds/* XPM */ static char * cat_xpm[] = { "21 13 2 1", " c #FF0000", ". c #FFFF00", " ", " ", ".....................", ".....................", " ", " ", ".....................", ".....................", " ", " ", ".....................", ".....................", " "}; graphthing-1.3.2/src/flags/de.xpm0000644000076500007650000000067010501136233017142 0ustar dsymondsdsymonds/* XPM */ static char * de_xpm[] = { "21 13 3 1", " c #000000", ". c #FF0000", "+ c #FFFF00", " ", " ", " ", " ", ".....................", ".....................", ".....................", ".....................", "+++++++++++++++++++++", "+++++++++++++++++++++", "+++++++++++++++++++++", "+++++++++++++++++++++", "+++++++++++++++++++++"}; graphthing-1.3.2/src/flags/es.xpm0000644000076500007650000000065010501136233017157 0ustar dsymondsdsymonds/* XPM */ static char * es_xpm[] = { "21 13 2 1", " c #FF0000", ". c #FFFF00", " ", " ", " ", ".....................", ".....................", ".....................", ".....................", ".....................", ".....................", ".....................", " ", " ", " "}; graphthing-1.3.2/src/flags/fr.xpm0000644000076500007650000000067010501136233017161 0ustar dsymondsdsymonds/* XPM */ static char * fr_xpm[] = { "21 13 3 1", " c #000080", ". c #FF0000", "+ c #FFFFFF", " +++++++.......", " +++++++.......", " +++++++.......", " +++++++.......", " +++++++.......", " +++++++.......", " +++++++.......", " +++++++.......", " +++++++.......", " +++++++.......", " +++++++.......", " +++++++.......", " +++++++......."}; graphthing-1.3.2/src/flags/it.xpm0000644000076500007650000000067010501136233017166 0ustar dsymondsdsymonds/* XPM */ static char * it_xpm[] = { "21 13 3 1", " c #008000", ". c #FFFFFF", "+ c #FF0000", " .......+++++++", " .......+++++++", " .......+++++++", " .......+++++++", " .......+++++++", " .......+++++++", " .......+++++++", " .......+++++++", " .......+++++++", " .......+++++++", " .......+++++++", " .......+++++++", " .......+++++++"}; graphthing-1.3.2/src/flags/ro.xpm0000644000076500007650000000067010501136233017172 0ustar dsymondsdsymonds/* XPM */ static char * ro_xpm[] = { "21 13 3 1", " c #0000FF", ". c #FFFF00", "+ c #FF0000", " .......+++++++", " .......+++++++", " .......+++++++", " .......+++++++", " .......+++++++", " .......+++++++", " .......+++++++", " .......+++++++", " .......+++++++", " .......+++++++", " .......+++++++", " .......+++++++", " .......+++++++"}; graphthing-1.3.2/src/flags/se.xpm0000644000076500007650000000065010501136233017157 0ustar dsymondsdsymonds/* XPM */ static char * se_xpm[] = { "21 13 2 1", " c #0099B6", ". c #FFFF00", " ... ", " ... ", " ... ", " ... ", " ... ", ".....................", ".....................", ".....................", " ... ", " ... ", " ... ", " ... ", " ... "}; graphthing-1.3.2/src/flags/uk.xpm0000644000076500007650000000067010501136233017171 0ustar dsymondsdsymonds/* XPM */ static char * uk_xpm[] = { "21 13 3 1", " c #FFFFFF", ". c #000080", "+ c #FF0000", " ...... +++ .....++ ", "++ .... +++ ...++ .", "..++ .. +++ .++ ...", "....++ . +++ + .....", " +++ ", "+++++++++++++++++++++", "+++++++++++++++++++++", "+++++++++++++++++++++", " +++ ", "..... + +++ . ++....", "... ++. +++ .. ++..", ". ++... +++ .... ++", " ++..... +++ ...... "}; graphthing-1.3.2/src/GNUmakefile.in0000644000076500007650000000553310504067505017422 0ustar dsymondsdsymondsPACKAGE = graphthing VERSION = @PACKAGE_VERSION@ subdir = src prefix = @prefix@ DISTFILES = GNUmakefile.in config.h.in depend.1 *.cc *.h *.hh *.y *.l *.gt \ phrases.lang *.sh *.xpm CFLAGS = @CFLAGS@ @EXTRA_CFLAGS@ CXXFLAGS = @CXXFLAGS@ @EXTRA_CFLAGS@ \ @WX_CXXFLAGS@ LDFLAGS = @LDFLAGS@ @EXTRA_LDFLAGS@ INSTALL = @INSTALL@ LIBS = @LIBS@ @WX_LIBS@ #LIBS = @LIBS@ @WX_LIBS@ -lefence PARSERS = gt. @NLS_PARSERS@ OBJS = aboutbox.o canvas.o edge.o exporter.o factory.o fancyfileselection.o \ graph.o graph2.o gui.o gui_cb.o main.o math.o matrix.o matrixdialog.o \ paramdialog.o polynomial.o undo.o vertex.o \ @NLS_OBJS@ TEST_OBJS = edge.o factory.o graph.o graph2.o math.o matrix.o polynomial.o \ vertex.o CHROM_OBJS = edge.o factory.o graph.o graph2.o math.o matrix.o polynomial.o \ vertex.o BISON_OBJS = $(PARSERS:.=-bison.tab.o) FLEX_OBJS = $(PARSERS:.=-flex.yy.o) ALL_OBJS = $(OBJS) $(BISON_OBJS) $(FLEX_OBJS) PROGNAME = graphthing@EXEEXT@ all: $(PROGNAME) $(addsuffix @EXEEXT@,@EXTRA_PROGS@) install: @INSTALL@ -d @prefix@/bin/ @INSTALL@ -s -m 755 $(PROGNAME) @prefix@/bin/ clean: rm -f $(ALL_OBJS) unit_test.o chrom.o rm -f $(BISON_OBJS:.o=.cc) $(BISON_OBJS:.o=.hh) rm -f $(FLEX_OBJS:.o=.cc) rm -f $(PROGNAME) unit_test@EXEEXT@ chrom@EXEEXT@ rm -f core gmon.out graphthing.exe.stackdump distclean: clean rm -f config.h GNUmakefile $(PROGNAME): $(ALL_OBJS) $(EXTRA_LIBS) @echo "Linking $@" @@CXX@ $(LDFLAGS) $^ $(LIBS) -o $@ unit_test@EXEEXT@: unit_test.o $(TEST_OBJS) $(EXTRA_LIBS) @echo "Linking $@" @@CXX@ $(LDFLAGS) $^ $(LIBS) -o $@ chrom@EXEEXT@: chrom.o $(CHROM_OBJS) $(EXTRA_LIBS) @echo "Linking $@" @@CXX@ $(LDFLAGS) $^ $(LIBS) -o $@ # Have faith that bison and flex produce good code %.tab.o : %.tab.cc @echo "$< -> $@" @@CXX@ @CXXFLAGS@ @WX_CXXFLAGS@ -O -g -c $< -o $@ %.yy.o : %.yy.c @echo "$< -> $@" @@CXX@ @CXXFLAGS@ @WX_CXXFLAGS@ -O -g -c $< -o $@ %-bison.tab.cc : %-bison.y @echo "$< -> $@" @@YACC@ -d -p yy_$*_ -o $@ $< %-flex.yy.c : %-flex.l @echo "$< -> $@" @@LEX@ -Pyy_$*_ -o$@ $< lang.cc : phrases.h phrases.h : phrases.lang @./init-phrases.sh #%.o : %.c # @echo "$< -> $@" # @@CC@ $(CFLAGS) -c $< -o $@ %.o : %.cc @echo "$< -> $@" @@CXX@ $(CXXFLAGS) -c $< -o $@ ################ # DEPENDENCIES # ################ dep: @echo -n "Generating dependancies... " @@CXX@ -MM @WX_CXXFLAGS@ $(OBJS:.o=.cc) unit_test.cc \ | sed "s#[ ][-A-Za-z0-9./]*/wx/[-A-Za-z0-9./]*\.h##g" \ | grep -v "^[ ]*\\\\$$" > depend.1 @echo "done!" ifeq (depend.1, $(wildcard depend.1)) include depend.1 endif distdir = ../$(PACKAGE)-$(VERSION)/$(subdir) dist: GNUmakefile $(DISTFILES) for file in $(DISTFILES) ; do \ ln $$file $(distdir) 2>/dev/null || \ cp -p $$file $(distdir) ; \ done mkdir $(distdir)/flags for file in flags/*.xpm ; do \ ln $$file $(distdir)/flags 2>/dev/null || \ cp -p $$file $(distdir)/flags ; \ done graphthing-1.3.2/src/graph.cc0000644000076500007650000002514610501136234016346 0ustar dsymondsdsymonds// // graph.cc // #include "wx/string.h" #include #include #include #include #include #include #include #include "config.h" #include "edge.h" #include "graph.h" #include "vertex.h" void Graph::reindex () { Vmap.erase (Vmap.begin (), Vmap.end ()); Graph::v_const_iterator vit; for (vit = v_begin (); vit != v_end (); ++vit) Vmap[(*vit)->label] = *vit; } Graph::Graph () { e_selected_head = 0; v_selected_head = 0; } Graph::Graph (const Graph &other) { Graph::e_const_iterator eit; Graph::v_const_iterator vit; Vertex *v; e_selected_head = 0; v_selected_head = 0; // Copy vertices across for (vit = other.v_begin (); vit != other.v_end (); ++vit) { v = new Vertex (**vit); (*vit)->map_to = v; add (v); } // Now copy edges for (eit = other.e_begin (); eit != other.e_end (); ++eit) { Edge *e = new Edge ((*eit)->v->map_to, (*eit)->w->map_to, (*eit)->directed, (*eit)->weight); add (e); } } Graph::~Graph () { clear (); } std::ostream &operator<< (std::ostream &o, const Graph &g) { Graph::e_const_iterator eit; Graph::v_const_iterator vit; Graph::tag_iterator tit; // Info section - empty at the moment o << "info {\n"; for (tit = g.tag_begin (); tit != g.tag_end (); ++tit) { o << "\t" << tit->first.mb_str (wxConvUTF8) << " = \"" << tit->second.mb_str (wxConvUTF8) << "\"\n"; } o << "}\n\n"; // Dump vertices for (vit = g.v_begin (); vit != g.v_end (); ++vit) o << **vit; o << '\n'; // Dump edges for (eit = g.e_begin (); eit != g.e_end (); ++eit) o << **eit; return o; } Graph *Graph::load (const wxString &fname, bool &success) { return (load (fname.mb_str (wxConvUTF8), success)); } Graph *Graph::load (const char *fname, bool &success) { extern Graph *new_graph; // in gt-bison.y extern std::fstream *yy_gt_fs; #if 0 // debug extern int yy_gt_debug; yy_gt_debug = 1; #endif extern int yy_gt_parse (void); std::fstream fs; fs.open (fname, std::fstream::in); if (!fs.is_open ()) { // std::cerr << "*** Couldn't open \"" << fname << "\"\n"; return 0; } // We don't want anything skipped #ifdef USING_FREEBSD #include #if __FreeBSD_version >= 500035 fs.setf (std::ios_base::fmtflags (0)); #else fs.setf (0); #endif #else fs.setf (std::ios_base::fmtflags (0)); #endif new_graph = new Graph (); yy_gt_fs = &fs; success = (yy_gt_parse () == 0); fs.close (); return new_graph; } void Graph::save (const wxString &fname) const { save (fname.mb_str (wxConvUTF8)); } void Graph::save (const char *fname) const { std::fstream fs; fs.open (fname, std::fstream::out); if (!fs.is_open ()) { // std::cerr << "*** Couldn't open \"" << fname << "\"\n"; throw std::runtime_error ("Couldn't open file."); } fs << *this; fs.close (); } wxString Graph::get_tag (const char *tag) const { return get_tag (wxString (tag, wxConvUTF8)); } wxString Graph::get_tag (const wxString tag) const { std::map::const_iterator it; it = tags.find (tag); if (it == tags.end ()) return wxString (wxT("")); return it->second; } void Graph::set_tag (const char *tag, wxString value) { set_tag (wxString (tag, wxConvUTF8), value); } void Graph::set_tag (const wxString tag, wxString value) { tags[tag] = value; } void Graph::clear () { for (; !E.empty (); E.pop_back ()) delete E.back (); for (; !V.empty (); V.pop_back ()) delete V.back (); Vmap.erase (Vmap.begin (), Vmap.end ()); } void Graph::add (Edge *e) { if (are_adjacent (e->v, e->w, e->directed)) { delete e; return; // fail silently } e->selected = false; e->selection_colour = 0; E.push_back (e); e->v->hook (e); e->w->hook (e); } void Graph::add (Vertex *v) { if (v->label.empty () || find (v->label)) v->label = unique_label (); v->selected = false; v->selection_colour = 0; V.push_back (v); Vmap[v->label] = v; } void Graph::rename (Vertex *v, const wxString &new_label) { Vmap.erase (v->label); v->label = new_label; Vmap[v->label] = v; } Vertex *Graph::find (const char *label) const { return find (wxString (label, wxConvUTF8)); } Vertex *Graph::find (const wxString &label) const { std::map::const_iterator it; it = Vmap.find (label); if (it == Vmap.end ()) return 0; return it->second; } Edge *Graph::find (const Vertex *v1, const Vertex *v2, bool dir) const { Graph::e_const_iterator eit; if (!dir && (v1->degree () > v2->degree ())) { const Vertex *tmp = v1; v1 = v2; v2 = tmp; } if (!dir) { for (eit = v1->e_begin (); eit != v1->e_end (); ++eit) { if ((*eit)->incident_to (v2)) return *eit; } } else { for (eit = v1->e_begin (); eit != v1->e_end (); ++eit) { if ((*eit)->v != v1) continue; if ((*eit)->w == v2) return *eit; } } return 0; } void Graph::remove (Edge *e) { Graph::e_iterator eit; if (e->selected) unselect (e); e->v->unhook (e); e->w->unhook (e); for (eit = e_begin (); eit != e_end (); ++eit) { if (**eit == *e) { E.erase (eit); delete e; break; } } } void Graph::remove (Vertex *v) { Graph::e_iterator eit; Graph::v_iterator vit; if (v->selected) unselect (v); // Remove edges incident to v for (eit = v->e_begin (); v->degree (); ) remove (*eit); // Remove v Vmap.erase (v->label); for (vit = v_begin (); vit != v_end (); ++vit) { if (*vit == v) { V.erase (vit); delete v; break; } } } void Graph::select (Edge *e) { if (e->selected) return; e->selected = true; e->next = e_selected_head; e_selected_head = e; } void Graph::select (Vertex *v) { if (v->selected) return; v->selected = true; v->next = v_selected_head; v_selected_head = v; } void Graph::unselect (Edge *e) { if (!e->selected) return; e->selected = false; e->selection_colour = 0; if (e_selected_head == e) e_selected_head = e->next; else { Edge *prev = e_selected_head; while (prev->next != e) prev = prev->next; prev->next = e->next; } e->next = 0; } void Graph::unselect (Vertex *v) { if (!v->selected) return; v->selected = false; v->selection_colour = 0; if (v_selected_head == v) v_selected_head = v->next; else { Vertex *prev = v_selected_head; while (prev->next != v) prev = prev->next; prev->next = v->next; } v->next = 0; } void Graph::unselect_all () { while (e_selected_head) unselect (e_selected_head); while (v_selected_head) unselect (v_selected_head); } wxString Graph::unique_label (int level) const { wxString buf (wxT("A")); int i; for (i = 0; i < level; ++i) buf += wxT("-dup"); do { if (!find (buf)) return buf; buf[0]++; //buf.set (0, buf[0] + 1); } while (buf[0] <= 'Z'); // Failed - try next level return (unique_label (level + 1)); } bool Graph::are_adjacent (const Vertex *v1, const Vertex *v2, bool dir) const { Graph::e_const_iterator eit; if (!dir && (v1->degree () > v2->degree ())) { const Vertex *tmp = v1; v1 = v2; v2 = tmp; } if (!dir) { for (eit = v1->e_begin (); eit != v1->e_end (); ++eit) { if ((*eit)->incident_to (v2)) return true; } } else { for (eit = v1->e_begin (); eit != v1->e_end (); ++eit) { if ((*eit)->directed) { if (((*eit)->v != v1)) continue; if ((*eit)->w == v2) return true; } else if ((*eit)->incident_to (v2)) return true; } } return false; } void Graph::identify (Vertex *v1, Vertex *v2) { Edge *e; Graph::e_const_iterator eit; unselect (v1); unselect (v2); // Swap vertices, so least-degree vertex is v1 if (v1->degree () > v2->degree ()) { Vertex *tmp = v1; v1 = v2; v2 = tmp; } // Remove any edge between them while ((e = find (v1, v2, false))) remove (e); // Now move all edges to v2, then destroy v1 for (eit = v1->e_begin (); eit != v1->e_end (); ++eit) { Vertex *valt; valt = v1->opposite (*eit); if ((*eit)->directed) { if ((*eit)->v == v1) { if (are_adjacent (v2, valt, true)) continue; add (new Edge (v2, valt, true)); } else { if (are_adjacent (valt, v2, true)) continue; add (new Edge (valt, v2, true)); } } else { if (are_adjacent (valt, v2, false)) continue; add (new Edge (valt, v2)); } } remove (v1); } // Return a subgraph induced by the marked (mark != 0) vertices Graph *Graph::subgraph_marked () const { Graph *ret; Graph::e_const_iterator eit; Graph::v_const_iterator vit; ret = new Graph; for (vit = v_begin (); vit != v_end (); ++vit) if ((*vit)->mark) ret->add (new Vertex (**vit)); for (eit = e_begin (); eit != e_end (); ++eit) { Edge *e = *eit; if (e->v->mark && e->w->mark) ret->add (new Edge (ret->find (e->v->label), ret->find (e->w->label))); } return ret; } Graph *Graph::line_graph () const { Graph *ret = new Graph (); Graph::e_const_iterator eit, eit2; Graph::v_const_iterator vit; for (eit = e_begin (); eit != e_end (); ++eit) { Edge *e = *eit; //wxString s = e->v->label + "," + e->w->label; Vertex *v = new Vertex ("", (e->v->x + e->w->x) / 2, (e->v->y + e->w->y) / 2); e->mark = (long) v; ret->add (v); } for (vit = v_begin (); vit != v_end (); ++vit) { Vertex *v = *vit; for (eit = v->e_begin (); eit != v->e_end (); ++eit) { Vertex *lg_1 = (Vertex *) (*eit)->mark; for (eit2 = eit + 1; eit2 != v->e_end (); ++eit2) { Vertex *lg_2 = (Vertex *) (*eit2)->mark; if (!are_adjacent (lg_1, lg_2)) ret->add (new Edge (lg_1, lg_2)); } } } return ret; } Graph *Graph::flattened () const { Graph::e_const_iterator eit; Graph::v_const_iterator vit; Graph *g = new Graph (); // Copy vertices across for (vit = v_begin (); vit != v_end (); ++vit) g->add (new Vertex (**vit)); // Now copy edges for (eit = e_begin (); eit != e_end (); ++eit) { Edge *e = new Edge ( g->find ((*eit)->v->label), g->find ((*eit)->w->label), false, (*eit)->weight); g->add (e); } return g; } Graph::e_iterator Graph::e_begin () { return E.begin (); } Graph::e_iterator Graph::e_end () { return E.end (); } Graph::v_iterator Graph::v_begin () { return V.begin (); } Graph::v_iterator Graph::v_end () { return V.end (); } Graph::e_const_iterator Graph::e_begin () const { return E.begin (); } Graph::e_const_iterator Graph::e_end () const { return E.end (); } Graph::v_const_iterator Graph::v_begin () const { return V.begin (); } Graph::v_const_iterator Graph::v_end () const { return V.end (); } Vertex *Graph::operator[] (unsigned int i) { return V[i]; } const Vertex *Graph::operator[] (unsigned int i) const { return V[i]; } Graph::tag_iterator Graph::tag_begin () const { return tags.begin (); } Graph::tag_iterator Graph::tag_end () const { return tags.end (); } unsigned int Graph::order () const { return V.size (); } unsigned int Graph::num_edges () const { return E.size (); } graphthing-1.3.2/src/graph.h0000644000076500007650000000702410501136234016203 0ustar dsymondsdsymonds// // graph.h // #ifndef __GRAPH_H__ #define __GRAPH_H__ #include "wx/string.h" #include #include #include #include #include #include "matrix.h" class Edge; class Polynomial; class Vertex; class Graph { private: std::vector E; std::vector V; std::map tags; std::map Vmap; void reindex (); public: typedef std::vector::iterator e_iterator; typedef std::vector::iterator v_iterator; typedef std::vector::const_iterator e_const_iterator; typedef std::vector::const_iterator v_const_iterator; typedef std::map::const_iterator tag_iterator; Edge *e_selected_head; Vertex *v_selected_head; Graph (); Graph (const Graph &other); ~Graph (); friend std::ostream &operator<< (std::ostream &o, const Graph &g); static Graph *load (const wxString &fname, bool &success); static Graph *load (const char *fname, bool &success); void save (const wxString &fname) const; void save (const char *fname) const; wxString get_tag (const char *tag) const; wxString get_tag (const wxString tag) const; void set_tag (const char *tag, const wxString value); void set_tag (const wxString tag, const wxString value); void clear (); void add (Edge *e); void add (Vertex *v); void rename (Vertex *v, const wxString &new_label); Vertex *find (const char *label) const; Vertex *find (const wxString &label) const; Edge *find (const Vertex *v1, const Vertex *v2, bool dir = false) const; void remove (Edge *e); void remove (Vertex *v); void select (Edge *e); void select (Vertex *v); void unselect (Edge *e); void unselect (Vertex *v); void unselect_all (); wxString unique_label (int level = 0) const; bool are_adjacent (const Vertex *v1, const Vertex *v2, bool dir = false) const; void identify (Vertex *v1, Vertex *v2); Graph *subgraph_marked () const; Graph *line_graph () const; Graph *flattened () const; e_iterator e_begin (); e_iterator e_end (); v_iterator v_begin (); v_iterator v_end (); e_const_iterator e_begin () const; e_const_iterator e_end () const; v_const_iterator v_begin () const; v_const_iterator v_end () const; Vertex *operator[] (unsigned int i); const Vertex *operator[] (unsigned int i) const; tag_iterator tag_begin () const; tag_iterator tag_end () const; unsigned int order () const; unsigned int num_edges () const; //********************************************* // The following methods are all in graph2.cc * //********************************************* private: bool is_bridge (Edge *e) const; public: bool is_undirected () const; bool is_connected (bool dir = false, Vertex *start = 0) const; bool is_strongly_connected () const; void eulericity (bool &euler, bool &semi, wxString &tour) const; void mark_shortest_path (Vertex *v1, Vertex *v2); int diameter (bool sel = false); int radius (bool sel = false); Matrix adjacency_matrix () const; void bfs (Vertex *v, wxString &s); void dfs (Vertex *v, wxString &s); void minimum_spanning_tree (std::set &result) const; int ford_fulkerson (Vertex *src, Vertex *dest); int chromatic_number () const; Polynomial chromatic_polynomial () const; bool try_colouring (unsigned int colours); private: void traversal_visit (Vertex *v, wxString &s, int &cnt); int dfs_do (Vertex *v, wxString &s, int cnt); bool check_colouring (unsigned int colours) const; // Destructive! Polynomial chromatic_poly (double startP, double endP); }; #endif // __GRAPH_H__ graphthing-1.3.2/src/graph2.cc0000644000076500007650000006146010501136234016427 0ustar dsymondsdsymonds// // graph2.cc // #include "wx/string.h" #include #include #include #include #include #include "edge.h" #include "graph.h" #include "main.h" #include "math.h" #include "matrix.h" #include "polynomial.h" #include "vertex.h" bool Graph::is_bridge (Edge *e) const { Graph *tmp = new Graph (*this); bool res; tmp->remove (tmp->find (tmp->find (e->v->label), tmp->find (e->w->label), e->directed)); res = tmp->is_connected (); delete tmp; return !res; } bool Graph::is_undirected () const { Graph::e_const_iterator eit; for (eit = e_begin (); eit != e_end (); ++eit) if ((*eit)->directed) return false; return true; } bool Graph::is_connected (bool dir, Vertex *start) const { bool done; unsigned int marks; Graph::e_const_iterator eit; Graph::v_const_iterator vit; if (V.empty ()) return true; // null graph is connected if (num_edges () < (order () - 1)) return false; // not enough edges // Unmark all edges and vertices initially for (eit = e_begin (); eit != e_end (); ++eit) (*eit)->mark = 0; for (vit = v_begin (); vit != v_end (); ++vit) (*vit)->mark = 0; if (!start) start = V[0]; start->mark = 1; // Algorithm: Iterate through edge list, marking vertices adjacent // to already-marked vertices, until no more can be marked marks = 1; do { done = true; for (eit = e_begin (); eit != e_end (); ++eit) { Edge *e = *eit; if (e->mark) continue; if (!e->v->mark && !e->w->mark) continue; if (!dir || !e->directed) { if (e->v->mark != e->w->mark) marks++; e->v->mark = e->w->mark = e->mark = 1; done = false; } else { if (!e->v->mark && e->w->mark) continue; marks++; e->w->mark = e->mark = 1; done = false; } } } while (!done); if (marks < order ()) return false; return true; } // TODO: this is horribly slow (but at least correct!) bool Graph::is_strongly_connected () const { Graph::v_const_iterator vit; for (vit = v_begin (); vit != v_end (); ++vit) { if (!is_connected (true, *vit)) return false; } return true; } void Graph::eulericity (bool &euler, bool &semi, wxString &tour) const { int cnt; Graph::v_const_iterator vit; const Vertex *v, *w; bool undir; euler = false; semi = false; if (!is_connected ()) return; undir = is_undirected (); if (undir) { cnt = 0; v = w = 0; for (vit = v_begin (); vit != v_end (); ++vit) { int odd = (*vit)->degree () & 1; if (!odd) continue; cnt += 1; if (cnt == 1) v = *vit; else if (cnt == 2) w = *vit; if (cnt > 2) break; } if (cnt == 0) // Eulerian euler = true; else if (cnt == 2) // Semi-Eulerian semi = true; } else { cnt = 0; v = w = 0; for (vit = v_begin (); vit != v_end (); ++vit) { int ind = (*vit)->indegree (); int outd = (*vit)->outdegree (); if (ind != outd) { ++cnt; if (outd == ind + 1) { if (v) break; v = *vit; } else if (ind == outd + 1) { if (w) break; w = *vit; } else break; } } if (cnt == 0) euler = true; else if ((cnt == 2) && v && w) semi = true; } // Use Fleury's Algorithm Graph *red = new Graph (*this); std::vector tour_e; std::vector tour_v; const Vertex *curr_this, *curr_red; // We always start with vertex v when semi-Eulerian; otherwise pick any curr_this = semi ? v : V[0]; curr_red = red->find (curr_this->label); tour_v.push_back (curr_this); while (1) { if ((curr_red->degree () == 0) && (curr_red->outdegree () == 0)) break; // pick an edge Edge *sel, *fail = 0; Graph::e_const_iterator eit, last = curr_red->e_end (); for (eit = curr_red->e_begin (); eit != last; ++eit) { if ((*eit)->directed && ((*eit)->v != curr_red)) continue; if (red->is_bridge (*eit)) { fail = *eit; continue; } if (!(undir || (*eit)->directed)) { fail = *eit; continue; } break; } sel = (eit == last) ? fail : *eit; Vertex *dst_red = curr_red->opposite (sel); Edge *e = find (curr_this, find (dst_red->label), sel->directed); curr_red = dst_red; red->remove (sel); curr_this = curr_this->opposite (e); tour_e.push_back (e); tour_v.push_back (curr_this); } delete red; std::vector::const_iterator cvit; int num = 0; for (cvit = tour_v.begin (); cvit != tour_v.end (); ++cvit) { if (num > 0) tour += wxT(", "); ++num; tour += (*cvit)->label; } } void Graph::mark_shortest_path (Vertex *v1, Vertex *v2) { Graph::e_const_iterator eit; Graph::v_iterator vit; // Method: Dijkstra's Algorithm // (vertex->mark is shortest distance from source + 1) // (if vertex->mark is negative, it's an estimate) // Mark all vertices as belonging to the V\S set for (vit = v_begin (); vit != v_end (); ++vit) (*vit)->mark = 0; v1->mark = 1; while (1) { // If every vertex is marked, break for (vit = v_begin (); vit != v_end (); ++vit) if ((*vit)->mark < 1) break; if (vit == v_end ()) break; // all marked // Revise estimates for (vit = v_begin (); vit != v_end (); ++vit) { Vertex *v = *vit; if (v->mark > 0) continue; // already marked v->mark = 0; eit = v->e_begin (); for (; eit != v->e_end (); ++eit) { Edge *e = *eit; Vertex *alt = v->opposite (e); if (e->directed && (v != e->w)) continue; if (alt->mark < 1) continue; if (((alt->mark + e->weight) < -v->mark) || (v->mark == 0)) v->mark = -(alt->mark + e->weight); } } // Find smallest estimate, and mark it permanently Vertex *min = v1; bool none_yet = true; int min_val = 0; for (vit = v_begin (); vit != v_end (); ++vit) { if ((*vit == v1) || ((*vit)->mark >= 0)) continue; if ((min_val > -(*vit)->mark) || none_yet) { min = *vit; min_val = -min->mark; none_yet = false; } } if (min == v1) break; // filled all possible // Mark this vertex permanently min->mark = -min->mark; if (min == v2) break; // cut search short } // Adjust marks to be correct distances for (vit = v_begin (); vit != v_end (); ++vit) { Vertex *v = *vit; if (v->mark > 0) v->mark -= 1; else v->mark = -1; } } // TODO: digraph fixes? int Graph::diameter (bool sel) { int best_dist; Vertex *best_src, *best_dst; Graph::v_iterator vit1, vit2; if (order () < 2) return 0; best_dist = -1; best_src = best_dst = 0; for (vit1 = v_begin (); (vit1 + 1) != v_end (); ++vit1) { mark_shortest_path (*vit1, 0); for (vit2 = vit1 + 1; vit2 != v_end (); ++vit2) { if (best_dist < (*vit2)->mark) { best_src = *vit1; best_dst = *vit2; best_dist = best_dst->mark; } } } if (best_dist < 0) return 0; if (!sel) return best_dist; // Select longest shortest path marked mark_shortest_path (best_src, best_dst); unselect_all (); select (best_dst); while (best_dst != best_src) { Graph::e_const_iterator eit; Vertex *alt = 0; eit = best_dst->e_begin (); for (; eit != best_dst->e_end (); ++eit) { alt = best_dst->opposite (*eit); if (best_dst->mark == (alt->mark + (*eit)->weight)) break; } if (eit == best_dst->e_end ()) break; // Uh, oh! select (*eit); select (alt); best_dst = alt; } return best_dist; } // TODO: digraph fixes? int Graph::radius (bool sel) { int best_dist, sub_best_dist; Vertex *best_src; Graph::v_iterator vit1, vit2; if (order () < 2) return 0; best_dist = -1; best_src = 0; for (vit1 = v_begin (); vit1 != v_end (); ++vit1) { mark_shortest_path (*vit1, 0); sub_best_dist = -1; for (vit2 = v_begin (); vit2 != v_end (); ++vit2) { if (sub_best_dist < (*vit2)->mark) sub_best_dist = (*vit2)->mark; } if (sub_best_dist == -1) continue; if ((best_dist == -1) || (sub_best_dist < best_dist)) { best_src = *vit1; best_dist = sub_best_dist; } } if (best_dist < 0) return 0; if (sel) { // Select most central vertex unselect_all (); select (best_src); } return best_dist; } Matrix Graph::adjacency_matrix () const { Matrix ret (order (), order ()); unsigned int i, j; for (j = 0; j < order (); ++j) for (i = 0; i < order (); ++i) { if (i == j) { ret (i, j) = 0; continue; } Edge *e = find (V[i], V[j], true); if (!e) { e = find (V[i], V[j], false); if (e && e->directed && (e->v == V[j])) e = NULL; } ret (i, j) = e ? e->weight : 0; } return ret; } void Graph::bfs (Vertex *v, wxString &s) { Graph::e_const_iterator eit; Graph::v_iterator vit; std::queue vq; int cnt = 1; // Set all marks to 0 for (vit = v_begin (); vit != v_end (); ++vit) (*vit)->mark = 0; traversal_visit (v, s, cnt); vq.push (v); while (!vq.empty ()) { v = vq.front (); vq.pop (); for (eit = v->e_begin (); eit != v->e_end (); ++eit) { if ((*eit)->directed && ((*eit)->v != v)) continue; Vertex *opp = v->opposite (*eit); if (opp->mark) continue; traversal_visit (opp, s, cnt); vq.push (opp); } } } void Graph::dfs (Vertex *v, wxString &s) { Graph::v_iterator vit; // Set all marks to 0 for (vit = v_begin (); vit != v_end (); ++vit) (*vit)->mark = 0; dfs_do (v, s, 1); } static bool lt_weight (const Edge *a, const Edge *b) { return a->weight < b->weight; } struct lt_vertex { bool operator () (const Vertex *v1, const Vertex *v2) const { return ((v1->x < v2->x) || ((v1->x == v2->x) && (v1->y < v2->y))); } }; void Graph::minimum_spanning_tree (std::set &result) const { // Use Kruskal's Algorithm result.clear (); // set of sets, each set contains a connected component std::set< std::set > comps; // list to contain the edges sorted by their weight std::list w_edge; Graph::v_const_iterator vit; Graph::e_const_iterator eit; // firstly, the vertices are in separated components for (vit = v_begin (); vit != v_end (); ++vit) { std::set tmp; tmp.insert (*vit); comps.insert (tmp); } // add all the edges to the edge set for (eit = e_begin (); eit != e_end (); ++eit) w_edge.push_back (*eit); w_edge.sort (lt_weight); // loop while not all edges are processed while (!w_edge.empty ()) { // get edge with the smallest weight Edge *current = w_edge.front (); // does it straddle two components? std::set< std::set >::iterator sit = comps.begin (), foundv = comps.end (), foundw = comps.end (); for (; sit != comps.end (); ++sit) { if ((*sit).find (current->v) != (*sit).end ()) foundv = sit; if ((*sit).find (current->w) != (*sit).end ()) foundw = sit; } if (foundv != foundw) { // in different components => add to MST std::set un; result.insert (current); un.insert (foundv->begin (), foundv->end ()); un.insert (foundw->begin (), foundw->end ()); comps.erase (foundv); comps.erase (foundw); comps.insert (un); } // done with this edge w_edge.pop_front (); } } //#define FF_DEBUG // This implementation is based on what was found on p170 of: // "Graphs, Algorithms, and Optimization" (Kocay and Kreher) // It is an augmenting-path implementation of Ford-Fulkerson, // using a BFS approach to finding shortest augmenting paths. int Graph::ford_fulkerson (Vertex *src, Vertex *dest) { Graph *g; std::map PrevPt; std::map ResCap; std::map::iterator vvit; Graph::v_iterator vit; Graph::e_iterator eit; int total_flow = 0; // Handle undirected edges by making a new graph, replacing all the // undirected edges with a pair of directed edges (one each way), of // the same capacity g = new Graph (*this); src = g->find (src->label); dest = g->find (dest->label); std::list undir_e; // list of undirected edges for (eit = g->e_begin (); eit != g->e_end (); ++eit) { if (!(*eit)->directed) undir_e.push_back (*eit); } std::list::iterator u_eit; for (u_eit = undir_e.begin (); u_eit != undir_e.end (); ++u_eit) { Edge *e = *u_eit; Vertex *v = e->v, *w = e->w; int weight = e->weight; g->remove (e); g->add (new Edge (v, w, true, weight)); g->add (new Edge (w, v, true, weight)); } // Usage of vertex->mark: [bitmask] // 1 = is in ScanQ (for speeding up lookup) // Set all flow to 0 for (eit = g->e_begin (); eit != g->e_end (); ++eit) { Edge *e = *eit; e->flow = 0; } for (vit = g->v_begin (); vit != g->v_end (); ++vit) { Vertex *v = *vit; PrevPt[v] = 0; v->mark = 0; //ResCap[v] = 0; } // Compute residual capacity at source vertex int max_cap = 0; for (eit = src->e_begin (); eit != src->e_end (); ++eit) max_cap += (*eit)->weight; while (true) { // search for an augmenting path std::queue ScanQ; for (vit = g->v_begin (); vit != g->v_end (); ++vit) { (*vit)->mark &= ~1; // ScanQ is empty ResCap[*vit] = 0; // XXX: check this } ResCap[src] = max_cap; ScanQ.push (src); src->mark |= 1; #ifdef FF_DEBUG std::cerr << "FF: Looking for augmenting path...\n"; #endif do { Vertex *u = ScanQ.front (); ScanQ.pop (); for (eit = u->e_begin (); eit != u->e_end (); ++eit) { Edge *e = *eit; Vertex *v = u->opposite (e); if (v->mark & 1) // v is in ScanQ continue; // v is not in ScanQ #ifdef FF_DEBUG std::cerr << "\tTrying (" << u->label << "," << v->label << "), " << v->label << "->mark=" << v->mark << ", " << " e->flow=" << e->flow << "\n"; #endif // Assume directed edge if (e->v == u) { // forward edge if (e->weight > e->flow) { ScanQ.push (v); v->mark |= 1; PrevPt[v] = u; int del = e->weight - e->flow; if (ResCap[u] < del) ResCap[v] = ResCap[u]; else ResCap[v] = del; if (v == dest) goto ford_fulkerson_augment; } } else { // backward edge if (e->flow > 0) { ScanQ.push (v); v->mark |= 1; PrevPt[v] = u; if (ResCap[u] < e->flow) ResCap[v] = ResCap[u]; else ResCap[v] = e->flow; if (v == dest) goto ford_fulkerson_augment; } } } } while (!ScanQ.empty ()); ford_fulkerson_all_done: // All done! for (eit = e_begin (); eit != e_end (); ++eit) { Edge *e_orig = *eit; Vertex *v_dup = g->find (e_orig->v->label), *w_dup = g->find (e_orig->w->label); if (e_orig->directed) { Edge *e_dup = g->find (v_dup, w_dup, true); e_orig->flow = e_dup->flow; } else { Edge *e1_dup = g->find (v_dup, w_dup, true), *e2_dup = g->find (w_dup, v_dup, true); int f1 = e1_dup->flow, f2 = e2_dup->flow; if (f1 > f2) e_orig->flow = f1 - f2; else e_orig->flow = f2 - f1; } } return total_flow; ford_fulkerson_augment: // AUGMENTFLOW(t): { Vertex *v = dest; Vertex *u = PrevPt[v]; int delta = ResCap[dest]; #ifdef FF_DEBUG std::cerr << "\tAugmentFlow w/ delta=" << delta << "\n"; std::cerr << "\t" << v->label; #endif if (delta == 0) goto ford_fulkerson_all_done; while (u) { #ifdef FF_DEBUG std::cerr << " <- " << u->label; #endif Edge *e = g->find (u, v, true); if (e) // forward edge e->flow += delta; else { // backward edge e = g->find (v, u, true); e->flow -= delta; } v = u; u = PrevPt[v]; } total_flow += delta; #ifdef FF_DEBUG std::cerr << ".\n"; #endif } for (vit = v_begin (); vit != v_end (); ++vit) PrevPt[*vit] = 0; } } int Graph::chromatic_number () const { switch (order ()) { case 0: return -1; // undefined! case 1: return 1; } if (num_edges () == 0) return 1; // try colouring with only a few colours { // TODO: not an ideal approach... Graph g (*this); if (g.try_colouring (2)) return 2; if (g.try_colouring (3)) return 3; } // Note that the only value that try_colouring is guaranteed to succeed // for (when a colouring is possible) is 2. Thus we can only go up to // 3, since try_colouring(3) failing does not preclude the graph from // being 3-colourable. Once we've retrofitted a better algorithm into // try_colouring(), then we may safely increase this number. Polynomial p = chromatic_polynomial (); unsigned int i; for (i = 1; i < order (); ++i) if (p.eval (i) != 0) return i; return i; } void Graph::traversal_visit (Vertex *v, wxString &s, int &cnt) { v->mark = cnt++; if (cnt > 2) s += wxT(", "); s += v->label; } int Graph::dfs_do (Vertex *v, wxString &s, int cnt) { Graph::e_const_iterator eit; traversal_visit (v, s, cnt); for (eit = v->e_begin (); eit != v->e_end (); ++eit) { if ((*eit)->directed && ((*eit)->v != v)) continue; Vertex *opp = v->opposite (*eit); if (!opp->mark) cnt = dfs_do (opp, s, cnt); } return cnt; } Polynomial Graph::chromatic_polynomial () const { Graph *g = flattened (); Polynomial p; p = g->chromatic_poly (0.0, 1.0); delete g; return p; } Polynomial Graph::chromatic_poly (double startP, double endP) { Graph::e_const_iterator eit; Graph::v_const_iterator vit; unsigned int edge_num, vertex_num; bool subtract; edge_num = E.size (); vertex_num = order (); // Some quick, simple cases if (vertex_num == 0) return Polynomial (1); else if (vertex_num == 1) return Polynomial (1, 0); // x else if (vertex_num == 2) { if (edge_num == 0) return Polynomial (1, 0, 0); // x^2 else return Polynomial (1, -1, 0); // x^2 - x } else if (vertex_num == 3) { switch (edge_num) { case 0: return Polynomial (1, 0, 0, 0); case 1: return Polynomial (1, -1, 0, 0); case 2: return Polynomial (1, -2, 1, 0); case 3: return Polynomial (1, -3, 2, 0); } } if (edge_num == 0) { Polynomial p; p[vertex_num] = 1; return p; } // Remove degree 0 vertices std::queue vq; int cnt = 0; for (vit = v_begin (); vit != v_end (); ++vit) if ((*vit)->degree () == 0) vq.push (*vit); while (!vq.empty ()) { remove (vq.front ()); vq.pop (); ++cnt; } if (cnt) { Polynomial p; p[cnt] = 1; return chromatic_poly (startP, endP) * p; } // Remove degree 1 vertices int tot = 0; do { std::queue vq; cnt = 0; for (vit = v_begin (); vit != v_end (); ++vit) if ((*vit)->degree () == 1) vq.push (*vit); while (!vq.empty ()) { if (vq.front ()->degree () == 1) { remove (vq.front ()); ++cnt; } vq.pop (); } tot += cnt; } while (cnt > 0); if (tot) return chromatic_poly (startP, endP) // XXX: fine tune * Polynomial::binomial (-1, tot); // Assumptions: |V| >= 4, |E| >= 1 // Firstly, if the graph is not connected, calculate polynomials // for each component, then compute their product if (!is_connected ()) { Graph gm; // marked subgraph std::queue vq; // marked vertices std::queue eq; // marked edges // Extract marked subgraph for (vit = v_begin (); vit != v_end (); ++vit) { if (!(*vit)->mark) continue; vq.push (*vit); gm.add (new Vertex ((*vit)->label, 0, 0)); } for (eit = e_begin (); eit != e_end (); ++eit) { if (!(*eit)->mark) continue; eq.push (*eit); gm.add (new Edge (gm.find ((*eit)->v->label), gm.find ((*eit)->w->label))); } while (!eq.empty ()) { remove (eq.front ()); eq.pop (); } while (!vq.empty ()) { remove (vq.front ()); vq.pop (); } // XXX: fine-tune double weight = (double) order () / (order () + gm.order ()); double midP = startP + weight * (endP - startP); Polynomial p1 = chromatic_poly (startP, midP); Polynomial p2 = gm.chromatic_poly (midP, endP); return p1 * p2; } // Assumptions: |V| >= 4, |E| >= 1, connected // Is it a tree? if (edge_num == (vertex_num - 1)) { // binomial expansion: x(x-1)^(v-1) return Polynomial (1, 0) * Polynomial::binomial (-1, edge_num); } // Assumptions: |E| >= |V| >= 4, connected, cyclic // Special cases for common graphs if ((vertex_num == 4) && (edge_num == 4)) { // either C4, or irregular if ((V[0]->degree () != 2) || (V[1]->degree () != 2) || (V[2]->degree () != 2)) return Polynomial (1, -4, 5, -2, 0); // irregular else return Polynomial (1, -4, 6, -3, 0); // C4 } if ((vertex_num == 4) && (edge_num == 5)) return Polynomial (1, -5, 8, -4, 0); // K4 - 1 edge if ((vertex_num == 4) && (edge_num == 6)) return Polynomial (1, -6, 11, -6, 0); // K4 if ((vertex_num == 5) && (edge_num == 10)) return Polynomial (1, -10, 35, -50, 24, 0); // K5 // Assumptions: |E| >= |V| >= 5, connected, cyclic // Handle complete graphs if ((2 * edge_num) == (vertex_num * (vertex_num - 1))) { int i, sign = (vertex_num & 1) ? -1 : 1; Polynomial p; p[vertex_num] = 1; for (i = 0; i < (signed) vertex_num; ++i, sign = -sign) p[i] = sign * Math::stirling (vertex_num, i); return p; } // Assumptions: |E| >= |V| >= 5, connected, cyclic, not complete // Determine which reduction formula to use. For relatively sparse // graphs (4*e < (v^2 + v)), use the subtractive, otherwise use // the additive. This probably needs some fine tuning. subtract = ((4 * edge_num) < (vertex_num * (vertex_num + 1))); setProgress (startP); double midP = (startP + endP) / 2; if (subtract) { // P(G,x) = P(G-e,x) - P(G|e,x) Graph gm (*this); Edge *gme = 0; // Find a lightly connected edge for (eit = gm.e_begin (); eit != gm.e_end (); ++eit) { int wt; wt = (*eit)->v->degree () + (*eit)->w->degree (); if (!gme || (wt < gme->mark)) { gme = *eit; gme->mark = wt; } } remove (find (find (gme->v->label), find (gme->w->label))); gm.identify (gme->v, gme->w); //return (chromatic_poly () - gm.chromatic_poly ()); Polynomial a = chromatic_poly (startP, midP); setProgress (midP); Polynomial b = gm.chromatic_poly (midP, endP); setProgress (endP); return a - b; } else { // P(G,x) = P(G+e,x) + P(G|e,x) Graph gm (*this); // Find two non-complete vertices to add an edge to Vertex *v1 = 0, *v2 = 0; for (vit = v_begin (); vit != v_end (); ++vit) { if ((*vit)->degree () >= (vertex_num - 1)) continue; if (!v1) v1 = *vit; else if (!are_adjacent (v1, *vit)) { v2 = *vit; break; } } add (new Edge (v1, v2)); gm.identify (gm.find (v1->label), gm.find (v2->label)); //return (chromatic_poly () + gm.chromatic_poly ()); Polynomial a = chromatic_poly (startP, midP); setProgress (midP); Polynomial b = gm.chromatic_poly (midP, endP); setProgress (endP); return a + b; } // Never reached } bool Graph::try_colouring (unsigned int colours) { Graph::v_iterator vit; Graph::e_iterator eit; if (colours < 2) return false; for (vit = v_begin (); vit != v_end (); ++vit) (*vit)->mark = -1; // Special case: 2 colours if (colours == 2) { bool done = false, next_component = true; unsigned int marks_made = 0; while (!done) { done = true; for (vit = v_begin (); vit != v_end (); ++vit) { Vertex *v = *vit; if (v->mark >= 0) continue; if (next_component) { next_component = false; v->mark = 0; ++marks_made; continue; } for (eit = v->e_begin (); eit != v->e_end (); ++eit) { Vertex *v2 = v->opposite (*eit); if (v2->mark < 0) continue; v->mark = 1 - v2->mark; ++marks_made; done = false; break; } } if (done && (marks_made < order ())) { done = false; next_component = true; } } return check_colouring (colours); } // Try the greedy algorithm, with some small modifications: // - the next vertex to colour will be the one with the least // number of uncoloured neighbours // TODO: // * don't assume a connected graph! bool done = false, next_component = true, failed = false; bool *can_use = new bool[colours]; while (!done) { // Find vertex with the least number of uncoloured neighbours, // but with still 1 coloured neighbour Vertex *best_v = 0; unsigned int uncol_neigh = order (); for (vit = v_begin (); vit != v_end (); ++vit) { Vertex *v = *vit; unsigned int num_col = 0, num_uncol = 0; if (v->mark >= 0) continue; if (next_component) { best_v = v; next_component = false; break; } for (eit = v->e_begin (); eit != v->e_end (); ++eit) { Vertex *valt = v->opposite (*eit); if (valt->mark < 0) ++num_uncol; else ++num_col; } if (num_col < 1) continue; if (num_uncol < uncol_neigh) { best_v = v; uncol_neigh = num_uncol; } } if (!best_v) { if (next_component) { done = true; break; // no more components to colour } next_component = true; continue; } //std::cout << "Colouring " << best_v->label << "\n"; unsigned int i; for (i = 0; i < colours; ++i) can_use[i] = true; for (eit = best_v->e_begin (); eit != best_v->e_end (); ++eit) { Vertex *valt = best_v->opposite (*eit); if (valt->mark >= 0) can_use[valt->mark] = false; } for (i = 0; i < colours; ++i) if (can_use[i]) { best_v->mark = i; break; } if (best_v->mark < 0) { // Uh, oh! Failed! failed = true; break; } } delete can_use; if (failed) return false; return check_colouring (colours); } bool Graph::check_colouring (unsigned int colours) const { Graph::e_const_iterator eit; for (eit = e_begin (); eit != e_end (); ++eit) { if ((*eit)->v->mark == (*eit)->w->mark) return false; } return true; } graphthing-1.3.2/src/gt-bison.tab.hh0000644000076500007650000000520510540770345017552 0ustar dsymondsdsymonds/* A Bison parser, made by GNU Bison 2.3. */ /* 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 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* As a special exception, 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 { INTEGER = 258, STRING = 259, TAG = 260, kwINFO = 261, kwDESCRIPTION = 262, kwVERTEX = 263, kwEDGE = 264, kwAT = 265, kwWITH = 266, kwWEIGHT = 267, kwDASH = 268, kwLEFT = 269, kwRIGHT = 270 }; #endif /* Tokens. */ #define INTEGER 258 #define STRING 259 #define TAG 260 #define kwINFO 261 #define kwDESCRIPTION 262 #define kwVERTEX 263 #define kwEDGE 264 #define kwAT 265 #define kwWITH 266 #define kwWEIGHT 267 #define kwDASH 268 #define kwLEFT 269 #define kwRIGHT 270 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE #line 25 "gt-bison.y" { int integer; char *str; } /* Line 1529 of yacc.c. */ #line 84 "gt-bison.tab.hh" YYSTYPE; # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 # define YYSTYPE_IS_TRIVIAL 1 #endif extern YYSTYPE yy_gt_lval; graphthing-1.3.2/src/gt-bison.y0000644000076500007650000000407610501136234016651 0ustar dsymondsdsymonds%{ #include "wx/string.h" #include #include #include #include "edge.h" #include "graph.h" #include "vertex.h" #define YYDEBUG 1 #define YYERROR_VERBOSE int gt_lineno = 1; Graph *new_graph; Edge *e; extern char *yy_gt_text; int yy_gt_error (char *s); int yy_gt_lex (void); %} %union { int integer; char *str; } /* Basic tokens */ %token INTEGER %token STRING TAG /* Construction non-terminals */ %type arrow /* Keywords */ %token kwINFO "info" kwDESCRIPTION "description" %token kwVERTEX "vertex" kwEDGE "edge" kwAT "at" kwWITH "with" %token kwWEIGHT "weight" %token kwDASH "--" kwLEFT "<-" kwRIGHT "->" %% /* Grammar rules and actions follow */ input: info_block objects ; info_block: "info" '{' info_tags '}' ; info_tags: /* empty */ | info_tags info_tag ; info_tag: TAG '=' STRING { wxString tag ($1, wxConvUTF8), value ($3, wxConvUTF8); new_graph->set_tag (tag, value); delete[] $1; delete[] $3; } ; objects: /* empty */ | objects vertex | objects edge ; vertex: "vertex" STRING "at" '(' INTEGER ',' INTEGER ')' { Vertex *v; v = new Vertex ($2, $5, $7); new_graph->add (v); delete[] $2; } ; edge: "edge" STRING arrow STRING { if (!new_graph->find ($2)) { yy_gt_text = $2; yy_gt_error ("Unknown vertex"); YYERROR; } if (!new_graph->find ($4)) { yy_gt_text = $4; yy_gt_error ("Unknown vertex"); YYERROR; } e = new Edge (new_graph->find ($2), new_graph->find ($4), ($3 == 1) ? false : true); delete[] $2; delete[] $4; if ($3 == 2) { Vertex *tmp = e->v; e->v = e->w; e->w = tmp; } } edge_properties { new_graph->add (e); } ; arrow: "--" { $$ = 1; } | "<-" { $$ = 2; } | "->" { $$ = 3; } ; edge_properties: /* empty */ | "with" edge_property ; edge_property: "weight" INTEGER { e->weight = $2; } ; %% int yy_gt_error (char *s) { fprintf (stderr, "gt-parse: %s in line %i, at symbol \"%s\"\n", s, gt_lineno, yy_gt_text); return 1; } graphthing-1.3.2/src/gt-flex.l0000644000076500007650000000276710501136234016465 0ustar dsymondsdsymonds%option noyywrap case-sensitive %{ #define __NO_WX_HEADERS__ #include #include #include #include "gt-bison.tab.hh" #define yylval yy_gt_lval extern int gt_lineno; std::fstream *yy_gt_fs; #define YY_INPUT(buf,result,max_size) \ { \ char _foobuf; \ if (yy_gt_fs->get (_foobuf)) { \ buf[0] = _foobuf; \ result = 1; \ } else \ result = YY_NULL; \ } %} LWS [ \t]+ CRRET \r NEWLINE \n DIGIT [0-9] TAG [A-Za-z0-9_]+ DEC_NUMBER {DIGIT}+ QSTRING \"(([^"])|(\\\"))*\" /************** Start of lexical rules **************/ %% /* Kill all LWS */ {LWS} {CRRET} /* Treat newlines (almost) the same as LWS */ {NEWLINE} { gt_lineno++; } /* Integer constants */ {DEC_NUMBER} { yylval.integer = atoi (yytext); return INTEGER; } /* Quoted Strings */ {QSTRING} { int len = strlen (yytext); yylval.str = new char [len-1]; memcpy (yylval.str, &yytext[1], (len - 2)); yylval.str[len-2] = 0; return STRING; } /* Reserved keywords */ "info" { return kwINFO; } "vertex" { return kwVERTEX; } "edge" { return kwEDGE; } "at" { return kwAT; } "with" { return kwWITH; } "weight" { return kwWEIGHT; } "--" { return kwDASH; } "<-" { return kwLEFT; } "->" { return kwRIGHT; } {TAG} { int len = strlen (yytext); yylval.str = new char [len+1]; memcpy (yylval.str, yytext, len); yylval.str[len] = 0; return TAG; } /* Any other character */ . { return yytext[0]; } %% /************** End of lexical rules **************/ graphthing-1.3.2/src/gui.cc0000644000076500007650000003165110501136234016027 0ustar dsymondsdsymonds// // gui.cc // #include "wx/bitmap.h" #include "wx/frame.h" #include "wx/gauge.h" #include "wx/icon.h" #include "wx/menu.h" #include "wx/msgdlg.h" #include "wx/statusbr.h" #include "wx/string.h" #include "wx/toolbar.h" #include #include "canvas.h" #include "config.h" #include "edge.h" #include "factory.h" #include "graph.h" #include "gui.h" #include "lang.h" #include "undo.h" #include "vertex.h" // Toolbar pixmaps #include "edge_mode.xpm" #include "vertex_mode.xpm" #include "logo.xpm" BEGIN_EVENT_TABLE(GTFrame, wxFrame) EVT_SIZE (GTFrame::OnSize) EVT_MENU (ID_FILE_LOAD, GTFrame::cb_File_Load) EVT_MENU (ID_FILE_SAVE, GTFrame::cb_File_Save) EVT_MENU (ID_FILE_EXIT, GTFrame::cb_File_Exit) EVT_MENU (ID_EDIT_UNDO, GTFrame::cb_Edit_Undo) EVT_MENU (ID_EDIT_SELECTALL, GTFrame::cb_Edit_SelectAll) EVT_MENU (ID_EDIT_SELECTNONE, GTFrame::cb_Edit_SelectNone) EVT_MENU (ID_EDIT_INVERTSELV, GTFrame::cb_Edit_InvertSelectionVertices) EVT_MENU (ID_EDIT_INVERTSELE, GTFrame::cb_Edit_InvertSelectionEdges) EVT_MENU (ID_EDIT_INVERTSELA, GTFrame::cb_Edit_InvertSelectionAll) EVT_MENU (ID_VIEW_LABELS, GTFrame::cb_View) EVT_MENU (ID_VIEW_WEIGHTS, GTFrame::cb_View) EVT_MENU (ID_VIEW_FLOWS, GTFrame::cb_View) EVT_MENU (ID_GRAPH_CLEAR, GTFrame::cb_Graph_Clear) EVT_MENU (ID_GRAPH_COMPLEMENT, GTFrame::cb_Graph_Complement) EVT_MENU (ID_GRAPH_LINEGRAPH, GTFrame::cb_Graph_LineGraph) EVT_MENU (ID_GRAPH_SUBGRAPH, GTFrame::cb_Graph_Subgraph) EVT_MENU (ID_GRAPH_FIND_SHORTESTPATH, GTFrame::cb_Graph_Find_ShortestPath) EVT_MENU (ID_GRAPH_FIND_BFS, GTFrame::cb_Graph_Find_BFS) EVT_MENU (ID_GRAPH_FIND_DFS, GTFrame::cb_Graph_Find_DFS) EVT_MENU (ID_GRAPH_FIND_MST, GTFrame::cb_Graph_Find_MST) EVT_MENU (ID_GRAPH_FIND_MAXFLOW, GTFrame::cb_Graph_Find_MaxFlow) EVT_MENU (ID_GRAPH_PROPERTIES_CONNECTIVITY, GTFrame::cb_Graph_Properties_Connectivity) EVT_MENU (ID_GRAPH_PROPERTIES_EULERICITY, GTFrame::cb_Graph_Properties_Eulericity) EVT_MENU (ID_GRAPH_PROPERTIES_HAMILTONICITY, GTFrame::OnMenu) EVT_MENU (ID_GRAPH_PROPERTIES_PLANARITY, GTFrame::OnMenu) EVT_MENU (ID_GRAPH_STATISTICS_ADJMATRIX, GTFrame::cb_Graph_Statistics_AdjacencyMatrix) EVT_MENU (ID_GRAPH_STATISTICS_DEGSEQ, GTFrame::cb_Graph_Statistics_DegreeSequence) EVT_MENU (ID_GRAPH_STATISTICS_DIAMETER, GTFrame::cb_Graph_Statistics_Diameter) EVT_MENU (ID_GRAPH_STATISTICS_GIRTH, GTFrame::OnMenu) EVT_MENU (ID_GRAPH_STATISTICS_RADIUS, GTFrame::cb_Graph_Statistics_Radius) EVT_MENU (ID_GRAPH_STATISTICS_CHROMNUM, GTFrame::cb_Graph_Statistics_ChromaticNumber) EVT_MENU (ID_GRAPH_STATISTICS_CHROMINDEX, GTFrame::cb_Graph_Statistics_ChromaticIndex) EVT_MENU (ID_GRAPH_STATISTICS_CHROMPOLY, GTFrame::cb_Graph_Statistics_ChromaticPolynomial) EVT_MENU (ID_PREFAB_COMPLETE, GTFrame::cb_Prefab_Complete) EVT_MENU (ID_PREFAB_COMPLETEBIPARTITE, GTFrame::cb_Prefab_CompleteBipartite) EVT_MENU (ID_PREFAB_CYCLE, GTFrame::cb_Prefab_Cycle) EVT_MENU (ID_PREFAB_GEAR, GTFrame::cb_Prefab_Gear) EVT_MENU (ID_PREFAB_HANOI, GTFrame::cb_Prefab_Hanoi) EVT_MENU (ID_PREFAB_LADDER, GTFrame::cb_Prefab_Ladder) EVT_MENU (ID_PREFAB_LATTICE, GTFrame::cb_Prefab_Lattice) EVT_MENU (ID_PREFAB_NULL, GTFrame::cb_Prefab_Null) EVT_MENU (ID_PREFAB_STAR, GTFrame::cb_Prefab_Star) EVT_MENU (ID_PREFAB_TREE, GTFrame::OnMenu) EVT_MENU (ID_PREFAB_WHEEL, GTFrame::cb_Prefab_Wheel) EVT_MENU (ID_PREFAB_PETERSEN, GTFrame::cb_Prefab_Petersen) EVT_MENU (ID_PREFAB_PLATONIC_TETRAHEDRAL, GTFrame::cb_Prefab_Platonic_Tetrahedral) EVT_MENU (ID_PREFAB_PLATONIC_CUBICAL, GTFrame::cb_Prefab_Platonic_Cubical) EVT_MENU (ID_PREFAB_PLATONIC_OCTAHEDRAL, GTFrame::cb_Prefab_Platonic_Octahedral) EVT_MENU (ID_PREFAB_PLATONIC_DODECAHEDRAL, GTFrame::cb_Prefab_Platonic_Dodecahedral) EVT_MENU (ID_PREFAB_PLATONIC_ICOSAHEDRAL, GTFrame::cb_Prefab_Platonic_Icosahedral) EVT_MENU (ID_HELP_ABOUT, GTFrame::cb_Help_About) EVT_TOOL (ID_TOOL_VERTEXMODE, GTFrame::cb_Change_Mode) EVT_TOOL (ID_TOOL_EDGEMODE, GTFrame::cb_Change_Mode) END_EVENT_TABLE() wxMenuBar *GTFrame::genMenuBar () { // File Menu wxMenu *menu_file = new wxMenu (); menu_file->Append (ID_FILE_LOAD, _("&Load\tCtrl-O")); menu_file->Append (ID_FILE_SAVE, _("&Save\tCtrl-S")); menu_file->AppendSeparator (); menu_file->Append (ID_FILE_EXIT, _("E&xit\tCtrl-Q")); // Edit Menu wxMenu *menu_edit = new wxMenu (); menu_edit->Append (ID_EDIT_UNDO, _("&Undo\tCtrl-Z")); menu_edit->FindItem (ID_EDIT_UNDO)->Enable (false); menu_edit->AppendSeparator (); menu_edit->Append (ID_EDIT_SELECTALL, _("Select &All\tCtrl-A")); menu_edit->Append (ID_EDIT_SELECTNONE, _("Select &None")); menu_edit->Append (ID_EDIT_INVERTSELV, _("Invert Selection (&Vertices)")); menu_edit->Append (ID_EDIT_INVERTSELE, _("Invert Selection (&Edges)")); menu_edit->Append (ID_EDIT_INVERTSELA, _("&Invert Selection (All)")); // View Menu wxMenu *menu_view = new wxMenu (); menu_view->AppendCheckItem (ID_VIEW_LABELS, _("&Labels")); menu_view->AppendSeparator (); menu_view->AppendCheckItem (ID_VIEW_WEIGHTS, _("&Weights")); menu_view->AppendCheckItem (ID_VIEW_FLOWS, _("&Flows")); // Graph Menu wxMenu *menu_graph = new wxMenu (); menu_graph->Append (ID_GRAPH_CLEAR, _("&Clear\tCtrl-W")); menu_graph->Append (ID_GRAPH_COMPLEMENT, _("C&omplement")); menu_graph->Append (ID_GRAPH_LINEGRAPH, _("&Line Graph")); menu_graph->Append (ID_GRAPH_SUBGRAPH, _("S&ubgraph")); menu_graph->AppendSeparator (); // Graph/Find submenu wxMenu *menu_graph_find = new wxMenu (); menu_graph_find->Append (ID_GRAPH_FIND_SHORTESTPATH, _("&Shortest Path")); menu_graph_find->Append (ID_GRAPH_FIND_BFS, _("&Breadth-First Search")); menu_graph_find->Append (ID_GRAPH_FIND_DFS, _("&Depth-First Search")); menu_graph_find->Append (ID_GRAPH_FIND_MST, _("&Minimum Spanning Tree")); menu_graph_find->Append (ID_GRAPH_FIND_MAXFLOW, _("Maximum &Flow")); menu_graph->Append (ID_GRAPH_FIND, _("&Find"), menu_graph_find); // Graph/Properties submenu wxMenu *menu_graph_prop = new wxMenu (); menu_graph_prop->Append (ID_GRAPH_PROPERTIES_CONNECTIVITY, _("&Connectivity")); menu_graph_prop->Append (ID_GRAPH_PROPERTIES_EULERICITY, _("&Eulericity")); menu_graph_prop->Append (ID_GRAPH_PROPERTIES_HAMILTONICITY, _("&Hamiltonicity")); menu_graph_prop->FindItem (ID_GRAPH_PROPERTIES_HAMILTONICITY)->Enable (false); menu_graph_prop->Append (ID_GRAPH_PROPERTIES_PLANARITY, _("&Planarity")); menu_graph_prop->FindItem (ID_GRAPH_PROPERTIES_PLANARITY)->Enable (false); menu_graph->Append (ID_GRAPH_PROPERTIES, _("&Properties"), menu_graph_prop); // Graph/Statistics submenu wxMenu *menu_graph_stat = new wxMenu (); menu_graph_stat->Append (ID_GRAPH_STATISTICS_ADJMATRIX, _("&Adjacency Matrix")); menu_graph_stat->Append (ID_GRAPH_STATISTICS_DEGSEQ, _("&Degree Sequence")); menu_graph_stat->Append (ID_GRAPH_STATISTICS_DIAMETER, _("D&iameter")); menu_graph_stat->Append (ID_GRAPH_STATISTICS_GIRTH, _("&Girth")); menu_graph_stat->FindItem (ID_GRAPH_STATISTICS_GIRTH)->Enable (false); menu_graph_stat->Append (ID_GRAPH_STATISTICS_RADIUS, _("&Radius")); menu_graph_stat->AppendSeparator (); menu_graph_stat->Append (ID_GRAPH_STATISTICS_CHROMNUM, _("&Chromatic Number")); menu_graph_stat->Append (ID_GRAPH_STATISTICS_CHROMINDEX, _("C&hromatic Index")); menu_graph_stat->Append (ID_GRAPH_STATISTICS_CHROMPOLY, _("Chromatic &Polynomial")); menu_graph->Append (ID_GRAPH_STATISTICS, _("&Statistics"), menu_graph_stat); // Prefab Menu wxMenu *menu_prefab = new wxMenu (); menu_prefab->Append (ID_PREFAB_COMPLETE, _("Complete (&Kn)")); menu_prefab->Append (ID_PREFAB_COMPLETEBIPARTITE, _("Complete &Bipartite (Kn,m)")); menu_prefab->Append (ID_PREFAB_CYCLE, _("Cycle (&Cn)")); menu_prefab->Append (ID_PREFAB_GEAR, _("Gear (&Gn)")); menu_prefab->Append (ID_PREFAB_HANOI, _("Hanoi (&Hn)")); menu_prefab->Append (ID_PREFAB_LADDER, _("Ladder (&Ln)")); menu_prefab->Append (ID_PREFAB_LATTICE, _("Lattice (Ln,m)")); menu_prefab->Append (ID_PREFAB_NULL, _("Null (&Nn)")); menu_prefab->Append (ID_PREFAB_STAR, _("Star (&Sn)")); menu_prefab->Append (ID_PREFAB_TREE, _("Tree (&Tn)")); menu_prefab->FindItem (ID_PREFAB_TREE)->Enable (false); menu_prefab->Append (ID_PREFAB_WHEEL, _("Wheel (&Wn)")); menu_prefab->AppendSeparator (); menu_prefab->Append (ID_PREFAB_PETERSEN, _("Petersen")); // Prefab/Platonic submenu wxMenu *menu_prefab_platonic = new wxMenu (); menu_prefab_platonic->Append (ID_PREFAB_PLATONIC_TETRAHEDRAL, _("&Tetrahedral")); menu_prefab_platonic->Append (ID_PREFAB_PLATONIC_CUBICAL, _("&Cubical")); menu_prefab_platonic->Append (ID_PREFAB_PLATONIC_OCTAHEDRAL, _("&Octahedral")); menu_prefab_platonic->Append (ID_PREFAB_PLATONIC_DODECAHEDRAL, _("&Dodecahedral")); menu_prefab_platonic->Append (ID_PREFAB_PLATONIC_ICOSAHEDRAL, _("&Icosahedral")); menu_prefab->Append (ID_PREFAB_PLATONIC, _("&Platonic"), menu_prefab_platonic); // Help Menu wxMenu *menu_help = new wxMenu (); menu_help->Append (ID_HELP_ABOUT, _("&About\tF1")); // Menubar wxMenuBar *mb = new wxMenuBar (); mb->Append (menu_file, _("&File")); mb->Append (menu_edit, _("&Edit")); mb->Append (menu_view, _("&View")); mb->Append (menu_graph, _("&Graph")); mb->Append (menu_prefab, _("&Prefab")); mb->Append (menu_help, _("&Help")); // TODO: right-align help menu return mb; } void GTFrame::OnMenu (wxCommandEvent &event) { // TODO wxMessageDialog dlg (this, wxT("This isn't implemented yet!"), wxT("NYI."), wxOK | wxICON_ERROR); dlg.ShowModal (); } #include "wx/settings.h" void GTFrame::OnSize (wxSizeEvent &event) { wxRect rect; // Fix up progress bar if (!statusBar) return; statusBar->GetFieldRect (2, rect); progressBar->SetSize (rect.x + 2, rect.y + 2, rect.width - 4, rect.height - 4); wxSize sz = progressBar->GetSize (); progressBar->Move (rect.x + (rect.width - sz.x) / 2, rect.y + (rect.height - sz.y) / 2); // Fix up canvas sz = GetClientSize (); int nudge_horiz = wxSystemSettings::GetMetric (wxSYS_VSCROLL_X); int nudge_vert = wxSystemSettings::GetMetric (wxSYS_HSCROLL_Y); sz.SetWidth (sz.GetWidth () - nudge_horiz); sz.SetHeight (sz.GetHeight () - nudge_vert); canvas->SetClientSize (sz.GetWidth (), sz.GetHeight ()); Factory::width = sz.GetWidth (); Factory::height = sz.GetHeight (); } void GTFrame::setUndoText (wxString description) { wxString s_txt (_("&Undo")); if (description != wxT("")) s_txt += wxT(" (") + description + wxT(")"); s_txt += wxT("\tCtrl-Z"); edit_Undo->SetText (s_txt); } GTFrame::GTFrame () : wxFrame ((wxFrame *) NULL, -1, wxT("GraphThing " GT_VERSION), wxDefaultPosition, wxSize (600, 500)), statusBar (0) { SetIcon (wxIcon (logo_xpm)); graph = new Graph (); SetMenuBar (genMenuBar ()); edit_Undo = GetMenuBar ()->FindItem (ID_EDIT_UNDO); view_Labels = GetMenuBar ()->FindItem (ID_VIEW_LABELS); view_Weights = GetMenuBar ()->FindItem (ID_VIEW_WEIGHTS); view_Flows = GetMenuBar ()->FindItem (ID_VIEW_FLOWS); view_Labels->Check (); wxToolBar *tb = CreateToolBar (wxTB_HORIZONTAL | wxTB_TEXT); statusBar = CreateStatusBar (3); int widths[] = { 0, -1, -1 }; statusBar->SetStatusWidths (3, widths); progressBar = new wxGauge (statusBar, -1, 100); progressBar->SetValue (0); wxBitmap *vPix = new wxBitmap (vertex_mode_xpm); wxBitmap *ePix = new wxBitmap (edge_mode_xpm); tb->AddRadioTool (ID_TOOL_VERTEXMODE, _("Vertex Mode"), *vPix, *vPix, _("Change to Vertex Mode")); tb->AddRadioTool (ID_TOOL_EDGEMODE, _("Edge Mode"), *ePix, *ePix, _("Change to Edge Mode")); tb->Realize (); canvas = new Canvas (this, &graph); pushStatus (_("Ready.")); wxCommandEvent ev (0, ID_TOOL_VERTEXMODE); cb_Change_Mode (ev); cb_View (ev); } GTFrame::~GTFrame () { delete graph; } void GTFrame::undoableAction (wxString description) { UndoStep step (new Graph (*graph), description); undoStack.push (step); edit_Undo->Enable (); setUndoText (description); } void GTFrame::loadGraph (const wxString fname) { bool res; Graph *g = graph->load (fname, res); if (g) { // TODO: Make this undoable? delete graph; graph = g; } canvas->redraw (); } void GTFrame::msg (const wxString &title, const wxString &s) { // TODO: pass through more flags wxMessageDialog dlg (this, s, title, wxOK); dlg.CentreOnParent (); dlg.ShowModal (); } void GTFrame::msg (const wxString &title, const char *s) { msg (title, wxString (s, wxConvUTF8)); } void GTFrame::toggleMode () { // TODO: toggle the toolbar buttons! } void GTFrame::pushStatus (const wxString &str) { statusBar->PushStatusText (str, 1); } void GTFrame::popStatus () { statusBar->PopStatusText (1); } void GTFrame::setProgress (double frac) { static double last_frac = -1.0; // TODO: implement progress percentage text somehow if (frac < 0.0) { // hide progress bar //progressBar->set_show_text (false); progressBar->Hide (); last_frac = frac - 1; } else if (frac <= 1.0) { progressBar->SetValue (int (frac * 100)); //progressBar->set_format_string ("%p%% complete"); //progressBar->set_show_text (true); progressBar->Show (); } //progressBar->Refresh (); //progressBar->Update (); } graphthing-1.3.2/src/gui.h0000644000076500007650000000750510501136234015672 0ustar dsymondsdsymonds// // gui.h // #ifndef __GUI_H__ #define __GUI_H__ #include "wx/frame.h" #include "wx/string.h" #include #include "matrix.h" #include "undo.h" class Canvas; // see canvas.h class Graph; class Edge; class Vertex; class wxGauge; class wxMenuItem; class wxStatusBar; class GTFrame : public wxFrame { private: Canvas *canvas; Graph *graph; UndoStack undoStack; wxMenuItem *edit_Undo, *view_Labels, *view_Weights, *view_Flows; wxGauge *progressBar; wxStatusBar *statusBar; DECLARE_EVENT_TABLE() void OnMenu (wxCommandEvent &event); void OnSize (wxSizeEvent &event); // All callbacks are implemented in gui_cb.cc #define CB(func) void func (wxCommandEvent &event); CB(cb_File_Load) CB(cb_File_Save) CB(cb_File_Exit) CB(cb_Edit_Undo) CB(cb_Edit_SelectAll) CB(cb_Edit_SelectNone) CB(cb_Edit_InvertSelectionVertices) CB(cb_Edit_InvertSelectionEdges) CB(cb_Edit_InvertSelectionAll) CB(cb_View) CB(cb_Graph_Clear) CB(cb_Graph_Complement) CB(cb_Graph_LineGraph) CB(cb_Graph_Subgraph) CB(cb_Graph_Find_ShortestPath) CB(cb_Graph_Find_BFS) CB(cb_Graph_Find_DFS) CB(cb_Graph_Find_MST) CB(cb_Graph_Find_MaxFlow) CB(cb_Graph_Properties_Connectivity) CB(cb_Graph_Properties_Eulericity) CB(cb_Graph_Statistics_AdjacencyMatrix) CB(cb_Graph_Statistics_DegreeSequence) CB(cb_Graph_Statistics_Diameter) CB(cb_Graph_Statistics_Radius) CB(cb_Graph_Statistics_ChromaticNumber) CB(cb_Graph_Statistics_ChromaticIndex) CB(cb_Graph_Statistics_ChromaticPolynomial) CB(cb_Prefab_Complete) CB(cb_Prefab_CompleteBipartite) CB(cb_Prefab_Cycle) CB(cb_Prefab_Gear) CB(cb_Prefab_Hanoi) CB(cb_Prefab_Ladder) CB(cb_Prefab_Lattice) CB(cb_Prefab_Null) CB(cb_Prefab_Star) CB(cb_Prefab_Wheel) CB(cb_Prefab_Petersen) CB(cb_Prefab_Platonic_Tetrahedral) CB(cb_Prefab_Platonic_Cubical) CB(cb_Prefab_Platonic_Octahedral) CB(cb_Prefab_Platonic_Dodecahedral) CB(cb_Prefab_Platonic_Icosahedral) CB(cb_Help_About) // Split mode bool in_vertex_mode; CB(cb_Change_Mode) wxMenuBar *genMenuBar (); void setUndoText (wxString description); public: GTFrame (); ~GTFrame (); void undoableAction (wxString description); void loadGraph (const wxString fname); void msg (const wxString &title, const wxString &s); void msg (const wxString &title, const char *s); void toggleMode (); void pushStatus (const wxString &str); void popStatus (); void setProgress (double frac); // argument in [0, 1] }; // Event IDs for main frame enum { ID_FILE_LOAD = 1001, ID_FILE_SAVE, ID_FILE_PRINT, ID_FILE_EXIT, ID_EDIT_UNDO, ID_EDIT_SELECTALL, ID_EDIT_SELECTNONE, ID_EDIT_INVERTSELV, ID_EDIT_INVERTSELE, ID_EDIT_INVERTSELA, ID_VIEW_LABELS, ID_VIEW_WEIGHTS, ID_VIEW_FLOWS, ID_GRAPH_CLEAR, ID_GRAPH_COMPLEMENT, ID_GRAPH_LINEGRAPH, ID_GRAPH_SUBGRAPH, ID_GRAPH_FIND, // submenu ID_GRAPH_FIND_SHORTESTPATH, ID_GRAPH_FIND_BFS, ID_GRAPH_FIND_DFS, ID_GRAPH_FIND_MST, ID_GRAPH_FIND_MAXFLOW, ID_GRAPH_PROPERTIES, // submenu ID_GRAPH_PROPERTIES_CONNECTIVITY, ID_GRAPH_PROPERTIES_EULERICITY, ID_GRAPH_PROPERTIES_HAMILTONICITY, ID_GRAPH_PROPERTIES_PLANARITY, ID_GRAPH_STATISTICS, // submenu ID_GRAPH_STATISTICS_ADJMATRIX, ID_GRAPH_STATISTICS_DEGSEQ, ID_GRAPH_STATISTICS_DIAMETER, ID_GRAPH_STATISTICS_GIRTH, ID_GRAPH_STATISTICS_RADIUS, ID_GRAPH_STATISTICS_CHROMNUM, ID_GRAPH_STATISTICS_CHROMINDEX, ID_GRAPH_STATISTICS_CHROMPOLY, ID_PREFAB_COMPLETE, ID_PREFAB_COMPLETEBIPARTITE, ID_PREFAB_CYCLE, ID_PREFAB_GEAR, ID_PREFAB_HANOI, ID_PREFAB_LADDER, ID_PREFAB_LATTICE, ID_PREFAB_NULL, ID_PREFAB_STAR, ID_PREFAB_TREE, ID_PREFAB_WHEEL, ID_PREFAB_PETERSEN, ID_PREFAB_PLATONIC, // submenu ID_PREFAB_PLATONIC_TETRAHEDRAL, ID_PREFAB_PLATONIC_CUBICAL, ID_PREFAB_PLATONIC_OCTAHEDRAL, ID_PREFAB_PLATONIC_DODECAHEDRAL, ID_PREFAB_PLATONIC_ICOSAHEDRAL, ID_HELP_ABOUT, // Toolbar ID_TOOL_VERTEXMODE, ID_TOOL_EDGEMODE }; #endif // __GUI_H__ graphthing-1.3.2/src/gui_cb.cc0000644000076500007650000004424210501136234016473 0ustar dsymondsdsymonds// // gui_cb.cc // #include "wx/event.h" #include "wx/menu.h" #include "wx/msgdlg.h" #include "wx/numdlg.h" #include "wx/string.h" #include #include #include #include "aboutbox.h" #include "canvas.h" #include "config.h" #include "edge.h" #include "exporter.h" #include "factory.h" #include "fancyfileselection.h" #include "graph.h" #include "gui.h" #include "lang.h" #include "matrix.h" #include "matrixdialog.h" #include "paramdialog.h" #include "polynomial.h" #include "undo.h" #include "vertex.h" void GTFrame::cb_File_Load (wxCommandEvent &event) { FancyFileSelection fs (this, _("Load File"), wxOPEN); bool res; if (fs.ShowModal () == wxID_CANCEL) return; Graph *g = graph->load (fs.GetFileName (), res); if (!g) { msg (_("Loading failed"), _("Loading failed")); return; } if (!res) msg (_("Warning"), _("WARNING:\n\n" "The loading partially failed;\n" "this graph may be incomplete.")); undoableAction (_("Load graph")); delete graph; graph = g; canvas->redraw (); } void GTFrame::cb_File_Save (wxCommandEvent &event) { FancyFileSelection fs (this, _("Save File"), wxSAVE, true); if (fs.ShowModal () == wxID_CANCEL) return; // Put in creator tag if omitted if (graph->get_tag ("creator").IsEmpty ()) graph->set_tag ("creator", wxT("GraphThing " GT_VERSION)); Exporter *exp = Exporter::make (fs.GetFileType (), fs.GetFileName ()); bool labels = view_Labels->IsChecked (); bool weights = view_Weights->IsChecked (); exp->output (graph, labels, weights); delete exp; } void GTFrame::cb_File_Exit (wxCommandEvent &event) { Close (); } void GTFrame::cb_Edit_Undo (wxCommandEvent &event) { if (undoStack.empty ()) return; delete graph; graph = undoStack.pop ().getGraph (); canvas->redraw (); if (undoStack.empty ()) { edit_Undo->Enable (false); setUndoText (wxT("")); } else setUndoText (undoStack.top ().getMessage ()); } void GTFrame::cb_Edit_SelectAll (wxCommandEvent &event) { Graph::e_const_iterator eit; Graph::v_const_iterator vit; for (eit = graph->e_begin (); eit != graph->e_end (); ++eit) graph->select (*eit); for (vit = graph->v_begin (); vit != graph->v_end (); ++vit) graph->select (*vit); canvas->redraw (); } void GTFrame::cb_Edit_SelectNone (wxCommandEvent &event) { graph->unselect_all (); canvas->redraw (); } void GTFrame::cb_Edit_InvertSelectionVertices (wxCommandEvent &event) { Graph::v_const_iterator vit; for (vit = graph->v_begin (); vit != graph->v_end (); ++vit) { if ((*vit)->selected) graph->unselect (*vit); else graph->select (*vit); } canvas->redraw (); } void GTFrame::cb_Edit_InvertSelectionEdges (wxCommandEvent &event) { Graph::e_const_iterator eit; for (eit = graph->e_begin (); eit != graph->e_end (); ++eit) { if ((*eit)->selected) graph->unselect (*eit); else graph->select (*eit); } canvas->redraw (); } void GTFrame::cb_Edit_InvertSelectionAll (wxCommandEvent &event) { cb_Edit_InvertSelectionVertices (event); cb_Edit_InvertSelectionEdges (event); } void GTFrame::cb_View (wxCommandEvent &event) { // Flows are only enabled when weights are view_Flows->Enable (view_Weights->IsChecked ()); canvas->setParam (view_Labels->IsChecked (), view_Weights->IsChecked (), view_Flows->IsChecked ()); canvas->redraw (); } void GTFrame::cb_Graph_Clear (wxCommandEvent &event) { undoableAction (_("Clear graph")); graph->clear (); canvas->redraw (); } void GTFrame::cb_Graph_Complement (wxCommandEvent &event) { Graph *orig = graph; Graph::e_const_iterator eit; Graph::v_const_iterator vit, vit2; undoableAction (_("Complement graph")); graph = new Graph; for (vit = orig->v_begin (); vit != orig->v_end (); ++vit) graph->add (new Vertex (**vit)); // Method: create a new complete graph, then remove the edges that were // in the original. TODO: speed this up! for (vit = graph->v_begin (); vit != graph->v_end (); ++vit) for (vit2 = vit + 1; vit2 != graph->v_end (); ++vit2) graph->add (new Edge (*vit, *vit2)); for (eit = orig->e_begin (); eit != orig->e_end (); ++eit) { Vertex *v1, *v2; v1 = graph->find ((*eit)->v->label); v2 = graph->find ((*eit)->w->label); graph->remove (graph->find (v1, v2)); } delete orig; canvas->redraw (); } void GTFrame::cb_Graph_LineGraph (wxCommandEvent &event) { undoableAction (_("Line Graph")); Graph *orig = graph; graph = orig->line_graph (); delete orig; canvas->redraw (); } void GTFrame::cb_Graph_Subgraph (wxCommandEvent &event) { Graph *orig = graph; Graph::v_const_iterator vit; if (!graph->v_selected_head) { msg (_("Subgraph"), _("At least one vertex must be selected " "to induce a subgraph.")); return; } undoableAction (_("Induced subgraph")); // Mark selection for (vit = graph->v_begin (); vit != graph->v_end (); ++vit) { Vertex *v = *vit; v->mark = v->selected ? 1 : 0; } graph = orig->subgraph_marked (); delete orig; canvas->redraw (); } void GTFrame::cb_Graph_Find_ShortestPath (wxCommandEvent &event) { Vertex *v1, *v2, *walk; Graph::e_const_iterator eit; long tot; v2 = graph->v_selected_head; if (!v2 || !v2->next || v2->next->next) { msg (_("Shortest Path"), _("Exactly two vertices must be " "selected to find a shortest path.")); return; } v1 = v2->next; pushStatus (_("Finding shortest path...")); graph->mark_shortest_path (v1, v2); // Select shortest path tot = v2->mark; graph->unselect_all (); graph->select (v2); walk = v2; while (walk != v1) { Edge *e = 0; Vertex *alt = 0; for (eit = walk->e_begin (); eit != walk->e_end (); ++eit) { e = *eit; if (e->selected) continue; alt = walk->opposite (e); if (walk->mark == (alt->mark + e->weight)) break; } if (eit == walk->e_end ()) break; // Uh, oh! graph->select (e); graph->select (alt); walk = alt; } if (tot < 0) { // If there is no path at all, // leave original vertices selected graph->unselect_all (); graph->select (v1); graph->select (v2); } canvas->redraw (); if (tot >= 0) { wxString str = wxString::Format (_("Shortest path is %i."), tot); msg (_("Shortest Path"), str); } else msg (_("Shortest Path"), _("No path found.")); popStatus (); } void GTFrame::cb_Graph_Find_BFS (wxCommandEvent &event) { Vertex *v; v = graph->v_selected_head; if (!v || v->next) { msg (_("Breadth-First Search"), _("Exactly one vertex " "must be selected to perform a " "Breadth-First Search.")); return; } pushStatus (_("Performing BFS...")); wxString m (wxT("BFS:\n\n")); graph->bfs (v, m); msg (_("Breadth-First Search"), m); popStatus (); } void GTFrame::cb_Graph_Find_DFS (wxCommandEvent &event) { Vertex *v; v = graph->v_selected_head; if (!v || v->next) { msg (_("Depth-First Search"), _("Exactly one vertex must " "be selected to perform a Depth-First Search.")); return; } pushStatus (_("Performing DFS...")); wxString m (wxT("DFS:\n\n")); graph->dfs (v, m); msg (_("Depth-First Search"), m); popStatus (); } void GTFrame::cb_Graph_Find_MST (wxCommandEvent &event) { std::set spanning_tree; std::set::const_iterator it; pushStatus (_("Finding Minimum Spanning Tree...")); graph->minimum_spanning_tree (spanning_tree); graph->unselect_all (); for (it = spanning_tree.begin (); it != spanning_tree.end (); ++it) { graph->select (*it); graph->select ((*it)->v); graph->select ((*it)->w); } canvas->redraw (); popStatus (); } void GTFrame::cb_Graph_Find_MaxFlow (wxCommandEvent &event) { Vertex *v1, *v2; v2 = graph->v_selected_head; if (!v2 || !v2->next || v2->next->next) { msg (_("Maximum Flow"), _("Exactly two vertices must be " "selected to find a maximum flow.")); return; } v1 = v2->next; pushStatus (_("Finding Maximum Flow...")); int flow = graph->ford_fulkerson (v1, v2); #if 0 graph->unselect_all (); for (it = spanning_tree.begin (); it != spanning_tree.end (); ++it) { graph->select (*it); graph->select ((*it)->v); graph->select ((*it)->w); } #endif wxString str = wxString::Format (_("Maximum flow is %i."), flow); canvas->redraw (); msg (_("Maximum Flow"), str); popStatus (); } void GTFrame::cb_Graph_Properties_Connectivity (wxCommandEvent &event) { Graph::e_const_iterator eit; Graph::v_const_iterator vit; bool undir, conn, strong_conn = false; pushStatus (_("Testing connectivity...")); undir = graph->is_undirected (); conn = graph->is_connected (); if (conn && !undir) strong_conn = graph->is_strongly_connected (); if (conn) { if (undir) msg (_("Connectivity"), _("Graph is connected.")); else if (!strong_conn) msg (_("Connectivity"), _("Graph is weakly connected.")); else msg (_("Connectivity"), _("Graph is strongly connected.")); } else { // Select marked vertices and edges graph->unselect_all (); for (eit = graph->e_begin (); eit != graph->e_end (); ++eit) if ((*eit)->mark) graph->select (*eit); for (vit = graph->v_begin (); vit != graph->v_end (); ++vit) if ((*vit)->mark) graph->select (*vit); canvas->redraw (); msg (_("Connectivity"), _("Graph is not connected.")); } popStatus (); } void GTFrame::cb_Graph_Properties_Eulericity (wxCommandEvent &event) { bool euler, semi; pushStatus (_("Determining Eulericity...")); wxString tour (wxT("\n(")); graph->eulericity (euler, semi, tour); tour += wxT(")"); if (euler) msg (_("Eulericity"), _("Graph is Eulerian.") + tour); else if (semi) msg (_("Eulericity"), _("Graph is Semi-Eulerian.") + tour); else msg (_("Eulericity"), _("Graph is neither Eulerian nor " "Semi-Eulerian.")); popStatus (); } void GTFrame::cb_Graph_Statistics_AdjacencyMatrix (wxCommandEvent &event) { MatrixDialog md (this, _("Adjacency Matrix"), graph->adjacency_matrix (), *graph); md.ShowModal (); } void GTFrame::cb_Graph_Statistics_DegreeSequence (wxCommandEvent &event) { std::vector seq; std::vector::iterator it1, it2; Graph::v_const_iterator vit; if (graph->order () < 1) { wxString str = _("Degree Sequence"); str += wxT(":\n\n"); str += _("(none)"); msg (_("Degree Sequence"), str); return; } for (vit = graph->v_begin (); vit != graph->v_end (); ++vit) seq.push_back ((*vit)->degree ()); // boring bubble sort for (it1 = seq.begin (); (it1 + 1) != seq.end (); ++it1) for (it2 = it1 + 1; it2 != seq.end (); ++it2) { if (*it1 < *it2) { int tmp = *it1; *it1 = *it2; *it2 = tmp; } } wxString str = _("Degree Sequence"); str += wxT(":\n\n"); for (it1 = seq.begin (); it1 != seq.end (); ++it1) { if (it1 == seq.begin ()) str += wxString::Format (wxT("%i"), *it1); else str += wxString::Format (wxT(", %i"), *it1); } msg (_("Degree Sequence"), str); } void GTFrame::cb_Graph_Statistics_Diameter (wxCommandEvent &event) { pushStatus (_("Determining diameter...")); int diam = graph->diameter (true); wxString str = wxString::Format (wxT("diam(G) = %i"), diam); canvas->redraw (); msg (_("Diameter"), str); popStatus (); } void GTFrame::cb_Graph_Statistics_Radius (wxCommandEvent &event) { pushStatus (_("Determining radius...")); int rad = graph->radius (true); wxString str = wxString::Format (wxT("rad(G) = %i"), rad); canvas->redraw (); msg (_("Radius"), str); popStatus (); } void GTFrame::cb_Graph_Statistics_ChromaticNumber (wxCommandEvent &event) { pushStatus (_("Computing chromatic number...")); int chi = graph->chromatic_number (); graph->unselect_all (); while (chi >= 2) { // WARNING: Abuse of loop construct! if (!graph->try_colouring (chi)) break; Graph::v_iterator vit; for (vit = graph->v_begin (); vit != graph->v_end (); ++vit) { graph->select (*vit); (*vit)->selection_colour = (*vit)->mark; } break; } // TODO: mention something if we failed to colour properly! canvas->redraw (); wxString str = wxString::Format(wxT("chi(G) = %i"), chi); msg (_("Chromatic Number"), str); setProgress (-1); popStatus (); } void GTFrame::cb_Graph_Statistics_ChromaticIndex (wxCommandEvent &event) { pushStatus (_("Computing chromatic index...")); Graph *lg = graph->line_graph (); int chi = lg->chromatic_number (); graph->unselect_all (); while (chi >= 2) { // WARNING: Abuse of loop construct! if (!lg->try_colouring (chi)) break; Graph::e_iterator eit; for (eit = graph->e_begin (); eit != graph->e_end (); ++eit) { Vertex *v = (Vertex *) (*eit)->mark; graph->select (*eit); (*eit)->selection_colour = v->mark; } break; } // TODO: mention something if we failed to colour properly! delete lg; canvas->redraw (); wxString str = wxString::Format (wxT("chi'(G) = %i"), chi); msg (_("Chromatic Index"), str); setProgress (-1); popStatus (); } void GTFrame::cb_Graph_Statistics_ChromaticPolynomial (wxCommandEvent &event) { wxString m = _("Chromatic Polynomial"); pushStatus (_("Computing chromatic polynomial...")); Polynomial p = graph->chromatic_polynomial (); m << wxT(":\n\n") << p.str (); msg (_("Chromatic Polynomial"), m); setProgress (-1); popStatus (); } void GTFrame::cb_Prefab_Complete (wxCommandEvent &event) { pushStatus (_("Prefab...")); int param = wxGetNumberFromUser (wxT(""), _("Complete:"), _("Prefab Parameter"), 5, 1, 20, this); if (param < 0) { popStatus (); return; } undoableAction (_("Make prefab")); delete graph; graph = Factory::K (param); canvas->redraw (); popStatus (); } void GTFrame::cb_Prefab_CompleteBipartite (wxCommandEvent &event) { pushStatus (_("Prefab...")); ParamDialogIntInt dlg (this, _("Prefab Parameter"), _("Complete Bipartite:"), 3, 1, 20, 3, 1, 20); if (dlg.ShowModal () == wxID_CANCEL) { popStatus (); return; } undoableAction (_("Make prefab")); delete graph; graph = Factory::K (dlg.GetValue1 (), dlg.GetValue2 ()); canvas->redraw (); popStatus (); } void GTFrame::cb_Prefab_Cycle (wxCommandEvent &event) { pushStatus (_("Prefab...")); int param = wxGetNumberFromUser (wxT(""), _("Cycle:"), _("Prefab Parameter"), 5, 1, 20, this); if (param < 0) { popStatus (); return; } undoableAction (_("Make prefab")); delete graph; graph = Factory::C (param); canvas->redraw (); popStatus (); } void GTFrame::cb_Prefab_Gear (wxCommandEvent &event) { pushStatus (_("Prefab...")); int param = wxGetNumberFromUser (wxT(""), _("Gear:"), _("Prefab Parameter"), 5, 3, 20, this); if (param < 0) { popStatus (); return; } undoableAction (_("Make prefab")); delete graph; graph = Factory::G (param); canvas->redraw (); popStatus (); } void GTFrame::cb_Prefab_Hanoi (wxCommandEvent &event) { pushStatus (_("Prefab...")); int param = wxGetNumberFromUser (wxT(""), _("Hanoi:"), _("Prefab Parameter"), 3, 1, 20, this); if (param < 0) { popStatus (); return; } undoableAction (_("Make prefab")); delete graph; graph = Factory::H (param); canvas->redraw (); popStatus (); } void GTFrame::cb_Prefab_Ladder (wxCommandEvent &event) { pushStatus (_("Prefab...")); int param = wxGetNumberFromUser (wxT(""), _("Ladder:"), _("Prefab Parameter"), 4, 1, 20, this); if (param < 0) { popStatus (); return; } undoableAction (_("Make prefab")); delete graph; graph = Factory::L (param); canvas->redraw (); popStatus (); } void GTFrame::cb_Prefab_Lattice (wxCommandEvent &event) { pushStatus (_("Prefab...")); ParamDialogIntInt dlg (this, _("Prefab Parameter"), _("Lattice:"), 4, 1, 20, 4, 1, 20); if (dlg.ShowModal () == wxID_CANCEL) { popStatus (); return; } undoableAction (_("Make prefab")); delete graph; graph = Factory::Lattice (dlg.GetValue1 (), dlg.GetValue2 ()); canvas->redraw (); popStatus (); } void GTFrame::cb_Prefab_Null (wxCommandEvent &event) { pushStatus (_("Prefab...")); int param = wxGetNumberFromUser (wxT(""), _("Null:"), _("Prefab Parameter"), 3, 1, 20, this); if (param < 0) { popStatus (); return; } undoableAction (_("Make prefab")); delete graph; graph = Factory::N (param); canvas->redraw (); popStatus (); } void GTFrame::cb_Prefab_Star (wxCommandEvent &event) { pushStatus (_("Prefab...")); int param = wxGetNumberFromUser (wxT(""), _("Star:"), _("Prefab Parameter"), 5, 1, 20, this); if (param < 0) { popStatus (); return; } undoableAction (_("Make prefab")); delete graph; graph = Factory::S (param); canvas->redraw (); popStatus (); } void GTFrame::cb_Prefab_Wheel (wxCommandEvent &event) { pushStatus (_("Prefab...")); int param = wxGetNumberFromUser (wxT(""), _("Wheel:"), _("Prefab Parameter"), 5, 1, 20, this); if (param < 0) { popStatus (); return; } undoableAction (_("Make prefab")); delete graph; graph = Factory::W (param); canvas->redraw (); popStatus (); } void GTFrame::cb_Prefab_Petersen (wxCommandEvent &event) { undoableAction (_("Make prefab")); delete graph; graph = Factory::Petersen (); canvas->redraw (); } void GTFrame::cb_Prefab_Platonic_Tetrahedral (wxCommandEvent &event) { undoableAction (_("Make prefab")); delete graph; graph = Factory::Tetrahedral (); canvas->redraw (); } void GTFrame::cb_Prefab_Platonic_Cubical (wxCommandEvent &event) { undoableAction (_("Make prefab")); delete graph; graph = Factory::Cubical (); canvas->redraw (); } void GTFrame::cb_Prefab_Platonic_Octahedral (wxCommandEvent &event) { undoableAction (_("Make prefab")); delete graph; graph = Factory::Octahedral (); canvas->redraw (); } void GTFrame::cb_Prefab_Platonic_Dodecahedral (wxCommandEvent &event) { undoableAction (_("Make prefab")); delete graph; graph = Factory::Dodecahedral (); canvas->redraw (); } void GTFrame::cb_Prefab_Platonic_Icosahedral (wxCommandEvent &event) { undoableAction (_("Make prefab")); delete graph; graph = Factory::Icosahedral (); canvas->redraw (); } void GTFrame::cb_Help_About (wxCommandEvent &event) { pushStatus (_("About GraphThing")); AboutBox dlg (this); dlg.CentreOnParent (); dlg.ShowModal (); popStatus (); } void GTFrame::cb_Change_Mode (wxCommandEvent &event) { popStatus (); in_vertex_mode = (event.GetId() == ID_TOOL_VERTEXMODE); canvas->setVertexMode (in_vertex_mode); if (in_vertex_mode) pushStatus (_("Ready (Vertex Mode).")); else pushStatus (_("Ready (Edge Mode).")); // TODO: depress the correct buttons (mainly for keyboard mode switches) //Gtk::Toolbar_Helpers::ToolList &tl = toolbar->tools (); //Gtk::Toolbar_Helpers::Tool *tool = tl[1]; //Gtk::Widget *widget = tool->get_widget (), // *content = tool->get_content (); //std::cerr << Gtk::RadioButton::isA (widget) << "\n"; //std::cerr << Gtk::Pixmap::isA (content) << "\n"; } graphthing-1.3.2/src/heawood.gt0000644000076500007650000000126610501136234016715 0ustar dsymondsdsymondsinfo { } vertex "0" at (249,54) vertex "1" at (295,65) vertex "2" at (333,95) vertex "3" at (354,138) vertex "4" at (354,187) vertex "5" at (333,230) vertex "6" at (295,260) vertex "7" at (249,270) vertex "8" at (202,260) vertex "9" at (164,230) vertex "10" at (143,187) vertex "11" at (143,138) vertex "12" at (164,95) vertex "13" at (202,65) edge "0" -- "1" edge "1" -- "2" edge "2" -- "3" edge "3" -- "4" edge "4" -- "5" edge "5" -- "6" edge "6" -- "7" edge "7" -- "8" edge "8" -- "9" edge "9" -- "10" edge "10" -- "11" edge "11" -- "12" edge "12" -- "13" edge "13" -- "0" edge "0" -- "5" edge "2" -- "7" edge "4" -- "9" edge "6" -- "11" edge "8" -- "13" edge "10" -- "1" edge "12" -- "3" graphthing-1.3.2/src/init-phrases.sh0000755000076500007650000000142610501136234017676 0ustar dsymondsdsymonds#! /bin/sh optimise="n" # either "y" or "n" input="phrases.lang" output="phrases.h" ######################################################################## echo -n "# Transforming $input -> $output ... " cat > $output <> $output else # Identical, except don't remove blank lines or comments cat $input \ | sed 's/"/\\"/g' | sed 's/\\\\"/\\\\\\"/g' \ | sed 's/^/"/' | sed 's/$/\\n"/' \ >> $output fi cat >> $output < #include } #include #include "lang.h" #define YYDEBUG 1 #define YYERROR_VERBOSE int lang_lineno = 1; std::stack pbs; int yy_lang_error (char *s); int yy_lang_lex (void); %} %union { wxString *string; Language lang; } /* Basic tokens */ %token STRING %token LANGUAGE %token kwLITERAL "literal" kwSUBST "subst" /* Construction non-terminals */ %type phrase %% /* Grammar rules and actions follow */ input: /* empty */ | input phrase_block ; phrase_block: phrase '=' { PhraseBlock *b = new PhraseBlock (*$1); delete $1; pbs.push (b); } phrase_def ';' { translator->add_phrase (pbs.top ()); pbs.pop (); } ; phrase_def: '{' { pbs.top ()->set_type (PhraseBlock::regular); } translations '}' | phrase_concat | "literal" { pbs.top ()->set_type (PhraseBlock::literal); } | phrase "subst" phrase '/' phrase { pbs.top ()->set_type (PhraseBlock::replace); pbs.top ()->set_param (0, *$1); pbs.top ()->set_param (1, *$3); pbs.top ()->set_param (2, *$5); delete $1; delete $3; delete $5; } ; phrase_concat: phrase '+' phrase { pbs.top ()->set_type (PhraseBlock::concat); pbs.top ()->set_param (0, *$1); pbs.top ()->set_param (0, *$3); delete $1; delete $3; } | phrase_concat '+' phrase { pbs.top ()->set_param (0, *$3); delete $3; } ; translations: /* empty */ | translations translation ; translation: LANGUAGE '=' phrase { pbs.top ()->add ($1, *$3); delete $3; } ; /***********************************/ phrase: STRING { $$ = $1; } | phrase STRING { $1->append (*$2); $$ = $1; delete $2; } ; %% extern char *yy_lang_text; int yy_lang_error (char *s) { fprintf (stderr, "lang-parse: %s in line %i, at symbol \"%s\"\n", s, lang_lineno, yy_lang_text); return 1; } graphthing-1.3.2/src/lang-flex.l0000644000076500007650000000445710536541674017012 0ustar dsymondsdsymonds%option noyywrap case-sensitive %{ #include "wx/string.h" extern "C" { #include #include } #include "lang.h" #include "lang-bison.tab.hh" #define yylval yy_lang_lval extern int lang_lineno; extern char *yy_lang_data; #define YY_INPUT(buf,result,max_size) \ { \ if (*yy_lang_data == '\0') \ result = YY_NULL; \ else { \ buf[0] = *yy_lang_data++; \ result = 1; \ } \ } %} LWS [ \t]+ CRRET \r NEWLINE \n QSTRING \"(([^"])|(\\\"))*\" /************** Start of lexical rules **************/ %% /* Kill all LWS */ {LWS} {CRRET} /* Treat newlines (almost) the same as LWS */ {NEWLINE} { ++lang_lineno; } /* Kill single comments */ "#".*{NEWLINE} { ++lang_lineno; } /* Quoted Strings */ {QSTRING} { /* Fix up quoted quotation marks */ char *s = yytext; while (*s) { char *p = strchr (s, '\\'); if (!p) break; int plen = strlen (p); s = p + 1; if (strncmp (p, "\\\"", 2)) continue; memmove (p, s, plen); // include '\0' } int len = strlen (yytext); char tmp = yytext[len - 1]; yytext[len - 1] = 0; yylval.string = new wxString (&yytext[1], wxConvUTF8); yytext[len - 1] = tmp; return STRING; } /* Languages */ "Catalan" { yylval.lang = Catalan; return LANGUAGE; } "ChineseSimp" { yylval.lang = ChineseSimp; return LANGUAGE; } "Danish" { yylval.lang = Danish; return LANGUAGE; } "Dutch" { yylval.lang = Dutch; return LANGUAGE; } "Esperanto" { yylval.lang = Esperanto; return LANGUAGE; } "Finnish" { yylval.lang = Finnish; return LANGUAGE; } "French" { yylval.lang = French; return LANGUAGE; } "German" { yylval.lang = German; return LANGUAGE; } "Greek" { yylval.lang = Greek; return LANGUAGE; } "Italian" { yylval.lang = Italian; return LANGUAGE; } "Norwegian" { yylval.lang = Norwegian; return LANGUAGE; } "Polish" { yylval.lang = Polish; return LANGUAGE; } "Portuguese" { yylval.lang = Portuguese; return LANGUAGE; } "Romanian" { yylval.lang = Romanian; return LANGUAGE; } "Spanish" { yylval.lang = Spanish; return LANGUAGE; } "Swedish" { yylval.lang = Swedish; return LANGUAGE; } "SwedishChef" { yylval.lang = SwedishChef; return LANGUAGE; } "literal" { return kwLITERAL; } "subst" { return kwSUBST; } /* Any other character */ . { return yytext[0]; } %% /************** End of lexical rules **************/ graphthing-1.3.2/src/lang.cc0000644000076500007650000002271210536541623016174 0ustar dsymondsdsymonds// // lang.cc // #include "wx/string.h" #include #include #include #include #include #include #include "lang.h" #include "phrases.h" int Translator::warn_untranslated; static struct lang_info { char *code; // ISO639 code (e.g. "de") char *name; // full name (e.g. "German") Language lang; // enum value (e.g. German) } languages[] = { { "ca", "Catalan", Catalan }, { "zh", "ChineseSimp", ChineseSimp }, { "da", "Danish", Danish }, { "nl", "Dutch", Dutch }, { "en", "English", English }, { "eo", "Esperanto", Esperanto }, { "fi", "Finnish", Finnish }, { "fr", "French", French }, { "de", "German", German }, { "el", "Greek", Greek }, { "it", "Italian", Italian }, { "no", "Norwegian", Norwegian }, { "pl", "Polish", Polish }, { "pt", "Portuguese", Portuguese }, { "ro", "Romanian", Romanian }, { "es", "Spanish", Spanish }, { "sv", "Swedish", Swedish }, { "sv_CK", "SwedishChef", SwedishChef } // CK is Cook Islands (geddit?) }; #define NUM_LANGUAGES (int) (sizeof (languages) / sizeof (languages[0])) PhraseBlock::PhraseBlock (wxString eng, type_t type) : english (eng), type (type) { } PhraseBlock::~PhraseBlock () { } void PhraseBlock::set_type (type_t type) { this->type = type; } void PhraseBlock::set_param (int id, wxString param) { if (type == concat) { concats.push_back (param); return; } else if (type == replace) { if (id == 0) base = param; else if (id == 1) substr = param; else if (id == 2) substr_new = param; else std::cerr << "Bad id for replace in set_param().\n"; return; } std::cerr << "Bad set_param() call.\n"; } void PhraseBlock::add (Language lang, wxString translation) { if (type != regular) { std::cerr << "Adding a translation to non-regular block!\n"; return; } translations[lang] = translation; } bool PhraseBlock::has_translation (Language lang) const { if (lang == English) return true; if (type == concat) { PhraseBlock *phr; std::vector::const_iterator it; for (it = concats.begin (); it != concats.end (); ++it) { phr = translator->lookup_phr (*it); if (!phr->has_translation (lang)) return false; } return true; } if (type == literal) return true; if (type == replace) { PhraseBlock *phr; phr = translator->lookup_phr (base); if (!phr) return false; return phr->has_translation (lang); } // must be a regular phrase std::map::const_iterator it; it = translations.find (lang); if (it == translations.end ()) return false; return true; } const wxString PhraseBlock::lookup (Language lang) const { std::map::const_iterator it; if (lang == English) return english; if (type == concat) { // special case: concat wxString ret; std::vector::const_iterator it; for (it = concats.begin (); it != concats.end (); ++it) ret += translator->lookup (lang, *it); return ret; } else if (type == literal) { // special case: literal return english; } else if (type == replace) { // special case: replace wxString str = translator->lookup (lang, base); str.Replace (substr.c_str (), substr_new.c_str ()); return str; } it = translations.find (lang); if (it == translations.end ()) { // fallback to English if (Translator::warn_untranslated) std::cerr << "WARNING: \"" << english.mb_str (wxConvUTF8) << "\" doesn't have a translation for " << Translator::get_language_name (lang).mb_str (wxConvUTF8) << ".\n"; return english; } return it->second; } int PhraseBlock::verify_phrase () const { static const wxString punct = wxT(".:!"); int tail_len, warns; std::map::const_iterator it; warns = 0; // Test 0: Only attempt verification if this is a regular phrase if (type != regular) return 0; // Test 1: If English phrase ends in a certain punctuation substring, // then all the translations must, too. for (tail_len = 1; tail_len < 5; ++tail_len) { wxString prop_tail = english.Right (tail_len); if (!punct.Contains (prop_tail.Left (1))) { --tail_len; break; } } if (tail_len > 0) { const wxString tail = english.Right (tail_len); for (it = translations.begin (); it != translations.end (); ++it) { Language lang = it->first; wxString trans = it->second; const wxString tail_trans = trans.Right (tail_len); if (!tail.IsSameAs (tail_trans)) { std::cerr << "WARNING: \"" << english.mb_str (wxConvUTF8) << "\"\n\tends with \"" << tail.mb_str (wxConvUTF8) << "\", but the translation for " << Translator::get_language_name (lang).mb_str (wxConvUTF8) << " doesn't!\n"; ++warns; } } } // Test 2: If English phrase includes "&", so must the translations. static const wxString amp = wxT("&"); if (english.Contains (amp)) { for (it = translations.begin (); it != translations.end (); ++it) { Language lang = it->first; wxString trans = it->second; if (!trans.Contains (amp)) { std::cerr << "WARNING: \"" << english.mb_str (wxConvUTF8) << "\"\n\thas a hotkey specifier (&)," << " but the translation for " << Translator::get_language_name (lang).mb_str (wxConvUTF8) << " doesn't!\n"; ++warns; } } } // TODO // Test 3: If English has a substitution sequence (e.g. "%i"), then // the translations must, too. (and in the right order!) return warns; } PhraseBlock *Translator::lookup_phr (const wxString s) const { std::map::const_iterator it; it = phrases.find (s); if (it == phrases.end ()) return 0; // no translations found for phrase return it->second; } void Translator::split_lang_spec (const char *spec, wxString &LL, wxString &CC) const { wxString in = wxString (spec, wxConvUTF8); int pos; pos = in.Find ('_'); if (pos < 0) { LL = in; CC = wxT(""); return; } LL = in.Mid (0, pos); CC = in.Mid (pos + 1); } Translator::Translator (int debug) { default_lang = English; warn_untranslated = debug; } Translator::~Translator () { std::map::const_iterator it; for (it = phrases.begin (); it != phrases.end (); ++it) delete it->second; } const char *yy_lang_data; void Translator::init () { #if 0 // debug extern int yy_lang_debug; yy_lang_debug = 1; #endif extern int yy_lang_parse (); yy_lang_data = phrases_raw; if (yy_lang_parse ()) { // error! throw std::runtime_error ("Bad phrase file!"); } } wxString Translator::get_language_name (Language lang) { for (int i = 0; i < NUM_LANGUAGES; ++i) if (languages[i].lang == lang) return wxString (languages[i].name, wxConvUTF8); return wxT("Unknown"); } Language Translator::get_language_from_name (const wxString lang) { for (int i = 0; i < NUM_LANGUAGES; ++i) { if (lang == wxString (languages[i].name, wxConvUTF8)) { return languages[i].lang; } } return English; // TODO: anything better we can do here? } void Translator::verify_phrases () const { std::map::const_iterator it; int tot_warns = 0, tot_missing = 0, total = 0; for (it = phrases.begin (); it != phrases.end (); ++it) { PhraseBlock *phr = it->second; tot_warns += phr->verify_phrase (); // don't check 'concat' phrase blocks, because their parts // will be caught later (or earlier) if (phr->get_type () == PhraseBlock::concat) continue; if (!phr->has_translation (default_lang)) { tot_missing += 1; std::cerr << "\"" << it->first.mb_str (wxConvUTF8) << "\"\n"; } total += 1; } if (tot_warns > 0) { std::cerr << "-------------\n"; std::cerr << tot_warns << " warning" << (tot_warns > 1 ? "s" : "") << ".\n"; std::cerr << "-------------\n"; } if (tot_missing > 0) { double perc = 100 - (tot_missing * 100.0) / total; std::cerr << "-------------\n"; std::cerr << "\"" << Translator::get_language_name (default_lang).mb_str (wxConvUTF8) << "\" is missing " << tot_missing << "/" << total << " translations (" << perc << "% complete).\n"; std::cerr << "-------------\n"; } } bool Translator::guess_language (bool ignore_cc) { // First, check environment variables char *envvars[3] = { "LANGUAGE", "LC_ALL", "LANG" }; for (int i = 0; i < 3; ++i) { char *lang = getenv (envvars[i]); if (!lang) continue; wxString LL, CC; if (ignore_cc) split_lang_spec (lang, LL, CC); else LL = wxString (lang, wxConvUTF8); //std::cerr << "Looking for '" << LL << "'.\n"; for (int j = 0; j < NUM_LANGUAGES; ++j) { if (LL == wxString (languages[j].code, wxConvUTF8)) { // Found it! set_language (languages[j].lang); return true; } } } // Failed! if (ignore_cc) return false; // can't do any more // Try without country code return guess_language (true); } void Translator::set_language (Language lang) { default_lang = lang; } Language Translator::get_language () const { return default_lang; } void Translator::add_phrase (PhraseBlock *phr) { wxString eng = phr->lookup (English); phrases[eng] = phr; } const wxString Translator::lookup (Language lang, const char *s) const { return lookup (lang, wxString (s, wxConvUTF8)); } const wxString Translator::lookup (Language lang, const wxString s) const { PhraseBlock *phr; if (lang == English) return s; phr = lookup_phr (s); if (!phr) { // fallback to English if (warn_untranslated) std::cerr << "WARNING: \"" << s.mb_str (wxConvUTF8) << "\" doesn't have a PhraseBlock.\n"; return s; } return phr->lookup (lang); } const wxString Translator::lookup (const wxString s) const { return lookup (default_lang, s); } graphthing-1.3.2/src/lang.h0000644000076500007650000000432610536541564016043 0ustar dsymondsdsymonds// // lang.h // #ifndef __LANG_H__ #define __LANG_H__ #include "wx/string.h" #include "config.h" #ifdef ENABLE_NLS #include #include typedef enum { Catalan, ChineseSimp, Danish, Dutch, English, Esperanto, Finnish, French, German, Greek, Italian, Norwegian, Polish, Portuguese, Romanian, Spanish, Swedish, SwedishChef } Language; // A phrase (in English), and all its translations // TODO: Make this a base class, and derive classes for the different types class PhraseBlock { public: typedef enum { regular, concat, literal, replace } type_t; private: wxString english; type_t type; // for 'regular' type std::map translations; // for 'concat' type std::vector concats; // for 'replace' type wxString base, substr, substr_new; public: PhraseBlock (wxString eng, type_t type = regular); ~PhraseBlock (); type_t get_type () const { return type; } void set_type (type_t type); void set_param (int id, wxString param); void add (Language lang, wxString translation); bool has_translation (Language lang) const; const wxString lookup (Language lang) const; int verify_phrase () const; }; typedef struct { char *english, *other; } raw_trans; class Translator { private: std::map phrases; Language default_lang; void split_lang_spec (const char *spec, wxString &LL, wxString &CC) const; public: static int warn_untranslated; Translator (int debug = 0); ~Translator (); void init (); static wxString get_language_name (Language lang); static Language get_language_from_name (const wxString lang); void verify_phrases () const; bool guess_language (bool ignore_cc = false); void set_language (Language lang); Language get_language () const; void add_phrase (PhraseBlock *phr); const wxString lookup (Language lang, const char *s) const; const wxString lookup (Language lang, const wxString s) const; const wxString lookup (const wxString s) const; // avoid calling this, unless necessary PhraseBlock *lookup_phr (const wxString s) const; }; extern Translator *translator; // defined in main.cc #define _(str) (translator->lookup (wxT(str))) #else // ! ENABLE_NLS #define _(str) (wxT(str)) #endif #endif // __LANG_H__ graphthing-1.3.2/src/langdialog.cc0000644000076500007650000000602210501136234017336 0ustar dsymondsdsymonds// // langdialog.cc // #include "wx/bitmap.h" #include "wx/bmpbuttn.h" #include "wx/button.h" #include "wx/dialog.h" #include "wx/gbsizer.h" #include "wx/image.h" #include "wx/sizer.h" #include "wx/statline.h" #include "wx/stattext.h" #include "wx/string.h" #include "wx/utils.h" #include "lang.h" #include "langdialog.h" #include "flags/cat.xpm" #include "flags/de.xpm" #include "flags/es.xpm" #include "flags/fr.xpm" #include "flags/it.xpm" #include "flags/ro.xpm" #include "flags/se.xpm" #include "flags/uk.xpm" // List of all languages we (at least partially) support static struct lang_data { Language lang; // enum value from lang.h (e.g. German) char **xpm; // XPM data (may be NULL) } supported[] = { { Catalan, cat_xpm }, { English, uk_xpm }, { French, fr_xpm }, { German, de_xpm }, { Italian, it_xpm }, { Romanian, ro_xpm }, { Spanish, es_xpm }, { SwedishChef, se_xpm } }; #define NUM_SUPPORTED (sizeof (supported) / sizeof (supported[0])) enum { ID_LANG = 1000 }; BEGIN_EVENT_TABLE(LangDialog, wxDialog) EVT_BUTTON(ID_LANG, LangDialog::OnButton) END_EVENT_TABLE() LangDialog::LangDialog () : wxDialog (0, wxID_ANY, wxString (wxT("Select Language"))) { m_lang = English; wxBeginBusyCursor(); wxGridBagSizer *mainsizer = new wxGridBagSizer (5, 5); int num_rows, num_cols; num_cols = 3; // TODO: make this adaptive num_rows = (NUM_SUPPORTED + num_cols - 1) / num_cols; int row = 0, col = 0; for (unsigned int i = 0; i < NUM_SUPPORTED; ++i) { Language lang = supported[i].lang; //String lang_name = Translator::get_language_name (lang); wxString lang_name = translator->lookup (lang, "English"); wxButton *btn; #if 0 if (supported[i].xpm) { wxBitmap *bmp = new wxBitmap (supported[i].xpm); wxImage img = bmp->ConvertToImage (); img.Rescale (img.GetWidth () * 2, img.GetHeight () * 2); wxPoint pos (img.GetWidth () / 2, img.GetHeight () / 2); wxSize sz (img.GetWidth () * 2, img.GetHeight () * 2); img.Resize (sz, pos); wxBitmap *f_bmp = new wxBitmap (img); btn = new wxBitmapButton (this, ID_LANG + i, *f_bmp); btn->SetToolTip (lang_name); #else if (supported[i].xpm) { wxBitmap *bmp = new wxBitmap (supported[i].xpm); btn = new wxBitmapButton (this, ID_LANG + i, *bmp); btn->SetToolTip (lang_name); #endif } else { btn = new wxButton (this, ID_LANG + i, lang_name); } if (supported[i].lang == m_lang) btn->SetFocus (); Connect (ID_LANG + i, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler (LangDialog::OnButton)); wxGBPosition pos (row, col); mainsizer->Add (btn, pos); ++col; if (col >= num_cols) { ++row; col = 0; } } SetSizer (mainsizer); SetAutoLayout (true); mainsizer->Layout (); mainsizer->SetSizeHints (this); mainsizer->Fit (this); Centre (wxBOTH); wxEndBusyCursor(); } void LangDialog::OnButton (wxCommandEvent &event) { m_lang = supported[event.GetId () - ID_LANG].lang; //std::cerr << "LangDialog: event ID = " << event.GetId () << ".\n"; //std::cerr << "LangDialog: m_lang = " << m_lang << ".\n"; EndModal (wxID_OK); } graphthing-1.3.2/src/langdialog.h0000644000076500007650000000057710501136234017211 0ustar dsymondsdsymonds// // langdialog.h // #ifndef __LANGDIALOG_H__ #define __LANGDIALOG_H__ #include "wx/dialog.h" #include "lang.h" class wxWindow; class LangDialog : public wxDialog { public: LangDialog (); Language GetLanguage () const { return m_lang; } protected: void OnButton (wxCommandEvent &event); Language m_lang; private: DECLARE_EVENT_TABLE() }; #endif //__LANGDIALOG_H__ graphthing-1.3.2/src/logo.xpm0000644000076500007650000000253010501136234016414 0ustar dsymondsdsymonds/* XPM */ static char * logo_xpm[] = { "32 32 8 1", " c #060B0C", ". c #2F3234", "+ c #59595A", "@ c #797B79", "# c #969996", "$ c #B4B6B3", "% c #D2D4D2", "& c #FCFFFB", " ", " ", " &&&&&&&&&&&&&&&&&&&&&&&&&&&& ", " &&&&&&&&&&&&&&&%##%&&&&&&&&& ", " &&&&&&&&&&&&&&# #&&&&&&&& ", " &&&&&&&&&&&&&% %&&&&&&& ", " &&&&&&&&&&&&&# @&&&&&&& ", " &&&&&&&&&&&&&# @&&&&&&& ", " &&&&&&&&&&&&&$ $&&&&&&& ", " &&&&&&&&&&&&@ + @&&&&&&&& ", " &&&&&$@+#&%..%&%@@$&&&&&&&&& ", " &&&&# . @&&&&&&&&&&&&&&&& ", " &&&% @&&&&&&&&&&&&&&&&& ", " &&&$ +&&&&&&&&&&&&&&&&& ", " &&&$ +&&&&&&&&&&&&&&&&& ", " &&&&. #&&&&&&&&&&&&&&&&& ", " &&&&$ + $&&&&&&&&&&&&&&&& ", " &&&&&&$$%&$ @&&&&&&&&&&&&&&& ", " &&&&&&&&&&&%.+&&&&&&&&&&&&&& ", " &&&&&&&&&&&&&+.%&&&&&&&&&&&& ", " &&&&&&&&&&&&&&@ $&&&&&&&&&&& ", " &&&&&&&&&&&&&&&$ #&$@@%&&&&& ", " &&&&&&&&&&&&&&&&%.. #&&&& ", " &&&&&&&&&&&&&&&&&# &&&& ", " &&&&&&&&&&&&&&&&&+ $&&& ", " &&&&&&&&&&&&&&&&&+ $&&& ", " &&&&&&&&&&&&&&&&&$ &&&& ", " &&&&&&&&&&&&&&&&&&@ $&&&& ", " &&&&&&&&&&&&&&&&&&&%##%&&&&& ", " &&&&&&&&&&&&&&&&&&&&&&&&&&&& ", " ", " "}; graphthing-1.3.2/src/logo_big.xpm0000644000076500007650000004167710501136234017254 0ustar dsymondsdsymonds/* XPM */ static char * logo_big_xpm[] = { "128 128 16 1", " c #020400", ". c #060C0F", "+ c #191C1C", "@ c #262829", "# c #343737", "$ c #454748", "% c #535555", "& c #626564", "* c #717473", "= c #7F8184", "- c #929594", "; c #A4A6A5", "> c #B4B6B5", ", c #C6C8C6", "' c #D6D9D7", ") c #FDFFFC", " ", " ", " . . . . . . . . .. . . . . ..... . ", " .... ........... ... ....... ... .... .... ... ... ... ... ....... ... ", " ........ .................................................. ........................................................ . ", " .......................................................................................................................... ", " .... ....... ", " ......................................................................................................................... ", " ...$===============================================================================================================$..... ", " .. .=)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))=. ... ", " .. .=)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))=. ... ", " .. .=)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))=. ... ", " . .=)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))=. ... ", " . .=)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))=. ... ", " . .=)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))',>;--==--;,')))))))))))))))))))))))))))))))))))))=. ... ", " .. .=)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))>=%#@+ .+#%*;'))))))))))))))))))))))))))))))))))))=. ... ", " .. .=))))))))))))))))))))))))))))))))))))))))))))))))))))))))))'>=&$@+ ..@#%*;'))))))))))))))))))))))))))))))))))=. ... ", " .. .=)))))))))))))))))))))))))))))))))))))))))))))))))))))))))'>&+ ......... .%-')))))))))))))))))))))))))))))))))=. ... ", " .. .=))))))))))))))))))))))))))))))))))))))))))))))))))))))))';%@ ........ +$-'))))))))))))))))))))))))))))))))=. ... ", " .. .=)))))))))))))))))))))))))))))))))))))))))))))))))))))))'>% ........ $-')))))))))))))))))))))))))))))))=. ... ", " .. .=)))))))))))))))))))))))))))))))))))))))))))))))))))))))>&@. .............. +$;)))))))))))))))))))))))))))))))=. ... ", " .. .=))))))))))))))))))))))))))))))))))))))))))))))))))))))'=+.................... .*'))))))))))))))))))))))))))))))=. ... ", " .. .=)))))))))))))))))))))))))))))))))))))))))))))))))))))'>%. ................... .$-')))))))))))))))))))))))))))))=. ... ", " .. .=))))))))))))))))))))))))))))))))))))))))))))))))))))),=#.......................@&>)))))))))))))))))))))))))))))=. ... ", " .. .=)))))))))))))))))))))))))))))))))))))))))))))))))))))>%@........................#-)))))))))))))))))))))))))))))=. ... ", " .. .=)))))))))))))))))))))))))))))))))))))))))))))))))))))-#.........................+-)))))))))))))))))))))))))))))=. ... ", " .. .=)))))))))))))))))))))))))))))))))))))))))))))))))))))-+........................ =)))))))))))))))))))))))))))))=. ... ", " .. .=)))))))))))))))))))))))))))))))))))))))))))))))))))))= ....................... *'))))))))))))))))))))))))))))=. ... ", " .. .=)))))))))))))))))))))))))))))))))))))))))))))))))))))= ....................... *'))))))))))))))))))))))))))))=. ... ", " .. .=)))))))))))))))))))))))))))))))))))))))))))))))))))))= ....................... *'))))))))))))))))))))))))))))=. ... ", " .. .=)))))))))))))))))))))))))))))))))))))))))))))))))))))-+........................ *'))))))))))))))))))))))))))))=. ... ", " .. .=)))))))))))))))))))))))))))))))))))))))))))))))))))))-@........................ =)))))))))))))))))))))))))))))=. ... ", " .. .=)))))))))))))))))))))))))))))))))))))))))))))))))))));%@........................@-)))))))))))))))))))))))))))))=. ... ", " .. .=)))))))))))))))))))))))))))))))))))))))))))))))))))))>*#.......................+%;)))))))))))))))))))))))))))))=. ... ", " .. .=)))))))))))))))))))))))))))))))))))))))))))))))))))))>&@..................... .#=,)))))))))))))))))))))))))))))=. ... ", " .. .=))))))))))))))))))))))))))))))))))))))))))))))))))))'-$+..................... .&>')))))))))))))))))))))))))))))=. ... ", " .. .=))))))))))))))))))))))))))))))))))))))))))))))))))'>=%@.. ....................#-'))))))))))))))))))))))))))))))=. ... ", " .. .=)))))))))))))))))))))))))))))))))))))))))))))))))';&+....................... #&>)))))))))))))))))))))))))))))))=. ... ", " .. .=)))))))))))))))))))))))))))))))))))))))))))))))'>=%@. .#%%$+ ........... .#*>')))))))))))))))))))))))))))))))=. ... ", " .. .=)))))))))))))))))))))))))))))))))))))))))))))));&@ ..+&>;=$...............#&>)))))))))))))))))))))))))))))))))=. ... ", " .. .=))))))))))))))))))))))))))''''))))))))))))))'>=%@ @%=>'',-&$@. .+#&->')))))))))))))))))))))))))))))))))=. ... ", " .. .=))))))))))))))))))))))))',>>;>,')))))))))))'>*@. @%;'))))),-%@. ....@$=>')))))))))))))))))))))))))))))))))))=. ... ", " .. .=))))))))))))))))))))),;-*&&%%%&*=;>')))))',-&@. @%=>')))))))'>-=**&**=-;,'))))))))))))))))))))))))))))))))))))=. ... ", " .. .=)))))))))))))))))))),=$@ .....+#*>'))))>*#... +%;')))))))))))))''''')))))))))))))))))))))))))))))))))))))))))=. ... ", " .. .=))))))))))))))))))';&#+ .. +#%=>',-&# +$*;'))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))=. ... ", " .. .=)))))))))))))))))'-$ ............@*;*#+ +$-'))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))=. ... ", " .. .=))))))))))))))))'-$+ ..............#%# +$*;')))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))=. ... ", " .. .=)))))))))))))))'>% ................. $-,)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))=. ... ", " .. .=)))))))))))))))>&@ . ..................+#*;,))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))=. ... ", " .. .=)))))))))))))))=+.......................+*'))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))=. ... ", " .. .=)))))))))))))),&. ......................+=)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))=. ... ", " .. .=)))))))))))))';%....................... =)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))=. ... ", " .. .=))))))))))))),=#....................... *'))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))=. ... ", " .. .=)))))))))))))>&@........................ %>')))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))=. ... ", " .. .=)))))))))))));%@....................... %;')))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))=. ... ", " .. .=)))))))))))));$+....................... $-')))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))=. ... ", " .. .=)))))))))))));$+....................... %;')))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))=. ... ", " .. .=)))))))))))))>%@....................... %;')))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))=. ... ", " .. .=)))))))))))))>&@....................... &>')))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))=. ... ", " .. .=))))))))))))),=#....................... &,))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))=. ... ", " .. .=)))))))))))))';%. ......................+=)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))=. ... ", " .. .=)))))))))))))),&. ......................#-)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))=. ... ", " .. .=)))))))))))))))-@......................+$;)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))=. .... ", " .. .=)))))))))))))))>%@.....................+$;)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))=. ... ", " .. .=)))))))))))))))';%................... ..@&-')))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))=. ... ", " .. .=)))))))))))))))))-#+ ..................+#-'))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))=. .. ", " .. .=))))))))))))))))),-%@ ......... .@$%%@ +$=>)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))=. .. ", " .. .=)))))))))))))))))));%@ ...........+%->;%....+*,')))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))=. .. ", " .. .=)))))))))))))))))))'>=&$#@++++@#$&=>''';&#. .@&;'))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))=. ... ", " .. .=)))))))))))))))))))))',-*%$##$&*-,'))))),*+....$-')))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))=. ... ", " .. .=)))))))))))))))))))))))'>>;;;;>,'')))))))>=$+ +$=>')))))))))))))))))))))))))))))))))))))))))))))))))))))))))))=. .... ", " .. .=))))))))))))))))))))))))))))))))))))))))))'-#+.. #&>)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))=. ... ", " .. .=)))))))))))))))))))))))))))))))))))))))))))'-&@. #&;')))))))))))))))))))))))))))))))))))))))))))))))))))))))))=. ... ", " .. .=)))))))))))))))))))))))))))))))))))))))))))))>&@...+$-'))))))))))))))))))))))))))))))))))))))))))))))))))))))))=. ... ", " .. .=)))))))))))))))))))))))))))))))))))))))))))))'>=$+ +$=,)))))))))))))))))))))))))))))))))))))))))))))))))))))))=. ... ", " .. .=)))))))))))))))))))))))))))))))))))))))))))))))'-$....@*,))))))))))))))))))))))))))))))))))))))))))))))))))))))=. ... ", " .. .=))))))))))))))))))))))))))))))))))))))))))))))))'-&@. .#&;'))))))))))))))))))))))))))))))))))))))))))))))))))))=. ... ", " .. .=)))))))))))))))))))))))))))))))))))))))))))))))))'>&+....%;')))))))))))))))))))))))))))))))))))))))))))))))))))=. ... ", " .. .=))))))))))))))))))))))))))))))))))))))))))))))))))'>=$. +%-,))))))))))))))))))))))))))))))))))))))))))))))))))=. ... ", " .. .=))))))))))))))))))))))))))))))))))))))))))))))))))))'=#+...#*>)))))))))))))))))))))))))))))))))))))))))))))))))=. ... ", " .. .=))))))))))))))))))))))))))))))))))))))))))))))))))))),-%@. .#*;')))))))))))))))))))))))))))))))))))))))))))))))=. ... ", " .. .=)))))))))))))))))))))))))))))))))))))))))))))))))))))));%@ .+$;)))))))))))))))))))))))))))))))))))))))))))))))=. ... ", " .. .=)))))))))))))))))))))))))))))))))))))))))))))))))))))))'>*$+ .+%-,)))))))))))))))))))))))))))))))))))))))))))))=. ... ", " .. .=))))))))))))))))))))))))))))))))))))))))))))))))))))))))),=$....@='))))))))))))))))))))))))))))))))))))))))))))=. ... ", " .. .=)))))))))))))))))))))))))))))))))))))))))))))))))))))))))),-%@ .#*;'))))))))))))))))))))))))))))))))))))))))))=. ... ", " .. .=)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))'>&+ ..+&>')))))))))))''''))))))))))))))))))))))))))=. ... ", " .. .=))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))'>*#. @%-,)))))'>;-=****=-;>')))))))))))))))))))))=. ... ", " .. .=))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))'=@....#=,)))';*#+. +$*>'))))))))))))))))))))=. ... ", " .. .=))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))),-%@. .$=;>;=%#+. .+#%=>'))))))))))))))))))=. ... ", " .. .=)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))));%@...#%%$@..............+&>')))))))))))))))))=. ... ", " .. .=)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))';*#. .@@+.............. .@&;)))))))))))))))))=. ... ", " .. .=))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))),=#.......................&,))))))))))))))))=. ... ", " .. .=)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))),=#+................... .#=,)))))))))))))))=. ... ", " .. .=)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))>%@......................@-)))))))))))))))=. ... ", " .. .=)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))));$+.......................*'))))))))))))))=. ... ", " .. .=)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))=+........................%>')))))))))))))=. ... ", " .. .=))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))'* .......................$-,)))))))))))))=. ... ", " .. .=)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))'>& .......................#&>)))))))))))))=. ... ", " .. .=)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))';% .......................@%>)))))))))))))=. ... ", " .. .=)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))';% ........................+$;)))))))))))))=. ... ", " .. .=)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))'-$.........................+$;)))))))))))))=. ... ", " .. .=)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))';%.........................@%;)))))))))))))=. ... ", " .. .=)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))'>%. .......................@&>)))))))))))))=. ... ", " .. .=)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))),&. .......................#*,)))))))))))))=. ... ", " .. .=))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))'*. ..................... .$-')))))))))))))=. ... ", " .. .=)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))-+...................... .&,))))))))))))))=. ... ", " .. .=)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))>%@......................+='))))))))))))))=. ... ", " .. .=)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))'-$.....................+$;)))))))))))))))=. ... ", " .. .=)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))),*@... ............ $-')))))))))))))))=. ... ", " .. .=)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))));%@.. ........... +='))))))))))))))))=. ... ", " .. .=)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))';&@. ............$*,)))))))))))))))))=. ... ", " .. .=)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))>&@ .........+#='))))))))))))))))))=. ... ", " .. .=)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))'>-&$@+. ..+#$*-,)))))))))))))))))))=. ... ", " .. .=)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))',-&#@+ +@$*;')))))))))))))))))))))=. ... ", " . .=)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))'>;--==--;>'))))))))))))))))))))))=. ... ", " . .=)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))=. ... ", " . .=)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))=. ... ", " .. .=)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))=. ... ", " .. .=)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))=. ... ", " .. .=)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))=. ... ", " ...$===============================================================================================================$..... ", " ......................................................................................................................... ", " .... ....... ", " .......................................................................................................................... ", " ........ ........................................................................... ...... ............... ......... . ", " .... ........... ... ... ... ... ... ... ... .... .... ... ... ", " . . . . . . . . . .. . . . . ", " "}; graphthing-1.3.2/src/logo_sc.xpm0000644000076500007650000000574510501136234017114 0ustar dsymondsdsymonds/* XPM */ static char * logo_sc_xpm[] = { "48 48 33 1", " c None", ". c #601E19", "+ c #8B5D50", "@ c #6B8CB1", "# c #A0C4DE", "$ c #C08D71", "% c #C4C2C6", "& c #7EA0C8", "* c #B1416C", "= c #CAA284", "- c #AD9C92", "; c #733A2A", "> c #E1E3E7", ", c #89B1D6", "' c #7B7889", ") c #808CA0", "! c #E0D3CB", "~ c #BEB3BC", "{ c #9B4953", "] c #A4A0A8", "^ c #854E40", "/ c #B6D0E3", "( c #A56255", "_ c #AA7867", ": c #A4B2C4", "< c #9C9BA5", "[ c #CBD2D9", "} c #A7897D", "| c #982856", "1 c #D1B198", "2 c #A56183", "3 c #AEAFB7", "4 c #99B5D1", "%%%%[3<3~~%[[%%%[[![!!>>>>>/:&,&,,,&&&&&&@&@@@@@", "[%~333~<))<3~~3%%[[[>!>>>>>:,4&,&,&,&&&&&&&@@@@@", "~33]3]<''}<]33~%%!![!>>>>>>#:,4,,,&,,,&&&&@&&@@@", "~]3]33)')<]:~~%[[[>>>!>>>>>/44,,,,,,,&,&,&&@&@@@", "%%~~3<}'<<]~:%%%[![!>>>>>>>>#4#444,,,,,&,&,&&@&&", "~~~~~]<<<]3:~~%[[[>>[>!>>>>>%###:3:],,,,&,&&&&&)", "~~~%~]]]<<]~%%%%[[[>[>!>>>>[/%%:<<<:],,,,,,&&&@&", "%~[%~]]]]]3:~~%!%[![>[>[[[[%%3}'+'}<4,,,,,,,&&&&", ":%%%~~~~]]33%~%%%![>!>![!%~-}'+^^^'}<4,,,,,&&&&&", "~[%~~%~~:%%[%%[%[%[[![!%=--}_^^^^^+_]4#,,,,,,&&&", "#%#::%#::#/>>/%%%[!!!%-_'((++^++^++_~~#,#,,,,&&&", "&&&&&&,4,4/>>[%%!%~~='^;^;;;;;^^(_(+-%####,,,,,&", "&&,&,,,44##>>>%1$_+;.;;;.;.;;;;^(___}~//###,,,,&", "&&&&&,,44##>>1$'^;..^(_+^___(;;;^^_(}-#/####,,,,", "&&&,&,,44%~~!1_(^;..+2((_$$$$$_((+__=-3//###,,,,", ",&&,,44~33-$1$_^...;{({(($$=====$$=11-=%//###,,,", ",&44::33}__}=(^;;.;(({{((($$$=====11!13%[//##,,,", "&,4]3]}_'^+_(+;;;^((((*((*$$$====111!%%[//####,,", "&:43]-}_++((^;;;^__((*{(((($$$=====11!![>///##,,", "&,:3--}(^^++^;;;(__(((**(*(($$$$$$$=11!/>//###4,", "&,]:]}_+;^^+;;;+}__(*{(*((((**({({((_=1[>///##,,", "&,4:3]}'_(;+;;+__$(({{*(*({|.;;;;;.;;+}3/>//###,", ",&4:#33-_(__^+_$$$(({{{{{{....;;.;;;;;+}%[//##,,", ",,4#:%~-$}=1=$$$$$(({;....;;;;;;;;;;^^+}[>//###4", ",,,44#%!!=1!1=$$$(({;.....;;;^^^;;;++++'3[>//##,", "&,44##%%!=1!!=$$$_({..;..;^(({^;^^(_$__}):#####4", ",,,44/#[!==!!1=$$((;..;..+^;....^_$$==11%%//###,", "&,,,###/1-$>!1=$_(+;.;;^;;.....^_$=1==1!!>[//##4", ",,,,###/[=-!!1=$(++;;;;^;.....{$$=1111%![[///##,", "&,,,,###/[1!>1=$((;;.;;....;{_$===11=1%[>>//##44", ",,,#####//[>>!=_^^;;.;;^+__$$=======11%!>///###,", "&&,,,####/!!!!=(^;;;;^+($$=$========11%[>>//##44", ",,,,#####//[>!1_^;;^^+_}$$$==$$$$$=$11[>////##,,", "&,,,,,###//!>!1$+^^++_}}$$$$$$$$$$==11#>>//###,,", "&,,,,#####//!!1=__+____}$_$____$$$==33%>//###,,,", "&,,,,#,####/[!!11$}__}$_$$$_$$$$$=$-3%/[//##4,,&", ",&,,,,####/#/[!!!!=}}_}_$}$$$$=$$==--~#//###,,,&", "&,,,,,,,####//[[!!!1-}}}}$$}$$$$}$=}=]~[#%#44&,&", "&,,,,,######//[[[>[%1=$}_$}$$$}_(22{22-%3~~)&&)&", "&&&,,,,,,####////[[~1==_((((((({*||**2$13:%<'@@@", "&&,&,,,#,###:/##[>[3}_2***||||*|*|***2_1~33]@@)&", "&&&&&,,,,4##33%/>>[~$2***||.||*|*****2_=~~:3&'@)", "&&&&,&,,,#::333[>>[=-2****|*||||****222~~%%:)&@)", "&&&&&&,&,4#3--1%>!~]=_********{|**2**22=%~%%&))@", "&@&&&,&&,,3-3=1=%!~]<$2*****22'2^{**2*2=%%%%:),'", "&@&&&&&&&<:--==1111~<'_*****2}''+22*22_-%%[%::&)", "&&@&&&&&,&]<--1111%~3}_2***{2}))'2{2*2$ #include #include "config.h" #include "gui.h" #ifdef ENABLE_NLS #include "lang.h" #ifndef LANG_DIALOG_IS_DISABLED #include "langdialog.h" #endif Translator *translator; #endif class GTApp : public wxApp { private: GTFrame *win; public: virtual bool OnInit (); virtual int OnExit (); void setProgress (double frac); }; IMPLEMENT_APP(GTApp) bool GTApp::OnInit () { #ifdef ENABLE_NLS translator = new Translator (1); // be noisy try { translator->init (); } catch (std::runtime_error e) { std::cerr << "Translation init failed: " << e.what () << "\n"; return false; } #ifndef LANG_DIALOG_IS_DISABLED if (!translator->guess_language ()) { LangDialog *dlg = new LangDialog (); if (dlg->ShowModal () == wxID_OK) translator->set_language (dlg->GetLanguage ()); dlg->Destroy (); } #else translator->guess_language (); #endif #ifdef GT_WITH_DEV translator->verify_phrases (); #endif #endif win = new GTFrame (); win->Show (true); SetTopWindow (win); if (argc > 1) win->loadGraph (wxString (argv[1], wxConvUTF8)); return true; } int GTApp::OnExit () { #ifdef ENABLE_NLS delete translator; #endif return 0; } void GTApp::setProgress (double frac) { win->setProgress (frac); } void setProgress (double frac) { wxGetApp ().setProgress (frac); } graphthing-1.3.2/src/main.h0000644000076500007650000000015610501136234016025 0ustar dsymondsdsymonds// // main.h // #ifndef __MAIN_H__ #define __MAIN_H__ void setProgress (double frac); #endif // __MAIN_H__ graphthing-1.3.2/src/math.cc0000644000076500007650000000265210501136234016173 0ustar dsymondsdsymonds// // math.cc // #include "math.h" int Math::choose (int n, int m) { static const int cache[] = { // half of Pascal's triangle 1, 1, 1, 2, 1, 3, 1, 4, 6, 1, 5, 10, 1, 6, 15, 20, 1, 7, 21, 35, 1, 8, 28, 56, 70, 1, 9, 36, 84, 126, 1, 10, 45, 120, 210, 252, 1, 11, 55, 165, 330, 462, 1, 12, 66, 220, 495, 792, 924, 1, 13, 78, 286, 715, 1287, 1716, 1, 14, 91, 364, 1001, 2002, 3003, 3432, 1, 15, 105, 455, 1365, 3003, 5005, 6435, }; static const int CACHE_MAX = 15; if (m > n - m) m = n - m; if (m < 0) return 0; if (n <= CACHE_MAX) { if (n & 1) return cache[(n + 1) * (n + 1) / 4 + m]; else return cache[(n + 2) * n / 4 + m]; } return (Math::choose (n - 1, m - 1) + Math::choose (n - 1, m)); } int Math::factorial (int n) { static const int cache[] = { 1, 1, 2, 6, 24, 120, // 0 - 5 720, 5040, 40320, 362880, 3628800, // 6 - 10 39916800, 479001600 // 11, 12 }; static const int CACHE_MAX = 12; int i, tot; if (n < 2) return 1; if (n <= CACHE_MAX) return cache[n]; // FIXME: Uh, oh! Overflow! for (i = 13, tot = cache[12]; i <= n; ++i) tot *= i; return tot; } int Math::stirling (int n, int k) { if (n == k) return 1; if ((n <= 0) || (k <= 0)) return 0; if (k == 1) return Math::factorial (n - 1); if (n == (k + 1)) return Math::choose (n, 2); if (k > n) return 0; return ((n - 1) * Math::stirling (n - 1, k) + Math::stirling (n - 1, k - 1)); } graphthing-1.3.2/src/math.h0000644000076500007650000000034610501136234016033 0ustar dsymondsdsymonds// // math.h // #ifndef __MATH_H__ #define __MATH_H__ class Math { public: static int choose (int n, int m); static int factorial (int n); static int stirling (int n, int k); // ... of the first kind }; #endif // __MATH_H__ graphthing-1.3.2/src/matrix.cc0000644000076500007650000000654010501136234016546 0ustar dsymondsdsymonds// // matrix.cc // #include #include #include #include "matrix.h" Matrix::MatrixRep::MatrixRep (unsigned int _rows, unsigned int _columns) { rows = _rows; columns = _columns; data = new int[rows * columns]; ref = 0; } Matrix::MatrixRep::MatrixRep (const MatrixRep *other) { rows = other->rows; columns = other->columns; data = new int[rows * columns]; ref = 0; memcpy (data, other->data, rows * columns * sizeof (int)); } Matrix::MatrixRep::~MatrixRep () { delete[] data; } void Matrix::unref () { if (--rep->ref < 1) delete rep; } void Matrix::mutator () { if (rep->ref < 2) return; const MatrixRep *old = rep; unref (); rep = new MatrixRep (old); ++rep->ref; } Matrix::Matrix (unsigned int _rows, unsigned int _columns) { rep = new MatrixRep (_rows, _columns); ++rep->ref; } Matrix::Matrix (const Matrix &other) { rep = other.rep; ++rep->ref; } Matrix::~Matrix () { unref (); } unsigned int Matrix::rows () const { return rep->rows; } unsigned int Matrix::columns () const { return rep->columns; } int &Matrix::operator () (unsigned int row, unsigned int column) { // TODO: bounds checking mutator (); return rep->data[row * rep->columns + column]; } int Matrix::operator () (unsigned int row, unsigned int column) const { // TODO: bounds checking return rep->data[row * rep->columns + column]; } Matrix &Matrix::operator= (const Matrix &other) { if (this == &other) return *this; unref (); rep = other.rep; ++rep->ref; return *this; } bool Matrix::operator== (const Matrix &other) const { unsigned int i, j; if (rep == other.rep) return true; if ((rep->rows != other.rep->rows) || (rep->columns != other.rep->columns)) return false; for (j = 0; j < rep->rows; ++j) for (i = 0; i < rep->columns; ++i) if ((*this) (i, j) != other (i, j)) return false; return true; } void Matrix::operator+= (const Matrix &other) { // TODO: check for equal sizes unsigned int i, j; mutator (); for (j = 0; j < rep->rows; ++j) for (i = 0; i < rep->columns; ++i) (*this) (i, j) += other (i, j); } Matrix Matrix::operator+ (const Matrix &other) const { // TODO: check for equal sizes Matrix ret (*this); ret += other; return ret; } void Matrix::operator-= (const Matrix &other) { // TODO: check for equal sizes unsigned int i, j; mutator (); for (j = 0; j < rep->rows; ++j) for (i = 0; i < rep->columns; ++i) (*this) (i, j) -= other (i, j); } Matrix Matrix::operator- (const Matrix &other) const { // TODO: check for equal sizes Matrix ret (*this); ret -= other; return ret; } Matrix Matrix::operator* (const Matrix &other) const { // TODO: check for proper sizes: this.columns == other.rows Matrix ret (rows (), other.columns ()); unsigned int common = columns (); for (unsigned int i = 0; i < ret.columns (); ++i) { for (unsigned int j = 0; j < ret.rows (); ++j) { int tot = 0; for (unsigned int k = 0; k < common; ++k) tot += (*this) (j, k) * other (k, i); ret (j, i) = tot; } } return ret; } std::ostream &operator<< (std::ostream &o, const Matrix &mat) { unsigned int i, j; o << '/' << std::string (mat.rep->columns * 2, '-') << "-\\\n"; for (j = 0; j < mat.rep->rows; ++j) { o << "| "; for (i = 0; i < mat.rep->columns; ++i) o << mat (i, j) << ' '; o << "|\n"; } o << '\\' << std::string (mat.rep->columns * 2, '-') << "-/\n"; return o; } graphthing-1.3.2/src/matrix.h0000644000076500007650000000206110501136234016402 0ustar dsymondsdsymonds// // matrix.h // #ifndef __MATRIX_H__ #define __MATRIX_H__ #include class Matrix { private: class MatrixRep { public: unsigned int rows, columns; int *data; unsigned int ref; MatrixRep (unsigned int _rows, unsigned int _columns); MatrixRep (const MatrixRep *other); ~MatrixRep (); }; MatrixRep *rep; void unref (); void mutator (); public: Matrix (unsigned int _rows, unsigned int _columns); Matrix (const Matrix &other); ~Matrix (); unsigned int rows () const; unsigned int columns () const; int &operator () (unsigned int row, unsigned int column); int operator () (unsigned int row, unsigned int column) const; Matrix &operator= (const Matrix &other); bool operator== (const Matrix &other) const; void operator+= (const Matrix &other); Matrix operator+ (const Matrix &other) const; void operator-= (const Matrix &other); Matrix operator- (const Matrix &other) const; Matrix operator* (const Matrix &other) const; friend std::ostream &operator<< (std::ostream &o, const Matrix &mat); }; #endif // __MATRIX_H__ graphthing-1.3.2/src/matrixdialog.cc0000644000076500007650000000576310501136234017734 0ustar dsymondsdsymonds// // matrixdialog.cc // #include "wx/button.h" #include "wx/dialog.h" #include "wx/grid.h" #include "wx/sizer.h" #include "wx/spinctrl.h" #include "wx/statline.h" #include "wx/stattext.h" #include "wx/string.h" #include "wx/window.h" #include #include #include "graph.h" #include "lang.h" #include "matrix.h" #include "matrixdialog.h" #include "vertex.h" MatrixGrid::MatrixGrid (wxWindow *parent) : wxGrid (parent, wxID_ANY) { } void MatrixGrid::SetScrollbar (int orient, int pos, int thumb, int range, bool refresh) { int m_scrollstyle = 0; if (m_scrollstyle & orient) wxGrid::SetScrollbar (orient, pos, thumb, range, refresh); else wxGrid::SetScrollbar (orient, 0, 0, 0); } enum { ID_SPINCTRL = 1000 }; BEGIN_EVENT_TABLE(MatrixDialog, wxDialog) EVT_SPINCTRL(ID_SPINCTRL, MatrixDialog::OnChangeExponent) END_EVENT_TABLE() MatrixDialog::MatrixDialog (wxWindow *parent, const wxString &title, const Matrix &mat, const Graph &g) : wxDialog (parent, wxID_ANY, title) { unsigned int i; wxBeginBusyCursor (); // Create identity matrix (A^0) Matrix id = mat - mat; // zero matrix for (i = 0; i < id.rows (); ++i) id(i, i) = 1; // TODO: Check that mat.rows () == mat.columns () matrices.push_back (id); matrices.push_back (mat); wxBoxSizer *topsizer = new wxBoxSizer (wxVERTICAL); // Create grid m_grid = new MatrixGrid (this); m_grid->CreateGrid (mat.rows (), mat.columns ()); m_grid->DisableCellEditControl (); for (i = 0; i < mat.rows (); ++i) { m_grid->SetColLabelValue (i, g[i]->label); m_grid->SetRowLabelValue (i, g[i]->label); } topsizer->Add (m_grid, 1, wxCENTER | wxALL | wxEXPAND, 10); // label + spin ctrl below grid wxBoxSizer *expsizer = new wxBoxSizer (wxHORIZONTAL); expsizer->Add (new wxStaticText (this, wxID_ANY, _("Exponent:")), 0, wxCENTER | wxLEFT | wxEXPAND, 10); m_spinctrl = new wxSpinCtrl (this, ID_SPINCTRL, wxT("1")); m_spinctrl->SetRange (0, MatrixDialog::max_exponent); expsizer->Add (m_spinctrl, 0, wxCENTER | wxRIGHT, 10); topsizer->Add (expsizer); // static line topsizer->Add (new wxStaticLine (this, wxID_ANY), 0, wxEXPAND | wxALL, 10); // OK button topsizer->Add (CreateStdDialogButtonSizer (wxOK), 0, wxEXPAND | wxALL, 10); SetSizer (topsizer); SetAutoLayout (true); Centre (wxBOTH); wxSpinEvent event; OnChangeExponent (event); wxEndBusyCursor (); } void MatrixDialog::OnChangeExponent (wxSpinEvent &event) { int exp = m_spinctrl->GetValue (), sz = matrices.size (); unsigned int i, j; // Compute any powers we don't already have cached while (sz <= exp) { matrices.push_back (matrices[sz - 1] * matrices[1]); sz = matrices.size (); } Matrix &mat = matrices[exp]; // Add contents m_grid->BeginBatch (); for (j = 0; j < mat.rows (); ++j) for (i = 0; i < mat.columns (); ++i) { wxString str = wxString::Format (wxT("%d"), mat (i, j)); m_grid->SetCellValue (j, i, str); } m_grid->EndBatch (); m_grid->AutoSize (); m_grid->SetScrollbar (wxHORIZONTAL | wxVERTICAL, 0, 0, 0); Fit (); } graphthing-1.3.2/src/matrixdialog.h0000644000076500007650000000143010501136234017561 0ustar dsymondsdsymonds// // matrixdialog.h // #ifndef __MATRIXDIALOG_H__ #define __MATRIXDIALOG_H__ #include "wx/dialog.h" #include "wx/grid.h" #include "wx/spinctrl.h" #include "wx/string.h" #include #include "graph.h" #include "matrix.h" class wxWindow; class MatrixGrid : public wxGrid { public: MatrixGrid (wxWindow *parent); void SetScrollbar (int orient, int pos, int thumb, int range, bool refresh = true); }; class MatrixDialog : public wxDialog { public: MatrixDialog (wxWindow *parent, const wxString &title, const Matrix &mat, const Graph &g); private: static const int max_exponent = 20; void OnChangeExponent (wxSpinEvent &event); wxSpinCtrl *m_spinctrl; MatrixGrid *m_grid; std::vector matrices; DECLARE_EVENT_TABLE() }; #endif //__MATRIXDIALOG_H__ graphthing-1.3.2/src/mst_test.gt0000644000076500007650000000063410501136234017127 0ustar dsymondsdsymondsinfo { } vertex "A" at (249,81) vertex "B" at (124,162) vertex "C" at (248,162) vertex "D" at (372,162) vertex "E" at (248,243) vertex "F" at (373,243) edge "B" -- "C" with weight 15 edge "C" -- "D" with weight 5 edge "E" -- "F" with weight 2 edge "A" -- "C" with weight 8 edge "C" -- "E" with weight 3 edge "D" -- "F" with weight 5 edge "A" -- "B" with weight 13 edge "A" -- "D" edge "D" -- "E" with weight 4 graphthing-1.3.2/src/net_test.gt0000644000076500007650000000122210501136234017104 0ustar dsymondsdsymondsinfo { comment = "Kocay & Kreher (2005), p183" creator = "GraphThing 1.1" } vertex "v1" at (288,62) vertex "v5" at (409,184) vertex "v3" at (288,306) vertex "s" at (165,185) vertex "v4" at (378,62) vertex "t" at (499,184) vertex "v6" at (378,306) vertex "v2" at (255,185) edge "v1" -> "v5" with weight 4 edge "v3" -> "v5" with weight 5 edge "s" -> "v3" with weight 9 edge "s" -> "v1" with weight 7 edge "v1" -> "v4" with weight 2 edge "v4" -> "t" with weight 6 edge "v6" -> "t" with weight 6 edge "v2" -> "v6" edge "v2" -> "v4" with weight 3 edge "s" -> "v2" edge "v5" -> "t" with weight 6 edge "v3" -> "v6" with weight 5 edge "v2" -> "v5" with weight 4 graphthing-1.3.2/src/paramdialog.cc0000644000076500007650000001637310501136234017527 0ustar dsymondsdsymonds// // paramdialog.cc // #include "wx/button.h" #include "wx/dialog.h" #include "wx/radiobut.h" #include "wx/sizer.h" #include "wx/spinctrl.h" #include "wx/statline.h" #include "wx/stattext.h" #include "wx/string.h" #include "wx/utils.h" #include "edge.h" #include "lang.h" #include "paramdialog.h" #include "vertex.h" BEGIN_EVENT_TABLE(ParamDialogIntInt, wxDialog) EVT_BUTTON(wxID_OK, ParamDialogIntInt::OnOK) EVT_BUTTON(wxID_CANCEL, ParamDialogIntInt::OnCancel) END_EVENT_TABLE() ParamDialogIntInt::ParamDialogIntInt (wxWindow *parent, const wxString &title, const wxString &prompt, long value1, long min1, long max1, long value2, long min2, long max2) : wxDialog (parent, wxID_ANY, title) { m_value1 = value1; m_max1 = max1; m_min1 = min1; m_value2 = value2; m_max2 = max2; m_min2 = min2; wxBeginBusyCursor(); wxBoxSizer *topsizer = new wxBoxSizer (wxVERTICAL); // 2) prompt and spin ctrl wxBoxSizer *inputsizer = new wxBoxSizer (wxHORIZONTAL); // prompt, if any if (!prompt.IsEmpty ()) inputsizer->Add (new wxStaticText (this, wxID_ANY, prompt), 0, wxCENTER | wxLEFT | wxEXPAND, 10); // spin ctrl wxString valStr1, valStr2; valStr1.Printf (wxT("%ld"), m_value1); valStr2.Printf (wxT("%ld"), m_value2); m_spinctrl1 = new wxSpinCtrl (this, wxID_ANY, valStr1); m_spinctrl2 = new wxSpinCtrl (this, wxID_ANY, valStr2); m_spinctrl1->SetRange (int (m_min1), int (m_max1)); m_spinctrl2->SetRange (int (m_min2), int (m_max2)); inputsizer->Add (m_spinctrl1, 1, wxCENTER | wxLEFT | wxRIGHT, 10); inputsizer->Add (m_spinctrl2, 1, wxCENTER | wxLEFT | wxRIGHT, 10); // add both topsizer->Add (inputsizer, 1, wxEXPAND | wxALL, 5); // 3) static line topsizer->Add (new wxStaticLine (this, wxID_ANY), 0, wxEXPAND | wxALL, 10); // 4) buttons topsizer->Add (CreateButtonSizer (wxOK | wxCANCEL), 0, wxEXPAND | wxALL, 10); SetSizer (topsizer); SetAutoLayout (true); topsizer->SetSizeHints (this); topsizer->Fit (this); Centre (wxBOTH); m_spinctrl1->SetSelection (-1, -1); m_spinctrl1->SetFocus (); wxEndBusyCursor (); } void ParamDialogIntInt::OnOK (wxCommandEvent &event) { m_value1 = m_spinctrl1->GetValue (); if ((m_value1 < m_min1) || (m_value1 > m_max1)) { // not a number or out of range m_value1 = -1; EndModal (wxID_CANCEL); } m_value2 = m_spinctrl2->GetValue (); if ((m_value2 < m_min2) || (m_value2 > m_max2)) { // not a number or out of range m_value2 = -1; EndModal (wxID_CANCEL); } EndModal (wxID_OK); } void ParamDialogIntInt::OnCancel (wxCommandEvent &event) { EndModal (wxID_CANCEL); } //////////////////////////////////////////////////////////// enum { ID_SPIN = 1000, ID_EDGE_RIGHT, ID_EDGE_NONE, ID_EDGE_LEFT }; BEGIN_EVENT_TABLE(ParamDialogEdge, wxDialog) EVT_BUTTON(wxID_OK, ParamDialogEdge::OnOK) EVT_BUTTON(wxID_CANCEL, ParamDialogEdge::OnCancel) EVT_SPINCTRL(ID_SPIN, ParamDialogEdge::OnSpin) EVT_RADIOBUTTON(ID_EDGE_RIGHT, ParamDialogEdge::OnEdgeDir) EVT_RADIOBUTTON(ID_EDGE_NONE, ParamDialogEdge::OnEdgeDir) EVT_RADIOBUTTON(ID_EDGE_LEFT, ParamDialogEdge::OnEdgeDir) END_EVENT_TABLE() ParamDialogEdge::ParamDialogEdge (wxWindow *parent, const wxString &title, const Edge *e) : wxDialog (parent, wxID_ANY, title) { m_weight = e->weight; m_flow = e->flow; m_dir = e->directed ? 1 : 0; dir_inverted = (e->w->label < e->v->label); if (dir_inverted) m_dir = -m_dir; wxBeginBusyCursor(); wxBoxSizer *topsizer = new wxBoxSizer (wxVERTICAL); // 2) prompt and spin ctrl wxBoxSizer *inputsizer0 = new wxBoxSizer (wxHORIZONTAL); wxBoxSizer *inputsizer1 = new wxBoxSizer (wxHORIZONTAL); wxBoxSizer *inputsizer2 = new wxBoxSizer (wxHORIZONTAL); // prompts inputsizer0->Add (new wxStaticText (this, wxID_ANY, _("Edge weight:")), 0, wxCENTER | wxLEFT, 10); inputsizer1->Add (new wxStaticText (this, wxID_ANY, _("Edge flow:")), 0, wxCENTER | wxLEFT, 10); // spin ctrls wxString valStr1; valStr1.Printf (wxT("%ld"), m_weight); m_spinctrl_weight = new wxSpinCtrl (this, ID_SPIN, valStr1); m_spinctrl_weight->SetRange (0, 10000); // FIXME: arbitrary bounds! inputsizer0->Add (m_spinctrl_weight, 1, wxCENTER | wxLEFT | wxRIGHT, 5); wxString valStr2; valStr2.Printf (wxT("%ld"), m_flow); m_spinctrl_flow = new wxSpinCtrl (this, ID_SPIN, valStr2); m_spinctrl_flow->SetRange (0, m_weight); inputsizer1->Add (m_spinctrl_flow, 1, wxCENTER | wxLEFT | wxRIGHT, 5); // edge direction inputsizer2->Add (new wxStaticText (this, wxID_ANY, _("Edge direction:")), 0, wxCENTER | wxLEFT | wxEXPAND, 10); wxBoxSizer *dirsizer = new wxBoxSizer (wxVERTICAL); wxString rightS = wxT("--->"), noneS = wxT("----"), leftS = wxT("<---"); wxString leftV = e->v->label, rightV = e->w->label; if (dir_inverted) { wxString tmp = leftV; leftV = rightV; rightV = tmp; } rightS = leftV + rightS + rightV; noneS = leftV + noneS + rightV; leftS = leftV + leftS + rightV; wxRadioButton *rightB = new wxRadioButton (this, ID_EDGE_RIGHT, rightS, wxDefaultPosition, wxDefaultSize, wxRB_GROUP); wxRadioButton *noneB = new wxRadioButton (this, ID_EDGE_NONE, noneS); wxRadioButton *leftB = new wxRadioButton (this, ID_EDGE_LEFT, leftS); dirsizer->Add (rightB); dirsizer->Add (noneB); dirsizer->Add (leftB); inputsizer2->Add (dirsizer, 0, wxCENTER, 10); if (m_dir == 0) noneB->SetValue (true); else { if (!dir_inverted) rightB->SetValue (true); else leftB->SetValue (true); } // add both topsizer->Add (inputsizer0, 1, wxEXPAND | wxALL, 5); topsizer->Add (inputsizer1, 1, wxEXPAND | wxALL, 5); topsizer->Add (inputsizer2, 1, wxEXPAND | wxALL, 5); // 3) static line topsizer->Add (new wxStaticLine (this, wxID_ANY), 0, wxEXPAND | wxALL, 10); // 4) buttons topsizer->Add (CreateButtonSizer (wxOK | wxCANCEL), 0, wxEXPAND | wxALL, 10); SetSizer (topsizer); SetAutoLayout (true); topsizer->SetSizeHints (this); topsizer->Fit (this); CentreOnParent (); m_spinctrl_weight->SetSelection (-1, -1); m_spinctrl_weight->SetFocus (); wxEndBusyCursor(); } void ParamDialogEdge::OnOK (wxCommandEvent &event) { m_weight = m_spinctrl_weight->GetValue (); if ((m_weight < 0) || (m_weight > m_spinctrl_weight->GetMax ())) { // not a number or out of range m_weight = -1; EndModal (wxID_CANCEL); } m_flow = m_spinctrl_flow->GetValue (); if ((m_flow < 0) || (m_flow > m_spinctrl_flow->GetMax ())) { // not a number or out of range m_flow = -1; EndModal (wxID_CANCEL); } if (m_flow > m_weight) { // out of range m_flow = -1; EndModal (wxID_CANCEL); } if (dir_inverted) m_dir = -m_dir; EndModal (wxID_OK); } void ParamDialogEdge::OnCancel (wxCommandEvent &event) { EndModal (wxID_CANCEL); } void ParamDialogEdge::OnSpin (wxSpinEvent &event) { m_weight = m_spinctrl_weight->GetValue (); if ((m_weight < 0) || (m_weight > m_spinctrl_weight->GetMax ())) { // not a number or out of range return; } m_flow = m_spinctrl_flow->GetValue (); if (m_flow > m_weight) m_spinctrl_flow->SetValue (m_weight); // clamp m_spinctrl_flow->SetRange (0, m_weight); m_spinctrl_flow->Refresh (); } void ParamDialogEdge::OnEdgeDir (wxCommandEvent &event) { switch (event.GetId ()) { case ID_EDGE_RIGHT: m_dir = 1; break; case ID_EDGE_NONE: m_dir = 0; break; case ID_EDGE_LEFT: m_dir = -1; break; } } graphthing-1.3.2/src/paramdialog.h0000644000076500007650000000244610501136234017365 0ustar dsymondsdsymonds// // paramdialog.h // #ifndef __PARAMDIALOG_H__ #define __PARAMDIALOG_H__ #include "wx/dialog.h" #include "wx/spinctrl.h" #include "wx/string.h" class Edge; class wxWindow; class ParamDialogIntInt : public wxDialog { public: ParamDialogIntInt (wxWindow *parent, const wxString &title, const wxString &prompt, long value1, long min1, long max1, long value2, long min2, long max2); long GetValue1 () const { return m_value1; } long GetValue2 () const { return m_value2; } protected: void OnOK (wxCommandEvent &event); void OnCancel (wxCommandEvent &event); wxSpinCtrl *m_spinctrl1, *m_spinctrl2; long m_value1, m_min1, m_max1; long m_value2, m_min2, m_max2; private: DECLARE_EVENT_TABLE() }; class ParamDialogEdge : public wxDialog { public: ParamDialogEdge (wxWindow *parent, const wxString &title, const Edge *e); long GetWeight () const { return m_weight; } long GetFlow () const { return m_flow; } long GetDirection () const { return m_dir; } protected: void OnOK (wxCommandEvent &event); void OnCancel (wxCommandEvent &event); void OnSpin (wxSpinEvent &event); void OnEdgeDir (wxCommandEvent &event); wxSpinCtrl *m_spinctrl_weight, *m_spinctrl_flow; long m_weight, m_flow, m_dir; bool dir_inverted; private: DECLARE_EVENT_TABLE() }; #endif //__PARAMDIALOG_H__ graphthing-1.3.2/src/phrases.h0000644000076500007650000015526510542622362016571 0ustar dsymondsdsymonds// // phrases.h: Automatically generated - do not edit! // (edit phrases.lang instead, and re-run init-phrases.sh) // static const char *phrases_raw = "# vim:set encoding=utf-8 fileencoding=utf-8 ts=8:\n" "# GraphThing phrase translation file\n" "\n" "# Format:\n" "# * Each phrase is a quoted string (multiple quoted strings are\n" "# concatenated)\n" "# * If a quote-mark is desired in a phrase, backslash it; if you want\n" "# a backslash, use a double-backslash (\\)\n" "# * A phrase-block begins with the English phrase, an '=', a '{', a\n" "# series of translations, and a '}'. A block always finishes with ';'\n" "# * Each translation is a language name, an '=', and a phrase\n" "\n" "# Notes:\n" "# * Not all languages have to have an entry in a phrase-block;\n" "# if a translation is missing, it will default to English\n" "# * Please be very careful to preserve punctuation\n" "# * Be *extremely* careful to use the conversion specifiers correctly;\n" "# the order of specifiers MUST be identical in a phrase-block\n" "\n" "# Languages presently accepted:\n" "# Catalan (ca), Danish (dk), Dutch (nl), Esperanto (eo), English (en),\n" "# Finnish (fi), French (fr), German (de), Greek (el), Italian (it),\n" "# Norwegian (no), Polish (pl), Portuguese (pt), Romanian (ro),\n" "# Spanish (es), Swedish (sv), SwedishChef (sv_CK)\n" "\n" "#------------------------- Meta -------------------------#\n" "\"Version\" = {\n" " Catalan = \"Versió\"\n" " ChineseSimp = \"版本\"\n" " French = \"Version\"\n" " German = \"Version\"\n" " Italian = \"Versione\"\n" " Romanian = \"Versiunea\"\n" " Spanish = \"Versión\"\n" " SwedishChef = \"Ferseeun\"\n" "};\n" "\n" "# This one's a bit special - it should be the name of the language, as written\n" "# in that language\n" "\"English\" = {\n" " Catalan = \"Català\"\n" " ChineseSimp = \"简体中文\"\n" " French = \"Français\"\n" " German = \"Deutsch\"\n" " Italian = \"Italiano\"\n" " Romanian = \"Românã\"\n" " Spanish = \"Español\"\n" " SwedishChef = \"Svedeesh Cheff\"\n" "};\n" "\n" "#------------------------- General -------------------------#\n" "# (stuff in this section aren't actually strings that need\n" "# translation. They are mostly commonly used words)\n" "\n" "\"About\" = \"&About\" subst \"&\" / \"\";\n" "\"All\" = {\n" " Catalan = \"Ambdós\"\n" " ChineseSimp = \"全部\"\n" " French = \"Tous\"\n" " German = \"Alle\"\n" " Italian = \"Tutto\"\n" " Romanian = \"Tot\"\n" " Spanish = \"Ambos\"\n" " SwedishChef = \"Ell\"\n" "};\n" "\"&Edges\" = {\n" " Catalan = \"&Arestes\"\n" " ChineseSimp = \"边(&E)\"\n" " French = \"&Sommets\"\n" " German = \"&Kanten\"\n" " Italian = \"&Archi\"\n" " Romanian = \"&Muchii\"\n" " Spanish = \"&Aristas\"\n" " SwedishChef = \"&Idges\"\n" "};\n" "\"&Vertices\" = {\n" " Catalan = \"&Vèrtexs\"\n" " ChineseSimp = \"顶点(&V)\"\n" " French = \"&Arêtes\"\n" " German = \"&Vertizen\"\n" " Italian = \"&Vertici\"\n" " Romanian = \"&Vârfuri\"\n" " Spanish = \"&Vértices\"\n" " SwedishChef = \"&Ferteeces\"\n" "};\n" "\n" "#------------------------- Menus -------------------------#\n" "### File\n" "\"&File\" = {\n" " Catalan = \"&Fitxer\"\n" " ChineseSimp = \"文件(&F)\"\n" " French = \"&Fichier\"\n" " German = \"&Datei\"\n" " Italian = \"&File\"\n" " Romanian = \"&Fiºier\"\n" " Spanish = \"&Fichero\"\n" " SwedishChef = \"&Feele-a\"\n" "};\n" "\"&Load\tCtrl-O\" = \"&Load\" + \"\tCtrl-O\";\n" "\"\tCtrl-O\" = literal;\n" "\"&Load\" = {\n" " Catalan = \"&Obrir\"\n" " ChineseSimp = \"打开(&L)\"\n" " French = \"&Ouvrir\"\n" " German = \"&Öffnen\"\n" " Italian = \"&Carica\"\n" " Romanian = \"&Încãrcare\"\n" " Spanish = \"&Abrir\"\n" " SwedishChef = \"&Lued\"\n" "};\n" "\"&Save\tCtrl-S\" = \"&Save\" + \"\tCtrl-S\";\n" "\"\tCtrl-S\" = literal;\n" "\"&Save\" = {\n" " Catalan = \"&Desar\"\n" " ChineseSimp = \"保存(&S)\"\n" " French = \"&Sauver\"\n" " German = \"&Speichern\"\n" " Italian = \"&Salva\"\n" " Romanian = \"&Salvare\"\n" " Spanish = \"&Guardar\"\n" " SwedishChef = \"&Sefe-a\"\n" "};\n" "#\"&Print\tCtrl-P\" = \"&Print\" + \"\tCtrl-P\";\n" "#\"\tCtrl-P\" = literal;\n" "#\"&Print\" = {\n" "# Catalan = \"Im&primir\"\n" "# ChineseSimp = \"打印(&P)\"\n" "# French = \"Im&primer\"\n" "# German = \"&Drucken\"\n" "# Italian = \"Stam&pa\"\n" "# Romanian = \"&Tipãrire\"\n" "# Spanish = \"Im&primir\"\n" "# SwedishChef = \"&Preent\"\n" "#};\n" "\"E&xit\tCtrl-Q\" = \"E&xit\" + \"\tCtrl-Q\";\n" "\"\tCtrl-Q\" = literal;\n" "\"E&xit\" = {\n" " Catalan = \"&Sortir\"\n" " ChineseSimp = \"退出(&x)\"\n" " French = \"&Quitter\"\n" " German = \"B&eenden\"\n" " Italian = \"&Esci\"\n" " Romanian = \"I&eºire\"\n" " Spanish = \"&Salir\"\n" " SwedishChef = \"I&xeet\"\n" "};\n" "\n" "### Edit\n" "\"&Edit\" = {\n" " Catalan = \"&Editar\"\n" " ChineseSimp = \"编辑(&E)\"\n" " French = \"&Éditer\"\n" " German = \"&Editieren\"\n" " Italian = \"&Modifica\"\n" " Romanian = \"&Editare\"\n" " Spanish = \"&Editar\"\n" " SwedishChef = \"&Ideet\"\n" "};\n" "\"&Undo\tCtrl-Z\" = \"&Undo\" + \"\tCtrl-Z\";\n" "\"\tCtrl-Z\" = literal;\n" "\"&Undo\" = {\n" " Catalan = \"&Desfer\"\n" " ChineseSimp = \"撤销(&U)\"\n" " French = \"&Annuler\"\n" " German = \"&Rückgängig\"\n" " Italian = \"&Annulla\"\n" " Romanian = \"&Anuleazã\"\n" " Spanish = \"&Deshacer\"\n" " SwedishChef = \"&Undu\"\n" "};\n" "\"Select &All\tCtrl-A\" = \"Select &All\" + \"\tCtrl-A\";\n" "\"\tCtrl-A\" = literal;\n" "\"Select &All\" = {\n" " Catalan = \"Selecciona &Tot\"\n" " ChineseSimp = \"全选(&A)\"\n" " French = \"Tout &sélectionner\"\n" " German = \"&Alles auswählen\"\n" " Italian = \"Seleziona &Tutto\"\n" " Romanian = \"&Selecteazã tot\"\n" " Spanish = \"Selecciona &Todo\"\n" " SwedishChef = \"Select &Ell\"\n" "};\n" "\"Select &None\" = {\n" " Catalan = \"Selecciona &Cap\"\n" " ChineseSimp = \"取消选择(&N)\"\n" " French = \"Tout &désélectionner\"\n" " German = \"&Nichts auswählen\"\n" " Italian = \"&Nessuna Selezione\"\n" " Romanian = \"&Deselecteazã tot\"\n" " Spanish = \"Selecciona &Ninguno\"\n" " SwedishChef = \"Select &Noon\"\n" "};\n" "\"&Invert Selection\" = {\n" " Catalan = \"&Invertir selecció\"\n" " ChineseSimp = \"反向选择(&I)\"\n" " French = \"&Inverser la sélection\"\n" " German = \"Auswahl &Invertieren\"\n" " Italian = \"&Inverti Selezione\"\n" " Romanian = \"&Inverseazã selecþia\"\n" " Spanish = \"&Invertir selección\"\n" " SwedishChef = \"&Infert Selecshun\"\n" "};\n" "\"Invert Selection\" = \"&Invert Selection\" subst \"&\" / \"\";\n" "\"Invert Selection (&Vertices)\" = \"Invert Selection\" + \" (\" + \"&Vertices\" + \")\";\n" "\"Invert Selection (&Edges)\" = \"Invert Selection\" + \" (\" + \"&Edges\" + \")\";\n" "\"&Invert Selection (All)\" = \"&Invert Selection\" + \" (\" + \"All\" + \")\";\n" "\n" "\n" "### View\n" "\"&View\" = {\n" " Catalan = \"&Veure\"\n" " ChineseSimp = \"视图(&V)\"\n" " French = \"&Vue\"\n" " German = \"&Ansicht\"\n" " Italian = \"&Vista\"\n" " Romanian = \"A&ratã\"\n" " Spanish = \"&Ver\"\n" " SwedishChef = \"F&eeoo\"\n" "};\n" "\"&Labels\" = {\n" " Catalan = \"&Etiquetes\"\n" " ChineseSimp = \"标签(&L)\"\n" " French = \"&Étiquettes\"\n" " German = \"&Bezeichnungen\"\n" " Italian = \"&Etichetta\"\n" " Romanian = \"&Etichetã\"\n" " Spanish = \"&Etiquetas\"\n" " SwedishChef = \"&Lebels\"\n" "};\n" "\"&Weights\" = {\n" " Catalan = \"&Pesos\"\n" " ChineseSimp = \"权值(&W)\"\n" " French = \"&Poids\"\n" " German = \"&Gewichte\"\n" " Italian = \"&Peso\"\n" " Romanian = \"&Cost\"\n" " Spanish = \"&Pesos\"\n" " SwedishChef = \"&Veeeghts\"\n" "};\n" "\"&Flows\" = {\n" " Catalan = \"&Fluxos\"\n" " ChineseSimp = \"流量(&F)\"\n" " French = \"&Flux\"\n" " Italian = \"&Flusso\"\n" " Romanian = \"&Flux\"\n" " Spanish = \"&Flujos\"\n" " SwedishChef = \"&Floos\"\n" "};\n" "\n" "### Graph\n" "\"&Graph\" = {\n" " Catalan = \"&Graf\"\n" " ChineseSimp = \"图(&G)\"\n" " French = \"&Graphe\"\n" " German = \"&Graph\"\n" " Italian = \"&Grafo\"\n" " Romanian = \"&Graf\"\n" " Spanish = \"&Grafo\"\n" " SwedishChef = \"&Greph\"\n" "};\n" "\"&Clear\tCtrl-W\" = \"&Clear\" + \"\tCtrl-W\";\n" "\"\tCtrl-W\" = literal;\n" "\"&Clear\" = {\n" " Catalan = \"Es&borrar\"\n" " ChineseSimp = \"清除(&C)\"\n" " French = \"&Effacer\"\n" " German = \"&Löschen\"\n" " Italian = \"&Cancella\"\n" " Romanian = \"&ªterge\"\n" " Spanish = \"&Borrar\"\n" " SwedishChef = \"&Cleer\"\n" "};\n" "\"C&omplement\" = {\n" " Catalan = \"C&omplementari\"\n" " ChineseSimp = \"补图(&o)\"\n" " French = \"&Complémentaire\"\n" " German = \"&Komplement\"\n" " Italian = \"C&omplementario\"\n" " Romanian = \"C&omplement\"\n" " Spanish = \"C&omplementario\"\n" " SwedishChef = \"C&umplement\"\n" "};\n" "\"&Line Graph\" = {\n" " Catalan = \"Graf &línia\"\n" " ChineseSimp = \"边图(&L)\"\n" " French = \"Graphe &Linéaire\"\n" " German = \"&Line Graph\"\n" " Italian = \"Grafo a &Linee\"\n" " Romanian = \"&Line Graph\"\n" " Spanish = \"Grafo &línea\"\n" " SwedishChef = \"&Leene-a Greph\"\n" "};\n" "\"S&ubgraph\" = {\n" " Catalan = \"S&ubgraf\"\n" " ChineseSimp = \"诱导子图(&u)\"\n" " French = \"So&us-graphe\"\n" " German = \"S&ubgraph\"\n" " Italian = \"So&ttografo\"\n" " Romanian = \"S&ubgraf\"\n" " Spanish = \"S&ubgrafo\"\n" " SwedishChef = \"S&oobgreph\"\n" "};\n" "###### Find\n" "\"&Find\" = {\n" " Catalan = \"&Cercar\"\n" " ChineseSimp = \"寻找(&F)\"\n" " French = \"&Chercher\"\n" " German = \"&Suchen\"\n" " Italian = \"C&erca\"\n" " Romanian = \"&Cãutare\"\n" " Spanish = \"&Buscar\"\n" " SwedishChef = \"&Feend\"\n" "};\n" "\"&Shortest Path\" = {\n" " Catalan = \"&Camí més curt\"\n" " ChineseSimp = \"最短路(&S)\"\n" " French = \"&Plus court chemin\"\n" " German = \"&Kürzester Weg\"\n" " Italian = \"&Cammino minimo\"\n" " Romanian = \"Cel mai &scurt drum\"\n" " Spanish = \"&Camino más corto\"\n" " SwedishChef = \"&Shurtest Pet\"\n" "};\n" "\"&Breadth-First Search\" = {\n" " Catalan = \"Cerca en &lada\"\n" " ChineseSimp = \"宽度优先搜索(&B)\"\n" " French = \"Recherche en &largeur\"\n" " German = \"&Breitensuche\"\n" " Italian = \"Ricerca in &iezza\"\n" " Romanian = \"Cãutare în &lãtime\"\n" " Spanish = \"Búsqueda en &anchura\"\n" " SwedishChef = \"&Breedt-Furst Seerch\"\n" "};\n" "\"&Depth-First Search\" = {\n" " Catalan = \"Cerca en &profunditat\"\n" " ChineseSimp = \"深度优先搜索(&D)\"\n" " French = \"Recherche en p&rofondeur\"\n" " German = \"&Tiefensuche\"\n" " Italian = \"Ricerca in &Profondità\"\n" " Romanian = \"Cãutare în &adâncime\"\n" " Spanish = \"Búsqueda en &profundidad\"\n" " SwedishChef = \"&Dept-Furst Seerch\"\n" "};\n" "\"&Minimum Spanning Tree\" = {\n" " Catalan = \"&Arbre d'expansió mínim\"\n" " ChineseSimp = \"最小生成树(&M)\"\n" " French = \"Enjambement d'arbre &minimum\"\n" " German = \"&Minimaler aufspannender Baum\"\n" " Italian = \"Albero dei Cammini &Minimo\"\n" " Romanian = \"Arbore &minim de acoperire\"\n" " Spanish = \"&Árbol de expansión mínimo\"\n" " SwedishChef = \"&Meenimoom Spunneeng Tree-a\"\n" "};\n" "\"Maximum &Flow\" = {\n" " Catalan = \"&Flux màxim\"\n" " ChineseSimp = \"最大流(&F)\"\n" " French = \"&Flux maximal\"\n" " Italian = \"Massimo &Flusso\"\n" " Romanian = \"&Flux maxim\"\n" " Spanish = \"&Flujo máximo\"\n" " SwedishChef = \"Mexeemoom &Floo\"\n" "};\n" "###### Properties\n" "\"&Properties\" = {\n" " Catalan = \"&Propietats\"\n" " ChineseSimp = \"性质(&P)\"\n" " French = \"&Propriétés\"\n" " German = \"&Eigenschaften\"\n" " Italian = \"&Proprietà\"\n" " Romanian = \"&Proprietãþi\"\n" " Spanish = \"&Propiedades\"\n" " SwedishChef = \"&Pruperteees\"\n" "};\n" "\"&Connectivity\" = {\n" " Catalan = \"&Connexió\"\n" " ChineseSimp = \"连通性(&C)\"\n" " French = \"&Connectivité\"\n" " German = \"&Zusammenhängender Graph\"\n" " Italian = \"&Connetività\"\n" " Romanian = \"&Conectivitate\"\n" " Spanish = \"&Conexión\"\n" " SwedishChef = \"&Cunnecteefity\"\n" "};\n" "\"&Eulericity\" = {\n" " Catalan = \"&Eulericitat\"\n" " ChineseSimp = \"欧拉图(&E)\"\n" " French = \"&Eulericité\"\n" " German = \"&Eulerschergraph\"\n" " Italian = \"&Eulericità\"\n" " Romanian = \"&Eulericitate\"\n" " Spanish = \"&Eulericidad\"\n" " SwedishChef = \"&Ioolereecity\"\n" "};\n" "\"&Hamiltonicity\" = {\n" " Catalan = \"&Hamiltonicitat\"\n" " ChineseSimp = \"哈密顿图(&H)\"\n" " French = \"&Hamiltonicité\"\n" " German = \"&Hamiltongraph\"\n" " Italian = \"&Hamiltonianità\"\n" " Romanian = \"&Hamiltonitate\"\n" " Spanish = \"&Hamiltonicidad\"\n" " SwedishChef = \"&Hemeeltunicity\"\n" "};\n" "\"&Planarity\" = {\n" " Catalan = \"&Planaritat\"\n" " ChineseSimp = \"可平面性(&P)\"\n" " French = \"&Planarité\"\n" " German = \"&Planarität\"\n" " Italian = \"&Planarità\"\n" " Romanian = \"&Planaritate\"\n" " Spanish = \"&Planaridad\"\n" " SwedishChef = \"&Plunereety\"\n" "};\n" "###### Statistics\n" "\"&Statistics\" = {\n" " Catalan = \"E&stadístiques\"\n" " ChineseSimp = \"统计(&S)\"\n" " French = \"&Statistiques\"\n" " German = \"S&tatistiken\"\n" " Italian = \"&Statistiche\"\n" " Romanian = \"&Statistici\"\n" " Spanish = \"E&stadísticas\"\n" " SwedishChef = \"&Steteestics\"\n" "};\n" "\"&Adjacency Matrix\" = {\n" " Catalan = \"Matriu d'&adjacència\"\n" " ChineseSimp = \"邻接矩阵(&A)\"\n" " French = \"Matrice &adjacente\"\n" " German = \"&Adjazenzmatrix\"\n" " Italian = \"Matrice d'&adiacenza\"\n" " Romanian = \"Matrice de &adiacenþã\"\n" " Spanish = \"Matriz de &adyacencia\"\n" " SwedishChef = \"&Edjecency Metreex\"\n" "};\n" "\"&Degree Sequence\" = {\n" " Catalan = \"Successió de &graus\"\n" " ChineseSimp = \"度序列(&D)\"\n" " French = \"Séquence de °rés\"\n" " German = \"&Grad Sequenz\"\n" " Italian = \"Successione del &grado\"\n" " Romanian = \"&Succesiune de grade\"\n" " Spanish = \"Sucesión de &grados\"\n" " SwedishChef = \"&Degree-a Seqooence-a\"\n" "};\n" "\"D&iameter\" = {\n" " Catalan = \"&Diàmetre\"\n" " ChineseSimp = \"直径(&i)\"\n" " French = \"&Diamètre\"\n" " German = \"&Durchmesser\"\n" " Italian = \"&Diametro\"\n" " Romanian = \"&Diametru\"\n" " Spanish = \"&Diámetro\"\n" " SwedishChef = \"Deee&meter\"\n" "};\n" "\"&Girth\" = {\n" " Catalan = \"G&irth\"\n" " ChineseSimp = \"围长(&G)\"\n" " French = \"&Périmètre\"\n" " German = \"&Umfang\"\n" " Italian = \"G&irth\"\n" " Romanian = \"&Girth\"\n" " Spanish = \"G&irth\"\n" " SwedishChef = \"&Gurt\"\n" "};\n" "\"&Radius\" = {\n" " Catalan = \"&Radi\"\n" " ChineseSimp = \"半径(&R)\"\n" " French = \"&Rayon\"\n" " German = \"&Radius\"\n" " Italian = \"&Raggio\"\n" " Romanian = \"&Razã\"\n" " Spanish = \"&Radio\"\n" " SwedishChef = \"&Redeeoos\"\n" "};\n" "\"&Chromatic Number\" = {\n" " Catalan = \"Número &Cromàtic\"\n" " ChineseSimp = \"色数(&C)\"\n" " French = \"Nombre &chromatique\"\n" " German = \"&Chormatische Zahl\"\n" " Italian = \"Numero &Cromatico\"\n" " Romanian = \"&Numãr cromatic\"\n" " Spanish = \"Número &Cromático\"\n" " SwedishChef = \"&Chrumeteec Noomber\"\n" "};\n" "\"C&hromatic Index\" = {\n" " Catalan = \"Índex cro&màtic\"\n" " ChineseSimp = \"色指数(&h)\"\n" " French = \"Index c&hromatique\"\n" " German = \"C&hromatischer Index\"\n" " Italian = \"I&ndice Cromatico\"\n" " Romanian = \"&Index Cromatic\"\n" " Spanish = \"Índice cro&mático\"\n" " SwedishChef = \"C&hrumeteec Index\"\n" "};\n" "\"Chromatic &Polynomial\" = {\n" " Catalan = \"&Polinomi Cromàtic\"\n" " ChineseSimp = \"色多项式(&P)\"\n" " French = \"&Polynome chromatique\"\n" " German = \"Chromatisches &Polynom\"\n" " Italian = \"&Polinomio Cromatico\"\n" " Romanian = \"&Polinom Cromatic\"\n" " Spanish = \"&Polinomio Cromático\"\n" " SwedishChef = \"Chrumeteec &Pulynumeeel\"\n" "};\n" "\n" "### Prefab\n" "\"&Prefab\" = {\n" " Catalan = \"&Preestablert\"\n" " ChineseSimp = \"预置图(&P)\"\n" " French = \"&Préconçus\"\n" " German = \"&Vorgefertigt\"\n" " Italian = \"&Predefinito\"\n" " Romanian = \"&Prestabilite\"\n" " Spanish = \"&Preestablecido\"\n" " SwedishChef = \"&Preffeb\"\n" "};\n" "\"Complete (&Kn)\" = {\n" " Catalan = \"Complet (&Kn)\"\n" " ChineseSimp = \"完全图(Kn)(&K)\"\n" " French = \"Complet (&Kn)\"\n" " German = \"Vollständig (&Kn)\"\n" " Italian = \"Completo (&Kn)\"\n" " Romanian = \"Complet (&Kn)\"\n" " Spanish = \"Completo (&Kn)\"\n" " SwedishChef = \"Cumplete-a (&Kn)\"\n" "};\n" "\"Complete &Bipartite (Kn,m)\" = {\n" " Catalan = \"&Bipartit complet (Kn,m)\"\n" " ChineseSimp = \"完全二分图(Kn,m)(&B)\"\n" " French = \"Complet Bipartite (&Kn,m)\"\n" " German = \"Vollständig &zweigeteilt (Kn,m)\"\n" " Italian = \"&Bipartito Completo (Kn,m)\"\n" " Romanian = \"Complet &bipartit (Kn,m)\"\n" " Spanish = \"&Bipartido completo (Kn,m)\"\n" " SwedishChef = \"Cumplete-a &Beepertite-a (Kn,m)\"\n" "};\n" "\"Cycle (&Cn)\" = {\n" " Catalan = \"Cicle (&Cn)\"\n" " ChineseSimp = \"环(Cn)(&C)\"\n" " French = \"Cycle (&Cn)\"\n" " German = \"Kreis (&Cn)\"\n" " Italian = \"Ciclo (&Cn)\"\n" " Romanian = \"Ciclu (&Cn)\"\n" " Spanish = \"Ciclo (&Cn)\"\n" " SwedishChef = \"Cycle-a (&Cn)\"\n" "};\n" "\"Gear (&Gn)\" = {\n" " Catalan = \"Graf pinyó (&Gn)\"\n" " ChineseSimp = \"齿轮图(Gn)(&G)\"\n" " French = \"Volant (&Gn)\"\n" " German = \"Verzahnter (&Gn)\"\n" " Italian = \"Gear (&Gn)\"\n" " Romanian = \"Gear (&Gn)\"\n" " Spanish = \"Grafo piñón (&Gn)\"\n" " SwedishChef = \"Geer (&Gn)\"\n" "};\n" "\"Hanoi (&Hn)\" = {\n" " Catalan = \"Hanoi (&Hn)\"\n" " ChineseSimp = \"Hanoi(Hn)(&H)\"\n" "##### [fixme]\n" " French = \"Hanoi (&Hn)\"\n" " German = \"Hanoi (&Hn)\"\n" " Italian = \"Hanoi (&Hn)\"\n" " Romanian = \"Hanoi (&Hn)\"\n" " Spanish = \"Hanoi (&Hn)\"\n" " SwedishChef = \"Hunuee (&Hn)\"\n" "};\n" "\"Ladder (&Ln)\" = {\n" " Catalan = \"Escala (&Ln)\"\n" " ChineseSimp = \"Ladder (&Ln)\"\n" "##### [fixme]\n" " French = \"Échelle (&Ln)\"\n" " German = \"Leiter (&Ln)\"\n" " Italian = \"Ladder (&Ln)\"\n" " Romanian = \"Scarã (&Ln)\"\n" " Spanish = \"Escalera (&Ln)\"\n" " SwedishChef = \"Ledder (&Ln)\"\n" "};\n" "\"Lattice (Ln,m)\" = {\n" " Catalan = \"Malla (Ln,m)\"\n" " ChineseSimp = \"Lattice (Ln,m)\"\n" "##### [fixme]\n" " French = \"Maillage (Ln,m)\"\n" " German = \"Gitter (Ln,m)\"\n" " Italian = \"Lattice (Ln,m)\"\n" " Romanian = \"Lattice (Ln,m)\"\n" " Spanish = \"Malla (Ln,m)\"\n" " SwedishChef = \"Letteece-a (Ln,m)\"\n" "};\n" "\"Null (&Nn)\" = {\n" " Catalan = \"Nul (&Nn)\"\n" " ChineseSimp = \"空图(Nn)(&N)\"\n" " French = \"Nul (&Nn)\"\n" " German = \"Null (&Nn)\"\n" " Italian = \"Nullo (&Nn)\"\n" " Romanian = \"Nul (&Nn)\"\n" " Spanish = \"Nulo (&Nn)\"\n" " SwedishChef = \"Nooll (&Nn)\"\n" "};\n" "\"Star (&Sn)\" = {\n" " Catalan = \"Estel (&Sn)\"\n" " ChineseSimp = \"星(Sn)(&S)\"\n" " French = \"Étoile (&Sn)\"\n" " German = \"Stern (&Sn)\"\n" " Italian = \"Stella (&Sn)\"\n" " Romanian = \"Stea (&Sn)\"\n" " Spanish = \"Estrella (&Sn)\"\n" " SwedishChef = \"Ster (&Sn)\"\n" "};\n" "\"Tree (&Tn)\" = {\n" " Catalan = \"Arbre (&Tn)\"\n" " ChineseSimp = \"树(Tn)(&T)\"\n" " French = \"Arbre (&Tn)\"\n" " German = \"Baum (&Tn)\"\n" " Italian = \"Albero (&Tn)\"\n" " Romanian = \"Arbore (&Tn)\"\n" " Spanish = \"Árbol (&Tn)\"\n" " SwedishChef = \"Tree-a (&Tn)\"\n" "};\n" "\"Wheel (&Wn)\" = {\n" " Catalan = \"Roda (&Wn)\"\n" " ChineseSimp = \"轮状图(&Wn)(&W)\"\n" " French = \"Roue (&Wn)\"\n" " German = \"Rad (&Wn)\"\n" " Italian = \"Foresta (&Wn)\"\n" " Romanian = \"Roatã (&Wn)\"\n" " Spanish = \"Rueda (&Wn)\"\n" " SwedishChef = \"Vheel (&Wn)\"\n" "};\n" "\"Petersen\" = {\n" " Catalan = \"Petersen\"\n" " ChineseSimp = \"Petersen图\"\n" " French = \"Petersen\"\n" " German = \"Petersen\"\n" " Italian = \"Petersen\"\n" " Romanian = \"Petersen\"\n" " Spanish = \"Petersen\"\n" " SwedishChef = \"Petersee\"\n" "};\n" "###### Platonic\n" "\"&Platonic\" = {\n" " Catalan = \"&Platònic\"\n" " ChineseSimp = \"柏拉图体(&P)\"\n" " French = \"&Platonique\"\n" " German = \"&Platonisch\"\n" " Italian = \"&Platonico\"\n" " Romanian = \"&Platonic\"\n" " Spanish = \"&Platónico\"\n" " SwedishChef = \"&Pletuneec\"\n" "};\n" "\"&Tetrahedral\" = {\n" " Catalan = \"&Tetraedre\"\n" " ChineseSimp = \"四面体(&T)\"\n" " French = \"&Tétraédral\"\n" " German = \"&Tetradrisch\"\n" " Italian = \"&Tetraedre\"\n" " Romanian = \"&Tetraedru\"\n" " Spanish = \"&Tetraedro\"\n" " SwedishChef = \"&Tetrehedrel\"\n" "};\n" "\"&Cubical\" = {\n" " Catalan = \"&Cub\"\n" " ChineseSimp = \"立方体(&C)\"\n" " French = \"&Cubique\"\n" " German = \"&Kubisch\"\n" " Italian = \"&Cubo\"\n" " Romanian = \"&Cub\"\n" " Spanish = \"&Cubo\"\n" " SwedishChef = \"&Coobeecel\"\n" "};\n" "\"&Octahedral\" = {\n" " Catalan = \"&Octoedre\"\n" " ChineseSimp = \"八面体(&O)\"\n" " French = \"&Octaédral\"\n" " German = \"&Oktaedrisch\"\n" " Italian = \"&Ottoedro\"\n" " Romanian = \"&Octaedru\"\n" " Spanish = \"&Octoedro\"\n" " SwedishChef = \"&Ooctehedrel\"\n" "};\n" "\"&Dodecahedral\" = {\n" " Catalan = \"&Dodecaedre\"\n" " ChineseSimp = \"十二面体(&D)\"\n" " French = \"&Dodécaédral\"\n" " German = \"&Dodekaedrisch\"\n" " Italian = \"&Dodecaedro\"\n" " Romanian = \"&Dodecaedru\"\n" " Spanish = \"&Dodecaedro\"\n" " SwedishChef = \"&Dudecehedrel\"\n" "};\n" "\"&Icosahedral\" = {\n" " Catalan = \"&Icosaedre\"\n" " ChineseSimp = \"二十面体(&I)\"\n" " French = \"&Icosaédral\"\n" " German = \"&Ikosaedrisch\"\n" " Italian = \"&Icosaedro\"\n" " Romanian = \"&Icosaedru\"\n" " Spanish = \"&Icosaedro\"\n" " SwedishChef = \"&Icusehedrel\"\n" "};\n" "\n" "### Help\n" "\"&Help\" = {\n" " Catalan = \"&Ajuda\"\n" " ChineseSimp = \"帮助(&H)\"\n" " French = \"&Aide\"\n" " German = \"&Hilfe\"\n" " Italian = \"&Aiuto\"\n" " Romanian = \"&Ajutor\"\n" " Spanish = \"&Ayuda\"\n" " SwedishChef = \"&Help\"\n" "};\n" "\"&About\tF1\" = \"&About\" + \"\tF1\";\n" "\"\tF1\" = literal;\n" "\"&About\" = {\n" " Catalan = \"&Sobre\"\n" " ChineseSimp = \"关于(&A)\"\n" " French = \"&À propos\"\n" " German = \"&Über\"\n" " Italian = \"&Informazioni\"\n" " Romanian = \"&Despre\"\n" " Spanish = \"&Sobre\"\n" " SwedishChef = \"&Ebuoot\"\n" "};\n" "\n" "\n" "### Popup menus\n" "\"&Add Edge\" = {\n" " Catalan = \"&Afegir Aresta\"\n" " ChineseSimp = \"添加边(&A)\"\n" " French = \"&Ajouter une arête\"\n" " German = \"Kante &Hinzufügen\"\n" " Italian = \"&Aggiungi Arco\"\n" " Romanian = \"&Adaugã Muchie\"\n" " Spanish = \"&Añadir Arista\"\n" " SwedishChef = \"&Edd Idge-a\"\n" "};\n" "\"&Remove Edge\" = {\n" " Catalan = \"&Eliminar Aresta\"\n" " ChineseSimp = \"删除边(&R)\"\n" " French = \"&Supprimer une arête\"\n" " German = \"Kante &Entfernen\"\n" " Italian = \"&Elimina Arco\"\n" " Romanian = \"&ªterge Muchie\"\n" " Spanish = \"&Eliminar Arista\"\n" " SwedishChef = \"&Remufe-a Idge-a\"\n" "};\n" "\n" "#------------------------- Dialogs -------------------------#\n" "\n" "\"About...\" = \"About\" + \"...\";\n" "\n" "# XXX: Are there better translations than these?\n" "\"OK\" = {\n" " Catalan = \"OK\"\n" " ChineseSimp = \"确定\"\n" " French = \"OK\"\n" " German = \"OK\"\n" " Italian = \"OK\"\n" " Romanian = \"OK\"\n" " Spanish = \"OK\"\n" " SwedishChef = \"Ookey\"\n" "};\n" "\"Cancel\" = {\n" " Catalan = \"Cancel·lar\"\n" " ChineseSimp = \"取消\"\n" " French = \"Annuler\"\n" " German = \"Abbrechen\"\n" " Italian = \"Cancella\"\n" " Romanian = \"Renunþã\"\n" " Spanish = \"Cancelar\"\n" " SwedishChef = \"Cuncel\"\n" "};\n" "\n" "\"Loading failed\" = {\n" " Catalan = \"Error en càrrega\"\n" " ChineseSimp = \"载入失败\"\n" " French = \"Chargement échoué\"\n" " German = \"Laden fehlgeschlagen\"\n" " Italian = \"Caricamento fallito\"\n" " Romanian = \"Încãrcarea a eºuat\"\n" " Spanish = \"Error en carga\"\n" " SwedishChef = \"Luedeeng feeeled\"\n" "};\n" "\n" "\"This program is free software; you can redistribute\n\"\n" "\"it and/or modify it under the terms of the GNU\n\"\n" "\"General Public License, version 2, as published by\n\"\n" "\"the Free Software Foundation.\n\n\"\n" "\"This program is distributed in the hope that it will\n\"\n" "\"be useful, but WITHOUT ANY WARRANTY; without even\n\"\n" "\"the implied warranty of MERCHANTABILITY or FITNESS\n\"\n" "\"FOR A PARTICULAR PURPOSE. See the GNU General\n\"\n" "\"Public License for more details.\" = {\n" " Catalan =\n" " \"Traduït al català per\n\"\n" " \"Josep M. Lopez \"\n" " \"\n\n\"\n" " \"Aquest programa és Software Lliure; podeu\n\"\n" " \"redistribuir-lo i/o modificar-lo sota els termes\n\"\n" " \"de la \\\"GNU General Public License\\\" com la\n\"\n" " \"publica la \\\"FSF Free Software Foundation\\\".\n\n\"\n" " \"Aquest programa es distribueix esperant que\n\"\n" " \"us serà útil, pero SENSE CAP MENA DE GARANTIA;\n\"\n" " \"ni tan sols la garantía implícita pel MERCADEIG\n\"\n" " \"o EXERCICI D'ALGÚN PROPÒSIT en particular.\n\"\n" " \"Vegeu la \\\"GNU General Public License\\\" per més detalls.\"\n" " ChineseSimp =\n" " \"本程序为自由软件;您可依据自由软件基金会所发表的GNU通用公共\n\"\n" " \"授权条款规定,就本程序再次发布无论是否有修改。\n\n\"\n" " \"本程序是基于使用目的而加以发布,然而不负任何担保责任;亦无对\n\"\n" " \"适售性或特定目的适用性所为的默示性担保。详情请参照GNU通用公共授权。\"\n" " French =\n" " \"Traduit en français par\n\"\n" " \"Cyril Brulebois \n\"\n" " \"\n\n\"\n" "\n" " \"Ce programme est un logiciel libre ; vous pouvez\n\"\n" " \"le redistribuer et/ou le modifier au titre des\n\"\n" " \"clauses de la Licence Publique Générale GNU, telle\n\"\n" " \"que publiée par la Free Software Foundation ; soit\n\"\n" " \"la version 2 de la Licence. Ce programme est distribué\n\"\n" " \"dans l'espoir qu'il sera utile, mais SANS AUCUNE GARANTIE ;\n\"\n" " \"sans même une garantie implicite de COMMERCIABILITE ou\n\"\n" " \"DE CONFORMITE A UNE UTILISATION PARTICULIERE. Voir la\n\"\n" " \"Licence Publique Générale GNU pour plus de détails.\"\n" " German =\n" " \"Deutsche Übersetzung von\n\"\n" " \"Tilman Linneweh \"\n" " \"\n\"\n" " \"Die Deutsche Übersetzung ist noch nicht perfekt. Bitte\n\"\n" " \"sendet Verbesserungsvorschläge an mich, Tilman Linneweh.\n\"\n" " \"\n\n\"\n" " \"Dieses Programm ist freie Software. Sie können es\n\"\n" " \"unter den Bedingungen der GNU General Public License,\n\"\n" " \"wie von der Free Software Foundation veröffentlicht,\n\"\n" " \"weitergeben und/oder modifizieren, entweder gemäß\n\"\n" " \"Version 2 der Lizenz.\n\n\"\n" " \"Die Veröffentlichung dieses Programms erfolgt in der\n\"\n" " \"Hoffnung, daß es Ihnen von Nutzen sein wird, aber\n\"\n" " \"OHNE IRGENDEINE GARANTIE, sogar ohne die implizite\n\"\n" " \"Garantie der MARKTREIFE oder der VERWENDBARKEIT\n\"\n" " \"FÜR EINEN BESTIMMTEN ZWECK. Details finden Sie in\n\"\n" " \"der GNU General Public License.\"\n" " Italian =\n" " \"Semi tradotto in Italiano da\n\"\n" " \"Matteo Boccafoli \"\n" " \"\n\n\"\n" " \"Questo programma è software libero; è lecito ridistribuirlo\n\"\n" " \"e/o modificarlo secondo i termini della Licenza Pubblica\n\"\n" " \"Generica GNU come pubblicata dalla Free Software Foundation;\n\"\n" " \"o la versione 2 della licenza. Questo programma è\n\"\n" " \"distribuito nella speranza che sia utile, ma SENZA ALCUNA\n\"\n" " \"GARANZIA; senza neppure la garanzia implicita di\n\"\n" " \"COMMERCIABILITA o di APPLICABILITA PER UN PARTICOLARE\n\"\n" " \"SCOPO. Si veda la Licenza Pubblica Generica GNU per avere\n\"\n" " \"maggiori dettagli.\"\n" " Romanian = \n" " \"Traducerea în limba românã de\n\"\n" " \"Ion Savin \n\n\"\n" " \"Acest program este liber; îl puteþi redistribui ºi/sau modifica în\n\"\n" " \"conformitate cu termenii Licenþei Publice Generale GNU aºa cum\n\"\n" " \"este publicatã de Free Software Foundation, versiunea 2 a Licenþei.\n\n\"\n" " \"Acest program este distribuit cu speranþa de a fi util, dar FÃRÃ\n\"\n" " \"NICI O GARANÞIE, fãrã garanþie implicitã de vandabilitate ºi\n\"\n" " \"conformitate unui anumit scop. Citiþi Licenþa Publicã Generalã GNU\n\"\n" " \"pentru detalii.\"\n" " Spanish =\n" " \"Traducido al español por\n\"\n" " \"Josep M. Lopez \"\n" " \"\n\n\"\n" " \"Este programa es Software Libre; usted puede\n\"\n" " \"redistribuirlo y/o modificarlo bajo los términos\n\"\n" " \"de la \\\"GNU General Public License\\\" como lo\n\"\n" " \"publica la \\\"FSF Free Software Foundation\\\".\n\n\"\n" " \"Este programa es distribuido con la esperanza\n\"\n" " \"de que le será útil, pero SIN NINGUNA GARANTIA;\n\"\n" " \"incluso sin la garantía implícita por el MERCADEO\n\"\n" " \"o EJERCICIO DE ALGUN PROPOSITO en particular.\n\"\n" " \"Vea la \\\"GNU General Public License\\\" para más detalles.\"\n" " SwedishChef =\n" " \"Svedeesh Cheff Trunsleshun by\n\"\n" " \"Defeed Symunds \n\"\n" " \"(thunks tu \\\"Encheferizer\\\" by Juhn Hegermun:\n\"\n" " \"http://www.almac.co.uk/chef/chef/chef.html)\"\n" " \"\n\n\"\n" " \"Thees prugrem is free-a sufftvere-a; yuoo cun\n\"\n" " \"redeestriboote-a it und/oor mudeeffy it under zee\n\"\n" " \"terms ooff zee GNOO Generel Poobleec Leecense-a,\n\"\n" " \"ferseeun 2, es poobleeshed by zee Free-a Sufftvere-a\n\"\n" " \"Fuoondeshun.\n\n\"\n" " \"Thees prugrem is deestribooted in zee hupe-a thet\n\"\n" " \"it veell be-a useffool, boot VITHOOOT ENY VERRENTY;\n\"\n" " \"veethuoot ifee zee impleeed verrunty ooff\n\"\n" " \"MERCHENTEBILITY oor FITNESS FOR A PERTICOOLER\n\"\n" " \"POORPOSE. See-a zee GNOO Generel Poobleec Leecense-a\n\"\n" " \"fur mure-a deteeels.\"\n" "};\n" "\n" "\"Edge Properties\" = {\n" " Catalan = \"Propietats de l'aresta\"\n" " ChineseSimp = \"边属性\"\n" " French = \"Propriétés de l'arête\"\n" " German = \"Kanten Eigenschaften\"\n" " Italian = \"Proprietà dell'arco\"\n" " Romanian = \"Proprietãþi Muchie\"\n" " Spanish = \"Propiedades de la arista\"\n" " SwedishChef = \"Idge-a Pruperteees\"\n" "};\n" "\"Edge weight:\" = {\n" " Catalan = \"Pes de l'aresta:\"\n" " ChineseSimp = \"边权值:\"\n" " French = \"Poids de l'arête :\"\n" " German = \"Kantengewicht:\"\n" " Italian = \"Peso dell'arco:\"\n" " Romanian = \"Cost Muchie:\"\n" " Spanish = \"Peso de la arista:\"\n" " SwedishChef = \"Idge-a veeeght:\"\n" "};\n" "\"Edge flow:\" = {\n" " Catalan = \"Flux d'aresta:\"\n" " ChineseSimp = \"流:\"\n" " French = \"Flux de l'arête :\"\n" " Italian = \"Flusso dell'arco:\"\n" " Romanian = \"Flux muchie:\"\n" " Spanish = \"Flujo de arista:\"\n" " SwedishChef = \"Idge-a floo:\"\n" "};\n" "\"Vertex Properties\" = {\n" " Catalan = \"Propietats del vértex\"\n" " ChineseSimp = \"顶点属性\"\n" " French = \"Propriétés du sommet\"\n" " German = \"Vertex Eigenschaften\"\n" " Italian = \"Proprietà del vertice\"\n" " Romanian = \"Proprietãþi Vârf\"\n" " Spanish = \"Propiedades del vértice\"\n" " SwedishChef = \"Fertex Pruperteees\"\n" "};\n" "\"Label:\" = {\n" " Catalan = \"Etiqueta:\"\n" " ChineseSimp = \"标签:\"\n" " French = \"Étiquette :\"\n" " German = \"Bezeichnung:\"\n" " Italian = \"Etichetta:\"\n" " Romanian = \"Etichetã:\"\n" " Spanish = \"Etiqueta:\"\n" " SwedishChef = \"Lebel:\"\n" "};\n" "\n" "\"Load File\" = {\n" " Catalan = \"Obrir Fitxer\"\n" " ChineseSimp = \"打开文件\"\n" " French = \"Ouvrir un fichier\"\n" " German = \"Datei öffnen\"\n" " Italian = \"Apri File\"\n" " Romanian = \"Încarcã Fiºier\"\n" " Spanish = \"Abrir Fichero\"\n" " SwedishChef = \"Lued Feele-a\"\n" "};\n" "\"Save File\" = {\n" " Catalan = \"Desar Fitxer\"\n" " ChineseSimp = \"保存文件\"\n" " French = \"Sauver le fichier\"\n" " German = \"Datei Speichern\"\n" " Italian = \"Salva File\"\n" " Romanian = \"Salveazã Fiºier\"\n" " Spanish = \"Guardar Fichero\"\n" " SwedishChef = \"Sefe-a Feele-a\"\n" "};\n" "\"Print to File\" = {\n" " Catalan = \"Imprimir a Fitxer\"\n" " ChineseSimp = \"打印到文件\"\n" " French = \"Imprimer dans un fichier\"\n" " German = \"in Datei Drucken\"\n" " Italian = \"Stampa su File\"\n" " Romanian = \"Tipãreste în Fiºier\"\n" " Spanish = \"Imprimir a Fichero\"\n" " SwedishChef = \"Preent tu Feele-a\"\n" "};\n" "\n" "\"Exponent:\" = {\n" " Catalan = \"Exponent:\"\n" " ChineseSimp = \"指数:\"\n" " French = \"Exposant :\"\n" " German = \"Exponent:\"\n" " Italian = \"Esponente:\"\n" " Romanian = \"Exponent:\"\n" " Spanish = \"Exponente:\"\n" " SwedishChef = \"Ixpunent:\"\n" "};\n" "\n" "\"Subgraph\" = \"S&ubgraph\" subst \"&\" / \"\";\n" "\"Shortest Path\" = \"&Shortest Path\" subst \"&\" / \"\";\n" "\"Breadth-First Search\" = \"&Breadth-First Search\" subst \"&\" / \"\";\n" "\"Depth-First Search\" = \"&Depth-First Search\" subst \"&\" / \"\";\n" "\"Maximum Flow\" = \"Maximum &Flow\" subst \"&\" / \"\";\n" "\"Connectivity\" = \"&Connectivity\" subst \"&\" / \"\";\n" "\"Eulericity\" = \"&Eulericity\" subst \"&\" / \"\";\n" "\"Adjacency Matrix\" = \"&Adjacency Matrix\" subst \"&\" / \"\";\n" "\"Degree Sequence\" = \"&Degree Sequence\" subst \"&\" / \"\";\n" "\"Diameter\" = \"D&iameter\" subst \"&\" / \"\";\n" "\"Radius\" = \"&Radius\" subst \"&\" / \"\";\n" "\"Chromatic Number\" = \"&Chromatic Number\" subst \"&\" / \"\";\n" "\"Chromatic Index\" = \"C&hromatic Index\" subst \"&\" / \"\";\n" "\"Chromatic Polynomial\" = \"Chromatic &Polynomial\" subst \"&\" / \"\";\n" "\n" "\"Prefab Parameter\" = {\n" " Catalan = \"Paràmetre de Preestablert\"\n" " ChineseSimp = \"预置图参数\"\n" " French = \"Paramètre\"\n" " German = \"Ausgangsparameter\"\n" " Italian = \"Parametro Prestabilito\"\n" " Romanian = \"Parametru Prestabilit\"\n" " Spanish = \"Parámetro de Preestablecido\"\n" " SwedishChef = \"Preffeb Peremeter\"\n" "};\n" "\"Complete:\" = \"Complete (&Kn)\" subst \" (&Kn)\" / \":\";\n" "\"Complete &Bipartite:\" = \"Complete &Bipartite (Kn,m)\" subst \" (Kn,m)\" / \":\";\n" "\"Complete Bipartite:\" = \"Complete &Bipartite:\" subst \"&\" / \"\";\n" "\"Cycle:\" = \"Cycle (&Cn)\" subst \" (&Cn)\" / \":\";\n" "\"Gear:\" = \"Gear (&Gn)\" subst \" (&Gn)\" / \":\";\n" "\"Ladder:\" = \"Ladder (&Ln)\" subst \" (&Ln)\" / \":\";\n" "\"Lattice:\" = \"Lattice (Ln,m)\" subst \" (Ln,m)\" / \":\";\n" "\"Null:\" = \"Null (&Nn)\" subst \" (&Nn)\" / \":\";\n" "\"Star:\" = \"Star (&Sn)\" subst \" (&Sn)\" / \":\";\n" "\"Wheel:\" = \"Wheel (&Wn)\" subst \" (&Wn)\" / \":\";\n" "\n" "#------------------------- Result messages -------------------------#\n" "\n" "# This is used, for example, when there is no result\n" "# (e.g. the degree sequence of an empty graph)\n" "\"(none)\" = \"(\" + \"none\" + \")\";\n" "\"none\" = {\n" " Catalan = \"cap\"\n" " ChineseSimp = \"无\"\n" " French = \"aucun\"\n" " German = \"keine\"\n" " Italian = \"niente\"\n" " Romanian = \"none\"\n" " Spanish = \"nada\"\n" " SwedishChef = \"nune-a\"\n" "};\n" "\n" "\"Graph is connected.\" = {\n" " Catalan = \"Graf connex.\"\n" " ChineseSimp = \"这是一个连通图。\"\n" " French = \"Le graphe est connexe.\"\n" " German = \"Der Graph ist zusammenhängend.\"\n" " Italian = \"Grafo connesso.\"\n" " Romanian = \"Graful este conex.\"\n" " Spanish = \"Grafo conexo.\"\n" " SwedishChef = \"Greph is cunnected.\"\n" "};\n" "\"Graph is weakly connected.\" = {\n" " Catalan = \"El graf té connexió feble.\"\n" " ChineseSimp = \"这是一个弱连通图。\"\n" " French = \"Le graphe est faiblement connexe.\"\n" " German = \"Der Graph ist schwach zusammehängend.\"\n" " Italian = \"Grafo è debolmente connesso.\"\n" " Romanian = \"Graful nu este tare conex.\"\n" " Spanish = \"El grafo tiene conexión débil.\"\n" " SwedishChef = \"Greph is veekly cunnected.\"\n" "};\n" "\"Graph is strongly connected.\" = {\n" " Catalan = \"El digraf és fortament connex.\"\n" " ChineseSimp = \"这是一个强连通图。\"\n" " French = \"Le graphe est fortement connexe.\"\n" " German = \"Der Graph ist stark zusammenhängend.\"\n" " Italian = \"Grafo è fortemente connesso.\"\n" " Romanian = \"Graful este tare conex.\"\n" " Spanish = \"El digrafo es fuertemente conexo.\"\n" " SwedishChef = \"Greph is strungly cunnected.\"\n" "};\n" "\"Graph is Eulerian.\" = {\n" " Catalan = \"Graf eulerià.\"\n" " ChineseSimp = \"这是一个欧拉图。\"\n" " French = \"Le graphe est eulérien.\"\n" " German = \"Der Graph ist ein Eulerscher Graph.\"\n" " Italian = \"Grafo Euleriano.\"\n" " Romanian = \"Graful este eulerian.\"\n" " Spanish = \"Grafo euleriano.\"\n" " SwedishChef = \"Greph is Ioolereeun.\"\n" "};\n" "\"Graph is neither Eulerian nor Semi-Eulerian.\" = {\n" " Catalan = \"Graf ni eulerià ni semi eulerià.\"\n" " ChineseSimp = \"这是既不是欧拉图,也不是准欧拉图。\"\n" " French = \"Le graphe n'est ni eulérien ni semi-eulérien.\"\n" " German = \"Der Graph ist weder ein eulerscher Graph noch ein \"\n" " \"semi-eulerscher.\"\n" " Italian = \"Grafo ne euleriano ne semi euleriano.\"\n" " Romanian = \"Graful nu este nici eulerian nici semi-eulerian.\"\n" " Spanish = \"Grafo ni euleriano ni semi euleriano.\"\n" " SwedishChef = \"Greph is neeezeer Ioolereeun nur Semee-Ioolereeun.\"\n" "};\n" "\"Graph is not connected.\" = {\n" " Catalan = \"Graf no connex.\"\n" " ChineseSimp = \"这不是一个连通图。\"\n" " French = \"Le graphe n'est pas connexe.\"\n" " German = \"Der Graph ist nicht zusammenhängend.\"\n" " Italian = \"Grafo non connesso.\"\n" " Romanian = \"Graful nu este conex.\"\n" " Spanish = \"Grafo no conexo.\"\n" " SwedishChef = \"Greph is nut cunnected.\"\n" "};\n" "\"Graph is Semi-Eulerian.\" = {\n" " Catalan = \"Graf semi eulerià.\"\n" " ChineseSimp = \"这是一个准欧拉图。\"\n" " French = \"Le graphe est semi-eulérien.\"\n" " German = \"Der Graph ist ein semi-eulerscher Graph.\"\n" " Italian = \"Grafo semi Euleriano.\"\n" " Romanian = \"Graful este semi-eulerian.\"\n" " Spanish = \"Grafo semi euleriano.\"\n" " SwedishChef = \"Greph is Semee-Ioolereeun.\"\n" "};\n" "\"No path found.\" = {\n" " Catalan = \"Cap camí trobat.\"\n" " ChineseSimp = \"未找到路径。\"\n" " French = \"Aucun chemin trouvé.\"\n" " German = \"Kein Weg gefunden.\"\n" " Italian = \"Percorso non trovato.\"\n" " Romanian = \"Nici un drum gasit.\"\n" " Spanish = \"No se ha encontrado camino.\"\n" " SwedishChef = \"Nu pet fuoond.\"\n" "};\n" "\"Shortest path is %i.\" = {\n" " Catalan = \"El camí més curt és %i.\"\n" " ChineseSimp = \"最短路是 %i。\"\n" " French = \"Le plus court chemin est %i.\"\n" " German = \"Der Kürzeste Weg ist %i.\"\n" " Italian = \"Il cammino minimo é %i.\"\n" " Romanian = \"Cel mai scurt drum este %i.\"\n" " Spanish = \"El camino más corto es %i.\"\n" " SwedishChef = \"Shurtest pet is %i.\"\n" "};\n" "\"Maximum flow is %i.\" = {\n" " ChineseSimp = \"最大流是 %i。\"\n" " SwedishChef = \"Mexeemoom floo is %i.\"\n" "};\n" "\n" "\n" "#------------------------- Undo messages -------------------------#\n" "\n" "\"Load graph\" = {\n" " Catalan = \"Carrega graf\"\n" " ChineseSimp = \"打开文件\"\n" " French = \"Charger un graphe\"\n" " Italian = \"Carica grafo\"\n" " Romanian = \"Încarcã graf\" \n" " Spanish = \"Carga grafo\"\n" " SwedishChef = \"Lued greph\"\n" "};\n" "\"Clear graph\" = {\n" " Catalan = \"Esborrar graf\"\n" " ChineseSimp = \"清空图\"\n" " French = \"Effacer le graphe\"\n" " German = \"Lösche graph\"\n" " Italian = \"Cancella grafo\"\n" " Romanian = \"ªterge graful\"\n" " Spanish = \"Borrar grafo\"\n" " SwedishChef = \"Cleer greph\"\n" "};\n" "\"Complement graph\" = {\n" " Catalan = \"Fer complementari\"\n" " ChineseSimp = \"补图\"\n" " French = \"Graphe complémentaire\"\n" " German = \"Komplementärgraph\"\n" " Italian = \"Grafo completo\"\n" " Romanian = \"Complementul grafului\"\n" " Spanish = \"Hacer complementario\"\n" " SwedishChef = \"Cumplemunt greph\"\n" "};\n" "\"Line Graph\" = \"&Line Graph\" subst \"&\" / \"\";\n" "\"Induced subgraph\" = {\n" " Catalan = \"Subgraf Induït\"\n" " ChineseSimp = \"诱导子图\"\n" " French = \"Graphe induit\"\n" " Italian = \"Incluso sottografo\"\n" " Romanian = \"Subgraful indus\"\n" " Spanish = \"Subgrafo inducido\"\n" " SwedishChef = \"Indooced soobgreph\"\n" "};\n" "\"Make prefab\" = {\n" " Catalan = \"Fer predefinit\"\n" " ChineseSimp = \"使用预制图\"\n" " French = \"Créer un préconçu\"\n" " German = \"Erzeuge prefab\"\n" " Italian = \"Crea predefinito\"\n" " Romanian = \"Creazã predefinit\"\n" " Spanish = \"Hacer predefinido\"\n" " SwedishChef = \"Meke-a preffeb\"\n" "};\n" "\n" "\"Add vertex\" = {\n" " Catalan = \"Afegir vèrtex\"\n" " ChineseSimp = \"增加顶点\"\n" " French = \"Ajouter un vecteur\"\n" " German = \"Vertex hinzufügen\"\n" " Italian = \"Aggiungi vertice\"\n" " Romanian = \"Adaugã vârf\"\n" " Spanish = \"Añadir vértice\"\n" " SwedishChef = \"Edd fertex\"\n" "};\n" "\"Add edge\" = {\n" " Catalan = \"Afegir aresta\"\n" " ChineseSimp = \"增加边\"\n" " French = \"Ajouter une arête\"\n" " German = \"Kante hinzufügen\"\n" " Italian = \"Aggiungi vertice\"\n" " Romanian = \"Adaugã muchie\"\n" " Spanish = \"Añadir arista\"\n" " SwedishChef = \"Edd idge-a\"\n" "};\n" "\"Delete objects\" = {\n" " Catalan = \"Esborra objectes\"\n" " ChineseSimp = \"删除对象\"\n" " French = \"Supprimer les objets\"\n" " German = \"Lösche objekt\"\n" " Italian = \"Cancella oggetti\"\n" " Romanian = \"ªterge obiecte\"\n" " Spanish = \"Borra objetos\"\n" " SwedishChef = \"Delete-a oobjects\"\n" "};\n" "\n" "\"Rename vertex\" = {\n" " Catalan = \"Reanomenar vèrtex\"\n" " ChineseSimp = \"重命名顶点\"\n" " French = \"Renommer le sommet\"\n" " German = \"Vertex umbenennen\"\n" " Italian = \"Rinomina vertice\"\n" " Romanian = \"Redenumeºte vârful\"\n" " Spanish = \"Renombrar vértice\"\n" " SwedishChef = \"Runeme-a fertex\"\n" "};\n" "\"Edge direction:\" = {\n" " Catalan = \"Direcció d'aresta:\"\n" " ChineseSimp = \"边的方向:\"\n" " French = \"Direction de l'arc:\"\n" " German = \"Kantenrichtung:\"\n" " Italian = \"Direzione arco:\"\n" " Romanian = \"Direcþia arcului:\"\n" " Spanish = \"Dirección de arista:\"\n" " SwedishChef = \"Idge-a deerecshun:\"\n" "};\n" "\"Change edge weight\" = {\n" " Catalan = \"Canviar pes d'aresta\"\n" " ChineseSimp = \"改变边的权值\"\n" " French = \"Changer le poids de l'arête\"\n" " German = \"Ändere Kantengewicht\"\n" " Italian = \"Cambia peso dell'arco\"\n" " Romanian = \"Modificã costul muchiei\"\n" " Spanish = \"Cambiar peso de arista\"\n" " SwedishChef = \"Chunge-a idge-a veeeght\"\n" "};\n" "\"Change edge direction\" = {\n" " Catalan = \"Canviar direcció d'aresta\"\n" " ChineseSimp = \"改变边的方向\"\n" " French = \"Changer la direction de l'arc\"\n" " German = \"Ändere Kantenrichtung\"\n" " Italian = \"Cambia direzione arco\"\n" " Romanian = \"Modificã direcþia arcului\"\n" " Spanish = \"Cambiar dirección de arista\"\n" " SwedishChef = \"Chunge-a idge-a deerecshun\"\n" "};\n" "\"Change edge weight and direction\" = {\n" " Catalan = \"Canviar pes i direcció d'aresta\"\n" " ChineseSimp = \"改变边的权值和方向\"\n" " French = \"Changer le poids et la direction de l'arc\"\n" " German = \"Ändere Kantengewicht und -richtung\"\n" " Italian = \"Cambia peso e direzione arco\"\n" " Romanian = \"Modificã costul ºi direcþia arcului\"\n" " Spanish = \"Cambiar peso y dirección de arista\"\n" " SwedishChef = \"Chunge-a idge-a veeeght und deerecshun\"\n" "};\n" "\n" "#------------------------- Error messages -------------------------#\n" "\n" "\"At least one vertex must be selected to induce a subgraph.\" = {\n" " Catalan = \"Per induir un subgraf, cal haver seleccionat un o més \"\n" " \"vèrtexs.\"\n" " ChineseSimp = \"至少要选中一个顶点才可以作诱导子图。\"\n" " French = \"Pour induire un sous-graphe, vous devez sélectionner au\"\n" " \"moins un sommet.\"\n" " German = \"Mindestens ein vertex muss ausgewählt sein um den Subgraph \"\n" " \"zu bewegen.\"\n" " Italian = \"Per indurre un sottografo, di deve selezionare un vertice.\"\n" " Romanian = \"Cel puþin un vârf trebuie selectat pentru a induce un subgraf.\"\n" " Spanish = \"Para inducir un subgrafo, debe seleccionarse, como mínimo, \"\n" " \"un vértice.\"\n" " SwedishChef = \"Et leest oone-a fertex moost be-a selected tu \"\n" " \"indooce-a a soobgreph.\"\n" "};\n" "\"Exactly one vertex must be selected to perform a Breadth-First Search.\" = {\n" " Catalan = \"Per tal de fer una cerca per amplada cal sel·leccionar \"\n" " \"un sol vértex.\"\n" " ChineseSimp = \"必须选中一个顶点才可以进行宽度优先搜索。\"\n" " French = \"Pour effectuer une recherche en largeur d'abord, un\"\n" " \"sommet exactement doit être sélectionné.\"\n" " German = \"Für die Breitensuche muss genau ein Knoten ausgewählt sein.\"\n" " Italian = \"Per effettuare una ricerca in ampiezza, si deve selezionare\"\n" " \" un solo vertice.\"\n" " Romanian = \"Exact un vârf trebuie selectat pentru a cãuta \"\n" " \"în lãþime.\"\n" " Spanish = \"Para efectuar una búsqueda por anchura hay que seleccionar \"\n" " \"un sólo vértice.\"\n" " SwedishChef = \"Ixectly oone-a fertex moost be-a selected tu perffurm \"\n" " \"a Breedt-Furst Seerch.\"\n" "};\n" "\"Exactly one vertex must be selected to perform a Depth-First Search.\" = {\n" " Catalan = \"Per tal de fer una cerca en profunditat cal \"\n" " \"sel·leccionar un sol vértex.\"\n" " ChineseSimp = \"必须选中一个顶点才可以进行深度优先搜索。\"\n" " French = \"Pour effectuer une recherche en profondeur d'abord, un\"\n" " \"sommet exactement doit être sélectionné.\"\n" " German = \"Für die Tiefensuche muss genau ein Knoten ausgewählt sein.\"\n" " Italian = \"Per effettuare una ricerca in profondità, si deve \"\n" " \"selezionare un solo vertice.\"\n" " Romanian = \"Exact un vârf trebuie selectat pentru a cãuta \"\n" " \"în adâncime.\"\n" " Spanish = \"Para efectuar una búsqueda en profundidad hay que \"\n" " \"seleccionar un sólo vértice.\"\n" " SwedishChef = \"Ixectly oone-a fertex moost be-a selected tu perffurm \"\n" " \"a Dept-Furst Seerch.\"\n" "};\n" "\"Exactly two vertices must be selected to find a shortest path.\" = {\n" " Catalan = \"Per tal de cercar el camí més curt, cal que hi hagi \"\n" " \"dos vértexs sel·leccionats.\"\n" " ChineseSimp = \"必须选中两个顶点才可以寻找最短路。\"\n" " French = \"Pour effectuer une recherche du plus court chemin,\"\n" " \"deux sommets exactement doivent être sélectionnés.\"\n" " German = \"Um den kürzesten Weg zu finden, müssen genau zwei \"\n" " \"Punkte ausgewählt sein.\"\n" " Italian = \"Per trovare un cammino minimo, si devono selezionare\"\n" " \" due vertici.\"\n" " Romanian = \"Exact douã vârfuri trebuie selectate pentru a cãuta cel \"\n" " \"mai scurt drum.\"\n" " Spanish = \"Para buscar el camino más corto debe haber exactamante \"\n" " \"dos vértices seleccionados.\"\n" " SwedishChef = \"Ixectly tvu ferteeces moost be-a selected tu feend a \"\n" " \"shurtest pet.\"\n" "};\n" "\"Exactly two vertices must be selected to find a maximum flow.\" = {\n" " Catalan = \"Cal seleccionar exactament dos vèrtexs per trobar-ne\"\n" " \" el flux màxim.\"\n" " ChineseSimp = \"必须选中两个顶点才可以寻找最大流。\"\n" " French = \"Pour trouver un flux maximal, deux sommets exactement\"\n" " \"doivent être sélectionnés.\"\n" " Italian = \"Per trovare un flusso massimo, si devono selezionare\"\n" " \" due vertici.\"\n" " Romanian = \"Exact douã vârfuri trebuie selectate pentru a cãuta\"\n" " \"fluxul maxim.\"\n" " Spanish = \"Hay que seleccionar exactamente dos vértices para encontrar\"\n" " \" el flujo máximo.\"\n" " SwedishChef = \"Ixectly tvu ferteeces moost be-a selected tu feend a \"\n" " \"mexeemoom floo.\"\n" "};\n" "\n" "#------------------------- Miscellaneous -------------------------#\n" "\n" "# Stuff appearing in the statusbar (bottom of main area)\n" "\"About GraphThing\" = {\n" " Catalan = \"Sobre de GraphThing\"\n" " ChineseSimp = \"关于 GraphThing\"\n" " French = \"À propos de GraphThing\"\n" " German = \"Über GraphThing\"\n" " Italian = \"Circa GraphThing\"\n" " Romanian = \"Despre GraphThing\"\n" " Spanish = \"Acerca de GraphThing\"\n" " SwedishChef = \"Ebuoot GrephTheeng\"\n" "};\n" "\"Computing chromatic number...\" = {\n" " Catalan = \"Calculant número cromàtic...\"\n" " ChineseSimp = \"计算色数...\"\n" " French = \"Calcul du nombre chromatique...\"\n" " German = \"Berechne chromatische Zahl...\"\n" " Italian = \"Calcolando il numero cromatico...\"\n" " Romanian = \"Calculez numãrul cromatic...\"\n" " Spanish = \"Calculando número cromático...\"\n" " SwedishChef = \"Cumpooteeng chrumeteec noomber...\"\n" "};\n" "\"Computing chromatic index...\" = {\n" " Catalan = \"Calculant l'índex cromàtic...\"\n" " ChineseSimp = \"计算色指数...\"\n" " French = \"Calcul de l'index chromatique...\"\n" " German = \"Berechnung des chromatischen index...\"\n" " Italian = \"Calcolando l'indice cromatico...\"\n" " Romanian = \"Calculez index-ul cromatic...\"\n" " Spanish = \"Calculando el índice cromático...\"\n" " SwedishChef = \"Cumpooteeng chrumeteec index...\"\n" "};\n" "\"Computing chromatic polynomial...\" = {\n" " Catalan = \"Calculant polinomi cromàtic...\"\n" " ChineseSimp = \"计算色多项式...\"\n" " French = \"Calcul du polynome chromatique...\"\n" " German = \"Berechne chromatisches Polynom...\"\n" " Italian = \"Calcolando il polinomio cromatico...\"\n" " Romanian = \"Calculez polinomul cromatic...\"\n" " Spanish = \"Calculando polinomio cromático...\"\n" " SwedishChef = \"Cumpooteeng chrumeteec pulynumeeel...\"\n" "};\n" "\"Determining diameter...\" = {\n" " Catalan = \"Calculando diàmetre...\"\n" " ChineseSimp = \"求出直径...\"\n" " French = \"Calcul du diamètre...\"\n" " German = \"Bestimme Durchmesser...\"\n" " Italian = \"Calcolando diametro...\"\n" " Romanian = \"Calculez diametrul...\"\n" " Spanish = \"Calculando diámetro...\"\n" " SwedishChef = \"Determeening deeemeter...\"\n" "};\n" "\"Determining Eulericity...\" = {\n" " Catalan = \"Comprobant eulericitat...\"\n" " ChineseSimp = \"确定是否为欧拉图...\"\n" " French = \"Vérification de l'eulericité...\"\n" " German = \"Überprüfe, ob eulersch...\"\n" " Italian = \"Determinando l'Eulericità...\"\n" " Romanian = \"Determin Eulericitatea...\"\n" " Spanish = \"Comprobando eulericidad...\"\n" " SwedishChef = \"Determeening Ioolereecity...\"\n" "};\n" "\"Determining radius...\" = {\n" " Catalan = \"Calculant radi...\"\n" " ChineseSimp = \"求出半径...\"\n" " French = \"Calcul du rayon...\"\n" " German = \"Bestimme Radius...\"\n" " Italian = \"Determinando il raggio...\"\n" " Romanian = \"Determin raza...\"\n" " Spanish = \"Calculando radio...\"\n" " SwedishChef = \"Determeening redeeoos...\"\n" "};\n" "\"Finding shortest path...\" = {\n" " Catalan = \"Cercant camí més curt...\"\n" " ChineseSimp = \"找出最短路...\"\n" " French = \"Recherche du plus court chemin...\"\n" " German = \"Suche Kürzesten Weg...\"\n" " Italian = \"Cercando il cammino minimo...\"\n" " Romanian = \"Caut cel mai scurt drum...\"\n" " Spanish = \"Buscando camino más corto...\"\n" " SwedishChef = \"Feending shurtest pet...\"\n" "};\n" "\"Performing BFS...\" = {\n" " Catalan = \"Cercant per amplada...\"\n" " ChineseSimp = \"进行宽度优先搜索...\"\n" " French = \"En cours : recherche en largeur d'abord...\"\n" " German = \"Durchsuche mit BFS...\"\n" " Italian = \"Ricerca in ampiezza...\"\n" " Romanian = \"Caut în lãþime...\"\n" " Spanish = \"Buscando por anchura...\"\n" " SwedishChef = \"Perffurmeeng BFS...\"\n" "};\n" "\"Performing DFS...\" = {\n" " Catalan = \"Cercant en profunditat...\"\n" " ChineseSimp = \"进行深度优先搜索...\"\n" " French = \"En cours : recherche en profondeur d'abord...\"\n" " German = \"Durchsuche mit DFS...\"\n" " Italian = \"Ricerca in Profondità...\"\n" " Romanian = \"Caut în adâncime...\"\n" " Spanish = \"Buscando en profundidad...\"\n" " SwedishChef = \"Perffurmeeng DFS...\"\n" "};\n" "\"Finding Minimum Spanning Tree...\" = {\n" " Catalan = \"Cercant arbre d'expansió mínim...\"\n" " ChineseSimp = \"寻找最小生成树...\"\n" " French = \"Recheche de l'enjambement d'arbre minimal...\"\n" " German = \"Suche minimalen spannenden Baum...\"\n" " Italian = \"Trova albero dei cammini minimo...\"\n" " Romanian = \"Caut arborele minim de acoperire...\"\n" " Spanish = \"Buscando árbol de expansión mínimo...\"\n" " SwedishChef = \"Feending Meenimoom Spunneeng Tree-a...\"\n" "};\n" "\"Finding Maximum Flow...\" = {\n" " Catalan = \"Cercant flux màxim...\"\n" " ChineseSimp = \"寻找最大流...\"\n" " French = \"Calcul du flux maximal...\"\n" " Italian = \"Trova il Massimo Flusso...\"\n" " Romanian = \"Caut fluxul maxim...\"\n" " Spanish = \"Buscando flujo máximo...\"\n" " SwedishChef = \"Feending Mexeemoom Floo...\"\n" "};\n" "\"Prefab\" = \"&Prefab\" subst \"&\" / \"\";\n" "\"Prefab...\" = \"Prefab\" + \"...\";\n" "\"Ready\" = {\n" " Catalan = \"Fet\"\n" " ChineseSimp = \"准备好了\"\n" " French = \"Prêt\"\n" " German = \"Fertig\"\n" " Italian = \"Pronto\"\n" " Romanian = \"Gata\"\n" " Spanish = \"Listo\"\n" " SwedishChef = \"Reedy\"\n" "};\n" "\"Ready.\" = \"Ready\" + \".\";\n" "\"(Vertex Mode)\" = \"(\" + \"Vertex Mode\" + \")\";\n" "\"Vertex Mode\" = {\n" " Catalan = \"Mode Vèrtex\"\n" " ChineseSimp = \"顶点模式\"\n" " French = \"Mode sommet\"\n" " German = \"Vertex Modus\"\n" " Italian = \"Modalità Vertice\"\n" " Romanian = \"Mod Vârf\"\n" " Spanish = \"Modo Vértice\"\n" " SwedishChef = \"Fertex Mude-a\"\n" "};\n" "\"(Edge Mode)\" = \"(\" + \"Edge Mode\" + \")\";\n" "\"Edge Mode\" = {\n" " Catalan = \"Mode Aresta\"\n" " ChineseSimp = \"边模式\"\n" " French = \"Mode arête\"\n" " German = \"Kanten Modus\"\n" " Italian = \"Modalità Arco\"\n" " Romanian = \"Mod Muchie\"\n" " Spanish = \"Modo Arista\"\n" " SwedishChef = \"Idge-a Mude-a\"\n" "};\n" "\"Ready \" = \"Ready\" + \" \";\n" "\"Ready (Vertex Mode).\" = \"Ready \" + \"(Vertex Mode)\" + \".\";\n" "\"Ready (Edge Mode).\" = \"Ready \" + \"(Edge Mode)\" + \".\";\n" "\n" "\"Change to Vertex Mode\" = {\n" " Catalan = \"Canviar a mode vèrtex\"\n" " ChineseSimp = \"转换到顶点模式\"\n" " French = \"Changer pour le mode sommet\"\n" " German = \"Wechsele in den Knoten Modus\"\n" " Italian = \"Cambia a Modalità Vertice\"\n" " Romanian = \"Schimbã în Mod Vârf\"\n" " Spanish = \"Cambiar a modo vértice\"\n" " SwedishChef = \"Chunge-a tu Fertex Mude-a\"\n" "};\n" "\"Change to Edge Mode\" = {\n" " Catalan = \"Canviar a mode aresta\"\n" " ChineseSimp = \"转换到边模式\"\n" " French = \"Changer pour le mode arête\"\n" " German = \"Wechsele in den Vertex Modus\"\n" " Italian = \"Cambia a Modalità Arco\"\n" " Romanian = \"Schimbã în Mod Muchie\"\n" " Spanish = \"Cambiar a modo arista\"\n" " SwedishChef = \"Chunge-a tu Idge-a Mude-a\"\n" "};\n" "\n" "\"Testing connectivity...\" = {\n" " Catalan = \"Comprovant si és connex...\"\n" " ChineseSimp = \"测试连通性...\"\n" " French = \"Test de connexité...\"\n" " German = \"Überprüfe Verbindung...\"\n" " Italian = \"Provando la convessità...\"\n" " Romanian = \"Testez conectivitatea...\"\n" " Spanish = \"Comprobando si es conexo...\"\n" " SwedishChef = \"Testeeng cunnecteefity...\"\n" "};\n" "\n" "#------------------------- Literals -------------------------#\n" "\n" "\".\" = literal;\n" "\"...\" = literal;\n" "\" \" = literal;\n" "\" (\" = literal;\n" "\"(\" = literal;\n" "\")\" = literal;\n" ; // The End. graphthing-1.3.2/src/phrases.lang0000644000076500000000000013306310542050445016472 0ustar dsymondswheel# vim:set encoding=utf-8 fileencoding=utf-8 ts=8: # GraphThing phrase translation file # Format: # * Each phrase is a quoted string (multiple quoted strings are # concatenated) # * If a quote-mark is desired in a phrase, backslash it; if you want # a backslash, use a double-backslash (\\) # * A phrase-block begins with the English phrase, an '=', a '{', a # series of translations, and a '}'. A block always finishes with ';' # * Each translation is a language name, an '=', and a phrase # Notes: # * Not all languages have to have an entry in a phrase-block; # if a translation is missing, it will default to English # * Please be very careful to preserve punctuation # * Be *extremely* careful to use the conversion specifiers correctly; # the order of specifiers MUST be identical in a phrase-block # Languages presently accepted: # Catalan (ca), Danish (dk), Dutch (nl), Esperanto (eo), English (en), # Finnish (fi), French (fr), German (de), Greek (el), Italian (it), # Norwegian (no), Polish (pl), Portuguese (pt), Romanian (ro), # Spanish (es), Swedish (sv), SwedishChef (sv_CK) #------------------------- Meta -------------------------# "Version" = { Catalan = "Versió" ChineseSimp = "版本" French = "Version" German = "Version" Italian = "Versione" Romanian = "Versiunea" Spanish = "Versión" SwedishChef = "Ferseeun" }; # This one's a bit special - it should be the name of the language, as written # in that language "English" = { Catalan = "Català" ChineseSimp = "简体中文" French = "Français" German = "Deutsch" Italian = "Italiano" Romanian = "Românã" Spanish = "Español" SwedishChef = "Svedeesh Cheff" }; #------------------------- General -------------------------# # (stuff in this section aren't actually strings that need # translation. They are mostly commonly used words) "About" = "&About" subst "&" / ""; "All" = { Catalan = "Ambdós" ChineseSimp = "全部" French = "Tous" German = "Alle" Italian = "Tutto" Romanian = "Tot" Spanish = "Ambos" SwedishChef = "Ell" }; "&Edges" = { Catalan = "&Arestes" ChineseSimp = "边(&E)" French = "&Sommets" German = "&Kanten" Italian = "&Archi" Romanian = "&Muchii" Spanish = "&Aristas" SwedishChef = "&Idges" }; "&Vertices" = { Catalan = "&Vèrtexs" ChineseSimp = "顶点(&V)" French = "&Arêtes" German = "&Vertizen" Italian = "&Vertici" Romanian = "&Vârfuri" Spanish = "&Vértices" SwedishChef = "&Ferteeces" }; #------------------------- Menus -------------------------# ### File "&File" = { Catalan = "&Fitxer" ChineseSimp = "文件(&F)" French = "&Fichier" German = "&Datei" Italian = "&File" Romanian = "&Fiºier" Spanish = "&Fichero" SwedishChef = "&Feele-a" }; "&Load\tCtrl-O" = "&Load" + "\tCtrl-O"; "\tCtrl-O" = literal; "&Load" = { Catalan = "&Obrir" ChineseSimp = "打开(&L)" French = "&Ouvrir" German = "&Öffnen" Italian = "&Carica" Romanian = "&Încãrcare" Spanish = "&Abrir" SwedishChef = "&Lued" }; "&Save\tCtrl-S" = "&Save" + "\tCtrl-S"; "\tCtrl-S" = literal; "&Save" = { Catalan = "&Desar" ChineseSimp = "保存(&S)" French = "&Sauver" German = "&Speichern" Italian = "&Salva" Romanian = "&Salvare" Spanish = "&Guardar" SwedishChef = "&Sefe-a" }; #"&Print\tCtrl-P" = "&Print" + "\tCtrl-P"; #"\tCtrl-P" = literal; #"&Print" = { # Catalan = "Im&primir" # ChineseSimp = "打印(&P)" # French = "Im&primer" # German = "&Drucken" # Italian = "Stam&pa" # Romanian = "&Tipãrire" # Spanish = "Im&primir" # SwedishChef = "&Preent" #}; "E&xit\tCtrl-Q" = "E&xit" + "\tCtrl-Q"; "\tCtrl-Q" = literal; "E&xit" = { Catalan = "&Sortir" ChineseSimp = "退出(&x)" French = "&Quitter" German = "B&eenden" Italian = "&Esci" Romanian = "I&eºire" Spanish = "&Salir" SwedishChef = "I&xeet" }; ### Edit "&Edit" = { Catalan = "&Editar" ChineseSimp = "编辑(&E)" French = "&Éditer" German = "&Editieren" Italian = "&Modifica" Romanian = "&Editare" Spanish = "&Editar" SwedishChef = "&Ideet" }; "&Undo\tCtrl-Z" = "&Undo" + "\tCtrl-Z"; "\tCtrl-Z" = literal; "&Undo" = { Catalan = "&Desfer" ChineseSimp = "撤销(&U)" French = "&Annuler" German = "&Rückgängig" Italian = "&Annulla" Romanian = "&Anuleazã" Spanish = "&Deshacer" SwedishChef = "&Undu" }; "Select &All\tCtrl-A" = "Select &All" + "\tCtrl-A"; "\tCtrl-A" = literal; "Select &All" = { Catalan = "Selecciona &Tot" ChineseSimp = "全选(&A)" French = "Tout &sélectionner" German = "&Alles auswählen" Italian = "Seleziona &Tutto" Romanian = "&Selecteazã tot" Spanish = "Selecciona &Todo" SwedishChef = "Select &Ell" }; "Select &None" = { Catalan = "Selecciona &Cap" ChineseSimp = "取消选择(&N)" French = "Tout &désélectionner" German = "&Nichts auswählen" Italian = "&Nessuna Selezione" Romanian = "&Deselecteazã tot" Spanish = "Selecciona &Ninguno" SwedishChef = "Select &Noon" }; "&Invert Selection" = { Catalan = "&Invertir selecció" ChineseSimp = "反向选择(&I)" French = "&Inverser la sélection" German = "Auswahl &Invertieren" Italian = "&Inverti Selezione" Romanian = "&Inverseazã selecþia" Spanish = "&Invertir selección" SwedishChef = "&Infert Selecshun" }; "Invert Selection" = "&Invert Selection" subst "&" / ""; "Invert Selection (&Vertices)" = "Invert Selection" + " (" + "&Vertices" + ")"; "Invert Selection (&Edges)" = "Invert Selection" + " (" + "&Edges" + ")"; "&Invert Selection (All)" = "&Invert Selection" + " (" + "All" + ")"; ### View "&View" = { Catalan = "&Veure" ChineseSimp = "视图(&V)" French = "&Vue" German = "&Ansicht" Italian = "&Vista" Romanian = "A&ratã" Spanish = "&Ver" SwedishChef = "F&eeoo" }; "&Labels" = { Catalan = "&Etiquetes" ChineseSimp = "标签(&L)" French = "&Étiquettes" German = "&Bezeichnungen" Italian = "&Etichetta" Romanian = "&Etichetã" Spanish = "&Etiquetas" SwedishChef = "&Lebels" }; "&Weights" = { Catalan = "&Pesos" ChineseSimp = "权值(&W)" French = "&Poids" German = "&Gewichte" Italian = "&Peso" Romanian = "&Cost" Spanish = "&Pesos" SwedishChef = "&Veeeghts" }; "&Flows" = { Catalan = "&Fluxos" ChineseSimp = "流量(&F)" French = "&Flux" Italian = "&Flusso" Romanian = "&Flux" Spanish = "&Flujos" SwedishChef = "&Floos" }; ### Graph "&Graph" = { Catalan = "&Graf" ChineseSimp = "图(&G)" French = "&Graphe" German = "&Graph" Italian = "&Grafo" Romanian = "&Graf" Spanish = "&Grafo" SwedishChef = "&Greph" }; "&Clear\tCtrl-W" = "&Clear" + "\tCtrl-W"; "\tCtrl-W" = literal; "&Clear" = { Catalan = "Es&borrar" ChineseSimp = "清除(&C)" French = "&Effacer" German = "&Löschen" Italian = "&Cancella" Romanian = "&ªterge" Spanish = "&Borrar" SwedishChef = "&Cleer" }; "C&omplement" = { Catalan = "C&omplementari" ChineseSimp = "补图(&o)" French = "&Complémentaire" German = "&Komplement" Italian = "C&omplementario" Romanian = "C&omplement" Spanish = "C&omplementario" SwedishChef = "C&umplement" }; "&Line Graph" = { Catalan = "Graf &línia" ChineseSimp = "边图(&L)" French = "Graphe &Linéaire" German = "&Line Graph" Italian = "Grafo a &Linee" Romanian = "&Line Graph" Spanish = "Grafo &línea" SwedishChef = "&Leene-a Greph" }; "S&ubgraph" = { Catalan = "S&ubgraf" ChineseSimp = "诱导子图(&u)" French = "So&us-graphe" German = "S&ubgraph" Italian = "So&ttografo" Romanian = "S&ubgraf" Spanish = "S&ubgrafo" SwedishChef = "S&oobgreph" }; ###### Find "&Find" = { Catalan = "&Cercar" ChineseSimp = "寻找(&F)" French = "&Chercher" German = "&Suchen" Italian = "C&erca" Romanian = "&Cãutare" Spanish = "&Buscar" SwedishChef = "&Feend" }; "&Shortest Path" = { Catalan = "&Camí més curt" ChineseSimp = "最短路(&S)" French = "&Plus court chemin" German = "&Kürzester Weg" Italian = "&Cammino minimo" Romanian = "Cel mai &scurt drum" Spanish = "&Camino más corto" SwedishChef = "&Shurtest Pet" }; "&Breadth-First Search" = { Catalan = "Cerca en &lada" ChineseSimp = "宽度优先搜索(&B)" French = "Recherche en &largeur" German = "&Breitensuche" Italian = "Ricerca in &iezza" Romanian = "Cãutare în &lãtime" Spanish = "Búsqueda en &anchura" SwedishChef = "&Breedt-Furst Seerch" }; "&Depth-First Search" = { Catalan = "Cerca en &profunditat" ChineseSimp = "深度优先搜索(&D)" French = "Recherche en p&rofondeur" German = "&Tiefensuche" Italian = "Ricerca in &Profondità" Romanian = "Cãutare în &adâncime" Spanish = "Búsqueda en &profundidad" SwedishChef = "&Dept-Furst Seerch" }; "&Minimum Spanning Tree" = { Catalan = "&Arbre d'expansió mínim" ChineseSimp = "最小生成树(&M)" French = "Enjambement d'arbre &minimum" German = "&Minimaler aufspannender Baum" Italian = "Albero dei Cammini &Minimo" Romanian = "Arbore &minim de acoperire" Spanish = "&Árbol de expansión mínimo" SwedishChef = "&Meenimoom Spunneeng Tree-a" }; "Maximum &Flow" = { Catalan = "&Flux màxim" ChineseSimp = "最大流(&F)" French = "&Flux maximal" Italian = "Massimo &Flusso" Romanian = "&Flux maxim" Spanish = "&Flujo máximo" SwedishChef = "Mexeemoom &Floo" }; ###### Properties "&Properties" = { Catalan = "&Propietats" ChineseSimp = "性质(&P)" French = "&Propriétés" German = "&Eigenschaften" Italian = "&Proprietà" Romanian = "&Proprietãþi" Spanish = "&Propiedades" SwedishChef = "&Pruperteees" }; "&Connectivity" = { Catalan = "&Connexió" ChineseSimp = "连通性(&C)" French = "&Connectivité" German = "&Zusammenhängender Graph" Italian = "&Connetività" Romanian = "&Conectivitate" Spanish = "&Conexión" SwedishChef = "&Cunnecteefity" }; "&Eulericity" = { Catalan = "&Eulericitat" ChineseSimp = "欧拉图(&E)" French = "&Eulericité" German = "&Eulerschergraph" Italian = "&Eulericità" Romanian = "&Eulericitate" Spanish = "&Eulericidad" SwedishChef = "&Ioolereecity" }; "&Hamiltonicity" = { Catalan = "&Hamiltonicitat" ChineseSimp = "哈密顿图(&H)" French = "&Hamiltonicité" German = "&Hamiltongraph" Italian = "&Hamiltonianità" Romanian = "&Hamiltonitate" Spanish = "&Hamiltonicidad" SwedishChef = "&Hemeeltunicity" }; "&Planarity" = { Catalan = "&Planaritat" ChineseSimp = "可平面性(&P)" French = "&Planarité" German = "&Planarität" Italian = "&Planarità" Romanian = "&Planaritate" Spanish = "&Planaridad" SwedishChef = "&Plunereety" }; ###### Statistics "&Statistics" = { Catalan = "E&stadístiques" ChineseSimp = "统计(&S)" French = "&Statistiques" German = "S&tatistiken" Italian = "&Statistiche" Romanian = "&Statistici" Spanish = "E&stadísticas" SwedishChef = "&Steteestics" }; "&Adjacency Matrix" = { Catalan = "Matriu d'&adjacència" ChineseSimp = "邻接矩阵(&A)" French = "Matrice &adjacente" German = "&Adjazenzmatrix" Italian = "Matrice d'&adiacenza" Romanian = "Matrice de &adiacenþã" Spanish = "Matriz de &adyacencia" SwedishChef = "&Edjecency Metreex" }; "&Degree Sequence" = { Catalan = "Successió de &graus" ChineseSimp = "度序列(&D)" French = "Séquence de °rés" German = "&Grad Sequenz" Italian = "Successione del &grado" Romanian = "&Succesiune de grade" Spanish = "Sucesión de &grados" SwedishChef = "&Degree-a Seqooence-a" }; "D&iameter" = { Catalan = "&Diàmetre" ChineseSimp = "直径(&i)" French = "&Diamètre" German = "&Durchmesser" Italian = "&Diametro" Romanian = "&Diametru" Spanish = "&Diámetro" SwedishChef = "Deee&meter" }; "&Girth" = { Catalan = "G&irth" ChineseSimp = "围长(&G)" French = "&Périmètre" German = "&Umfang" Italian = "G&irth" Romanian = "&Girth" Spanish = "G&irth" SwedishChef = "&Gurt" }; "&Radius" = { Catalan = "&Radi" ChineseSimp = "半径(&R)" French = "&Rayon" German = "&Radius" Italian = "&Raggio" Romanian = "&Razã" Spanish = "&Radio" SwedishChef = "&Redeeoos" }; "&Chromatic Number" = { Catalan = "Número &Cromàtic" ChineseSimp = "色数(&C)" French = "Nombre &chromatique" German = "&Chormatische Zahl" Italian = "Numero &Cromatico" Romanian = "&Numãr cromatic" Spanish = "Número &Cromático" SwedishChef = "&Chrumeteec Noomber" }; "C&hromatic Index" = { Catalan = "Índex cro&màtic" ChineseSimp = "色指数(&h)" French = "Index c&hromatique" German = "C&hromatischer Index" Italian = "I&ndice Cromatico" Romanian = "&Index Cromatic" Spanish = "Índice cro&mático" SwedishChef = "C&hrumeteec Index" }; "Chromatic &Polynomial" = { Catalan = "&Polinomi Cromàtic" ChineseSimp = "色多项式(&P)" French = "&Polynome chromatique" German = "Chromatisches &Polynom" Italian = "&Polinomio Cromatico" Romanian = "&Polinom Cromatic" Spanish = "&Polinomio Cromático" SwedishChef = "Chrumeteec &Pulynumeeel" }; ### Prefab "&Prefab" = { Catalan = "&Preestablert" ChineseSimp = "预置图(&P)" French = "&Préconçus" German = "&Vorgefertigt" Italian = "&Predefinito" Romanian = "&Prestabilite" Spanish = "&Preestablecido" SwedishChef = "&Preffeb" }; "Complete (&Kn)" = { Catalan = "Complet (&Kn)" ChineseSimp = "完全图(Kn)(&K)" French = "Complet (&Kn)" German = "Vollständig (&Kn)" Italian = "Completo (&Kn)" Romanian = "Complet (&Kn)" Spanish = "Completo (&Kn)" SwedishChef = "Cumplete-a (&Kn)" }; "Complete &Bipartite (Kn,m)" = { Catalan = "&Bipartit complet (Kn,m)" ChineseSimp = "完全二分图(Kn,m)(&B)" French = "Complet Bipartite (&Kn,m)" German = "Vollständig &zweigeteilt (Kn,m)" Italian = "&Bipartito Completo (Kn,m)" Romanian = "Complet &bipartit (Kn,m)" Spanish = "&Bipartido completo (Kn,m)" SwedishChef = "Cumplete-a &Beepertite-a (Kn,m)" }; "Cycle (&Cn)" = { Catalan = "Cicle (&Cn)" ChineseSimp = "环(Cn)(&C)" French = "Cycle (&Cn)" German = "Kreis (&Cn)" Italian = "Ciclo (&Cn)" Romanian = "Ciclu (&Cn)" Spanish = "Ciclo (&Cn)" SwedishChef = "Cycle-a (&Cn)" }; "Gear (&Gn)" = { Catalan = "Graf pinyó (&Gn)" ChineseSimp = "齿轮图(Gn)(&G)" French = "Volant (&Gn)" German = "Verzahnter (&Gn)" Italian = "Gear (&Gn)" Romanian = "Gear (&Gn)" Spanish = "Grafo piñón (&Gn)" SwedishChef = "Geer (&Gn)" }; "Hanoi (&Hn)" = { Catalan = "Hanoi (&Hn)" ChineseSimp = "Hanoi(Hn)(&H)" ##### [fixme] French = "Hanoi (&Hn)" German = "Hanoi (&Hn)" Italian = "Hanoi (&Hn)" Romanian = "Hanoi (&Hn)" Spanish = "Hanoi (&Hn)" SwedishChef = "Hunuee (&Hn)" }; "Ladder (&Ln)" = { Catalan = "Escala (&Ln)" ChineseSimp = "Ladder (&Ln)" ##### [fixme] French = "Échelle (&Ln)" German = "Leiter (&Ln)" Italian = "Ladder (&Ln)" Romanian = "Scarã (&Ln)" Spanish = "Escalera (&Ln)" SwedishChef = "Ledder (&Ln)" }; "Lattice (Ln,m)" = { Catalan = "Malla (Ln,m)" ChineseSimp = "Lattice (Ln,m)" ##### [fixme] French = "Maillage (Ln,m)" German = "Gitter (Ln,m)" Italian = "Lattice (Ln,m)" Romanian = "Lattice (Ln,m)" Spanish = "Malla (Ln,m)" SwedishChef = "Letteece-a (Ln,m)" }; "Null (&Nn)" = { Catalan = "Nul (&Nn)" ChineseSimp = "空图(Nn)(&N)" French = "Nul (&Nn)" German = "Null (&Nn)" Italian = "Nullo (&Nn)" Romanian = "Nul (&Nn)" Spanish = "Nulo (&Nn)" SwedishChef = "Nooll (&Nn)" }; "Star (&Sn)" = { Catalan = "Estel (&Sn)" ChineseSimp = "星(Sn)(&S)" French = "Étoile (&Sn)" German = "Stern (&Sn)" Italian = "Stella (&Sn)" Romanian = "Stea (&Sn)" Spanish = "Estrella (&Sn)" SwedishChef = "Ster (&Sn)" }; "Tree (&Tn)" = { Catalan = "Arbre (&Tn)" ChineseSimp = "树(Tn)(&T)" French = "Arbre (&Tn)" German = "Baum (&Tn)" Italian = "Albero (&Tn)" Romanian = "Arbore (&Tn)" Spanish = "Árbol (&Tn)" SwedishChef = "Tree-a (&Tn)" }; "Wheel (&Wn)" = { Catalan = "Roda (&Wn)" ChineseSimp = "轮状图(&Wn)(&W)" French = "Roue (&Wn)" German = "Rad (&Wn)" Italian = "Foresta (&Wn)" Romanian = "Roatã (&Wn)" Spanish = "Rueda (&Wn)" SwedishChef = "Vheel (&Wn)" }; "Petersen" = { Catalan = "Petersen" ChineseSimp = "Petersen图" French = "Petersen" German = "Petersen" Italian = "Petersen" Romanian = "Petersen" Spanish = "Petersen" SwedishChef = "Petersee" }; ###### Platonic "&Platonic" = { Catalan = "&Platònic" ChineseSimp = "柏拉图体(&P)" French = "&Platonique" German = "&Platonisch" Italian = "&Platonico" Romanian = "&Platonic" Spanish = "&Platónico" SwedishChef = "&Pletuneec" }; "&Tetrahedral" = { Catalan = "&Tetraedre" ChineseSimp = "四面体(&T)" French = "&Tétraédral" German = "&Tetradrisch" Italian = "&Tetraedre" Romanian = "&Tetraedru" Spanish = "&Tetraedro" SwedishChef = "&Tetrehedrel" }; "&Cubical" = { Catalan = "&Cub" ChineseSimp = "立方体(&C)" French = "&Cubique" German = "&Kubisch" Italian = "&Cubo" Romanian = "&Cub" Spanish = "&Cubo" SwedishChef = "&Coobeecel" }; "&Octahedral" = { Catalan = "&Octoedre" ChineseSimp = "八面体(&O)" French = "&Octaédral" German = "&Oktaedrisch" Italian = "&Ottoedro" Romanian = "&Octaedru" Spanish = "&Octoedro" SwedishChef = "&Ooctehedrel" }; "&Dodecahedral" = { Catalan = "&Dodecaedre" ChineseSimp = "十二面体(&D)" French = "&Dodécaédral" German = "&Dodekaedrisch" Italian = "&Dodecaedro" Romanian = "&Dodecaedru" Spanish = "&Dodecaedro" SwedishChef = "&Dudecehedrel" }; "&Icosahedral" = { Catalan = "&Icosaedre" ChineseSimp = "二十面体(&I)" French = "&Icosaédral" German = "&Ikosaedrisch" Italian = "&Icosaedro" Romanian = "&Icosaedru" Spanish = "&Icosaedro" SwedishChef = "&Icusehedrel" }; ### Help "&Help" = { Catalan = "&Ajuda" ChineseSimp = "帮助(&H)" French = "&Aide" German = "&Hilfe" Italian = "&Aiuto" Romanian = "&Ajutor" Spanish = "&Ayuda" SwedishChef = "&Help" }; "&About\tF1" = "&About" + "\tF1"; "\tF1" = literal; "&About" = { Catalan = "&Sobre" ChineseSimp = "关于(&A)" French = "&À propos" German = "&Über" Italian = "&Informazioni" Romanian = "&Despre" Spanish = "&Sobre" SwedishChef = "&Ebuoot" }; ### Popup menus "&Add Edge" = { Catalan = "&Afegir Aresta" ChineseSimp = "添加边(&A)" French = "&Ajouter une arête" German = "Kante &Hinzufügen" Italian = "&Aggiungi Arco" Romanian = "&Adaugã Muchie" Spanish = "&Añadir Arista" SwedishChef = "&Edd Idge-a" }; "&Remove Edge" = { Catalan = "&Eliminar Aresta" ChineseSimp = "删除边(&R)" French = "&Supprimer une arête" German = "Kante &Entfernen" Italian = "&Elimina Arco" Romanian = "&ªterge Muchie" Spanish = "&Eliminar Arista" SwedishChef = "&Remufe-a Idge-a" }; #------------------------- Dialogs -------------------------# "About..." = "About" + "..."; # XXX: Are there better translations than these? "OK" = { Catalan = "OK" ChineseSimp = "确定" French = "OK" German = "OK" Italian = "OK" Romanian = "OK" Spanish = "OK" SwedishChef = "Ookey" }; "Cancel" = { Catalan = "Cancel·lar" ChineseSimp = "取消" French = "Annuler" German = "Abbrechen" Italian = "Cancella" Romanian = "Renunþã" Spanish = "Cancelar" SwedishChef = "Cuncel" }; "Loading failed" = { Catalan = "Error en càrrega" ChineseSimp = "载入失败" French = "Chargement échoué" German = "Laden fehlgeschlagen" Italian = "Caricamento fallito" Romanian = "Încãrcarea a eºuat" Spanish = "Error en carga" SwedishChef = "Luedeeng feeeled" }; "This program is free software; you can redistribute\n" "it and/or modify it under the terms of the GNU\n" "General Public License, version 2, as published by\n" "the Free Software Foundation.\n\n" "This program is distributed in the hope that it will\n" "be useful, but WITHOUT ANY WARRANTY; without even\n" "the implied warranty of MERCHANTABILITY or FITNESS\n" "FOR A PARTICULAR PURPOSE. See the GNU General\n" "Public License for more details." = { Catalan = "Traduït al català per\n" "Josep M. Lopez " "\n\n" "Aquest programa és Software Lliure; podeu\n" "redistribuir-lo i/o modificar-lo sota els termes\n" "de la \"GNU General Public License\" com la\n" "publica la \"FSF Free Software Foundation\".\n\n" "Aquest programa es distribueix esperant que\n" "us serà útil, pero SENSE CAP MENA DE GARANTIA;\n" "ni tan sols la garantía implícita pel MERCADEIG\n" "o EXERCICI D'ALGÚN PROPÒSIT en particular.\n" "Vegeu la \"GNU General Public License\" per més detalls." ChineseSimp = "本程序为自由软件;您可依据自由软件基金会所发表的GNU通用公共\n" "授权条款规定,就本程序再次发布无论是否有修改。\n\n" "本程序是基于使用目的而加以发布,然而不负任何担保责任;亦无对\n" "适售性或特定目的适用性所为的默示性担保。详情请参照GNU通用公共授权。" French = "Traduit en français par\n" "Cyril Brulebois \n" "\n\n" "Ce programme est un logiciel libre ; vous pouvez\n" "le redistribuer et/ou le modifier au titre des\n" "clauses de la Licence Publique Générale GNU, telle\n" "que publiée par la Free Software Foundation ; soit\n" "la version 2 de la Licence. Ce programme est distribué\n" "dans l'espoir qu'il sera utile, mais SANS AUCUNE GARANTIE ;\n" "sans même une garantie implicite de COMMERCIABILITE ou\n" "DE CONFORMITE A UNE UTILISATION PARTICULIERE. Voir la\n" "Licence Publique Générale GNU pour plus de détails." German = "Deutsche Übersetzung von\n" "Tilman Linneweh " "\n" "Die Deutsche Übersetzung ist noch nicht perfekt. Bitte\n" "sendet Verbesserungsvorschläge an mich, Tilman Linneweh.\n" "\n\n" "Dieses Programm ist freie Software. Sie können es\n" "unter den Bedingungen der GNU General Public License,\n" "wie von der Free Software Foundation veröffentlicht,\n" "weitergeben und/oder modifizieren, entweder gemäß\n" "Version 2 der Lizenz.\n\n" "Die Veröffentlichung dieses Programms erfolgt in der\n" "Hoffnung, daß es Ihnen von Nutzen sein wird, aber\n" "OHNE IRGENDEINE GARANTIE, sogar ohne die implizite\n" "Garantie der MARKTREIFE oder der VERWENDBARKEIT\n" "FÜR EINEN BESTIMMTEN ZWECK. Details finden Sie in\n" "der GNU General Public License." Italian = "Semi tradotto in Italiano da\n" "Matteo Boccafoli " "\n\n" "Questo programma è software libero; è lecito ridistribuirlo\n" "e/o modificarlo secondo i termini della Licenza Pubblica\n" "Generica GNU come pubblicata dalla Free Software Foundation;\n" "o la versione 2 della licenza. Questo programma è\n" "distribuito nella speranza che sia utile, ma SENZA ALCUNA\n" "GARANZIA; senza neppure la garanzia implicita di\n" "COMMERCIABILITA o di APPLICABILITA PER UN PARTICOLARE\n" "SCOPO. Si veda la Licenza Pubblica Generica GNU per avere\n" "maggiori dettagli." Romanian = "Traducerea în limba românã de\n" "Ion Savin \n\n" "Acest program este liber; îl puteþi redistribui ºi/sau modifica în\n" "conformitate cu termenii Licenþei Publice Generale GNU aºa cum\n" "este publicatã de Free Software Foundation, versiunea 2 a Licenþei.\n\n" "Acest program este distribuit cu speranþa de a fi util, dar FÃRÃ\n" "NICI O GARANÞIE, fãrã garanþie implicitã de vandabilitate ºi\n" "conformitate unui anumit scop. Citiþi Licenþa Publicã Generalã GNU\n" "pentru detalii." Spanish = "Traducido al español por\n" "Josep M. Lopez " "\n\n" "Este programa es Software Libre; usted puede\n" "redistribuirlo y/o modificarlo bajo los términos\n" "de la \"GNU General Public License\" como lo\n" "publica la \"FSF Free Software Foundation\".\n\n" "Este programa es distribuido con la esperanza\n" "de que le será útil, pero SIN NINGUNA GARANTIA;\n" "incluso sin la garantía implícita por el MERCADEO\n" "o EJERCICIO DE ALGUN PROPOSITO en particular.\n" "Vea la \"GNU General Public License\" para más detalles." SwedishChef = "Svedeesh Cheff Trunsleshun by\n" "Defeed Symunds \n" "(thunks tu \"Encheferizer\" by Juhn Hegermun:\n" "http://www.almac.co.uk/chef/chef/chef.html)" "\n\n" "Thees prugrem is free-a sufftvere-a; yuoo cun\n" "redeestriboote-a it und/oor mudeeffy it under zee\n" "terms ooff zee GNOO Generel Poobleec Leecense-a,\n" "ferseeun 2, es poobleeshed by zee Free-a Sufftvere-a\n" "Fuoondeshun.\n\n" "Thees prugrem is deestribooted in zee hupe-a thet\n" "it veell be-a useffool, boot VITHOOOT ENY VERRENTY;\n" "veethuoot ifee zee impleeed verrunty ooff\n" "MERCHENTEBILITY oor FITNESS FOR A PERTICOOLER\n" "POORPOSE. See-a zee GNOO Generel Poobleec Leecense-a\n" "fur mure-a deteeels." }; "Edge Properties" = { Catalan = "Propietats de l'aresta" ChineseSimp = "边属性" French = "Propriétés de l'arête" German = "Kanten Eigenschaften" Italian = "Proprietà dell'arco" Romanian = "Proprietãþi Muchie" Spanish = "Propiedades de la arista" SwedishChef = "Idge-a Pruperteees" }; "Edge weight:" = { Catalan = "Pes de l'aresta:" ChineseSimp = "边权值:" French = "Poids de l'arête :" German = "Kantengewicht:" Italian = "Peso dell'arco:" Romanian = "Cost Muchie:" Spanish = "Peso de la arista:" SwedishChef = "Idge-a veeeght:" }; "Edge flow:" = { Catalan = "Flux d'aresta:" ChineseSimp = "流:" French = "Flux de l'arête :" Italian = "Flusso dell'arco:" Romanian = "Flux muchie:" Spanish = "Flujo de arista:" SwedishChef = "Idge-a floo:" }; "Vertex Properties" = { Catalan = "Propietats del vértex" ChineseSimp = "顶点属性" French = "Propriétés du sommet" German = "Vertex Eigenschaften" Italian = "Proprietà del vertice" Romanian = "Proprietãþi Vârf" Spanish = "Propiedades del vértice" SwedishChef = "Fertex Pruperteees" }; "Label:" = { Catalan = "Etiqueta:" ChineseSimp = "标签:" French = "Étiquette :" German = "Bezeichnung:" Italian = "Etichetta:" Romanian = "Etichetã:" Spanish = "Etiqueta:" SwedishChef = "Lebel:" }; "Load File" = { Catalan = "Obrir Fitxer" ChineseSimp = "打开文件" French = "Ouvrir un fichier" German = "Datei öffnen" Italian = "Apri File" Romanian = "Încarcã Fiºier" Spanish = "Abrir Fichero" SwedishChef = "Lued Feele-a" }; "Save File" = { Catalan = "Desar Fitxer" ChineseSimp = "保存文件" French = "Sauver le fichier" German = "Datei Speichern" Italian = "Salva File" Romanian = "Salveazã Fiºier" Spanish = "Guardar Fichero" SwedishChef = "Sefe-a Feele-a" }; "Print to File" = { Catalan = "Imprimir a Fitxer" ChineseSimp = "打印到文件" French = "Imprimer dans un fichier" German = "in Datei Drucken" Italian = "Stampa su File" Romanian = "Tipãreste în Fiºier" Spanish = "Imprimir a Fichero" SwedishChef = "Preent tu Feele-a" }; "Exponent:" = { Catalan = "Exponent:" ChineseSimp = "指数:" French = "Exposant :" German = "Exponent:" Italian = "Esponente:" Romanian = "Exponent:" Spanish = "Exponente:" SwedishChef = "Ixpunent:" }; "Subgraph" = "S&ubgraph" subst "&" / ""; "Shortest Path" = "&Shortest Path" subst "&" / ""; "Breadth-First Search" = "&Breadth-First Search" subst "&" / ""; "Depth-First Search" = "&Depth-First Search" subst "&" / ""; "Maximum Flow" = "Maximum &Flow" subst "&" / ""; "Connectivity" = "&Connectivity" subst "&" / ""; "Eulericity" = "&Eulericity" subst "&" / ""; "Adjacency Matrix" = "&Adjacency Matrix" subst "&" / ""; "Degree Sequence" = "&Degree Sequence" subst "&" / ""; "Diameter" = "D&iameter" subst "&" / ""; "Radius" = "&Radius" subst "&" / ""; "Chromatic Number" = "&Chromatic Number" subst "&" / ""; "Chromatic Index" = "C&hromatic Index" subst "&" / ""; "Chromatic Polynomial" = "Chromatic &Polynomial" subst "&" / ""; "Prefab Parameter" = { Catalan = "Paràmetre de Preestablert" ChineseSimp = "预置图参数" French = "Paramètre" German = "Ausgangsparameter" Italian = "Parametro Prestabilito" Romanian = "Parametru Prestabilit" Spanish = "Parámetro de Preestablecido" SwedishChef = "Preffeb Peremeter" }; "Complete:" = "Complete (&Kn)" subst " (&Kn)" / ":"; "Complete &Bipartite:" = "Complete &Bipartite (Kn,m)" subst " (Kn,m)" / ":"; "Complete Bipartite:" = "Complete &Bipartite:" subst "&" / ""; "Cycle:" = "Cycle (&Cn)" subst " (&Cn)" / ":"; "Gear:" = "Gear (&Gn)" subst " (&Gn)" / ":"; "Ladder:" = "Ladder (&Ln)" subst " (&Ln)" / ":"; "Lattice:" = "Lattice (Ln,m)" subst " (Ln,m)" / ":"; "Null:" = "Null (&Nn)" subst " (&Nn)" / ":"; "Star:" = "Star (&Sn)" subst " (&Sn)" / ":"; "Wheel:" = "Wheel (&Wn)" subst " (&Wn)" / ":"; #------------------------- Result messages -------------------------# # This is used, for example, when there is no result # (e.g. the degree sequence of an empty graph) "(none)" = "(" + "none" + ")"; "none" = { Catalan = "cap" ChineseSimp = "无" French = "aucun" German = "keine" Italian = "niente" Romanian = "none" Spanish = "nada" SwedishChef = "nune-a" }; "Graph is connected." = { Catalan = "Graf connex." ChineseSimp = "这是一个连通图。" French = "Le graphe est connexe." German = "Der Graph ist zusammenhängend." Italian = "Grafo connesso." Romanian = "Graful este conex." Spanish = "Grafo conexo." SwedishChef = "Greph is cunnected." }; "Graph is weakly connected." = { Catalan = "El graf té connexió feble." ChineseSimp = "这是一个弱连通图。" French = "Le graphe est faiblement connexe." German = "Der Graph ist schwach zusammehängend." Italian = "Grafo è debolmente connesso." Romanian = "Graful nu este tare conex." Spanish = "El grafo tiene conexión débil." SwedishChef = "Greph is veekly cunnected." }; "Graph is strongly connected." = { Catalan = "El digraf és fortament connex." ChineseSimp = "这是一个强连通图。" French = "Le graphe est fortement connexe." German = "Der Graph ist stark zusammenhängend." Italian = "Grafo è fortemente connesso." Romanian = "Graful este tare conex." Spanish = "El digrafo es fuertemente conexo." SwedishChef = "Greph is strungly cunnected." }; "Graph is Eulerian." = { Catalan = "Graf eulerià." ChineseSimp = "这是一个欧拉图。" French = "Le graphe est eulérien." German = "Der Graph ist ein Eulerscher Graph." Italian = "Grafo Euleriano." Romanian = "Graful este eulerian." Spanish = "Grafo euleriano." SwedishChef = "Greph is Ioolereeun." }; "Graph is neither Eulerian nor Semi-Eulerian." = { Catalan = "Graf ni eulerià ni semi eulerià." ChineseSimp = "这是既不是欧拉图,也不是准欧拉图。" French = "Le graphe n'est ni eulérien ni semi-eulérien." German = "Der Graph ist weder ein eulerscher Graph noch ein " "semi-eulerscher." Italian = "Grafo ne euleriano ne semi euleriano." Romanian = "Graful nu este nici eulerian nici semi-eulerian." Spanish = "Grafo ni euleriano ni semi euleriano." SwedishChef = "Greph is neeezeer Ioolereeun nur Semee-Ioolereeun." }; "Graph is not connected." = { Catalan = "Graf no connex." ChineseSimp = "这不是一个连通图。" French = "Le graphe n'est pas connexe." German = "Der Graph ist nicht zusammenhängend." Italian = "Grafo non connesso." Romanian = "Graful nu este conex." Spanish = "Grafo no conexo." SwedishChef = "Greph is nut cunnected." }; "Graph is Semi-Eulerian." = { Catalan = "Graf semi eulerià." ChineseSimp = "这是一个准欧拉图。" French = "Le graphe est semi-eulérien." German = "Der Graph ist ein semi-eulerscher Graph." Italian = "Grafo semi Euleriano." Romanian = "Graful este semi-eulerian." Spanish = "Grafo semi euleriano." SwedishChef = "Greph is Semee-Ioolereeun." }; "No path found." = { Catalan = "Cap camí trobat." ChineseSimp = "未找到路径。" French = "Aucun chemin trouvé." German = "Kein Weg gefunden." Italian = "Percorso non trovato." Romanian = "Nici un drum gasit." Spanish = "No se ha encontrado camino." SwedishChef = "Nu pet fuoond." }; "Shortest path is %i." = { Catalan = "El camí més curt és %i." ChineseSimp = "最短路是 %i。" French = "Le plus court chemin est %i." German = "Der Kürzeste Weg ist %i." Italian = "Il cammino minimo é %i." Romanian = "Cel mai scurt drum este %i." Spanish = "El camino más corto es %i." SwedishChef = "Shurtest pet is %i." }; "Maximum flow is %i." = { ChineseSimp = "最大流是 %i。" SwedishChef = "Mexeemoom floo is %i." }; #------------------------- Undo messages -------------------------# "Load graph" = { Catalan = "Carrega graf" ChineseSimp = "打开文件" French = "Charger un graphe" Italian = "Carica grafo" Romanian = "Încarcã graf" Spanish = "Carga grafo" SwedishChef = "Lued greph" }; "Clear graph" = { Catalan = "Esborrar graf" ChineseSimp = "清空图" French = "Effacer le graphe" German = "Lösche graph" Italian = "Cancella grafo" Romanian = "ªterge graful" Spanish = "Borrar grafo" SwedishChef = "Cleer greph" }; "Complement graph" = { Catalan = "Fer complementari" ChineseSimp = "补图" French = "Graphe complémentaire" German = "Komplementärgraph" Italian = "Grafo completo" Romanian = "Complementul grafului" Spanish = "Hacer complementario" SwedishChef = "Cumplemunt greph" }; "Line Graph" = "&Line Graph" subst "&" / ""; "Induced subgraph" = { Catalan = "Subgraf Induït" ChineseSimp = "诱导子图" French = "Graphe induit" Italian = "Incluso sottografo" Romanian = "Subgraful indus" Spanish = "Subgrafo inducido" SwedishChef = "Indooced soobgreph" }; "Make prefab" = { Catalan = "Fer predefinit" ChineseSimp = "使用预制图" French = "Créer un préconçu" German = "Erzeuge prefab" Italian = "Crea predefinito" Romanian = "Creazã predefinit" Spanish = "Hacer predefinido" SwedishChef = "Meke-a preffeb" }; "Add vertex" = { Catalan = "Afegir vèrtex" ChineseSimp = "增加顶点" French = "Ajouter un vecteur" German = "Vertex hinzufügen" Italian = "Aggiungi vertice" Romanian = "Adaugã vârf" Spanish = "Añadir vértice" SwedishChef = "Edd fertex" }; "Add edge" = { Catalan = "Afegir aresta" ChineseSimp = "增加边" French = "Ajouter une arête" German = "Kante hinzufügen" Italian = "Aggiungi vertice" Romanian = "Adaugã muchie" Spanish = "Añadir arista" SwedishChef = "Edd idge-a" }; "Delete objects" = { Catalan = "Esborra objectes" ChineseSimp = "删除对象" French = "Supprimer les objets" German = "Lösche objekt" Italian = "Cancella oggetti" Romanian = "ªterge obiecte" Spanish = "Borra objetos" SwedishChef = "Delete-a oobjects" }; "Rename vertex" = { Catalan = "Reanomenar vèrtex" ChineseSimp = "重命名顶点" French = "Renommer le sommet" German = "Vertex umbenennen" Italian = "Rinomina vertice" Romanian = "Redenumeºte vârful" Spanish = "Renombrar vértice" SwedishChef = "Runeme-a fertex" }; "Edge direction:" = { Catalan = "Direcció d'aresta:" ChineseSimp = "边的方向:" French = "Direction de l'arc:" German = "Kantenrichtung:" Italian = "Direzione arco:" Romanian = "Direcþia arcului:" Spanish = "Dirección de arista:" SwedishChef = "Idge-a deerecshun:" }; "Change edge weight" = { Catalan = "Canviar pes d'aresta" ChineseSimp = "改变边的权值" French = "Changer le poids de l'arête" German = "Ändere Kantengewicht" Italian = "Cambia peso dell'arco" Romanian = "Modificã costul muchiei" Spanish = "Cambiar peso de arista" SwedishChef = "Chunge-a idge-a veeeght" }; "Change edge direction" = { Catalan = "Canviar direcció d'aresta" ChineseSimp = "改变边的方向" French = "Changer la direction de l'arc" German = "Ändere Kantenrichtung" Italian = "Cambia direzione arco" Romanian = "Modificã direcþia arcului" Spanish = "Cambiar dirección de arista" SwedishChef = "Chunge-a idge-a deerecshun" }; "Change edge weight and direction" = { Catalan = "Canviar pes i direcció d'aresta" ChineseSimp = "改变边的权值和方向" French = "Changer le poids et la direction de l'arc" German = "Ändere Kantengewicht und -richtung" Italian = "Cambia peso e direzione arco" Romanian = "Modificã costul ºi direcþia arcului" Spanish = "Cambiar peso y dirección de arista" SwedishChef = "Chunge-a idge-a veeeght und deerecshun" }; #------------------------- Error messages -------------------------# "At least one vertex must be selected to induce a subgraph." = { Catalan = "Per induir un subgraf, cal haver seleccionat un o més " "vèrtexs." ChineseSimp = "至少要选中一个顶点才可以作诱导子图。" French = "Pour induire un sous-graphe, vous devez sélectionner au" "moins un sommet." German = "Mindestens ein vertex muss ausgewählt sein um den Subgraph " "zu bewegen." Italian = "Per indurre un sottografo, di deve selezionare un vertice." Romanian = "Cel puþin un vârf trebuie selectat pentru a induce un subgraf." Spanish = "Para inducir un subgrafo, debe seleccionarse, como mínimo, " "un vértice." SwedishChef = "Et leest oone-a fertex moost be-a selected tu " "indooce-a a soobgreph." }; "Exactly one vertex must be selected to perform a Breadth-First Search." = { Catalan = "Per tal de fer una cerca per amplada cal sel·leccionar " "un sol vértex." ChineseSimp = "必须选中一个顶点才可以进行宽度优先搜索。" French = "Pour effectuer une recherche en largeur d'abord, un" "sommet exactement doit être sélectionné." German = "Für die Breitensuche muss genau ein Knoten ausgewählt sein." Italian = "Per effettuare una ricerca in ampiezza, si deve selezionare" " un solo vertice." Romanian = "Exact un vârf trebuie selectat pentru a cãuta " "în lãþime." Spanish = "Para efectuar una búsqueda por anchura hay que seleccionar " "un sólo vértice." SwedishChef = "Ixectly oone-a fertex moost be-a selected tu perffurm " "a Breedt-Furst Seerch." }; "Exactly one vertex must be selected to perform a Depth-First Search." = { Catalan = "Per tal de fer una cerca en profunditat cal " "sel·leccionar un sol vértex." ChineseSimp = "必须选中一个顶点才可以进行深度优先搜索。" French = "Pour effectuer une recherche en profondeur d'abord, un" "sommet exactement doit être sélectionné." German = "Für die Tiefensuche muss genau ein Knoten ausgewählt sein." Italian = "Per effettuare una ricerca in profondità, si deve " "selezionare un solo vertice." Romanian = "Exact un vârf trebuie selectat pentru a cãuta " "în adâncime." Spanish = "Para efectuar una búsqueda en profundidad hay que " "seleccionar un sólo vértice." SwedishChef = "Ixectly oone-a fertex moost be-a selected tu perffurm " "a Dept-Furst Seerch." }; "Exactly two vertices must be selected to find a shortest path." = { Catalan = "Per tal de cercar el camí més curt, cal que hi hagi " "dos vértexs sel·leccionats." ChineseSimp = "必须选中两个顶点才可以寻找最短路。" French = "Pour effectuer une recherche du plus court chemin," "deux sommets exactement doivent être sélectionnés." German = "Um den kürzesten Weg zu finden, müssen genau zwei " "Punkte ausgewählt sein." Italian = "Per trovare un cammino minimo, si devono selezionare" " due vertici." Romanian = "Exact douã vârfuri trebuie selectate pentru a cãuta cel " "mai scurt drum." Spanish = "Para buscar el camino más corto debe haber exactamante " "dos vértices seleccionados." SwedishChef = "Ixectly tvu ferteeces moost be-a selected tu feend a " "shurtest pet." }; "Exactly two vertices must be selected to find a maximum flow." = { Catalan = "Cal seleccionar exactament dos vèrtexs per trobar-ne" " el flux màxim." ChineseSimp = "必须选中两个顶点才可以寻找最大流。" French = "Pour trouver un flux maximal, deux sommets exactement" "doivent être sélectionnés." Italian = "Per trovare un flusso massimo, si devono selezionare" " due vertici." Romanian = "Exact douã vârfuri trebuie selectate pentru a cãuta" "fluxul maxim." Spanish = "Hay que seleccionar exactamente dos vértices para encontrar" " el flujo máximo." SwedishChef = "Ixectly tvu ferteeces moost be-a selected tu feend a " "mexeemoom floo." }; #------------------------- Miscellaneous -------------------------# # Stuff appearing in the statusbar (bottom of main area) "About GraphThing" = { Catalan = "Sobre de GraphThing" ChineseSimp = "关于 GraphThing" French = "À propos de GraphThing" German = "Über GraphThing" Italian = "Circa GraphThing" Romanian = "Despre GraphThing" Spanish = "Acerca de GraphThing" SwedishChef = "Ebuoot GrephTheeng" }; "Computing chromatic number..." = { Catalan = "Calculant número cromàtic..." ChineseSimp = "计算色数..." French = "Calcul du nombre chromatique..." German = "Berechne chromatische Zahl..." Italian = "Calcolando il numero cromatico..." Romanian = "Calculez numãrul cromatic..." Spanish = "Calculando número cromático..." SwedishChef = "Cumpooteeng chrumeteec noomber..." }; "Computing chromatic index..." = { Catalan = "Calculant l'índex cromàtic..." ChineseSimp = "计算色指数..." French = "Calcul de l'index chromatique..." German = "Berechnung des chromatischen index..." Italian = "Calcolando l'indice cromatico..." Romanian = "Calculez index-ul cromatic..." Spanish = "Calculando el índice cromático..." SwedishChef = "Cumpooteeng chrumeteec index..." }; "Computing chromatic polynomial..." = { Catalan = "Calculant polinomi cromàtic..." ChineseSimp = "计算色多项式..." French = "Calcul du polynome chromatique..." German = "Berechne chromatisches Polynom..." Italian = "Calcolando il polinomio cromatico..." Romanian = "Calculez polinomul cromatic..." Spanish = "Calculando polinomio cromático..." SwedishChef = "Cumpooteeng chrumeteec pulynumeeel..." }; "Determining diameter..." = { Catalan = "Calculando diàmetre..." ChineseSimp = "求出直径..." French = "Calcul du diamètre..." German = "Bestimme Durchmesser..." Italian = "Calcolando diametro..." Romanian = "Calculez diametrul..." Spanish = "Calculando diámetro..." SwedishChef = "Determeening deeemeter..." }; "Determining Eulericity..." = { Catalan = "Comprobant eulericitat..." ChineseSimp = "确定是否为欧拉图..." French = "Vérification de l'eulericité..." German = "Überprüfe, ob eulersch..." Italian = "Determinando l'Eulericità..." Romanian = "Determin Eulericitatea..." Spanish = "Comprobando eulericidad..." SwedishChef = "Determeening Ioolereecity..." }; "Determining radius..." = { Catalan = "Calculant radi..." ChineseSimp = "求出半径..." French = "Calcul du rayon..." German = "Bestimme Radius..." Italian = "Determinando il raggio..." Romanian = "Determin raza..." Spanish = "Calculando radio..." SwedishChef = "Determeening redeeoos..." }; "Finding shortest path..." = { Catalan = "Cercant camí més curt..." ChineseSimp = "找出最短路..." French = "Recherche du plus court chemin..." German = "Suche Kürzesten Weg..." Italian = "Cercando il cammino minimo..." Romanian = "Caut cel mai scurt drum..." Spanish = "Buscando camino más corto..." SwedishChef = "Feending shurtest pet..." }; "Performing BFS..." = { Catalan = "Cercant per amplada..." ChineseSimp = "进行宽度优先搜索..." French = "En cours : recherche en largeur d'abord..." German = "Durchsuche mit BFS..." Italian = "Ricerca in ampiezza..." Romanian = "Caut în lãþime..." Spanish = "Buscando por anchura..." SwedishChef = "Perffurmeeng BFS..." }; "Performing DFS..." = { Catalan = "Cercant en profunditat..." ChineseSimp = "进行深度优先搜索..." French = "En cours : recherche en profondeur d'abord..." German = "Durchsuche mit DFS..." Italian = "Ricerca in Profondità..." Romanian = "Caut în adâncime..." Spanish = "Buscando en profundidad..." SwedishChef = "Perffurmeeng DFS..." }; "Finding Minimum Spanning Tree..." = { Catalan = "Cercant arbre d'expansió mínim..." ChineseSimp = "寻找最小生成树..." French = "Recheche de l'enjambement d'arbre minimal..." German = "Suche minimalen spannenden Baum..." Italian = "Trova albero dei cammini minimo..." Romanian = "Caut arborele minim de acoperire..." Spanish = "Buscando árbol de expansión mínimo..." SwedishChef = "Feending Meenimoom Spunneeng Tree-a..." }; "Finding Maximum Flow..." = { Catalan = "Cercant flux màxim..." ChineseSimp = "寻找最大流..." French = "Calcul du flux maximal..." Italian = "Trova il Massimo Flusso..." Romanian = "Caut fluxul maxim..." Spanish = "Buscando flujo máximo..." SwedishChef = "Feending Mexeemoom Floo..." }; "Prefab" = "&Prefab" subst "&" / ""; "Prefab..." = "Prefab" + "..."; "Ready" = { Catalan = "Fet" ChineseSimp = "准备好了" French = "Prêt" German = "Fertig" Italian = "Pronto" Romanian = "Gata" Spanish = "Listo" SwedishChef = "Reedy" }; "Ready." = "Ready" + "."; "(Vertex Mode)" = "(" + "Vertex Mode" + ")"; "Vertex Mode" = { Catalan = "Mode Vèrtex" ChineseSimp = "顶点模式" French = "Mode sommet" German = "Vertex Modus" Italian = "Modalità Vertice" Romanian = "Mod Vârf" Spanish = "Modo Vértice" SwedishChef = "Fertex Mude-a" }; "(Edge Mode)" = "(" + "Edge Mode" + ")"; "Edge Mode" = { Catalan = "Mode Aresta" ChineseSimp = "边模式" French = "Mode arête" German = "Kanten Modus" Italian = "Modalità Arco" Romanian = "Mod Muchie" Spanish = "Modo Arista" SwedishChef = "Idge-a Mude-a" }; "Ready " = "Ready" + " "; "Ready (Vertex Mode)." = "Ready " + "(Vertex Mode)" + "."; "Ready (Edge Mode)." = "Ready " + "(Edge Mode)" + "."; "Change to Vertex Mode" = { Catalan = "Canviar a mode vèrtex" ChineseSimp = "转换到顶点模式" French = "Changer pour le mode sommet" German = "Wechsele in den Knoten Modus" Italian = "Cambia a Modalità Vertice" Romanian = "Schimbã în Mod Vârf" Spanish = "Cambiar a modo vértice" SwedishChef = "Chunge-a tu Fertex Mude-a" }; "Change to Edge Mode" = { Catalan = "Canviar a mode aresta" ChineseSimp = "转换到边模式" French = "Changer pour le mode arête" German = "Wechsele in den Vertex Modus" Italian = "Cambia a Modalità Arco" Romanian = "Schimbã în Mod Muchie" Spanish = "Cambiar a modo arista" SwedishChef = "Chunge-a tu Idge-a Mude-a" }; "Testing connectivity..." = { Catalan = "Comprovant si és connex..." ChineseSimp = "测试连通性..." French = "Test de connexité..." German = "Überprüfe Verbindung..." Italian = "Provando la convessità..." Romanian = "Testez conectivitatea..." Spanish = "Comprobando si es conexo..." SwedishChef = "Testeeng cunnecteefity..." }; #------------------------- Literals -------------------------# "." = literal; "..." = literal; " " = literal; " (" = literal; "(" = literal; ")" = literal; graphthing-1.3.2/src/polynomial.cc0000644000076500007650000001361310501136234017424 0ustar dsymondsdsymonds// // polynomial.cc // #include #include #include "math.h" #include "polynomial.h" Polynomial::PolynomialRep::PolynomialRep () { ref = 0; } Polynomial::PolynomialRep::PolynomialRep (const PolynomialRep *other) { ref = 0; data = other->data; } void Polynomial::minimise () { std::vector::iterator it; for (it = rep->data.end () - 1; it != rep->data.begin (); --it) if (*it) break; rep->data.erase (++it, rep->data.end ()); } void Polynomial::unref () { if (--rep->ref < 1) delete rep; } void Polynomial::mutator () { if (rep->ref < 2) return; const PolynomialRep *old = rep; unref (); rep = new PolynomialRep (old); ++rep->ref; } Polynomial::Polynomial () { rep = new PolynomialRep (); ++rep->ref; rep->data.push_back (0); } Polynomial::Polynomial (int x0) { rep = new PolynomialRep (); ++rep->ref; rep->data.push_back (x0); } Polynomial::Polynomial (int x1, int x0) { rep = new PolynomialRep (); ++rep->ref; rep->data.push_back (x0); rep->data.push_back (x1); minimise (); } Polynomial::Polynomial (int x2, int x1, int x0) { rep = new PolynomialRep (); ++rep->ref; rep->data.push_back (x0); rep->data.push_back (x1); rep->data.push_back (x2); minimise (); } Polynomial::Polynomial (int x3, int x2, int x1, int x0) { rep = new PolynomialRep (); ++rep->ref; rep->data.push_back (x0); rep->data.push_back (x1); rep->data.push_back (x2); rep->data.push_back (x3); minimise (); } Polynomial::Polynomial (int x4, int x3, int x2, int x1, int x0) { rep = new PolynomialRep (); ++rep->ref; rep->data.push_back (x0); rep->data.push_back (x1); rep->data.push_back (x2); rep->data.push_back (x3); rep->data.push_back (x4); minimise (); } Polynomial::Polynomial (int x5, int x4, int x3, int x2, int x1, int x0) { rep = new PolynomialRep (); ++rep->ref; rep->data.push_back (x0); rep->data.push_back (x1); rep->data.push_back (x2); rep->data.push_back (x3); rep->data.push_back (x4); rep->data.push_back (x5); minimise (); } Polynomial::Polynomial (const Polynomial &other) { rep = other.rep; ++rep->ref; } Polynomial::~Polynomial () { unref (); } unsigned int Polynomial::degree () const { return (rep->data.size () - 1); } int Polynomial::eval (int x) const { std::vector::reverse_iterator it; int val; val = 0; for (it = rep->data.rbegin (); it != rep->data.rend (); ++it) val = val * x + *it; return val; } Polynomial Polynomial::binomial (int n, unsigned int pow) { Polynomial p; int i, npow; npow = 1; for (i = (signed) pow; i >= 0; --i) { p[i] = Math::choose (pow, i) * npow; npow *= n; } return p; } const int &Polynomial::operator[] (unsigned int pow) const { // TODO: throw exception on out-of-bounds // if (degree () < pow) // return 0; return rep->data[pow]; } int &Polynomial::operator[] (unsigned int pow) { mutator (); if (degree () < pow) rep->data.resize (pow + 1); return rep->data[pow]; } int Polynomial::operator() (int x) const { return eval (x); } Polynomial &Polynomial::operator= (const Polynomial &other) { if (this == &other) return *this; rep = other.rep; ++rep->ref; return *this; } wxString Polynomial::str () const { wxString s; std::vector::reverse_iterator it; int pow, val; bool sp; pow = rep->data.size (); sp = false; for (it = rep->data.rbegin (); it != rep->data.rend (); ++it) { --pow; val = *it; if (!val) continue; if (sp && (val > 0)) s << wxT(" + "); else if (sp && (val < 0)) { s << wxT(" - "); val = -val; } if ((val != 1) || (pow == 0)) s << val; if (pow > 1) { s << wxT("x^") << pow; } else if (pow == 1) s << wxT("x"); sp = true; } if (!sp) s << wxT("0"); return s; } std::ostream &operator<< (std::ostream &o, const Polynomial &p) { std::vector::reverse_iterator it; int pow, val; bool sp; pow = p.rep->data.size (); sp = false; for (it = p.rep->data.rbegin (); it != p.rep->data.rend (); ++it) { --pow; val = *it; if (!val) continue; if (sp && (val > 0)) o << " + "; else if (sp && (val < 0)) { o << " - "; val = -val; } if ((val != 1) || (pow == 0)) o << val; if (pow > 1) { o << "x^" << pow; } else if (pow == 1) o << 'x'; sp = true; } if (!sp) o << '0'; return o; } bool operator== (const Polynomial &p1, const Polynomial &p2) { if (p1.rep == p2.rep) return true; if (p1.degree () != p2.degree ()) return false; if (!(p1.rep->data == p2.rep->data)) return false; return true; } void Polynomial::operator+= (const Polynomial &other) { int d1, d2, i; mutator (); d1 = degree (); d2 = other.degree (); if (d1 > d2) { for (i = 0; i <= d2; ++i) (*this) [i] += other[i]; } else { rep->data.reserve (d2 + 1); for (i = 0; i <= d1; ++i) (*this) [i] += other[i]; for (; i <= d2; ++i) (*this) [i] = other[i]; } minimise (); } Polynomial Polynomial::operator+ (const Polynomial &other) const { Polynomial ret (*this); ret += other; return ret; } void Polynomial::operator-= (const Polynomial &other) { int d1, d2, i; mutator (); d1 = degree (); d2 = other.degree (); if (d1 > d2) { for (i = 0; i <= d2; ++i) rep->data[i] -= other[i]; } else { rep->data.reserve (d2 + 1); for (i = 0; i <= d1; ++i) rep->data[i] -= other[i]; for (; i <= d2; ++i) rep->data[i] = -other[i]; } minimise (); } Polynomial Polynomial::operator- (const Polynomial &other) const { Polynomial ret (*this); ret -= other; return ret; } void Polynomial::operator*= (const Polynomial &other) { Polynomial wk; int i, j, d1, d2, dmax; d1 = degree (); d2 = other.degree (); dmax = (d1 > d2) ? d1 : d2; // Operand scanning method for (i = dmax; i >= 0; --i) wk[i] = 0; for (i = 0; i <= d1; ++i) for (j = 0; j <= d2; ++j) wk[i+j] += rep->data[i] * other[j]; unref (); rep = wk.rep; ++rep->ref; minimise (); } Polynomial Polynomial::operator* (const Polynomial &other) const { Polynomial ret (*this); ret *= other; return ret; } graphthing-1.3.2/src/polynomial.h0000644000076500007650000000274610501136234017273 0ustar dsymondsdsymonds// // polynomial.h // #ifndef __POLYNOMIAL_H__ #define __POLYNOMIAL_H__ #include "wx/string.h" #include #include class Polynomial { private: class PolynomialRep { public: std::vector data; unsigned int ref; PolynomialRep (); PolynomialRep (const PolynomialRep *other); }; PolynomialRep *rep; void minimise (); void unref (); void mutator (); public: Polynomial (); Polynomial (int x0); Polynomial (int x1, int x0); Polynomial (int x2, int x1, int x0); Polynomial (int x3, int x2, int x1, int x0); Polynomial (int x4, int x3, int x2, int x1, int x0); Polynomial (int x5, int x4, int x3, int x2, int x1, int x0); Polynomial (const Polynomial &other); ~Polynomial (); unsigned int degree () const; int eval (int x) const; static Polynomial binomial (int n, unsigned int pow); const int &operator[] (unsigned int pow) const; int &operator[] (unsigned int pow); int operator() (int x) const; Polynomial &operator= (const Polynomial &other); wxString str () const; friend std::ostream &operator<< (std::ostream &o, const Polynomial &p); friend bool operator== (const Polynomial &p1, const Polynomial &p2); void operator+= (const Polynomial &other); Polynomial operator+ (const Polynomial &other) const; void operator-= (const Polynomial &other); Polynomial operator- (const Polynomial &other) const; void operator*= (const Polynomial &other); Polynomial operator* (const Polynomial &other) const; }; #endif // __POLYNOMIAL_H__ graphthing-1.3.2/src/run_with_valgrind.sh0000755000076500007650000000023410501136234021011 0ustar dsymondsdsymonds#! /bin/bash OUTPUT="valgrind.log" echo "Running with valgrind, output to \"$OUTPUT\"..." valgrind -v --leak-check=yes --num-callers=8 \ ./gt 2> $OUTPUT graphthing-1.3.2/src/tut2-7.gt0000644000076500007650000000112610501136234016324 0ustar dsymondsdsymondsinfo { } vertex "A" at (12,147) vertex "B" at (76,146) vertex "C" at (132,90) vertex "D" at (130,146) vertex "E" at (130,205) vertex "F" at (199,144) vertex "G" at (259,144) vertex "H" at (320,71) vertex "I" at (404,71) vertex "J" at (404,142) vertex "K" at (402,214) vertex "L" at (318,214) edge "A" -- "C" edge "A" -- "E" edge "B" -- "C" edge "B" -- "E" edge "C" -- "D" edge "C" -- "F" edge "D" -- "E" edge "E" -- "F" edge "F" -- "G" edge "G" -- "H" edge "G" -- "J" edge "G" -- "L" edge "H" -- "I" edge "H" -- "J" edge "H" -- "L" edge "I" -- "J" edge "J" -- "K" edge "J" -- "L" edge "K" -- "L" graphthing-1.3.2/src/tut3-1.gt0000644000076500007650000000112010501136234016311 0ustar dsymondsdsymondsinfo { } vertex "K" at (204,130) vertex "J" at (227,168) vertex "I" at (181,167) vertex "H" at (164,120) vertex "G" at (241,121) vertex "F" at (206,91) vertex "E" at (76,106) vertex "D" at (128,244) vertex "C" at (264,246) vertex "B" at (339,108) vertex "A" at (205,22) edge "B" -- "F" edge "E" -- "I" edge "D" -- "J" edge "C" -- "G" edge "A" -- "H" edge "D" -- "H" edge "C" -- "I" edge "B" -- "J" edge "A" -- "G" edge "E" -- "F" edge "H" -- "K" edge "I" -- "K" edge "J" -- "K" edge "G" -- "K" edge "F" -- "K" edge "A" -- "E" edge "D" -- "E" edge "C" -- "D" edge "B" -- "C" edge "A" -- "B" graphthing-1.3.2/src/tut3-5.gt0000644000076500007650000000150710501136234016326 0ustar dsymondsdsymondsinfo { } vertex "Z" at (427,136) vertex "I" at (290,235) vertex "H" at (290,169) vertex "G" at (290,104) vertex "F" at (290,44) vertex "E" at (144,235) vertex "D" at (144,169) vertex "C" at (144,106) vertex "B" at (146,46) vertex "A" at (17,137) edge "E" -- "H" with weight 6 edge "C" -- "H" edge "C" -- "F" edge "F" -- "G" with weight 2 edge "G" -- "H" with weight 5 edge "H" -- "I" with weight 3 edge "D" -- "E" with weight 2 edge "C" -- "D" with weight 4 edge "B" -- "C" with weight 10 edge "B" -- "F" with weight 10 edge "C" -- "G" with weight 4 edge "D" -- "H" with weight 3 edge "E" -- "I" with weight 8 edge "I" -- "Z" with weight 5 edge "H" -- "Z" with weight 8 edge "G" -- "Z" with weight 2 edge "F" -- "Z" with weight 5 edge "A" -- "E" with weight 3 edge "A" -- "D" with weight 6 edge "A" -- "C" with weight 10 edge "A" -- "B" graphthing-1.3.2/src/undo.cc0000644000076500007650000000164110501136234016204 0ustar dsymondsdsymonds// // undo.cc // #include "wx/string.h" #include "graph.h" #include "undo.h" UndoStep::UndoStep (Graph *graph, const wxString desc) : original_graph (graph), description (desc) { } UndoStep::UndoStep (const UndoStep &other) : original_graph (other.original_graph), description (other.description) { } UndoStep::~UndoStep () { } Graph *UndoStep::getGraph () const { return original_graph; } const wxString UndoStep::getMessage () const { return description; } UndoStack::UndoStack () { } UndoStack::~UndoStack () { while (!empty ()) delete pop ().getGraph (); } bool UndoStack::empty () const { return undos.empty (); } unsigned int UndoStack::size () const { return undos.size (); } const UndoStep &UndoStack::top () const { return undos.top (); } void UndoStack::push (UndoStep &step) { undos.push (step); } UndoStep &UndoStack::pop () { UndoStep &step = undos.top (); undos.pop (); return step; } graphthing-1.3.2/src/undo.h0000644000076500007650000000115510501136234016046 0ustar dsymondsdsymonds// // undo.h // #ifndef __UNDO_H__ #define __UNDO_H__ #include "wx/string.h" #include class Graph; class UndoStep { private: Graph *original_graph; const wxString description; public: UndoStep (Graph *graph, const wxString desc); UndoStep (const UndoStep &other); ~UndoStep (); Graph *getGraph () const; const wxString getMessage () const; }; class UndoStack { private: std::stack undos; public: UndoStack (); ~UndoStack (); bool empty () const; unsigned int size () const; const UndoStep &top () const; void push (UndoStep &step); UndoStep &pop (); }; #endif // __UNDO_H__ graphthing-1.3.2/src/uniq3col.gt0000644000076500007650000000133210501136234017016 0ustar dsymondsdsymondsinfo { comment = "A triangle-free uniquely 3-colourable graph" creator = "GraphThing 1.1" } vertex "A" at (149,35) vertex "B" at (200,36) vertex "C" at (246,87) vertex "D" at (245,143) vertex "E" at (198,191) vertex "F" at (145,191) vertex "H" at (101,86) vertex "J" at (21,98) vertex "K" at (334,110) vertex "L" at (142,265) vertex "M" at (205,264) vertex "G" at (102,138) edge "A" -- "B" edge "B" -- "C" edge "C" -- "D" edge "D" -- "E" edge "E" -- "F" edge "H" -- "A" edge "G" -- "F" edge "G" -- "H" edge "A" -- "J" edge "J" -- "G" edge "G" -- "L" edge "L" -- "E" edge "J" -- "M" edge "L" -- "K" edge "M" -- "D" edge "M" -- "F" edge "B" -- "K" edge "K" -- "D" edge "H" -- "D" edge "G" -- "C" edge "B" -- "F" edge "E" -- "A" graphthing-1.3.2/src/unit_test.cc0000644000076500007650000001465010501136234017261 0ustar dsymondsdsymonds// // unit_test.cc // #include #include #include "edge.h" #include "factory.h" #include "graph.h" #include "polynomial.h" #include "matrix.h" #include "vertex.h" // Kludge -- fixes linking error, since I don't want to include parsing #include std::fstream *yy_gt_fs; int yy_gt_parse (void) { return 0; } int yy_gt_debug; Graph *new_graph; void setProgress (double frac) { } int tests = 0, errors = 0; int subtests = 0; char *test_name; #define TEST_FAIL \ std::cerr << "\n\t* Failure at line " << __LINE__ << '\n' #define TEST(test) \ ++subtests; \ if (!(test)) { \ ++errors; TEST_FAIL; \ std::cerr << "\t\t(" #test ")\n"; \ } else { \ std::cerr << "."; \ } #define TEST1(test,param) \ ++subtests; \ if (!(test)) { \ ++errors; TEST_FAIL; \ std::cerr << "\t\t(" #test "), " << param << "\n"; \ } else { \ std::cerr << "."; \ } #define START_TEST(name) \ ++tests; \ test_name = (name); \ std::cerr << "Running test " << tests << ": '" << test_name \ << "': " #define END_TEST(name) \ std::cerr << "\n"; void test_Polynomials () { Polynomial p1 (7, 2, -3, 4), p2 (4, 0, 6, 0); TEST ((p1[0] == 4) && (p2[3] == 4)); TEST (p1.degree () == 3); TEST ((p1.eval (-1) == 2) && (p2 (3) == 126)); TEST ((p1 + p2) == Polynomial (11, 2, 3, 4)); TEST ((p1 - p2) == Polynomial (3, 2, -9, 4)); TEST ((p1 * p2).degree () == 6); TEST ((p1 * p2) (5) == 484420); } void test_Matrices () { Matrix m (2, 2), n (2, 2), o (2, 2); m (0, 0) = 1; m (0, 1) = 2; m (1, 0) = 3; m (1, 1) = 4; n (0, 0) = 5; n (0, 1) = 7; n (1, 0) = 8; n (1, 1) = 6; o (0, 0) = 6; o (0, 1) = 9; o (1, 0) = 11; o (1, 1) = 10; TEST (m (0, 1) == 2); TEST (n (1, 0) == 8); TEST ((m + n) == o); o (0, 0) = -4; o (0, 1) = -5; o (1, 0) = -5; o (1, 1) = -2; TEST ((m - n) == o); o (0, 0) = 6; o (0, 1) = 9; o (1, 0) = 11; o (1, 1) = 10; Matrix mn = m * n; TEST (mn (0, 0) == 21); TEST (mn (0, 1) == 19); TEST (mn (1, 0) == 47); TEST (mn (1, 1) == 45); Matrix no = n * o; TEST (no (0, 0) == 107); TEST (no (0, 1) == 115); TEST (no (1, 0) == 114); TEST (no (1, 1) == 132); Matrix onm = o * n * m; TEST (onm (0, 0) == 390); TEST (onm (0, 1) == 588); TEST (onm (1, 0) == 546); TEST (onm (1, 1) == 818); Matrix r (4, 4); r (0, 0) = 2; r (0, 1) = 6; r (0, 2) = -3; r (0, 3) = 7; r (1, 0) = -4; r (1, 1) = 3; r (1, 2) = 2; r (1, 3) = 4; r (2, 0) = 0; r (2, 1) = -6; r (2, 2) = 1; r (2, 3) = -2; r (3, 0) = 1; r (3, 1) = 8; r (3, 2) = 0; r (3, 3) = -9; std::vector m_powers; m_powers.push_back (r); for (int i = 1; i < 8; ++i) m_powers.push_back (m_powers[i - 1] * r); Matrix t (4, 4); t (0, 0) = 26133615; t (0, 1) = 82601560; t (0, 2) = -5961481; t (0, 3) = -128891807; t (1, 0) = 19529336; t (1, 1) = 64384673; t (1, 2) = 2412896; t (1, 3) = -141162224; t (2, 0) = 4231758; t (2, 1) = -11702652; t (2, 2) = -868391; t (2, 3) = -7138728; t (3, 0) = -80539827; t (3, 1) = -168196902; t (3, 2) = 10811601; t (3, 3) = 395518792; TEST (m_powers[7] == t); } void test_Graph () { Graph *g = new Graph; g->add (new Vertex ("A", 20, 30)); g->add (new Vertex ("B", 50, 20)); g->add (new Vertex ("Charlie", 200, 80)); g->add (new Vertex ("D", 40, 50)); TEST (g->find ("A")) TEST (g->find ("B")) TEST (g->find ("Charlie")) //TEST (g->find (48, 22) == g->find ("B")) TEST (!g->find ("A-dup")) TEST (!g->find ("C")) TEST (g->find ("D")) g->remove (g->find ("D")); TEST (!g->find ("D")) TEST (!g->are_adjacent (g->find ("A"), g->find ("B"))); g->add (new Edge (g->find ("A"), g->find ("B"))); TEST (g->are_adjacent (g->find ("A"), g->find ("B"))); g->remove (*(g->find ("A")->e_begin ())); TEST (!g->are_adjacent (g->find ("A"), g->find ("B"))); delete g; } void test_Chromatic () { const static int MAX_TREE = 7, MAX_CYCLE = MAX_TREE; Graph *g; // Set up basics Polynomial T[MAX_TREE + 1]; T[1] = Polynomial (1, 0); for (int i = 2; i <= MAX_TREE; ++i) T[i] = T[i - 1] * Polynomial (1, -1); Polynomial C[MAX_CYCLE + 1]; C[3] = Polynomial (1, -3, 2, 0); for (int i = 4; i <= MAX_CYCLE; ++i) C[i] = T[i] - C[i - 1]; // Base cases for (int i = 1; i < 5; ++i) { g = Factory::N (1); TEST1 (g->chromatic_number () == 1, "i = " << i) delete g; } // Cyclic graphs for (int i = 3; i <= MAX_CYCLE; ++i) { g = Factory::C (i); TEST1 (g->chromatic_number () == ((i % 2) + 2), "i = " << 1); TEST1 (g->chromatic_polynomial () == C[i], "i = " << i); delete g; } // Wheel graphs g = Factory::W (5); TEST (g->chromatic_polynomial () == C[3] * Polynomial (1, -5, 7)); delete g; g = Factory::W (6); TEST (g->chromatic_polynomial () == C[3] * Polynomial (1, -3) * Polynomial (1, -4, 5)); delete g; // Other graphs g = Factory::Cubical (); { Polynomial p (-11, 55, -159, 282, -290, 133); p[6] = 1; TEST (g->chromatic_polynomial () == p * Polynomial (1, -1, 0)); } delete g; g = Factory::Lattice (4, 4); { int coeff[16] = { -17493, 112275, -346274, 682349, -960627, 1022204, -848056, 557782, -292883, 122662, -40614, 10437, -2015, 276, -24, 1 }; Polynomial p (0); for (int i = 0; i < 16; ++i) p[i + 1] = coeff[i]; TEST (g->chromatic_polynomial () == p); } delete g; g = Factory::Petersen (); { int coeff[10] = { -704, 2606, -4305, 4275, -2861, 1353, -455, 105, -15, 1 }; Polynomial p (0); for (int i = 0; i < 10; ++i) p[i + 1] = coeff[i]; TEST (g->chromatic_polynomial () == p); } } int main () { std::cerr << "-----------------------------\n"; std::cerr << " GraphThing unit testing\n"; std::cerr << "-----------------------------\n"; //*************** START OF TESTS **************** //********************************************* START_TEST ("Polynomials"); test_Polynomials (); END_TEST ("Polynomials"); //********************************************* START_TEST ("Matrices"); test_Matrices (); END_TEST ("Matrices"); //********************************************* START_TEST ("Graph manipulation"); test_Graph (); END_TEST ("Graph manipulation"); //********************************************* START_TEST ("Chromatic polynomials"); test_Chromatic (); END_TEST ("Chromatic polynomials"); //*************** END OF TESTS **************** std::cerr << "\n"; std::cerr << "-----------------------------\n"; std::cerr << "Total tests: " << tests << '\n'; std::cerr << " Errors: " << errors << '\n'; std::cerr << '\n'; std::cerr << " (Subtests: " << subtests << ")\n"; std::cerr << "-----------------------------\n"; return 0; } graphthing-1.3.2/src/vertex.cc0000644000076500007650000000355110501136234016556 0ustar dsymondsdsymonds// // vertex.cc // #include "wx/string.h" #include #include "edge.h" #include "vertex.h" Vertex::Vertex (wxString &lbl, int _x, int _y) : label (lbl), x (_x), y (_y), selected (false), next (0) { } Vertex::Vertex (char *lbl, int _x, int _y) : label (wxString (lbl, wxConvUTF8)), x (_x), y (_y), selected (false), next (0) { } Vertex::Vertex (const Vertex &other) : label (other.label), x (other.x), y (other.y), selected (false), next (0) { } unsigned int Vertex::degree () const { return edges.size (); } unsigned int Vertex::indegree () const { e_const_iterator eit; int cnt = 0; for (eit = e_begin (); eit != e_end (); ++eit) if ((*eit)->directed && ((*eit)->w == this)) ++cnt; return cnt; } unsigned int Vertex::outdegree () const { e_const_iterator eit; int cnt = 0; for (eit = e_begin (); eit != e_end (); ++eit) if ((*eit)->directed && ((*eit)->v == this)) ++cnt; return cnt; } Vertex *Vertex::opposite (const Edge *e) const { return (e->v == this) ? e->w : e->v; } Vertex::e_iterator Vertex::e_begin () { return edges.begin (); } Vertex::e_iterator Vertex::e_end () { return edges.end (); } Vertex::e_const_iterator Vertex::e_begin () const { return edges.begin (); } Vertex::e_const_iterator Vertex::e_end () const { return edges.end (); } void Vertex::hook (Edge *e) { edges.push_back (e); } void Vertex::unhook (Edge *e) { e_iterator eit; for (eit = e_begin (); eit != e_end (); ++eit) if (*eit == e) break; if (eit == e_end ()) return; // fail silently edges.erase (eit); } Vertex &Vertex::operator= (const Vertex &other) { if (this == &other) return *this; label = other.label; x = other.x; y = other.y; return *this; } std::ostream &operator<< (std::ostream &o, const Vertex &v) { return (o << "vertex \"" << v.label.mb_str (wxConvUTF8) << "\" at (" << v.x << ',' << v.y << ")\n"); } graphthing-1.3.2/src/vertex.h0000644000076500007650000000203310501136234016412 0ustar dsymondsdsymonds// // vertex.h // #ifndef __VERTEX_H__ #define __VERTEX_H__ #include "wx/string.h" #include #include class Edge; class Vertex { private: std::vector edges; // Edges adjacent to this vertex public: typedef std::vector::iterator e_iterator; typedef std::vector::const_iterator e_const_iterator; wxString label; int x; int y; bool selected; int selection_colour; Vertex *next; long mark; Vertex *map_to; // speed up for graph cloning Vertex (wxString &lbl, int _x, int _y); Vertex (char *lbl, int _x, int _y); Vertex (const Vertex &other); unsigned int degree () const; unsigned int indegree () const; unsigned int outdegree () const; Vertex *opposite (const Edge *e) const; e_iterator e_begin (); e_iterator e_end (); e_const_iterator e_begin () const; e_const_iterator e_end () const; void hook (Edge *e); void unhook (Edge *e); Vertex &operator= (const Vertex &other); friend std::ostream &operator<< (std::ostream &o, const Vertex &v); }; #endif // __VERTEX_H__ graphthing-1.3.2/src/vertex_mode.xpm0000644000076500007650000000175310501136234020003 0ustar dsymondsdsymonds/* XPM */ static char * vertex_mode_xpm[] = { "20 20 31 1", " c None", ". c #FFFFFF", "+ c #FFE3E3", "@ c #FFDFDF", "# c #FFF7F7", "$ c #FFBFBF", "% c #FF1010", "& c #FF0000", "* c #FF7070", "= c #FF0404", "- c #FF8F8F", "; c #FF8080", "> c #CF5050", ", c #F3F3F3", "' c #D30000", ") c #200000", "! c #606060", "~ c #DF7070", "{ c #7F0000", "] c #AF3030", "^ c #8F7070", "/ c #000000", "( c #505050", "_ c #BFBFBF", ": c #FBFBFB", "< c #8F8F8F", "[ c #080808", "} c #5C5C5C", "| c #EFEFEF", "1 c #838383", "2 c #9B9B9B", "....................", "...+@@#.............", "..$%&&*.............", ".+%&&&=-............", ".@&&&&&;............", ".@&&&&&>,...........", ".#*=&&')!,..........", "...~{]^//(..........", "..._/!:<[/}|........", "..._/!..1//}........", "..._/!...2//(,......", "..._/!....1[/!,.....", "..._/!...... * More output formats: - EPS (for LaTeX insertion) - GraphBase - xfig - JPEG/PNG, etc. * Editing of adjacency matrix * General appearance settings - fonts (size, face, etc.) - background colour * Moving entire graph around page (e.g. w/ Ctrl key) * Proper installer for Windows - NSIS (http://nsis.sf.net)? * Mac port: - Old version of bison! (Makes *.tab.cc.h instead of *.tab.hh) * Pretty polynomial/matrix displays * Accelerators for various things - switching modes (space bar: but how to toggle toolbar btns?) * "Factorised" forms for chromatic polynomials * Help system * Quick overview of common statistics * Non-integer and negative edge weights * Graph layout algorithms - internalize some? + spring embedding - call out to tools like dot/neato - simple zoom-to-fit * Digraphs - double arcs: (two directed edges between vertex pair) + fix cycling with right-click + fix text attachment positioning + fix spline sizing - More network flow stuff - Q: in a digraph with an undirected edge, can it be traversed twice in an Eulerian cycle? * Combinatorial stuff: - automorphism group (integration with 'nauty'?) - Cycle index polynomial * Have undo dialog for multiple simultaneous undos, with descriptions * Multigraphs - curved edges (4-point bezier curves?) - loops - need to do a complete code audit! * More comprehensive testing * Poset stuff: - determine if a Hasse diagram - spit out minimal ordering * Travelling salesman problem (and other standard NP-hard problems)