calcoo-1.3.18/0000777000175000017500000000000010661637161010060 500000000000000calcoo-1.3.18/README0000644000175000017500000001341410646166242010657 00000000000000Calcoo - Scientific calculator (GTK+) Copyright (C) 2001 - 2007 Alexei Kaminski TABLE OF CONTENTS ***************** 1. What is Calcoo? 2. License 3. Installation 4. Source 5. Bugs and bug reports 6. Apologies 1. What is Calcoo? ------------------ Calcoo is a scientific calculator designed to provide maximum usability. The features that make Calcoo better than (at least some) other calculator programs are: * Bitmapped button labels and display digits to improve readability. * No double-function buttons. As the result, you need to click only one button for any operation (except for arc-hyp trigonometric functions). * Undo/redo buttons. * Copy/paste interaction with X the clipboard. * Both RPN (reverse Polish notation) and algebraic modes are available * Tick marks to separate thousands. * Two memory registers with displays. * Displays for Y, Z, and T registers. * It is a purely scientific calculator. There are no buttons for the hexadecimal digits (ABCDEF) and logical operations, which take space and distract from "scientific" buttons. Features that Calcoo lacks: * Statistical mode. Use some other program for it; it is hard to imagine any program less suitable for statistical processing of data than a calculator emulator. * HEX mode. Scientific and and hexadecimal operations are hardly compatible. Has anyone ever calculated sin(FF)? Or Pi AND Sqrt(5)? If I create a HEX calculator on the base of Calcoo, it will be a separate program. 2. License ---------- 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 3. Installation --------------- To begin with, you may wish to change something in the file defaults.h. It is perfectly Ok to leave it as it is, though. For the brave and impatient: ./configure --prefix= make make install The only file of Calcoo's binary, "calcoo", will be put in /bin/. If the "--prefix" part is omitted, it will be /usr/local/bin (you probably have to be root to do it). If you want to install Calcoo in your home directory, use --prefix=$HOME ; Calcoo will be put into $HOME/bin/ then. If the compilation works to the end, but the installation fails for some reason, just copy the executable file src/calcoo (it is the only file calcoo needs for work) to some directory from your $PATH). On FreeBSD, file "gtk-config" used by the configure script may be "gtk12-config". If configure reports absense of "gtk-config" and you do have gtk1.2 installed, create a symlink. For the patient: Look into INSTALL file. For the experienced: There is nothing non-standard in INSTALL. The installation scripts are produced by standard manipulations with autoconf and automake. 4. Source --------- Calcoo is written in C. It uses GTK+ widget library, version 2.x. The homepage of Calcoo project is located at http://calcoo.sourceforge.net/. Now about the source itself. I wanted to make it portable to other libraries, so I tried to reduce the explicit use of glib, and to localize the use of GTK+ functions and types. As the result, the Calcoo source has the following structure: The front-end (widgets) and back-end (engine) are separated. The names of the files related to front-end begin with "b_": b_accel.c b_layout.c b_displays.c b_buttons.c b_info.c b_settings.c b_pixmaps.c The headers of the functions defined in these files (except for "b_accel.c") are in "b_headers.h" The file "body.h" defines the type t_calcoo_body, which is the structure, which holds all its widgets. The file "gtkaux.c" defines a couple of auxiliary functions operating with gtk widgets (the headers are in "gtkaux_headers.h"). The file "b_accel_headers.h" defines headers for b_accel.c, they are separated since they mention GTK structures which were not to be mentioned in "b_headers.h" The front-end sends signals to the back-end by calling the functions defined in "input.c". The file "output.c" transmits signals from the back-end to the front-end. The file "io_headers.h" holds the headers of these functions. The functions from "input.c" call the functions of the back-end, which are defined in files with the names beginning with "c_": c_input.c c_output.c c_mem.c c_op.c c_main.c c_undo.c Their headers are in "c_headers.h". The file "cpu.h" defines the type "t_calcoo_cpu", which is the structure, which holds all information about the internal state of the calculator. The file "aux.c" defines some auxiliary functions, like the calculation of the factorial; their headers are in "aux_headers.h" 5. Bugs and bug reports ----------------------- Calcoo has no bugs I know about. If you find any, please report them to alexei.kaminski@gmail.com. 6. Apologies ------------ Calcoo was originally written for GTK+ 1.2. When I decided to port it to GTK+ 2.x, I had much less free time than when I was writing it originally. Therefore, only the things which broke after the transition to GTK+ 2.x, are (re)written according to the new standards, the things that worked are left as they were. As the result, you can see this weird mixture of gtk_signal_connect and g_signal_connect. Yes, I know it is ugly; no, I do not have time to fix it. It works, it is good enough. calcoo-1.3.18/AUTHORS0000644000175000017500000000012510646165452011044 00000000000000Calcoo -- Scientific calculator Author: Alexei Kaminski calcoo-1.3.18/aclocal.m40000644000175000017500000011472510661637055011650 00000000000000# generated automatically by aclocal 1.10 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_if(m4_PACKAGE_VERSION, [2.61],, [m4_fatal([this file was generated for autoconf 2.61. You have another version of autoconf. If you want to use that, you should regenerate the build system entirely.], [63])]) # Configure paths for GTK+ # Owen Taylor 1997-2001 dnl AM_PATH_GTK_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]]) dnl Test for GTK+, and define GTK_CFLAGS and GTK_LIBS, if gthread is specified in MODULES, dnl pass to pkg-config dnl AC_DEFUN([AM_PATH_GTK_2_0], [dnl dnl Get the cflags and libraries from pkg-config dnl AC_ARG_ENABLE(gtktest, [ --disable-gtktest do not try to compile and run a test GTK+ program], , enable_gtktest=yes) pkg_config_args=gtk+-2.0 for module in . $4 do case "$module" in gthread) pkg_config_args="$pkg_config_args gthread-2.0" ;; esac done no_gtk="" AC_PATH_PROG(PKG_CONFIG, pkg-config, no) if test x$PKG_CONFIG != xno ; then if pkg-config --atleast-pkgconfig-version 0.7 ; then : else echo "*** pkg-config too old; version 0.7 or better required." no_gtk=yes PKG_CONFIG=no fi else no_gtk=yes fi min_gtk_version=ifelse([$1], ,2.0.0,$1) AC_MSG_CHECKING(for GTK+ - version >= $min_gtk_version) if test x$PKG_CONFIG != xno ; then ## don't try to run the test against uninstalled libtool libs if $PKG_CONFIG --uninstalled $pkg_config_args; then echo "Will use uninstalled version of GTK+ found in PKG_CONFIG_PATH" enable_gtktest=no fi if $PKG_CONFIG --atleast-version $min_gtk_version $pkg_config_args; then : else no_gtk=yes fi fi if test x"$no_gtk" = x ; then GTK_CFLAGS=`$PKG_CONFIG $pkg_config_args --cflags` GTK_LIBS=`$PKG_CONFIG $pkg_config_args --libs` gtk_config_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` gtk_config_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` gtk_config_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` if test "x$enable_gtktest" = "xyes" ; then ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$GTK_LIBS $LIBS" dnl dnl Now check if the installed GTK+ is sufficiently new. (Also sanity dnl checks the results of pkg-config to some extent) dnl rm -f conf.gtktest AC_TRY_RUN([ #include #include #include int main () { int major, minor, micro; char *tmp_version; system ("touch conf.gtktest"); /* HP/UX 9 (%@#!) writes to sscanf strings */ tmp_version = g_strdup("$min_gtk_version"); if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { printf("%s, bad version string\n", "$min_gtk_version"); exit(1); } if ((gtk_major_version != $gtk_config_major_version) || (gtk_minor_version != $gtk_config_minor_version) || (gtk_micro_version != $gtk_config_micro_version)) { printf("\n*** 'pkg-config --modversion gtk+-2.0' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version, gtk_major_version, gtk_minor_version, gtk_micro_version); printf ("*** was found! If pkg-config was correct, then it is best\n"); printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n"); printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); printf("*** required on your system.\n"); printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n"); printf("*** to point to the correct configuration files\n"); } else if ((gtk_major_version != GTK_MAJOR_VERSION) || (gtk_minor_version != GTK_MINOR_VERSION) || (gtk_micro_version != GTK_MICRO_VERSION)) { printf("*** GTK+ header files (version %d.%d.%d) do not match\n", GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION); printf("*** library (version %d.%d.%d)\n", gtk_major_version, gtk_minor_version, gtk_micro_version); } else { if ((gtk_major_version > major) || ((gtk_major_version == major) && (gtk_minor_version > minor)) || ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro))) { return 0; } else { printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n", gtk_major_version, gtk_minor_version, gtk_micro_version); printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n", major, minor, micro); printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n"); printf("***\n"); printf("*** If you have already installed a sufficiently new version, this error\n"); printf("*** probably means that the wrong copy of the pkg-config shell script is\n"); printf("*** being found. The easiest way to fix this is to remove the old version\n"); printf("*** of GTK+, but you can also set the PKG_CONFIG environment to point to the\n"); printf("*** correct copy of pkg-config. (In this case, you will have to\n"); printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); printf("*** so that the correct libraries are found at run-time))\n"); } } return 1; } ],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi if test "x$no_gtk" = x ; then AC_MSG_RESULT(yes (version $gtk_config_major_version.$gtk_config_minor_version.$gtk_config_micro_version)) ifelse([$2], , :, [$2]) else AC_MSG_RESULT(no) if test "$PKG_CONFIG" = "no" ; then echo "*** A new enough version of pkg-config was not found." echo "*** See http://pkgconfig.sourceforge.net" else if test -f conf.gtktest ; then : else echo "*** Could not run GTK+ test program, checking why..." ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$LIBS $GTK_LIBS" AC_TRY_LINK([ #include #include ], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ], [ echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding GTK+ or finding the wrong" echo "*** version of GTK+. If it is not finding GTK+, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ], [ echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occured. This usually means GTK+ is incorrectly installed."]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi GTK_CFLAGS="" GTK_LIBS="" ifelse([$3], , :, [$3]) fi AC_SUBST(GTK_CFLAGS) AC_SUBST(GTK_LIBS) rm -f conf.gtktest ]) # Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.10' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.10], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.10])dnl _AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 8 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 9 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], UPC, [depcc="$UPC" am_compiler_list=], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. #serial 3 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 12 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.60])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AM_PROG_INSTALL_SH AM_PROG_INSTALL_STRIP AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES(OBJC)], [define([AC_PROG_OBJC], defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) ]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $1 | $1:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 3 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_MKDIR_P # --------------- # Check for `mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], [AC_PREREQ([2.60])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, dnl while keeping a definition of mkdir_p for backward compatibility. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of dnl Makefile.ins that do not define MKDIR_P, so we do our own dnl adjustment using top_builddir (which is defined more often than dnl MKDIR_P). AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl case $mkdir_p in [[\\/$]]* | ?:[[\\/]]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 3 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR calcoo-1.3.18/NEWS0000644000175000017500000000012107317455000010457 00000000000000This file is here only to satisfy GNU autoconf/automake. See ChangeLog for news. calcoo-1.3.18/INSTALL0000644000175000017500000001723006750140616011026 00000000000000Basic Installation ================== These are generic installation instructions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, a file `config.cache' that saves the results of its tests to speed up reconfiguring, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.in' is used to create `configure' by a program called `autoconf'. You only need `configure.in' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. If you're using `csh' on an old version of System V, you might need to type `sh ./configure' instead to prevent `csh' from trying to execute `configure' itself. Running `configure' takes awhile. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package. 4. Type `make install' to install the programs and any data files and documentation. 5. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. You can give `configure' initial values for variables by setting them in the environment. Using a Bourne-compatible shell, you can do that on the command line like this: CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure Or on systems that have the `env' program, you can do it like this: env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you must use a version of `make' that supports the `VPATH' variable, such as GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. If you have to use a `make' that does not supports the `VPATH' variable, you have to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. Installation Names ================== By default, `make install' will install the package's files in `/usr/local/bin', `/usr/local/man', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PATH'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you give `configure' the option `--exec-prefix=PATH', the package will use PATH as the prefix for installing programs and libraries. Documentation and other data files will still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=PATH' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Specifying the System Type ========================== There may be some features `configure' can not figure out automatically, but needs to determine by the type of host the package will run on. Usually `configure' can figure that out, but if it prints a message saying it can not guess the host type, give it the `--host=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name with three fields: CPU-COMPANY-SYSTEM See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the host type. If you are building compiler tools for cross-compiling, you can also use the `--target=TYPE' option to select the type of system they will produce code for and the `--build=TYPE' option to select the type of system on which you are compiling the package. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Operation Controls ================== `configure' recognizes the following options to control how it operates. `--cache-file=FILE' Use and save the results of the tests in FILE instead of `./config.cache'. Set FILE to `/dev/null' to disable caching, for debugging `configure'. `--help' Print a summary of the options to `configure', and exit. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `--version' Print the version of Autoconf used to generate the `configure' script, and exit. `configure' also accepts some other, not widely useful, options. calcoo-1.3.18/src/0000777000175000017500000000000010661637161010647 500000000000000calcoo-1.3.18/src/pixmaps/0000777000175000017500000000000010661637161012330 500000000000000calcoo-1.3.18/src/pixmaps/sign.xpm0000644000175000017500000000242610661637161013736 00000000000000/* XPM */ static char * sign_xpm[] = { /* width height num_colors chars_per_pixel */ "32 32 2 1", /* colors */ " c None", ". c black", /* pixels */ " ", " ", " ", " ", " ", " ", " ", " .. ", " .. ", " .. ", " .. ", " .. ", " ............ ", " ............ ", " .. ", " .. ", " .. ", " .. ", " .. ", " ", " ............ ", " ............ ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "}; calcoo-1.3.18/src/pixmaps/invx.xpm0000644000175000017500000000231610661637161013760 00000000000000/* XPM */ static char * invx_xpm[] = { "32 32 2 1", " c None", ". c black", " ", " ", " ", " ", " ", " ", " ", " .. .. ", " ... .. ", " .... .. ", " .. .. ", " .. .. ", " .. .. ", " .. .. ", " .. .. ", " .. .. .. .. ", " .. ... ... ", " .. ..... ", " .. ... ", " .. ... ", " .. ... ", " .. ..... ", " .. ... ... ", " .. .. ", " ", " ", " ", " ", " ", " ", " ", " "}; calcoo-1.3.18/src/pixmaps/undo.xpm0000644000175000017500000000242610661637161013743 00000000000000/* XPM */ static char * undo_xpm[] = { /* width height num_colors chars_per_pixel */ "32 32 2 1", /* colors */ " c None", ". c black", /* pixels */ " ", " ", " ", " ", " ", " ", " .. ", " .. ..... ", " .. ......... ", " ..... ... ", " .... .. ", " ...... .. ", " ...... .. ", " .. ", " .. ", " .. ", " .. ", " .. ", " .. ", " .. ", " .. .. ", " ... ... ", " ......... ", " ..... ", " ", " ", " ", " ", " ", " ", " ", " "}; calcoo-1.3.18/src/pixmaps/hyp.xpm0000644000175000017500000000231510661637161013573 00000000000000/* XPM */ static char * hyp_xpm[] = { "32 32 2 1", " c None", ". c black", " ", " ", " ", " ", " ", " ", " ", " .. ", " .. ", " .. ", " .. ", " ...... .. .. ...... ", " ....... .. .. ....... ", " .. .. .. .. .. .. ", " .. .. .. .. .. .. ", " .. .. .. .. .. .. ", " .. .. .. .. .. .. ", " .. .. .. .. .. .. ", " .. .. ....... ....... ", " .. .. ...... ...... ", " .. .. ", " ...... .. ", " ..... .. ", " ", " ", " ", " ", " ", " ", " ", " ", " "}; calcoo-1.3.18/src/pixmaps/b8.xpm0000644000175000017500000000242410661637161013305 00000000000000/* XPM */ static char * b8_xpm[] = { /* width height num_colors chars_per_pixel */ "32 32 2 1", /* colors */ " c None", ". c black", /* pixels */ " ", " ", " ", " ", " ", " ", " ", " ..... ", " ....... ", " ......... ", " ... ... ", " ... ... ", " ... ... ", " ......... ", " ....... ", " ......... ", " ........... ", " ... ... ", " ... ... ", " ... ... ", " ... ... ", " ........... ", " ......... ", " ....... ", " ", " ", " ", " ", " ", " ", " ", " "}; calcoo-1.3.18/src/pixmaps/lerror.xpm0000644000175000017500000000063410661637161014302 00000000000000/* XPM */ static char * lerror_xpm[] = { "32 9 2 1", " s None c None", ". c #000000", " ", " ", " ", " .... .. .. . ... .... .. .. ", ".. .. ... ... .. .. ... ", "...... .. .. .. .. .. ", ".. .. .. .. .. .. ", ".. .. .. .. .. .. .. ", " .... .. .. .... .. "}; calcoo-1.3.18/src/pixmaps/oz.xpm0000644000175000017500000000064410661637161013426 00000000000000/* XPM */ static char * oz_xpm[] = { /* width height num_colors chars_per_pixel */ "12 16 2 1", /* colors */ " c None", ". c black", /* pixels */ " ", " ", " ", " ....... ", " ....... ", " ... ", " ... ", " ... ", " ... ", " ... ", " ....... ", " ....... ", " ", " ", " ", " ", " "}; calcoo-1.3.18/src/pixmaps/d4.xpm0000644000175000017500000000063510661637161013305 00000000000000/* XPM */ static char *d4_xpm[]={ "13 20 2 1", "# c black", ". c None", "........####.", "........####.", ".......#####.", "......######.", "......######.", ".....#######.", "....###.####.", "....###.####.", "...###..####.", "..###...####.", "..###...####.", ".###....####.", "###.....####.", "#############", "#############", "#############", "........####.", "........####.", "........####.", "........####."}; calcoo-1.3.18/src/pixmaps/sqr.xpm0000644000175000017500000000231510661637161013600 00000000000000/* XPM */ static char * sqr_xpm[] = { "32 32 2 1", " c None", ". c black", " ", " ", " ", " ", " ", " ", " ... ", " ..... ", " .. .. ", " .. ", " .. ", " .. .. .. ", " ... ... ..... ", " ..... ..... ", " ... ", " ... ", " ... ", " ..... ", " ... ... ", " .. .. ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "}; calcoo-1.3.18/src/pixmaps/exch_xz.xpm0000644000175000017500000000233210661637161014442 00000000000000/* XPM */ static char * exch_xz_xpm[] = { "32 32 2 1", " s None c None", ". c #000000", " ", " ", " ", " ", " ", " ", " . ", " .. ", " ... ", " ... ", " .. .. ... ....... ", " ... ... ... ....... ", " ..... ... ... ", " ... .. . ... ", " ... . .. ... ", " ... ... ... ", " ..... ... ... ", " ... ... ... ....... ", " .. .. ... ....... ", " ... ", " .. ", " . ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "}; calcoo-1.3.18/src/pixmaps/l6.xpm0000644000175000017500000000024110661637161013310 00000000000000/* XPM */ static char *l6_xpm[]={ "6 9 2 1", "# c black", ". c None", ".####.", "##..##", "##....", "##....", "#####.", "##..##", "##..##", "##..##", ".####."}; calcoo-1.3.18/src/pixmaps/b2.xpm0000644000175000017500000000242410661637161013277 00000000000000/* XPM */ static char * b2_xpm[] = { /* width height num_colors chars_per_pixel */ "32 32 2 1", /* colors */ " c None", ". c black", /* pixels */ " ", " ", " ", " ", " ", " ", " ", " ....... ", " ......... ", " ........... ", " ... ... ", " ... ... ", " ... ", " ... ", " .... ", " .... ", " .... ", " .... ", " .... ", " .... ", " .... ", " ........... ", " ........... ", " ........... ", " ", " ", " ", " ", " ", " ", " ", " "}; calcoo-1.3.18/src/pixmaps/b9.xpm0000644000175000017500000000242410661637161013306 00000000000000/* XPM */ static char * b9_xpm[] = { /* width height num_colors chars_per_pixel */ "32 32 2 1", /* colors */ " c None", ". c black", /* pixels */ " ", " ", " ", " ", " ", " ", " ", " ....... ", " ......... ", " ........... ", " ... ... ", " ... ... ", " ... ... ", " ... ... ", " ... ... ", " ........... ", " .......... ", " ......... ", " ... ", " ... ", " ... ... ", " ........... ", " ......... ", " ....... ", " ", " ", " ", " ", " ", " ", " ", " "}; calcoo-1.3.18/src/pixmaps/mem_mult.xpm0000644000175000017500000000243210661637161014612 00000000000000/* XPM */ static char * mem_mult_xpm[] = { /* width height num_colors chars_per_pixel */ "32 32 2 1", /* colors */ " c None", ". c black", /* pixels */ " ", " ", " ", " ", " ", " ", " ", " ", " ", " .. .. ", " ... ... ", " .... .... .. .. ", " ..... ..... ... ... ", " .. ..... .. ...... ", " .. ... .. .... ", " .. . .. .... ", " .. .. ...... ", " .. .. ... ... ", " .. .. .. .. ", " .. .. ", " .. .. ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "}; calcoo-1.3.18/src/pixmaps/up.xpm0000644000175000017500000000232510661637161013420 00000000000000/* XPM */ static char * up_xpm[] = { "32 32 2 1", " s None c None", ". c #000000", " ", " ", " ", " ", " ", " ", " ", " .. ", " .... ", " ...... ", " ........ ", " .... .... ", " .... .... ", " .... .... ", " ... ... ", " .. ", " .... ", " ...... ", " ........ ", " .... .... ", " .... .... ", " .... .... ", " ... ... ", " ", " ", " ", " ", " ", " ", " ", " ", " "}; calcoo-1.3.18/src/pixmaps/frm_eng.xpm0000644000175000017500000000123210661637161014405 00000000000000/* XPM */ static char * frm_eng_xpm[] = { "32 16 2 1", " s None c None", ". c #000000", " ", " ", " ", " ", " ", " ..... ...... ...... ", " ....... ....... ....... ", " .. .. .. .. .. .. ", " ....... .. .. .. .. ", " .. .. .. ....... ", " ....... .. .. ...... ", " ..... .. .. .. ", " ....... ", " ..... ", " ", " "}; calcoo-1.3.18/src/pixmaps/deg.xpm0000644000175000017500000000122610661637161013532 00000000000000/* XPM */ static char * deg_xpm[] = { "32 16 2 1", " s None c None", ". c #000000", " ", " ", " .. ", " .. ", " .. ", " ...... ..... ...... ", " ....... ....... ....... ", " .. .. .. .. .. .. ", " .. .. ....... .. .. ", " .. .. .. ....... ", " ....... ....... ...... ", " ...... ..... .. ", " ....... ", " ..... ", " ", " "}; calcoo-1.3.18/src/pixmaps/sqrt.xpm0000644000175000017500000000231610661637161013765 00000000000000/* XPM */ static char * sqrt_xpm[] = { "32 32 2 1", " c None", ". c black", " ", " ", " ", " ", " ", " ", " ", " ............. ", " ............. ", " .. .. ", " .. . ", " .. ", " .. ", " ... .. ", " ... .. ", " .. .. ", " .... ", " .... ", " .... ", " .. ", " .. ", " .. ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "}; calcoo-1.3.18/src/pixmaps/mem_to_x.xpm0000644000175000017500000000232110661637161014577 00000000000000/* XPM */ static char *mem_to_x_xpm[]={ "32 32 2 1", ". c None", "# c #000000", "................................", "................................", "................................", "................................", "................................", "................................", "................................", "................................", "................................", "................................", "................................", ".......#####..#####..###........", "......######..######.####.......", "......##......##...##...##......", "......##......##...##...##......", "......##......##...##...##......", "......##......##...##...##......", "......##......##...##...##......", "......##......##...##...##......", "......##......##...##...##......", "................................", "................................", "................................", "................................", "................................", "................................", "................................", "................................", "................................", "................................", "................................", "................................"}; calcoo-1.3.18/src/pixmaps/mem_div.xpm0000644000175000017500000000243110661637161014412 00000000000000/* XPM */ static char * mem_div_xpm[] = { /* width height num_colors chars_per_pixel */ "32 32 2 1", /* colors */ " c None", ". c black", /* pixels */ " ", " ", " ", " ", " ", " ", " ", " ", " ", " .. .. .. ", " ... ... .. ", " .... .... .. ", " ..... ..... .. ", " .. ..... .. .. ", " .. ... .. .. ", " .. . .. .. ", " .. .. .. ", " .. .. .. ", " .. .. .. ", " .. .. .. ", " .. .. .. ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "}; calcoo-1.3.18/src/pixmaps/power.xpm0000644000175000017500000000233010661637161014124 00000000000000/* XPM */ static char * power_xpm[] = { "32 32 2 1", " s None c None", ". c #000000", " ", " ", " ", " ", " ", " ", " .. .. ", " ... ... ", " ..... ", " ... ", " ... ", " .. .. ..... ", " .. .. ... ... ", " .. .. .. .. ", " .. .. ", " .. .. ", " .. .. ", " .. .. ", " ....... ", " ...... ", " .. ", " ...... ", " ..... ", " ", " ", " ", " ", " ", " ", " ", " ", " "}; calcoo-1.3.18/src/pixmaps/rad.xpm0000644000175000017500000000122610661637161013541 00000000000000/* XPM */ static char * rad_xpm[] = { "32 16 2 1", " s None c None", ". c #000000", " ", " ", " .. ", " .. ", " .. ", " ..... ..... ...... ", " ...... ....... ....... ", " .. .. .. .. ", " .. ...... .. .. ", " .. .. .. .. .. ", " .. ....... ....... ", " .. ...... ...... ", " ", " ", " ", " "}; calcoo-1.3.18/src/pixmaps/le.xpm0000644000175000017500000000024110661637161013367 00000000000000/* XPM */ static char *le_xpm[]={ "6 9 2 1", "# c black", ". c None", "......", "......", "......", ".####.", "##..##", "######", "##....", "##..##", ".####."}; calcoo-1.3.18/src/pixmaps/ln.xpm0000644000175000017500000000231410661637161013403 00000000000000/* XPM */ static char * ln_xpm[] = { "32 32 2 1", " c None", ". c black", " ", " ", " ", " ", " ", " ", " ", " ", " .. ", " .. ", " .. ", " .. ..... ", " .. ...... ", " .. .. .. ", " .. .. .. ", " .. .. .. ", " .. .. .. ", " .. .. .. ", " .. .. .. ", " .. .. .. ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "}; calcoo-1.3.18/src/pixmaps/ldot.xpm0000644000175000017500000000021110661637161013726 00000000000000/* XPM */ static char * ldot_xpm[] = { "2 9 2 1", " s None c None", ". c black", " ", " ", " ", " ", " ", " ", " ", "..", ".."}; calcoo-1.3.18/src/pixmaps/l8.xpm0000644000175000017500000000024110661637161013312 00000000000000/* XPM */ static char *l8_xpm[]={ "6 9 2 1", "# c black", ". c None", ".####.", "##..##", "##..##", "##..##", ".####.", "##..##", "##..##", "##..##", ".####."}; calcoo-1.3.18/src/pixmaps/mem_plus.xpm0000644000175000017500000000232110661637161014611 00000000000000/* XPM */ static char *mem_plus_xpm[]={ "32 32 2 1", ". c None", "# c #000000", "................................", "................................", "................................", "................................", "................................", "................................", "................................", "................................", "................................", "................................", "......................##........", "....#####..###........##........", "....######.####.......##........", "....##...##...##......##........", "....##...##...##..##########....", "....##...##...##..##########....", "....##...##...##......##........", "....##...##...##......##........", "....##...##...##......##........", "....##...##...##......##........", "................................", "................................", "................................", "................................", "................................", "................................", "................................", "................................", "................................", "................................", "................................", "................................"}; calcoo-1.3.18/src/pixmaps/exch_xt.xpm0000644000175000017500000000233210661637161014434 00000000000000/* XPM */ static char * exch_xt_xpm[] = { "32 32 2 1", " s None c None", ". c #000000", " ", " ", " ", " ", " ", " ", " . ", " .. ", " ... .. ", " ... .. ", " .. .. ... ...... ", " ... ... ... ...... ", " ..... ... .. ", " ... .. . .. ", " ... . .. .. ", " ... ... .. ", " ..... ... .. ", " ... ... ... .... ", " .. .. ... ... ", " ... ", " .. ", " . ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "}; calcoo-1.3.18/src/pixmaps/dot.xpm0000644000175000017500000000242510661637161013563 00000000000000/* XPM */ static char * dot_xpm[] = { /* width height num_colors chars_per_pixel */ "32 32 2 1", /* colors */ " c None", ". c black", /* pixels */ " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ... ", " ... ", " ... ", " ", " ", " ", " ", " ", " ", " ", " "}; calcoo-1.3.18/src/pixmaps/clear_all.xpm0000644000175000017500000000243310661637161014712 00000000000000/* XPM */ static char * clear_all_xpm[] = { /* width height num_colors chars_per_pixel */ "32 32 2 1", /* colors */ " c None", ". c black", /* pixels */ " ", " ", " ", " ", " ", " ", " ", " ......... ", " ........... ", " ............. ", " ... ... ", " ... ... ", " ... ", " ... ", " ... ", " ... ", " ... ", " ... ", " ... ", " ... ... ", " ... ... ", " ............. ", " ........... ", " ......... ", " ", " ", " ", " ", " ", " ", " ", " "}; calcoo-1.3.18/src/pixmaps/b5.xpm0000644000175000017500000000242410661637161013302 00000000000000/* XPM */ static char * b5_xpm[] = { /* width height num_colors chars_per_pixel */ "32 32 2 1", /* colors */ " c None", ". c black", /* pixels */ " ", " ", " ", " ", " ", " ", " ", " ........... ", " ........... ", " ........... ", " ... ", " ... ", " ......... ", " .......... ", " ........... ", " ... ... ", " ... ", " ... ", " ... ", " ... ... ", " ... ... ", " ........... ", " ......... ", " ....... ", " ", " ", " ", " ", " ", " ", " ", " "}; calcoo-1.3.18/src/pixmaps/exp_sign.xpm0000644000175000017500000000233310661637161014607 00000000000000/* XPM */ static char * exp_sign_xpm[] = { "32 32 2 1", " s None c None", ". c #000000", " ", " ", " ", " ", " ", " ", " ", " ", " ... ", " ....... .. ", " ......... .. ", " ... ... .. ", " ... ... ........ ", " ... ... ........ ", " ........... .. ", " ........... .. ", " ... .. ", " ... ", " ... ... ........ ", " ......... ........ ", " ....... ", " ... ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "}; calcoo-1.3.18/src/pixmaps/eq.xpm0000644000175000017500000000242410661637161013401 00000000000000/* XPM */ static char * eq_xpm[] = { /* width height num_colors chars_per_pixel */ "32 32 2 1", /* colors */ " c None", ". c black", /* pixels */ " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ................. ", " ................. ", " ................. ", " ", " ", " ", " ................. ", " ................. ", " ................. ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "}; calcoo-1.3.18/src/pixmaps/lminus.xpm0000644000175000017500000000025710661637161014305 00000000000000/* XPM */ static char * lminus_xpm[] = { "6 9 2 1", " s None c None", ". c black", " ", " ", " ", " ", "......", "......", " ", " ", " "}; calcoo-1.3.18/src/pixmaps/d9.xpm0000644000175000017500000000063510661637161013312 00000000000000/* XPM */ static char *d9_xpm[]={ "13 20 2 1", "# c black", ". c None", "....#####....", "..#########..", ".###########.", ".####...####.", "####.....####", "####.....####", "####.....####", "####.....####", "####.....####", ".####...#####", ".############", "..###########", "...#####.####", ".........####", ".........####", "####.....####", ".####...####.", ".###########.", "..#########..", "....#####...."}; calcoo-1.3.18/src/pixmaps/question.xpm0000644000175000017500000000232110661637161014637 00000000000000/* XPM */ static char *question_xpm[]={ "32 32 2 1", ". c None", "# c #000000", "................................", "................................", "................................", "................................", "................................", "................................", "................................", "............#######.............", "...........#########............", "..........###########...........", "..........###.....###...........", "..........###.....###...........", "..................###...........", "..................###...........", ".................####...........", "................####............", "...............####.............", "..............####..............", "..............###...............", "..............###...............", "................................", "..............###...............", "..............###...............", "..............###...............", "................................", "................................", "................................", "................................", "................................", "................................", "................................", "................................"}; calcoo-1.3.18/src/pixmaps/oy.xpm0000644000175000017500000000062410661637161013423 00000000000000/* XPM */ static char * oy_xpm[] = { /* width height num_colors chars_per_pixel */ "12 16 2 1", /* colors */ " c None", ". c black", /* pixels */ " ", " ", " .. .. ", " .. .. ", " .. .. ", " .. .. ", " .. .. ", " .. .. ", " .. .. ", " ....... ", " ...... ", " .. ", " ...... ", " ..... ", " ", " "}; calcoo-1.3.18/src/pixmaps/log.xpm0000644000175000017500000000231510661637161013554 00000000000000/* XPM */ static char * log_xpm[] = { "32 32 2 1", " c None", ". c black", " ", " ", " ", " ", " ", " ", " ", " ", " .. ", " .. ", " .. ", " .. ..... ...... ", " .. ....... ....... ", " .. .. .. .. .. ", " .. .. .. .. .. ", " .. .. .. .. .. ", " .. .. .. .. .. ", " .. .. .. .. .. ", " .. ....... ....... ", " .. ..... ...... ", " .. ", " ...... ", " ..... ", " ", " ", " ", " ", " ", " ", " ", " ", " "}; calcoo-1.3.18/src/pixmaps/l1.xpm0000644000175000017500000000024110661637161013303 00000000000000/* XPM */ static char *l1_xpm[]={ "6 9 2 1", "# c black", ". c None", "..##..", "####..", "..##..", "..##..", "..##..", "..##..", "..##..", "..##..", "..##.."}; calcoo-1.3.18/src/pixmaps/redo.xpm0000644000175000017500000000242610661637161013727 00000000000000/* XPM */ static char * redo_xpm[] = { /* width height num_colors chars_per_pixel */ "32 32 2 1", /* colors */ " c None", ". c black", /* pixels */ " ", " ", " ", " ", " ", " ", " .. ", " ..... .. ", " ......... .. ", " ... ..... ", " .. .... ", " .. ...... ", " .. ...... ", " .. ", " .. ", " .. ", " .. ", " .. ", " .. ", " .. ", " .. .. ", " ... ... ", " ......... ", " ..... ", " ", " ", " ", " ", " ", " ", " ", " "}; calcoo-1.3.18/src/pixmaps/pi.xpm0000644000175000017500000000231410661637161013402 00000000000000/* XPM */ static char * pi_xpm[] = { "32 32 2 1", " c None", ". c black", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " .......... ", " ........... ", " .. .. .. ", " . .. .. ", " .. .. ", " .. .. ", " .. .. ", " .. .... ", " .. .. ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "}; calcoo-1.3.18/src/pixmaps/derror.xpm0000644000175000017500000000242510661637161014272 00000000000000/* XPM */ static char *derror_xpm[]={ "64 18 2 1", ". c black", " c None", " ", " ", " ", " ..... .... .... .... .... ..... .... ....", " ......... ......... ......... ......... .........", " ........... ......... ......... ........... .........", " .... .... ..... ..... ..... ..... ..... ", ".... ... ..... ..... .... .... ..... ", ".... .... .... .... .... .... .... ", "............. .... .... .... .... .... ", "............. .... .... .... .... .... ", "............. .... .... .... .... .... ", ".... .... .... .... .... .... ", ".... .... .... .... .... .... ", " .... .. .... .... ..... ..... .... ", " ............ .... .... ........... .... ", " .......... .... .... ......... .... ", " ...... .... .... ..... .... "}; calcoo-1.3.18/src/pixmaps/d3.xpm0000644000175000017500000000063510661637161013304 00000000000000/* XPM */ static char *d3_xpm[]={ "13 20 2 1", ". c black", " c None", " ...... ", " ......... ", " ........... ", "..... .... ", ".... ....", " ....", " ....", " .... ", " ...... ", " .... ", " ...... ", " .... ", " ....", " ....", ".... ....", ".... ....", " .... .... ", " ........... ", " ......... ", " ..... "}; calcoo-1.3.18/src/pixmaps/mem_minus.xpm0000644000175000017500000000243310661637161014765 00000000000000/* XPM */ static char * mem_minus_xpm[] = { /* width height num_colors chars_per_pixel */ "32 32 2 1", /* colors */ " c None", ". c black", /* pixels */ " ", " ", " ", " ", " ", " ", " ", " ", " ", " .. .. ", " ... ... ", " .... .... ", " ..... ..... ", " .. ..... .. ", " .. ... .. .......... ", " .. . .. .......... ", " .. .. ", " .. .. ", " .. .. ", " .. .. ", " .. .. ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "}; calcoo-1.3.18/src/pixmaps/paste.xpm0000644000175000017500000000121710661637161014107 00000000000000/* XPM */ static char * paste_xpm[] = { "32 16 2 1", " c None", ". c black", " ", " ", " . ", " .. ", " .... ... ........ ... ", " ..... ..... ............... ", " .. .. .. .. .. .. .. ", " .. .. .... ... .. ..... ", " .. .. .. .. .. .. .. ", " ..... ..... ..... ... ..... ", " .... .... ... .. ... ", " .. ", " .. ", " ", " ", " "}; calcoo-1.3.18/src/pixmaps/obrace.xpm0000644000175000017500000000103010661637161014217 00000000000000/* XPM */ static char * obrace_xpm[] = { /* width height num_colors chars_per_pixel */ "20 16 2 1", /* colors */ " c None", ". c black", /* pixels */ " ", " ", " .. ", " .. ", " .. ", " .. ", " .. ", " .. ", " .. ", " .. ", " .. ", " .. ", " .. ", " .. ", " ", " "}; calcoo-1.3.18/src/pixmaps/omult.xpm0000644000175000017500000000102710661637161014132 00000000000000/* XPM */ static char * omult_xpm[] = { /* width height num_colors chars_per_pixel */ "20 16 2 1", /* colors */ " c None", ". c black", /* pixels */ " ", " ", " ", " ", " .. .. ", " ... ... ", " ...... ", " .... ", " .... ", " ...... ", " ... ... ", " .. .. ", " ", " ", " ", " "}; calcoo-1.3.18/src/pixmaps/fact.xpm0000644000175000017500000000231610661637161013711 00000000000000/* XPM */ static char * fact_xpm[] = { "32 32 2 1", " c None", ". c black", " ", " ", " ", " ", " ", " ", " ", " ", " ", " .. ", " .. ", " .. .. .. ", " ... ... .. ", " ..... .. ", " ... .. ", " ... .. ", " ... .. ", " ..... ", " ... ... .. ", " .. .. .. ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "}; calcoo-1.3.18/src/pixmaps/b0.xpm0000644000175000017500000000242410661637161013275 00000000000000/* XPM */ static char * b0_xpm[] = { /* width height num_colors chars_per_pixel */ "32 32 2 1", /* colors */ " c None", ". c black", /* pixels */ " ", " ", " ", " ", " ", " ", " ", " ....... ", " ......... ", " ........... ", " ... ... ", " ... ... ", " ... ... ", " ... ... ", " ... ... ", " ... ... ", " ... ... ", " ... ... ", " ... ... ", " ... ... ", " ... ... ", " ........... ", " ......... ", " ....... ", " ", " ", " ", " ", " ", " ", " ", " "}; calcoo-1.3.18/src/pixmaps/l7.xpm0000644000175000017500000000024110661637161013311 00000000000000/* XPM */ static char *l7_xpm[]={ "6 9 2 1", ". c black", "# c None", "......", "####..", "###..#", "###..#", "##..##", "##..##", "#..###", "#..###", "#..###"}; calcoo-1.3.18/src/pixmaps/plus.xpm0000644000175000017500000000242610661637161013761 00000000000000/* XPM */ static char * plus_xpm[] = { /* width height num_colors chars_per_pixel */ "32 32 2 1", /* colors */ " c None", ". c black", /* pixels */ " ", " ", " ", " ", " ", " ", " ", " ... ", " ... ", " ... ", " ... ", " ... ", " ... ", " ... ", " ................. ", " ................. ", " ................. ", " ... ", " ... ", " ... ", " ... ", " ... ", " ... ", " ... ", " ", " ", " ", " ", " ", " ", " ", " "}; calcoo-1.3.18/src/pixmaps/b7.xpm0000644000175000017500000000242410661637161013304 00000000000000/* XPM */ static char * b7_xpm[] = { /* width height num_colors chars_per_pixel */ "32 32 2 1", /* colors */ " c None", ". c black", /* pixels */ " ", " ", " ", " ", " ", " ", " ", " ........... ", " ........... ", " ........... ", " ... ", " ... ", " ... ", " ... ", " ... ", " ... ", " ... ", " ... ", " ... ", " ... ", " ... ", " ... ", " ... ", " ... ", " ", " ", " ", " ", " ", " ", " ", " "}; calcoo-1.3.18/src/pixmaps/exch_xmem.xpm0000644000175000017500000000233410661637161014751 00000000000000/* XPM */ static char * exch_xmem_xpm[] = { "32 32 2 1", " s None c None", ". c #000000", " ", " ", " ", " ", " ", " ", " ", " . ", " .. ", " ... ", " ... ", " .... .. ... .. .. ", " ..... ... ... ... ... ", " .. .. .. ... ..... ", " .. .. .. .. . ... ", " .. .. .. . .. ... ", " .. .. .. ... ... ", " .. .. .. ... ..... ", " .. .. .. ... ... ... ", " .. .. .. ... .. .. ", " ... ", " .. ", " . ", " ", " ", " ", " ", " ", " ", " ", " ", " "}; calcoo-1.3.18/src/pixmaps/dminus.xpm0000644000175000017500000000073010661637161014271 00000000000000/* XPM */ static char * dminus_xpm[] = { /* width height num_colors chars_per_pixel */ "12 20 2 1", /* colors */ " c None", ". c black", /* pixels */ " ", " ", " ", " ", " ", " ", " ", " ", "........... ", "........... ", "........... ", " ", " ", " ", " ", " ", " ", " ", " ", " "}; calcoo-1.3.18/src/pixmaps/b4.xpm0000644000175000017500000000242410661637161013301 00000000000000/* XPM */ static char * b4_xpm[] = { /* width height num_colors chars_per_pixel */ "32 32 2 1", /* colors */ " c None", ". c black", /* pixels */ " ", " ", " ", " ", " ", " ", " ", " .... ", " ..... ", " ..... ", " ...... ", " ...... ", " ... ... ", " ... ... ", " ... ... ", " ... ... ", " ... ... ", " ... ... ", " ............ ", " ............ ", " ............ ", " ... ", " ... ", " ... ", " ", " ", " ", " ", " ", " ", " ", " "}; calcoo-1.3.18/src/pixmaps/right_paren.xpm0000644000175000017500000000243510661637161015300 00000000000000/* XPM */ static char * right_paren_xpm[] = { /* width height num_colors chars_per_pixel */ "32 32 2 1", /* colors */ " c None", ". c black", /* pixels */ " ", " ", " ", " ", " ", " .. ", " .. ", " .. ", " .. ", " .. ", " .. ", " .. ", " .. ", " .. ", " .. ", " .. ", " .. ", " .. ", " .. ", " .. ", " .. ", " .. ", " .. ", " .. ", " .. ", " .. ", " ", " ", " ", " ", " ", " "}; calcoo-1.3.18/src/pixmaps/mult.xpm0000644000175000017500000000242610661637161013757 00000000000000/* XPM */ static char * mult_xpm[] = { /* width height num_colors chars_per_pixel */ "32 32 2 1", /* colors */ " c None", ". c black", /* pixels */ " ", " ", " ", " ", " ", " ", " ", " ", " ... ... ", " .... .... ", " .... .... ", " .... .... ", " .... .... ", " ........ ", " ...... ", " .... ", " ...... ", " ........ ", " .... .... ", " .... .... ", " .... .... ", " .... .... ", " ... ... ", " ", " ", " ", " ", " ", " ", " ", " ", " "}; calcoo-1.3.18/src/pixmaps/forced_e.xpm0000644000175000017500000000133210661637161014537 00000000000000/* XPM */ static char * forced_e_xpm[] = { /* width height num_colors chars_per_pixel */ "32 16 2 1", /* colors */ " c None", ". c black", /* pixels */ " ", " ", " ", " ....... ....... ", " ....... . ....... ", " .. .. .. ", " .. ... .. ", " ...... ........ ...... ", " ...... ........ ...... ", " .. ... .. ", " .. .. .. ", " .. . ....... ", " .. ....... ", " ", " ", " "}; calcoo-1.3.18/src/pixmaps/down.xpm0000644000175000017500000000232710661637161013745 00000000000000/* XPM */ static char * down_xpm[] = { "32 32 2 1", " s None c None", ". c #000000", " ", " ", " ", " ", " ", " ", " ", " ", " ... ... ", " .... .... ", " .... .... ", " .... .... ", " ........ ", " ...... ", " .... ", " .. ", " ... ... ", " .... .... ", " .... .... ", " .... .... ", " ........ ", " ...... ", " .... ", " .. ", " ", " ", " ", " ", " ", " ", " ", " "}; calcoo-1.3.18/src/pixmaps/d1.xpm0000644000175000017500000000063510661637161013302 00000000000000/* XPM */ static char *d1_xpm[]={ "13 20 2 1", "# c black", ". c None", ".......###...", "......####...", ".....#####...", "....######...", "...#######...", "..########...", ".####.####...", ".###..####...", "......####...", "......####...", "......####...", "......####...", "......####...", "......####...", "......####...", "......####...", "......####...", "......####...", "......####...", "......####..."}; calcoo-1.3.18/src/pixmaps/ddot.xpm0000644000175000017500000000023510661637161013724 00000000000000/* XPM */ static char * ddot_xpm[] = { /* width height num_colors chars_per_pixel */ "3 3 1 1", /* colors */ " c black", /* pixels */ " ", " ", " "}; calcoo-1.3.18/src/pixmaps/l4.xpm0000644000175000017500000000024110661637161013306 00000000000000/* XPM */ static char *l4_xpm[]={ "6 9 2 1", "# c black", ". c None", "...##.", "..###.", "..###.", ".####.", ".####.", "##.##.", "######", "...##.", "...##."}; calcoo-1.3.18/src/pixmaps/dplus.xpm0000644000175000017500000000072710661637161014127 00000000000000/* XPM */ static char * dplus_xpm[] = { /* width height num_colors chars_per_pixel */ "12 20 2 1", /* colors */ " c None", ". c black", /* pixels */ " ", " ", " ", " ", " ... ", " ... ", " ... ", " ... ", "........... ", "........... ", "........... ", " ... ", " ... ", " ... ", " ... ", " ", " ", " ", " ", " "}; calcoo-1.3.18/src/pixmaps/b6.xpm0000644000175000017500000000242410661637161013303 00000000000000/* XPM */ static char * b6_xpm[] = { /* width height num_colors chars_per_pixel */ "32 32 2 1", /* colors */ " c None", ". c black", /* pixels */ " ", " ", " ", " ", " ", " ", " ", " ....... ", " ......... ", " ........... ", " ... ... ", " ... ", " ... ", " ......... ", " .......... ", " ........... ", " ... ... ", " ... ... ", " ... ... ", " ... ... ", " ... ... ", " ........... ", " ......... ", " ....... ", " ", " ", " ", " ", " ", " ", " ", " "}; calcoo-1.3.18/src/pixmaps/lplus.xpm0000644000175000017500000000025610661637161014134 00000000000000/* XPM */ static char * lplus_xpm[] = { "6 9 2 1", " s None c None", ". c black", " ", " ", " .. ", " .. ", "......", "......", " .. ", " .. ", " "}; calcoo-1.3.18/src/pixmaps/d5.xpm0000644000175000017500000000063510661637161013306 00000000000000/* XPM */ static char *d5_xpm[]={ "13 20 2 1", ". c black", " c None", "............ ", "............ ", "............ ", ".... ", ".... ", ".... ", ".... ..... ", "........... ", "............ ", ".... .... ", " ....", " ....", " ....", " ....", " ....", ".... ....", "..... .... ", " ........... ", " ......... ", " ...... "}; calcoo-1.3.18/src/pixmaps/l3.xpm0000644000175000017500000000024110661637161013305 00000000000000/* XPM */ static char *l3_xpm[]={ "6 9 2 1", "# c black", ". c None", ".####.", "##..##", "....##", "....##", "..###.", "....##", "....##", "##..##", ".####."}; calcoo-1.3.18/src/pixmaps/l5.xpm0000644000175000017500000000024110661637161013307 00000000000000/* XPM */ static char *l5_xpm[]={ "6 9 2 1", ". c black", "# c None", "......", "..####", "..####", ".....#", "..##..", "####..", "####..", "..##..", "#....#"}; calcoo-1.3.18/src/pixmaps/arc.xpm0000644000175000017500000000231510661637161013540 00000000000000/* XPM */ static char * arc_xpm[] = { "32 32 2 1", " c None", ". c black", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ..... ..... ..... ", " ....... ...... ...... ", " .. .. .. ", " ...... .. .. ", " ....... .. .. ", " .. .. .. .. ", " .. ... .. .. ", " ....... .. ...... ", " ... .. .. ..... ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "}; calcoo-1.3.18/src/pixmaps/etox.xpm0000644000175000017500000000232710661637161013755 00000000000000/* XPM */ static char * etox_xpm[] = { "32 32 2 1", " s None c None", ". c #000000", " ", " ", " ", " ", " ", " ", " .. .. ", " ... ... ", " ..... ", " ... ", " ... ", " ..... ..... ", " ....... ... ... ", " .. .. .. .. ", " .. .. ", " ....... ", " ...... ", " .. ", " ....... ", " ..... ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "}; calcoo-1.3.18/src/pixmaps/d6.xpm0000644000175000017500000000063510661637161013307 00000000000000/* XPM */ static char *d6_xpm[]={ "13 20 2 1", "# c black", ". c None", "....#####....", "..#########..", ".###########.", ".####...####.", "####.....####", "####.........", "####.........", "####.#####...", "###########..", "############.", "#####...####.", "####.....####", "####.....####", "####.....####", "####.....####", "####.....####", ".####...####.", ".###########.", "..#########..", "....#####...."}; calcoo-1.3.18/src/pixmaps/d7.xpm0000644000175000017500000000063510661637161013310 00000000000000/* XPM */ static char *d7_xpm[]={ "13 20 2 1", ". c black", " c None", ".............", ".............", ".............", " .....", " ..... ", " .... ", " .... ", " ..... ", " .... ", " ..... ", " .... ", " .... ", " .... ", " ..... ", " .... ", " .... ", " .... ", " .... ", " .... ", " .... "}; calcoo-1.3.18/src/pixmaps/opower.xpm0000644000175000017500000000103010661637161014277 00000000000000/* XPM */ static char * opower_xpm[] = { /* width height num_colors chars_per_pixel */ "20 16 2 1", /* colors */ " c None", ". c black", /* pixels */ " ", " ", " ", " .. ", " .... ", " ...... ", " ... ... ", " .. .. ", " ", " ", " ", " ", " ", " ", " ", " "}; calcoo-1.3.18/src/pixmaps/minus.xpm0000644000175000017500000000242710661637161014132 00000000000000/* XPM */ static char * minus_xpm[] = { /* width height num_colors chars_per_pixel */ "32 32 2 1", /* colors */ " c None", ". c black", /* pixels */ " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ................. ", " ................. ", " ................. ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "}; calcoo-1.3.18/src/pixmaps/b3.xpm0000644000175000017500000000242410661637161013300 00000000000000/* XPM */ static char * b3_xpm[] = { /* width height num_colors chars_per_pixel */ "32 32 2 1", /* colors */ " c None", ". c black", /* pixels */ " ", " ", " ", " ", " ", " ", " ", " ....... ", " ......... ", " ........... ", " ... ... ", " ... ... ", " ... ", " ... ", " ....... ", " ...... ", " ....... ", " ... ", " ... ", " ... ... ", " ... ... ", " ........... ", " ......... ", " ....... ", " ", " ", " ", " ", " ", " ", " ", " "}; calcoo-1.3.18/src/pixmaps/sin.xpm0000644000175000017500000000231510661637161013564 00000000000000/* XPM */ static char * sin_xpm[] = { "32 32 2 1", " c None", ". c black", " ", " ", " ", " ", " ", " ", " ", " ", " .. ", " .. ", " ", " ...... .. ..... ", " ....... .. ...... ", " .. .. .. .. ", " ...... .. .. .. ", " ...... .. .. .. ", " .. .. .. .. ", " .. .. .. .. ", " ....... .. .. .. ", " ...... .. .. .. ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "}; calcoo-1.3.18/src/pixmaps/ominus.xpm0000644000175000017500000000103010661637161014276 00000000000000/* XPM */ static char * ominus_xpm[] = { /* width height num_colors chars_per_pixel */ "20 16 2 1", /* colors */ " c None", ". c black", /* pixels */ " ", " ", " ", " ", " ", " ", " ", " ........ ", " ........ ", " ", " ", " ", " ", " ", " ", " "}; calcoo-1.3.18/src/pixmaps/cos.xpm0000644000175000017500000000231510661637161013557 00000000000000/* XPM */ static char * cos_xpm[] = { "32 32 2 1", " c None", ". c black", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ..... ..... ...... ", " ...... ....... ....... ", " .. .. .. .. ", " .. .. .. ...... ", " .. .. .. ...... ", " .. .. .. .. ", " .. .. .. .. ", " ...... ....... ....... ", " ..... ..... ...... ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "}; calcoo-1.3.18/src/pixmaps/de.xpm0000644000175000017500000000063510661637161013366 00000000000000/* XPM */ static char *de_xpm[]={ "13 20 2 1", "# c black", ". c None", ".............", ".............", ".............", ".............", ".............", "....#####....", "..#########..", ".###########.", ".####...####.", "####.....####", "####.....####", "#############", "#############", "#############", "####.........", "####.........", ".####...####.", ".###########.", "..##########.", "....######..."}; calcoo-1.3.18/src/pixmaps/x_to_mem.xpm0000644000175000017500000000232110661637161014577 00000000000000/* XPM */ static char *x_to_mem_xpm[]={ "32 32 2 1", ". c None", "# c #000000", "................................", "................................", "................................", "................................", "................................", "................................", "................................", "................................", "................................", "................................", "................................", "..........#####..###............", "..........######.####...........", "..........##...##...##..........", "..........##...##...##..........", "..........##...##...##..........", "..........##...##...##..........", "..........##...##...##..........", "..........##...##...##..........", "..........##...##...##..........", "................................", "................................", "................................", "................................", "................................", "................................", "................................", "................................", "................................", "................................", "................................", "................................"}; calcoo-1.3.18/src/pixmaps/tick.xpm0000644000175000017500000000014110661637161013720 00000000000000/* XPM */ static char * tick_xpm[] = { "3 3 2 1", " c black", ". c None", " ", ". .", "..."}; calcoo-1.3.18/src/pixmaps/tan.xpm0000644000175000017500000000231510661637161013555 00000000000000/* XPM */ static char * tan_xpm[] = { "32 32 2 1", " c None", ". c black", " ", " ", " ", " ", " ", " ", " ", " ", " ", " .. ", " .. ", " ...... ..... ..... ", " ...... ....... ...... ", " .. .. .. .. ", " .. ...... .. .. ", " .. ....... .. .. ", " .. .. .. .. .. ", " .. .. ... .. .. ", " .... ....... .. .. ", " .... ... .. .. .. ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "}; calcoo-1.3.18/src/pixmaps/exch_xy.xpm0000644000175000017500000000233210661637161014441 00000000000000/* XPM */ static char * exch_xy_xpm[] = { "32 32 2 1", " s None c None", ". c #000000", " ", " ", " ", " ", " ", " ", " . ", " .. ", " ... ", " ... ", " .. .. ... .. .. ", " ... ... ... .. .. ", " ..... ... .. .. ", " ... .. . .. .. ", " ... . .. .. .. ", " ... ... .. .. ", " ..... ... .. .. ", " ... ... ... ....... ", " .. .. ... ...... ", " ... .. ", " .. ...... ", " . ..... ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "}; calcoo-1.3.18/src/pixmaps/l0.xpm0000644000175000017500000000024110661637161013302 00000000000000/* XPM */ static char *l0_xpm[]={ "6 9 2 1", "# c black", ". c None", ".####.", "##..##", "##..##", "##..##", "##..##", "##..##", "##..##", "##..##", ".####."}; calcoo-1.3.18/src/pixmaps/b10tox.xpm0000644000175000017500000000233110661637161014106 00000000000000/* XPM */ static char * b10tox_xpm[] = { "32 32 2 1", " s None c None", ". c #000000", " ", " ", " ", " ", " ", " ", " .. .. ", " ... ... ", " ..... ", " ... ", " .. ..... ... ", " ... ....... ..... ", " .... .. .. ... ... ", " .. .. .. .. .. ", " .. .. .. ", " .. .. .. ", " .. .. .. ", " .. .. .. ", " .. .. .. ", " .. ....... ", " .. ..... ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "}; calcoo-1.3.18/src/pixmaps/div.xpm0000644000175000017500000000242510661637161013557 00000000000000/* XPM */ static char * div_xpm[] = { /* width height num_colors chars_per_pixel */ "32 32 2 1", /* colors */ " c None", ". c black", /* pixels */ " ", " ", " ", " ", " ", " ", " ... ", " ... ", " ... ", " ... ", " ... ", " ... ", " ... ", " ... ", " ... ", " ... ", " ... ", " ... ", " ... ", " ... ", " ... ", " ... ", " ... ", " ... ", " ... ", " ... ", " ", " ", " ", " ", " ", " "}; calcoo-1.3.18/src/pixmaps/clear_x.xpm0000644000175000017500000000233210661637161014407 00000000000000/* XPM */ static char * clear_x_xpm[] = { "32 32 2 1", " s None c None", ". c #000000", " ", " ", " ", " ", " ", " ", " ", " ...... ", " ........ ", " .. .. ", " .. .. ", " .. .. .. ", " .. ... ... ", " .. ..... ", " .. ... ", " .. ... ", " .. .. ... ", " .. .. ..... ", " ........ ... ... ", " ...... .. .. ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "}; calcoo-1.3.18/src/pixmaps/copy.xpm0000644000175000017500000000121610661637161013744 00000000000000/* XPM */ static char * copy_xpm[] = { "32 16 2 1", " c None", ". c black", " ", " ", " ", " ", " .... .... ..... .. .. ", " ..... ...... ...... .. .. ", " .. .. .. .. .. .. .. ", " .. .. .. .. .. .. .. ", " .. .. .. .. .. .. .. ", " ..... ...... ...... ...... ", " .... .... ..... ..... ", " .. .. ", " .. ..... ", " .. .... ", " ", " "}; calcoo-1.3.18/src/pixmaps/b1.xpm0000644000175000017500000000242410661637161013276 00000000000000/* XPM */ static char * b1_xpm[] = { /* width height num_colors chars_per_pixel */ "32 32 2 1", /* colors */ " c None", ". c black", /* pixels */ " ", " ", " ", " ", " ", " ", " ", " ... ", " .... ", " ..... ", " ...... ", " ...... ", " ... ", " ... ", " ... ", " ... ", " ... ", " ... ", " ... ", " ... ", " ... ", " ... ", " ... ", " ... ", " ", " ", " ", " ", " ", " ", " ", " "}; calcoo-1.3.18/src/pixmaps/d2.xpm0000644000175000017500000000063510661637161013303 00000000000000/* XPM */ static char *d2_xpm[]={ "13 20 2 1", ". c black", " c None", " ..... ", " ......... ", " ........... ", " .... .... ", ".... ....", ".... ....", " ....", " ....", " .... ", " ..... ", " ..... ", " ..... ", " ..... ", " ..... ", " ..... ", " .... ", " .... ", " ............", ".............", "............."}; calcoo-1.3.18/src/pixmaps/left_paren.xpm0000644000175000017500000000243410661637161015114 00000000000000/* XPM */ static char * left_paren_xpm[] = { /* width height num_colors chars_per_pixel */ "32 32 2 1", /* colors */ " c None", ". c black", /* pixels */ " ", " ", " ", " ", " ", " .. ", " .. ", " .. ", " .. ", " .. ", " .. ", " .. ", " .. ", " .. ", " .. ", " .. ", " .. ", " .. ", " .. ", " .. ", " .. ", " .. ", " .. ", " .. ", " .. ", " .. ", " ", " ", " ", " ", " ", " "}; calcoo-1.3.18/src/pixmaps/empty.xpm0000644000175000017500000000010510661637161014124 00000000000000/* XPM */ static char * empty_xpm[] = { "1 1 1 1", " c None", " "}; calcoo-1.3.18/src/pixmaps/oplus.xpm0000644000175000017500000000102710661637161014134 00000000000000/* XPM */ static char * oplus_xpm[] = { /* width height num_colors chars_per_pixel */ "20 16 2 1", /* colors */ " c None", ". c black", /* pixels */ " ", " ", " ", " ", " .. ", " .. ", " .. ", " ........ ", " ........ ", " .. ", " .. ", " .. ", " ", " ", " ", " "}; calcoo-1.3.18/src/pixmaps/l2.xpm0000644000175000017500000000024110661637161013304 00000000000000/* XPM */ static char *l2_xpm[]={ "6 9 2 1", "# c black", ". c None", ".####.", "##..##", "....##", "....##", "...##.", "..##..", ".##...", "##....", "######"}; calcoo-1.3.18/src/pixmaps/ot.xpm0000644000175000017500000000062410661637161013416 00000000000000/* XPM */ static char * ot_xpm[] = { /* width height num_colors chars_per_pixel */ "12 16 2 1", /* colors */ " c None", ". c black", /* pixels */ " ", " ", " .. ", " .. ", " ...... ", " ...... ", " .. ", " .. ", " .. ", " .. ", " .. ", " .... ", " ... ", " ", " ", " "}; calcoo-1.3.18/src/pixmaps/push.xpm0000644000175000017500000000242610661637161013755 00000000000000/* XPM */ static char * push_xpm[] = { /* width height num_colors chars_per_pixel */ "32 32 2 1", /* colors */ " c None", ". c black", /* pixels */ " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ... ", " ... ", " ... ... ", " .... ... ", " .... ... ", " .... ... ", " ................. ", " .................. ", " ................. ", " .... ", " .... ", " .... ", " ... ", " ", " ", " ", " ", " ", " ", " ", " ", " "}; calcoo-1.3.18/src/pixmaps/d0.xpm0000644000175000017500000000063510661637161013301 00000000000000/* XPM */ static char *d0_xpm[]={ "13 20 2 1", ". c black", " c None", " ..... ", " ......... ", " ........... ", " .... .... ", ".... ....", ".... ....", ".... ....", ".... ....", ".... ....", ".... ....", ".... ....", ".... ....", ".... ....", ".... ....", ".... ....", ".... ....", " .... .... ", " ........... ", " ......... ", " ..... "}; calcoo-1.3.18/src/pixmaps/l9.xpm0000644000175000017500000000024110661637161013313 00000000000000/* XPM */ static char *l9_xpm[]={ "6 9 2 1", "# c black", ". c None", ".####.", "##..##", "##..##", "##..##", ".#####", "....##", "....##", "##..##", ".####."}; calcoo-1.3.18/src/pixmaps/d8.xpm0000644000175000017500000000063510661637161013311 00000000000000/* XPM */ static char *d8_xpm[]={ "13 20 2 1", ". c black", " c None", " ..... ", " ......... ", " ........... ", "..... .....", ".... ....", ".... ....", ".... ....", " .... .... ", " ......... ", " ....... ", " ......... ", " .... .... ", ".... ....", ".... ....", ".... ....", ".... ....", "..... .....", " ........... ", " ......... ", " ..... "}; calcoo-1.3.18/src/pixmaps/frm_fix.xpm0000644000175000017500000000123210661637161014422 00000000000000/* XPM */ static char * frm_fix_xpm[] = { "32 16 2 1", " s None c None", ". c #000000", " ", " ", " ", " ... .. ", " .... .. ", " .. ", " .. .. .. .. ", " ...... .. ... ... ", " ...... .. ... ", " .. .. ... ", " .. .. ... ", " .. .. ... ... ", " .. .. .. .. ", " ", " ", " "}; calcoo-1.3.18/src/pixmaps/exp.xpm0000644000175000017500000000232610661637161013571 00000000000000/* XPM */ static char * exp_xpm[] = { "32 32 2 1", " s None c None", ". c #000000", " ", " ", " ", " ", " ", " ", " ", " ", " ... ", " ....... ", " ......... ", " ... ... ", " ... ... ", " ... ... ", " ........... ", " ........... ", " ... ", " ... ", " ... ... ", " ......... ", " ....... ", " ... ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "}; calcoo-1.3.18/src/pixmaps/main.xpm0000644000175000017500000000241010661637161013713 00000000000000/* XPM */ static char * main_xpm[] = { "32 32 6 1", " c None", ". c #0060bf", "X c black", "o c #9c999c", "O c white", "+ c #dedede", " ", " ", " ", " ", "...............................X", "..............................oX", "XO++++++++++++++++++++++++++++oX", "XO++++++++++++++++++++++++++++oX", "XO++XXXXXXXXXXXXXXXXXXXXXXXX++oX", "XO++XoooooooooooXXooXXooXXoO++oX", "XO++Xo++++++++++XX++X++++X+O++oX", "XO++Xo+++++++++++X+++X++XX+O++oX", "XO++XOOOOOOOOOOOOOOOOOOOOOOO++oX", "XO++++++++++++++++++++++++++++oX", "XO++OOo+OOo+OOo+OOo+OOo+OOo+++oX", "XO++OXo+OXo+OXo+OXo+OXo+OXo+++oX", "XO++ooo+ooo+ooo+ooo+ooo+ooo+++oX", "XO++++++++++++++++++++++++++++oX", "XO++OOo+OOo+OOo+OOo+OOo+OOo+++oX", "XO++OXo+OXo+OXo+OXo+OXo+OXo+++oX", "XO++ooo+ooo+ooo+ooo+ooo+ooo+++oX", "XO++++++++++++++++++++++++++++oX", "XO++OOo+OOo+OOo+OOo+OOo+OOo+++oX", "XO++OXo+OXo+OXo+OXo+OXo+OXo+++oX", "XO++ooo+ooo+ooo+ooo+ooo+ooo+++oX", "XO++++++++++++++++++++++++++++oX", "XooooooooooooooooooooooooooooooX", "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", " ", " ", " ", " "}; calcoo-1.3.18/src/pixmaps/odiv.xpm0000644000175000017500000000102610661637161013732 00000000000000/* XPM */ static char * odiv_xpm[] = { /* width height num_colors chars_per_pixel */ "20 16 2 1", /* colors */ " c None", ". c black", /* pixels */ " ", " ", " ", " .. ", " .. ", " .. ", " .. ", " .. ", " .. ", " .. ", " .. ", " .. ", " .. ", " ", " ", " "}; calcoo-1.3.18/src/pixmaps/exclamation.xpm0000644000175000017500000000233610661637161015302 00000000000000/* XPM */ static char * exclamation_xpm[] = { "32 32 2 1", " s None c None", ". c #000000", " ", " ", " ", " ", " ", " ", " ", " ... ", " ... ", " ..... ", " ..... ", " ..... ", " ..... ", " ..... ", " ... ", " ... ", " ... ", " ... ", " ... ", " ... ", " ", " ... ", " ... ", " ... ", " ", " ", " ", " ", " ", " ", " ", " "}; calcoo-1.3.18/src/pixmaps/frm_sci.xpm0000644000175000017500000000123210661637161014412 00000000000000/* XPM */ static char * frm_sci_xpm[] = { "32 16 2 1", " s None c None", ". c #000000", " ", " ", " ", " .. ", " .. ", " ", " ..... ..... .. ", " ....... ....... .. ", " .. .. .. ", " ..... .. .. ", " .. .. .. ", " ....... ....... .. ", " ..... ..... .. ", " ", " ", " "}; calcoo-1.3.18/src/pixmaps/curr_mem.xpm0000644000175000017500000000073210661637161014605 00000000000000/* XPM */ static char * curr_mem_xpm[] = { /* width height num_colors chars_per_pixel */ "16 16 2 1", /* colors */ ". c black", " c None", /* pixels */ " ", " ", " ", " . ", " ... ", " ..... ", " ....... ", " ......... ", " ....... ", " ..... ", " ... ", " . ", " ", " ", " ", " "}; calcoo-1.3.18/src/defaults.h0000644000175000017500000000442207652065702012547 00000000000000/* * Calcoo: defaults.h * * Copyright (C) 2001, 2002, 2003 Alexei Kaminski * */ #ifndef DEFAULTS_H #define DEFAULTS_H #include "codes.h" #include "const.h" #define DEFAULT_TOOLTIP_DELAY 1500 /* in milliseconds */ #define UNDO_STACK_SIZE 64 #define DEFAULT_DISPLAY_FORMAT FORMAT_FIX /* the other possible choices are FORMAT_EXP and FORMAT_ENG */ /**************************************************** * inner precision; used in init_cpu() in c_main.c * ****************************************************/ #define MAXIMIZE_PRECISION TRUE /* *********************************************** * the following options are overridden with * * the settings found in $HOME/.calcoo file * *************************************************/ #define DEFAULT_ANGLE_UNITS CODE_DEG /* possible choices: CODE_RAD and CODE_DEG */ #define DEFAULT_RPN_MODE FALSE #define DEFAULT_ENTER_MODE ENTER_MODE_TRADITIONAL /* possible choices: ENTER_MODE_TRADITIONAL and ENTER_MODE_HP28 */ #define DEFAULT_STACK_MODE STACK_MODE_XYZT /* possible choices: STACK_MODE_XYZT and STACK_MODE_INFINITE */ #define DEFAULT_ARC_AUTORELEASE TRUE #define DEFAULT_HYP_AUTORELEASE TRUE #define DEFAULT_TRUNC_ZEROS_MODE TRUE /************************************************** * options dealing with the default color * * for button icons and display glyphs * **************************************************/ #define CONVERT_ICONS_TO_FOREGROUND_COLOR TRUE /* is FALSE, the original pixmap colors will be preserved */ #define GTK_STATE_FOR_CALCOO_FOREGROUND_COLOR GTK_STATE_PRELIGHT /* Some other sensible choices are GTK_STATE_NORMAL, GTK_STATE_ACTIVE, * GTK_STATE_SELECTED. Actually it strongly depends on the GTK * color scheme you are using, so the choice is yours */ /******************************************************** * debugging * * CALCOO_DEBUG is defined through the configure script * ********************************************************/ #ifdef CALCOO_DEBUG #define REPORT_NONCRITICAL_ERRORS TRUE #define DEBUG_MESSAGES_ON TRUE /* the ones output by mess() and messd() */ #else #define REPORT_NONCRITICAL_ERRORS FALSE #define DEBUG_MESSAGES_ON FALSE /* the ones output by mess() and messd() */ #endif #endif /* DEFAULTS_H */ calcoo-1.3.18/src/cpu.h0000644000175000017500000000346307516122300011516 00000000000000/* * Calcoo: cpu.h * * Copyright (C) 2001,2002 Alexei Kaminski * */ #ifndef CPU_H #define CPU_H #include "basic.h" #include "displays.h" #define INPUT_FIELD_INT 1 #define INPUT_FIELD_FRAC 2 #define INPUT_FIELD_EXP 3 typedef struct tse { double z; int op; int number_of_parens ; struct tse *next; } t_stack_element; /* Attention! This structures are being copied during pushing and popping * of the undo stack. All changes in the strucure t_calcoo_cpu must be * accompanied by proper modifications of copy_cpu() function in cpu_undo.c. * Also all substructures of t_calcoo_cpu that need to be malloc'ed must * be also malloc'ed in init_undo_stack() in cpu_undo.c * Also don't forget cpu initalization in c_main.c! */ typedef struct tcd { int input_field, sign, exp_sign; int int_field[INPUT_LENGTH]; int frac_field[INPUT_LENGTH]; int exp_field[EXP_INPUT_LENGTH]; int n_int,n_frac; int format; int display_overflow; } t_cpu_display ; typedef struct tcod { int op_code; int show_brace; } t_cpu_operation_display ; typedef struct t_c_s { double x, y, z, t, mem[NUMBER_OF_MEMS]; int op, number_of_parens; t_stack_element *stack_head; t_cpu_display *d, *mem_d[NUMBER_OF_MEMS], *reg_d[NUMBER_OF_REG_DISPLAYS]; t_cpu_operation_display *op_d[NUMBER_OF_REG_DISPLAYS]; int last_action; double precision; int x_overflow; int prescribed_format; int rounding; int trunc_zeros; int digits_to_keep; int curr_mem; int error; /* the following are set by the loaded options and need not to be * initialized or saved in undo */ int rpn_mode, enter_mode, stack_mode, angle_units; /* arc_ and hyp_autorelease state is stored in the body, see body.h */ } t_calcoo_cpu ; extern t_calcoo_cpu *cpu; /* the variable cpu itself is defined in c_main.c */ #endif /* CPU_H */ calcoo-1.3.18/src/b_pixmaps.c0000644000175000017500000001562107502143243012707 00000000000000/* * Calcoo: b_pixmaps.c * * Copyright (C) 2001 Alexei Kaminski * * determines pixmaps to be used * */ #include #include "codes.h" #include "displays.h" #include "b_headers.h" /* loading pixmaps for button icons */ #include "pixmaps/b0.xpm" #include "pixmaps/b1.xpm" #include "pixmaps/b2.xpm" #include "pixmaps/b3.xpm" #include "pixmaps/b4.xpm" #include "pixmaps/b5.xpm" #include "pixmaps/b6.xpm" #include "pixmaps/b7.xpm" #include "pixmaps/b8.xpm" #include "pixmaps/b9.xpm" #include "pixmaps/plus.xpm" #include "pixmaps/minus.xpm" #include "pixmaps/mult.xpm" #include "pixmaps/div.xpm" #include "pixmaps/eq.xpm" #include "pixmaps/cos.xpm" #include "pixmaps/sin.xpm" #include "pixmaps/tan.xpm" #include "pixmaps/arc.xpm" #include "pixmaps/hyp.xpm" #include "pixmaps/sqr.xpm" #include "pixmaps/etox.xpm" #include "pixmaps/b10tox.xpm" #include "pixmaps/power.xpm" #include "pixmaps/pi.xpm" #include "pixmaps/log.xpm" #include "pixmaps/ln.xpm" #include "pixmaps/fact.xpm" #include "pixmaps/invx.xpm" #include "pixmaps/sqrt.xpm" #include "pixmaps/exp.xpm" #include "pixmaps/exp_sign.xpm" #include "pixmaps/sign.xpm" #include "pixmaps/clear_x.xpm" #include "pixmaps/dot.xpm" #include "pixmaps/undo.xpm" #include "pixmaps/redo.xpm" #include "pixmaps/clear_all.xpm" #include "pixmaps/exch_xy.xpm" #include "pixmaps/down.xpm" #include "pixmaps/up.xpm" #include "pixmaps/mem_plus.xpm" #include "pixmaps/mem_to_x.xpm" #include "pixmaps/x_to_mem.xpm" #include "pixmaps/exch_xmem.xpm" #include "pixmaps/question.xpm" #include "pixmaps/exclamation.xpm" #include "pixmaps/left_paren.xpm" #include "pixmaps/right_paren.xpm" #include "pixmaps/copy.xpm" #include "pixmaps/paste.xpm" #include "pixmaps/push.xpm" #include "pixmaps/curr_mem.xpm" /* pixmaps for the main display */ #include "pixmaps/d0.xpm" #include "pixmaps/d1.xpm" #include "pixmaps/d2.xpm" #include "pixmaps/d3.xpm" #include "pixmaps/d4.xpm" #include "pixmaps/d5.xpm" #include "pixmaps/d6.xpm" #include "pixmaps/d7.xpm" #include "pixmaps/d8.xpm" #include "pixmaps/d9.xpm" #include "pixmaps/ddot.xpm" #include "pixmaps/de.xpm" #include "pixmaps/dplus.xpm" #include "pixmaps/dminus.xpm" #include "pixmaps/derror.xpm" #include "pixmaps/tick.xpm" /* pixmaps for little displays */ #include "pixmaps/l0.xpm" #include "pixmaps/l1.xpm" #include "pixmaps/l2.xpm" #include "pixmaps/l3.xpm" #include "pixmaps/l4.xpm" #include "pixmaps/l5.xpm" #include "pixmaps/l6.xpm" #include "pixmaps/l7.xpm" #include "pixmaps/l8.xpm" #include "pixmaps/l9.xpm" #include "pixmaps/ldot.xpm" #include "pixmaps/le.xpm" #include "pixmaps/lplus.xpm" #include "pixmaps/lminus.xpm" #include "pixmaps/lerror.xpm" /* pixmaps for the operation displays */ #include "pixmaps/oplus.xpm" #include "pixmaps/ominus.xpm" #include "pixmaps/omult.xpm" #include "pixmaps/odiv.xpm" #include "pixmaps/opower.xpm" #include "pixmaps/obrace.xpm" /* pixmaps for the deg/rad switch */ #include "pixmaps/deg.xpm" #include "pixmaps/rad.xpm" /* pixmaps for the display format switch */ #include "pixmaps/frm_sci.xpm" #include "pixmaps/frm_fix.xpm" #include "pixmaps/frm_eng.xpm" /* pixmaps for the display labels */ #include "pixmaps/oy.xpm" #include "pixmaps/oz.xpm" #include "pixmaps/ot.xpm" /* pixmap for buttons without labels */ #include "pixmaps/empty.xpm" void assign_pixmaps(char ***button_xpm, char ***digit_xpm, char ***ldigit_xpm, char ***op_xpm, char ***deg_rad_xpm, char ***format_xpm, char ***reg_display_label_xpm) { /* Main display */ digit_xpm[0] = d0_xpm; digit_xpm[1] = d1_xpm; digit_xpm[2] = d2_xpm; digit_xpm[3] = d3_xpm; digit_xpm[4] = d4_xpm; digit_xpm[5] = d5_xpm; digit_xpm[6] = d6_xpm; digit_xpm[7] = d7_xpm; digit_xpm[8] = d8_xpm; digit_xpm[9] = d9_xpm; digit_xpm[D_E] = de_xpm; digit_xpm[D_PLUS] = dplus_xpm; digit_xpm[D_MINUS] = dminus_xpm; digit_xpm[D_DOT] = ddot_xpm; digit_xpm[D_TICK] = tick_xpm; digit_xpm[D_OVERFLOW] = derror_xpm; /* Little displays */ ldigit_xpm[0] = l0_xpm; ldigit_xpm[1] = l1_xpm; ldigit_xpm[2] = l2_xpm; ldigit_xpm[3] = l3_xpm; ldigit_xpm[4] = l4_xpm; ldigit_xpm[5] = l5_xpm; ldigit_xpm[6] = l6_xpm; ldigit_xpm[7] = l7_xpm; ldigit_xpm[8] = l8_xpm; ldigit_xpm[9] = l9_xpm; ldigit_xpm[D_E] = le_xpm; ldigit_xpm[D_PLUS] = lplus_xpm; ldigit_xpm[D_MINUS] = lminus_xpm; ldigit_xpm[D_DOT] = ldot_xpm; ldigit_xpm[D_TICK] = empty_xpm; ldigit_xpm[D_OVERFLOW] = lerror_xpm; /* Operation displays */ op_xpm[OD_ADD] = oplus_xpm; op_xpm[OD_SUB] = ominus_xpm; op_xpm[OD_MUL] = omult_xpm; op_xpm[OD_DIV] = odiv_xpm; op_xpm[OD_POW] = opower_xpm; op_xpm[OD_PAREN] = obrace_xpm; /* Labels for the register displays */ reg_display_label_xpm[0] = oy_xpm; reg_display_label_xpm[1] = oz_xpm; reg_display_label_xpm[2] = ot_xpm; /* deg/rad switch */ deg_rad_xpm[DRD_DEG] = deg_xpm; deg_rad_xpm[DRD_RAD] = rad_xpm; /* format switch */ format_xpm[FD_FIX] = frm_fix_xpm; format_xpm[FD_SCI] = frm_sci_xpm; format_xpm[FD_ENG] = frm_eng_xpm; /* Button labels */ button_xpm[CODE_INFO] = question_xpm; button_xpm[CODE_SETTINGS] = exclamation_xpm; button_xpm[CODE_DEG_RAD] = empty_xpm; button_xpm[CODE_FORMAT] = empty_xpm; button_xpm[CODE_COPY] = copy_xpm; button_xpm[CODE_PASTE] = paste_xpm; button_xpm[CODE_SIN] = sin_xpm; button_xpm[CODE_COS] = cos_xpm; button_xpm[CODE_TAN] = tan_xpm; button_xpm[CODE_ARC] = arc_xpm; button_xpm[CODE_HYP] = hyp_xpm; button_xpm[CODE_SQR] = sqr_xpm; button_xpm[CODE_SQRT] = sqrt_xpm; button_xpm[CODE_ETOX] = etox_xpm; button_xpm[CODE_LN] = ln_xpm; button_xpm[CODE_10TOX] = b10tox_xpm; button_xpm[CODE_LOG] = log_xpm; button_xpm[CODE_INVX] = invx_xpm; button_xpm[CODE_PI] = pi_xpm; button_xpm[CODE_FACT] = fact_xpm; button_xpm[CODE_0] = b0_xpm; button_xpm[CODE_1] = b1_xpm; button_xpm[CODE_2] = b2_xpm; button_xpm[CODE_3] = b3_xpm; button_xpm[CODE_4] = b4_xpm; button_xpm[CODE_5] = b5_xpm; button_xpm[CODE_6] = b6_xpm; button_xpm[CODE_7] = b7_xpm; button_xpm[CODE_8] = b8_xpm; button_xpm[CODE_9] =b9_xpm; button_xpm[CODE_SIGN] = sign_xpm; button_xpm[CODE_DOT] = dot_xpm; button_xpm[CODE_EXP] = exp_xpm; button_xpm[CODE_EXP_SIGN] = exp_sign_xpm; button_xpm[CODE_ADD] = plus_xpm; button_xpm[CODE_SUB] = minus_xpm; button_xpm[CODE_MUL] = mult_xpm; button_xpm[CODE_DIV] = div_xpm; button_xpm[CODE_POW] = power_xpm; button_xpm[CODE_UNDO] = undo_xpm; button_xpm[CODE_REDO] = redo_xpm; button_xpm[CODE_CLEAR_ALL] = clear_all_xpm; button_xpm[CODE_EQ] = eq_xpm; button_xpm[CODE_ENTER] = push_xpm; button_xpm[CODE_EXCH_XY] = exch_xy_xpm; button_xpm[CODE_STACK_DOWN] = down_xpm; button_xpm[CODE_STACK_UP] = up_xpm; button_xpm[CODE_LEFT_PAREN] = left_paren_xpm; button_xpm[CODE_RIGHT_PAREN] = right_paren_xpm; button_xpm[CODE_CLEAR_X] = clear_x_xpm; button_xpm[CODE_X_TO_MEM] = x_to_mem_xpm; button_xpm[CODE_MEM_TO_X] = mem_to_x_xpm; button_xpm[CODE_MEM_PLUS] = mem_plus_xpm; button_xpm[CODE_EXCH_XMEM] = exch_xmem_xpm; button_xpm[CODE_SWITCH_TO_MEM0] = curr_mem_xpm; button_xpm[CODE_SWITCH_TO_MEM1] = curr_mem_xpm; } calcoo-1.3.18/src/aux_headers.h0000644000175000017500000000126507652076454013240 00000000000000/* * Calcoo: aux_headers.h * * Copyright (C) 2001 Alexei Kaminski * */ #ifndef AUX_HEADERS_H #define AUX_HEADERS_H /* aux.c */ int digit_to_code(int); int code_to_digit(int); int binop_to_od(int); int inverse_sign(int); int priority(int); int last_digit(double); int round_double_to_int(double); int fact_too_large(double); double fact_function(double); double fact_function_jr(double); int almost_integer(double, double); double sign_of_double(double) ; double max_fabs(double, double); double smart_sum(double, double, double); void error_occured(char *, int); void mess(char *, int); void messd(char *, double); void verify_malloc(void *); #endif /* AUX_HEADERS_H */ calcoo-1.3.18/src/gtkaux_headers.h0000644000175000017500000000107010233317657013730 00000000000000/* * Calcoo: gtkaux_headers.h * * Copyright (C) 2001 Alexei Kaminski * */ #ifndef GTKAUX_HEADERS_H #define GTKAUX_HEADERS_H void create_n_put_pixmap(GtkWidget **, int, int, char **); void create_fg_pixmap(GtkWidget **, char **); void request_selection(GtkWidget *, gpointer); void get_selection(GtkWidget *, GtkSelectionData *, gpointer); void own_selection( GtkWidget *, gint * ); gboolean selection_clear( GtkWidget *, GdkEventSelection *, gint *); void set_selection(GtkWidget * , GtkSelectionData *, guint, guint, gpointer); #endif /* GTKAUX_HEADERS_H */ calcoo-1.3.18/src/basic.h0000644000175000017500000000111307377033341012011 00000000000000/* * Calcoo: basic.h * * Copyright (C) 2001 Alexei Kaminski * */ #ifndef BASIC_H #define BASIC_H #define INPUT_LENGTH 10 #define EXP_INPUT_LENGTH 2 /* this definition affects only the body. For the cpu, * the base is hard-coded, sorry */ #define BASE 10 #define NUMBER_OF_MEMS 2 /* the maximum number of glyphs in a simple display * the simple displays are: * - the displays for the operations in the stack 6 glyphs (5 ops + paren) * - the deg/rad indicator (2 glyphs) * - the exp/f.p. indicator */ #define SD_G_MAX 6 #define MAX_BUTTON_NUMBER 256 #endif /* BASIC_H */ calcoo-1.3.18/src/io_headers.h0000644000175000017500000000457510233012466013037 00000000000000/* * Calcoo: io_headers.h * * Copyright (C) 2001-2005 Alexei Kaminski * */ #ifndef IO_HEADERS_H #define IO_HEADERS_H /* input.c */ void clicked_code_0(void); void clicked_code_1(void); void clicked_code_2(void); void clicked_code_3(void); void clicked_code_4(void); void clicked_code_5(void); void clicked_code_6(void); void clicked_code_7(void); void clicked_code_8(void); void clicked_code_9(void); void clicked_code_add(void); void clicked_code_sub(void); void clicked_code_mul(void); void clicked_code_div(void); void clicked_code_pow(void); void clicked_code_ln(void); void clicked_code_log(void); void clicked_code_10tox(void); void clicked_code_etox(void); void clicked_code_sqr(void); void clicked_code_sqrt(void); void clicked_code_invx(void); void clicked_code_fact(void); void clicked_code_pi(void); void clicked_code_eq(void); void clicked_code_clear_all(void); void clicked_code_dot(void); void clicked_code_exp(void); void clicked_code_sign(void); void clicked_code_exp_sign(void); void clicked_code_clear_x(void); void clicked_code_mem_to_x(void); void clicked_code_mem_plus(void); void clicked_code_x_to_mem(void); void clicked_code_exch_xmem(void); void clicked_code_switch_to_mem0(void); void clicked_code_switch_to_mem1(void); void clicked_code_exch_xy(void); void clicked_code_stack_up(void); void clicked_code_stack_down(void); void clicked_code_sin(void); void clicked_code_cos(void); void clicked_code_tan(void); void clicked_change_display_format(void); void clicked_code_undo(void); void clicked_code_redo(void); void clicked_code_info(void); void clicked_code_settings(void); void clicked_code_left_paren(void); void clicked_code_right_paren(void); void clicked_code_paste(double); void clicked_code_enter(void); void clicked_set_rpn_mode(int); void clicked_change_angle_units(void); void clicked_set_angle_units(int); int requested_angle_units(void); int requested_rpn_mode(void); void clicked_set_enter_mode(int); int requested_enter_mode(void); void clicked_set_rounding_mode(int); int requested_rounding_mode(void); void clicked_set_trunc_zeros_mode(int); int requested_trunc_zeros_mode(void); void clicked_set_stack_mode(int); int requested_stack_mode(void); /* void clicked_code_exit(void); */ /* output.c */ void refresh_body(void); void enable_undo_button(void); void disable_undo_button(void); void enable_redo_button(void); void disable_redo_button(void); #endif /* IO__HEADERS_H */ calcoo-1.3.18/src/b_info.c0000644000175000017500000002122010661635320012153 00000000000000/* * Calcoo: b_info.c * * Copyright (C) 2001, 2005, 2007 Alexei Kaminski * * creates and operates the info window * * some code used in this file is taken from about.c of * XMMS - Cross-platform multimedia player * Copyright (C) 1998-2000 Peter Alm, Mikael Alm, Olle Hallnas, * Thomas Nilsson, and 4Front Technologies * Copyright (C) 2000 Havard Kvalen */ #include #include #include #include #include #include "body.h" #include "b_headers.h" #include "texts.h" #include "pixmaps/main.xpm" #define INFO_SCROLLWIN_HEIGHT 250 #define INFO_SPACING 10 #define INFO_LINE_SPACING 5 GtkWidget *close_button; gboolean info_key_press_handler(GtkWidget*, GdkEventKey*, gpointer); void call_info (void) { static GtkWidget *info_window = NULL; GtkWidget *info_vbox; GtkWidget *info_notebook; GtkWidget *button_box; GtkWidget *about_vbox, *about_label; GtkWidget *license_vbox, *license_textview, *license_scrollwin; GtkWidget *shortcuts_vbox, *shortcuts_scrollwin; GtkListStore *shortcuts_store; GtkTreeIter shortcuts_iter; GtkWidget *shortcuts_tree; GtkCellRenderer *shortcuts_renderer_right_align, *shortcuts_renderer_left_align; GtkTreeViewColumn *shortcuts_column; GtkWidget *help_vbox, *help_textview, *help_scrollwin; GtkTextBuffer *license_buf, *help_buf; gint i; char *shortcuts_header[3]; if (info_window) return; /* Main info window */ info_window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_title(GTK_WINDOW(info_window), "About Calcoo"); gtk_window_set_resizable(GTK_WINDOW(info_window),TRUE); gtk_container_set_border_width(GTK_CONTAINER(info_window), INFO_SPACING); g_signal_connect(G_OBJECT(info_window), "destroy", GTK_SIGNAL_FUNC(gtk_widget_destroyed), &info_window); g_signal_connect (G_OBJECT (info_window), "key_press_event", G_CALLBACK (info_key_press_handler), NULL); /* this is to have Escape close the window. Creating an accelerator * group does not work, because the accelerator is not called when * a page with a scrollable text (like license) is open */ gtk_widget_realize(info_window); /* Main info window icon */ gtk_window_set_icon (GTK_WINDOW(info_window), gdk_pixbuf_new_from_xpm_data((const char **)main_xpm)); info_vbox = gtk_vbox_new(FALSE, INFO_SPACING); gtk_container_add(GTK_CONTAINER(info_window), info_vbox); info_notebook = gtk_notebook_new(); gtk_box_pack_start(GTK_BOX(info_vbox), info_notebook, TRUE, TRUE, 0); /* About */ about_vbox = gtk_vbox_new(TRUE, INFO_LINE_SPACING); gtk_container_set_border_width(GTK_CONTAINER(about_vbox), INFO_SPACING); i = 0; while (about_text[i] || about_text[i + 1]) { about_label = gtk_label_new(about_text[i]); gtk_box_pack_start(GTK_BOX(about_vbox), about_label, FALSE, FALSE, 0); i++; } gtk_notebook_append_page(GTK_NOTEBOOK(info_notebook), about_vbox, gtk_label_new("About")); /* License */ license_buf = gtk_text_buffer_new(NULL); gtk_text_buffer_set_text(license_buf, license_text, -1); license_textview = gtk_text_view_new_with_buffer(license_buf); gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(license_textview), GTK_WRAP_WORD); gtk_text_view_set_editable(GTK_TEXT_VIEW(license_textview), FALSE); license_scrollwin = gtk_scrolled_window_new(NULL, NULL); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(license_scrollwin), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS); gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(license_scrollwin), GTK_SHADOW_IN); gtk_container_add(GTK_CONTAINER(license_scrollwin), license_textview); license_vbox = gtk_vbox_new(FALSE, INFO_SPACING); gtk_container_set_border_width(GTK_CONTAINER(license_vbox), INFO_SPACING); gtk_box_pack_start(GTK_BOX(license_vbox), license_scrollwin, TRUE, TRUE, 0); gtk_widget_set_size_request(license_scrollwin, -1, INFO_SCROLLWIN_HEIGHT); gtk_notebook_append_page(GTK_NOTEBOOK(info_notebook), license_vbox, gtk_label_new("License")); /* Shortcuts */ shortcuts_header[0] = "Shortcuts"; shortcuts_header[1] = " "; shortcuts_header[2] = "Actions"; shortcuts_store = gtk_list_store_new ( 3, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING); shortcuts_tree = gtk_tree_view_new_with_model(GTK_TREE_MODEL (shortcuts_store)); shortcuts_renderer_right_align = gtk_cell_renderer_text_new(); gtk_object_set( GTK_OBJECT(shortcuts_renderer_right_align), "xalign", 1.0, NULL ); shortcuts_renderer_left_align = gtk_cell_renderer_text_new(); shortcuts_column = gtk_tree_view_column_new_with_attributes (shortcuts_header[0], shortcuts_renderer_right_align, "text", 0, NULL); gtk_tree_view_column_set_alignment(shortcuts_column, 1.0); gtk_tree_view_append_column (GTK_TREE_VIEW (shortcuts_tree), shortcuts_column); shortcuts_column = gtk_tree_view_column_new_with_attributes (shortcuts_header[1], shortcuts_renderer_right_align, "text", 1, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (shortcuts_tree), shortcuts_column); shortcuts_column = gtk_tree_view_column_new_with_attributes (shortcuts_header[2], shortcuts_renderer_left_align, "text", 2, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (shortcuts_tree), shortcuts_column); i = 0; while ( shortcuts_text[i] || shortcuts_text[i + 2]) { gtk_list_store_append (shortcuts_store, &shortcuts_iter); gtk_list_store_set (shortcuts_store, &shortcuts_iter, 0, shortcuts_text[i], 1, " ", 2, shortcuts_text[i+1], -1); i++; i++; } shortcuts_scrollwin = gtk_scrolled_window_new(NULL, NULL); gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW(shortcuts_scrollwin), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS); gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(shortcuts_scrollwin), GTK_SHADOW_IN); gtk_container_add(GTK_CONTAINER(shortcuts_scrollwin), shortcuts_tree); shortcuts_vbox = gtk_vbox_new(FALSE, INFO_SPACING); gtk_container_set_border_width(GTK_CONTAINER(shortcuts_vbox), INFO_SPACING); gtk_box_pack_start(GTK_BOX(shortcuts_vbox), shortcuts_scrollwin, TRUE, TRUE, 0); gtk_widget_set_size_request(shortcuts_scrollwin, -1, INFO_SCROLLWIN_HEIGHT); gtk_notebook_append_page(GTK_NOTEBOOK(info_notebook), shortcuts_vbox, gtk_label_new("Shortcuts")); /* Help */ help_buf = gtk_text_buffer_new(NULL); gtk_text_buffer_set_text(help_buf, help_text, -1); help_textview = gtk_text_view_new_with_buffer(help_buf); gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(help_textview), GTK_WRAP_WORD); gtk_text_view_set_editable(GTK_TEXT_VIEW(help_textview), FALSE); help_scrollwin = gtk_scrolled_window_new(NULL, NULL); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(help_scrollwin), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS); gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(help_scrollwin), GTK_SHADOW_IN); gtk_container_add(GTK_CONTAINER(help_scrollwin), help_textview); help_vbox = gtk_vbox_new(FALSE, INFO_SPACING); gtk_container_set_border_width(GTK_CONTAINER(help_vbox), INFO_SPACING); gtk_box_pack_start(GTK_BOX(help_vbox), help_scrollwin, TRUE, TRUE, 0); gtk_widget_set_size_request(help_scrollwin, -1, INFO_SCROLLWIN_HEIGHT); gtk_notebook_append_page(GTK_NOTEBOOK(info_notebook), help_vbox, gtk_label_new("Help")); /* "Close" button */ button_box = gtk_hbutton_box_new(); gtk_button_box_set_layout(GTK_BUTTON_BOX(button_box), GTK_BUTTONBOX_END); gtk_box_set_spacing(GTK_BOX(button_box), INFO_SPACING); gtk_box_pack_start(GTK_BOX(info_vbox), button_box, FALSE, FALSE, 0); close_button = gtk_button_new_with_label("Close"); g_signal_connect_swapped(G_OBJECT(close_button), "clicked", GTK_SIGNAL_FUNC(gtk_widget_destroy), G_OBJECT(info_window)); gtk_box_pack_start(GTK_BOX(button_box), close_button, TRUE, TRUE, 0); gtk_widget_show_all(info_window); } void process_options(char *argv1) { if ( !strcmp(argv1,"-v") || !strcmp(argv1,"--version")) output_text(version_console); else if ( !strcmp(argv1,"-h") || !strcmp(argv1,"--help")) output_text(help_console); else output_text(invalid_console); } void output_text(char **t) { int i; for ( i = 0; t[i] != NULL; i++ ) printf("%s\n",t[i]); } gboolean info_key_press_handler(GtkWidget* widget, GdkEventKey* event, gpointer data) { switch (event->keyval) { case GDK_Escape: g_signal_emit_by_name(G_OBJECT(close_button), "clicked"); return TRUE; default: /* passing for further processing */ return FALSE; } } calcoo-1.3.18/src/const.h0000644000175000017500000000036107312043174012054 00000000000000/* * Calcoo: const.h * * Copyright (C) 2001 Alexei Kaminski * */ #ifndef CONST_H #define CONST_H #ifndef TRUE #define TRUE 1 #endif #ifndef FALSE #define FALSE 0 #endif #define PI 3.141592653589793238462643383 #endif /* CONST_H */ calcoo-1.3.18/src/b_main.c0000644000175000017500000001061410653053773012160 00000000000000/* * Calcoo: b_main.c * * Copyright (C) 2001-2005 Alexei Kaminski * */ #include #include #include "codes.h" #include "body.h" #include "defaults.h" #include "b_headers.h" #include "gtkaux_headers.h" #include "io_headers.h" #include "aux_headers.h" #include "b_accel_headers.h" #include "pixmaps/main.xpm" t_calcoo_body *body; void create_body(void) { malloc_body(); malloc_displays(); /* these displays are not widgets, but structures to * store information what to display in the * corresponding widgets */ create_widgets(); } void malloc_body(void) { body = (t_calcoo_body*) malloc(sizeof(t_calcoo_body)); } void create_main_window(int w, int h) { //GdkPixmap *main_pixmap; //GdkBitmap *main_mask; int i; /* Main widget */ body->main_window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_window_set_title (GTK_WINDOW (body->main_window), "Calcoo"); gtk_container_set_border_width (GTK_CONTAINER (body->main_window), 0); gtk_widget_set_size_request(body->main_window, w, h); gtk_window_set_resizable (GTK_WINDOW (body->main_window), FALSE); g_signal_connect (G_OBJECT (body->main_window), "delete_event", GTK_SIGNAL_FUNC (gtk_main_quit), NULL); g_signal_connect (G_OBJECT (body->main_window), "destroy", GTK_SIGNAL_FUNC (gtk_main_quit), NULL); g_signal_connect (G_OBJECT (body->main_window), "key_press_event", GTK_SIGNAL_FUNC (key_press_handler), NULL); g_signal_connect (G_OBJECT (body->main_window), "button_press_event", GTK_SIGNAL_FUNC (button_press_handler), NULL); gtk_widget_set_events (body->main_window, GDK_BUTTON_PRESS_MASK ); gtk_widget_show (body->main_window); body->style = gtk_style_copy ( gtk_widget_get_style (body->main_window) ); /* Main window icon */ /* main_pixmap = gdk_pixmap_create_from_xpm_d ( (body->main_window)->window, &main_mask, &(body->style)->bg[GTK_STATE_NORMAL], (gchar **) main_xpm ); gdk_window_set_icon (body->main_window->window, NULL, main_pixmap, main_mask); */ gtk_window_set_icon (GTK_WINDOW(body->main_window), gdk_pixbuf_new_from_xpm_data((const char **)main_xpm)); /* Fixer to fix the button positions and sizes */ body->fixer = gtk_fixed_new(); gtk_container_add (GTK_CONTAINER(body->main_window), body->fixer); gtk_widget_show (body->fixer); /* Button tooltips */ body->button_tooltips = gtk_tooltips_new(); //gtk_tooltips_set_delay(body->button_tooltips, DEFAULT_TOOLTIP_DELAY); /* Setting all button pointers to NULL in order to be able to tell * existing from non-existing buttons when making all the buttons * active/non-active, like after an error */ for (i = 0; i < MAX_BUTTON_NUMBER; i++) body->button[i] = NULL; gtk_widget_show (body->main_window); } void set_rpn_mode(int a) { if (a) { show_button(CODE_ENTER); show_button(CODE_STACK_DOWN); show_button(CODE_STACK_UP); hide_button(CODE_EQ); hide_button(CODE_RIGHT_PAREN); hide_button(CODE_LEFT_PAREN); } else { show_button(CODE_EQ); show_button(CODE_RIGHT_PAREN); show_button(CODE_LEFT_PAREN); hide_button(CODE_ENTER); hide_button(CODE_STACK_DOWN); hide_button(CODE_STACK_UP); } clicked_set_rpn_mode(a); } /* One may wonder why we introduce all these get_ and set_ functions below, * which do not do anything but passing the requests further. The answer is * that they pass it directly to the cpu, and we may still need to do something * in the body. It is the case for set_rpn_mode(). It is not the case for the * other functions, but since it may be the case in the future and also for * uniformity, we decided to have these functions. */ int get_rpn_mode(void) { return requested_rpn_mode(); } void set_enter_mode(int a) { clicked_set_enter_mode(a); } int get_rounding_mode(void) { return requested_rounding_mode(); } void set_rounding_mode(int a) { clicked_set_rounding_mode(a); } int get_trunc_zeros_mode(void) { return requested_trunc_zeros_mode(); } void set_trunc_zeros_mode(int a) { clicked_set_trunc_zeros_mode(a); } int get_enter_mode(void) { return requested_enter_mode(); } void set_stack_mode(int a) { clicked_set_stack_mode(a); } int get_stack_mode(void) { return requested_stack_mode(); } int get_angle_units(void) { return requested_angle_units(); } void set_angle_units(int a) { clicked_set_angle_units(a); } void call_exit(void) { gtk_main_quit(); } calcoo-1.3.18/src/c_op.c0000644000175000017500000003204107652076627011661 00000000000000/* * Calcoo: c_op.c * * Copyright (C) 2001, 2002, 2003 Alexei Kaminski * * handles keypressings for arithmetic and algebraic operations * and also "=" key, push key, paren keys, and register swap (exchange) keys */ #include #include #include #include "codes.h" #include "const.h" #include "cpu.h" #include "c_headers.h" #include "io_headers.h" #include "aux_headers.h" void perform_binary_operation(void); void perform_binop_chain(int, int); int no_open_parens(void); void call_binary_op(int received_code) { if (cpu->last_action == ACTION_INPUT) input_to_x(); if (cpu->rpn_mode) { cpu->op = received_code; perform_binary_operation(); pop_stack(); cpu->last_action = ACTION_ENTER; /* no need to use ACTION_BINOP in RPN */ } else { if (cpu->op == CODE_NO_OPERATION) { cpu->y = cpu->x; cpu->last_action = ACTION_BINOP; cpu->op = received_code; cpu->number_of_parens = 0; } else { if(priority(received_code) > priority (cpu->op) || cpu->number_of_parens > 0 ) { push_stack(); cpu->y = cpu->x; cpu->op = received_code; cpu->number_of_parens = 0; cpu->last_action = ACTION_BINOP; } else { perform_binop_chain(priority(received_code), FALSE); push_stack(); cpu->y = cpu->x; cpu->op = received_code; cpu->number_of_parens = 0; cpu->last_action = ACTION_BINOP; } } } aftermath(); } void perform_binary_operation(void) /* aux function; makes only one binop itself, no other operations; * is called by other functions like call_binary_op(), call_eq() */ { switch (cpu->op) { case CODE_ADD : cpu->x = smart_sum(cpu->y, cpu->x, cpu->precision); break; case CODE_SUB : cpu->x = smart_sum(cpu->y, -cpu->x, cpu->precision); break; case CODE_MUL : cpu->x = cpu->y * cpu->x; break; case CODE_DIV : if (cpu->x != 0.0) cpu->x = cpu->y / cpu->x; else cpu->x_overflow = TRUE; break; case CODE_POW : if ( !( (cpu->y == 0 && cpu->x <= 0) || (cpu->y < 0 && (cpu->x != floor(cpu->x))) ) ) cpu->x = pow(cpu->y, cpu->x); else cpu->x_overflow = TRUE; break; case CODE_NO_OPERATION : break; } cpu->op = CODE_NO_OPERATION; } void perform_binop_chain(int init_priority, int paren_closed) /* aux function; performs the chain of binary operations from the stack, * stopping the chain at a paren or at a lower-priority operation */ { if (paren_closed) { /* if paren_closed == TRUE, it means there were open parens * it have been found in call_right_paren() */ if (cpu->number_of_parens > 0){ /* handling a weird case of one number in parens, like 2+(3) */ cpu->number_of_parens--; return; } else { while ( cpu->number_of_parens == 0 ) { perform_binary_operation(); pop_stack(); } cpu->number_of_parens--; } } else { while ( (cpu->op != CODE_NO_OPERATION) && ( ( (priority(cpu->op) >= init_priority) && (cpu->number_of_parens == 0) ) || /* "=" effectively closes all parens */ init_priority == PRIORITY_CODE_MIN ) ) { perform_binary_operation(); pop_stack(); } } } void call_exch_xy(void) { double tmp; if ( (!cpu->rpn_mode) && (cpu->op == CODE_NO_OPERATION) ) return; if (cpu->last_action == ACTION_INPUT) input_to_x(); tmp = cpu->x; cpu->x = cpu->y; cpu->y = tmp; cpu->last_action = ACTION_ENTER; aftermath(); } void call_stack_up(void) { double tmp1, tmp2; t_stack_element *stack_element; /* this operation is not meant for the algebraic mode */ if ( !(cpu->rpn_mode)) { error_occured("call_stack_up() called in algebraic mode", FALSE); return; } if (cpu->last_action == ACTION_INPUT) input_to_x(); if (cpu->stack_mode == STACK_MODE_INFINITE) { if (cpu->stack_head != NULL) { tmp1 = cpu->stack_head->z; cpu->stack_head->z = cpu->t; cpu->t = cpu->z; cpu->z = cpu->y; cpu->y = cpu->x; stack_element = cpu->stack_head; while ( stack_element->next != NULL ) { tmp2 = tmp1; tmp1 = stack_element->next->z; stack_element->next->z = tmp2; stack_element = stack_element->next; } cpu->x = tmp1; } else { tmp1 = cpu->x; /* for consistency */ if (cpu->y == 0.0 && cpu->z == 0.0 && cpu->t == 0.0) goto done_with_stack_scrolling; tmp1 = cpu->y; cpu->y = cpu->x; if (cpu->z == 0.0 && cpu->t == 0.0) goto done_with_stack_scrolling; tmp2 = tmp1; tmp1 = cpu->z; cpu->z = tmp2; if (cpu->t == 0.0) goto done_with_stack_scrolling; tmp2 = tmp1; tmp1 = cpu->t; cpu->t = tmp2; done_with_stack_scrolling: cpu->x = tmp1; } } else { tmp1 = cpu->x; cpu->x = cpu->t; cpu->t = cpu->z; cpu->z = cpu->y; cpu->y = tmp1; } cpu->last_action = ACTION_ENTER; aftermath(); } void call_stack_down(void) { double tmp; t_stack_element *stack_element; /* this operation is not meant for the algebraic mode */ if ( !(cpu->rpn_mode)) { error_occured("call_stack_down() called in algebraic mode", FALSE); return; } if (cpu->last_action == ACTION_INPUT) input_to_x(); tmp = cpu->x; if (cpu->stack_mode == STACK_MODE_INFINITE) { if (cpu->stack_head != NULL) { cpu->x = cpu->y; cpu->y = cpu->z; cpu->z = cpu->t; cpu->t = cpu->stack_head->z; stack_element = cpu->stack_head; while ( stack_element->next != NULL ) { stack_element->z = stack_element->next->z; stack_element = stack_element->next; } stack_element->z = tmp; } else { if (cpu->y == 0.0 && cpu->z == 0.0 && cpu->t == 0.0) goto done_with_stack_scrolling; cpu->x = cpu->y; if (cpu->z == 0.0 && cpu->t == 0.0) { cpu->y = tmp; goto done_with_stack_scrolling; } cpu->y = cpu->z; if (cpu->t == 0.0) { cpu->z = tmp; goto done_with_stack_scrolling; } cpu->z = cpu->t; cpu->t = tmp; done_with_stack_scrolling: ; } } else { cpu->x = cpu->y; cpu->y = cpu->z; cpu->z = cpu->t; cpu->t = tmp; } cpu->last_action = ACTION_ENTER; aftermath(); } void call_eq(void) { if (cpu->rpn_mode) { error_occured("call_eq() called in RPN mode", FALSE); return; } if (cpu->last_action == ACTION_INPUT) input_to_x(); perform_binop_chain(PRIORITY_CODE_MIN, FALSE); cpu->op = CODE_NO_OPERATION; cpu->number_of_parens = 0; cpu->last_action = ACTION_ENTER; aftermath(); } void call_enter(void) { /* this operation is not meant for the non-RPN mode */ if (!(cpu->rpn_mode)) { error_occured("call_enter() called in algebraic mode", FALSE); return; } if (cpu->enter_mode == ENTER_MODE_TRADITIONAL) { if (cpu->last_action == ACTION_INPUT) input_to_x(); push_stack(); cpu->op = CODE_ENTER; cpu->number_of_parens = 0; cpu->y = cpu->x; cpu->last_action = ACTION_ENTER_PUSH; } else { if (cpu->last_action == ACTION_INPUT) input_to_x(); else { push_stack(); cpu->op = CODE_ENTER; cpu->number_of_parens = 0; cpu->y = cpu->x; } cpu->last_action = ACTION_ENTER; } aftermath(); } void call_left_paren(void) { if (cpu->rpn_mode) { error_occured("call_left_paren() called in RPN mode", FALSE); return; } if (cpu->last_action == ACTION_BINOP) { cpu->number_of_parens++; aftermath(); } } void call_right_paren(void) { if (cpu->rpn_mode) { error_occured("call_right_paren() called in RPN mode", FALSE); return; } if (cpu->last_action == ACTION_INPUT) { input_to_x(); } if (!no_open_parens()) { if (cpu->op != CODE_NO_OPERATION) { perform_binop_chain(PRIORITY_CODE_MIN, TRUE); } } else { /* acts like "=" to provide reasonable behavior in * the expressions like (2+3)/(4+5) */ perform_binop_chain(PRIORITY_CODE_MIN, FALSE); cpu->op = CODE_NO_OPERATION; } cpu->last_action = ACTION_ENTER; aftermath(); } void push_stack(void) /* attention! this function does not move the contents of x to y! * It affects only the higher elements of the stack. To make a full * stack push you need the following sequence: * push_stack(); * cpu->op = CODE_foo; * cpu->number_of_parens = 0; * cpu->y = cpu->x; * The reason is that cpu->op is set manually rather than pushed from somewhr*/ { t_stack_element *new_element; if (cpu->rpn_mode) { if ( (cpu->stack_mode == STACK_MODE_INFINITE) && (cpu->stack_head != NULL || cpu->t != 0.0 )) { new_element = (t_stack_element*) malloc (sizeof(t_stack_element)); if(new_element == NULL) error_occured("malloc failed", TRUE); new_element->next = cpu->stack_head; new_element->z = cpu->t; cpu->stack_head = new_element; } cpu->t = cpu->z; cpu->z = cpu->y; } else { if (cpu->op == CODE_NO_OPERATION) return; new_element = (t_stack_element*) malloc (sizeof(t_stack_element)); if(new_element == NULL) error_occured("malloc failed", TRUE); new_element->next = cpu->stack_head; new_element->z = cpu->y; new_element->op = cpu->op; new_element->number_of_parens = cpu->number_of_parens; cpu->stack_head = new_element; } } void pop_stack(void) { t_stack_element *to_remove; if (cpu->rpn_mode) { cpu->y = cpu->z; cpu->z = cpu->t; if (cpu->stack_mode == STACK_MODE_INFINITE ) { if (cpu->stack_head != NULL) { to_remove = cpu->stack_head; cpu->t = (cpu->stack_head)->z; cpu->stack_head = cpu->stack_head->next; free(to_remove); } else { cpu->t = 0.0; } } } else { if (cpu->stack_head != NULL) { to_remove = cpu->stack_head; cpu->y = (cpu->stack_head)->z; cpu->op = (cpu->stack_head)->op; cpu->number_of_parens = (cpu->stack_head)->number_of_parens; cpu->stack_head = cpu->stack_head->next; free(to_remove); } else { cpu->op = CODE_NO_OPERATION; cpu->y = 0.0; cpu->number_of_parens = 0; } } } int no_open_parens(void) /* verifies if there are any open parens, returns TRUE if there are none */ { t_stack_element *current; if(cpu->number_of_parens > 0) return FALSE; current = cpu->stack_head; while ( current != NULL ) { if (current->number_of_parens > 0) return FALSE; current = current->next; } return TRUE; } void call_unary_op(int received_code) { if (cpu->last_action == ACTION_INPUT) input_to_x(); switch (received_code){ case CODE_LOG : if (cpu->x > 0.0){ if (fabs(cpu->x - 1.0 ) > cpu->precision) cpu->x = log10(cpu->x); else cpu->x = 0.0; } else cpu->x_overflow = TRUE; break; case CODE_10TOX : if (cpu->x < pow(10,EXP_INPUT_LENGTH) ) cpu->x = pow(10, cpu->x); else cpu->x_overflow = TRUE; break; case CODE_LN : if (cpu->x > 0){ if (fabs(cpu->x - 1.0 ) > cpu->precision) cpu->x = log(cpu->x); else cpu->x = 0.0; } else cpu->x_overflow = TRUE; break; case CODE_ETOX : if (cpu->x * log10(exp(1.0)) < pow(10,EXP_INPUT_LENGTH)) cpu->x = exp(cpu->x); else cpu->x_overflow = TRUE; break; case CODE_SQRT : if (cpu->x >= 0.0) cpu->x = sqrt(cpu->x); else cpu->x_overflow = TRUE; break; case CODE_SQR : cpu->x = cpu->x * cpu->x; break; case CODE_INVX : if (cpu->x != 0.0) cpu->x = 1.0 / cpu->x; else cpu->x_overflow = TRUE; break; case CODE_FACT : if (cpu->x == 0.0) cpu->x = 1.0; else if (!fact_too_large(cpu->x)) cpu->x = fact_function(cpu->x); else cpu->x_overflow = TRUE; break; case CODE_SIN: if (cpu->angle_units == CODE_DEG) cpu->x *= PI / 180.0; if (almost_integer(cpu->x / PI, cpu->precision)) /* hack to have sin 180 == 0 */ cpu->x = 0.0; else cpu->x = sin (cpu->x); break; case CODE_ASIN: if (fabs(cpu->x) <= 1.0) { cpu->x = asin(cpu->x); if (cpu->angle_units == CODE_DEG) cpu->x *= 180.0 / PI; } else cpu->x_overflow = TRUE; break; case CODE_SINH : cpu->x = sinh (cpu->x); break; case CODE_ASINH : cpu->x = asinh (cpu->x); break; case CODE_COS : if (cpu->angle_units == CODE_DEG) cpu->x *= PI / 180.0; if (almost_integer((cpu->x - PI / 2.0) / PI, cpu->precision) || fabs(cpu->x - PI / 2.0) < cpu->precision) /* case x == PI/2 requires special treatment */ /* hack to have cos 90 == 0 */ cpu->x = 0.0; else cpu->x = cos (cpu->x); break; case CODE_ACOS: if (fabs(cpu->x) <= 1.0) { cpu->x = acos(cpu->x); if (cpu->angle_units == CODE_DEG) cpu->x *= 180.0 / PI; } else cpu->x_overflow = TRUE; break; case CODE_COSH : cpu->x = cosh (cpu->x); break; case CODE_ACOSH : if (cpu->x >= 1.0) cpu->x = acosh(cpu->x); else cpu->x_overflow = TRUE; break; case CODE_TAN: if (cpu->angle_units == CODE_DEG) cpu->x *= PI / 180.0; if (almost_integer((cpu->x - PI / 2.0) / PI, cpu->precision) || fabs(cpu->x - PI / 2.0) < cpu->precision) /* case x == PI/2 requires special treatment */ cpu->x_overflow = TRUE; else if (almost_integer(cpu->x / PI, cpu->precision)) cpu->x = 0.0; else cpu->x = tan (cpu->x); break; case CODE_ATAN: cpu->x = atan(cpu->x); if (cpu->angle_units == CODE_DEG) cpu->x *= 180.0 / PI; break; case CODE_TANH : cpu->x = tanh (cpu->x); break; case CODE_ATANH : cpu->x = atanh (cpu->x); break; default: error_occured("call_unary_op() unknown unary_op code", FALSE); } cpu->last_action = ACTION_ENTER; aftermath(); } calcoo-1.3.18/src/c_output.c0000644000175000017500000002263407624727134012605 00000000000000/* * Calcoo: c_output.c * * Copyright (C) 2001 Alexei Kaminski * * handles the cpu part of output operations * */ #include #include #include "codes.h" #include "const.h" #include "defaults.h" #include "cpu.h" #include "c_headers.h" #include "io_headers.h" #include "aux_headers.h" void a_to_display(double, t_cpu_display *, int); /* updates displays with the contents of the corresponding registers */ void cpu_to_output(void) { int i; cpu->error = FALSE; /* the main display */ a_to_display(cpu->x, cpu->d, cpu->x_overflow); if (cpu->d->display_overflow) cpu->error = TRUE; /* memory displays */ for (i = 0; i < NUMBER_OF_MEMS; i++) { a_to_display(cpu->mem[i], cpu->mem_d[i], FALSE); if (cpu->mem_d[i]->display_overflow) cpu->error = TRUE; } /* Output errors are possible for the register displays, * even though their contents is taken from X which should be allowed * only if there s no output error in X. The case when an output * error in a register other than X or memory is possible is when * we enter 99999e99 and then swap X with another operation register */ /* register and register operations displays */ if (cpu->rpn_mode) { a_to_display(cpu->y, cpu->reg_d[0], FALSE); a_to_display(cpu->z, cpu->reg_d[1], FALSE); a_to_display(cpu->t, cpu->reg_d[2], FALSE); if (cpu->reg_d[2]->display_overflow) cpu->error = TRUE; } else { /* pre-filling with zeros and no-operation */ for (i = 0; i < NUMBER_OF_REG_DISPLAYS; i++) { a_to_display(0.0, cpu->reg_d[i], FALSE); cpu->op_d[i]->op_code = FALSE; cpu->op_d[i]->show_brace = FALSE; } if ( cpu->op == CODE_NO_OPERATION ) goto done_with_reg_displays; a_to_display(cpu->y, cpu->reg_d[0], FALSE); cpu->op_d[0]->op_code = cpu->op; if (cpu->number_of_parens > 0) cpu->op_d[0]->show_brace = TRUE; if (cpu->stack_head == NULL) goto done_with_reg_displays; a_to_display((cpu->stack_head)->z, cpu->reg_d[1], FALSE); cpu->op_d[1]->op_code = (cpu->stack_head)->op; if ((cpu->stack_head)->number_of_parens > 0) cpu->op_d[1]->show_brace = TRUE; if ((cpu->stack_head)->next == NULL) goto done_with_reg_displays; a_to_display((cpu->stack_head)->next->z, cpu->reg_d[2], FALSE); cpu->op_d[2]->op_code = (cpu->stack_head)->next->op; if((cpu->stack_head)->next->number_of_parens > 0) cpu->op_d[2]->show_brace = TRUE; done_with_reg_displays: ; /* this is to prevent compiler warnings about * "deprecated label at the end of a compound statement" */ } for (i = 0; i < NUMBER_OF_REG_DISPLAYS; i++) { if (cpu->reg_d[i]->display_overflow) cpu->error = TRUE; } } /* transforms a number to the display format */ void a_to_display(double a, t_cpu_display *display, int a_overflow) { double abs_x, abs1_x, abs2_x, tmp; int intlog10_x; int digits_x[INPUT_LENGTH]; int i; int signif_digit_num, head_zeros_num; int exp_eng_corr; int output_length; /* In principle, this function could contain just simple processing * of the output of sprintf("%e",x). However, I have chosen to write * the transformation of x to input from scratch, since the length of * the resulting function would probably be approximately the same * anyway */ /* First, we consider some special cases of too large or too small x */ if (a_overflow) { display->display_overflow = TRUE; return; } /* no overflow, continue */ abs_x = fabs(a); if (abs_x >= pow(10, pow(10, EXP_INPUT_LENGTH))) { /* x is so large that it cannot be displayed */ display->display_overflow = TRUE; return; } /* x is small enough, continue */ display->display_overflow = FALSE; if (abs_x < pow(10, -(pow(10, EXP_INPUT_LENGTH)-1))) { /* x is effectively zero */ display->format = FORMAT_FIX; display->n_int = 1; display->int_field[0] = CODE_0; display->n_frac = 0; display->sign = SIGN_PLUS; return; } /* x is not zero, continue */ /* Now, the special cases have been considered, and we can proceed * with a regular case. This is not trivial, however. The main problem * arises when x=0.9999999999999...., so rounding of x for displaying * may lead to changes in the exp part, see the "!!!" comment */ /* sign */ if (a >= 0) display->sign = SIGN_PLUS; else display->sign = SIGN_MINUS; intlog10_x = round_double_to_int(floor(log10(abs_x))); if (cpu->rounding) output_length = cpu->digits_to_keep; else output_length = INPUT_LENGTH; /* truncating all but first "output_length" digits of x */ /* for numbers <1 that can be displayed without exponent this * interpretation will be redone later, becuase in this case * additional rounding may be needed */ abs1_x = rint((abs_x / pow(10, intlog10_x + 1)) * pow(10, output_length)); if (abs1_x >= pow(10, output_length)) { /* !!! * rounding has promoted x to the next order - * this is what we mentioned before */ abs1_x = rint(abs1_x / 10); intlog10_x += 1; } if ( (intlog10_x == -1) && (cpu->prescribed_format == FORMAT_FIX) && (rint(abs1_x/10) >= pow(10,output_length - 1)) ) { /* a very special case of, say, x=0.999999997, when the * introduction of the zero before the dot changes the integer * part from 0 to 1 thus leading to switching between the * types of format distinguished below */ display->format = FORMAT_FIX; display->n_int = 1; display->int_field[0] = CODE_1; display->n_frac = 0; display->sign = SIGN_PLUS; return; } /* padding with zeros to the full INPUT_LENGTH */ abs1_x *= pow(10, INPUT_LENGTH - output_length); /* interpreting meaningful digits of x */ for (i = INPUT_LENGTH - 1; i >= 0; i--) { digits_x[i] = digit_to_code(last_digit(abs1_x)); abs1_x = rint( (abs1_x - last_digit(abs1_x)) / 10 ); } /* By this point, we have determined all the digits of x to display * and the exponent. Now we are going to figure out what digits to * put before and after the dot */ if ( (0 <= intlog10_x) && (intlog10_x < INPUT_LENGTH) && (cpu->prescribed_format == FORMAT_FIX) ) { /* x can be displayed without the exponent * and x>=1, so there is NO need to introduce heading zeros */ display->format = FORMAT_FIX; display->n_int = intlog10_x + 1; for (i = 0 ; i < display->n_int; i++) display->int_field[i] = digits_x[i]; display->n_frac = INPUT_LENGTH - display->n_int; for (i = 0 ; i < display->n_frac; i++ ) display->frac_field[i] = digits_x[display->n_int + i]; } else if ( (-INPUT_LENGTH < intlog10_x) && (intlog10_x < 0) && (cpu->prescribed_format == FORMAT_FIX) ) { /* x can be displayed without the exponent * and x<1, so there IS need to introduce heading zeros */ display->format = FORMAT_FIX; display->n_int = 1; display->int_field[0] = CODE_0; display->n_frac = INPUT_LENGTH - 1; head_zeros_num = -intlog10_x - 1; for (i = 0; i < head_zeros_num; i++) display->frac_field[i] = CODE_0; signif_digit_num = INPUT_LENGTH - 1 - head_zeros_num; if (signif_digit_num > output_length) signif_digit_num = output_length; /* separating first "signif_digit_num" digits of x */ abs2_x = rint ( (abs_x / pow(10, intlog10_x+1)) * pow(10, signif_digit_num) ); if (abs2_x >= pow(10,signif_digit_num)) { /* rounding promoted x to the next order */ if (signif_digit_num < output_length){ signif_digit_num++; head_zeros_num--; } else abs2_x = rint(abs2_x / 10); } for (i = signif_digit_num - 1; i >= 0; i--) { digits_x[i] = digit_to_code(last_digit(abs2_x)); abs2_x = rint( (abs2_x-last_digit(abs2_x)) / 10 ); } /* interpreting meaningful digits of x */ for(i = 0; i < signif_digit_num; i++){ display->frac_field[i + head_zeros_num] = digits_x[i]; } /* padding the rest wth zeros */ for(i = head_zeros_num + signif_digit_num; i < INPUT_LENGTH; i++) display->frac_field[i] = CODE_0; } else { /* exponent is needed to display x */ display->format = FORMAT_SCI; if (cpu->prescribed_format == FORMAT_SCI || cpu->prescribed_format == FORMAT_FIX) { display->n_int = 1; display->int_field[0] = digits_x[0]; display->n_frac = INPUT_LENGTH - 1; for (i = 0 ; i < INPUT_LENGTH - 1 ; i++) display->frac_field[i] = digits_x[i+1]; } else { /* cpu->prescribed_format == FORMAT_ENG */ /* engineering format: * the exponent must be a multiple of 3 */ exp_eng_corr = abs(intlog10_x) % 3; if (intlog10_x < 0 && exp_eng_corr != 0) exp_eng_corr = 3 - exp_eng_corr; display->n_int = 1 + exp_eng_corr; for (i = 0 ; i < display->n_int ; i++) display->int_field[i] = digits_x[i]; display->n_frac = INPUT_LENGTH - 1 - exp_eng_corr; for (i = 0 ; i < display->n_frac ; i++) display->frac_field[i] = digits_x[i + 1 + exp_eng_corr]; intlog10_x -= exp_eng_corr; } /* processing exp part */ tmp = fabs(intlog10_x); if ( (int)tmp != 0 ) { /* when exponential format is enforced, the exp part * may be equal to zero; there is no need to display it then */ for (i = EXP_INPUT_LENGTH-1; i>=0; i--) { display->exp_field[i] = digit_to_code(last_digit(tmp)); tmp = floor(tmp/10); } if (intlog10_x > 0) display->exp_sign = SIGN_PLUS; else display->exp_sign = SIGN_MINUS; } else display->format = FORMAT_FIX; } /* getting rid of trailing zeros in frac */ while ((display->frac_field[display->n_frac-1] == CODE_0) && (display->n_frac > 0) && !( (cpu->rounding) && (display->n_frac + display->n_int <= output_length) && (!cpu->trunc_zeros) )) display->n_frac--; } calcoo-1.3.18/src/c_undo.c0000644000175000017500000001261207516050023012167 00000000000000/* * Calcoo: c_undo.c * * Copyright (C) 2001, 2002 Alexei Kaminski * * all about undo */ #include #include "const.h" #include "codes.h" #include "cpu.h" #include "c_headers.h" #include "io_headers.h" #include "defaults.h" #include "aux_headers.h" int us_curr, us_last, us_first; t_calcoo_cpu *cpu_undo_stack[UNDO_STACK_SIZE]; void pop_undo_stack(void); void push_undo_stack(void); void copy_operation_stack(t_stack_element *, t_stack_element **); void copy_cpu(t_calcoo_cpu *, t_calcoo_cpu *); void copy_display(t_cpu_display *, t_cpu_display *); void init_undo_stack(void) { int i, j; for (i = 0; i < UNDO_STACK_SIZE; i++) { cpu_undo_stack[i] = (t_calcoo_cpu*) malloc(sizeof(t_calcoo_cpu)); verify_malloc(cpu_undo_stack[i]); for(j = 0; j < NUMBER_OF_MEMS; j++){ (cpu_undo_stack[i])->mem_d[j] = (t_cpu_display*) malloc (sizeof(t_cpu_display)); verify_malloc((cpu_undo_stack[i])->mem_d[j]); } for(j = 0; j < NUMBER_OF_REG_DISPLAYS; j++) { (cpu_undo_stack[i])->reg_d[j] = (t_cpu_display*) malloc (sizeof(t_cpu_display)); verify_malloc(cpu_undo_stack[i]->reg_d[j]); (cpu_undo_stack[i])->op_d[j] = (t_cpu_operation_display*) malloc (sizeof(t_cpu_operation_display)); verify_malloc((cpu_undo_stack[i])->op_d[j]); } (cpu_undo_stack[i])->d = (t_cpu_display*) malloc (sizeof(t_cpu_display)); verify_malloc((cpu_undo_stack[i])->d); (cpu_undo_stack[i])->stack_head = NULL; } us_curr = 0; for (i = 0; i < UNDO_STACK_SIZE; i++){ save_for_undo(); } us_first = 0; us_curr = 0; us_last = 0; disable_undo_button(); disable_redo_button(); } void reset_undo_stack(void) { us_first = 0; us_curr = 0; us_last = 0; disable_undo_button(); disable_redo_button(); } void call_undo(void) { if ( us_curr != us_first ) { us_curr = (us_curr - 1 + UNDO_STACK_SIZE) % UNDO_STACK_SIZE; pop_undo_stack(); /* this is needed because the rounding mode may have changed */ cpu_to_output(); if (cpu->last_action == ACTION_INPUT){ copy_display(cpu_undo_stack[us_curr]->d, cpu->d); } enable_redo_button(); } if ( us_curr == us_first ) disable_undo_button(); refresh_body(); } void call_redo(void) { if ( us_curr != us_last) { us_curr = (us_curr + 1) % UNDO_STACK_SIZE; pop_undo_stack(); /* this is needed because the rounding mode may have changed */ cpu_to_output(); if (cpu->last_action == ACTION_INPUT){ copy_display(cpu_undo_stack[us_curr]->d, cpu->d); } enable_undo_button(); } if ( us_curr == us_last ) disable_redo_button(); refresh_body(); } void save_for_undo(void) { us_curr = (us_curr + 1) % UNDO_STACK_SIZE; push_undo_stack(); enable_undo_button(); disable_redo_button(); us_last = us_curr; if ( us_last == us_first ) us_first++; } void pop_undo_stack(void) { copy_cpu(cpu_undo_stack[us_curr], cpu); } void push_undo_stack(void) { copy_cpu(cpu, cpu_undo_stack[us_curr]); } void copy_operation_stack(t_stack_element *from, t_stack_element **to) { t_stack_element *from_curr, *to_curr, *to_remove, *to_prev; t_stack_element pre_head; if (*to == NULL ) { *to = (t_stack_element*) malloc (sizeof(t_stack_element)); verify_malloc(*to); (*to)->next = NULL; } from_curr = from; to_curr = *to; /* pre_head is introduced to have a stack element whose next is * the stack head; it is not needed; it is introduced ONLY * to prevent compiler warnings and for uniformity. */ pre_head.next = to_curr; to_prev = &pre_head; while (from_curr != NULL) { if (to_curr == NULL) { to_curr = (t_stack_element*) malloc (sizeof(t_stack_element)); verify_malloc(to_curr); to_curr->next = NULL; to_prev->next = to_curr; } to_curr->z = from_curr->z; to_curr->op = from_curr->op; to_curr->number_of_parens = from_curr->number_of_parens; to_prev = to_curr; to_curr = to_curr->next; from_curr = from_curr->next; } to_prev->next = NULL; while (to_curr != NULL) { to_remove = to_curr; to_curr = to_curr->next; free(to_remove); } if (from == NULL) *to = NULL; /* the memory is already freed */ } void copy_cpu(t_calcoo_cpu *from, t_calcoo_cpu *to) { int i, j; to->x = from->x; to->y = from->y; to->z = from->z; to->t = from->t; for(i = 0; i < NUMBER_OF_MEMS; i++) to->mem[i] = from->mem[i]; to->op = from->op; to->number_of_parens = from->number_of_parens; copy_operation_stack(from->stack_head, &(to->stack_head)); copy_display(from->d, to->d); to->curr_mem = from->curr_mem; for(j = 0; j < NUMBER_OF_MEMS; j++) copy_display(from->mem_d[j], to->mem_d[j]); for(j = 0; j < NUMBER_OF_REG_DISPLAYS; j++) { copy_display(from->reg_d[j], to->reg_d[j]); to->op_d[j]->op_code = from->op_d[j]->op_code; to->op_d[j]->show_brace = from->op_d[j]->show_brace; } to->last_action = from->last_action; to->x_overflow = from->x_overflow; to->prescribed_format = from->prescribed_format; to->enter_mode = from->enter_mode; to->error = from->error; } void copy_display(t_cpu_display *from, t_cpu_display *to) { int i; to->input_field = from->input_field; to->sign = from->sign; to->exp_sign = from->exp_sign; for (i = 0; i < INPUT_LENGTH; i++) to->int_field[i] = from->int_field[i]; for (i = 0; i < INPUT_LENGTH; i++) to->frac_field[i] = from->frac_field[i]; for (i = 0; i < EXP_INPUT_LENGTH; i++) to->exp_field[i] = from->exp_field[i]; to->n_int = from->n_int; to->n_frac = from->n_frac; to->display_overflow = from->display_overflow; to->format = from->format; } calcoo-1.3.18/src/main.c0000644000175000017500000000173307516055745011666 00000000000000/* * Calcoo: main.c * * Copyright (C) 2001, 2002 Alexei Kaminski * * See README for the information on the licence, source structure etc. * */ #include #include "c_headers.h" #include "b_headers.h" #include "aux_headers.h" int main (int argc, char *argv[]) { mess("Calcoo started in the DEBUG mode ", 0); /* This produces output only if the variable CALCOO_DEBUG has been * defined by the configure script,and is introduced as an easy * indication whether we are in the debugging mode or not */ if (argc > 1 ) { process_options(argv[1]); return 0; /* Do not start calcoo if any command-line options * were given. Quite reasonable, since the only * valid options are --help and --version */ } gtk_init(&argc, &argv); create_body(); /* create all the widgets */ init_cpu(); /* create and initialize the engine */ load_settings(); /* ...from ~/.calcoo */ gtk_main(); /* start calcoo */ return 0; } calcoo-1.3.18/src/gtkaux.c0000644000175000017500000000764410653053773012247 00000000000000/* * Calcoo: gtkaux.c * * Copyright (C) 2001, 2002, 2005, 2007 Alexei Kaminski * * auxiliary functions for operations with gtk widgets * no functions related to specific calcoo tasks */ #include #include #include #include #include #include "codes.h" #include "body.h" #include "defaults.h" #include "gtkaux_headers.h" #include "aux_headers.h" #include "io_headers.h" void create_fg_pixmap(GtkWidget **pixmap_widget, char **pixmap_xpm) /* creates a monochrome gtk pixmap having the color of the gtk foreground * out of the given pixmap */ { GdkPixmap *pixmap, *all_black; GdkBitmap *mask; int w, h, tmp1, tmp2; int i; char *black_bits; int bitmap_size; /* getting the transparency mask from the original pixmap */ pixmap = gdk_pixmap_create_from_xpm_d ( (body->main_window)->window, &(mask), &(body->style)->bg[GTK_STATE_NORMAL], (gchar **) pixmap_xpm ); /* getting the size of the original pixmap */ sscanf(pixmap_xpm[0],"%d %d %d %d", &w, &h, &tmp1, &tmp2); /* 7 and 8 here are not magic numbers! * 8 is the number of bits in a byte * 7 is 8 - 1 */ bitmap_size = ((w + 7) / 8) * h; /* creating a bitmap with all bits on, * of the size of the original pixmap */ black_bits = calloc(sizeof(char), bitmap_size); /* turning on all the pixels in the bitmap */ for (i = 0; i < bitmap_size; i++) black_bits[i] = 0xff; /* creating a bitmap with all pixels having the color of foreground, * of the size of the original pixmap */ all_black = gdk_pixmap_create_from_data( (body->main_window)->window, black_bits, w, h, -1, &(body->style)->fg[GTK_STATE_FOR_CALCOO_FOREGROUND_COLOR], &(body->style)->bg[GTK_STATE_NORMAL]); if (CONVERT_ICONS_TO_FOREGROUND_COLOR) /* imposing the transparency mask of the original pixmap * onto the foreground rectangle */ *pixmap_widget = gtk_image_new_from_pixmap(all_black, mask); else *pixmap_widget = gtk_image_new_from_pixmap(pixmap, mask); free(black_bits); g_object_unref(pixmap); g_object_unref(all_black); g_object_unref(mask); } void create_n_put_pixmap(GtkWidget **pixmap_widget, int x, int y, char **pixmap_xpm) { create_fg_pixmap(pixmap_widget, pixmap_xpm); gtk_fixed_put(GTK_FIXED(body->fixer), *pixmap_widget, x, y); } void own_selection( GtkWidget *widget, gint *have_selection ) { *have_selection = gtk_selection_owner_set (body->selection_widget, GDK_SELECTION_PRIMARY, GDK_CURRENT_TIME); } void set_selection( GtkWidget *widget, GtkSelectionData *selection_data, guint info, guint time_stamp, gpointer data ) { gtk_selection_data_set (selection_data, GDK_SELECTION_TYPE_STRING, 8, (unsigned char*)body->char_display, strlen(body->char_display) ); } gboolean selection_clear( GtkWidget *widget, GdkEventSelection *event, gint *have_selection ) { *have_selection = FALSE; return TRUE; } void request_selection( GtkWidget *widget, gpointer data ) { static GdkAtom targets_atom = GDK_NONE; GtkWidget *window = (GtkWidget *)data; /* Get the atom corresponding to the string "TARGETS" */ if (targets_atom == GDK_NONE) targets_atom = gdk_atom_intern ("STRING", FALSE); /* And request the "TARGETS" target for the primary selection */ gtk_selection_convert (window, GDK_SELECTION_PRIMARY, targets_atom, GDK_CURRENT_TIME); } #define MAX_SELECTION_LENGTH 20 void get_selection(GtkWidget *widget, GtkSelectionData *data, gpointer val) { char buff[MAX_SELECTION_LENGTH]; int success; double x; if( data->length + 1 > MAX_SELECTION_LENGTH ) return; /* selection too long */ if(data->length < 0) /* the selection could not be retrieved */ return; strncpy( buff, (char*)data->data, data->length ); buff[data->length] = '\n'; success = sscanf(buff,"%lf", &x); if (success) clicked_code_paste(x); } calcoo-1.3.18/src/b_display.c0000644000175000017500000002436210653053773012706 00000000000000/* * Calcoo: b_display.c * * Copyright (C) 2001, 2002, 2005 Alexei Kaminski * * display creation and * functions that facilitate display functionality * */ #include #include #include #include #include "codes.h" #include "body.h" #include "b_headers.h" #include "aux_headers.h" #include "gtkaux_headers.h" void malloc_displays(void) { int i; for (i = 0; i < NUMBER_OF_DISPLAYS; i++){ body->display[i] = (t_body_display*) malloc(sizeof(t_body_display)); if (body->display[i] == NULL) error_occured("malloc failed", TRUE); } for (i = 0; i < NUMBER_OF_SIMPLE_DISPLAYS; i++){ body->simple_display[i] = (t_body_simple_display*) malloc(sizeof(t_body_simple_display)); if(body->display[i] == NULL) error_occured("malloc failed", TRUE); } } /*-------- Displays for numbers ----------------*/ /* (the main display, memory displays, register displays) */ void create_display(int display_number, int x, int y, int w, int h, int cell_width, int dot_offset_vert, int dot_width, int margin_vert, int margin_horiz, int error_indent, int tick_offset_vert, int tick_offset_horiz, int show_frame, char ***digit_xpm) { int i, n, x1, y1; int display_exp_indent; t_body_display *display; /* for the sake of brevity: */ display = body->display[display_number]; /* Frame */ if (show_frame) { display->frame = gtk_frame_new(NULL); gtk_frame_set_shadow_type(GTK_FRAME(display->frame), GTK_SHADOW_IN); gtk_fixed_put(GTK_FIXED(body->fixer), display->frame, x, y); gtk_widget_set_size_request(display->frame, w, h); gtk_widget_show(display->frame); } /* Offset for the digits */ x1 = x + margin_horiz; y1 = y + margin_vert; display_exp_indent = cell_width * (INPUT_LENGTH + 1) + dot_width; display->x1 = x1; display->y1 = y1; display->display_exp_indent = display_exp_indent; display->digit_xpm = digit_xpm; display->cell_width = cell_width; display->dot_offset_vert = dot_offset_vert; display->dot_width = dot_width; display->margin_vert = margin_vert; display->margin_horiz = margin_horiz; display->error_indent = error_indent; display->tick_offset_vert = tick_offset_vert; display->tick_offset_horiz = tick_offset_horiz; /* Things to show */ for (i = 0; i < INPUT_LENGTH; i++) for (n = 0; n < BASE; n++) display->int_digits[i][n] = NULL; for (i = 0; i < INPUT_LENGTH; i++) for (n = 0; n < BASE; n++) display->frac_digits[i][n] = NULL; for (i = 0; i < EXP_INPUT_LENGTH; i++) for (n = 0; n < BASE; n++) display->exp_digits[i][n] = NULL; for (i = 0; i < INPUT_LENGTH; i++) display->dot[i] = NULL; for (i = 0; i < INPUT_LENGTH; i++) display->minus_sign[i] = NULL; for (i = 0; i < INPUT_LENGTH; i++) display->int_ticks[i] = NULL; for (i = 0; i < INPUT_LENGTH; i++) create_n_put_pixmap(&display->frac_ticks[i], x1 + cell_width * i + dot_width + tick_offset_horiz, y1 + tick_offset_vert, digit_xpm[D_TICK]); display->exp_minus_sign = NULL; display->exp_plus_sign = NULL; display->E = NULL; display->error_message = NULL; } void clear_display(int display_number) { int i,n; t_body_display *display; /* for the sake of brevity: */ display = body->display[display_number]; for (i = 0; i < INPUT_LENGTH; i++) for (n = 0; n < BASE; n++) if ( NULL != display->int_digits[i][n] ) gtk_widget_hide(display->int_digits[i][n]); for (i = 0; i < INPUT_LENGTH; i++) for (n = 0; n < BASE; n++) if ( NULL != display->frac_digits[i][n] ) gtk_widget_hide(display->frac_digits[i][n]); for (i = 0; i < EXP_INPUT_LENGTH; i++) for(n = 0; n < BASE; n++) if ( NULL != display->exp_digits[i][n] ) gtk_widget_hide(display->exp_digits[i][n]); for(i = 0; i < INPUT_LENGTH; i++) if ( NULL != display->dot[i] ) gtk_widget_hide(display->dot[i]); for(i = 0; i < INPUT_LENGTH; i++) if ( NULL != display->minus_sign[i] ) gtk_widget_hide(display->minus_sign[i]); for(i = 0; i < INPUT_LENGTH; i++) if ( NULL != display->int_ticks[i] ) gtk_widget_hide(display->int_ticks[i]); for(i = 0; i < INPUT_LENGTH; i++) if ( NULL != display->frac_ticks[i] ) gtk_widget_hide(display->frac_ticks[i]); if ( NULL != display->exp_minus_sign ) gtk_widget_hide(display->exp_minus_sign); if ( NULL != display->exp_plus_sign ) gtk_widget_hide(display->exp_plus_sign); if ( NULL != display->E ) gtk_widget_hide(display->E); if ( NULL != display->error_message ) gtk_widget_hide(display->error_message); } void show_int_digit(int d, int i, int n) { t_body_display *display; display = body->display[d]; if ( NULL == display->int_digits[i][n] ) create_n_put_pixmap(&display->int_digits[i][n], display->x1 + display->cell_width * (i + 1), display->y1, display->digit_xpm[n]); gtk_widget_show(body->display[d]->int_digits[i][code_to_digit(n)]); } void show_frac_digit(int d, int i, int n) { t_body_display *display; display = body->display[d]; if ( NULL == display->frac_digits[i][n] ) create_n_put_pixmap(&display->frac_digits[i][n], display->x1 + display->dot_width + display->cell_width * (i + 1), display->y1, display->digit_xpm[n]); gtk_widget_show(body->display[d]->frac_digits[i][code_to_digit(n)]); } void show_exp_digit(int d, int i, int n) { t_body_display *display; display = body->display[d]; if ( NULL == display->exp_digits[i][n] ) create_n_put_pixmap(&display->exp_digits[i][n], display->x1 + display->display_exp_indent + display->cell_width * (i + 2), display->y1, display->digit_xpm[n]); gtk_widget_show(body->display[d]->exp_digits[i][code_to_digit(n)]); } void show_dot(int d, int i) { t_body_display *display; display = body->display[d]; if ( NULL == display->dot[i] ) create_n_put_pixmap(&display->dot[i], display->x1 + display->cell_width * (i + 2), display->y1 + display->dot_offset_vert, display->digit_xpm[D_DOT]); gtk_widget_show(body->display[d]->dot[i]); } void show_minus(int d, int i) { t_body_display *display; display = body->display[d]; if ( NULL == display->minus_sign[i] ) create_n_put_pixmap(&display->minus_sign[i], display->x1 + display->cell_width * i, display->y1, display->digit_xpm[D_MINUS]); gtk_widget_show(body->display[d]->minus_sign[i]); } void show_int_tick(int d, int i) { t_body_display *display; display = body->display[d]; if ( NULL == display->int_ticks[i] ) create_n_put_pixmap(&display->int_ticks[i], display->x1 + display->cell_width * i + display->tick_offset_horiz, display->y1 + display->tick_offset_vert, display->digit_xpm[D_TICK]); gtk_widget_show(body->display[d]->int_ticks[i]); } void show_frac_tick(int d, int i) { t_body_display *display; display = body->display[d]; if ( NULL == display->frac_ticks[i] ) create_n_put_pixmap(&display->frac_ticks[i], display->x1 + display->cell_width * i + display->dot_width + display->tick_offset_horiz, display->y1 + display->tick_offset_vert, display->digit_xpm[D_TICK]); gtk_widget_show(body->display[d]->frac_ticks[i]); } void show_E_and_exp_sign(int d, int exp_sign) { t_body_display *display; display = body->display[d]; if ( NULL == display->E ) create_n_put_pixmap(&display->E, display->x1 + display->display_exp_indent, display->y1, display->digit_xpm[D_E]); gtk_widget_show(body->display[d]->E); switch (exp_sign) { case SIGN_PLUS: if ( NULL == display->exp_plus_sign ) create_n_put_pixmap(&display->exp_plus_sign, display->x1 + display->display_exp_indent + display->cell_width, display->y1, display->digit_xpm[D_PLUS]); gtk_widget_show(body->display[d]->exp_plus_sign); break; case SIGN_MINUS: if ( NULL == display->exp_minus_sign ) create_n_put_pixmap(&display->exp_minus_sign, display->x1 + display->display_exp_indent + display->cell_width, display->y1, display->digit_xpm[D_MINUS]); gtk_widget_show(body->display[d]->exp_minus_sign); break; } } void show_error_message(int d) { t_body_display *display; display = body->display[d]; if ( NULL == display->error_message ) create_n_put_pixmap(&display->error_message, display->x1 + display->error_indent, display->y1, display->digit_xpm[D_OVERFLOW]); gtk_widget_show(body->display[d]->error_message); strcpy(body->char_display,"error"); } /*----------- Simple displays -----------------------*/ /* (operation symbols, parens, register names) */ void create_simple_display(int display_number, int x, int y, int w, int h, int number_of_glyphs, int show_frame, char ***glyph_xpm) { int i; t_body_simple_display *display; /* for the sake of brevity: */ display = body->simple_display[display_number]; /* Frame */ if (show_frame) { display->frame = gtk_frame_new(NULL); gtk_frame_set_shadow_type(GTK_FRAME(display->frame), GTK_SHADOW_IN); gtk_fixed_put(GTK_FIXED(body->fixer), display->frame, x, y); gtk_widget_set_size_request(display->frame, w, h); gtk_widget_show(display->frame); } for (i = 0; i < number_of_glyphs; i++) create_n_put_pixmap(&display->glyph[i], x, y, glyph_xpm[i]); for (i = number_of_glyphs; i < SD_G_MAX; i++) display->glyph[i] = NULL; display->number_of_glyphs = number_of_glyphs; clear_simple_display(display_number); } void clear_simple_display(int display_number) { int i; t_body_simple_display *display; /* for the sake of brevity: */ display = body->simple_display[display_number]; for (i = 0; i < display->number_of_glyphs; i++) if (display->glyph[i] != NULL) gtk_widget_hide(display->glyph[i]); } void show_display_glyph(int display_number, int glyph_code) { t_body_simple_display *display; /* for the sake of brevity: */ display = body->simple_display[display_number]; if (display->glyph[glyph_code] != NULL) gtk_widget_show(display->glyph[glyph_code]); } /*------------ Character string -------------*/ /* not quite a display, but a kind of similar */ void set_char_display(char *s) { strcpy(body->char_display,s); } calcoo-1.3.18/src/b_layout.c0000644000175000017500000005166110233323406012543 00000000000000/* * Calcoo: b_layout.c * * Copyright (C) 2001, 2002, 2005 Alexei Kaminski * * determines layout of the buttons * calls create_display() * * the sizes and layout of everything are defined here */ #include #include #include "basic.h" #include "codes.h" #include "displays.h" #include "const.h" #include "defaults.h" #include "b_headers.h" #include "io_headers.h" #define BUTTON_SIZE 32 /* buttons are square */ #define LEFT_MARGIN 8 #define RIGHT_MARGIN 8 #define TOP_MARGIN 8 #define BOTTOM_MARGIN 8 #define DISPLAY_SIZE_HORIZ 240 #define DISPLAY_SIZE_VERT BUTTON_SIZE #define UNDERDISPLAY_SPACING (BUTTON_SIZE / 2 ) /* the buttons are groupped in (rectangular) blocks */ #define INTERBLOCK_SPACING (BUTTON_SIZE / 2) #define NUMBER_OF_ROWS 5 #define NUMBER_OF_COLS_IN_BLOCK_0 1 #define NUMBER_OF_COLS_IN_BLOCK_1 3 #define NUMBER_OF_COLS_IN_BLOCK_2 3 #define NUMBER_OF_COLS_IN_BLOCK_3 4 /* the offset of a block is the distance from the block's left edge * to the left edge of the calculator's body */ #define OFFSET_OF_BLOCK_0 LEFT_MARGIN #define OFFSET_OF_BLOCK_1 ( LEFT_MARGIN \ + NUMBER_OF_COLS_IN_BLOCK_0 * BUTTON_SIZE \ + INTERBLOCK_SPACING ) #define OFFSET_OF_BLOCK_2 ( LEFT_MARGIN \ + NUMBER_OF_COLS_IN_BLOCK_0 * BUTTON_SIZE \ + INTERBLOCK_SPACING \ + NUMBER_OF_COLS_IN_BLOCK_1 * BUTTON_SIZE \ + INTERBLOCK_SPACING ) #define OFFSET_OF_BLOCK_3 ( LEFT_MARGIN \ + NUMBER_OF_COLS_IN_BLOCK_0 * BUTTON_SIZE \ + INTERBLOCK_SPACING \ + NUMBER_OF_COLS_IN_BLOCK_1 * BUTTON_SIZE \ + INTERBLOCK_SPACING \ + NUMBER_OF_COLS_IN_BLOCK_2 * BUTTON_SIZE \ + INTERBLOCK_SPACING ) #define LEFT_FOR_DISPLAY_VERT ( TOP_MARGIN \ + DISPLAY_SIZE_VERT \ + UNDERDISPLAY_SPACING ) #define BODY_SIZE_VERT ( LEFT_FOR_DISPLAY_VERT \ + BUTTON_SIZE * NUMBER_OF_ROWS \ + BOTTOM_MARGIN + INTERBLOCK_SPACING) #define BODY_SIZE_HORIZ ( LEFT_MARGIN \ + NUMBER_OF_COLS_IN_BLOCK_0 * BUTTON_SIZE \ + INTERBLOCK_SPACING \ + NUMBER_OF_COLS_IN_BLOCK_1 * BUTTON_SIZE \ + INTERBLOCK_SPACING \ + NUMBER_OF_COLS_IN_BLOCK_2 * BUTTON_SIZE \ + INTERBLOCK_SPACING \ + NUMBER_OF_COLS_IN_BLOCK_3 * BUTTON_SIZE \ + RIGHT_MARGIN ) #define DISPLAY_CELL_WIDTH 15 #define DISPLAY_DOT_OFFSET_VERT 17 #define DISPLAY_DOT_WIDTH 5 #define DISPLAY_MARGIN_VERT 7 #define DISPLAY_MARGIN_HORIZ 6 #define DISPLAY_OVERFLOW_INDENT 76 #define DISPLAY_TICK_OFFSET_VERT -3 #define DISPLAY_TICK_OFFSET_HORIZ 12 #define DISPLAY_LEFT_SHIFT OFFSET_OF_BLOCK_2 #define MEM_DISPLAY_LEFT_SHIFT ( OFFSET_OF_BLOCK_3 + BUTTON_SIZE / 2 ) #define MEM_DISPLAY_TOP_SHIFT ( LEFT_FOR_DISPLAY_VERT + BUTTON_SIZE * 4 \ + INTERBLOCK_SPACING ) #define MEM_DISPLAY_V_STEP 16 #define MEM_DISPLAY_SIZE_HORIZ 112 #define MEM_DISPLAY_SIZE_VERT 16 #define MEM_DISPLAY_CELL_WIDTH 7 #define MEM_DISPLAY_DOT_OFFSET_VERT 0 #define MEM_DISPLAY_DOT_WIDTH 3 #define MEM_DISPLAY_MARGIN_VERT 4 #define MEM_DISPLAY_MARGIN_HORIZ 1 #define MEM_DISPLAY_OVERFLOW_INDENT 40 #define REG_DISPLAY_LEFT_SHIFT (LEFT_MARGIN + 12) void create_widgets(void) { char **button_xpm[MAX_BUTTON_NUMBER]; char **op_xpm[NUMBER_OF_OPERATION_DISPLAY_GLYPHS]; char **deg_rad_xpm[NUMBER_OF_ANGLE_UNIT_GLYPHS]; char **format_xpm[NUMBER_OF_FORMAT_GLYPHS]; char **reg_display_label_xpm[NUMBER_OF_REG_DISPLAYS]; static char **digit_xpm[NUMBER_OF_DISPLAY_GLYPHS]; static char **ldigit_xpm[NUMBER_OF_DISPLAY_GLYPHS]; /* static because the display digit widgets are created on demand, * therefore one need a static repository for their pixmaps */ int i; create_main_window(BODY_SIZE_HORIZ, BODY_SIZE_VERT); assign_pixmaps(button_xpm, digit_xpm, ldigit_xpm, op_xpm, deg_rad_xpm, format_xpm, reg_display_label_xpm); /*======= Register displays ==========================*/ create_display(MAIN_DISPLAY, DISPLAY_LEFT_SHIFT, TOP_MARGIN, DISPLAY_SIZE_HORIZ, DISPLAY_SIZE_VERT, DISPLAY_CELL_WIDTH, DISPLAY_DOT_OFFSET_VERT, DISPLAY_DOT_WIDTH, DISPLAY_MARGIN_VERT, DISPLAY_MARGIN_HORIZ, DISPLAY_OVERFLOW_INDENT, DISPLAY_TICK_OFFSET_VERT, DISPLAY_TICK_OFFSET_HORIZ, TRUE, /* frame */ digit_xpm); for(i = 0; i < NUMBER_OF_REG_DISPLAYS; i++){ create_display(REG_DISPLAY_OFFSET + i, REG_DISPLAY_LEFT_SHIFT, TOP_MARGIN + (NUMBER_OF_REG_DISPLAYS - i - 1) * MEM_DISPLAY_SIZE_VERT, MEM_DISPLAY_SIZE_HORIZ, MEM_DISPLAY_SIZE_VERT, MEM_DISPLAY_CELL_WIDTH, MEM_DISPLAY_DOT_OFFSET_VERT, MEM_DISPLAY_DOT_WIDTH, MEM_DISPLAY_MARGIN_VERT, MEM_DISPLAY_MARGIN_HORIZ, MEM_DISPLAY_OVERFLOW_INDENT, 0, 0, TRUE, /* frame */ ldigit_xpm); create_simple_display(OPERATION_DISPLAY_OFFSET + i, REG_DISPLAY_LEFT_SHIFT + MEM_DISPLAY_SIZE_HORIZ, TOP_MARGIN + (NUMBER_OF_REG_DISPLAYS - i - 1) * MEM_DISPLAY_SIZE_VERT, 20, 16, NUMBER_OF_OPERATION_DISPLAY_GLYPHS, TRUE, /* frame */ op_xpm); create_simple_display(DISPLAY_LABEL_DISPLAY_OFFSET + i, LEFT_MARGIN, TOP_MARGIN + (NUMBER_OF_REG_DISPLAYS - i - 1) * MEM_DISPLAY_SIZE_VERT, 12, 16, NUMBER_OF_REG_DISPLAYS, FALSE, /* frame */ reg_display_label_xpm); show_display_glyph(DISPLAY_LABEL_DISPLAY_OFFSET + i, i); } /*======= Block 0 =====================================*/ create_button(CODE_DEG_RAD, OFFSET_OF_BLOCK_0, LEFT_FOR_DISPLAY_VERT + INTERBLOCK_SPACING, BUTTON_SIZE, BUTTON_SIZE / 2, button_xpm, &clicked_change_angle_units, "Change angle units"); create_simple_display(ANGLE_UNIT_DISPLAY_OFFSET, OFFSET_OF_BLOCK_0, LEFT_FOR_DISPLAY_VERT + INTERBLOCK_SPACING + BUTTON_SIZE / 2, BUTTON_SIZE, BUTTON_SIZE / 2, NUMBER_OF_ANGLE_UNIT_GLYPHS, TRUE, /* frame */ deg_rad_xpm); create_button(CODE_INFO, OFFSET_OF_BLOCK_0, LEFT_FOR_DISPLAY_VERT + INTERBLOCK_SPACING + BUTTON_SIZE, BUTTON_SIZE, BUTTON_SIZE, button_xpm, &clicked_code_info, "About/Help"); create_button(CODE_SETTINGS, OFFSET_OF_BLOCK_0, LEFT_FOR_DISPLAY_VERT + INTERBLOCK_SPACING + BUTTON_SIZE * 2, BUTTON_SIZE, BUTTON_SIZE, button_xpm, &clicked_code_settings, "Settings"); create_copy_button(CODE_COPY, OFFSET_OF_BLOCK_0, LEFT_FOR_DISPLAY_VERT + INTERBLOCK_SPACING + BUTTON_SIZE * 3, BUTTON_SIZE, BUTTON_SIZE, button_xpm, NULL); create_paste_button(CODE_PASTE, OFFSET_OF_BLOCK_0, LEFT_FOR_DISPLAY_VERT + INTERBLOCK_SPACING + BUTTON_SIZE * 4, BUTTON_SIZE, BUTTON_SIZE, button_xpm, NULL); /*======= Block 1 =====================================*/ /*------- Block 1 Row 1 -------------------------------*/ create_button(CODE_SIN, OFFSET_OF_BLOCK_1, LEFT_FOR_DISPLAY_VERT + INTERBLOCK_SPACING, BUTTON_SIZE, BUTTON_SIZE, button_xpm, &clicked_code_sin, NULL); create_button(CODE_SQR, OFFSET_OF_BLOCK_1 + BUTTON_SIZE, LEFT_FOR_DISPLAY_VERT + INTERBLOCK_SPACING, BUTTON_SIZE, BUTTON_SIZE, button_xpm, &clicked_code_sqr, NULL); create_button(CODE_SQRT, OFFSET_OF_BLOCK_1 + BUTTON_SIZE * 2, LEFT_FOR_DISPLAY_VERT + INTERBLOCK_SPACING, BUTTON_SIZE, BUTTON_SIZE, button_xpm, &clicked_code_sqrt, NULL); /*----- Block 1 Row 2 -----------------------------------*/ create_button(CODE_COS, OFFSET_OF_BLOCK_1, LEFT_FOR_DISPLAY_VERT + BUTTON_SIZE + INTERBLOCK_SPACING, BUTTON_SIZE, BUTTON_SIZE, button_xpm, &clicked_code_cos, NULL); create_button(CODE_ETOX, OFFSET_OF_BLOCK_1 + BUTTON_SIZE, LEFT_FOR_DISPLAY_VERT + BUTTON_SIZE + INTERBLOCK_SPACING, BUTTON_SIZE, BUTTON_SIZE, button_xpm, &clicked_code_etox, NULL); create_button(CODE_LN, OFFSET_OF_BLOCK_1 + BUTTON_SIZE * 2, LEFT_FOR_DISPLAY_VERT + BUTTON_SIZE + INTERBLOCK_SPACING, BUTTON_SIZE, BUTTON_SIZE, button_xpm, &clicked_code_ln, NULL); /*----- Block 1 Row 3 -------------------------------------*/ create_button(CODE_TAN, OFFSET_OF_BLOCK_1, LEFT_FOR_DISPLAY_VERT + BUTTON_SIZE * 2 + INTERBLOCK_SPACING, BUTTON_SIZE, BUTTON_SIZE, button_xpm, &clicked_code_tan, NULL); create_button(CODE_10TOX, OFFSET_OF_BLOCK_1 + BUTTON_SIZE, LEFT_FOR_DISPLAY_VERT + BUTTON_SIZE * 2 + INTERBLOCK_SPACING, BUTTON_SIZE, BUTTON_SIZE, button_xpm, &clicked_code_10tox, NULL); create_button(CODE_LOG, OFFSET_OF_BLOCK_1 + BUTTON_SIZE * 2, LEFT_FOR_DISPLAY_VERT + BUTTON_SIZE * 2 + INTERBLOCK_SPACING, BUTTON_SIZE, BUTTON_SIZE, button_xpm, &clicked_code_log, NULL); /*----- Block 1 Row 4 ---------------------------------------*/ create_toggle_button(CODE_ARC, OFFSET_OF_BLOCK_1, LEFT_FOR_DISPLAY_VERT + BUTTON_SIZE * 3 + INTERBLOCK_SPACING, BUTTON_SIZE, BUTTON_SIZE, button_xpm, &toggled_arc_button, NULL); create_button(CODE_POW, OFFSET_OF_BLOCK_1 + BUTTON_SIZE, LEFT_FOR_DISPLAY_VERT + BUTTON_SIZE * 3 + INTERBLOCK_SPACING, BUTTON_SIZE, BUTTON_SIZE, button_xpm, &clicked_code_pow, NULL); create_button(CODE_INVX, OFFSET_OF_BLOCK_1 + BUTTON_SIZE * 2, LEFT_FOR_DISPLAY_VERT + BUTTON_SIZE * 3 + INTERBLOCK_SPACING, BUTTON_SIZE, BUTTON_SIZE, button_xpm, &clicked_code_invx, NULL); /*----- Block 1 Row 5 ---------------------------------------*/ create_toggle_button(CODE_HYP, OFFSET_OF_BLOCK_1, LEFT_FOR_DISPLAY_VERT + BUTTON_SIZE * 4 + INTERBLOCK_SPACING, BUTTON_SIZE, BUTTON_SIZE, button_xpm, &toggled_hyp_button, NULL); create_button(CODE_PI, OFFSET_OF_BLOCK_1 + BUTTON_SIZE, LEFT_FOR_DISPLAY_VERT + BUTTON_SIZE * 4 + INTERBLOCK_SPACING, BUTTON_SIZE, BUTTON_SIZE, button_xpm, &clicked_code_pi, NULL); create_button(CODE_FACT, OFFSET_OF_BLOCK_1 + BUTTON_SIZE * 2, LEFT_FOR_DISPLAY_VERT + BUTTON_SIZE * 4 + INTERBLOCK_SPACING, BUTTON_SIZE, BUTTON_SIZE, button_xpm, &clicked_code_fact, NULL); /*===== Block 2 ===========================================*/ /*----- Block 2 Row 1 -------------------------------------*/ create_button(CODE_7, OFFSET_OF_BLOCK_2, LEFT_FOR_DISPLAY_VERT, BUTTON_SIZE, BUTTON_SIZE, button_xpm, &clicked_code_7, NULL); create_button(CODE_8, OFFSET_OF_BLOCK_2 + BUTTON_SIZE, LEFT_FOR_DISPLAY_VERT, BUTTON_SIZE, BUTTON_SIZE, button_xpm, &clicked_code_8, NULL); create_button(CODE_9, OFFSET_OF_BLOCK_2 + BUTTON_SIZE * 2, LEFT_FOR_DISPLAY_VERT, BUTTON_SIZE, BUTTON_SIZE, button_xpm, &clicked_code_9, NULL); /*----- Block 2 Row 2 -------------------------------------*/ create_button(CODE_4, OFFSET_OF_BLOCK_2, LEFT_FOR_DISPLAY_VERT + BUTTON_SIZE, BUTTON_SIZE, BUTTON_SIZE, button_xpm, &clicked_code_4, NULL); create_button(CODE_5, OFFSET_OF_BLOCK_2 + BUTTON_SIZE, LEFT_FOR_DISPLAY_VERT + BUTTON_SIZE, BUTTON_SIZE, BUTTON_SIZE, button_xpm, &clicked_code_5, NULL); create_button(CODE_6, OFFSET_OF_BLOCK_2 + BUTTON_SIZE * 2, LEFT_FOR_DISPLAY_VERT + BUTTON_SIZE, BUTTON_SIZE, BUTTON_SIZE, button_xpm, &clicked_code_6, NULL); /*----- Block 2 Row 3 -------------------------------------*/ create_button(CODE_1, OFFSET_OF_BLOCK_2, LEFT_FOR_DISPLAY_VERT + BUTTON_SIZE * 2, BUTTON_SIZE, BUTTON_SIZE, button_xpm, &clicked_code_1, NULL); create_button(CODE_2, OFFSET_OF_BLOCK_2 + BUTTON_SIZE, LEFT_FOR_DISPLAY_VERT + BUTTON_SIZE * 2, BUTTON_SIZE, BUTTON_SIZE, button_xpm, &clicked_code_2, NULL); create_button(CODE_3, OFFSET_OF_BLOCK_2 + BUTTON_SIZE * 2, LEFT_FOR_DISPLAY_VERT + BUTTON_SIZE * 2, BUTTON_SIZE, BUTTON_SIZE, button_xpm, &clicked_code_3, NULL); /*----- Block 2 Row 4 -------------------------------------*/ create_button(CODE_0, OFFSET_OF_BLOCK_2, LEFT_FOR_DISPLAY_VERT + BUTTON_SIZE * 3, BUTTON_SIZE, BUTTON_SIZE, button_xpm, &clicked_code_0, NULL); create_button(CODE_SIGN, OFFSET_OF_BLOCK_2 + BUTTON_SIZE, LEFT_FOR_DISPLAY_VERT + BUTTON_SIZE * 3, BUTTON_SIZE, BUTTON_SIZE, button_xpm, &clicked_code_sign, NULL); create_button(CODE_DOT, OFFSET_OF_BLOCK_2 + BUTTON_SIZE * 2, LEFT_FOR_DISPLAY_VERT + BUTTON_SIZE * 3, BUTTON_SIZE, BUTTON_SIZE, button_xpm, &clicked_code_dot, NULL); /*----- Block 2 Row 5 ------------------------------------------*/ create_button(CODE_EXP, OFFSET_OF_BLOCK_2, LEFT_FOR_DISPLAY_VERT + BUTTON_SIZE * 4 + INTERBLOCK_SPACING, BUTTON_SIZE, BUTTON_SIZE, button_xpm, &clicked_code_exp, NULL); create_button(CODE_EXP_SIGN, OFFSET_OF_BLOCK_2 + BUTTON_SIZE, LEFT_FOR_DISPLAY_VERT + BUTTON_SIZE * 4 + INTERBLOCK_SPACING, BUTTON_SIZE, BUTTON_SIZE, button_xpm, &clicked_code_exp_sign, NULL); create_button(CODE_FORMAT, OFFSET_OF_BLOCK_2 + BUTTON_SIZE * 2, LEFT_FOR_DISPLAY_VERT + INTERBLOCK_SPACING + BUTTON_SIZE * 4, BUTTON_SIZE, BUTTON_SIZE / 2, button_xpm, &clicked_change_display_format, "Change display format"); /* format display */ create_simple_display(FORMAT_DISPLAY_OFFSET, OFFSET_OF_BLOCK_2 + BUTTON_SIZE * 2, LEFT_FOR_DISPLAY_VERT + INTERBLOCK_SPACING + BUTTON_SIZE * 4 + BUTTON_SIZE / 2, BUTTON_SIZE, BUTTON_SIZE / 2, NUMBER_OF_FORMAT_GLYPHS, TRUE, /* frame */ format_xpm); /*====== Block 3 ===============================================*/ /*------ Block 3 Row 1 -----------------------------------------*/ create_button(CODE_ADD, OFFSET_OF_BLOCK_3, LEFT_FOR_DISPLAY_VERT, BUTTON_SIZE, BUTTON_SIZE, button_xpm, &clicked_code_add, NULL); create_button(CODE_SUB, OFFSET_OF_BLOCK_3 + BUTTON_SIZE, LEFT_FOR_DISPLAY_VERT, BUTTON_SIZE, BUTTON_SIZE, button_xpm, &clicked_code_sub, NULL); create_button(CODE_CLEAR_ALL, OFFSET_OF_BLOCK_3 + BUTTON_SIZE * 2, LEFT_FOR_DISPLAY_VERT, BUTTON_SIZE, BUTTON_SIZE, button_xpm, &clicked_code_clear_all, NULL); create_button(CODE_UNDO, OFFSET_OF_BLOCK_3 + BUTTON_SIZE * 3, LEFT_FOR_DISPLAY_VERT, BUTTON_SIZE, BUTTON_SIZE, button_xpm, &clicked_code_undo, "Undo"); /*----- Block 3 Row 2 -----------------------------------------------*/ create_button(CODE_MUL, OFFSET_OF_BLOCK_3, LEFT_FOR_DISPLAY_VERT + BUTTON_SIZE, BUTTON_SIZE, BUTTON_SIZE, button_xpm, &clicked_code_mul, NULL); create_button(CODE_DIV, OFFSET_OF_BLOCK_3 + BUTTON_SIZE, LEFT_FOR_DISPLAY_VERT + BUTTON_SIZE, BUTTON_SIZE, BUTTON_SIZE, button_xpm, &clicked_code_div, NULL); create_button(CODE_EQ, OFFSET_OF_BLOCK_3 + BUTTON_SIZE * 2, LEFT_FOR_DISPLAY_VERT + BUTTON_SIZE, BUTTON_SIZE, BUTTON_SIZE, button_xpm, &clicked_code_eq, NULL); create_button(CODE_ENTER, OFFSET_OF_BLOCK_3 + BUTTON_SIZE * 2, LEFT_FOR_DISPLAY_VERT + BUTTON_SIZE, BUTTON_SIZE, BUTTON_SIZE, button_xpm, &clicked_code_enter, "Enter"); create_button(CODE_REDO, OFFSET_OF_BLOCK_3 + BUTTON_SIZE * 3, LEFT_FOR_DISPLAY_VERT + BUTTON_SIZE, BUTTON_SIZE, BUTTON_SIZE, button_xpm, &clicked_code_redo, "Redo"); /*----- Block 3 Row 3 ----------------------------------------------*/ create_button(CODE_EXCH_XY, OFFSET_OF_BLOCK_3, LEFT_FOR_DISPLAY_VERT + BUTTON_SIZE * 2, BUTTON_SIZE, BUTTON_SIZE, button_xpm, &clicked_code_exch_xy, "Swap X and Y"); create_button(CODE_LEFT_PAREN, OFFSET_OF_BLOCK_3 + BUTTON_SIZE, LEFT_FOR_DISPLAY_VERT + BUTTON_SIZE * 2, BUTTON_SIZE, BUTTON_SIZE, button_xpm, &clicked_code_left_paren, NULL); create_button(CODE_STACK_DOWN, OFFSET_OF_BLOCK_3 + BUTTON_SIZE, LEFT_FOR_DISPLAY_VERT + BUTTON_SIZE * 2, BUTTON_SIZE, BUTTON_SIZE, button_xpm, &clicked_code_stack_down, "Scroll stack down"); create_button(CODE_RIGHT_PAREN, OFFSET_OF_BLOCK_3 + BUTTON_SIZE * 2, LEFT_FOR_DISPLAY_VERT + BUTTON_SIZE * 2, BUTTON_SIZE, BUTTON_SIZE, button_xpm, &clicked_code_right_paren, NULL); create_button(CODE_STACK_UP, OFFSET_OF_BLOCK_3 + BUTTON_SIZE * 2, LEFT_FOR_DISPLAY_VERT + BUTTON_SIZE * 2, BUTTON_SIZE, BUTTON_SIZE, button_xpm, &clicked_code_stack_up, "Scroll stack up"); create_button(CODE_CLEAR_X, OFFSET_OF_BLOCK_3 + BUTTON_SIZE * 3, LEFT_FOR_DISPLAY_VERT + BUTTON_SIZE * 2, BUTTON_SIZE, BUTTON_SIZE, button_xpm, &clicked_code_clear_x, "Clear X"); /*----- Block 3 Row 4 ----------------------------------------------*/ create_button(CODE_X_TO_MEM, OFFSET_OF_BLOCK_3, LEFT_FOR_DISPLAY_VERT + BUTTON_SIZE * 3 + INTERBLOCK_SPACING, BUTTON_SIZE, BUTTON_SIZE, button_xpm, &clicked_code_x_to_mem, "STO"); create_button(CODE_MEM_TO_X, OFFSET_OF_BLOCK_3 + BUTTON_SIZE, LEFT_FOR_DISPLAY_VERT + BUTTON_SIZE * 3 + INTERBLOCK_SPACING, BUTTON_SIZE, BUTTON_SIZE, button_xpm, &clicked_code_mem_to_x, "RCL"); create_button(CODE_MEM_PLUS, OFFSET_OF_BLOCK_3 + BUTTON_SIZE * 2, LEFT_FOR_DISPLAY_VERT + BUTTON_SIZE * 3 + INTERBLOCK_SPACING, BUTTON_SIZE, BUTTON_SIZE, button_xpm, &clicked_code_mem_plus, "Add X to memory"); create_button(CODE_EXCH_XMEM, OFFSET_OF_BLOCK_3 + BUTTON_SIZE * 3, LEFT_FOR_DISPLAY_VERT + BUTTON_SIZE * 3 + INTERBLOCK_SPACING, BUTTON_SIZE, BUTTON_SIZE, button_xpm, &clicked_code_exch_xmem, "Swap X and memory"); /*----- Block 3 Row 5 ----------------------------------------------*/ create_button(CODE_SWITCH_TO_MEM0, OFFSET_OF_BLOCK_3, LEFT_FOR_DISPLAY_VERT + BUTTON_SIZE * 4 + INTERBLOCK_SPACING, BUTTON_SIZE / 2, BUTTON_SIZE / 2, button_xpm, &clicked_code_switch_to_mem0, "Switch to memory register 0"); create_button(CODE_SWITCH_TO_MEM1, OFFSET_OF_BLOCK_3, LEFT_FOR_DISPLAY_VERT + BUTTON_SIZE * 4 + BUTTON_SIZE / 2 + INTERBLOCK_SPACING, BUTTON_SIZE / 2, BUTTON_SIZE /2 , button_xpm, &clicked_code_switch_to_mem1, "Switch to memory register 1"); for(i = 0; i < NUMBER_OF_MEMS; i++) create_display(MEM_DISPLAY_OFFSET + i, MEM_DISPLAY_LEFT_SHIFT, MEM_DISPLAY_TOP_SHIFT + i * MEM_DISPLAY_V_STEP, MEM_DISPLAY_SIZE_HORIZ, MEM_DISPLAY_SIZE_VERT, MEM_DISPLAY_CELL_WIDTH, MEM_DISPLAY_DOT_OFFSET_VERT, MEM_DISPLAY_DOT_WIDTH, MEM_DISPLAY_MARGIN_VERT, MEM_DISPLAY_MARGIN_HORIZ, MEM_DISPLAY_OVERFLOW_INDENT, 0, 0, TRUE, /* frame */ ldigit_xpm); } calcoo-1.3.18/src/Makefile.am0000644000175000017500000000116310234033255012606 00000000000000bin_PROGRAMS = calcoo calcoo_SOURCES = aux.c \ aux_headers.h \ b_accel.c \ b_accel_headers.h \ b_buttons.c \ b_display.c \ b_info.c \ b_layout.c \ b_loadsave.c \ b_main.c \ b_settings.c \ b_pixmaps.c \ basic.h \ body.h \ b_headers.h \ c_input.c \ c_main.c \ c_mem.c \ c_op.c \ c_output.c \ c_undo.c \ codes.h \ const.h \ cpu.h \ c_headers.h \ defaults.h \ displays.h \ gtkaux.c \ gtkaux_headers.h \ input.c \ io_headers.h \ main.c \ output.c \ texts.h INCLUDES = @GTK_CFLAGS@ LDADD = @GTK_LIBS@ CLEANFILES = *~ DISTCLEANFILES = .deps/*.P dist-hook: mkdir $(distdir)/pixmaps cp $(srcdir)/pixmaps/*.xpm $(distdir)/pixmaps calcoo-1.3.18/src/c_input.c0000644000175000017500000001567707501447361012410 00000000000000/* * Calcoo: c_input.c * * Copyright (C) 2001, 2002 Alexei Kaminski * * handles input operations * */ #include #include "codes.h" #include "const.h" #include "cpu.h" #include "c_headers.h" #include "io_headers.h" #include "aux_headers.h" void call_digit(int received_code) { int digit_entered; int i; /* first we determine whether we start a new input or just * continue input started before */ if (cpu->rpn_mode) { switch (cpu->last_action) { case ACTION_CLEAR: /* no need to call cpu_to_output, because input * routine works directly with the main display, * and the other displays must have been taken * care of before */ reset_input(); break; case ACTION_ENTER: /* this action type is set by the button * in the traditional enter mode, and by any * operation that puts something into X, * like Pi, M->x */ push_stack(); cpu->op = CODE_ENTER; cpu->y = cpu->x; cpu_to_output(); reset_input(); break; case ACTION_ENTER_PUSH: /* this action type is set by the button * in the traditional enter mode */ reset_input(); break; case ACTION_INPUT: break; default: error_occured("call_digit() RPN, unknown last_action", FALSE); } } else { switch (cpu->last_action) { case ACTION_CLEAR: case ACTION_ENTER: /* no need to call cpu_to_output, because input * routine works directly with the main display, * and the other displays must have been taken * care of before */ reset_input(); break; /* ACTION_ENTER_PUSH does not occur in the * algebraic mode */ case ACTION_INPUT: break; case ACTION_BINOP: reset_input(); break; default: error_occured("call_digit() alg, unknown last_action", FALSE); } } /* now we process the input itself */ digit_entered = code_to_digit(received_code); switch (cpu->d->input_field) { case INPUT_FIELD_INT: if (cpu->d->n_int < INPUT_LENGTH) { if ((digit_entered != CODE_0) || (cpu->d->n_int != 0) ) { cpu->d->int_field[cpu->d->n_int] = digit_entered; cpu->d->n_int++; } } break; case INPUT_FIELD_FRAC: if (cpu->d->n_int + cpu->d->n_frac < INPUT_LENGTH) { cpu->d->frac_field[cpu->d->n_frac] = digit_entered; cpu->d->n_frac++; } break; case INPUT_FIELD_EXP: for (i = 0; i < EXP_INPUT_LENGTH - 1; i++) { cpu->d->exp_field[i] = cpu->d->exp_field[i + 1]; } cpu->d->exp_field[EXP_INPUT_LENGTH - 1] = digit_entered; break; } /* final actions */ cpu->last_action = ACTION_INPUT; /* we do not call aftermath() here, because we want to skip * cpu_to_output() (since it has already been done above) * and output-error-checking, since no output errors may occur in the course * of input. Even if we input 9999e99, the error should pop up later, when we * try to do something with this number */ save_for_undo(); refresh_body(); } void call_dot(void) { if (cpu->last_action != ACTION_INPUT) { if ((cpu->rpn_mode) && (cpu->last_action == ACTION_ENTER)) { push_stack(); cpu->y = cpu->x; } reset_input(); cpu->last_action = ACTION_INPUT; cpu_to_output(); } if (cpu->d->input_field == INPUT_FIELD_INT) { if (cpu->d->n_int == 0) { cpu->d->int_field[0] = CODE_0; cpu->d->n_int++; } cpu->d->input_field = INPUT_FIELD_FRAC; } save_for_undo(); refresh_body(); } void call_exp(void) /* this is the "e" button, not exp(x) */ { int i; if (cpu->last_action != ACTION_INPUT) { if ((cpu->rpn_mode) && (cpu->last_action == ACTION_ENTER)) { push_stack(); cpu->y = cpu->x; } reset_input(); cpu->d->int_field[0] = CODE_1; cpu->d->n_int = 1; cpu->last_action = ACTION_INPUT; } cpu->d->input_field = INPUT_FIELD_EXP; cpu->d->format = FORMAT_SCI; cpu->d->exp_sign = SIGN_PLUS; for (i = 0; i < EXP_INPUT_LENGTH; i++) cpu->d->exp_field[i] = 0; save_for_undo(); refresh_body(); } void call_sign(void) { cpu->d->sign = inverse_sign(cpu->d->sign); /* since the sign change does not toggle INPUT_IN_PROGRESS ... */ cpu->x = -cpu->x; save_for_undo(); refresh_body(); } void call_exp_sign(void) { if ( (cpu->d->input_field != INPUT_FIELD_EXP) || (cpu->last_action != ACTION_INPUT) ) return; cpu->d->exp_sign = inverse_sign(cpu->d->exp_sign); save_for_undo(); refresh_body(); } void call_pi(void) { if (cpu->rpn_mode) { if (cpu->last_action == ACTION_INPUT) input_to_x(); push_stack(); cpu->op = CODE_ENTER; cpu->y = cpu->x; } else { } cpu->x = PI; cpu_to_output(); cpu->last_action = ACTION_ENTER; save_for_undo(); refresh_body(); } void call_clear_all(void) { int i; reset_registers(); if (cpu->error) { for (i=0; imem_d[i]->display_overflow) { /* not quite consistent but otherwise * we would have to disable clear_all in the * state of error at all, in contrast to * the behavior of real calculators */ cpu->mem[i] = 0.0; } } } aftermath(); } void call_clear_x(void) { reset_input(); aftermath(); } void call_import_paste(double a) { if (cpu->rpn_mode) { if (cpu->last_action == ACTION_INPUT) input_to_x(); push_stack(); cpu->op = CODE_ENTER; cpu->y = cpu->x; } cpu->x = a; cpu->last_action = ACTION_ENTER; aftermath(); } void call_change_display_format(void) { if (cpu->last_action == ACTION_INPUT) input_to_x(); switch (cpu->prescribed_format) { case FORMAT_FIX: cpu->prescribed_format = FORMAT_SCI; break; case FORMAT_SCI: cpu->prescribed_format = FORMAT_ENG; break; case FORMAT_ENG: cpu->prescribed_format = FORMAT_FIX; break; } cpu->last_action = ACTION_ENTER; aftermath(); } void reset_input(void) /* is the function called by call_clear_x() (Cx button) */ /* also called by some other operations in cpu */ { cpu->x = 0.0; cpu->x_overflow = FALSE; cpu->last_action = ACTION_CLEAR; cpu->d->input_field = INPUT_FIELD_INT; cpu->d->sign = SIGN_PLUS; cpu->d->exp_sign = SIGN_PLUS; cpu->d->format = FORMAT_FIX; cpu->d->display_overflow = FALSE; cpu->d->n_int = 0; cpu->d->n_frac = 0; } void input_to_x(void) { double tmp, tmp10, tmp_exp; int i; tmp = 0.0; /* if there is nothing in input, there will be 0 in x * like in real-world calculators */ /* processing int part */ for (i = 0; i < cpu->d->n_int; i++) tmp = tmp * 10 + code_to_digit(cpu->d->int_field[i]); /* processing frac part (if there is any) */ if (cpu->d->n_frac > 0) { tmp10 = 1.0; for (i = 0; i < cpu->d->n_frac; i++) { tmp10 *= 0.1; tmp += code_to_digit ( cpu->d->frac_field[i] ) * tmp10; } } /* sign */ if(cpu->d->sign == SIGN_MINUS) tmp = -tmp; /* processing exp part (if there is any) */ if (cpu->d->format == FORMAT_SCI) { tmp_exp = 0.0; for (i = 0; i < EXP_INPUT_LENGTH; i++) tmp_exp = tmp_exp * 10.0 + code_to_digit( cpu->d->exp_field[i] ); if (cpu->d->exp_sign == SIGN_MINUS) tmp_exp = -tmp_exp; tmp *= pow(10.0, tmp_exp); } cpu->x = tmp; cpu->x_overflow = FALSE; } calcoo-1.3.18/src/b_buttons.c0000644000175000017500000001742710653053773012743 00000000000000/* * Calcoo: b_buttons.c * * Copyright (C) 2001, 2002, 2005 Alexei Kaminski * * functions to create and operate buttons * */ #include #include #include #include #include "codes.h" #include "body.h" #include "defaults.h" #include "b_headers.h" #include "gtkaux_headers.h" #include "io_headers.h" void create_button(int button_code, int x, int y, int w, int h, char ***icon_xpm, void (*button_function)(void), char *tooltip) { create_fg_pixmap(&(body->icon[button_code]), icon_xpm[button_code]); gtk_widget_show(body->icon[button_code]); body->button[button_code] = gtk_button_new(); gtk_container_add(GTK_CONTAINER(body->button[button_code]), body->icon[button_code]); g_signal_connect(G_OBJECT (body->button[button_code]), "clicked", GTK_SIGNAL_FUNC (*button_function), NULL); gtk_fixed_put(GTK_FIXED(body->fixer), body->button[button_code], x, y); GTK_WIDGET_UNSET_FLAGS(body->button[button_code], GTK_CAN_FOCUS); gtk_widget_set_size_request(body->button[button_code], w, h); gtk_widget_show(body->button[button_code]); if (tooltip) gtk_tooltips_set_tip(GTK_TOOLTIPS (body->button_tooltips), body->button[button_code], tooltip, NULL); } /* Invisible buttons are fake buttons necessary (?) to have keyboard * accelerators for functions which are not (and should not be) tied to any * specific real button. Exit is an example of such a function */ /* void create_invisible_button(int button_code, */ /* void (*button_function)(void)) */ /* { */ /* body->button[button_code] = gtk_button_new(); */ /* gtk_signal_connect(GTK_OBJECT (body->button[button_code]), "clicked", */ /* GTK_SIGNAL_FUNC (*button_function), NULL); */ /* gtk_fixed_put(GTK_FIXED(body->fixer), body->button[button_code], 0, 0); */ /* GTK_WIDGET_UNSET_FLAGS(body->button[button_code], GTK_CAN_FOCUS); */ /* gtk_widget_set_usize(body->button[button_code], 0, 0); */ /* } */ void create_toggle_button(int button_code, int x, int y, int w, int h, char ***icon_xpm, void (*button_function)(void), char *tooltip) { create_fg_pixmap(&(body->icon[button_code]), icon_xpm[button_code]); gtk_widget_show(body->icon[button_code]); body->button[button_code] = gtk_toggle_button_new(); gtk_container_add(GTK_CONTAINER(body->button[button_code]), body->icon[button_code]); g_signal_connect(G_OBJECT (body->button[button_code]), "toggled", GTK_SIGNAL_FUNC (*button_function), NULL); gtk_fixed_put(GTK_FIXED(body->fixer), body->button[button_code], x, y); GTK_WIDGET_UNSET_FLAGS(body->button[button_code], GTK_CAN_FOCUS); gtk_widget_set_size_request(body->button[button_code], w, h); gtk_widget_show(body->button[button_code]); if (tooltip) gtk_tooltips_set_tip(GTK_TOOLTIPS (body->button_tooltips), body->button[button_code], tooltip, NULL); } void create_copy_button(int button_code, int x, int y, int w, int h, char ***icon_xpm, char *tooltip) /* a special function is needed to create the copy button because * an additional signal connection is needed for it (see below) */ { static int have_selection = FALSE; body->selection_widget = gtk_invisible_new (); create_fg_pixmap(&(body->icon[button_code]), icon_xpm[button_code]); gtk_widget_show(body->icon[button_code]); body->button[button_code] = gtk_button_new(); gtk_container_add(GTK_CONTAINER(body->button[button_code]), body->icon[button_code]); /* now let us create copying process */ g_signal_connect (G_OBJECT (body->button[button_code]), "clicked", G_CALLBACK (own_selection), (gpointer) &have_selection ); g_signal_connect (G_OBJECT (body->selection_widget), "selection_clear_event", G_CALLBACK (selection_clear), (gpointer) &have_selection ); gtk_selection_add_target (body->selection_widget, GDK_SELECTION_PRIMARY, GDK_SELECTION_TYPE_STRING, 1); g_signal_connect (G_OBJECT (body->selection_widget), "selection_get", G_CALLBACK (set_selection), (gpointer) &have_selection ); gtk_fixed_put(GTK_FIXED(body->fixer), body->button[button_code], x, y); GTK_WIDGET_UNSET_FLAGS(body->button[button_code], GTK_CAN_FOCUS); gtk_widget_set_size_request(body->button[button_code], w, h); gtk_widget_show(body->button[button_code]); if (tooltip) gtk_tooltips_set_tip(GTK_TOOLTIPS (body->button_tooltips), body->button[button_code], tooltip, NULL); } void create_paste_button(int button_code, int x, int y, int w, int h, char ***icon_xpm, char *tooltip) /* a special function is needed to create the paste button because * an additional signal connection is needed for it (see below) */ { create_fg_pixmap(&(body->icon[button_code]), icon_xpm[button_code]); gtk_widget_show(body->icon[button_code]); body->button[button_code] = gtk_button_new(); gtk_container_add(GTK_CONTAINER(body->button[button_code]), body->icon[button_code]); g_signal_connect (G_OBJECT (body->button[button_code]), "clicked", G_CALLBACK (request_selection), (gpointer)body->main_window ); g_signal_connect (G_OBJECT(body->main_window), "selection_received", G_CALLBACK (get_selection), NULL); gtk_fixed_put(GTK_FIXED(body->fixer), body->button[button_code], x, y); GTK_WIDGET_UNSET_FLAGS(body->button[button_code], GTK_CAN_FOCUS); gtk_widget_set_size_request(body->button[button_code], w, h); gtk_widget_show(body->button[button_code]); if (tooltip) gtk_tooltips_set_tip(GTK_TOOLTIPS (body->button_tooltips), body->button[button_code], tooltip, NULL); } void show_button_label(int button_code) { gtk_widget_show(body->icon[button_code]); } void hide_button_label(int button_code) { gtk_widget_hide(body->icon[button_code]); } void toggled_arc_button(void) { /* this empty function is kept just in case, * but in GTK+ 1.0 it was necessary since there were * no function to determine the state of a toggle button, * and this function set the corresponding auxiliary flag */ } void toggled_hyp_button(void) { /* this empty function is kept just in case, * but in GTK+ 1.0 it was necessary since there were * no function to determine the state of a toggle button, * and this function set the corresponding auxiliary flag */ } void raise_toggle_button(int button_code) { gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON(body->button[button_code]), FALSE); } int get_toggle_button_state(int button_code) { return gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(body->button[button_code])); } void raise_arc_hyp(void) { if (body->arc_autorelease) raise_toggle_button(CODE_ARC); if (body->hyp_autorelease) raise_toggle_button(CODE_HYP); } int get_arc_state(void) { return get_toggle_button_state(CODE_ARC); } int get_hyp_state(void) { return get_toggle_button_state(CODE_HYP); } void set_arc_autorelease(int a) { body->arc_autorelease = a; } void set_hyp_autorelease(int a) { body->hyp_autorelease = a; } int get_arc_autorelease(void) { return body->arc_autorelease; } int get_hyp_autorelease(void) { return body->hyp_autorelease; } void enable_button(int button_code) { gtk_widget_set_sensitive(body->button[button_code],TRUE); } void disable_button(int button_code) { gtk_widget_set_sensitive(body->button[button_code],FALSE); } void show_button(int button_code) { gtk_widget_show(body->button[button_code]); } void hide_button(int button_code) { gtk_widget_hide(body->button[button_code]); } void disable_all_buttons(void) { int i; for (i = 0; i < MAX_BUTTON_NUMBER; i++) { if ((body->button[i] != NULL) && (i != CODE_CLEAR_ALL) && (i != CODE_UNDO) && (i != CODE_REDO)) disable_button(i); } } void enable_all_buttons(void) { int i; for (i = 0; i < MAX_BUTTON_NUMBER; i++) { if ((body->button[i] != NULL) && (i != CODE_CLEAR_ALL) && (i != CODE_UNDO) && (i != CODE_REDO)) enable_button(i); } } calcoo-1.3.18/src/Makefile.in0000644000175000017500000003513610661637130012634 00000000000000# Makefile.in generated by automake 1.10 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : bin_PROGRAMS = calcoo$(EXEEXT) subdir = src DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(bindir)" binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) am_calcoo_OBJECTS = aux.$(OBJEXT) b_accel.$(OBJEXT) \ b_buttons.$(OBJEXT) b_display.$(OBJEXT) b_info.$(OBJEXT) \ b_layout.$(OBJEXT) b_loadsave.$(OBJEXT) b_main.$(OBJEXT) \ b_settings.$(OBJEXT) b_pixmaps.$(OBJEXT) c_input.$(OBJEXT) \ c_main.$(OBJEXT) c_mem.$(OBJEXT) c_op.$(OBJEXT) \ c_output.$(OBJEXT) c_undo.$(OBJEXT) gtkaux.$(OBJEXT) \ input.$(OBJEXT) main.$(OBJEXT) output.$(OBJEXT) calcoo_OBJECTS = $(am_calcoo_OBJECTS) calcoo_LDADD = $(LDADD) calcoo_DEPENDENCIES = DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(calcoo_SOURCES) DIST_SOURCES = $(calcoo_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ calcoo_SOURCES = aux.c \ aux_headers.h \ b_accel.c \ b_accel_headers.h \ b_buttons.c \ b_display.c \ b_info.c \ b_layout.c \ b_loadsave.c \ b_main.c \ b_settings.c \ b_pixmaps.c \ basic.h \ body.h \ b_headers.h \ c_input.c \ c_main.c \ c_mem.c \ c_op.c \ c_output.c \ c_undo.c \ codes.h \ const.h \ cpu.h \ c_headers.h \ defaults.h \ displays.h \ gtkaux.c \ gtkaux_headers.h \ input.c \ io_headers.h \ main.c \ output.c \ texts.h INCLUDES = @GTK_CFLAGS@ LDADD = @GTK_LIBS@ CLEANFILES = *~ DISTCLEANFILES = .deps/*.P all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu src/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ rm -f "$(DESTDIR)$(bindir)/$$f"; \ done clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) calcoo$(EXEEXT): $(calcoo_OBJECTS) $(calcoo_DEPENDENCIES) @rm -f calcoo$(EXEEXT) $(LINK) $(calcoo_OBJECTS) $(calcoo_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/aux.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b_accel.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b_buttons.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b_display.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b_info.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b_layout.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b_loadsave.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b_main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b_pixmaps.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b_settings.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c_input.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c_main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c_mem.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c_op.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c_output.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c_undo.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkaux.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/input.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/output.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-exec-am: install-binPROGRAMS install-html: install-html-am install-info: install-info-am install-man: install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic ctags dist-hook distclean distclean-compile \ distclean-generic distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-binPROGRAMS \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-binPROGRAMS dist-hook: mkdir $(distdir)/pixmaps cp $(srcdir)/pixmaps/*.xpm $(distdir)/pixmaps # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: calcoo-1.3.18/src/input.c0000644000175000017500000001245410233012511012051 00000000000000/* * Calcoo: input.c * * Copyright (C) 2001-2005 Alexei Kaminski * */ #include "codes.h" #include "cpu.h" #include "io_headers.h" #include "c_headers.h" #include "b_headers.h" #include "aux_headers.h" /* most of the call_foo() functions are in the cpu part, though * some of them are in the body part */ /* digit keys */ void clicked_code_0(void) { call_digit(CODE_0); } void clicked_code_1(void) { call_digit(CODE_1); } void clicked_code_2(void) { call_digit(CODE_2); } void clicked_code_3(void) { call_digit(CODE_3); } void clicked_code_4(void) { call_digit(CODE_4); } void clicked_code_5(void) { call_digit(CODE_5); } void clicked_code_6(void) { call_digit(CODE_6); } void clicked_code_7(void) { call_digit(CODE_7); } void clicked_code_8(void) { call_digit(CODE_8); } void clicked_code_9(void) { call_digit(CODE_9); } /* other input keys */ void clicked_code_dot(void) { call_dot(); } void clicked_code_sign(void) { call_sign(); } void clicked_code_exp(void) { call_exp(); } void clicked_code_exp_sign(void) { call_exp_sign(); } void clicked_code_clear_x(void) { call_clear_x(); } /* 3.1415 */ void clicked_code_pi(void) { call_pi(); } /* binary operation keys */ void clicked_code_add(void) { call_binary_op(CODE_ADD); } void clicked_code_sub(void) { call_binary_op(CODE_SUB); } void clicked_code_mul(void) { call_binary_op(CODE_MUL); } void clicked_code_div(void) { call_binary_op(CODE_DIV); } void clicked_code_pow(void) { call_binary_op(CODE_POW); } /* memory operation keys */ void clicked_code_mem_plus(void) { call_mem_op(CODE_MEM_PLUS); } void clicked_code_mem_to_x(void) { call_mem_op(CODE_MEM_TO_X); } void clicked_code_x_to_mem(void) { call_mem_op(CODE_X_TO_MEM); } void clicked_code_exch_xmem(void) { call_mem_op(CODE_EXCH_XMEM); } void clicked_code_switch_to_mem0(void) { call_switch_to_mem(0); } void clicked_code_switch_to_mem1(void) { call_switch_to_mem(1); } /* unary operation keys */ void clicked_code_10tox(void) { call_unary_op(CODE_10TOX); } void clicked_code_log(void) { call_unary_op(CODE_LOG); } void clicked_code_etox(void) { call_unary_op(CODE_ETOX); } void clicked_code_ln(void) { call_unary_op(CODE_LN); } void clicked_code_sqr(void) { call_unary_op(CODE_SQR); } void clicked_code_sqrt(void) { call_unary_op(CODE_SQRT); } void clicked_code_invx(void) { call_unary_op(CODE_INVX); } void clicked_code_fact(void) { call_unary_op(CODE_FACT); } /* equals key */ void clicked_code_eq(void) { call_eq (); } /* CA key */ void clicked_code_clear_all(void) { call_clear_all (); } void clicked_code_exch_xy(void) { call_exch_xy (); } void clicked_code_stack_up(void) { call_stack_up (); } void clicked_code_stack_down(void) { call_stack_down (); } /* trigonometry keys */ void clicked_code_sin(void) { if (!get_hyp_state()) if (!get_arc_state()) call_unary_op(CODE_SIN); else call_unary_op(CODE_ASIN); else if (!get_arc_state()) call_unary_op(CODE_SINH); else call_unary_op(CODE_ASINH); raise_arc_hyp(); } void clicked_code_cos(void) { if (!get_hyp_state()) if (!get_arc_state()) call_unary_op(CODE_COS); else call_unary_op(CODE_ACOS); else if (!get_arc_state()) call_unary_op(CODE_COSH); else call_unary_op(CODE_ACOSH); raise_arc_hyp(); } void clicked_code_tan(void) { if (!get_hyp_state()) if (!get_arc_state()) call_unary_op(CODE_TAN); else call_unary_op(CODE_ATAN); else if (!get_arc_state()) call_unary_op(CODE_TANH); else call_unary_op(CODE_ATANH); raise_arc_hyp(); } void clicked_change_display_format(void) { call_change_display_format(); } void clicked_code_undo(void) { call_undo (); } void clicked_code_redo(void) { call_redo (); } void clicked_code_info(void) { call_info (); /* call_info() is in b_info.c */ } void clicked_code_settings(void) { call_settings (); /* call_settings() is in b_settings.c */ } void clicked_code_left_paren(void) { call_left_paren(); } void clicked_code_right_paren(void) { call_right_paren(); } void clicked_code_enter(void) { call_enter(); } void clicked_code_paste(double x) { call_import_paste(x); } /* void clicked_code_copy(void) */ /* No such function. The Copy button is connected * to special GTK functions, see b_buttons.c */ void clicked_change_angle_units(void) { call_change_angle_units(); save_settings(); } void clicked_set_angle_units(int a) { call_set_angle_units(a); } int requested_angle_units(void) { int a; a = call_get_angle_units(); return a; } void clicked_set_rpn_mode(int a) { call_set_rpn_mode(a); } int requested_rpn_mode(void) { int a; a = call_get_rpn_mode(); return a; } void clicked_set_enter_mode(int a) { call_set_enter_mode(a); } int requested_enter_mode(void) { int a; a = call_get_enter_mode(); return a; } void clicked_set_rounding_mode(int a) { call_set_rounding_mode(a); } int requested_rounding_mode(void) { int a; a = call_get_rounding_mode(); return a; } void clicked_set_trunc_zeros_mode(int a) { call_set_trunc_zeros_mode(a); } int requested_trunc_zeros_mode(void) { int a; a = call_get_trunc_zeros_mode(); return a; } void clicked_set_stack_mode(int a) { call_set_stack_mode(a); } int requested_stack_mode(void) { int a; a = call_get_stack_mode(); return a; } /* void clicked_code_exit(void) */ /* { */ /* call_exit(); */ /* } */ /* call_exit() is in b_main.c */ calcoo-1.3.18/src/b_accel_headers.h0000644000175000017500000000053610233317634013776 00000000000000/* * Calcoo: b_accel_headers.h * * Copyright (C) 2005 Alexei Kaminski * * headers for the functions defined in the files b_accel.c * separate header file because we do not want GTK stuff in b_headers.h */ /* b_accel.c */ void key_press_handler(GtkWidget*, GdkEventKey*, gpointer); gboolean button_press_handler(GtkWidget*, GdkEventButton*); calcoo-1.3.18/src/codes.h0000644000175000017500000001050507502146241012024 00000000000000/* * Calcoo: codes.h * * Copyright (C) 2001, 2002 Alexei Kaminski * */ #ifndef CODES_H #define CODES_H #define SIGN_PLUS 1 #define SIGN_MINUS -1 /* display formats */ #define FORMAT_FIX 0 #define FORMAT_SCI 1 #define FORMAT_ENG 2 #define ENTER_MODE_TRADITIONAL 0 #define ENTER_MODE_HP28 1 #define STACK_MODE_XYZT 0 #define STACK_MODE_INFINITE 1 /*-----------------------------------------------------------------------*/ /* these are the codes to be assigned to cpu->last_action and only for this */ #define ACTION_INPUT 10 #define ACTION_ENTER 11 /* both RPN and algebraic modes * not only the key, but many other actions * actually, for any action that stops input, * and that is not "Clear" or (in algebraic mode) * binop * Actually, the key corresponds to this * action only when enter_mode is set to hp28, * otherwise, it corresponds to ACTION_ENTER_PUSH */ #define ACTION_BINOP 12 /* only for algebraic mode, in RPN, use ACTION_ENTER */ #define ACTION_CLEAR 13 /* both RPN and algebraic modes * we need it to be able to get rid of 0 that appears * on the display when there is nothing to display. * I mean that in the process of input the number * being read is stored in cpu->d (display) rather * than in cpu->x. Since there is zero on the * display before input, setting cpu->last_action * to ACTION_CLEAR signals that this zero must * be removed from the display before we put the * digits from the input there */ #define ACTION_ENTER_PUSH 14 /* only RPN mode * in ENTER_MODE_TRADITIONAL; * in ENTER_MODE_HP28, ACTION_ENTER is used */ #define ACTION_ERROR 15 /*---------------------------------------------------------------------*/ /* the value has the real information about priority: * higher values for higher priorities */ #define PRIORITY_CODE_MIN 0 /* for ")" and "=" */ #define PRIORITY_CODE_ADD 1 #define PRIORITY_CODE_MUL 2 #define PRIORITY_CODE_POW 3 /*===================================================================== * * Codes for buttons * * also used as codes for corresponding operations, if applicable * * the maximum possible code is NUMBER_OF_BUTTONS - 1 * it is defined in body.h * *======================================================================*/ /* The real numerical values of the folowing ten codes are not supposed to be * important. The translation must be done by digit_to_code and * code_to_digit. */ #define CODE_0 0 #define CODE_1 1 #define CODE_2 2 #define CODE_3 3 #define CODE_4 4 #define CODE_5 5 #define CODE_6 6 #define CODE_7 7 #define CODE_8 8 #define CODE_9 9 /* attention! careful with these codes! * there used to be constructions like * "for (i = CODE_ADD; i <= CODE_POWER; i++)" * they must have been eradicated, but who knows...*/ #define CODE_EQ 10 #define CODE_ADD 11 #define CODE_SUB 12 #define CODE_MUL 13 #define CODE_DIV 14 #define CODE_POW 15 #define CODE_ENTER 16 #define CODE_NO_OPERATION 19 #define CODE_DOT 21 #define CODE_SIGN 22 #define CODE_EXP 23 #define CODE_EXP_SIGN 24 #define CODE_LOG 31 #define CODE_10TOX 32 #define CODE_LN 33 #define CODE_ETOX 34 #define CODE_SQRT 35 #define CODE_SQR 36 #define CODE_INVX 37 #define CODE_PI 38 #define CODE_FACT 39 #define CODE_SIN 41 #define CODE_COS 42 #define CODE_TAN 43 #define CODE_DEG 46 #define CODE_RAD 47 #define CODE_ARC 48 #define CODE_HYP 49 #define CODE_EXCH_XY 50 #define CODE_STACK_UP 51 #define CODE_STACK_DOWN 52 #define CODE_LEFT_PAREN 53 #define CODE_RIGHT_PAREN 54 #define CODE_ASIN 61 #define CODE_SINH 62 #define CODE_ASINH 63 #define CODE_ACOS 64 #define CODE_COSH 65 #define CODE_ACOSH 66 #define CODE_ATAN 67 #define CODE_TANH 68 #define CODE_ATANH 69 #define CODE_CLEAR_ALL 100 #define CODE_CLEAR_X 101 #define CODE_DEG_RAD 108 #define CODE_FORMAT 109 #define CODE_MEM_TO_X 110 #define CODE_MEM_PLUS 111 #define CODE_EXCH_XMEM 118 #define CODE_X_TO_MEM 119 #define CODE_SWITCH_TO_MEM0 120 #define CODE_SWITCH_TO_MEM1 121 #define CODE_UNDO 133 #define CODE_REDO 134 #define CODE_INFO 135 #define CODE_SETTINGS 136 #define CODE_COPY 137 #define CODE_PASTE 138 #define CODE_EXIT 150 /* the maximum possible code is NUMBER_OF_BUTTONS - 1, * which is defined in body.h */ #endif /* CODES_H */ calcoo-1.3.18/src/b_loadsave.c0000644000175000017500000001512110646166646013036 00000000000000/* * Calcoo: b_loadsave.c * * Copyright (C) 2001,2002, 2007 Alexei Kaminski * */ #include #include #include #include "const.h" #include "basic.h" #include "defaults.h" #include "b_headers.h" #include "aux_headers.h" /* Careful with these strings! * Their maximum possible length is defined below */ #define RPN_TRUE_STRING "RPN=True\n" #define RPN_FALSE_STRING "RPN=False\n" #define ENTER_TRADITIONAL_STRING "Enter_Mode=Traditional\n" #define ENTER_HP28_STRING "Enter_Mode=HP-28\n" #define STACK_INFINITE_STRING "Stack_Type=Infinite\n" #define STACK_XYZT_STRING "Stack_Type=XYZT\n" #define ARC_AUTORELEASE_TRUE_STRING "Arc_Autorelease=True\n" #define ARC_AUTORELEASE_FALSE_STRING "Arc_Autorelease=False\n" #define HYP_AUTORELEASE_TRUE_STRING "Hyp_Autorelease=True\n" #define HYP_AUTORELEASE_FALSE_STRING "Hyp_Autorelease=False\n" #define DEG_STRING "Angle_Units=deg\n" #define RAD_STRING "Angle_Units=rad\n" #define ROUNDING_TRUE_STRING "Rounding=True\n" #define ROUNDING_FALSE_STRING "Rounding=False\n" #define ROUNDING_VALUE_STRING "Round_To_Digits=" /* no "\n" ! */ #define TRUNC_ZEROS_TRUE_STRING "Trunc_Trailing_Zeros=True\n" #define TRUNC_ZEROS_FALSE_STRING "Trunc_Trailing_Zeros=False\n" #define MAX_SETTINGLINE_LENGTH 32 #define MAX_FILENAME_LENGTH 64 static char settings_filename[MAX_FILENAME_LENGTH]; void load_settings(void) { char s1[MAX_SETTINGLINE_LENGTH], s2[MAX_SETTINGLINE_LENGTH], s3[MAX_SETTINGLINE_LENGTH], s4[MAX_SETTINGLINE_LENGTH], s5[MAX_SETTINGLINE_LENGTH], s6[MAX_SETTINGLINE_LENGTH], s7[MAX_SETTINGLINE_LENGTH], s8[MAX_SETTINGLINE_LENGTH], s9[MAX_SETTINGLINE_LENGTH]; int len, rounding_value; FILE *fp; snprintf( settings_filename, sizeof(settings_filename) - 1, "%s/.calcoo", getenv("HOME") ); strcpy(s1," "); strcpy(s2," "); strcpy(s3," "); strcpy(s4," "); strcpy(s5," "); strcpy(s6," "); strcpy(s7," "); strcpy(s8," "); strcpy(s9," "); fp = fopen(settings_filename, "r"); if( fp != NULL ) { fgets(s1, MAX_SETTINGLINE_LENGTH, fp); if (strcmp(s1, RPN_TRUE_STRING) == 0){ set_rpn_mode(TRUE); } else if (strcmp(s1, RPN_FALSE_STRING) == 0){ set_rpn_mode(FALSE); } else { set_rpn_mode(DEFAULT_RPN_MODE); } fgets(s2, MAX_SETTINGLINE_LENGTH, fp); if (strcmp(s2, ENTER_TRADITIONAL_STRING) == 0){ set_enter_mode(ENTER_MODE_TRADITIONAL); } else if (strcmp(s2, ENTER_HP28_STRING) == 0){ set_enter_mode(ENTER_MODE_HP28); } else { set_enter_mode(DEFAULT_ENTER_MODE); } fgets(s3, MAX_SETTINGLINE_LENGTH, fp); if (strcmp(s3, STACK_INFINITE_STRING) == 0){ set_stack_mode(STACK_MODE_INFINITE); } else if (strcmp(s3, STACK_XYZT_STRING) == 0){ set_stack_mode(STACK_MODE_XYZT); } else { set_stack_mode(DEFAULT_STACK_MODE); } fgets(s4, MAX_SETTINGLINE_LENGTH, fp); if (strcmp(s4, ARC_AUTORELEASE_TRUE_STRING) == 0){ set_arc_autorelease(TRUE); } else if (strcmp(s4, ARC_AUTORELEASE_FALSE_STRING) == 0){ set_arc_autorelease(FALSE); } else { set_arc_autorelease(DEFAULT_ARC_AUTORELEASE); } fgets(s5, MAX_SETTINGLINE_LENGTH, fp); if (strcmp(s5, HYP_AUTORELEASE_TRUE_STRING) == 0){ set_hyp_autorelease(TRUE); } else if (strcmp(s5, HYP_AUTORELEASE_FALSE_STRING) == 0){ set_hyp_autorelease(FALSE); } else { set_hyp_autorelease(DEFAULT_HYP_AUTORELEASE); } fgets(s6, MAX_SETTINGLINE_LENGTH, fp); if (strcmp(s6, DEG_STRING) == 0){ set_angle_units(CODE_DEG); } else if (strcmp(s6, RAD_STRING) == 0){ set_angle_units(CODE_RAD); } else { set_angle_units(DEFAULT_ANGLE_UNITS); } fgets(s7, MAX_SETTINGLINE_LENGTH, fp); if (strcmp(s7, ROUNDING_TRUE_STRING) == 0){ len = strlen(ROUNDING_VALUE_STRING); fgets(s8, MAX_SETTINGLINE_LENGTH, fp); if (strncmp(s8, ROUNDING_VALUE_STRING, len) == 0){ rounding_value = 0; sscanf(s8 + len, "%d", &rounding_value); if ((rounding_value > 0) && (rounding_value <= INPUT_LENGTH) ) set_rounding_mode(rounding_value); } else { set_rounding_mode(-INPUT_LENGTH); } } else if (strcmp(s7, ROUNDING_FALSE_STRING) == 0){ len = strlen(ROUNDING_VALUE_STRING); fgets(s8, MAX_SETTINGLINE_LENGTH, fp); if (strncmp(s8, ROUNDING_VALUE_STRING, len) == 0){ rounding_value = 0; sscanf(s8 + len, "%d", &rounding_value); if ((rounding_value > 0) && (rounding_value <= INPUT_LENGTH) ) set_rounding_mode(-rounding_value); } else { set_rounding_mode(-INPUT_LENGTH); } } else { set_rounding_mode(-INPUT_LENGTH); } fgets(s9, MAX_SETTINGLINE_LENGTH, fp); if (strcmp(s9, TRUNC_ZEROS_TRUE_STRING) == 0){ set_trunc_zeros_mode(TRUE); } else if (strcmp(s9, TRUNC_ZEROS_FALSE_STRING) == 0){ set_trunc_zeros_mode(FALSE); } else { set_trunc_zeros_mode(DEFAULT_TRUNC_ZEROS_MODE); } fclose(fp); } else { set_rpn_mode(DEFAULT_RPN_MODE); set_enter_mode(DEFAULT_ENTER_MODE); set_stack_mode(DEFAULT_STACK_MODE); set_arc_autorelease(DEFAULT_ARC_AUTORELEASE); set_hyp_autorelease(DEFAULT_HYP_AUTORELEASE); set_angle_units(DEFAULT_ANGLE_UNITS); set_rounding_mode(-INPUT_LENGTH); set_trunc_zeros_mode(DEFAULT_TRUNC_ZEROS_MODE); error_occured("load_settings(): could not open settings file", FALSE); } } void save_settings(void) { int rounding_value; FILE *fp; fp = fopen(settings_filename,"w"); if( fp != NULL ){ if (get_rpn_mode()) fprintf(fp,"%s", RPN_TRUE_STRING); else fprintf(fp,"%s", RPN_FALSE_STRING); if (get_enter_mode() == ENTER_MODE_TRADITIONAL) fprintf(fp,"%s", ENTER_TRADITIONAL_STRING); else fprintf(fp,"%s", ENTER_HP28_STRING); if (get_stack_mode() == STACK_MODE_INFINITE) fprintf(fp,"%s", STACK_INFINITE_STRING); else fprintf(fp,"%s", STACK_XYZT_STRING); if (get_arc_autorelease()) fprintf(fp,"%s", ARC_AUTORELEASE_TRUE_STRING); else fprintf(fp,"%s", ARC_AUTORELEASE_FALSE_STRING); if (get_hyp_autorelease()) fprintf(fp,"%s", HYP_AUTORELEASE_TRUE_STRING); else fprintf(fp,"%s", HYP_AUTORELEASE_FALSE_STRING); if (get_angle_units() == CODE_DEG) fprintf(fp,"%s", DEG_STRING); else fprintf(fp,"%s", RAD_STRING); rounding_value = get_rounding_mode(); if (rounding_value > 0) { fprintf(fp,"%s", ROUNDING_TRUE_STRING); fprintf(fp,"%s", ROUNDING_VALUE_STRING); fprintf(fp,"%d\n", rounding_value); } else { fprintf(fp,"%s", ROUNDING_FALSE_STRING); fprintf(fp,"%s", ROUNDING_VALUE_STRING); fprintf(fp,"%d\n", -rounding_value); } if (get_trunc_zeros_mode()) fprintf(fp,"%s", TRUNC_ZEROS_TRUE_STRING); else fprintf(fp,"%s", TRUNC_ZEROS_FALSE_STRING); fclose(fp); } else error_occured("save_settings(): could not open settings file", FALSE); } calcoo-1.3.18/src/c_main.c0000644000175000017500000001233307663750640012165 00000000000000/* * Calcoo: c_main.c * * Copyright (C) 2001, 2002, 2003 Alexei Kaminski * * creates and initializes cpu * * also handles "clear all" and RPN toggles */ #include #include #include #include #include "codes.h" #include "const.h" #include "defaults.h" #include "cpu.h" #include "c_headers.h" #include "io_headers.h" #include "aux_headers.h" t_calcoo_cpu *cpu; void reset_stack(void); void init_cpu(void) /* mallocs and initializes cpu variables; * runs once, after calcoo is started */ { int i; cpu = (t_calcoo_cpu*) malloc (sizeof(t_calcoo_cpu)); if(cpu == NULL) error_occured("malloc in init_cpu() failed", TRUE); cpu->d = (t_cpu_display*) malloc (sizeof(t_cpu_display)); if(cpu->d == NULL) error_occured("malloc in init_cpu() failed", TRUE); cpu->stack_head = NULL; for(i = 0; i < NUMBER_OF_MEMS; i++) { cpu->mem[i] = 0.0; cpu->mem_d[i] = (t_cpu_display*) malloc (sizeof(t_cpu_display)); } for(i = 0; i < NUMBER_OF_REG_DISPLAYS; i++) { cpu->reg_d[i] = (t_cpu_display*) malloc (sizeof(t_cpu_display)); if(cpu->reg_d[i] == NULL) error_occured("malloc in init_cpu() failed", TRUE); cpu->op_d[i] = (t_cpu_operation_display*) malloc (sizeof(t_cpu_operation_display)); if(cpu->op_d[i] == NULL) error_occured("malloc in init_cpu() failed", TRUE); } reset_registers(); cpu->prescribed_format = DEFAULT_DISPLAY_FORMAT; cpu->curr_mem = 0; cpu->rpn_mode = FALSE ; /* It is a kluge. We need it to have proper * (to display nothing) initialization of the operation * displays. The reason is that cpu->rpn_mode is used in * cpu_to_output(), and if it turns out to be set to TRUE * after having been malloc'ed, cpu_to_output() does not * reset operation displays. If these displays contain * some garbage after having been malloc'ed, it will lead to * weird stuff displayed in the operation displays in the * algebraic mode from after initialization until the next * call to cpu_to_output */ if (MAXIMIZE_PRECISION) cpu->precision = pow(10, -floor(fabs(log10(DBL_EPSILON))) + 1); /* "+1" is just in case, to underestimate precision; * as for -floor(fabs()), it is just me being paranoid, * since I am not sure wether the behavior of floor() * of a negative number is universal */ else cpu->precision = pow(10, -INPUT_LENGTH - 1); /* it is going to be used in evaluation of * trigonometric functions to get sin PI == 0 * rather than 10^-17 and also in subtraction/addition * to have 100.1 - 100 - 0.1 == 0 rather than 1e-15 */ cpu_to_output(); init_undo_stack(); refresh_body(); } void aftermath(void) { cpu_to_output(); save_for_undo(); refresh_body(); } void reset_registers(void) /* the function called by the "C" button" */ { cpu->x = 0.0; cpu->y = 0.0; cpu->z = 0.0; cpu->t = 0.0; cpu->op = CODE_NO_OPERATION; cpu->number_of_parens = 0; reset_stack(); cpu->last_action = ACTION_CLEAR; cpu->x_overflow = FALSE; cpu->d->input_field = INPUT_FIELD_INT; cpu->d->sign = SIGN_PLUS; cpu->d->exp_sign = SIGN_PLUS; cpu->d->format = FORMAT_FIX; cpu->d->display_overflow = FALSE; cpu->d->n_int = 0; cpu->d->n_frac = 0; } void reset_stack(void) { t_stack_element *to_remove; while (cpu->stack_head != NULL) { to_remove = cpu->stack_head; cpu->stack_head = cpu->stack_head->next; free(to_remove); } } void call_set_rpn_mode(int a) { double tmp; if (a != cpu->rpn_mode) { if (cpu->last_action == ACTION_INPUT) input_to_x(); tmp = cpu->x; reset_undo_stack(); reset_registers(); cpu->x = tmp; if (a) { cpu->rpn_mode = TRUE; } else { cpu->rpn_mode = FALSE; } /* why not just "cpu->rpn_mode = a;"? I don't remember why */ cpu_to_output(); save_for_undo(); refresh_body(); } } int call_get_rpn_mode(void) { return cpu->rpn_mode; } void call_set_enter_mode(int new_mode) { cpu->enter_mode = new_mode; } int call_get_enter_mode(void) { return cpu->enter_mode; } void call_set_rounding_mode(int a) { if (cpu->last_action == ACTION_INPUT) { input_to_x(); cpu->last_action = ACTION_ENTER; } if (a > 0 ) { cpu->rounding = TRUE; cpu->digits_to_keep = a; } else { cpu->rounding = FALSE; cpu->digits_to_keep = -a; } cpu_to_output(); refresh_body(); } int call_get_rounding_mode(void) { if (cpu->rounding) return cpu->digits_to_keep; else return -cpu->digits_to_keep; } void call_set_trunc_zeros_mode(int a) { if(cpu->rounding){ if (cpu->last_action == ACTION_INPUT) { input_to_x(); cpu->last_action = ACTION_ENTER; } cpu->trunc_zeros = a; cpu_to_output(); refresh_body(); } else { /* to ensure proper loading of options */ cpu->trunc_zeros = a; } } int call_get_trunc_zeros_mode(void) { return cpu->trunc_zeros; } void call_set_stack_mode(int new_mode) { cpu->stack_mode = new_mode; if (new_mode == STACK_MODE_XYZT) reset_stack(); /* resets stack only beyond T */ } int call_get_stack_mode(void) { return cpu->stack_mode; } int call_get_angle_units(void) { return cpu->angle_units; } void call_change_angle_units(void) { if (cpu->angle_units == CODE_DEG) cpu->angle_units = CODE_RAD; else cpu->angle_units = CODE_DEG; save_for_undo(); refresh_body(); } void call_set_angle_units(int a) { cpu->angle_units = a; refresh_body(); } calcoo-1.3.18/src/aux.c0000644000175000017500000001516507664006314011533 00000000000000/* * Calcoo: aux.c * * Copyright (C) 2001, 2002 Alexei Kaminski * * auxuliary general-purpose functions * calcoo code translators */ #include #include #include #include "basic.h" #include "codes.h" #include "defaults.h" #include "displays.h" #include "const.h" #include "aux_headers.h" /******************************************************************* * * Calcoo-specific auxiliary functions * *******************************************************************/ int digit_to_code(int d) { switch (d) { case 0: return CODE_0; break; case 1: return CODE_1; break; case 2: return CODE_2; break; case 3: return CODE_3; break; case 4: return CODE_4; break; case 5: return CODE_5; break; case 6: return CODE_6; break; case 7: return CODE_7; break; case 8: return CODE_8; break; case 9: return CODE_9; break; } error_occured("digit_to_code(): request to transate a non-digit", FALSE); return CODE_0; } int code_to_digit(int c) { switch (c) { case CODE_0: return 0; break; case CODE_1: return 1; break; case CODE_2: return 2; break; case CODE_3: return 3; break; case CODE_4: return 4; break; case CODE_5: return 5; break; case CODE_6: return 6; break; case CODE_7: return 7; break; case CODE_8: return 8; break; case CODE_9: return 9; break; } error_occured("code_to_digit(): request to transate a non-digit code", FALSE); return 0; } int binop_to_od(int c) { switch (c) { case CODE_ADD: return OD_ADD; break; case CODE_SUB: return OD_SUB; break; case CODE_MUL: return OD_MUL; break; case CODE_DIV: return OD_DIV; break; case CODE_POW: return OD_POW; break; } error_occured("binop_to_od(): request to transate a non-binop code", FALSE); return OD_ADD; } int inverse_sign(int s) { switch (s) { case SIGN_PLUS: return SIGN_MINUS; break; case SIGN_MINUS: return SIGN_PLUS; break; } error_occured("inverse_sign(): request to invert a non-sign", FALSE); return SIGN_PLUS; } int priority(int op) { switch (op) { case CODE_ADD: case CODE_SUB: return PRIORITY_CODE_ADD; break; case CODE_MUL: case CODE_DIV: return PRIORITY_CODE_MUL; break; case CODE_POW: return PRIORITY_CODE_POW; break; } error_occured("priority(): request of priority of a non-binop code", FALSE); return PRIORITY_CODE_ADD; } /******************************************************************* * * General-purpose auxiliary and math functions * *******************************************************************/ int last_digit(double a) { return round_double_to_int(a - 10.0 * floor(a / 10.0)); } int almost_integer(double a, double precision) { if (fabs(a - round_double_to_int(a)) < precision * fabs(a)) return TRUE; else return FALSE; } /* the name is weird on purpose; in order to prevent possible * name conflicts */ double sign_of_double(double a) { if (a > 0.0) return 1.0; else if (a < 0.0) return -1.0; else return 0.0; } double max_fabs(double a, double b) { double fa, fb; fa = fabs(a); fb = fabs(b); if (fa > fb) return fa; else return fb; } double smart_sum(double a, double b, double precision) { double sumabs, sumsign, cutoff; if ( fabs(a + b) < fabs(a) * precision ){ /* hack to have 100.1 - 100 - 0.1 == 0 */ return 0.0; } else { sumabs = fabs(a + b); sumsign = sign_of_double(a + b); if (floor(log10(max_fabs(a, b))) <= ceil(log10(sumabs))) return sumsign * sumabs; cutoff = pow(10, ceil(log10(max_fabs(a, b)))) * precision; if (cutoff < sumabs) { return sumsign * cutoff * rint(sumabs / cutoff); } else { return 0.0; } } } /* Yes, this is one weird name. It used to be just "round", * but it conflicted with a function with the same name * defined in math.h on Mac OS X. In order to prevent this and * possible future name conflicts, the present name was chosen */ int round_double_to_int(double a) { if (a >= 0.0) return (int)(a + 0.5); else return (int)(a - 0.5); } /* the formulas used in the functions below are taken from * "Handbook on mathematic functions", ed. Abramovitz and Stegun. * The relative precision may be as low as 10^(-7) for smaller numbers, * but it is FAST */ int fact_too_large(double x) /* determines if the factorial is too large to be shown by calcoo * this is only an estimate, it still can turn out to be larger than * the calcoo's max number, but if it returns FALSE it is at least guaranteed * that the factorial will fit into double */ { double log_10_x_fact; if (x <= 0.0 ) return TRUE; log_10_x_fact = (x + 0.5) * log10(x) - x * log10(exp(1.0)); return (log_10_x_fact > pow(10, EXP_INPUT_LENGTH) ); } double fact_function(double x) /* if calcoo is unable to show all the meaningful digits of the result, * there is no sense in the exact calculation, so we can use the * Stirling formula for the approximate calculation. Otherwise, we * call fact_function_jr(x), which calculates the factorial of integer * numbers exactly, but is slower */ { double log_10_x_fact, a; log_10_x_fact = (x + 0.5) * log10(x) - x * log10(exp(1.0)); if (log_10_x_fact > INPUT_LENGTH ) { a = 1.0/(x+1.0); return exp(-x-1.0) * sqrt(2.0*PI) * pow(x+1.0, (x+0.5)) * ( 1.0 + a * ((1.0/12.0) + a * ((1.0/288.0) + a * ((-139.0/51840.0) + a * ((-571.0/2488320.0) ))))); } else return fact_function_jr(x); } double fact_function_jr(double x) { if (x >= 1.0) return x * fact_function_jr(x-1.0); else return ( 1 + x * ((-0.577191652) + x * ((0.988205891) + x * ((-0.897056937) + x * ((0.918206857) + x * ((-0.756704078) + x * ((0.482199394) + x * ((-0.193527818) + x * (0.035868343) )))))))); } /******************************************************************* * * Functions used in debugging * *******************************************************************/ /* this is a kind of assert() */ /* REPORT_NONCRITICAL_ERRORS is defined in defaults.h */ void error_occured(char *message, int is_critical) { if (is_critical) { fprintf(stderr, "Calcoo critical error: %s, exiting\n", message); exit(1); } else if (REPORT_NONCRITICAL_ERRORS) fprintf(stderr, "Calcoo non-critical error: %s\n", message); } /* DEBUG_MESSAGES_ON is defined in defaults.h */ void mess(char *message, int number) { if(DEBUG_MESSAGES_ON) fprintf(stderr, "%s %d\n", message, number); } void messd(char *message, double number) { if(DEBUG_MESSAGES_ON) fprintf(stderr, "%s %f\n", message, number); } void verify_malloc(void *p) { if (p == NULL){ fprintf(stderr, "malloc() failed, exiting\n"); exit(1); } } calcoo-1.3.18/src/c_mem.c0000644000175000017500000000234707664205714012021 00000000000000/* * Calcoo: c_mem.c * * Copyright (C) 2001, 2002 Alexei Kaminski * * memory operations * */ #include "const.h" #include "codes.h" #include "cpu.h" #include "c_headers.h" #include "io_headers.h" #include "aux_headers.h" void call_mem_op(int received_code) { double tmp; if (cpu->last_action == ACTION_INPUT) input_to_x(); switch (received_code){ case CODE_MEM_PLUS : cpu->mem[cpu->curr_mem] = smart_sum(cpu->x, cpu->mem[cpu->curr_mem], cpu->precision); break; case CODE_MEM_TO_X : if (cpu->rpn_mode) { push_stack(); cpu->op = CODE_ENTER; /* should be removed (?) */ cpu->y = cpu->x; } cpu->x = cpu->mem[cpu->curr_mem]; break; case CODE_X_TO_MEM : cpu->mem[cpu->curr_mem] = cpu->x; break; case CODE_EXCH_XMEM : tmp = cpu->x; cpu->x = cpu->mem[cpu->curr_mem]; cpu->mem[cpu->curr_mem] = tmp; break; default: error_occured("call_mem_op() unknown mem_op code", FALSE); } cpu->last_action = ACTION_ENTER; aftermath(); } void call_switch_to_mem(int m) { if ( (m >= 0) && (m < NUMBER_OF_MEMS)) { /* sanity check */ cpu->curr_mem = m; save_for_undo(); refresh_body(); } else error_occured("call_switch_to_mem() no such memory register", FALSE); } calcoo-1.3.18/src/b_settings.c0000644000175000017500000003160510653053773013077 00000000000000/* * Calcoo: b_settings.c * * creates and operates the settings dialog * * Copyright (C) 2001, 2002, 2005 Alexei Kaminski * */ #include #include #include #include #include #include "codes.h" #include "b_headers.h" #include "body.h" #include "aux_headers.h" #include "pixmaps/main.xpm" #define INFO_SPACING 10 #define INFO_LINE_SPACING 5 #define BOX_BORDER_WIDTH 5 #define ENTRY_FIELD_LENGTH 2 #define TABLE_X_PADDING 8 #define TABLE_Y_PADDING 5 #define TABLE_BUTTON_Y_PADDING 10 #define WINDOW_PADDING 7 static int rpn_set, rpn_last, enter_set, enter_last, stack_set, stack_last, arc_set, arc_last, hyp_set, hyp_last, round_last, round_set, trunc_last, trunc_set; static GtkWidget *arc_check, *hyp_check; static GtkWidget *rpn_radio1, *rpn_radio2; static GtkWidget *enter_radio1, *enter_radio2; static GtkWidget *stack_radio1, *stack_radio2; static GtkWidget *round_spinbox, *round_check, *round_label1, *round_label2; static GtkWidget *trunc_check; void apply_new_settings(void); void toggled_rpn(void); void toggled_enter_mode(void); void toggled_stack_mode(void); void toggled_arc(void); void toggled_hyp(void); void pressed_round(void); void pressed_trunc_zeros(void); void round_value_changed(void); void activate_rpn_specific_options(int); void activate_rounding_mode(int); void create_two_option_box(GtkWidget **, GtkWidget **, GtkWidget **, GtkWidget **, char *, char *, char *, int, int, void (*)(void), int (*)(void), int *, int *); void create_checkbox(GtkWidget **, char *, void (*)(void), int (*)(void), int *, int *); void apply_new_settings(void) { if (rpn_set != rpn_last) { set_rpn_mode(rpn_set); rpn_last = rpn_set; } if (enter_set != enter_last) { set_enter_mode(enter_set); enter_last = enter_set; } if (stack_set != stack_last) { set_stack_mode(stack_set); stack_last = stack_set; } if (arc_set != arc_last) { set_arc_autorelease(arc_set); arc_last = arc_set; } if (hyp_set != hyp_last) { set_hyp_autorelease(hyp_set); hyp_last = hyp_set; } if (round_set != round_last) { set_rounding_mode(round_set); round_last = round_set; } if (trunc_set != trunc_last) { set_trunc_zeros_mode(trunc_set); trunc_last = trunc_set; } save_settings(); } void toggled_rpn(void) { rpn_set = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(rpn_radio1)); activate_rpn_specific_options(rpn_set); } void activate_rpn_specific_options(int rpn_mode) { gtk_widget_set_sensitive(enter_radio1, rpn_mode); gtk_widget_set_sensitive(enter_radio2, rpn_mode); gtk_widget_set_sensitive(stack_radio1, rpn_mode); gtk_widget_set_sensitive(stack_radio2, rpn_mode); } void activate_rounding_mode(int round_mode) { gtk_widget_set_sensitive(round_spinbox, round_mode); gtk_widget_set_sensitive(round_label1, round_mode); gtk_widget_set_sensitive(round_label2, round_mode); gtk_widget_set_sensitive(trunc_check, round_mode); } /* Originally, I had functions connected to "clicked" events of the toggle * buttons in the radio groups. It turned out that the signal "clicked" was * not sent when the button was clicked by the spacebar rather than by the * mouse (GTK+ bug?). So I have to switch to using the "toggled" signal, * which does not have such problems */ void toggled_enter_mode(void) { if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(enter_radio1))) enter_set = ENTER_MODE_TRADITIONAL; else enter_set = ENTER_MODE_HP28; } void toggled_stack_mode(void) { if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(stack_radio1))) stack_set = STACK_MODE_INFINITE; else stack_set = STACK_MODE_XYZT; } void toggled_arc(void) { arc_set = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(arc_check)); } void toggled_hyp(void) { hyp_set = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(hyp_check)); } void pressed_round(void) { round_set = gtk_spin_button_get_value_as_int( GTK_SPIN_BUTTON(round_spinbox) ); if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(round_check))) { activate_rounding_mode(TRUE); } else { round_set = -round_set; activate_rounding_mode(FALSE); } } void round_value_changed(void) { round_set = gtk_spin_button_get_value_as_int( GTK_SPIN_BUTTON(round_spinbox) ); } void pressed_trunc_zeros(void) { trunc_set = gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(trunc_check) ); } void create_two_option_box(GtkWidget **option1, GtkWidget **option2, GtkWidget **box, GtkWidget **frame, char *text1, char *text2, char *frame_text, int value1, int value2, void (*function1)(void), int (*default_option1)(void), int *last, int *set ) { *option1 = gtk_radio_button_new_with_label(NULL,text1); *option2 = gtk_radio_button_new_with_label_from_widget ( GTK_RADIO_BUTTON(*option1), text2); if ((*default_option1)() == value1) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(*option1), TRUE); *last = value1; *set = value1; } else { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(*option2), TRUE); *last = value2; *set = value2; } g_signal_connect(G_OBJECT (*option1), "toggled", GTK_SIGNAL_FUNC (function1), NULL); *box = gtk_vbox_new(TRUE, 0); gtk_box_pack_start (GTK_BOX (*box), *option1, TRUE, TRUE, 2); gtk_box_pack_start (GTK_BOX (*box), *option2, TRUE, TRUE, 2); gtk_container_set_border_width (GTK_CONTAINER(*box), BOX_BORDER_WIDTH); *frame = gtk_frame_new (frame_text); gtk_frame_set_shadow_type (GTK_FRAME(*frame), GTK_SHADOW_ETCHED_IN); gtk_container_add(GTK_CONTAINER(*frame), *box); } void create_checkbox(GtkWidget **checkbox, char *text, void (*function1)(void), int (*enabled)(void), int *last, int *set) { *checkbox = gtk_check_button_new_with_label(text); if ((*enabled)()) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(*checkbox), TRUE); *last = TRUE; *set = TRUE; } else { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(*checkbox), FALSE); *last = FALSE; *set = FALSE; } g_signal_connect(G_OBJECT (*checkbox), "toggled", GTK_SIGNAL_FUNC (function1), NULL); } void call_settings (void) { static GtkWidget *settings_window = NULL; //GdkPixmap *main_pixmap; //GdkBitmap *main_mask; GtkWidget *close_button; GtkWidget *rpn_box, *rpn_frame; GtkWidget *enter_box, *enter_frame; GtkWidget *stack_box, *stack_frame; GtkWidget *archyp_box, *archyp_frame; GtkWidget *round_hbox, *round_box, *round_frame; GtkAdjustment *round_adjustment; GtkWidget *apply_button; GtkWidget *settings_button_box; GtkWidget *table, *box1, *box2; GtkAccelGroup *settings_accel_group; if (settings_window) return; /* Main settings window */ settings_window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_title(GTK_WINDOW(settings_window), "Calcoo settings"); gtk_window_set_resizable(GTK_WINDOW(settings_window),FALSE); gtk_container_set_border_width(GTK_CONTAINER(settings_window), 0); g_signal_connect(G_OBJECT(settings_window), "destroy", GTK_SIGNAL_FUNC(gtk_widget_destroyed), &settings_window); gtk_widget_realize(settings_window); /* Main settings window icon */ /* main_pixmap = gdk_pixmap_create_from_xpm_d ( settings_window->window, &main_mask, &(body->style)->bg[GTK_STATE_NORMAL], (gchar **) main_xpm ); gdk_window_set_icon (settings_window->window, NULL, main_pixmap, main_mask); */ gtk_window_set_icon (GTK_WINDOW(settings_window), gdk_pixbuf_new_from_xpm_data((const char **)main_xpm)); /* Settings */ create_two_option_box(&rpn_radio1, &rpn_radio2, &rpn_box, &rpn_frame, "RPN", "Algebraic", "Mode", TRUE, FALSE, &toggled_rpn, &get_rpn_mode, &rpn_last, &rpn_set); create_two_option_box(&enter_radio1, &enter_radio2, &enter_box, &enter_frame, "Traditional", "HP-28", "RPN Enter", ENTER_MODE_TRADITIONAL, ENTER_MODE_HP28, &toggled_enter_mode, &get_enter_mode, &enter_last, &enter_set); create_two_option_box(&stack_radio1, &stack_radio2, &stack_box, &stack_frame, "Infinite", "XYZT", "RPN Stack", STACK_MODE_INFINITE, STACK_MODE_XYZT, &toggled_stack_mode, &get_stack_mode, &stack_last, &stack_set); /* arc & hyp */ create_checkbox(&arc_check, "arc button", &toggled_arc, &get_arc_autorelease, &arc_last, &arc_set); create_checkbox(&hyp_check, "hyp button", &toggled_hyp, &get_hyp_autorelease, &hyp_last, &hyp_set); archyp_box = gtk_vbox_new(TRUE, 0); gtk_box_pack_start (GTK_BOX (archyp_box), arc_check, TRUE, TRUE, 2); gtk_box_pack_start (GTK_BOX (archyp_box), hyp_check, TRUE, TRUE, 2); gtk_container_set_border_width (GTK_CONTAINER(archyp_box), BOX_BORDER_WIDTH); archyp_frame = gtk_frame_new ("Autorelease"); gtk_frame_set_shadow_type (GTK_FRAME(archyp_frame), GTK_SHADOW_ETCHED_IN); gtk_container_add(GTK_CONTAINER(archyp_frame), archyp_box); /* Rounding */ round_check = gtk_check_button_new_with_label("Round output "); round_label1 = gtk_label_new("to "); round_last = round_set = get_rounding_mode(); if (round_set > 0) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(round_check), TRUE); } else { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(round_check), FALSE); } g_signal_connect(G_OBJECT (round_check), "toggled", GTK_SIGNAL_FUNC (pressed_round), NULL); round_adjustment = (GtkAdjustment *)gtk_adjustment_new(abs(round_last), 1, INPUT_LENGTH, 1, 1, 1); round_spinbox = gtk_spin_button_new (round_adjustment, 1, 0); g_signal_connect(G_OBJECT (round_adjustment), "value-changed", GTK_SIGNAL_FUNC (round_value_changed), NULL); round_label2 = gtk_label_new("digits"); round_hbox = gtk_hbox_new(FALSE, 0); gtk_box_pack_start (GTK_BOX (round_hbox), round_check, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (round_hbox), round_label1, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (round_hbox), round_spinbox, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (round_hbox), round_label2, FALSE, FALSE, 0); create_checkbox(&trunc_check, "Truncate trailing zeros", &pressed_trunc_zeros, &get_trunc_zeros_mode, &trunc_last, &trunc_set); round_box = gtk_vbox_new(FALSE, 0); gtk_box_pack_start (GTK_BOX (round_box), round_hbox, FALSE, FALSE, 2); gtk_box_pack_start (GTK_BOX (round_box), trunc_check, FALSE, FALSE, 0); gtk_container_set_border_width (GTK_CONTAINER(round_box), BOX_BORDER_WIDTH); round_frame = gtk_frame_new ("Rounding"); gtk_frame_set_shadow_type (GTK_FRAME(round_frame), GTK_SHADOW_ETCHED_IN); gtk_container_add(GTK_CONTAINER(round_frame), round_box); /* Buttons */ apply_button = gtk_button_new_with_label("Apply"); g_signal_connect(G_OBJECT (apply_button), "clicked", GTK_SIGNAL_FUNC (apply_new_settings), NULL); close_button = gtk_button_new_with_label("Close"); g_signal_connect_swapped(G_OBJECT(close_button), "clicked", GTK_SIGNAL_FUNC(gtk_widget_destroy), G_OBJECT(settings_window)); settings_button_box = gtk_hbutton_box_new(); gtk_button_box_set_layout(GTK_BUTTON_BOX(settings_button_box), GTK_BUTTONBOX_SPREAD); gtk_box_set_spacing(GTK_BOX(settings_button_box), INFO_SPACING); gtk_box_pack_start(GTK_BOX(settings_button_box), apply_button, FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(settings_button_box), close_button, TRUE, TRUE, 0); settings_accel_group = gtk_accel_group_new(); gtk_widget_add_accelerator(close_button, "clicked", settings_accel_group, GDK_Escape, 0, GTK_ACCEL_VISIBLE); gtk_window_add_accel_group(GTK_WINDOW(settings_window), settings_accel_group); /* Settings: packing all together */ table = gtk_table_new(4/*rows*/, 2/*cols*/, FALSE); gtk_table_attach(GTK_TABLE(table), archyp_frame, 0, 1, 0, 1, GTK_FILL, GTK_FILL, TABLE_X_PADDING, TABLE_Y_PADDING); gtk_table_attach(GTK_TABLE(table), rpn_frame, 1, 2, 0, 1, GTK_FILL, GTK_FILL, TABLE_X_PADDING, TABLE_Y_PADDING); gtk_table_attach(GTK_TABLE(table), enter_frame, 0, 1, 1, 2, GTK_FILL, GTK_FILL, TABLE_X_PADDING, TABLE_Y_PADDING); gtk_table_attach(GTK_TABLE(table), stack_frame, 1, 2, 1, 2, GTK_FILL, GTK_FILL, TABLE_X_PADDING, TABLE_Y_PADDING); gtk_table_attach(GTK_TABLE(table), round_frame, 0, 2, 2, 3, GTK_FILL, GTK_FILL, TABLE_X_PADDING, TABLE_Y_PADDING); gtk_table_attach(GTK_TABLE(table), settings_button_box, 0, 2, 3, 4, GTK_FILL, GTK_FILL, TABLE_X_PADDING, TABLE_BUTTON_Y_PADDING); /* I do not know a better way to get some padding both on the * sides and on the top/bottom */ box1 = gtk_vbox_new (FALSE, 0); gtk_box_pack_start(GTK_BOX(box1), table, FALSE, FALSE, WINDOW_PADDING); box2 = gtk_hbox_new (FALSE, 0); gtk_box_pack_start(GTK_BOX(box2), box1, FALSE, FALSE, WINDOW_PADDING); gtk_container_add(GTK_CONTAINER(settings_window), box2); gtk_widget_show_all(settings_window); activate_rpn_specific_options(rpn_set); activate_rounding_mode( (round_set > 0) ); } calcoo-1.3.18/src/b_accel.c0000644000175000017500000001153310653053773012304 00000000000000/* * Calcoo: b_accel.c * * Copyright (C) 2001 - 2005 Alexei Kaminski * * all about the keyboard accelerators */ #include #include #include #include #include "codes.h" #include "body.h" #include "defaults.h" #include "b_headers.h" #include "gtkaux_headers.h" #include "io_headers.h" #include "aux_headers.h" #include "b_accel_headers.h" void key_press_handler(GtkWidget* widget, GdkEventKey* event, gpointer data) /* for the keys that cannot be used in GTK accelerator group */ { switch (event->keyval) { case GDK_BackSpace: clicked_code_undo(); break; case GDK_Delete: clicked_code_clear_x(); break; case GDK_Up: clicked_code_stack_up(); break; case GDK_Down: clicked_code_stack_down(); break; case GDK_Left: clicked_code_undo(); break; case GDK_Right: clicked_code_redo(); break; case GDK_0: case GDK_KP_0: clicked_code_0(); break; case GDK_1: case GDK_KP_1: clicked_code_1(); break; case GDK_2: case GDK_KP_2: clicked_code_2(); break; case GDK_3: case GDK_KP_3: clicked_code_3(); break; case GDK_4: case GDK_KP_4: clicked_code_4(); break; case GDK_5: case GDK_KP_5: clicked_code_5(); break; case GDK_6: case GDK_KP_6: clicked_code_6(); break; case GDK_7: case GDK_KP_7: clicked_code_7(); break; case GDK_8: case GDK_KP_8: clicked_code_8(); break; case GDK_9: case GDK_KP_9: clicked_code_9(); break; case GDK_KP_Decimal: case GDK_period: case GDK_comma: case GDK_KP_Separator: /* German keyboards */ clicked_code_dot(); break; case GDK_KP_Add: case GDK_plus: clicked_code_add(); break; case GDK_KP_Subtract: case GDK_minus: if ( GDK_CONTROL_MASK & event->state ) clicked_code_sign(); else clicked_code_sub(); break; case GDK_KP_Multiply: case GDK_asterisk: clicked_code_mul(); break; case GDK_KP_Divide: case GDK_slash: clicked_code_div(); break; case GDK_asciicircum: clicked_code_pow(); break; case GDK_s: clicked_code_sin(); break; case GDK_c: if ( GDK_CONTROL_MASK & event->state ) g_signal_emit_by_name( G_OBJECT(body->button[CODE_COPY]), "clicked"); else clicked_code_cos(); break; case GDK_t: clicked_code_tan(); break; case GDK_g: clicked_code_log(); break; case GDK_n: clicked_code_ln(); break; case GDK_x: clicked_code_etox(); break; case GDK_d: clicked_code_10tox(); break; case GDK_q: if ( GDK_CONTROL_MASK & event->state ) call_exit(); else clicked_code_sqr(); break; case GDK_w: clicked_code_sqrt(); break; case GDK_i: clicked_code_invx(); break; case GDK_p: clicked_code_pi(); break; case GDK_f: clicked_code_fact(); break; case GDK_z: if ( GDK_CONTROL_MASK & event->state ) clicked_code_undo(); break; case GDK_r: if ( GDK_CONTROL_MASK & event->state ) clicked_code_redo(); break; case GDK_equal: clicked_code_eq(); break; case GDK_Return: case GDK_KP_Enter: if ( TRUE == get_rpn_mode() ) clicked_code_enter(); else clicked_code_eq(); break; case GDK_Escape: clicked_code_clear_all(); break; case GDK_e: if ( GDK_CONTROL_MASK & event->state ) clicked_code_exp_sign(); else clicked_code_exp(); break; case GDK_parenleft: case GDK_bracketleft: clicked_code_left_paren(); break; case GDK_parenright: case GDK_bracketright: clicked_code_right_paren(); break; /* these are special guys; since some action is needed from the body, * we cannot send the signal directly to the engine, so we emulate * button pressings */ case GDK_a: g_signal_emit_by_name(G_OBJECT(body->button[CODE_ARC]), "clicked"); break; case GDK_h: g_signal_emit_by_name(G_OBJECT(body->button[CODE_HYP]), "clicked"); break; case GDK_v: if ( GDK_CONTROL_MASK & event->state ) g_signal_emit_by_name( G_OBJECT(body->button[CODE_PASTE]), "clicked"); break; /* another bunch of special guys; no action on the part of the engine needed */ case GDK_question: call_info(); break; case GDK_exclam: call_settings(); break; default: break; } } gboolean button_press_handler(GtkWidget* widget, GdkEventButton* event) { if (event->button == 2 /* middle button*/) g_signal_emit_by_name(G_OBJECT(body->button[CODE_PASTE]), "clicked"); return TRUE; } calcoo-1.3.18/src/output.c0000644000175000017500000001040107476465771012303 00000000000000/* * Calcoo: output.c * * Copyright (C) 2001,2002 Alexei Kaminski * */ #include #include "codes.h" #include "const.h" #include "cpu.h" #include "b_headers.h" #include "io_headers.h" #include "aux_headers.h" void refresh_display(int, t_cpu_display *); void refresh_char_display(t_cpu_display *); void refresh_operation_display(int, t_cpu_operation_display *); void refresh_deg_rad_indicator(int); void refresh_format_indicator(int); void refresh_body (void) { int i; refresh_format_indicator(cpu->prescribed_format); refresh_deg_rad_indicator(cpu->angle_units); refresh_display(MAIN_DISPLAY, cpu->d); for(i = 0; i < NUMBER_OF_MEMS; i++) { hide_button_label(CODE_SWITCH_TO_MEM0 + i); refresh_display(MEM_DISPLAY_OFFSET + i, cpu->mem_d[i]); } for(i = 0; i < NUMBER_OF_REG_DISPLAYS; i++) { refresh_display(REG_DISPLAY_OFFSET + i, cpu->reg_d[i]); refresh_operation_display(i, cpu->op_d[i]); } show_button_label(CODE_SWITCH_TO_MEM0 + cpu->curr_mem); refresh_char_display(cpu->d); if (cpu->error == TRUE ) disable_all_buttons(); /* except for C_all and undo */ else enable_all_buttons(); } void refresh_operation_display(int body_op_d, t_cpu_operation_display *cpu_op_d) { clear_simple_display(body_op_d); if (!cpu->rpn_mode) { if (cpu_op_d->op_code){ show_display_glyph(OPERATION_DISPLAY_OFFSET + body_op_d, binop_to_od(cpu_op_d->op_code)); /* binop_to_od translates CODE_foo to OD_foo, * where foo is ADD|SUB|MUL|DIV|POW */ if (cpu_op_d->show_brace) show_display_glyph(body_op_d, OD_PAREN); } } } void refresh_deg_rad_indicator(int angle_units) { clear_simple_display(ANGLE_UNIT_DISPLAY_OFFSET); if (angle_units == CODE_RAD) { show_display_glyph(ANGLE_UNIT_DISPLAY_OFFSET, DRD_RAD); } else { show_display_glyph(ANGLE_UNIT_DISPLAY_OFFSET, DRD_DEG); } } void refresh_format_indicator(int format) { clear_simple_display(FORMAT_DISPLAY_OFFSET); switch (format){ case FORMAT_FIX: show_display_glyph(FORMAT_DISPLAY_OFFSET, FD_FIX); break; case FORMAT_SCI: show_display_glyph(FORMAT_DISPLAY_OFFSET, FD_SCI); break; case FORMAT_ENG: show_display_glyph(FORMAT_DISPLAY_OFFSET, FD_ENG); break; } } void refresh_display(int body_d, t_cpu_display *cpu_d) { int i, leading; clear_display(body_d); if (cpu_d->display_overflow) { show_error_message(body_d); return; } if (cpu_d->n_int == 0) { show_int_digit(body_d, INPUT_LENGTH - 1, CODE_0); show_dot(body_d, INPUT_LENGTH - 1); if (cpu_d->sign == SIGN_MINUS) show_minus(body_d, INPUT_LENGTH - 1); set_char_display("0"); return; } leading = INPUT_LENGTH - (cpu_d->n_int + cpu_d->n_frac); if (cpu_d->sign == SIGN_MINUS) show_minus(body_d, leading); for (i = 0; i < cpu_d->n_int; i++) show_int_digit(body_d, leading + i, cpu_d->int_field[i]); for (i = cpu_d->n_int - 3; i > 0; i-=3) show_int_tick(body_d, leading + i); show_dot(body_d, leading + cpu_d->n_int - 1); if (cpu_d->n_frac > 0) { for (i = 0; i < cpu_d->n_frac; i++) show_frac_digit(body_d, leading + cpu_d->n_int + i, cpu_d->frac_field[i]); for (i = 3; i < cpu_d->n_frac; i+=3) show_frac_tick(body_d, leading + cpu_d->n_int + i); } if (cpu_d->format == FORMAT_SCI) { show_E_and_exp_sign(body_d, cpu_d->exp_sign); for (i = 0; i < EXP_INPUT_LENGTH; i++) show_exp_digit(body_d, i, cpu_d->exp_field[i]); } } void refresh_char_display(t_cpu_display *cpu_d) { int i; char s[INPUT_LENGTH + EXP_INPUT_LENGTH + 5]; char d[10] = "0123456789"; strcpy(s,""); if (cpu_d->sign == SIGN_MINUS) strcat(s,"-"); for (i = 0; i < cpu_d->n_int; i++) strncat(s, &d[code_to_digit(cpu_d->int_field[i])], 1); if (cpu_d->n_frac > 0) { strcat(s,"."); for (i = 0; i < cpu_d->n_frac; i++) strncat(s, &d[code_to_digit(cpu_d->frac_field[i])], 1); } if (cpu_d->format == FORMAT_SCI) { strcat(s,"e"); if (cpu_d->exp_sign == SIGN_MINUS ) strcat(s,"-"); for (i = 0; i < EXP_INPUT_LENGTH; i++) strncat(s, &d[code_to_digit(cpu_d->exp_field[i])], 1); } set_char_display(s); } void enable_undo_button(void) { enable_button(CODE_UNDO); } void disable_undo_button(void) { disable_button(CODE_UNDO); } void enable_redo_button(void) { enable_button(CODE_REDO); } void disable_redo_button(void) { disable_button(CODE_REDO); } calcoo-1.3.18/src/body.h0000644000175000017500000000443010646223126011665 00000000000000/* * Calcoo: body.h * * Copyright (C) 2001, 2002, 2005 Alexei Kaminski * */ #ifndef BODY_H #define BODY_H #include "basic.h" #include "displays.h" #define SEPARATOR_NUMBER 10 /* * display to display numbers */ typedef struct tbd { GtkWidget *minus_sign[INPUT_LENGTH]; GtkWidget *int_digits[INPUT_LENGTH][BASE]; GtkWidget *frac_digits[INPUT_LENGTH][BASE]; GtkWidget *int_ticks[INPUT_LENGTH]; GtkWidget *frac_ticks[INPUT_LENGTH]; GtkWidget *dot[INPUT_LENGTH]; GtkWidget *E; GtkWidget *exp_plus_sign, *exp_minus_sign; GtkWidget *exp_digits[EXP_INPUT_LENGTH][BASE]; GtkWidget *error_message; GtkWidget *frame; int x1; int y1; int display_exp_indent; char ***digit_xpm; int cell_width; int dot_offset_vert; int dot_width; int margin_vert; int margin_horiz; int error_indent; int tick_offset_vert; int tick_offset_horiz; } t_body_display ; /* * display to display few pixmaps (indicators, like deg/rad) */ typedef struct tbsd { GtkWidget *glyph[SD_G_MAX]; GtkWidget *frame; int number_of_glyphs; } t_body_simple_display; /* * the whole calculator body */ typedef struct tcb { /*-----------------------------*/ GtkWidget *main_window; /* the parent widget of buttons and displays, * to prevent their resizing */ GtkWidget *fixer; GtkStyle *style; /*----- buttons and related -------------*/ GtkWidget *button[MAX_BUTTON_NUMBER]; GtkWidget *deg_rad_button, *forced_e_button; GtkWidget *icon[MAX_BUTTON_NUMBER]; /* button icons */ GtkTooltips *button_tooltips; GtkAccelGroup *accel_group; GtkWidget *selection_widget; /*----- displays -----------------------*/ /* the main display, memory displays, register displays */ t_body_display *display[NUMBER_OF_DISPLAYS]; /* deg/rad display, fix/exp/sci display, operation displays */ t_body_simple_display *simple_display[NUMBER_OF_SIMPLE_DISPLAYS]; /* not quite a display, just a string to hold the main display contents * used only for "copy" */ char char_display[INPUT_LENGTH + EXP_INPUT_LENGTH + 5]; /*------ options stored in the body ------*/ /* (the other options are stored in the cpu, see cpu.h) * these variables are initialized by the call to load_options() * from main.c */ int arc_autorelease, hyp_autorelease; } t_calcoo_body ; extern t_calcoo_body *body; #endif /* BODY_H */ calcoo-1.3.18/src/b_headers.h0000644000175000017500000000521410233015550012635 00000000000000/* * Calcoo: b_headers.h * * Copyright (C) 2001,2002 Alexei Kaminski * * headers for the functions defined in the files b_foo.c */ #ifndef BODY_HEADERS_H #define BODY_HEADERS_H /* b_layout.c */ void create_widgets(void); /* b_main.c */ void create_body(void); void malloc_body(void); void create_main_window(int, int); void set_rpn_mode(int); int get_rpn_mode(void); void set_enter_mode(int); int get_enter_mode(void); void set_rounding_mode(int); int get_rounding_mode(void); int get_trunc_zeros_mode(void); void set_trunc_zeros_mode(int); void set_stack_mode(int); int get_stack_mode(void); int get_angle_units(void); void set_angle_units(int); void call_exit(void); /* b_buttons.c */ void create_calcoo_display(int, int, int, int); void create_button(int, int, int, int, int, char ***, void (*)(void), char *); /* void create_invisible_button(int, void (*)(void)); */ void create_toggle_button(int, int, int, int, int, char ***, void (*)(void), char *); void create_copy_button(int, int, int, int, int, char ***, char *); void create_paste_button(int, int, int, int, int, char ***, char *); void toggled_arc_button(void); void toggled_hyp_button(void); int get_toggle_button_state(int); void raise_toggle_button(int); void raise_arc_hyp(void); int get_arc_state(void); int get_hyp_state(void); void set_arc_autorelease(int); void set_hyp_autorelease(int); int get_arc_autorelease(void); int get_hyp_autorelease(void); void enable_button(int); void disable_button(int); void hide_button(int); void show_button(int); void hide_button_label(int); void show_button_label(int); void disable_all_buttons(void); void enable_all_buttons(void); /* b_display.c */ void malloc_displays(void); void create_display(int, int, int, int, int, int, int, int, int, int, int, int, int, int, char ***); void clear_display(int); void show_int_digit(int, int, int); void show_frac_digit(int, int, int); void show_exp_digit(int, int, int); void show_minus(int, int); void show_int_tick(int, int); void show_frac_tick(int, int); void show_E_and_exp_sign(int, int); void show_dot(int, int); void show_error_message(int); void create_simple_display(int, int, int, int, int, int, int, char ***); void clear_simple_display(int); void show_display_glyph(int, int); void set_char_display(char *); /* b_pixmaps.c */ void assign_pixmaps(char ***, char ***, char ***, char ***, char ***, char ***, char ***); /* b_info.c */ void call_info (void); void output_text(char **); void process_options(char*); /* b_settings.c */ void call_settings (void); /* b_loadsave.c */ void load_settings(void); void save_settings(void); /* main.c */ #endif /* BODY_HEADERS_H */ calcoo-1.3.18/src/displays.h0000644000175000017500000000564607443002644012573 00000000000000/* * Calcoo: displays.h * * Copyright (C) 2001, 2002 Alexei Kaminski * */ #ifndef DISPLAYS_H #define DISPLAYS_H #include "basic.h" /* for the NUMBER_OF_MEMS */ #define NUMBER_OF_REG_DISPLAYS 3 /* if you want to change this number, you * also need to make modifications in * cpu_to_output() */ #define NUMBER_OF_DISPLAYS ( 1 + NUMBER_OF_MEMS + NUMBER_OF_REG_DISPLAYS ) #define NUMBER_OF_SIMPLE_DISPLAYS (NUMBER_OF_REG_DISPLAYS * 2 + 2) /* NUMBER_OF_REG_DISPLAYS for display labels, * NUMBER_OF_REG_DISPLAYS for the operations and parens in the stack, * 1 for display format and 1 for deg/rad * in the land of Mordor, where the shadow lies */ /* -------------------------------------------------------- * positions of the displays in the array which holds them * -------------------------------------------------------- */ #define MAIN_DISPLAY 0 #define MEM_DISPLAY_OFFSET 1 /* the number of the first mem display */ #define REG_DISPLAY_OFFSET (1 + NUMBER_OF_MEMS) /* of the first reg display */ #define OPERATION_DISPLAY_OFFSET 0 #define DISPLAY_LABEL_DISPLAY_OFFSET NUMBER_OF_REG_DISPLAYS #define ANGLE_UNIT_DISPLAY_OFFSET (NUMBER_OF_REG_DISPLAYS * 2) #define FORMAT_DISPLAY_OFFSET (NUMBER_OF_REG_DISPLAYS * 2 + 1) /* ---------------------------------------------- * codes for the display glyphs other than digits * * when a display is created, the set of the glyphs to be used * is passed to the corresponding function in an array; the codes * label the positions of the glyphs in this array * ----------------------------------------------- */ /* 0-9 reserved for the digits */ #define D_E 10 #define D_PLUS 11 #define D_MINUS 12 #define D_DOT 13 #define D_TICK 14 #define D_OVERFLOW 15 /* don't forget to adjust D_G_TOTAL if you add something to * the set below */ #define NUMBER_OF_DISPLAY_GLYPHS 16 /* 0-9 plus the glyphs defined above * it is needed in the decaration of the array, * which holds the glyphs to pass to the corresp. * function for the display creation */ /* --------------------------------------------------- * codes for the glyphs of the "operation displays," * which are small displays showing operations and parens in the stack * --------------------------------------------------- */ #define OD_ADD 0 #define OD_SUB 1 #define OD_MUL 2 #define OD_DIV 3 #define OD_POW 4 #define OD_PAREN 5 #define NUMBER_OF_OPERATION_DISPLAY_GLYPHS 6 /* --------------------------------------------------- * codes for the glyphs of the deg/rad display * --------------------------------------------------- */ #define DRD_DEG 0 #define DRD_RAD 1 #define NUMBER_OF_ANGLE_UNIT_GLYPHS 2 /* --------------------------------------------------- * codes for the glyphs of the fix/exp/sci display * --------------------------------------------------- */ #define FD_FIX 0 #define FD_SCI 1 #define FD_ENG 2 #define NUMBER_OF_FORMAT_GLYPHS 3 #endif /* DISPLAYS_H */ calcoo-1.3.18/src/c_headers.h0000644000175000017500000000306507516122277012657 00000000000000/* * Calcoo: c_headers.h * * Copyright (C) 2001,2002 Alexei Kaminski * */ #ifndef CPU_HEADERS_H #define CPU_HEADERS_H /* c_input.c */ void call_digit(int); void call_clear_all(void); void call_clear_x(void); void call_dot(void); void call_pi(void); void call_exp(void); /* this is switching to enter the exponent, not e^x */ void call_sign(void); void call_exp_sign(void); void call_import_paste(double); void call_change_display_format(void); /* c_mem.c */ void call_mem_op(int); void call_switch_to_mem(int m); /* c_op.c */ void call_binary_op(int); void call_unary_op(int); void call_eq(void); void call_enter(void); void call_exch_xy(void); void call_stack_up(void); void call_stack_down(void); void call_left_paren(void); void call_right_paren(void); void push_stack(void); void pop_stack(void); /* c_main.c */ void reset_registers(void); void reset_input(void); void input_to_x(void); void init_cpu(void); void call_set_rpn_mode(int); int call_get_rpn_mode(void); void call_set_enter_mode(int); int call_get_enter_mode(void); void call_set_rounding_mode(int); int call_get_rounding_mode(void); void call_set_trunc_zeros_mode(int); int call_get_trunc_zeros_mode(void); void call_set_stack_mode(int); int call_get_stack_mode(void); void call_change_angle_units(void); int call_get_angle_units(void); void call_set_angle_units(int); void aftermath(void); /* c_output.c */ void cpu_to_output(void); /* c_undo.c */ void init_undo_stack(void); void reset_undo_stack(void); void call_undo(void); void call_redo(void); void save_for_undo(void); #endif /* CPU_HEADERS_H */ calcoo-1.3.18/src/texts.h0000644000175000017500000000733610653064703012111 00000000000000/* * Calcoo: texts.h * * Copyright (C) 2001, 2002, 2003, 2005, 2007 Alexei Kaminski * */ #ifndef TEXTS_H #define TEXTS_H static char *about_text[] = { " ", NULL, "Calcoo " VERSION " - Scientific calculator", NULL, "Copyright (C) 2001 - 2007 Alexei Kaminski", NULL, "Project homepage: http://calcoo.sourceforge.net/", NULL, "Please report bugs to alexei.kaminski@gmail.com", NULL, " ", NULL, NULL }; static const gchar *license_text = { "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. " "\n\n" "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. " "\n\n" "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. " }; static const gchar *help_text = { "Even though it must be clear in general how to use calcoo, " "some subtleties may need clarification. " "\n\n" "In the RPN mode, the stack either has four registers, X, Y, Z, T, " "like in most real RPN calculators, or is unlimited, depending " "on the corresponding option. In the algebraic mode, the number of " "registers is unlimited, but only the lowest four have their " "contents displayed. " "\n\n" "Several adjacent opening parens are possible. However, calcoo " "will show only one paren in the corresponding display, due to " "display limitations. Calcoo does keep track of all of them, even " "though it is unable to show them. " "\n\n" "The closing paren button acts as \"=\" button if there are no " "matching opening parens. " "\n\n" "If an expression begins with an opening paren, the paren will " "not be displayed (actually the paren will be ignored). " "Nevertheless, you should go ahead and type the whole expression, " "since an unmatched closing paren acts as \"=\", the whole " "expression will be evaluated properly, as though the (ignored) " "opening paren and the closing paren (interpreted as \"=\") were " "interpreted as parens. " "\n\n" "Undo remembers only the last 64 elementary actions. " "\n\n" "Switching between RPN and algebraic modes does reset undo. " }; static const gchar *shortcuts_text[] = { "Esc", "clear all registers", "Delete", "clear register X", "0 1 2 3 4 5 6 7 8 9", "corresponding digits", ". ,", ".", "+ - * / ^", "corresponding binary operations", "s c t", "sin cos tan", "n g", "ln log", "x d", "e^x 10^x", "q w", "x^2 sqrt", "i p f", "1/x pi x!", "a h", "arc hyp", "( [ ] )", "( )", "Enter, =", "evaluate (algebraic mode)", "Enter", "enter (RPN mode)", "BackSpace Ctrl-z LeftArrow", "undo", "Ctrl-r RightArrow", "redo", "Ctrl-c Ctrl-v", "copy paste", "Ctrl--", "change sign", "UpArrow/DownArrow", "scroll stack up/down (RPN mode)", "e", "E", "Ctrl-e", "change exp sign", "?", "info/help", "!", "options", "Ctrl-q", "exit", NULL, NULL, NULL, NULL }; static char *version_console[] = { PACKAGE " " VERSION, NULL }; static char *help_console[] = { "", "Calcoo - scientific calculator (GTK+) Version " VERSION, "Copyright (C) 2001 - 2007 Alexei Kaminski (alexei.kaminski@gmail.com)", "Usage: calcoo [OPTION]", "", "Valid options:", " -v, --version for version info", " -h, --help to see this help", "", NULL }; static char *invalid_console[] = { "Invalid option. Run \"calcoo -h\" to see the list of valid options.", NULL }; #endif calcoo-1.3.18/calcoo.10000644000175000017500000000265010661636463011325 00000000000000.TH CALCOO 1 "18 Aug 2007" "Version 1.3.18" "Calcoo Manual Page" .SH NAME Calcoo \- scientific calculator (GTK+). .SH SYNOPSIS .B calcoo [OPTION] .SH DESCRIPTION \fICalcoo\fP is a scientific calculator designed to provide maximum usability. The features that make Calcoo attractive are: .TP .B * bitmapped button labels and display digits to improve readability .TP .B * no double-function buttons - you need to click only one button for any operation (except for arc-hyp trigonometric functions) .TP .B * undo/redo buttons .TP .B * both RPN and algebraic modes .TP .B * display marks to separate thousands .TP .B * copy/paste interaction with the X clipboard .TP .B * two memory registers with displays .TP .B * displays for Y, Z, and T registers .SH OPERATION Like in a regular calculator. Settings (switching between RPN and algebraic modes, rounding, RPN stack behavior) can be accessed by pressing the button labelled "!". The button labelled "?" brings up the help/info window. .SH OPTIONS Calcoo accepts the following command-line options: .TP .B \-h, \-\-help Show summary of options and exit. .TP .B \-v, \-\-version Print version number and exit. .SH OTHER INFO The webpage for Calcoo is at .TP http://calcoo.sourceforge.net/ .TP There you can find more information about Calcoo and download the latest version. .SH AUTHOR Alexei Kaminski (alexei.kaminski@gmail.com) .SH BUGS None I am aware of. If you find any, please report them. calcoo-1.3.18/configure0000755000175000017500000045340410661637057011721 00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.61. # # 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 more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # 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 # 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 /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 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 : _ASEOF }; then CONFIG_SHELL=$as_shell as_have_required=yes if { "$as_shell" 2> /dev/null <<\_ASEOF 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 : (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 if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 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= PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= ac_unique_file="src/main.c" 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 INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA am__isrc CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE PKG_CONFIG GTK_CFLAGS GTK_LIBS CPP GREP EGREP LIBOBJS LTLIBOBJS' ac_subst_files='' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP' # 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}' 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 this package 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/PACKAGE] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names _ACEOF fi if test -n "$ac_init_help"; then cat <<\_ACEOF Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --disable-gtktest do not try to compile and run a test GTK+ program 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 LIBS libraries to pass to the linker, e.g. -l CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. _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 configure generated by GNU Autoconf 2.61 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 $as_me, which was generated by GNU Autoconf 2.61. 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 am__api_version='1.10' 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_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else 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 build environment is sane" >&5 echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&5 echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&2;} { (exit 1); exit 1; }; } fi test "$2" = conftest.file ) then # Ok. : else { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! Check your system clock" >&5 echo "$as_me: error: newly created file is older than distributed files! Check your system clock" >&2;} { (exit 1); exit 1; }; } fi { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. echo might interpret backslashes. # By default was `s,x,x', remove it if useless. cat <<\_ACEOF >conftest.sed s/[\\$]/&&/g;s/;s,x,x,$// _ACEOF program_transform_name=`echo $program_transform_name | sed -f conftest.sed` rm -f conftest.sed # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi { echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; } if test -z "$MKDIR_P"; then if test "${ac_cv_path_mkdir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. test -d ./--version && rmdir ./--version MKDIR_P="$ac_install_sh -d" fi fi { echo "$as_me:$LINENO: result: $MKDIR_P" >&5 echo "${ECHO_T}$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_AWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { echo "$as_me:$LINENO: result: $AWK" >&5 echo "${ECHO_T}$AWK" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$AWK" && break done { 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 rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} { (exit 1); exit 1; }; } fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE=calcoo VERSION=1.3.18 cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { echo "$as_me:$LINENO: result: $STRIP" >&5 echo "${ECHO_T}$STRIP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { 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_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" 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_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 echo "${ECHO_T}$ac_ct_STRIP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" 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 STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' 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_test_x "$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_test_x "$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_test_x "$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_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" 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_test_x "$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_test_x "$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 ac_file='' fi { echo "$as_me:$LINENO: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6; } if test -z "$ac_file"; then 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 # 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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; 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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; 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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; 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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; 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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; 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 DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi { echo "$as_me:$LINENO: result: $_am_result" >&5 echo "${ECHO_T}$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi depcc="$CC" am_compiler_list= { echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi # Check whether --enable-gtktest was given. if test "${enable_gtktest+set}" = set; then enableval=$enable_gtktest; else enable_gtktest=yes fi pkg_config_args=gtk+-2.0 for module in . do case "$module" in gthread) pkg_config_args="$pkg_config_args gthread-2.0" ;; esac done no_gtk="" # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-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_PKG_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 echo "${ECHO_T}$PKG_CONFIG" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test x$PKG_CONFIG != xno ; then if pkg-config --atleast-pkgconfig-version 0.7 ; then : else echo "*** pkg-config too old; version 0.7 or better required." no_gtk=yes PKG_CONFIG=no fi else no_gtk=yes fi min_gtk_version=2.0.0 { echo "$as_me:$LINENO: checking for GTK+ - version >= $min_gtk_version" >&5 echo $ECHO_N "checking for GTK+ - version >= $min_gtk_version... $ECHO_C" >&6; } if test x$PKG_CONFIG != xno ; then ## don't try to run the test against uninstalled libtool libs if $PKG_CONFIG --uninstalled $pkg_config_args; then echo "Will use uninstalled version of GTK+ found in PKG_CONFIG_PATH" enable_gtktest=no fi if $PKG_CONFIG --atleast-version $min_gtk_version $pkg_config_args; then : else no_gtk=yes fi fi if test x"$no_gtk" = x ; then GTK_CFLAGS=`$PKG_CONFIG $pkg_config_args --cflags` GTK_LIBS=`$PKG_CONFIG $pkg_config_args --libs` gtk_config_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` gtk_config_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` gtk_config_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` if test "x$enable_gtktest" = "xyes" ; then ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$GTK_LIBS $LIBS" rm -f conf.gtktest if test "$cross_compiling" = yes; then echo $ac_n "cross compiling; assumed OK... $ac_c" 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 int main () { int major, minor, micro; char *tmp_version; system ("touch conf.gtktest"); /* HP/UX 9 (%@#!) writes to sscanf strings */ tmp_version = g_strdup("$min_gtk_version"); if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { printf("%s, bad version string\n", "$min_gtk_version"); exit(1); } if ((gtk_major_version != $gtk_config_major_version) || (gtk_minor_version != $gtk_config_minor_version) || (gtk_micro_version != $gtk_config_micro_version)) { printf("\n*** 'pkg-config --modversion gtk+-2.0' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version, gtk_major_version, gtk_minor_version, gtk_micro_version); printf ("*** was found! If pkg-config was correct, then it is best\n"); printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n"); printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); printf("*** required on your system.\n"); printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n"); printf("*** to point to the correct configuration files\n"); } else if ((gtk_major_version != GTK_MAJOR_VERSION) || (gtk_minor_version != GTK_MINOR_VERSION) || (gtk_micro_version != GTK_MICRO_VERSION)) { printf("*** GTK+ header files (version %d.%d.%d) do not match\n", GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION); printf("*** library (version %d.%d.%d)\n", gtk_major_version, gtk_minor_version, gtk_micro_version); } else { if ((gtk_major_version > major) || ((gtk_major_version == major) && (gtk_minor_version > minor)) || ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro))) { return 0; } else { printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n", gtk_major_version, gtk_minor_version, gtk_micro_version); printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n", major, minor, micro); printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n"); printf("***\n"); printf("*** If you have already installed a sufficiently new version, this error\n"); printf("*** probably means that the wrong copy of the pkg-config shell script is\n"); printf("*** being found. The easiest way to fix this is to remove the old version\n"); printf("*** of GTK+, but you can also set the PKG_CONFIG environment to point to the\n"); printf("*** correct copy of pkg-config. (In this case, you will have to\n"); printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); printf("*** so that the correct libraries are found at run-time))\n"); } } return 1; } _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 ) no_gtk=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi if test "x$no_gtk" = x ; then { echo "$as_me:$LINENO: result: yes (version $gtk_config_major_version.$gtk_config_minor_version.$gtk_config_micro_version)" >&5 echo "${ECHO_T}yes (version $gtk_config_major_version.$gtk_config_minor_version.$gtk_config_micro_version)" >&6; } : else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } if test "$PKG_CONFIG" = "no" ; then echo "*** A new enough version of pkg-config was not found." echo "*** See http://pkgconfig.sourceforge.net" else if test -f conf.gtktest ; then : else echo "*** Could not run GTK+ test program, checking why..." ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$LIBS $GTK_LIBS" 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 () { return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ; 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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding GTK+ or finding the wrong" echo "*** version of GTK+. If it is not finding GTK+, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occured. This usually means GTK+ is incorrectly installed." fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi GTK_CFLAGS="" GTK_LIBS="" { { echo "$as_me:$LINENO: error: calcoo needs GTK >= 2.0" >&5 echo "$as_me: error: calcoo needs GTK >= 2.0" >&2;} { (exit 1); exit 1; }; } fi rm -f conf.gtktest 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 && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.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 && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.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 && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.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 && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.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_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 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_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 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 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); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; 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 ac_config_files="$ac_config_files src/Makefile Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, 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}' # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that # take arguments), then branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. ac_script=' t clear :clear s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g t quote s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g t quote b any :quote s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g s/\[/\\&/g s/\]/\\&/g s/\$/$$/g H :any ${ g s/^\n// s/\n/ /g p } ' DEFS=`sed -n "$ac_script" confdefs.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 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi : ${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 more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # 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 # 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 if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 # 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 $as_me, which was generated by GNU Autoconf 2.61. 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_commands="$ac_config_commands" _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 and configuration settings, 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 Configuration files: $config_files Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ config.status configured by $0, generated by GNU Autoconf 2.61, 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' MKDIR_P='$MKDIR_P' _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;; --he | --h | --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 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; *) { { 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_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= 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 INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim INSTALL_DATA!$INSTALL_DATA$ac_delim am__isrc!$am__isrc$ac_delim CYGPATH_W!$CYGPATH_W$ac_delim PACKAGE!$PACKAGE$ac_delim VERSION!$VERSION$ac_delim ACLOCAL!$ACLOCAL$ac_delim AUTOCONF!$AUTOCONF$ac_delim AUTOMAKE!$AUTOMAKE$ac_delim AUTOHEADER!$AUTOHEADER$ac_delim MAKEINFO!$MAKEINFO$ac_delim install_sh!$install_sh$ac_delim STRIP!$STRIP$ac_delim INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim mkdir_p!$mkdir_p$ac_delim AWK!$AWK$ac_delim SET_MAKE!$SET_MAKE$ac_delim am__leading_dot!$am__leading_dot$ac_delim AMTAR!$AMTAR$ac_delim am__tar!$am__tar$ac_delim am__untar!$am__untar$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 DEPDIR!$DEPDIR$ac_delim am__include!$am__include$ac_delim am__quote!$am__quote$ac_delim AMDEP_TRUE!$AMDEP_TRUE$ac_delim AMDEP_FALSE!$AMDEP_FALSE$ac_delim AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim CCDEPMODE!$CCDEPMODE$ac_delim am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim PKG_CONFIG!$PKG_CONFIG$ac_delim GTK_CFLAGS!$GTK_CFLAGS$ac_delim GTK_LIBS!$GTK_LIBS$ac_delim CPP!$CPP$ac_delim GREP!$GREP$ac_delim EGREP!$EGREP$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` = 83; 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 :C $CONFIG_COMMANDS 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 ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; 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 s&@MKDIR_P@&$ac_MKDIR_P&;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 ;; :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` { as_dir=$dirpart/$fdir 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; }; }; } # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ;; 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 calcoo-1.3.18/install-sh0000744000175000017500000001273607314300071011773 00000000000000#!/bin/sh # # install - install a program, script, or datafile # This comes from X11R5 (mit/util/scripts/install.sh). # # Copyright 1991 by the Massachusetts Institute of Technology # # Permission to use, copy, modify, distribute, and sell this software and its # documentation for any purpose is hereby granted without fee, provided that # the above copyright notice appear in all copies and that both that # copyright notice and this permission notice appear in supporting # documentation, and that the name of M.I.T. not be used in advertising or # publicity pertaining to distribution of the software without specific, # written prior permission. M.I.T. makes no representations about the # suitability of this software for any purpose. It is provided "as is" # without express or implied warranty. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. It can only install one file at a time, a restriction # shared with many OS's install programs. # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" # put in absolute paths if you don't have them in your path; or use env. vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" transformbasename="" transform_arg="" instcmd="$mvprog" chmodcmd="$chmodprog 0755" chowncmd="" chgrpcmd="" stripcmd="" rmcmd="$rmprog -f" mvcmd="$mvprog" src="" dst="" dir_arg="" while [ x"$1" != x ]; do case $1 in -c) instcmd="$cpprog" shift continue;; -d) dir_arg=true shift continue;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; -s) stripcmd="$stripprog" shift continue;; -t=*) transformarg=`echo $1 | sed 's/-t=//'` shift continue;; -b=*) transformbasename=`echo $1 | sed 's/-b=//'` shift continue;; *) if [ x"$src" = x ] then src=$1 else # this colon is to work around a 386BSD /bin/sh bug : dst=$1 fi shift continue;; esac done if [ x"$src" = x ] then echo "install: no input file specified" exit 1 else true fi if [ x"$dir_arg" != x ]; then dst=$src src="" if [ -d $dst ]; then instcmd=: chmodcmd="" else instcmd=mkdir fi else # Waiting for this to be detected by the "$instcmd $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if [ -f $src -o -d $src ] then true else echo "install: $src does not exist" exit 1 fi if [ x"$dst" = x ] then echo "install: no destination specified" exit 1 else true fi # If destination is a directory, append the input filename; if your system # does not like double slashes in filenames, you may need to add some logic if [ -d $dst ] then dst="$dst"/`basename $src` else true fi fi ## this sed command emulates the dirname command dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` # Make sure that the destination directory exists. # this part is taken from Noah Friedman's mkinstalldirs script # Skip lots of stat calls in the usual case. if [ ! -d "$dstdir" ]; then defaultIFS=' ' IFS="${IFS-${defaultIFS}}" oIFS="${IFS}" # Some sh's can't handle IFS=/ for some reason. IFS='%' set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` IFS="${oIFS}" pathcomp='' while [ $# -ne 0 ] ; do pathcomp="${pathcomp}${1}" shift if [ ! -d "${pathcomp}" ] ; then $mkdirprog "${pathcomp}" else true fi pathcomp="${pathcomp}/" done fi if [ x"$dir_arg" != x ] then $doit $instcmd $dst && if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi else # If we're going to rename the final executable, determine the name now. if [ x"$transformarg" = x ] then dstfile=`basename $dst` else dstfile=`basename $dst $transformbasename | sed $transformarg`$transformbasename fi # don't allow the sed command to completely eliminate the filename if [ x"$dstfile" = x ] then dstfile=`basename $dst` else true fi # Make a temp file name in the proper directory. dsttmp=$dstdir/#inst.$$# # Move or copy the file name to the temp name $doit $instcmd $src $dsttmp && trap "rm -f ${dsttmp}" 0 && # and set any options; do chmod last to preserve setuid bits # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $instcmd $src $dsttmp" command. if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && # Now rename the file to the real destination. $doit $rmcmd -f $dstdir/$dstfile && $doit $mvcmd $dsttmp $dstdir/$dstfile fi && exit 0 calcoo-1.3.18/depcomp0000755000175000017500000003541010232764715011354 00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2004-04-25.13 # Copyright (C) 1999, 2000, 2003, 2004 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by `PROGRAMS ARGS'. object Object file output by `PROGRAMS ARGS'. depfile Dependency file to output. tmpdepfile Temporary file to use when outputing dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit 0 ;; -v | --v*) echo "depcomp $scriptversion" exit 0 ;; esac if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # `libtool' can also be set to `yes' or `no'. if test -z "$depfile"; then base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'` dir=`echo "$object" | sed 's,/.*$,/,'` if test "$dir" = "$object"; then dir= fi # FIXME: should be _deps on DOS. depfile="$dir.deps/$base" fi tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' ' ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> $depfile echo >> $depfile # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> $depfile else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts `$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'` tmpdepfile="$stripped.u" if test "$libtool" = yes; then "$@" -Wc,-M else "$@" -M fi stat=$? if test -f "$tmpdepfile"; then : else stripped=`echo "$stripped" | sed 's,^.*/,,'` tmpdepfile="$stripped.u" fi if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi if test -f "$tmpdepfile"; then outname="$stripped.o" # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; icc) # Intel's C compiler understands `-MD -MF file'. However on # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h # which is wrong. We want: # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using \ : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then # Dependencies are output in .lo.d with libtool 1.4. # They are output in .o.d with libtool 1.5. tmpdepfile1="$dir.libs/$base.lo.d" tmpdepfile2="$dir.libs/$base.o.d" tmpdepfile3="$dir.libs/$base.d" "$@" -Wc,-MD else tmpdepfile1="$dir$base.o.d" tmpdepfile2="$dir$base.d" tmpdepfile3="$dir$base.d" "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi if test -f "$tmpdepfile1"; then tmpdepfile="$tmpdepfile1" elif test -f "$tmpdepfile2"; then tmpdepfile="$tmpdepfile2" else tmpdepfile="$tmpdepfile3" fi if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for `:' # in the target name. This is to cope with DOS-style filenames: # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. "$@" $dashmflag | sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # X makedepend shift cleared=no for arg in "$@"; do case $cleared in no) set ""; shift cleared=yes ;; esac case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix="`echo $object | sed 's/^.*\././'`" touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o, # because we must use -o when running libtool. "$@" || exit $? IFS=" " for arg do case "$arg" in "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: calcoo-1.3.18/Makefile.am0000644000175000017500000000007507431014774012032 00000000000000SUBDIRS = src man_MANS = calcoo.1 EXTRA_DIST = $(man_MANS) calcoo-1.3.18/configure.in0000644000175000017500000000065410661637037012314 00000000000000dnl Process this file with autoconf to produce a configure script. AC_INIT(src/main.c) AM_INIT_AUTOMAKE(calcoo, 1.3.18) dnl Checks for programs. AC_PROG_CC dnl Checks for libraries. AM_PATH_GTK_2_0(2.0.0,,AC_MSG_ERROR(calcoo needs GTK >= 2.0)) dnl Checks for header files. AC_HEADER_STDC dnl Checks for typedefs, structures, and compiler characteristics. dnl Checks for library functions. AC_OUTPUT(src/Makefile Makefile) calcoo-1.3.18/Makefile.in0000644000175000017500000004672710661637130012055 00000000000000# Makefile.in generated by automake 1.10 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(top_srcdir)/configure AUTHORS COPYING \ ChangeLog INSTALL NEWS depcomp install-sh missing \ mkinstalldirs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive man1dir = $(mandir)/man1 am__installdirs = "$(DESTDIR)$(man1dir)" NROFF = nroff MANS = $(man_MANS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ { test ! -d $(distdir) \ || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr $(distdir); }; } DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = src man_MANS = calcoo.1 EXTRA_DIST = $(man_MANS) all: all-recursive .SUFFIXES: am--refresh: @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \ cd $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) cd $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) install-man1: $(man1_MANS) $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.1*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ else file=$$i; fi; \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 1*) ;; \ *) ext='1' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \ done uninstall-man1: @$(NORMAL_UNINSTALL) @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.1*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 1*) ;; \ *) ext='1' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \ rm -f "$(DESTDIR)$(man1dir)/$$inst"; \ done # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) test -d $(distdir) || mkdir $(distdir) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ am__remove_distdir=: \ am__skip_length_check=: \ distdir) \ || exit 1; \ fi; \ done -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r $(distdir) dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && cd $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @cd $(distuninstallcheck_dir) \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile $(MANS) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(man1dir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-man install-dvi: install-dvi-recursive install-exec-am: install-html: install-html-recursive install-info: install-info-recursive install-man: install-man1 install-pdf: install-pdf-recursive install-ps: install-ps-recursive installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-man uninstall-man: uninstall-man1 .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ install-strip .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-am clean clean-generic \ ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \ dist-shar dist-tarZ dist-zip distcheck distclean \ distclean-generic distclean-tags distcleancheck distdir \ distuninstallcheck dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-man1 install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ uninstall-man uninstall-man1 # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: calcoo-1.3.18/missing0000744000175000017500000001421307314300071011356 00000000000000#! /bin/sh # Common stub for a few missing GNU programs while installing. # Copyright (C) 1996, 1997 Free Software Foundation, Inc. # Franc,ois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi case "$1" in -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file yacc create \`y.tab.[ch]', if possible, from existing .[ch]" ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing - GNU libit 0.0" ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; aclocal) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`acinclude.m4' or \`configure.in'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`configure.in'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`acconfig.h' or \`configure.in'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' configure.in` test -z "$files" && files="config.h" touch_files= for f in $files; do case "$f" in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`configure.in'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; bison|yacc) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.h fi ;; esac fi if [ ! -f y.tab.h ]; then echo >y.tab.h fi if [ ! -f y.tab.c ]; then echo 'main() { return 0; }' >y.tab.c fi ;; lex|flex) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if [ ! -f lex.yy.c ]; then echo 'main() { return 0; }' >lex.yy.c fi ;; makeinfo) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` fi touch $file ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and you do not seem to have it handy on your system. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequirements for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 calcoo-1.3.18/ChangeLog0000644000175000017500000002466610661636366011572 000000000000002007/08/18 Calcoo 1.3.18 * Fixed: Legacy GTK+ 1.x function calls removed. Thanks to Rafal Muzylo for reporting the issue and providing some of the patches. 2007/07/14 Calcoo 1.3.17 * Fixed: unsafe strcpy fixed. Thanks to Steve Kemp for reporting the bug and providing the fix. * Fixed: cleaned up parsing pasted selection. 2005/04/27 Calcoo 1.3.16 * Changed: swithched to GTK+ 2.x. Changes needed for the switch involve keyboard accelerators, dialog windows (thanks to Reuben Peterkin for providing the patches), copy/paste functionality. * Added: shortcut for the keypad comma (for German keyboards). Thanks to Andreas Hoppe for posting this problem at de.comp.os.unix.apps.kde and testing the fix. * Fixed: all display digits were initialized at startup, which resulted in huge startup times; now they are initialized on demand, and the startup is faster. 2003/07/27 Calcoo 1.3.15 * Added: some keyboard shortcuts 2003/07/13 Calcoo 1.3.14 * Fixed: addition/subtraction tweaked to have 100.1 - 100 - 0.1 equal to zero rather than to 10e-17 and so on. Ditto for log and log10. An analogous hack for the trigonometric functions improved. Thanks to Hinrich Buhr for posting this problem at fido.ger.linux * Fixed: function int round(double) was renamed to int round_double_to_int(double) in order to prevent name conflicts under Mac OS X. Thanks to Mike Block for informing me about this issue. 2002/08/18 Calcoo 1.3.13 * Fixed: bug which caused segfaults during pasting when the selection could not be retrieved. Thanks to Vincent Lefevre for discovering this bug 2002/07/28 Calcoo 1.3.12 * Added: accelerator keys: "BackSpace" for undo, "Delete" for clear_x, "Up"/"Down" for stack scrolling (RPN mode) * Added: mouse middle button now pastes into the main display * Added: info and options windows can now be closed by hitting Escape * Added: option to truncate trailing zeros when rounding to a fixed number of decimal places * Fixed: processing of the command-line options moved to before the call to gtk_init(). As the result, it is now possible to run calcoo with options -h and -v even if no window can be opened * Fixed: it turned out that changing options using the spacebar rather than the mouse was ignored (GTK bug?). Workaround enabled. * Changed: beautifications of the settings window * Changed: minor code cleanups 2002/07/05 Calcoo 1.3.11 * Fixed: the bug in setting the color for the button labels and display glyphs. Now, calcoo DOES take this color from the current GTK+ scheme. The default color is fg[PRELIGHT] for the "default" GTK style, as defined in ~/.gtkrc. This choice of color can be changed in defaults.h. Thanks to Jan Stocker for reporting this bug. 2002/06/19 Calcoo 1.3.10 * Changed: in the RPN mode, the keys to swap registers X and Z, and X and T replaced with the keys to scroll the stack * Added: number input can be started with "e" now (mantissa defaults to 1) * Fixed: the lower bound for rounding is changed from "0" (which makes no sense) to "1" 2002/06/07 Calcoo 1.3.9 * Added: option to round output to N digits * Fixed: bugs in the input interpretation which led to improper stack behavior when the number input was beginning with "." Thanks to Christian Weisgerber for discovering this bug. * Fixed: a minor bug which in scientific and engineering display modes caused unnecessary rounding of numbers very close to 1 2002/06/02 Calcoo 1.3.8 * Changed: non-integer powers of negative numbers now yield errors instead of weird results * Added: saving the selected angle units * Added: option to preserve original colors of pixmaps (in defaults.h). By default, they are converted to the foreground color. * Changed: pixmaps for deg/rad and fix/sci/eng indicators, some other pixmaps * Fixed: bugs in saving "arc autorelease" and "hyp autorelease" settings * Changed: minor code cleanups (mostly in b_settings.c) * Added: window icons for Settings and Info windows. 2002/03/09 Calcoo 1.3.7 * Changed: error handling. Now all the buttons except for undo and clear_all become grayed out when an error occurs. * Fixed: a bug in the initialization sequence, which could cause weird things displayed in the operation displays in the algebraic mode from the calcoo start until the first operation * Fixed: a minor bug in the mode switching procedure, which could cause weird things displayed in the operation displays in the algebraic mode from just after switching from RPN to algebraic mode until the first operation * Changed: Minor code cleanups 2002/02/09 Calcoo 1.3.6 * Added: option to choose between infinite and four-element stack in RPN mode * Added: option to disable autorelease of arc and hyp buttons * Changed: RPN-related options are now grayed out when the algebraic mode is chosen * Added: shortcut Ctrl-q for exit * Changed: minor code cleanups 2002/01/20 Calcoo 1.3.5 * Fixed: cpu->curr_mem was not initialized at startup, which caused crashes on some systems. Thanks to Christian Weisgerber for discovering this bug. 2001/12/14 Calcoo 1.3.4 * Changed: RPN mode: behavior of the button Finally calcoo can satisfy all tastes for the behavior of the button. Now there is an option that sets its behavior to traditional or HP-28-like. 2001/12/10 Calcoo 1.3.3 (for Debian GNU/Linux only) * Changed: RPN mode: behavior of the button Now it works like in most HP calculators. (In 1.3.2 it was set to work as in HP-28, which was not quite standard). * Added: keyboard shortcuts for parenthesis buttons 2001/12/3 Calcoo 1.3.2 * Fixed: RPN mode: behavior of the button pressed when the number has just been entered * Changed: now options and info/help have separate windows * Changed: code cleanups * Added: engineering display format (the exponent is a multiple of 3) * Fixed: incorrect behavior when "=" is pressed before all parens are closed * Fixed: adjacent opening parens are now possible * Fixed: GtkErrors if the options applied are the same as the current ones * Added: "Help" tab in the info window * Changed: register X is not reset by changing the mode now 2001/11/19 Calcoo 1.3.1 * Changed: body design, button arrangement * Fixed: RPN mode: the bugfix of the previous version introduced another bug - sometimes the stack was pushed twice. * Added: displays for Y, Z, and T registers * Changed: the number of registers in RPN mode reduced from infinity to 4 to comply with traditions * Changed: rearrangements in processing binary operations, digit keys, and parentheses * Added: more shortcuts 2001/11/16 Calcoo 1.3.0 * Changed: body design, button arrangement * Fixed: RPN mode: in earlier versions entering of a new number did not push the stack. Thanks to Christian Weisgerber for finding this bug. * Fixed: PRN mode: in earlier versions recalling from the memory did not push the stack. * Added: a button to swap X and memory registers * Added: another memory register * Added: displays for memory * Changed: icons for memory buttons * Removed: optimization and other flags from configure.in 2001/11/13 Calcoo 1.2.4 * Fixed: a nasty bug introduced in version 1.2.2, which caused crashes when display was getting full * Changed: pixmaps for digit "1" (thanks to Daniel Richard G.) * Added: more keyboard shortcuts (thanks to Daniel Richard G.) 2001/11/11 Calcoo 1.2.3 * Added: the state of RPN/algebraic option is now saved in $HOME/.calcoo, and is restored when calcoo is restarted * Added: keyboard shortcuts for basic buttons * Added: help tab in the info window * Changed: information about the current state of "enforced exp format" and deg/rad is now stored in "cpu"; as a result now it is affected by undo/redo * Fixed: tan of 90 degrees now yields overflow instead of a large number * Fixed: undo/redo in the previous versions did not affect memory - now it does * Changed: code cleanups, rearrangements in the cpu structure * Changed: the icon for the RPN "Enter" button * Changed: now 0! yields 1 instead of overflow 2001/10/20 Calcoo 1.2.2 * Changed: defaults moved to default.h * Fixed: handling of binary operation priority in complicated expressions improved * Changed: behavior of "copy": decimal dot is now not copied if there is no fractional part * Changed: behavior of "copy": overflow message is now copied 2001/10/16 Calcoo 1.2.1 * Changed: now switching between RPN/algebraic modes resets registers * Changed: zero exponent is not displayed now, even if exponential format is enforced * Changed: evaluation of trigonometric functions tweaked to have cosine of 90 degrees equal to 0.0 rather than to 10e-17 and so on * Added: man page * Fixed: bug in the evaluation of the factorial of large numbers * Added: main window icon * Added: --help and --version command-line options * Added: display tick marks to separate thousands 2001/10/13 Calcoo 1.2.0 * Added: RPN (reverse Polish notation) mode * Changed: appearance of the "Enforce exponential format" control * Changed: bitmaps for digits "5" and "1" 2001/07/20 Calcoo 1.1.1 * Changed: icons for some buttons * Added: frame for DEG/RAD indicator 2001/07/13 Calcoo 1.1.0 * Added: copy/paste interaction with the X clipboard * Added: parentheses buttons * Added: binary operation priority * Removed: M-, MX, M/ buttons 2001/06/20 Calcoo 1.0.1 * Added: tooltips for non-obvious buttons * Added: autoconf/automake stuff * Other: minor cosmetic changes 2001/06/15 Calcoo 1.0.0 * Release: the first public release calcoo-1.3.18/mkinstalldirs0000744000175000017500000000132207314300071012562 00000000000000#! /bin/sh # mkinstalldirs --- make directory hierarchy # Author: Noah Friedman # Created: 1993-05-16 # Public domain # $Id: mkinstalldirs,v 1.13 1999/01/05 03:18:55 bje 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 calcoo-1.3.18/COPYING0000644000175000017500000004310506750140616011030 00000000000000 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.