wcalc-2.4/0002775000175000000620000000000011101160225010726 5ustar kkstaffwcalc-2.4/AboutBoxController.h0000644000175000000620000000034610304224616014676 0ustar kkstaff/* AboutBoxController */ #include @interface AboutBoxController : NSObject { IBOutlet NSWindow *aboutBox; IBOutlet NSTextField *version; } - (IBAction)closeIt:(id)sender; - (IBAction)openIt:(id)sender; @end wcalc-2.4/._AboutBoxController.m0000644000175000000620000000024711100237072015113 0ustar kkstaffMac OS X  2uATTR8  com.apple.TextEncodingMACINTOSH;0wcalc-2.4/AboutBoxController.m0000644000175000000620000000056211100237072014676 0ustar kkstaff#include "definitions.h" #include "AboutBoxController.h" #ifdef MEMWATCH #include "memwatch.h" #endif @implementation AboutBoxController - (IBAction)closeIt:(id)sender { [aboutBox close]; } - (IBAction)openIt:(id)sender { [version setStringValue:[NSString stringWithFormat:@"Version %s",VERSION]]; [aboutBox makeKeyAndOrderFront:self]; [aboutBox center]; } @end wcalc-2.4/acinclude.m40000644000175000000620000000305210756141040013124 0ustar kkstaffdnl Available from the GNU Autoconf Macro Archive at: dnl http://autoconf-archive.cryp.to/vl_lib_readline.html dnl last modified 2002-04-04 dnl AC_DEFUN([VL_LIB_READLINE], [ AC_CACHE_CHECK([for a readline compatible library], vl_cv_lib_readline, [ ORIG_LIBS="$LIBS" for readline_lib in readline edit editline; do for termcap_lib in "" termcap curses ncurses; do if test -z "$termcap_lib"; then TRY_LIB="-l$readline_lib" else TRY_LIB="-l$readline_lib -l$termcap_lib" fi LIBS="$ORIG_LIBS $TRY_LIB" AC_TRY_LINK_FUNC(readline, vl_cv_lib_readline="$TRY_LIB") if test -n "$vl_cv_lib_readline"; then break fi done if test -n "$vl_cv_lib_readline"; then break fi done if test -z "$vl_cv_lib_readline"; then vl_cv_lib_readline="no" LIBS="$ORIG_LIBS" fi ]) if test "$vl_cv_lib_readline" != "no"; then AC_DEFINE(HAVE_LIBREADLINE, 1, [Define if you have a readline compatible library]) AC_CHECK_HEADERS(readline.h readline/readline.h) AC_CACHE_CHECK([whether readline supports history], vl_cv_lib_readline_history, [ vl_cv_lib_readline_history="no" AC_TRY_LINK_FUNC(add_history, vl_cv_lib_readline_history="yes") ]) if test "$vl_cv_lib_readline_history" = "yes"; then AC_DEFINE(HAVE_READLINE_HISTORY, 1, [Define if your readline library has \`add_history']) AC_CHECK_HEADERS(history.h readline/history.h) fi fi ])dnl wcalc-2.4/aclocal.m40000664000175000000620000010100611074306202012570 0ustar kkstaff# generated automatically by aclocal 1.10.1 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(AC_AUTOCONF_VERSION, [2.62],, [m4_warning([this file was generated for autoconf 2.62. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) # Copyright (C) 2002, 2003, 2005, 2006, 2007 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.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.10.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(AC_AUTOCONF_VERSION)]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006 # 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 -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 8 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2008 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 13 # 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_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005 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])]) # Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # AM_PROG_LEX # ----------- # Autoconf leaves LEX=: if lex or flex can't be found. Change that to a # "missing" invocation, for better error output. AC_DEFUN([AM_PROG_LEX], [AC_PREREQ(2.50)dnl AC_REQUIRE([AM_MISSING_HAS_RUN])dnl AC_REQUIRE([AC_PROG_LEX])dnl if test "$LEX" = :; then LEX=${am_missing_run}flex fi]) # 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 outputting 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 m4_include([acinclude.m4]) wcalc-2.4/add_commas.c0000644000175000000620000000571211100253422013163 0ustar kkstaff#if HAVE_CONFIG_H # include "config.h" #endif #if ! defined(HAVE_CONFIG_H) || HAVE_STRING_H # include #endif #include /* for calloc() */ #include #include "calculator.h" #include "add_commas.h" #ifdef MEMWATCH #include "memwatch.h" #endif /* this function returns a copy of the input string with delimiters * appropriate for the specified base. */ /*@null@*/ char *add_commas(const char *input, const int base) { char *tmpstring, *delimiter; unsigned int skip, prefix, ctr; char separator; char dec_delim = conf.dec_delimiter; size_t preflen; size_t fromcurs, tocurs; char * exponent_chars; const size_t input_len = strlen(input); Dprintf("add_commas: %s, %i\n", input, base); if (NULL == input) { return NULL; } if (0 == isdigit(*input)) { return NULL; } delimiter = strchr(input, dec_delim); if (NULL == delimiter) { dec_delim = 0; delimiter = strrchr(input, 0); } Dprintf("add_commas: input: %s\n", input); switch (base) { default: case DECIMAL_FORMAT: skip = 3; prefix = 0; separator = conf.thou_delimiter; exponent_chars = "eE"; break; case HEXADECIMAL_FORMAT: skip = 2; prefix = 2; separator = ' '; exponent_chars = "@"; break; case OCTAL_FORMAT: skip = 4; prefix = 1; separator = conf.thou_delimiter; exponent_chars = "eE"; break; case BINARY_FORMAT: skip = 8; prefix = 2; separator = conf.thou_delimiter; exponent_chars = "eE"; break; } if (0 == conf.print_prefixes) { prefix = 0; } if (*input == '-') { prefix++; } // the meat of the function preflen = (size_t)(delimiter - input); if (preflen < (size_t)(skip + prefix)) { return NULL; } Dprintf("tmpstring is alloc'd to be %lu long\n", preflen + strlen(input)); tmpstring = calloc(preflen + strlen(input), sizeof(char)); if (tmpstring == NULL) { return NULL; } ctr = (unsigned int)((delimiter - (input + prefix)) % skip); if (ctr == 0) { ctr = skip; } fromcurs = 0; tocurs = 0; while (fromcurs < input_len && input[fromcurs] != dec_delim && strchr(exponent_chars, input[fromcurs]) == NULL) { Dprintf("from: %s to: %s \n", input+fromcurs, tmpstring); tmpstring[tocurs++] = input[fromcurs++]; if (prefix != 0) { prefix--; continue; } if (--ctr == 0 && separator != '\0') { tmpstring[tocurs++] = separator; } if (ctr == 0) { ctr = skip; } } Dprintf("tmpstring[tocurs-1] == %c\n",tmpstring[tocurs-1]); Dprintf(" input[fromcurs-1] == %c\n",input[fromcurs-1]); if (tmpstring[tocurs - 1] == separator) { tmpstring[tocurs - 1] = dec_delim; } if (input[fromcurs] == 'e' || input[fromcurs] == 'E') { tmpstring[tocurs++] = input[fromcurs]; } if (fromcurs < input_len) { fromcurs++; while (fromcurs < input_len) { tmpstring[tocurs++] = input[fromcurs++]; } } return tmpstring; } wcalc-2.4/add_commas.h0000644000175000000620000000017710725564203013206 0ustar kkstaff#ifndef WCALC_ADD_COMMAS_H #define WCALC_ADD_COMMAS_H /*@null@*/ char *add_commas(const char *input, const int base); #endif wcalc-2.4/AUTHORS0000644000175000000620000000004307615275745012024 0ustar kkstaffKyle Wheeler wcalc-2.4/calculator.c0000644000175000000620000007432411100722571013240 0ustar kkstaff#ifdef HAVE_CONFIG_H #include "config.h" #else #define HAVE_MPFR_22 #endif #include #include #include #include /* for HUGE_VAL */ #include /* for DBL_EPSILON */ #include /* for isalpha() */ #ifndef isnan # define isnan(x) \ (sizeof (x) == sizeof (long double) ? isnan_ld (x) \ : sizeof (x) == sizeof (double) ? isnan_d (x) \ : isnan_f (x)) static inline int isnan_f (float x) { return x != x; } static inline int isnan_d (double x) { return x != x; } static inline int isnan_ld (long double x) { return x != x; } #endif #ifndef isinf # define isinf(x) \ (sizeof (x) == sizeof (long double) ? isinf_ld (x) \ : sizeof (x) == sizeof (double) ? isinf_d (x) \ : isinf_f (x)) static inline int isinf_f (float x) { return isnan (x - x); } static inline int isinf_d (double x) { return isnan (x - x); } static inline int isinf_ld (long double x) { return isnan (x - x); } #endif #if ! defined(HAVE_CONFIG_H) || HAVE_STRING_H # include /* for memset() */ #else # if !HAVE_STRCHR # define strchr index # define strrchr rindex # endif char *strchr(), *strrchr(); #endif #if ! defined(HAVE_CONFIG_H) || TIME_WITH_SYS_TIME /* for time() */ # include # include #else # if HAVE_SYS_TIME_H # include # else # include # endif #endif #include "number.h" #include "uint32_max.h" #include "calculator.h" #include "variables.h" #include "string_manip.h" #include "files.h" #include "number_formatting.h" #include "add_commas.h" #include "list.h" #include "extract_vars.h" #ifdef MEMWATCH #include "memwatch.h" #endif /* variables everyone needs to get to */ Number last_answer; char *pretty_answer = NULL; /* communication with the parser */ char compute = 1; unsigned int sig_figs = UINT32_MAX; /* communication with the frontend */ char standard_output = 1; char not_all_displayed = 0; char *pa = NULL; struct _conf conf; /* * These are declared here because they're not in any header files. * yyparse() is declared with an empty argument list so that it is * compatible with the generated C code from yacc/bison. * These two lines are taken from http://www.bgw.org/tutorials/programming/c/lex_yacc/main.c */ struct yy_buffer_state; extern int yyparse(); extern void *yy_scan_string(const char *); extern void yy_delete_buffer(struct yy_buffer_state *); static int recursion(char *str); static int find_recursion(char *); static int find_recursion_core(List); static char *flatten(char *str); void parseme(const char *pthis) { /*{{{ */ extern int synerrors; short numbers = 0; char *sanitized; extern char *open_file; synerrors = 0; compute = 1; sig_figs = UINT32_MAX; Dprintf("parsing: %s\n", pthis); sanitized = (char *)strdup(pthis); /* Convert to standard notation (american comma and period) if there are * numbers */ // are there numbers? { unsigned int i; for (i = 0; i < strlen(sanitized); ++i) { if (isdigit((int)(sanitized[i]))) { numbers = 1; break; } } } if (numbers) { unsigned int i; for (i = 0; i < strlen(sanitized); ++i) { if ((conf.thou_delimiter != '.' && conf.dec_delimiter != '.' && conf.in_thou_delimiter != '.' && conf.in_dec_delimiter != '.' && sanitized[i] == '.') || (conf.thou_delimiter != ',' && conf.in_thou_delimiter != ',' && conf.dec_delimiter != ',' && conf.in_dec_delimiter != ',' && sanitized[i] == ',')) { // throw an error report_error("Improperly formatted numbers! (%c,%c)\n", conf.thou_delimiter, conf.dec_delimiter); synerrors = 1; break; } else if (conf.in_thou_delimiter != 0 && sanitized[i] == conf.in_thou_delimiter) { sanitized[i] = ','; } else if (conf.in_thou_delimiter == 0 && sanitized[i] == conf.thou_delimiter) { sanitized[i] = ','; } else if (conf.in_dec_delimiter != 0 && sanitized[i] == conf.in_dec_delimiter) { sanitized[i] = '.'; } else if (conf.in_dec_delimiter == 0 && sanitized[i] == conf.dec_delimiter) { sanitized[i] = '.'; } } } /* Now, check for recursion */ if (recursion(sanitized)) { goto exiting; } /* now resolve the variables */ sanitized = flatten(sanitized); Dprintf("flattened: '%s'\n", sanitized); /* Sanitize the input (add a newline) */ { char *temp; unsigned int len = strlen(sanitized) + 3; temp = calloc(sizeof(char), len); if (!temp) { perror("resizing buffer"); goto exiting; } snprintf(temp, len, "%s\n", sanitized); free(sanitized); sanitized = temp; } /* reset the position tracker */ { extern int column; column = 0; } /* Evaluate the Expression * These two lines borrowed from: * http://www.bgw.org/tutorials/programming/c/lex_yacc/main.c * and are here strictly for readline suppport */ { struct yy_buffer_state *yy = yy_scan_string(sanitized); yyparse(); yy_delete_buffer(yy); } if (open_file) { char *filename = open_file; int retval; open_file = NULL; Dprintf("open_file\n"); retval = loadState(filename, 1); if (retval) { report_error("Could not load file (%s).", (char *)strerror(retval)); } } exiting: /* exiting */ free(sanitized); return; } /*}}} */ /* this function should probably stop flattening if it sees a comment, but * that's so rare (and hardly processor intensive) that it's not worth digging * at the moment */ static char *flatten(char *str) { /*{{{ */ char *curs = str, *eov, *nstr; char *varname, *varvalue; size_t olen, nlen, changedlen, varnamelen = 100; struct answer a; char standard_output_save = standard_output; standard_output = 0; if (*str == '\\') { standard_output = standard_output_save; return str; } curs = strchr(str, '='); if (!curs || !*curs || *(curs + 1) == '=') curs = str; while (curs && *curs) { // search for the first letter of a possible variable while (curs && *curs && !isalpha((int)(*curs))) { if (*curs == '\\') { curs++; while (curs && *curs && isalpha((int)(*curs))) curs++; } if (*curs == '\'') { curs++; while (curs && *curs && *curs != '\'') curs++; } curs++; } if (!curs || !*curs) { break; } // pull out that variable eov = curs; { size_t i = 0; varname = malloc(varnamelen * sizeof(char)); while (eov && *eov && (isalpha((int)(*eov)) || *eov == '_' || *eov == ':' || isdigit((int)(*eov)))) { if (i == varnamelen - 1) { varnamelen += 100; varname = realloc(varname, varnamelen * sizeof(char)); if (varname == NULL) { perror("flatten: "); exit(EXIT_FAILURE); } } varname[i++] = *eov; eov++; } if (i == 0) break; varname[i] = 0; } olen = strlen(varname); // if it's a variable, evaluate it a = getvar_full(varname); if (!a.err) { // it is a var Number f; num_init(f); if (a.exp) { // it is an expression parseme(a.exp); num_set(f, last_answer); } else { // it is a value num_set(f, a.val); num_free(a.val); } // get the number { char junk; // This value must fully reproduce the contents of f (thus, the -2 in arg 4) varvalue = num_to_str_complex(f, 10, 0, -2, 1, &junk); } num_free(f); } else { // not a known var: itza literal (e.g. cos) varvalue = (char *)strdup(varname); } nlen = strlen(varvalue); free(varname); // now, put it back in the string // it is a var, and needs parenthesis changedlen = strlen(str) + nlen - olen + 1; if (!a.err) changedlen += 2; // space for parens if it's a variable nstr = malloc(changedlen); if (!nstr) { // not enough memory perror("flatten: "); exit(EXIT_FAILURE); } { char *fromstring = str; char *tostring = nstr; // nstr is the new string, str is the input string tostring = nstr; while (fromstring != curs) { // copy up to the curs (the beginning of the var name) *tostring = *fromstring; ++fromstring; ++tostring; } if (!a.err) { *tostring = '('; ++tostring; } fromstring = varvalue; while (fromstring && *fromstring) { *tostring = *fromstring; ++fromstring; ++tostring; } if (!a.err) { *tostring = ')'; ++tostring; } curs = tostring; fromstring = eov; while (fromstring && *fromstring) { *tostring = *fromstring; ++fromstring; ++tostring; } *tostring = 0; free(str); str = nstr; } free(varvalue); } standard_output = standard_output_save; return str; } /*}}} */ static int recursion(char *str) { /*{{{ */ List vlist = NULL; int retval = 0; char *righthand; // do not examine commands if (*str == '\\') { return 0; } // do not examine the left side of an assignment righthand = strchr(str, '='); if (!righthand || !*righthand || *(righthand + 1) == '=') { righthand = str; } vlist = extract_vars(righthand); while (listLen(vlist) > 0) { char *varname = (char *)getHeadOfList(vlist); if (retval == 0) { retval = find_recursion(varname); } free(varname); } return retval; } /*}}} */ static int find_recursion(char *instring) { /*{{{ */ List vl = NULL; int retval; addToList(&vl, (char *)strdup(instring)); retval = find_recursion_core(vl); free(getHeadOfList(vl)); return retval; } /*}}} */ static int find_recursion_core(List oldvars) { /*{{{ */ List newvars = NULL; ListIterator oldvarsIterator; int retval = 0; struct answer a; char *newVarname = NULL, *oldVarname = NULL; a = getvar_full((char *)peekAheadInList(oldvars)); if (a.err) return 0; if (!a.exp) { num_free(a.val); return 0; } newvars = extract_vars(a.exp); oldvarsIterator = getListIterator(oldvars); // for each variable in that expression (i.e. each entry in newvars) // see if we've seen it before (i.e. it's in oldvars) while (listLen(newvars) > 0) { newVarname = (char *)getHeadOfList(newvars); while ((oldVarname = (char *)nextListElement(oldvarsIterator)) != NULL) { if (!strcmp(newVarname, oldVarname)) { report_error ("%s was found twice in symbol descent. Recursive variables are not allowed.", newVarname); // free the rest of the newvars list do { free(newVarname); } while ((newVarname = (char *)getHeadOfList(newvars)) != NULL); freeListIterator(oldvarsIterator); return 1; } } // now see if it has recursion addToListHead(&oldvars, newVarname); retval = find_recursion_core(oldvars); getHeadOfList(oldvars); resetListIterator(oldvarsIterator); free(newVarname); if (retval != 0) { break; } } // make sure newvars is empty (so all that memory gets freed) while ((newVarname = (char *)getHeadOfList(newvars)) != NULL) { free(newVarname); } freeListIterator(oldvarsIterator); return retval; } /*}}} */ void report_error(const char *err_fmt, ...) { /*{{{ */ extern char *errstring; extern int errloc; extern int column; extern int lines; extern int show_line_numbers; char *tempstring; unsigned int len; va_list ap; char *this_error; va_start(ap, err_fmt); this_error = calloc(strlen(err_fmt) + 1000, sizeof(char)); vsnprintf(this_error, strlen(err_fmt) + 1000, err_fmt, ap); len = strlen(this_error) + 100; va_end(ap); /* okay, now this_error has the current error text in it */ if (errstring) { len += strlen(errstring); } tempstring = calloc(len, sizeof(char)); if (errstring) { if (show_line_numbers) { snprintf(tempstring, len, "%s\nError on line %i: %s", errstring, lines, this_error); } else { snprintf(tempstring, len, "%s\n%s", errstring, this_error); } free(errstring); } else { if (show_line_numbers) { snprintf(tempstring, len, "Error on line %i: %s", lines, this_error); } else { snprintf(tempstring, len, "%s", this_error); } } errstring = tempstring; free(this_error); if (errloc == -1) { errloc = column; } } /*}}} */ void display_and_clear_errstring() { /*{{{ */ extern int scanerror; extern char *errstring; extern int errloc; if (errstring && errstring[0]) { if (errloc != -1) { int i; fprintf(stderr, " "); for (i = 0; i < errloc; i++) { fprintf(stderr, " "); } fprintf(stderr, "^\n"); errloc = -1; } fprintf(stderr, "%s", errstring); if (errstring[strlen(errstring) - 1] != '\n') fprintf(stderr, "\n"); free(errstring); errstring = NULL; scanerror = 0; } } /*}}} */ void set_prettyanswer(const Number num) { /*{{{ */ char *temp; Dprintf("set_prettyanswer\n"); if (pretty_answer) { free(pretty_answer); } Dprintf("set_prettyanswer - call print_this_result\n"); temp = print_this_result(num); Dprintf("set_prettyanswer: %s\n", temp); if (temp) { pretty_answer = (char *)strdup(temp); } else { pretty_answer = NULL; } Dprintf("set_prettyanswer - done\n"); } /*}}} */ static char *print_this_result_dbl(const double result) { /*{{{ */ char format[10]; static char *tmp; static char pa_dyn = 1; extern char *errstring; unsigned int decimal_places = 0; Dprintf("print_this_result_dbl(%f)\n", result); /* Build the "format" string, that will be used in an snprintf later */ switch (conf.output_format) { /*{{{ */ case DECIMAL_FORMAT: if (pa_dyn) tmp = realloc(pa, sizeof(char) * 310); else { tmp = pa = malloc(sizeof(char) * 310); pa_dyn = 1; } if (!tmp) { free(pa); pa = "Not Enough Memory"; pa_dyn = 0; return pa; } else pa = tmp; if (conf.precision > -1) { decimal_places = conf.precision; switch(conf.engineering) { case never: snprintf(format, 10, "%%1.%if", conf.precision); break; case always: snprintf(format, 10, "%%1.%ie", conf.precision); break; case automatic: snprintf(format, 10, "%%1.%ig", conf.precision); break; } Dprintf("precision was specified as %i, format string is \"%s\"\n", conf.precision, format); } else { switch (conf.engineering) { case never: strncpy(format, "%f", 10); break; case always: strncpy(format, "%e", 10); break; case automatic: strncpy(format, "%g", 10); break; } Dprintf("precision is automatic, format string is \"%s\"\n", format); if (fabs(result) < 10.0) { decimal_places = 6; } else if (fabs(result) < 100.0) { decimal_places = 4; } else if (fabs(result) < 1000.0) { decimal_places = 3; } else if (fabs(result) < 10000.0) { decimal_places = 2; } else if (fabs(result) < 100000.0) { decimal_places = 1; } else { decimal_places = 0; } } break; case OCTAL_FORMAT: if (pa_dyn) { tmp = realloc(pa, sizeof(char) * 14); } else { tmp = pa = malloc(sizeof(char) * 14); pa_dyn = 1; } if (!tmp) { free(pa); pa = "Not Enough Memory"; pa_dyn = 0; return pa; } else { pa = tmp; } snprintf(format, 10, conf.print_prefixes ? "%%#o" : "%%o"); break; case HEXADECIMAL_FORMAT: if (pa_dyn) { tmp = realloc(pa, sizeof(char) * 11); } else { tmp = pa = malloc(sizeof(char) * 11); pa_dyn = 1; } if (!tmp) { free(pa); pa = "Not Enough Memory"; pa_dyn = 0; return pa; } else { pa = tmp; } snprintf(format, 10, conf.print_prefixes ? "%%#x" : "%%x"); break; case BINARY_FORMAT: // Binary Format can't just use a format string, so // we have to handle it later if (pa_dyn) free(pa); pa = NULL; pa_dyn = 1; break; } /*}}} */ if (isinf(result)) { // if it is infinity, print "Infinity", regardless of format if (pa_dyn) tmp = realloc(pa, sizeof(char) * 11); else { tmp = pa = malloc(sizeof(char) * 11); pa_dyn = 1; } if (!tmp) { free(pa); pa = "Not Enough Memory"; pa_dyn = 0; return pa; } else pa = tmp; snprintf(pa, 11, "Infinity"); not_all_displayed = 0; } else if (isnan(result)) { // if it is not a number, print "Not a Number", regardless of format if (pa_dyn) tmp = realloc(pa, sizeof(char) * 13); else { tmp = pa = malloc(sizeof(char) * 13); pa_dyn = 1; } if (!tmp) { free(pa); pa = "Not Enough Memory"; pa_dyn = 0; return pa; } else pa = tmp; snprintf(pa, 13, "Not a Number"); not_all_displayed = 0; } else { char *curs; Dprintf("normal numbers (format: %s)\n", format); switch (conf.output_format) { /*{{{ */ case DECIMAL_FORMAT: { double junk; Dprintf("fabs = %f, conf.engineering = %i, conf.print_ints = %i\n", fabs(modf(result, &junk)), conf.engineering, conf.print_ints); /* This is the big call */ /* translation: if we don't have to handle the print_ints special case, * then we can just use the existing format. */ if (fabs(modf(result, &junk)) != 0.0 || !conf.print_ints) { snprintf(pa, 310, format, result); } else { /* this is the print_ints special case * (note that we strip trailing zeros) */ snprintf(pa, 310, "%1.0f", result); } Dprintf("pa (unlocalized): %s\n", pa); /* was it as good for you as it was for me? * now, you must localize it */ strswap('.',conf.dec_delimiter,pa); Dprintf("pa: %s\n", pa); switch (conf.rounding_indication) { case SIMPLE_ROUNDING_INDICATION: Dprintf("simple\n"); not_all_displayed = (modf(result * pow(10, decimal_places), &junk)) ? 1 : 0; break; case SIG_FIG_ROUNDING_INDICATION: Dprintf("sigfig\n"); if (sig_figs < UINT32_MAX) { unsigned int t = count_digits(pa); Dprintf("digits in pa: %u (%u)\n", t, sig_figs); if (pa[0] == '0' && pa[1] != '\0') { --t; } else if (pa[0] == '-' && pa[1] == '0') { --t; } not_all_displayed = (t < sig_figs); } else { not_all_displayed = 1; } break; default: case NO_ROUNDING_INDICATION: Dprintf("none\n"); not_all_displayed = 0; break; } } break; case HEXADECIMAL_FORMAT: curs = pa + (conf.print_prefixes ? 2 : 0); strswap('.',conf.dec_delimiter,pa); case OCTAL_FORMAT: curs = pa + (conf.print_prefixes ? 1 : 0); { long int temp = result; unsigned int t = 0; snprintf(pa, 310, format, temp); if (conf.rounding_indication == SIG_FIG_ROUNDING_INDICATION) { if (sig_figs < UINT32_MAX) { while (curs && *curs) { ++t; ++curs; } not_all_displayed = (t < sig_figs); } else { not_all_displayed = 0; } } else { not_all_displayed = 0; } } strswap('.',conf.dec_delimiter,pa); break; case BINARY_FORMAT: { int i, place = -1; // if it is binary, format it, and print it // first, find the upper limit for (i = 1; place == -1; ++i) { if (result < pow(2.0, i)) place = i - 1; } pa = calloc(sizeof(char), (place + (conf.print_prefixes * 2) + 1)); if (!pa) { pa = "Not Enough Memory"; pa_dyn = 0; return pa; } if (conf.print_prefixes) { pa[0] = '0'; pa[1] = 'b'; } // print it { double temp = result; for (i = conf.print_prefixes * 2; place >= 0; ++i) { double t = pow(2.0, place); if (temp >= t) { pa[i] = '1'; temp -= t; } else { pa[i] = '0'; } --place; } } pa[i + 1] = 0; if (sig_figs < UINT32_MAX) { if (conf.rounding_indication == SIG_FIG_ROUNDING_INDICATION) { not_all_displayed = count_digits(pa + (conf.print_prefixes ? 2 : 0)) < sig_figs; } else { not_all_displayed = 0; } } else { not_all_displayed = 0; } strswap('.',conf.dec_delimiter,pa); } // binary format } /*}}} */ } // if if (conf.print_commas) { char *str = add_commas(pa, conf.output_format); if (str) { free(pa); pa = str; } } if (standard_output) { if (errstring && strlen(errstring)) { display_and_clear_errstring(); } printf("%s%s\n", conf.print_equal ? (not_all_displayed ? "~= " : " = ") : (not_all_displayed ? "~" : ""), pa); } return pa; } /*}}} */ char *print_this_result(const Number result) { /*{{{ */ extern char *errstring; unsigned int base = 0; Dprintf("print_this_result (%f) in format %i\n", num_get_d(result), conf.output_format); // output in the proper base and format switch (conf.output_format) { case HEXADECIMAL_FORMAT: base = 16; break; default: case DECIMAL_FORMAT: // if you want precision_guard and automatic precision, // then we have to go with the tried and true "double" method // ... unless it's an int and you want ints printed whole // I know that DBL_EPSILON can be calculated like so: // 2^(mpfr_get_prec(result)-1) HOWEVER, printf magically handles // numbers like 5.1 that I don't even wanna begin to think about if (conf.precision_guard && conf.precision < 0) { Dprintf("precision guard and automatic precision\n"); if (!conf.print_ints || !is_int(result)) { Dprintf("no print_ints or it isn't an int\n"); //XXX: what is the following if() for? //if (mpfr_get_d(result, GMP_RNDN) != //mpfr_get_si(result, GMP_RNDN)) { double res = num_get_d(result); if (fabs(res) < DBL_EPSILON) { res = 0.0; } return print_this_result_dbl(res); //} } } base = 10; break; case OCTAL_FORMAT: base = 8; break; case BINARY_FORMAT: base = 2; break; } if (pa != NULL) { free(pa); } not_all_displayed = 0; pa = num_to_str_complex(result, base, conf.engineering, conf.precision, conf.print_prefixes, ¬_all_displayed); Dprintf("not_all_displayed = %i\n", not_all_displayed); /* now, decide whether it's been rounded or not */ if (num_is_inf(result) || num_is_nan(result)) { // if it is infinity, it's all there ;) not_all_displayed = 0; } else if (not_all_displayed == 0) { /* rounding guess */ switch (conf.rounding_indication) { case SIMPLE_ROUNDING_INDICATION: { char *pa2, junk; Dprintf("simple full\n"); pa2 = num_to_str_complex(result, base, conf.engineering, -2, conf.print_prefixes, &junk); not_all_displayed = (strlen(pa) < strlen(pa2)); free(pa2); } break; case SIG_FIG_ROUNDING_INDICATION: /* sig_figs is how many we need to display */ Dprintf("sigfig full\n"); if (sig_figs < UINT32_MAX) { unsigned int t = count_digits(pa); Dprintf("digits in pa: %u (%u)\n", t, sig_figs); not_all_displayed = (t < sig_figs); } else { not_all_displayed = 0; } break; default: case NO_ROUNDING_INDICATION: Dprintf("none full\n"); not_all_displayed = 0; break; } } if (conf.rounding_indication == NO_ROUNDING_INDICATION) { not_all_displayed = 0; } strswap('.',conf.dec_delimiter,pa); // add commas if (conf.print_commas) { char *str = add_commas(pa, conf.output_format); if (str) { free(pa); pa = str; } } if (standard_output) { if (errstring && strlen(errstring)) { display_and_clear_errstring(); } printf("%s%s\n", conf.print_equal ? (not_all_displayed ? "~= " : " = ") : (not_all_displayed ? "~" : ""), pa); } return pa; } /*}}} */ void simple_exp(Number output, const Number first, const enum operations op, const Number second) { /*{{{ */ if (compute) { Number temp; num_init(temp); Dprintf("simple_exp: %f %i %f\n", num_get_d(first), op, num_get_d(second)); switch (op) { default: num_set_d(output, 0.0); break; case wequal: num_set_ui(output, num_is_equal(first, second)); break; case wnequal: num_set_ui(output, !num_is_equal(first, second)); break; case wgt: num_set_ui(output, num_is_greater(first, second)); break; case wlt: num_set_ui(output, num_is_less(first, second)); break; case wgeq: num_set_ui(output, num_is_greaterequal(first, second)); break; case wleq: num_set_ui(output, num_is_lessequal(first, second)); break; case wplus: num_add(output, first, second); break; case wminus: num_sub(output, first, second); break; case wmult: num_mul(output, first, second); break; case wdiv: num_div(output, first, second); break; case wpow: num_pow(output, first, second); break; case wor: num_set_ui(output, (!num_is_zero(first)) || (!num_is_zero(second))); break; case wand: num_set_ui(output, (!num_is_zero(first)) && (!num_is_zero(second))); break; case wbor: num_bor(output, first, second); break; case wband: num_band(output, first, second); break; case wbxor: num_bxor(output, first, second); break; case wlshft: num_set_ui(temp, 2); num_pow(temp, temp, second); num_mul(output, first, temp); break; case wrshft: num_set_ui(temp, 2); num_pow(temp, temp, second); num_div(output, first, temp); if (is_int(first)) { num_trunc(output, output); } break; case wmod: if (num_is_zero(second)) { num_set_nan(output); } else { /* divide, round to zero, multiply, subtract * * in essence, find the value x in the equation: * first = second * temp + x */ num_div(output, first, second); if (conf.c_style_mod) { num_rintz(output, output); // makes zeros work } else { if (num_sign(first) >= 0) { num_floor(output, output); } else { num_ceil(output, output); } } num_mul(output, output, second); num_sub(output, first, output); } break; } Dprintf("returns: %f\n", num_get_d(output)); num_free(temp); return; } else { num_set_ui(output, 0); return; } } /*}}} */ void uber_function(Number output, const enum functions func, Number input) { /*{{{ */ if (compute) { Number temp; num_init(temp); if (!conf.use_radians) { switch (func) { case wsin: case wcos: case wtan: case wcot: case wsec: case wcsc: num_const_pi(temp); num_mul(input, input, temp); num_div_ui(input, input, 180); break; case wasin: case wacos: case watan: case wacot: case wasec: case wacsc: num_const_pi(temp); num_pow_si(temp, temp, -1); num_mul_ui(temp, temp, 180); break; default: break; } } switch (func) { case wsin: num_sin(output, input); break; case wcos: num_cos(output, input); break; case wtan: num_tan(output, input); break; case wcot: num_cot(output, input); break; case wsec: num_sec(output, input); break; case wcsc: num_csc(output, input); break; case wasin: num_asin(output, input); if (!conf.use_radians) { num_mul(output, output, temp); } break; case wacos: num_acos(output, input); if (!conf.use_radians) { num_mul(output, output, temp); } break; case watan: num_atan(output, input); if (!conf.use_radians) { num_mul(output, output, temp); } break; case wacot: num_pow_si(output, input, -1); num_atan(output, output); if (!conf.use_radians) { num_mul(output, output, temp); } break; case wasec: num_pow_si(output, input, -1); num_acos(output, output); if (!conf.use_radians) { num_mul(output, output, temp); } break; case wacsc: num_pow_si(output, input, -1); num_asin(output, output); if (!conf.use_radians) { num_mul(output, output, temp); } break; case wsinh: num_sinh(output, input); break; case wcosh: num_cosh(output, input); break; case wtanh: num_tanh(output, input); break; case wcoth: num_coth(output, input); break; case wsech: num_sech(output, input); break; case wcsch: num_csch(output, input); break; case wasinh: num_asinh(output, input); break; case wacosh: num_acosh(output, input); break; case watanh: num_atanh(output, input); break; case wacoth: num_acoth(output, input); break; case wasech: num_asech(output, input); break; case wacsch: num_acsch(output, input); break; case wlog: num_log10(output, input); break; case wlogtwo: num_log2(output, input); break; case wln: num_log(output, input); break; case wround: num_rint(output, input); break; case wneg: num_neg(output, input); break; case wnot: num_set_ui(output, num_is_zero(input)); break; case wabs: num_abs(output, input); break; case wsqrt: num_sqrt(output, input); break; case wfloor: num_floor(output, input); break; case wceil: num_ceil(output, input); break; case wrand: while (num_random(output) != 0) ; num_mul(output, output, input); if (num_cmp_si(input, 0) < 0) { num_mul_si(output, output, -1); } break; case wirand: while (num_random(output) != 0) ; num_mul(output, output, input); if (num_cmp_si(input, 0) < 0) { num_mul_si(output, output, -1); } num_rint(output, output); break; case wcbrt: num_cbrt(output, input); break; case wexp: num_exp(output, input); break; case wfact: num_factorial(output, num_get_ui(input)); break; case wcomp: num_comp(output, input); break; #ifdef HAVE_MPFR_22 case weint: num_eint(output, input); break; #endif case wgamma: num_gamma(output, input); break; #ifdef HAVE_MPFR_22 case wlngamma: num_lngamma(output, input); break; #endif case wzeta: num_zeta(output, input); break; case wsinc: num_sinc(output, input); break; case wbnot: num_bnot(output, input); break; default: num_set(output, input); break; } num_free(temp); return; } else { num_set_ui(output, 0); return; } } /*}}} */ char *output_string(const unsigned int o) { /*{{{ */ switch (o) { case HEXADECIMAL_FORMAT: return "hexadecimal format (0xf)"; case OCTAL_FORMAT: return "octal format (08) "; case BINARY_FORMAT: return "binary format (0b1) "; case DECIMAL_FORMAT: return "decimal format (9) "; default: return "error, unknown format "; } } /*}}} */ wcalc-2.4/calculator.h0000644000175000000620000000570411100720477013244 0ustar kkstaff/* * calculator.h * Wcalc * * Created by Kyle Wheeler on Thu Feb 07 2002. * Copyright (c) 2001 Kyle Wheeler. All rights reserved. * */ #ifndef WCALC_CALCULATOR_H #define WCALC_CALCULATOR_H #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "definitions.h" #include "number.h" #ifdef EBUG #include #define Dprintf(fmt, ...) \ fprintf(stderr, "[%s:%d] " fmt, __FILE__, __LINE__, ##__VA_ARGS__); \ fflush(stderr); #else #define Dprintf(...) ; #endif enum functions { wnot, wbnot, wsin, wcos, wtan, wcot, wsec, wcsc, wasin, wacos, watan, wacot, wasec, wacsc, wsinh, wcosh, wtanh, wcoth, wsech, wcsch, wasinh, wacosh, watanh, wacoth, wasech, wacsch, wlog, wlogtwo, wln, wround, wneg, wabs, wsqrt, wfloor, wceil, wrand, wirand, wexp, wfact, wcomp, weint, wgamma, wlngamma, wzeta, wsinc, wcbrt }; enum operations { wplus, wminus, wmult, wdiv, wmod, wpow, wor, wbor, wbxor, wand, wband, wequal, wnequal, wgt, wlt, wrshft, wlshft, wgeq, wleq, wnone }; enum commands { redisplay, nothing }; enum engineering_modes { always, never, automatic }; void parseme(const char *); void report_error(const char * fmt, ...); void display_and_clear_errstring(void); void set_prettyanswer(const Number num); char *print_this_result(const Number result); void uber_function(Number output, const enum functions func, Number input); void simple_exp(Number output, const Number first, const enum operations op, const Number second); int seed_random(void); char *output_string(const unsigned int); struct _conf { int precision; enum engineering_modes engineering:2; unsigned int picky_variables:1; unsigned int use_radians:1; unsigned int output_format:4; unsigned int print_prefixes:1; unsigned int rounding_indication:4; unsigned int remember_errors:1; char thou_delimiter; char dec_delimiter; char in_thou_delimiter; char in_dec_delimiter; unsigned int precision_guard:1; unsigned int history_limit:1; unsigned long history_limit_len; unsigned int print_equal:1; unsigned int print_ints:1; unsigned int simple_calc:1; unsigned int verbose:1; unsigned int print_commas:1; unsigned int live_precision:1; unsigned int c_style_mod:1; }; /* configuration */ extern struct _conf conf; /* results */ extern Number last_answer; extern char *pretty_answer; /* communication with parser */ extern char compute; extern unsigned int sig_figs; /* communication with the frontend */ extern char standard_output; extern char not_all_displayed; #define DECIMAL_FORMAT 0 #define OCTAL_FORMAT 1 #define HEXADECIMAL_FORMAT 2 #define BINARY_FORMAT 3 #define NO_ROUNDING_INDICATION 0 #define SIMPLE_ROUNDING_INDICATION 1 #define SIG_FIG_ROUNDING_INDICATION 2 #endif wcalc-2.4/ChangeLog0000664000175000000620000026005311101144524012510 0ustar kkstaff2008-10-26 14:22 memoryhole * AboutBoxController.m: depend on definitions.h 2008-10-26 14:22 memoryhole * WcalcController.h, WcalcController.m: alternate input decimal and thousand separators... this is to handle the pathological case where input needs to be from one nationality and output needs to be in another; also fixed display size adjusting 2008-10-25 17:04 memoryhole * WcalcController.m: use 10.4+ method of fetching thousands separator and dec separator 2008-10-25 16:41 memoryhole * number.h: make binary operations (bor, band, bxor) use a less surprising rounding mode when operating on non-integers 2008-10-25 16:38 memoryhole * number.c: make is_int simpler and stop relying on string manipulation 2008-10-25 16:35 memoryhole * calculator.c: truncate right-shifts only if we were working with an integer to begin with 2008-10-25 16:34 memoryhole * number_formatting.c: fix typo 2008-10-25 16:34 memoryhole * add_commas.c: behave correctly if separator is nil 2008-10-12 00:34 memoryhole * .cvsignore: remove generated files from .cvsignore 2008-10-12 00:33 memoryhole * English.lproj/.DS_Store: DS_Store 2008-10-12 00:32 memoryhole * calculator.c: simplifying previous rshift solution with trunc 2008-10-12 00:31 memoryhole * aclocal.m4, config.h.in, configure, ylwrap: removing generated files from cvs 2008-10-12 00:26 memoryhole * .cvsignore, English.lproj/.cvsignore: tidying 2008-10-12 00:19 memoryhole * number.c, number.h: less complicated solution to the problem: just use trunccalculator.c 2008-10-12 00:09 memoryhole * Makefile.am, Makefile.in, configure.in, ylwrap, English.lproj/Makefile.am: better build system 2008-10-10 16:43 memoryhole * calculator.c: use num_rshift instead of hand work, because we need the numbers to be truncated correctly 2008-10-10 16:41 memoryhole * number.c, number.h: num_rshift to truncate bits correctly 2008-10-10 16:38 memoryhole * number_formatting.c: avoid a stupid segfault 2008-08-24 15:27 memoryhole * explain.c, isconst.c: minor fix, and added a warning to remind myself of an idea 2008-08-24 15:03 memoryhole * explain.c: revamped isconst makes it easier to handle this symbolically, and allows the compiler to notice missing explanations... added a few missing explanations 2008-08-24 15:01 memoryhole * scanner.l, extract_vars.c: deal with new isconst correctly 2008-08-24 15:01 memoryhole * isconst.c, isconst.h, main.c: fix the engineering flag (oops) and expand the power of isconst() 2008-06-17 08:22 memoryhole * calculator.c: localizing the output was getting skipped in some circumstances 2008-05-13 16:38 memoryhole * list.h: declaring inline in a header file is pointless, and with SunStudio's compiler, harmful 2008-05-13 16:28 memoryhole * configure.in: remove solaris bodge (have generic isinf/isnan workaround), but add AC_C_INLINE 2008-05-13 16:27 memoryhole * calculator.c: isinf/isnan nonexistence fixes 2008-03-30 23:47 memoryhole * Makefile.am: enable "make dist" 2008-03-30 23:25 memoryhole * main.c: pref reading shouldn't require a space between the key and the equals sign 2008-02-20 14:09 memoryhole * main.c, scanner.l: add tab-completion of new engineering modes 2008-02-20 14:08 memoryhole * explain.c: make explanations of commands tolerant of missing backslash 2008-02-17 18:26 memoryhole * ChangeLog, NEWS, README, Wcalc-nonFHS.pmproj, Wcalc.pmproj, aclocal.m4, configure, Wcalc.xcodeproj/kyle.mode1, Wcalc.xcodeproj/kyle.pbxuser, Wcalc.xcodeproj/project.pbxproj: 2.3.1 2008-02-17 18:06 memoryhole * acinclude.m4: better readline history detection 2008-02-17 18:05 memoryhole * number_formatting.c: fix a compiler warning 2008-02-17 18:04 memoryhole * WcalcController.h, WcalcController.m: straightening out the eng pref 2008-02-12 13:03 memoryhole * WcalcController.m: fixed the backwards compatability logic 2008-02-08 16:03 memoryhole * main.c, wcalc.1: accept input from wcalc_input envariable 2008-02-08 13:42 memoryhole * wcalc.1: correct engineering mode documentation 2008-02-08 13:42 memoryhole * number_formatting.c: make engineering output truncate results if the precision is auto 2008-02-08 13:20 memoryhole * main.c, parser.y, scanner.l, wcalc.1: make the engineering configuration consistent (and DOCUMENTED) 2008-02-08 12:57 memoryhole * WcalcController.h, WcalcController.m, calculator.c, calculator.h, main.c, number_formatting.c, number_formatting.h, parser.y, English.lproj/MainMenu.nib/classes.nib, English.lproj/MainMenu.nib/info.nib, English.lproj/MainMenu.nib/keyedobjects.nib, Wcalc.xcodeproj/kyle.mode1, Wcalc.xcodeproj/kyle.pbxuser, Wcalc.xcodeproj/project.pbxproj: Make engineering mode a three-way toggle between "always", "never", and "auto" 2008-02-08 12:56 memoryhole * conversion.h: ssize_t headers 2008-02-04 14:02 memoryhole * scanner.l: be more careful about running off the end of yytext 2008-02-04 09:35 memoryhole * README: stupid typo 2007-12-05 12:07 memoryhole * scanner.l: accept @NaN@ and @Inf@ 2007-12-05 12:06 memoryhole * number.h: inf 2007-08-27 15:55 memoryhole * number.c, number.h: vastly expanded non-mpfr functions... dont quite work right yet, but its almost there 2007-08-27 15:53 memoryhole * number_formatting.c, number_formatting.h: another stab at mpfr-independence 2007-08-27 15:52 memoryhole * string_manip.c: making splint happy 2007-08-27 15:50 memoryhole * list.c, list.h, main.c: attempting to make splint happy 2007-08-27 15:48 memoryhole * files.c, help.c: remove pointless mpfr dependency 2007-08-27 15:47 memoryhole * explain.c, extract_vars.c, extract_vars.h, iscmd.c, isconst.c, isconst.h, isfunc.c: make splint happy 2007-08-27 15:43 memoryhole * conversion.c, conversion.h: use ssize_t instead of smaller ints 2007-08-27 15:42 memoryhole * calculator.h: fix signs and remove gratuitous randstate 2007-08-27 15:40 memoryhole * add_commas.c, add_commas.h: correct conversions and handle out of memory, add splint notation 2007-08-24 17:35 memoryhole * ChangeLog: [no log message] 2007-08-24 17:27 memoryhole * WcalcController.m, English.lproj/MainMenu.nib/keyedobjects.nib, Wcalc.xcodeproj/kyle.mode1, Wcalc.xcodeproj/kyle.pbxuser: comp, fact, exp, and sinc were missing from the GUI 2007-08-24 17:27 memoryhole * explain.c: sinc and exp were missing documentation 2007-08-24 16:50 memoryhole * Info.plist, Makefile.in, aclocal.m4, configure, configure.in, definitions.h, English.lproj/InfoPlist.strings, English.lproj/MainMenu.nib/classes.nib, English.lproj/MainMenu.nib/info.nib, English.lproj/MainMenu.nib/keyedobjects.nib, Wcalc.xcodeproj/kyle.mode1, Wcalc.xcodeproj/kyle.pbxuser, Wcalc.xcodeproj/project.pbxproj: version bump to 2.3.1, and some minor changes to make compiling easier 2007-08-23 15:53 memoryhole * WcalcController.h, WcalcController.m: make prefs behave themselves (sync on quit and on closing the prefs window) and restore the maxPrecisionValue from the saved pref on awakeFromNib 2007-08-23 13:36 memoryhole * MyTextField.m: handle maliciousness and weirdness a bit better. delete and backspace are now synonyms for CLEAR 2007-08-23 13:35 memoryhole * simpleCalc.c: handle input number formatting properly (commas, periods, internationalization, etc.) 2007-08-22 18:11 memoryhole * test.simple: correct the test for FORTRAN-style ** 2007-08-22 18:10 memoryhole * MyTextField.m, WcalcController.m, simpleCalc.c, simpleCalc.h: major overhaul of the simpleCalc subsystem, to make it more robust. still needs work to handle quasi-malicious users, but it already works better than it used to (no crashing!) 2007-08-22 15:51 memoryhole * WcalcController.m: correct interface glitch when resizing windows that have already been resized 2007-08-22 14:51 memoryhole * WcalcController.m: correct interface glitch when setting bit precision 2007-08-22 14:39 memoryhole * WcalcController.m: removed debugging printouts 2007-08-22 14:29 memoryhole * scanner.l: converting ** back into FORTRAN-style exponent notation 2007-08-22 14:21 memoryhole * WcalcController.h, WcalcController.m, English.lproj/MainMenu.nib/classes.nib, English.lproj/MainMenu.nib/info.nib, English.lproj/MainMenu.nib/keyedobjects.nib: Fix display when going back from extreme sizes. Also, added slider-max preference 2007-08-14 12:50 memoryhole * parser.y, test.simple: fix squaring syntax errors (e.g. 2**3 = 12) 2007-08-02 21:01 memoryhole * README, wcalc.1: update for GPLv2+ compatability 2007-08-02 20:51 memoryhole * COPYRIGHT: update for GPLv2+ compatability 2007-07-21 01:02 memoryhole * ChangeLog, NEWS, README: version 2.3 commit 2007-07-21 00:53 memoryhole * Wcalc-nonFHS.pmproj, Wcalc.pmproj, Wcalc.xcodeproj/kyle.mode1, Wcalc.xcodeproj/kyle.pbxuser: [no log message] 2007-07-20 22:46 memoryhole * Wcalc.xcodeproj/: kyle.mode1, kyle.pbxuser, project.pbxproj: [no log message] 2007-07-20 22:44 memoryhole * parser.y: removed compiler warning 2007-07-20 22:43 memoryhole * number_formatting.c: whitespace changes and some signedness tidiness 2007-07-20 22:42 memoryhole * number.h: might not be necessary, but added mp_prec_t 2007-07-20 22:42 memoryhole * number.c: fixed a compiler warning about signedness 2007-07-20 22:41 memoryhole * historyManager.c, historyManager.h: why go unsigned long when you can go size_t? 2007-07-20 22:39 memoryhole * extract_vars.c: minor cleanup for readability (str -> peekstr) 2007-07-20 22:39 memoryhole * explain.c: minor cleanup for readability (str -> curstr) 2007-07-20 22:37 memoryhole * conversion.c, files.c: fixed a signed/unsigned issue 2007-07-20 17:57 memoryhole * calculator.c: use the strswap function instead of duplicating code 2007-07-20 17:52 memoryhole * WcalcController.m: removed symbol conflict (exp -> expr), and removed signed/unsigned comparisons 2007-07-20 17:49 memoryhole * MyTextField.m, PersVarList.m: removed symbol conflict (exp -> expr) 2007-07-20 17:49 memoryhole * HistoryList.m, VariableList.m: removed symbol conflict (index -> theIndex) 2007-07-20 14:46 memoryhole * Info.plist, WcalcService.h, WcalcService.m, main.m, English.lproj/InfoPlist.strings, English.lproj/MainMenu.nib/classes.nib, English.lproj/MainMenu.nib/info.nib, English.lproj/MainMenu.nib/keyedobjects.nib: WcalcService 2007-07-20 14:44 memoryhole * WcalcController.h, WcalcController.m: change the menu display when the keyboard appears and disappears 2007-07-17 12:55 memoryhole * calculator.c, calculator.h: made the inputs const 2007-07-17 12:53 memoryhole * main.c: added --dec, --hex, --bin, and --oct, because I keep trying to use them anyway 2007-07-17 12:51 memoryhole * variables.c, variables.h, number.c, number.h, evalvar.c, evalvar.h, explain.c, explain.h, files.c, files.h, iscmd.c, iscmd.h, isconst.c, isconst.h, isfunc.c, isfunc.h, conversion.c, conversion.h: made the inputs const 2007-07-17 12:50 memoryhole * add_commas.c, add_commas.h, string_manip.c, string_manip.h: made the inputs const, and switched to using offsets rather than pointer arithmetic 2007-07-17 09:49 memoryhole * number_formatting.c: testing against both 0 and length because length is unsigned 2007-07-17 01:38 memoryhole * test.simple: 100! now has an answer too 2007-07-17 01:37 memoryhole * number_formatting.c: avoid using pointers when possible in zero_strip, for tighter code 2007-07-17 01:36 memoryhole * number.c: made is_int() more reliable in the face of excess precision (e.g. 100!) 2007-07-17 01:36 memoryhole * main.c: increased buffer sizes and removed overflow in config file 2007-07-17 00:14 memoryhole * scanner.l: allow initial zero on exponent in hex 2007-07-17 00:12 memoryhole * scanner.l: allow initial zero on exponent in big ugly 2007-07-17 00:04 memoryhole * test.simple: add test for variable expansion precision bug 2007-07-17 00:03 memoryhole * calculator.c: use full-precision for estimating simple rounding (more likely to warn of rounding in all relevant cases) 2007-07-17 00:02 memoryhole * number_formatting.c: fix variable expansion by adding a full-precision formatter 2007-07-17 00:01 memoryhole * calculator.c: comment documenting last change 2007-07-16 23:59 memoryhole * calculator.c: request a full-precision number 2007-07-16 18:25 memoryhole * English.lproj/MainMenu.nib/: classes.nib, info.nib, keyedobjects.nib: misc minor tweaks 2007-07-16 18:24 memoryhole * conversion.c: correcting and expanding, refactoring unit list, added pressure and angle. 2007-07-16 18:23 memoryhole * conversion.h: correcting and expanding unit list, added pressure and angle. 2007-07-16 18:22 memoryhole * InspectorController.m: whitespace 2007-07-16 18:21 memoryhole * ConversionList.m: angle and pressure 2007-07-16 18:21 memoryhole * WcalcController.m: fixed the inspector-window-quits-program bug 2007-07-16 18:19 memoryhole * scanner.l: minor cleanup 2007-07-16 18:18 memoryhole * number_formatting.c: remove a debug warning 2007-07-16 18:18 memoryhole * main.m: fewer dependencies 2007-07-11 16:32 memoryhole * calculator.c, explain.c, main.c, number.c, number.h, scanner.l: fixing a few warnings 2007-07-11 16:20 memoryhole * WcalcController.m: the bohr radius notation is a0, not ao 2007-07-11 16:18 memoryhole * calculator.c: pad "output_string" output with spaces to make formatting of prefs listing more predictable 2007-07-11 16:17 memoryhole * wcalc.1: missing a few commands 2007-07-11 16:17 memoryhole * definitions.h: fixing the units on the bohr radius 2007-07-11 16:16 memoryhole * scanner.l: the bohr radius notation is a0, not ao 2007-07-11 16:15 memoryhole * parser.y: improved formatting of prefs listing 2007-07-11 15:57 memoryhole * parser.y: moved number.h include, made prefs listing more useful 2007-07-10 18:13 memoryhole * number_formatting.c: fixed the assumption that the output of mpfr_get_string is greater than exp 2007-07-10 18:13 memoryhole * number.c: strlen() include 2007-07-10 18:07 memoryhole * number.c: fixed some really sloppy code (avoiding a buffer overrun) 2007-04-05 23:54 memoryhole * wcalc.1, explain.c, isconst.c: bohr 2007-04-05 10:25 memoryhole * conversion.c: more kph synonyms 2007-02-25 20:09 memoryhole * Makefile.am, Makefile.in, MyTextField.h, VariableList.m, WcalcController.m, calculator.c, conversion.c, conversion.h, evalvar.c, historyManager.c, historyManager.h, isfunc.c, main.c, number.c, number.h, parser.y, scanner.l, simpleCalc.c, variables.c, variables.h: abstracted mpfr out... mostly 2007-02-25 17:25 memoryhole * main.c, parser.y, variables.c, variables.h: efficiency on listvars, and varname completion 2007-02-25 17:25 memoryhole * explain.c: fix explain to handle whitespace 2007-02-25 16:49 memoryhole * parser.y: removed error-verbose because its now unnecessary 2007-01-16 23:28 memoryhole * main.c: completion-speed 2007-01-05 17:26 memoryhole * Info.plist, configure, configure.in, definitions.h, parser.y, scanner.l, English.lproj/MainMenu.nib/classes.nib, English.lproj/MainMenu.nib/info.nib, English.lproj/MainMenu.nib/keyedobjects.nib, Wcalc.xcodeproj/kyle.mode1, Wcalc.xcodeproj/kyle.pbxuser, Wcalc.xcodeproj/project.pbxproj: fix a bug introduced with the better error reporting, and tidy up a little in scanner.l 2007-01-05 16:41 memoryhole * calculator.c, calculator.h, main.c, parser.y, scanner.l: better error reporting 2006-12-28 23:51 memoryhole * scanner.l: fixed error reporting on malformed numbers 2006-12-28 23:50 memoryhole * parser.y: verbose errors (kinda cool) 2006-12-28 23:38 memoryhole * main.c: formatting 2006-12-26 11:22 memoryhole * main.c: minor tidying, added "to" to the conversion completion 2006-12-26 11:15 memoryhole * main.c: quietly conform a little more closely to command-line syntax in the rc file 2006-12-26 11:14 memoryhole * isconst.c, isfunc.c: optimized (this stuff is const) 2006-12-26 11:13 memoryhole * NEWS, main.c: TAB COMPLETION!!! 2006-12-26 11:13 memoryhole * explain.c: be more helpful when called alone 2006-12-26 11:11 memoryhole * Makefile.am, Makefile.in, iscmd.c, iscmd.h, conversion.c, conversion.h: preparing for tab-completion 2006-12-26 09:31 memoryhole * scanner.l: more forgiving about whitespace 2006-09-13 16:18 memoryhole * Makefile.am: no gcc-specific flags 2006-08-01 09:13 memoryhole * parser.y: better error messages 2006-08-01 09:06 memoryhole * scanner.l: more tolerant (and convenient) parsing for commands that take digits as arguments 2006-07-17 17:18 memoryhole * list.c: fixed a problem removing things from the List datastructure 2006-07-10 19:34 memoryhole * WcalcController.m: observe only the main window with the quit: selector, not ALL windows (Marco Thill) 2006-07-10 01:14 memoryhole * ChangeLog: [no log message] 2006-07-10 00:25 memoryhole * README, Wcalc-nonFHS.pmproj, Wcalc.pmproj, English.lproj/MainMenu.nib/classes.nib, English.lproj/MainMenu.nib/info.nib, English.lproj/MainMenu.nib/keyedobjects.nib, Wcalc.xcodeproj/kyle.mode1, Wcalc.xcodeproj/kyle.pbxuser: just a touch 2006-07-09 23:59 memoryhole * WcalcController.m: more memory tidying 2006-07-09 23:46 memoryhole * WcalcController.m: declaring the mutex 2006-07-09 23:14 memoryhole * ConversionList.m, ErrorController.m, HistoryList.m, InspectorController.m, MyTextField.m, OldVariableList.m, PersVarList.m, VariableList.m, add_commas.c, conversion.c, evalvar.c, explain.c, extract_vars.c, historyManager.c, isconst.c, isfunc.c, list.c, main.m, memwatch.c, memwatch.h, parser.y, scanner.l, simpleCalc.c, string_manip.c, theDelegate.m, variables.c: MEMWATCH 2006-07-09 23:10 memoryhole * WcalcController.h: added quit function 2006-07-09 23:10 memoryhole * WcalcController.m: memory cleanup, mutex-protecting the change-precision slider, MEMWATCH 2006-07-09 23:06 memoryhole * calculator.c: memory cleanup, MEMWATCH 2006-07-09 23:03 memoryhole * explain.c: explain cmod 2006-07-09 22:55 memoryhole * main.c, files.c: memory cleanup, MEMWATCH 2006-07-09 22:53 memoryhole * number_formatting.c, number_formatting.h: some consts, MEMWATCH 2006-07-09 22:50 memoryhole * test.simple: 0.9e-9 test cases 2006-07-09 22:48 memoryhole * help.c: better details 2006-07-09 22:03 memoryhole * AboutBoxController.m: MEMWATCH 2006-07-09 21:58 memoryhole * Info.plist, README, English.lproj/InfoPlist.strings, Wcalc.xcodeproj/kyle.mode1, Wcalc.xcodeproj/kyle.pbxuser, Wcalc.xcodeproj/project.pbxproj: version, prerelease commit 2.2.2 2006-07-09 21:37 memoryhole * ChangeLog: [no log message] 2006-07-09 21:10 memoryhole * configure, configure.in, definitions.h: new version 2006-07-09 21:09 memoryhole * test.simple, English.lproj/MainMenu.nib/classes.nib, English.lproj/MainMenu.nib/info.nib, English.lproj/MainMenu.nib/keyedobjects.nib, Wcalc.xcodeproj/kyle.mode1, Wcalc.xcodeproj/kyle.pbxuser, Wcalc.xcodeproj/project.pbxproj: [no log message] 2006-07-09 21:08 memoryhole * wcalc.1: added c_style_mod pref keyword 2006-07-09 21:06 memoryhole * parser.y, scanner.l: added \cmod command 2006-07-09 21:04 memoryhole * main.c: added live precision toggle, % style prefs, and the c_style_mod pref keyword 2006-07-09 21:02 memoryhole * number_formatting.c: eliminate the negative zeros 2006-07-09 21:00 memoryhole * calculator.c, calculator.h: added live precision toggle, % style prefs 2006-07-09 20:57 memoryhole * WcalcController.h, WcalcController.m: added live precision toggle, % style prefs, improved the prefs versioning, and fixed some whitespace 2006-07-09 18:55 memoryhole * Makefile.am, Makefile.in: dont need optimization by default 2006-04-21 15:28 memoryhole * acinclude.m4, aclocal.m4, configure: better history detection 2006-04-12 16:54 memoryhole * parser.y: this was backwards 2006-04-12 16:54 memoryhole * calculator.c: probably faster 2006-03-20 18:27 memoryhole * calculator.c: make mod (%) efficient 2006-03-09 21:08 memoryhole * scanner.l: fixes the 0.9e-9 bug, and enables exponents and decimals and such on the other bases 2006-03-09 21:07 memoryhole * add_commas.c: fixes the exponent brokenness 2006-03-09 21:04 memoryhole * string_manip.c: now handles of hex exponents 2006-03-02 19:58 memoryhole * English.lproj/MainMenu.nib/: info.nib, keyedobjects.nib: no printing, and standardize the appearance of some windows 2006-03-02 07:35 memoryhole * WcalcController.m: keyboard is now a one-click affair 2006-03-02 07:35 memoryhole * English.lproj/MainMenu.nib/: info.nib, keyedobjects.nib: Preloaded Variables buttons, renamed the menu item, added more auto-save names 2006-03-01 13:10 memoryhole * HistoryList.h, HistoryList.m, VariableList.h, VariableList.m, English.lproj/MainMenu.nib/classes.nib, English.lproj/MainMenu.nib/info.nib, English.lproj/MainMenu.nib/keyedobjects.nib, Wcalc.xcodeproj/kyle.mode1, Wcalc.xcodeproj/kyle.pbxuser: can copy from history/variable list. 2006-03-01 11:35 memoryhole * InspectorController.h, InspectorController.m, English.lproj/MainMenu.nib/classes.nib, English.lproj/MainMenu.nib/info.nib, English.lproj/MainMenu.nib/keyedobjects.nib, Wcalc.xcodeproj/kyle.mode1, Wcalc.xcodeproj/kyle.pbxuser: Inspector is now a panel 2006-03-01 09:42 memoryhole * Info.plist, NEWS, README, Wcalc-nonFHS.pmproj, Wcalc.pmproj, configure, English.lproj/InfoPlist.strings, English.lproj/MainMenu.nib/info.nib, English.lproj/MainMenu.nib/keyedobjects.nib, Wcalc.xcodeproj/kyle.mode1, Wcalc.xcodeproj/kyle.pbxuser: post-release commit 2006-03-01 08:15 memoryhole * configure.in, definitions.h, Wcalc.xcodeproj/kyle.mode1, Wcalc.xcodeproj/kyle.pbxuser, Wcalc.xcodeproj/project.pbxproj: incrementing version 2006-03-01 08:05 memoryhole * ChangeLog: [no log message] 2006-03-01 08:02 memoryhole * PersVarList.m, list.c: fix crash when theres an empty list 2006-02-28 21:03 memoryhole * ChangeLog: post-release commit 2006-02-28 20:52 memoryhole * Wcalc-nonFHS.pmproj: Releasing 2.2 2006-02-28 20:48 memoryhole * Wcalc.pmproj, Wcalc.xcodeproj/kyle.mode1, Wcalc.xcodeproj/kyle.pbxuser, README: Releasing 2.2 2006-02-28 20:27 memoryhole * wcalc.1: sinc 2006-02-28 20:22 memoryhole * parser.y: sinc 2006-02-28 20:16 memoryhole * definitions.h: sinc 2006-02-28 20:12 memoryhole * calculator.c, calculator.h, explain.c, isfunc.c, parser.y, scanner.l: sinc 2006-02-28 19:55 memoryhole * explain.c: explanations of Gamma, lnGamma, zeta, and K 2006-02-28 19:28 memoryhole * explain.c: added a \n 2006-02-28 09:21 memoryhole * isfunc.c, definitions.h, isconst.c, wcalc.1: new symbols 2006-02-28 01:57 memoryhole * ChangeLog: [no log message] 2006-02-28 01:29 memoryhole * English.lproj/MainMenu.nib/info.nib, English.lproj/MainMenu.nib/keyedobjects.nib, Wcalc.xcodeproj/kyle.mode1, Wcalc.xcodeproj/kyle.pbxuser: Preload Variables 2006-02-28 01:29 memoryhole * string_manip.c: avoiding string functions 2006-02-28 01:28 memoryhole * list.c: correct getListElement 2006-02-28 01:28 memoryhole * WcalcController.m: preload the preloaded variables 2006-02-28 01:26 memoryhole * VariableList.m: unused variable 2006-02-28 01:25 memoryhole * PersVarList.m: all the rest of the implementation 2006-02-27 20:26 memoryhole * calculator.c: rely on count_digits to do it right 2006-02-27 20:25 memoryhole * number_formatting.c: better truncation decisions 2006-02-27 20:24 memoryhole * scanner.l: more accurate sig-fig calculation 2006-02-27 20:12 memoryhole * string_manip.c: make count_digits aware of base (I think) 2006-02-26 19:55 memoryhole * HistoryList.m, InspectorController.h, InspectorController.m, PersVarList.h, PersVarList.m, README, VariableList.m, Wcalc.pmproj, WcalcController.h, WcalcController.m, w.png, English.lproj/MainMenu.nib/classes.nib, English.lproj/MainMenu.nib/info.nib, English.lproj/MainMenu.nib/keyedobjects.nib, Wcalc.xcodeproj/kyle.mode1, Wcalc.xcodeproj/kyle.pbxuser, Wcalc.xcodeproj/project.pbxproj: added the new functions, and a way to change the internal bitcount. partially through the preload stuff 2006-02-26 19:51 memoryhole * calculator.c: rounding needs more work 2006-02-26 19:45 memoryhole * variables.c: getrealnvar was totally broken 2006-02-26 19:42 memoryhole * scanner.l: forgiving capitalization of lnGamma 2006-02-26 19:41 memoryhole * list.c: getListElement was broken... dunno about this aliasing stuff 2006-02-26 19:39 memoryhole * add_commas.c: debug printf twiddle 2006-02-26 19:38 memoryhole * parser.y, evalvar.c: num_to_str changed 2006-02-26 19:37 memoryhole * number_formatting.c, number_formatting.h: some truncation hinting 2006-02-26 01:06 memoryhole * Makefile.in, aclocal.m4, config.h.in, configure: osx utils 2006-02-26 01:01 memoryhole * calculator.c, configure.in: better uj detect (use mpfr!) 2006-02-26 00:15 memoryhole * calculator.c: uj 2006-02-26 00:08 memoryhole * config.h.in, configure: new version 2006-02-25 23:48 memoryhole * configure.in: stupid library 2006-02-25 23:40 memoryhole * configure.in: GMPs broken MPFR library really irritates me sometimes 2006-02-23 13:35 memoryhole * calculator.c: wbnot was missing 2006-02-21 10:09 memoryhole * Makefile.in, aclocal.m4, configure: OSX tools 2006-02-21 10:07 memoryhole * historyManager.c: unnecessary function 2006-02-21 10:06 memoryhole * acinclude.m4: new URL 2006-02-21 10:06 memoryhole * configure.in: that extra dollar sign was making OpenBSD confused 2006-02-21 09:09 memoryhole * configure: new configure.in 2006-02-21 09:06 memoryhole * parser.y: typo 2006-02-21 09:05 memoryhole * conversion.c, conversion.h: plurals and non-plurals 2006-02-21 09:01 memoryhole * scanner.l: some units have periods 2006-02-20 10:28 memoryhole * conversion.c: more accurate foot-inches conversion 2006-02-20 10:27 memoryhole * list.c, list.h: unused-but-possibly-useful-someday function 2006-02-20 10:25 memoryhole * parser.y: whitespace 2006-02-20 10:11 memoryhole * parser.y: shift/reduce errors and more explanation of memory leak in error condition 2006-02-15 15:01 memoryhole * configure.in: better error message, more accurate requirements (for the moment) 2006-02-15 14:52 memoryhole * aclocal.m4, configure, Makefile.in, config.h.in: MacOS X 10.4.5 2006-02-15 14:47 memoryhole * calculator.c, scanner.l: work with older mpfr versions 2006-02-15 14:47 memoryhole * definitions.h: catalan constant if its missing from mpfr 2006-02-15 14:46 memoryhole * configure.in: detect a missing mpfr_sec function 2006-02-15 10:02 memoryhole * main.c: whitespace 2006-02-15 10:01 memoryhole * definitions.h: K (Catalan) 2006-02-15 09:59 memoryhole * WcalcController.h, calculator.h, conversion.h, variables.h, calculator.c: whitespace 2006-02-15 09:56 memoryhole * historyManager.c, isconst.c, isfunc.c, list.c, simpleCalc.c, string_manip.c, variables.c: whitespace 2006-02-15 09:53 memoryhole * add_commas.c, evalvar.c, explain.c, extract_vars.c: whitespace 2006-02-15 09:46 memoryhole * files.c: whitespace 2006-02-15 09:30 memoryhole * parser.y: comment explaining memory loss 2006-02-15 09:27 memoryhole * main.c: print errors in commandline 2006-02-15 09:16 memoryhole * calculator.c: memory leak in error condition 2006-02-15 09:01 memoryhole * parser.y, conversion.c: memory leak 2006-02-15 08:53 memoryhole * scanner.l: Gamma function rather than gamma to distinguish it from the Euler constant 2006-02-15 08:53 memoryhole * add_commas.c: fix memory overrun 2006-02-15 08:37 memoryhole * list.c: allocate the right thing 2006-02-15 08:34 memoryhole * extract_vars.c: strdup it so it can be safely freed 2006-02-15 08:28 memoryhole * main.c: just fixing an exit memory allocation (doesnt *really* matter) 2006-02-15 08:23 memoryhole * calculator.c: memory leak 2006-02-15 08:21 memoryhole * variables.c: memory leak (description) 2006-02-15 08:18 memoryhole * extract_vars.c: memory leak 2006-02-15 08:16 memoryhole * number_formatting.c: possible memory overwrite 2006-02-15 08:04 memoryhole * calculator.c, calculator.h, parser.y, scanner.l: secant, cosecant (and related functions), gamma, lngamma, zeta, catalan (K) and enhanced euler 2006-02-15 08:03 memoryhole * number_formatting.c: correct calloc syntax (does this matter?) 2006-02-15 08:02 memoryhole * add_commas.c: only numbers 2006-02-14 16:37 memoryhole * calculator.c: make the equal always in the second column 2006-02-14 16:36 memoryhole * add_commas.c: negatives 2006-02-14 10:31 memoryhole * calculator.c: a warning against bad thoughts 2006-02-14 09:42 memoryhole * parser.y: add_commas pref 2006-02-14 09:41 memoryhole * add_commas.c: debugging 2006-02-14 09:37 memoryhole * wcalc.1: descriptions of wcalcrc keys 2006-02-14 09:13 memoryhole * calculator.c: add commas for regular numbers too 2006-02-13 14:46 memoryhole * main.c: potato potah-toe 2006-02-13 14:25 memoryhole * main.c: cmdline input fix for systems without READLINE_HISTORY 2006-02-13 13:57 memoryhole * calculator.c, calculator.h: add commas 2006-02-13 13:57 memoryhole * main.c: whitespace and delimiters preference 2006-02-13 13:56 memoryhole * scanner.l: \delimiters 2006-02-13 13:55 memoryhole * parser.y: DELIM_CMD 2006-02-13 13:54 memoryhole * number_formatting.h: whitespace 2006-02-13 13:54 memoryhole * number_formatting.c: commas 2006-02-13 13:53 memoryhole * WcalcController.m: commas preference preliminary 2006-02-13 13:53 memoryhole * Makefile.am, Makefile.in, add_commas.c, add_commas.h: add_commas 2006-02-13 11:03 memoryhole * test.simple: trickier precision guard test 2006-02-13 11:03 memoryhole * number_formatting.c, scanner.l: main.c 2006-02-13 11:02 memoryhole * calculator.c: spacing and fiddled with print_this_result 2006-02-02 15:53 memoryhole * VariableList.m: compatability with new variables.c 2006-01-19 12:03 memoryhole * explain.c: better error message 2006-01-19 11:00 memoryhole * test.simple: might be important to test 2006-01-19 10:55 memoryhole * parser.y: added print_ints pref to \\prefs 2006-01-19 10:52 memoryhole * main.c: corrected print_integers preference, added error-checking to internal variable storage 2006-01-19 10:25 memoryhole * variables.c: wrong semantics on key sanity testing 2006-01-15 01:13 memoryhole * variables.h: size_t instead of int 2006-01-15 01:13 memoryhole * variables.c: made it use the generic List structure 2006-01-15 01:12 memoryhole * parser.y: better variable abstraction, a readability fix, and slightly more useful error messages 2006-01-15 01:11 memoryhole * list.h: added getListElement 2006-01-15 01:10 memoryhole * list.c: removed unnecessary error printout, and added getListElement 2006-01-15 01:09 memoryhole * files.c: readability 2005-12-12 01:52 memoryhole * wcalc.1: tidying up, reorganizing 2005-12-12 01:42 memoryhole * wcalc.1: variables & descriptions 2005-12-11 08:08 memoryhole * Info.plist, OldVariableList.h, VariableList.m, WcalcController.m, calculator.c, calculator.h, configure, configure.in, conversion.c, conversion.h, definitions.h, evalvar.c, explain.c, extract_vars.c, files.c, help.c, help.h, historyManager.c, historyManager.h, list.c, list.h, main.c, parser.y, simpleCalc.c, string_manip.c, string_manip.h, variables.c, variables.h, English.lproj/InfoPlist.strings, Wcalc.xcodeproj/kyle.mode1, Wcalc.xcodeproj/kyle.pbxuser, Wcalc.xcodeproj/project.pbxproj: tidying up, incrementing version 2005-12-10 19:56 memoryhole * calculator.c, explain.c, uint32_max.h: UINT32_MAX is *not* that hard, people! 2005-12-10 19:26 memoryhole * files.c: save the description, bugfix for saveState 2005-12-10 16:08 memoryhole * explain.c: portability fixes 2005-12-10 16:05 memoryhole * variables.h: include config.h 2005-12-10 15:52 memoryhole * explain.c, files.c, help.c, main.c, parser.y, scanner.l, variables.c, variables.h: descriptions 2005-12-10 14:17 memoryhole * wcalc.1: \\store and \\explain 2005-12-10 14:14 memoryhole * explain.c, files.c: \\explain \\store 2005-12-10 14:11 memoryhole * files.c, files.h, main.c, parser.y, scanner.l: \\store function, and useability fixes in files.c for the preload file 2005-12-10 14:10 memoryhole * calculator.c: formatting 2005-12-10 12:56 memoryhole * calculator.c: folds 2005-12-10 12:55 memoryhole * calculator.c: depth-first recursion search, not breadth-first 2005-12-10 12:45 memoryhole * calculator.c: that was unnecessary 2005-12-10 12:44 memoryhole * calculator.c: find_recursion uses all List's now 2005-12-10 12:28 memoryhole * test.errors: more tests 2005-12-10 12:28 memoryhole * list.c, list.h: added an iterator structure and a way to use the list as a stack rather than a queue 2005-12-10 12:27 memoryhole * calculator.c: removed local_extract_vars in favor of the separated one in extract_vars.c 2005-12-10 11:16 memoryhole * calculator.c: fixing the a==5 bug 2005-12-10 11:09 memoryhole * test.errors: more extensive testing 2005-12-10 11:09 memoryhole * calculator.c: starting to eliminate non-List lists 2005-12-10 10:39 memoryhole * Makefile.am, Makefile.in, configure, evalvar.c, evalvar.h, explain.c, explain.h, extract_vars.c, extract_vars.h, help.c, isconst.c, isconst.h, isfunc.c, isfunc.h, list.c, list.h, main.c, parser.y, scanner.l, variables.h, Wcalc.xcodeproj/kyle.mode1, Wcalc.xcodeproj/kyle.pbxuser: \\explain 2005-12-10 10:11 memoryhole * calculator.c: this was extraneous 2005-12-10 10:08 memoryhole * English.lproj/MainMenu.nib/: info.nib, keyedobjects.nib: missing connection repaired 2005-12-07 17:04 memoryhole * main.c: that var was unecessary 2005-12-07 17:02 memoryhole * main.c: command-line operations now add to the history 2005-12-07 13:02 memoryhole * wcalc.1: wcalcrc and active variable documentation 2005-12-02 07:02 memoryhole * configure.in: typo 2005-12-01 17:23 memoryhole * Info.plist, InspectorController.h, InspectorController.m, NEWS, README, Wcalc.pmproj, WcalcController.h, WcalcController.m, definitions.h, wcalc.info, English.lproj/InfoPlist.strings, English.lproj/MainMenu.nib/classes.nib, English.lproj/MainMenu.nib/info.nib, English.lproj/MainMenu.nib/keyedobjects.nib, Wcalc.xcodeproj/kyle.mode1, Wcalc.xcodeproj/kyle.pbxuser, Wcalc.xcodeproj/project.pbxproj: fixed resizeness, made Inspector a window, releasing 2.1.2 2005-12-01 14:38 memoryhole * ChangeLog: Version 2.1.2 2005-12-01 14:18 memoryhole * Makefile.am: Reference for if I need lexx flags in the future 2005-12-01 14:12 memoryhole * configure, configure.in: Version 2.1.2 2005-12-01 14:11 memoryhole * Makefile.in: backup file garbage 2005-11-14 12:46 memoryhole * Makefile.am: remove more cvs cruft 2005-11-10 07:18 memoryhole * English.lproj/MainMenu.nib/: info.nib, keyedobjects.nib: the menu functions now say areasinh instead of arcsinh 2005-11-09 10:27 memoryhole * files.c: makes OpenBSD happy 2005-11-08 01:05 memoryhole * files.c: variables as expressions should be quoted correctly 2005-11-07 15:42 memoryhole * Wcalc.xcodeproj/: kyle.mode1, kyle.pbxuser: whatever 2005-11-07 15:42 memoryhole * Makefile.in, aclocal.m4, configure, configure.in: attempt to detect broken MPFR installations 2005-11-07 15:41 memoryhole * English.lproj/MainMenu.nib/: info.nib, keyedobjects.nib: Forgot to connect the drawers to the corrected main window :( 2005-11-07 15:40 memoryhole * scanner.l: technically, that should be a "mu" and not a "micro", but you can't tell visually... for the time being, we accept either one 2005-11-07 15:38 memoryhole * WcalcController.m: technically, that should be a "mu" and not a "micro", but you can't tell visually - also, use a real multiply symbol for implicit here 2005-11-07 10:11 memoryhole * README, definitions.h: I wanted mu, not micro... but that's complicated 2005-11-06 22:41 memoryhole * ChangeLog, NEWS, README, README.txt, Wcalc.pmproj, Wcalc.xcodeproj/kyle.mode1, Wcalc.xcodeproj/kyle.pbxuser, Wcalc.xcodeproj/project.pbxproj: 2.1.1 2005-11-05 10:53 memoryhole * WcalcController.m: improve utf-8 friendliness, add debug printouts in loading sequence, fix compatability with locales without NSThousandsSeparators, fix repeat calculation bug 2005-11-05 10:49 memoryhole * scanner.l: correct name for the asinh,acosh,atanh,acoth functions 2005-11-05 10:48 memoryhole * ReadMe.rtf: text only now 2005-11-05 09:50 memoryhole * English.lproj/InfoPlist.strings: binary-fied 2005-11-05 09:49 memoryhole * English.lproj/InfoPlist.strings: step 1 in binary-fying it 2005-11-05 09:48 memoryhole * simpleCalc.c: fixed debug output 2005-11-05 09:47 memoryhole * scanner.l: fixed the division symbol and made it so the error-reporter won't break the GUI by printing malformed UTF-8 2005-11-05 09:45 memoryhole * definitions.h: preparing for 2.1.1 2005-11-05 09:44 memoryhole * OldVariableList.m, VariableList.m: made utf-8 friendly 2005-11-05 09:18 memoryhole * Info.plist: preparing for 2.1.1 2005-11-05 09:17 memoryhole * ErrorController.m: minor obvious optimizations (what was I thinking?) 2005-11-05 09:17 memoryhole * ConversionList.m, HistoryList.m, MyTextField.m: made utf-8 friendly 2005-11-05 09:05 memoryhole * English.lproj/MainMenu.nib/keyedobjects.nib: presto: binary 2005-11-05 09:04 memoryhole * English.lproj/MainMenu.nib/keyedobjects.nib: step 1 to proper cvsage 2005-11-05 09:03 memoryhole * English.lproj/MainMenu.nib/info.nib: Re-add as binary 2005-11-05 09:03 memoryhole * English.lproj/MainMenu.nib/info.nib: Step 1 to making it work properly 2005-11-05 09:01 memoryhole * English.lproj/MainMenu.nib/classes.nib: Re-adding with wrapper 2005-11-05 08:58 memoryhole * English.lproj/MainMenu.nib/classes.nib: Step 1 to adding it "properly" 2005-11-02 12:20 memoryhole * test.simple: \ints tests 2005-11-02 12:19 memoryhole * calculator.c: correct \ints output for small numbers (I am still a moron) 2005-11-02 12:11 memoryhole * calculator.c: correct \ints output for big numbers (I am a moron) 2005-11-02 12:10 memoryhole * variables.c: fix logic errors introduced by the openbsd strncmp fixes: now variables where one is a prefix of the other will not be confused 2005-11-02 12:07 memoryhole * test.errors, test.recursion, test.simple, test.vars: comments that say what you should expect 2005-11-02 11:02 memoryhole * calculator.c: small optimization and remove a debug printout 2005-11-02 09:55 memoryhole * calculator.c: fix possible double-free plus some casting warnings 2005-11-02 09:53 memoryhole * simpleCalc.c: warning removal through casting 2005-11-02 00:48 memoryhole * Info.plist, Makefile.in, NEWS, README.txt, Wcalc.pmproj, configure, configure.in, wcalc.info, wcalc.spec, English.lproj/InfoPlist.strings, Wcalc.xcodeproj/kyle.mode1, Wcalc.xcodeproj/kyle.pbxuser: post-version 2.1-release commit 2005-11-01 22:50 memoryhole * ChangeLog: cvs2cl 2005-11-01 21:55 memoryhole * Makefile.in: changed with Makefile.am 2005-11-01 21:53 memoryhole * English.lproj/MainMenu.nib/: info.nib, keyedobjects.nib: little tweak - added a symbol 2005-11-01 21:52 memoryhole * Wcalc.xcodeproj/: kyle.mode1, kyle.pbxuser, project.pbxproj: many compilation fixes and organizational improvements 2005-11-01 21:51 memoryhole * wcalc.info: fink needs to get its act together wrt gmp and mpfr 2005-11-01 21:49 memoryhole * wcalc.1: gamma is more accurate 2005-11-01 21:47 memoryhole * scanner.l: make utf-8 savvy (mostly) 2005-11-01 21:45 memoryhole * parser.y: remove sarcasm 2005-11-01 21:45 memoryhole * definitions.h: added Phi0 (magnetic flux quantum) and made gamma more accurate 2005-11-01 21:44 memoryhole * WcalcController.m: comply with ObjC charset restrictions, and add a symbol 2005-11-01 21:40 memoryhole * ConversionList.m: comply with ObjC charset restrictions 2005-10-27 09:23 memoryhole * test.recursion, test.vars: more tests 2005-10-27 09:22 memoryhole * files.c, main.c, parser.y, scanner.l, calculator.h: added verbose command 2005-10-27 09:22 memoryhole * variables.c: removed debugging printouts 2005-10-27 09:07 memoryhole * calculator.c: dprintf cleanup 2005-10-27 09:04 memoryhole * variables.c: bug in storing variables when theres only one variable fixed 2005-10-26 20:03 memoryhole * files.c: removed a length limitation 2005-10-26 19:54 memoryhole * calculator.c: cleanup and removed a nondynamic string (aka possible overflow) 2005-10-26 19:53 memoryhole * parser.y, scanner.l: the \base command 2005-10-26 19:52 memoryhole * aclocal.m4: downgraded for OSX 2005-10-26 10:11 memoryhole * wcalc.1: updates and corrections 2005-10-26 09:26 memoryhole * parser.y: minor readability tweaks 2005-10-26 09:25 memoryhole * Makefile.in: automake regen 2005-10-26 09:24 memoryhole * main.c: typo 2005-10-26 09:20 memoryhole * main.c: more useful command-line options 2005-10-26 09:01 memoryhole * calculator.h: pedantic compatability 2005-10-26 09:00 memoryhole * acinclude.m4: remove extra printout in readline detection 2005-10-26 08:59 memoryhole * Makefile.am: parser.h is sometimes missed in the cleaning phase 2005-10-02 11:36 memoryhole * wcalc.1: Fixed irand/fact bug - noticed by Daniele Sempione 2005-09-10 22:56 memoryhole * Makefile.am, Makefile.in: more automake distclean cleanup 2005-09-10 22:49 memoryhole * Makefile.am: shouldnt use maintainer-clean for this purpose 2005-09-10 22:38 memoryhole * Makefile.in: removing CVS directories 2005-09-10 22:36 memoryhole * Makefile.am: now removes CVS files when I do a "make maintainer-clean" 2005-09-10 22:30 memoryhole * Makefile.am, Makefile.in, aclocal.m4, configure: newer auto* tools, and now it gets rid of the lex/yacc stuff 2005-08-30 13:09 memoryhole * calculator.c, historyManager.c, main.c, test.vars, variables.c, variables.h: some more memory leaks, all small, most irrelevant 2005-08-30 10:51 memoryhole * calculator.c: fix longstanding memory leak. lets hope its a cross-platform solution 2005-08-30 10:30 memoryhole * calculator.c: memory leak 2005-08-29 22:04 memoryhole * ChangeLog: cvs2cl 2005-08-29 22:02 memoryhole * number_formatting.c, Wcalc.xcodeproj/kyle.mode1, Wcalc.xcodeproj/kyle.pbxuser, Wcalc.xcodeproj/project.pbxproj: compile warnings 2005-08-29 21:34 memoryhole * test.simple: 100! 2005-08-29 20:26 memoryhole * number_formatting.c, number_formatting.h: less namespace pollution 2005-08-29 20:24 memoryhole * Makefile.am, Makefile.in, calculator.c, number_formatting.c, number_formatting.h: fixed a crasher in large number output -- better organized the number formatting stuff 2005-08-29 17:56 memoryhole * calculator.c: allow for the display of REALLY long numbers 2005-08-29 16:25 memoryhole * calculator.c, files.c, main.c, parser.y, scanner.l, variables.c: OpenBSD portability fixes 2005-08-29 13:40 memoryhole * NEWS: old fix 2005-08-28 11:41 memoryhole * ChangeLog: cvs2cl 2005-08-28 11:00 memoryhole * VariableList.m, main.c, parser.y, variables.c, English.lproj/MainMenu.nib/info.nib, English.lproj/MainMenu.nib/keyedobjects.nib, Wcalc.xcodeproj/kyle.mode1, Wcalc.xcodeproj/kyle.pbxuser, Wcalc.xcodeproj/project.pbxproj: variable corrections 2005-08-28 11:00 memoryhole * calculator.c: comment spelling correction 2005-08-28 09:28 memoryhole * COPYING.txt, COPYRIGHT, NEWS, ReadMe.rtf, Wcalc.pmproj, Wcalc.pmsp, test.simple, Wcalc.xcodeproj/kyle.mode1, Wcalc.xcodeproj/kyle.pbxuser, Wcalc.xcodeproj/project.pbxproj: hopefully, last commit of version 2.0 2005-08-28 09:25 memoryhole * Info.plist: correct version 2005-08-28 09:24 memoryhole * calculator.c: that was stupid - I should have seen that before 2005-08-28 09:11 memoryhole * parser.y: Corrected a little precedence stuff in the parser. Managed to reduce conflicts too! :) 2005-08-28 01:02 memoryhole * ChangeLog: cvs2cl 2005-08-28 00:53 memoryhole * English.lproj/InfoPlist.strings, Wcalc.xcodeproj/kyle.mode1, Wcalc.xcodeproj/kyle.pbxuser, Wcalc.xcodeproj/project.pbxproj: new version 2005-08-28 00:47 memoryhole * Info.plist: version strings from the old Wcalc .plist 2005-08-28 00:44 memoryhole * Info.plist: Yes, THIS software 2005-08-28 00:42 memoryhole * main.c: initialization and whitespace 2005-08-28 00:41 memoryhole * variables.c, parser.y, scanner.l: whitespace 2005-08-28 00:41 memoryhole * calculator.c: initialization cannot be here 2005-08-28 00:40 memoryhole * WcalcController.m: Fixed a few crashes, fixed a toggle/toggle weirdness, and made the AnswerField automatically expand. 2005-08-28 00:37 memoryhole * WcalcController.h: minor cleanup plus the #import thing 2005-08-28 00:36 memoryhole * AboutBoxController.h, AboutBoxController.m, ConversionList.h, ConversionList.m, ErrorController.h, ErrorController.m, HistoryList.h, HistoryList.m, MyTextField.h, MyTextField.m, VariableList.h, VariableList.m, main.m: #import is deprecated now 2005-08-28 00:33 memoryhole * theDelegate.h, theDelegate.m: #import is deprecated now 2005-08-28 00:31 memoryhole * wcalc.info, wcalc.spec: new version 2005-08-28 00:31 memoryhole * English.lproj/MainMenu.nib/info.nib, English.lproj/MainMenu.nib/keyedobjects.nib, Wcalc.xcodeproj/kyle.mode1, Wcalc.xcodeproj/kyle.pbxuser, Wcalc.xcodeproj/project.pbxproj: The usual stuff (preparing for a new release) 2005-08-27 16:48 memoryhole * English.lproj/MainMenu.nib/info.nib, English.lproj/MainMenu.nib/keyedobjects.nib, Wcalc.xcodeproj/kyle.mode1, Wcalc.xcodeproj/kyle.pbxuser, Wcalc.xcodeproj/project.pbxproj: Fixed the main window's scaling behavior. Since I moved to a text-format nib, CVS shouldn't be screwing it up again. 2005-08-27 16:48 memoryhole * ConversionList.m: silly semicolon 2005-08-27 13:51 memoryhole * ConversionList.m, conversion.c, conversion.h, help.c, parser.y, scanner.l, test.errors, test.simple, English.lproj/MainMenu.nib/info.nib, English.lproj/MainMenu.nib/keyedobjects.nib, Wcalc.xcodeproj/kyle.mode1, Wcalc.xcodeproj/kyle.pbxuser, Wcalc.xcodeproj/project.pbxproj: Compiles and works! 2005-08-27 12:29 memoryhole * ConversionList.m, Info.plist, VariableList.m, WcalcController.m, calculator.c, main.m, parser.y, English.lproj/InfoPlist.strings, English.lproj/MainMenu.nib/info.nib, English.lproj/MainMenu.nib/keyedobjects.nib, Wcalc.xcodeproj/kyle.mode1, Wcalc.xcodeproj/kyle.pbxuser, Wcalc.xcodeproj/project.pbxproj: IT COMPILES AND RUNS! For those who find themselves in a similar pickle, you have to specify WHERE the Info.plist file is in the get-info dialog box of the _native target. 2005-07-28 09:27 memoryhole * calculator.c: fixed integers printing too many decimals 2005-07-21 15:11 memoryhole * calculator.c: You'd think this would be a memory leak, but it isn't for some reason 2005-07-21 15:11 memoryhole * config.h.in, configure, configure.in: portability for Debian 2005-07-21 13:58 memoryhole * simpleCalc.c: cleanup 2005-07-21 13:57 memoryhole * scanner.l: cleanup (use yyleng instead of strlen()) 2005-07-21 13:54 memoryhole * main.c: cleanup and trim an extra mpfr_t for efficiency 2005-07-21 13:53 memoryhole * historyManager.c, parser.y: cleanup 2005-07-21 13:51 memoryhole * files.c: cleanup and trim an extra mpfr_t for efficiency 2005-07-21 13:50 memoryhole * conversion.c: just clarify things for when I go grepping 2005-07-21 13:49 memoryhole * calculator.h: some cleanup 2005-07-21 13:47 memoryhole * calculator.c: some cleanup, fixed some #includes, and fixed variable substitution 2005-07-20 02:19 memoryhole * Makefile.am, Makefile.in, conversion.c, conversion.h, main.c, parser.y, scanner.l: conversions work! 2005-07-19 23:13 memoryhole * calculator.c, calculator.h, definitions.h, parser.y, scanner.l: added xor and comp() 2005-07-19 18:05 memoryhole * calculator.c: output function doesn't crash anymore, and the bitshifts work properly now 2005-07-19 18:03 memoryhole * configure, configure.in: version 2.0 2005-07-19 11:48 memoryhole * wcalc.1: it had gotten stagnant 2005-07-19 11:48 memoryhole * scanner.l: typo 2005-07-19 11:48 memoryhole * main.c: add a few more configuration options 2005-07-19 11:47 memoryhole * help.c: be more helpful 2005-07-19 11:46 memoryhole * calculator.c: Fixed a seg-fault in really long numbers. 2005-07-19 11:45 memoryhole * WcalcController.m: Fixed the menu thingy 2005-07-18 20:55 memoryhole * parser.y, main.c: fix memory leaks 2005-07-18 12:42 memoryhole * calculator.c: implemented sig_fig rounding indication (huh, ended up identical to the old one) and fixed several things that were wrong with the old implementation 2005-07-18 12:40 memoryhole * scanner.l: oops, left debugging printfs in there 2005-07-18 12:40 memoryhole * main.c: increase the default accuracy? why not? 2005-07-18 12:29 memoryhole * help.c: most recent major thing 2005-07-18 12:18 memoryhole * parser.y: removed several unnecessary doubles, added the \bits command, and fixed the \prefs display to be slightly more useful 2005-07-18 12:14 memoryhole * scanner.l: fixed some sigfig problems, and several unnecessary doubles 2005-07-18 12:13 memoryhole * string_manip.c: correct formatting 2005-07-18 12:10 memoryhole * main.c: ~/.wcalcrc parsing was broken 2005-07-18 10:01 memoryhole * main.c: use libhistory properly, and finally fix the damn readline problems 2005-07-17 23:45 memoryhole * help.c: Info about the \bits command 2005-07-17 23:45 memoryhole * calculator.c: Implemented binary operations, and a few other minor tweaks. Still much cruft in the second display function. 2005-07-17 09:41 memoryhole * WcalcController.m: fixed the constants menu, added all the mpfr stuff 2005-07-17 09:40 memoryhole * simpleCalc.c: mpfr stuff added 2005-07-17 09:38 memoryhole * definitions.h: more constants, corrected constants 2005-07-17 09:36 memoryhole * variables.c, variables.h: variable_exists test (read: efficiency) 2005-07-17 09:36 memoryhole * scanner.l: more constants, and no mpfr_inits() 2005-07-17 09:35 memoryhole * main.c: this should get initialized automatically now 2005-07-17 09:34 memoryhole * parser.y: damn mpfr_clears() 2005-07-17 09:33 memoryhole * conversion.h: the correct mpfr includes 2005-07-17 09:32 memoryhole * calculator.c: fixes to display and the random numbers, and also initialization 2005-07-17 09:30 memoryhole * MyTextField.h, VariableList.m: mpfr stuff added 2005-06-19 14:17 memoryhole * English.lproj/MainMenu.nib/: info.nib, keyedobjects.nib: We're ditching 10.2 support. 2005-06-19 14:14 memoryhole * English.lproj/MainMenu.nib/objects.nib: BAM! 2005-06-10 12:39 memoryhole * calculator.c, calculator.h, config.h.in, configure, configure.in, conversion.c, conversion.h, definitions.h, files.c, historyManager.c, historyManager.h, main.c, parser.y, scanner.l, variables.c, variables.h, English.lproj/MainMenu.nib/info.nib, English.lproj/MainMenu.nib/objects.nib, Wcalc.xcodeproj/kyle.mode1, Wcalc.xcodeproj/kyle.pbxuser, Wcalc.xcodeproj/project.pbxproj: Arbitrary Precision Compiles! 2005-06-10 09:46 memoryhole * WcalcController.m: Fixed SourceForge bug 1218205 2005-06-10 00:41 memoryhole * variables.c: Just formatting - the mpfr_t stuff will be along in a bit 2005-06-10 00:01 memoryhole * historyManager.c: Just formatting - the mpfr_t changes will be along in a moment. 2004-02-13 03:18 memoryhole * parser.y: Oops, typo. 2004-02-13 03:16 memoryhole * calculator.c, calculator.h, parser.y, scanner.l: Added the exp function (exp(x) is equivalent to e^x) 2004-01-05 16:12 memoryhole * Makefile.in, config.h.in, configure: Time for a new version 2004-01-04 18:36 memoryhole * scanner.l: On machines without HUGE_VALF, strtod returns HUGE_VAL 2004-01-04 18:34 memoryhole * configure.in: Have I mentioned how irritating Solaris is? 2004-01-04 18:34 memoryhole * Makefile.am: This is cleaner. 2003-12-29 16:43 memoryhole * ChangeLog, NEWS, config.h.in, configure, configure.in, definitions.h, wcalc.info, English.lproj/InfoPlist.strings, English.lproj/MainMenu.nib/info.nib, English.lproj/MainMenu.nib/objects.nib: New version 2003-12-29 16:05 memoryhole * simpleCalc.c: Minor clear problem fixed (clearing entry shouldn't clear the operator). Also some debugging printouts. 2003-12-29 16:02 memoryhole * WcalcController.m: Fixed up preference settings disabling when SimpleCalc is enabled. 2003-12-29 02:24 memoryhole * configure, configure.in: Fixed some more configure stuff 2003-12-29 02:21 memoryhole * .cvsignore, Makefile.in, aclocal.m4, configure, configure.in: Reran autoscan, and updated for newer tools. 2003-12-29 02:09 memoryhole * English.lproj/MainMenu.nib/: classes.nib, info.nib, objects.nib: All things updated. 2003-12-29 02:08 memoryhole * MyTextField.h, MyTextField.m, WcalcController.h, WcalcController.m, simpleCalc.c, simpleCalc.h: I think that should do it for simpleCalc. I'll see about concocting some tests to run it through tomorrow, then perhaps prepare for RELEASING A NEW VERSION! WOOOHOOOO!!! Ahem. Yes. This is all true. 2003-12-29 02:01 memoryhole * calculator.c: Some while loop changes, bad variable substitution fix, some abstraction (set_prettyanswer), and avoiding returning -0.0. Also a bunch of debugging printf's that will get removed by the preprocessor when not compiled for debugging. 2003-12-29 01:57 memoryhole * variables.c: A thought. 2003-12-29 01:55 memoryhole * scanner.l: Be slightly more flexible in number formatting. Accept numbers in the form: "5." (without the quotes) 2003-12-29 01:27 memoryhole * calculator.h: Made SimpleCalc a preference, and made Dprintf not throw warnings when not debugging. 2003-12-25 15:41 memoryhole * calculator.c: A fix for variable expansion 2003-12-25 15:28 memoryhole * calculator.c: Slightly more informative (and standardized) math errors. 2003-12-25 15:16 memoryhole * parser.y: Minor correction 2003-12-25 14:35 memoryhole * parser.y, scanner.l: Fixed a bunch of stuff. Decreased errors, got rid of some dead weight, etc. Trying to do correct error detection from strtod without warnings and it isn't working well. 2003-12-25 14:34 memoryhole * calculator.h: Added Dprintf 2003-09-30 17:48 memoryhole * files.c: Ran it through 'indent' 2003-09-30 17:05 memoryhole * files.c: Fixed file loading. 2003-08-31 22:47 memoryhole * calculator.c: Fixed bug 2003-08-31 22:36 memoryhole * calculator.c: Code cleanup, started the parenthesis hack.... not done yet. 2003-08-25 14:44 memoryhole * calculator.c, parser.y: Fixed error stickyness. 2003-08-22 15:27 memoryhole * main.c: Fixed piped input with active variables 2003-08-22 14:53 memoryhole * calculator.c: Cleaned up find_recursion per Ingo van Lil's suggestion. 2003-08-21 16:49 memoryhole * wcalc.info: added the wcalc.rc to the doc files 2003-08-21 16:47 memoryhole * NEWS, ReadMe.rtf, Wcalc.pmsp, configure, configure.in, wcalc.info, wcalc.rc, wcalc.spec: New version. 2003-08-21 16:17 memoryhole * WcalcController.h, WcalcController.m, config.h.in, configure, definitions.h, English.lproj/InfoPlist.strings, English.lproj/MainMenu.nib/classes.nib, English.lproj/MainMenu.nib/info.nib, English.lproj/MainMenu.nib/objects.nib: Put the printInts preference into the GUI, updated some things for the new version. 2003-08-21 12:16 memoryhole * parser.y: Fixed extraneous output when there's errors. 2003-08-20 22:20 memoryhole * parser.y: More good error messages. 2003-08-20 22:08 memoryhole * parser.y: More sensible error messages when you try to assign new values to constants. 2003-08-20 21:49 memoryhole * calculator.c: Took the extra variable parsing out of recursion checking. 2003-08-20 21:25 memoryhole * calculator.c: Fixed a crasher on Linux (Ingo van Lil). 2003-08-20 10:56 memoryhole * wcalc.info: Silly hard-wrapping. 2003-08-20 10:55 memoryhole * wcalc.info: Updated for new version. 2003-08-20 09:40 memoryhole * COPYRIGHT, Wcalc.pmsp, wcalc.info: New version stuff 2003-08-19 21:57 memoryhole * config.h.in, parser.y: Compiling fixes. 2003-08-19 17:13 memoryhole * ChangeLog, NEWS, ReadMe.rtf, WcalcController.m, configure, configure.in, wcalc.info, wcalc.spec, English.lproj/InfoPlist.strings, English.lproj/MainMenu.nib/info.nib, English.lproj/MainMenu.nib/objects.nib: New version. 2003-08-19 16:28 memoryhole * help.c: Updating for new version. 2003-08-19 16:15 memoryhole * wcalc.1: Fixed lots of stuff 2003-08-19 13:29 memoryhole * definitions.h: Documentation 2003-08-19 12:09 memoryhole * parser.y: Small bit of labelling. 2003-08-19 12:06 memoryhole * calculator.c: Fixed command/variable conflicts. 2003-08-19 11:43 memoryhole * calculator.c: Fixed a memory leak in the recursion detection. 2003-08-18 21:51 memoryhole * calculator.c: Fixed a repeatable crash on linux (flex is weird). Fixed the recursion detection. 2003-08-18 21:38 memoryhole * main.c: Missing a semicolon. 2003-08-17 20:33 memoryhole * main.c: Small, one-time, memory leak, before the main loop gets going. 2003-08-09 03:22 memoryhole * wcalc.info: Wcalc is not part of fink. This is the current .info file for creating the .deb file. 2003-08-09 03:13 memoryhole * calculator.c, calculator.h, parser.y, scanner.l: Added irandom, rand(), and irand(). rand(x) is a number between 0 and x. irand(x) is an integer between 0 and x. irandom is a random integer. 2003-08-09 03:11 memoryhole * files.c, historyManager.c: Fixed some signed/unsigned comparison warnings. 2003-07-12 01:28 memoryhole * calculator.c, calculator.h, parser.y, scanner.l: Added bitwise operators & and | and ~ 2003-04-19 11:56 memoryhole * calculator.c, parser.y: Fixed the flatten problems. Removed some compile warnings on Solaris. 2003-04-01 15:12 memoryhole * main.c: Forgot to add the integer pref to the config file. (CLI) 2003-04-01 15:09 memoryhole * WcalcController.m, calculator.c, calculator.h, main.c, parser.y, scanner.l: Made it so you can turn on and off the "always print integers" thing. (CLI) 2003-03-25 17:01 memoryhole * calculator.c, main.c, scanner.l: Fixed some Solaris warnings. 2003-03-24 13:14 memoryhole * WcalcController.m, configure, English.lproj/MainMenu.nib/objects.nib: Version problem fixed. Added cot to the menus. Corrected the log2 thing. 2003-03-22 22:35 memoryhole * help.h, historyManager.c, historyManager.h: Linux compiling fixes. 2003-03-22 22:15 memoryhole * ChangeLog, Makefile.am, Makefile.in, NEWS, ReadMe.rtf, Wcalc.pmsp, acinclude.m4, aclocal.m4, calculator.c, config.h.in, configure, configure.in, definitions.h, wcalc.1, wcalc.spec: Updated everything for the new version (1.6) 2003-03-22 21:28 memoryhole * historyManager.c, main.c, parser.y: Fixing silly compile errors. 2003-03-22 19:20 memoryhole * help.c, scanner.l: Updated the scanner to be more flexible with opening and saving filenames, and changed the help text to reflect the new commands. 2003-03-22 19:19 memoryhole * files.c: Made it save variables in save-files as well as expressions. The variables are saved first, so they'll always be available (because I don't want to have to remember exactly at which point they were saved). 2003-03-22 16:37 memoryhole * Makefile.am, Makefile.in, WcalcController.h, WcalcController.m, calculator.c, files.c, files.h, main.c, parser.y, scanner.l, English.lproj/MainMenu.nib/classes.nib, English.lproj/MainMenu.nib/objects.nib: Got file support working. Saves and loads history. As it loads, it evaluates, so variables stored that way are saved as well. Handles comments appropriately (read: ignores them) when loading. 2003-03-22 16:34 memoryhole * HistoryList.m, historyManager.c, historyManager.h: Discovered that history_length conflicts with readline. Fixed. 2003-03-22 13:41 memoryhole * WcalcController.h, WcalcController.m: Added an open, save, and saveAs command that do predictable things. For the moment, only open really does anything. save and saveAs display dialogs, but don't do anything with the selection (yet). also added a displayErrno function for reporting file-related errors. 2003-03-22 13:10 memoryhole * calculator.c: Fixed the flatten detection. 2003-03-22 13:09 memoryhole * parser.y: Fixed the history limit display (CLI) 2003-03-22 13:08 memoryhole * string_manip.c, string_manip.h: Added a function to remove comments from strings. 2003-03-22 11:35 memoryhole * ErrorController.m: Errors should beep. 2003-03-20 21:34 memoryhole * WcalcController.m: Patch for decimal key from Thomas Steinhausen 2003-03-19 12:40 memoryhole * English.lproj/MainMenu.nib/: classes.nib, info.nib, objects.nib: A few nib fixes - the drawer is now reconnected to the main window, things like that. 2003-03-19 12:35 memoryhole * calculator.c: Added recursion detection. 2003-03-19 12:25 memoryhole * WcalcController.h, WcalcController.m: Removed some strict_syntax stuff. Fixed printout of the history limit. A few miscellaneous changes. 2003-02-28 10:39 memoryhole * .cvsignore: Always more stuff to ignore. 2003-02-28 10:39 memoryhole * scanner.l: Improved precision specification. Added a rounding indication command. 2003-02-28 10:38 memoryhole * parser.y: Added a rounding indication command. 2003-02-28 10:37 memoryhole * main.c: Made readline pay attention to the history limit preference. 2003-02-28 10:36 memoryhole * help.c: Updated the help screen. 2003-02-28 10:36 memoryhole * definitions.h: Added a newline to the help screen. 2003-02-28 10:35 memoryhole * calculator.c: Fixed the arc- trig functions in degree mode. Added a command-line rounding indicator. 2003-02-24 13:37 memoryhole * calculator.h, main.c, parser.y, scanner.l, wcalc.rc: Removed the strict_syntax preference (it doesn't do anything anymore). 2003-02-24 13:36 memoryhole * calculator.c: Fixed integer output to respect the engineering printout preference. Made it use the builtin prefixes for octal and hex. 2003-02-24 12:44 memoryhole * calculator.c: I'm an idiot. Simplified the integer-printing stuff. 2003-02-24 10:58 memoryhole * main.c, wcalc.rc: Added support for persistent preferences (~/.wcalcrc) 2003-02-24 10:58 memoryhole * calculator.c: If it's just an integer, print the whole thing. (fix the prefs stuff) 2003-02-21 16:42 memoryhole * Makefile.in, aclocal.m4, calculator.c, calculator.h, config.h.in, configure, configure.in, main.c, parser.y, scanner.l, variables.c: Added support for a ~/.wcalcrc. Changed some error-message wording here and there. Miscellaneous fixes. 2003-02-21 16:40 memoryhole * definitions.h: Added cot acot coth acoth and reformatted a little. 2003-02-20 02:26 memoryhole * ChangeLog, NEWS: Keeping things up to date. 2003-02-19 10:38 memoryhole * WcalcController.m, English.lproj/MainMenu.nib/info.nib, English.lproj/MainMenu.nib/objects.nib: Finally fixed the bizarre window behavior. Replaced it with some bizarre window behavior behind the scenes (see WcalcController.m), but I can hide that from the user. 2003-02-19 10:35 memoryhole * calculator.c, calculator.h: Added output_string... just for convenience. 2003-02-19 10:32 memoryhole * parser.y, scanner.l: Added some display functions. 2003-02-19 10:29 memoryhole * definitions.h: Updated the list of supported symbols. 2003-02-19 10:27 memoryhole * main.c: Moved the help functions. 2003-02-19 10:25 memoryhole * Makefile.am, Makefile.in, help.c, help.h: Moved help to be generic. 2003-02-06 14:48 memoryhole * ReadMe.rtf, Wcalc.pmsp, definitions.h, main.c, wcalc.spec, English.lproj/MainMenu.nib/objects.nib: Tiny version update. 2003-02-06 13:49 memoryhole * main.c: Fixed the ^D bug when it's compiled without readline support. 2003-02-06 13:43 memoryhole * ChangeLog, calculator.c, calculator.h, conversion.c, definitions.h, historyManager.c, string_manip.c, variables.c: Got the GUI to build properly. 2003-01-29 11:02 memoryhole * wcalc.spec: Uses more standard rpm macros for cross-distro goodness. 2003-01-28 14:11 memoryhole * Wcalc.pmsp: New version. 2003-01-28 13:40 memoryhole * ReadMe.rtf: New version. 2003-01-27 21:56 memoryhole * config.h.in, configure: Removed the AC_FUNC_REALLOC thing. 2003-01-27 21:52 memoryhole * calculator.c, main.c, parser.y, scanner.l: Moved \dsep and \tsep into the parser/scanner and fixed some configuration issues. 2003-01-27 21:43 memoryhole * variables.c: Fixed some casting warnings when compiling on Linux. 2003-01-27 13:47 memoryhole * .cvsignore: A few more things to ignore. 2003-01-27 13:31 memoryhole * .cvsignore, wcalc.spec: Pulling together a clean release. 2003-01-27 12:53 memoryhole * configure.in: Not very portable. 2003-01-27 12:51 memoryhole * Makefile.am, Makefile.in, acinclude.m4, aclocal.m4: Added the man page to automake. 2003-01-27 12:47 memoryhole * configure: More autoconf/automake 2003-01-27 12:35 memoryhole * AUTHORS, COPYING, ChangeLog, INSTALL, README, acinclude.m4, aclocal.m4, depcomp, install-sh, missing, mkinstalldirs: More pieces of autoconf/automake compatability. 2003-01-27 11:14 memoryhole * Makefile, Makefile.am, calculator.c, calculator.h, config.h.in, configure.in, conversion.c, definitions.h, historyManager.c, libreadline.a, main.c, parser.y, scanner.l, string_manip.c, variables.c, variables.h, English.lproj/MainMenu.nib/info.nib, English.lproj/MainMenu.nib/objects.nib: Modified it for automake/autoconf 2003-01-25 14:19 memoryhole * ChangeLog, NEWS: Moved ChangeLog to NEWS (since I discovered the ChangeLog format is very strict) 2003-01-23 14:25 memoryhole * WcalcController.m, historyManager.c: Finished (I think) history length limiting. 2003-01-23 13:05 memoryhole * WcalcController.h, WcalcController.m, calculator.c, calculator.h, scanner.l, English.lproj/MainMenu.nib/classes.nib, English.lproj/MainMenu.nib/info.nib, English.lproj/MainMenu.nib/objects.nib: Fixed (I think) the internationalization stuff. Also began work on limiting the history length. 2003-01-17 13:00 memoryhole * historyManager.h, English.lproj/MainMenu.nib/classes.nib, English.lproj/MainMenu.nib/info.nib, English.lproj/MainMenu.nib/objects.nib: Fixed a copyright notice. Added clear buttons to the interface. Updated the project file for use with newer versions of Project Builder. 2003-01-17 11:01 memoryhole * historyManager.h, VariableList.h, historyManager.c, HistoryList.h, HistoryList.m, VariableList.m: Added clearing functions for the History and the list of variables. 2003-01-16 15:20 memoryhole * WcalcController.m, calculator.c, calculator.h, main.c, scanner.l: Attempted fix to thousands/decimal separator handling. Also got rid of some sticky error messages (one error caused another error later). 2003-01-16 12:08 memoryhole * conversion.c: Fixed compiling problems. 2003-01-16 10:38 memoryhole * conversion.c: Alphabetized the listings. 2002-12-18 11:32 memoryhole * calculator.c, calculator.h, parser.y, scanner.l: Added the log2 command. (Should it be logtwo?) 2002-11-12 15:13 memoryhole * Makefile: Added a prefix for installing. 2002-11-12 15:12 memoryhole * Makefile, calculator.c, main.c, string_manip.c: Fixes to get it to compile on Solaris. 2002-11-01 00:05 memoryhole * parser.y: Fixed a crasher in error reporting. 2002-10-20 15:48 kyle * Makefile, parser.y, wcalc.spec: New version, small bugfix. 2002-10-20 15:41 kyle * ReadMe.rtf: New version 2002-10-20 15:41 kyle * Makefile, Wcalc.pmsp: New version. 2002-10-20 15:40 kyle * main.c: Fixed the defaults for the precision guard. 2002-10-20 14:56 kyle * calculator.c, calculator.h, WcalcController.m: Implemented toggling precision control 2002-10-20 14:55 kyle * definitions.h, ChangeLog: New version 2002-10-20 14:55 kyle * main.c: Documented \conservative 2002-10-20 14:54 kyle * parser.y, scanner.l: Added the \conservative command, to toggle conservative precision 2002-10-20 14:47 kyle * main.c: Documented \list 2002-10-03 00:04 kyle * parser.y, scanner.l: Lists variables in command-line mode. 2002-09-08 21:16 kyle * scanner.l: Another way to tell it "hex" 2002-08-30 11:11 kyle * Makefile: Alternate compiling for redhat 2002-08-11 22:43 kyle * English.lproj/MainMenu.nib/: info.nib, objects.nib: [no log message] 2002-08-11 22:43 kyle * ChangeLog, Makefile, MyTextField.m, ReadMe.rtf, Wcalc.pmsp, main.c, wcalc.1: Distribution 2002-08-11 21:24 kyle * ReadMe.rtf, Wcalc.pmsp: Synching before release 2002-08-11 21:21 kyle * definitions.h, English.lproj/InfoPlist.strings, English.lproj/MainMenu.nib/classes.nib, English.lproj/MainMenu.nib/info.nib, English.lproj/MainMenu.nib/objects.nib: Changed the version numbers 2002-08-11 17:53 kyle * MyTextField.m: Removed debugging printouts. 2002-08-11 17:53 kyle * ConversionList.h, ConversionList.m, WcalcController.h, WcalcController.m: Conversion functions are available in the GUI. 2002-08-11 17:52 kyle * conversion.c, conversion.h: Conversion functions now work. 2002-08-11 12:38 kyle * calculator.c: uber_converstion belongs in conversion.c 2002-08-02 01:13 kyle * calculator.c, calculator.h, conversion.c, conversion.h, scanner.l: Getting a start on the conversions stuff. 2002-07-31 11:34 kyle * string_manip.h: Stupid gcc and it's end of line at end of file nonsense. 2002-07-31 01:05 kyle * scanner.l: Added shell-style comment support. 2002-07-31 00:56 kyle * parser.y, scanner.l: Added expression/string support. 2002-07-31 00:55 kyle * calculator.c: Fixed variable reassignment. Fixed exessive printouts in command-line mode. Added expression support (command-line mode). 2002-07-31 00:25 kyle * calculator.c: Fixed a possible infinite loop. 2002-07-31 00:25 kyle * scanner.l: Added support for comments. 2002-07-30 23:50 kyle * main.c: Made the default to print prefixes (0x, etc) Added the standard -h argument support. Changed to match variables.c changes. 2002-07-30 23:47 kyle * MyTextField.m: Removed spacebar actions (now it's normal again). Removed errors from arrow keys. 2002-07-30 23:46 kyle * VariableList.m: Handles expressions now. 2002-07-30 23:45 kyle * string_manip.h, string_manip.c: Added justnumbers. 2002-07-30 23:44 kyle * scanner.l: Changed the precision syntax a bit. Added bitshifts. 2002-07-30 23:41 kyle * parser.y: Added bitshifts. Updated for changes in variables.c. 2002-07-30 23:37 kyle * variables.h: Added expressions to the variable struct. Added the answer struct. Synched the function definitions with variables.c 2002-07-30 23:35 kyle * variables.c: Added the _full functions for pulling out expressions too. Made the getvar functions return answer structs, to provide more information (expressions, errors, etc.) Made getvar_core exit early for zero-length keys. Added a putexp function for inserting expressions. Renamed putvar to putval (for consistency) 2002-07-30 23:25 kyle * calculator.c: Added the flatten function to pre-parse variables (and handle "active" variables recursively). Fixed the bitshift functions. 2002-07-29 20:35 kyle * calculator.c, calculator.h: Added left and right bitshifts. 2002-05-21 10:04 kyle * WcalcController.h, WcalcController.m: Handles '=' and 'clear' at input-time now (sorta). (also a small change getting ready for dynamic variables... probably breaks it - will commit more later that fix it again) 2002-05-21 09:51 kyle * MyTextField.h, MyTextField.m: Handles '=' and 'clear' at input-time now (sorta). 2002-04-12 15:53 kyle * wcalc.spec: Updated the version 2002-04-12 15:45 kyle * English.lproj/MainMenu.nib/: classes.nib, info.nib, objects.nib: [no log message] 2002-04-12 15:44 kyle * libreadline.a: New version of the library. 2002-04-12 15:29 kyle * main.c: Setup reverse-lookup table for characters (we'll need it when we print errors/numbers back out) 2002-04-12 15:26 kyle * scanner.l: Using reverse-lookup table for error formatting. 2002-04-12 15:25 kyle * calculator.c: Took out debugging printfs 2002-04-12 15:23 kyle * WcalcController.m, calculator.h, variables.c: Setup reverse-lookup table for characters (we'll need it when we print errors/numbers back out) 2002-04-12 15:03 kyle * WcalcController.h: Organized the code a bit. 2002-04-12 15:03 kyle * WcalcController.m: No use_commas pref! 2002-04-12 15:02 kyle * scanner.l: Scanner error hides internationalization futzing. 2002-04-12 14:59 kyle * calculator.c: Stripped out the bogus internationalizing loop. 2002-04-12 14:58 kyle * parser.y, calculator.h: No comma-command! 2002-04-12 14:57 kyle * scanner.l: Back to American-only (may be some cruft left in there... I'll get it later) 2002-04-12 14:56 kyle * main.c: Specify separators on the fly in cmd-line. 2002-04-12 13:03 kyle * WcalcController.m, calculator.c, calculator.h, variables.c: Initial preprocessor support! 2002-04-10 00:03 kyle * WcalcController.h, WcalcController.m, calculator.h, main.c, parser.y, scanner.l: Added a preference to optionally forget expressions that produce errors and don't return values. 2002-04-09 18:40 kyle * WcalcController.m, theDelegate.m: Minor code cleanups 2002-03-27 23:58 kyle * WcalcController.m: Now saves the base drawer state, too. 2002-03-27 23:49 kyle * WcalcController.m: Now saves the history/variable state. 2002-03-07 18:21 kyle * main.c: Uses new configuration structure. 2002-03-07 18:15 kyle * ChangeLog: Logging changes 2002-03-07 18:10 kyle * WcalcController.m, calculator.c, calculator.h, parser.y, scanner.l: Added cube root (cbrt) 2002-03-07 17:41 kyle * scanner.l: Added square function and fixed it up with the new configuration stuff. Counting digits for sig-fig rounding indication. 2002-03-07 17:40 kyle * parser.y: Added square function and fixed it up with the new configuration stuff. 2002-03-07 17:39 kyle * WcalcController.m, calculator.c, calculator.h: Implemented the Rounding indications (Simple and Significant Figure) 2002-03-07 17:38 kyle * string_manip.c, string_manip.h: Added count_digits function. 2002-03-07 15:38 kyle * WcalcController.h, WcalcController.m, calculator.c, calculator.h: Redid preferences as a struct to make it easier to maintain. 2002-03-07 02:03 kyle * WcalcController.m, calculator.c, calculator.h: Visual indication of rounding. (next: sig figs) 2002-03-06 09:49 kyle * scanner.l: Added Fortran-style exponent operator. 2002-03-04 20:00 kyle * English.lproj/: MainMenu.nib/classes.nib, MainMenu.nib/info.nib, MainMenu.nib/objects.nib, .cvsignore: [no log message] 2002-03-04 20:00 kyle * English.lproj/InfoPlist.strings: version increment 2002-03-04 19:30 kyle * ChangeLog: Updated changes per CVS log 2002-03-04 19:22 kyle * definitions.h: Incremented the version. 2002-03-04 19:22 kyle * WcalcController.h, WcalcController.m: Added a base drawer. 2002-03-03 13:57 kyle * ReadMe.rtf, Wcalc.pmsp: Released a pre-release 2002-03-02 11:22 kyle * English.lproj/MainMenu.nib/: classes.nib, info.nib, objects.nib: stuff 2002-03-02 11:22 kyle * Makefile: Switched to yacc and flex. Added the new string manipulation files. 2002-03-01 23:49 kyle * WcalcController.h: Removed a pointless pointer (heh). 2002-03-01 23:48 kyle * WcalcController.m: Fixed the live preference display. Fixed the menu's response the the drawer state. Made the preference panel modeless. 2002-03-01 23:46 kyle * scanner.l: Implemented the strict_syntax preference. 2002-03-01 21:21 kyle * parser.y: [no log message] 2002-03-01 21:19 kyle * parser.y: Removed no-longer reserved variables. 2002-03-01 21:09 kyle * scanner.l: Stripped the wrong char from numbers with commas. 2002-03-01 21:09 kyle * parser.y: Fixed errors on essentially blank lines. 2002-03-01 21:09 kyle * WcalcController.h, WcalcController.m: Changes the period button to a comma button depending on the state. Displays the current comma preference, too. 2002-03-01 20:22 kyle * scanner.l: Moved commands from main.c. Added some acceptable, equivalent symbols. Fixed (I think) comma support. Added a garbage collector for goofily-formatted numbers. 2002-03-01 20:18 kyle * parser.y: Added smarts for piped files. Moved commands here from main.c. 2002-03-01 20:16 kyle * WcalcController.m: Added a preference for comma parsing pickiness. Fixed a continuous expression bug (new division symbol). 2002-03-01 20:14 kyle * WcalcController.h, calculator.c, calculator.h: Added a preference for comma parsing pickiness. 2002-03-01 20:14 kyle * main.c: Moved commands to the parser (so they'll work with piped files). 2002-03-01 20:12 kyle * PrefsController.h, PrefsController.m: long since outdated 2002-03-01 16:58 kyle * calculator.h, main.c, parser.y, scanner.l, string_manip.c, string_manip.h: Continued fixing international comma support. Started migrating commands from main.c to the parser/scanner. 2002-03-01 00:42 kyle * ReadMe.rtf, libreadline.a, English.lproj/MainMenu.nib/info.nib, English.lproj/MainMenu.nib/objects.nib: stuff 2002-03-01 00:30 kyle * main.c: More CLI error printing (were previously ignoring errorstring. 2002-03-01 00:29 kyle * scanner.l: Added sanity/error checking to alternate bases, started complete support for commas/periods in decimal numbers 2002-03-01 00:28 kyle * parser.y: Fixed potential crasher freeing static memory. 2002-02-28 16:07 kyle * PrefsController.m: Display use_commas preference. 2002-02-28 15:25 kyle * calculator.c: fixed crasher in comma-output printing 2002-02-28 01:30 kyle * ChangeLog: logging changes 2002-02-28 01:29 kyle * calculator.c: Fixed binary output. 2002-02-28 01:05 kyle * WcalcController.m, calculator.c, calculator.h, main.c, parser.y, scanner.l: Added sqrt, ceil, floor functions 2002-02-28 00:52 kyle * main.c: Added an interactive CLI "strict variable parsing" toggle. 2002-02-27 15:06 kyle * scanner.l: Fixed the comma parsing. 2002-02-27 13:55 kyle * WcalcController.m: Made preference panel and keyboard panel placement more commonsensical. 2002-02-27 11:05 kyle * ChangeLog, ReadMe.rtf, Wcalc.pmsp, WcalcController.m, calculator.c, definitions.h, parser.y, English.lproj/InfoPlist.strings: Excessive error reporting fixed (good god) 2002-02-27 10:35 kyle * calculator.c: clamped too hard! fixed erroneous clamp messages 2002-02-27 01:49 kyle * .cvsignore, Wcalc.pmsp: New stuff to ignore, new version 2002-02-27 01:45 kyle * wcalc.spec: Version increase 2002-02-27 01:17 kyle * main.c: fixed a typo 2002-02-27 01:11 kyle * ReadMe.rtf: Just describing the new version (1.4.3) 2002-02-26 17:43 kyle * English.lproj/MainMenu.nib/: classes.nib, info.nib, objects.nib: Changed the preferences layout, added comma option 2002-02-26 17:43 kyle * English.lproj/InfoPlist.strings: Version changes 2002-02-26 17:42 kyle * definitions.h: Version increment 2002-02-26 17:41 kyle * ChangeLog: logging changes 2002-02-26 17:40 kyle * main.c: Update the help 2002-02-26 17:37 kyle * libreadline.a: Ran "ranlib" on it. (What does that do? it was complaining about it) 2002-02-26 17:35 kyle * Makefile: made it easier to manage debugging and distribution 2002-02-26 17:32 kyle * WcalcController.h, WcalcController.m, calculator.c, calculator.h, main.c: Added the preference to output with a comma instead of a period. 2002-02-26 17:10 kyle * calculator.c, main.c, parser.y: Fixed a rounding error (all negative decimals were removed!). (BOTH) Added error reporting to the command-line. (CLI) Added a radians toggle (CLI) 2002-02-26 16:18 kyle * ChangeLog: logging changes 2002-02-24 14:41 kyle * Wcalc.pmsp: Goes with the project 2002-02-24 11:31 kyle * Makefile, WcalcController.h, WcalcController.m, historyManager.c, historyManager.h, English.lproj/.cvsignore, English.lproj/MainMenu.nib/classes.nib, English.lproj/MainMenu.nib/info.nib, English.lproj/MainMenu.nib/objects.nib: Fixed a bug or two, made small speed improvements on preference changes. Made history redisplay configurable. 2002-02-24 09:53 kyle * scanner.l: Fixed the parsing (0.9 is now 0.9 and not octal 0 times .9) 2002-02-23 23:22 kyle * ChangeLog: added a dividing line 2002-02-23 22:57 kyle * calculator.c: to make gcc on linux be quiet, i added a newline at the end of the file 2002-02-23 22:46 kyle * wcalc.spec: version increase 2002-02-23 22:44 kyle * Makefile: strips automatically now 2002-02-23 22:28 kyle * English.lproj/InfoPlist.strings: stuff 2002-02-23 22:28 kyle * .cvsignore, README.txt, ReadMe.rtf: getting ready for release of 1.4.2, and tidying up 2002-02-23 22:20 kyle * definitions.h: version change 2002-02-23 15:13 kyle * .gdb_history, definitions.h, theDelegate.h, theDelegate.m: Rectifying the repository 2002-02-23 15:10 kyle * Wred.png: Stuff that got left out along the way. 2002-02-23 15:04 kyle * libreadline.a: For static compiling 2002-02-23 14:59 kyle * WcalcController.m: Fixed the editing-after-pressing-a-button error (I'm an idiot) (GUI) Fixed the window-position saving routines (GUI) The problem with window sizing has gotten WORSE (OSX's fault?) (GUI) 2002-02-23 14:57 kyle * English.lproj/MainMenu.nib/: classes.nib, info.nib, objects.nib: stuff 2002-02-23 14:57 kyle * wcalc.spec: Version changes 2002-02-23 14:56 kyle * scanner.l: Accepts commas as period replacements 2002-02-23 14:56 kyle * WcalcController.h: Merged the pref panel to be controlled more centrally (splitting it was just a pain in the butt) 2002-02-23 14:54 kyle * ChangeLog: Logging changes 2002-02-23 14:51 kyle * Makefile: Figured out this static thing (I think) 2002-02-23 14:47 kyle * Makefile, PrefsController.h, PrefsController.m, WcalcController.h, WcalcController.m, calculator.c, calculator.h, historyManager.c, main.c, parser.y, scanner.l, wcalc.spec: Added output commands to the GUI too (GUI) Fixed debug output in the CLI (CLI) Tried to compile statically (BOTH) Supports real division symbol (BOTH) Random is now truly random, if the system supports it - relies on /dev/random (BOTH) 2002-02-23 14:46 kyle * ChangeLog: Logging changes 2002-02-23 14:45 kyle * English.lproj/: InfoPlist.strings, MainMenu.nib/classes.nib, MainMenu.nib/info.nib, MainMenu.nib/objects.nib: stuff 2002-02-23 14:45 kyle * HistoryList.m, PrefsController.h, PrefsController.m, VariableList.m, WcalcController.m, calculator.c, calculator.h, historyManager.c, historyManager.h, main.c, parser.y, scanner.l: Saves the history (max of 1000 lines - should this be configurable?) (CLI) New commands in the CLI - (most) old ones will disappear next version (CLI) Supports hex (0x), octal (0), and binary (0b) input and output (BOTH) Cleared out some pointless error messages (CLI) Improved factorials (BOTH) Miscellaneous Bugfixes (BOTH) Tried to fix a window drifting problem (GUI) Added a "Result" column to the history (GUI) 2002-02-23 14:43 kyle * wcalc.spec: Version change 2002-02-23 14:42 kyle * ChangeLog: Logging changes 2002-02-23 14:41 kyle * .DS_Store: Doesn't belong in repository 2002-02-23 14:40 kyle * English.lproj/: InfoPlist.strings, MainMenu.nib/classes.nib, MainMenu.nib/info.nib, MainMenu.nib/objects.nib: stuff 2002-02-23 14:40 kyle * WcalcController.h, WcalcController.m, calculator.c, calculator.h, main.m, parser.y, scanner.l, wcalc.spec: More improvements to the parser (BOTH) Added LOTS of constants (BOTH) Added menus for functions and symbols (GUI) Added absolute value abs() (BOTH) Added a bunch of physical constants to the symbols (BOTH) Saves toggled status (GUI) Added the ability to toggle the presence of the keypad (GUI) 2002-02-23 14:38 kyle * ChangeLog: Logging changes 2002-02-23 14:35 kyle * WcalcController.h, WcalcController.m, calculator.c, calculator.h, main.c: Began work on continuous calculations 2002-02-23 14:34 kyle * wcalc.spec, English.lproj/InfoPlist.strings: Version change 2002-02-23 14:33 kyle * parser.y: Fixed the grammar again (or tried to) 2002-02-23 14:32 kyle * ChangeLog: Logging changes 2002-02-23 14:31 kyle * English.lproj/MainMenu.nib/: classes.nib, info.nib, objects.nib: Added the version number to the about box 2002-02-23 14:30 kyle * English.lproj/InfoPlist.strings: Version numbers 2002-02-23 14:30 kyle * calculator.h, parser.y: Fixed a typo in the grammar 2002-02-23 14:29 kyle * variables.c: Added newline at the end of the file to make gcc on linux shut up 2002-02-23 14:29 kyle * variables.h, wcalc.spec: Added newlines at the end of the file to make gcc on linux shut up 2002-02-23 14:28 kyle * AboutBoxController.h, AboutBoxController.m: Added the version number to the about box 2002-02-23 14:27 kyle * main.c: Version change 2002-02-23 14:26 kyle * ChangeLog: Logging changes 2002-02-23 14:19 kyle * English.lproj/MainMenu.nib/: classes.nib, info.nib, objects.nib: GUI changes 2002-02-23 14:19 kyle * English.lproj/InfoPlist.strings: Version number change 2002-02-23 14:18 kyle * HistoryList.m, PrefsController.h, PrefsController.m, WcalcController.h, WcalcController.m, calculator.c, calculator.h, historyManager.c, main.c, main.m, parser.y, scanner.l, variables.c, variables.h, wcalc.spec: Fixed the grammar (or broke it) (BOTH) Added checks to catch values with too much precision (BOTH) Precision slider won't go too far anymore (GUI) Remembers the window position (GUI) Quits when the window is closed (GUI) Saves Preferences! (GUI) Expanded the vocabulary (asin,arcsin,sin^-1) (BOTH) Added a preference to toggle using Radians (GUI) Made the history font smaller (GUI) Fixed a crasher in the history list. (GUI) Can now do floating point mods (BOTH) "random" means a random value (BOTH) added round() to round a value to the nearest whole number (BOTH) 2002-02-23 14:15 kyle * ChangeLog: Logging changes 2002-02-23 14:03 kyle * .DS_Store, .gdb_history, AboutBoxController.h, AboutBoxController.m, ChangeLog, ErrorController.h, ErrorController.m, HistoryList.h, HistoryList.m, Makefile, OldVariableList.h, OldVariableList.m, PrefsController.h, PrefsController.m, README.txt, TheW.icns, VariableList.h, VariableList.m, WcalcController.h, WcalcController.m, calculator.c, calculator.h, historyManager.c, historyManager.h, main.c, main.m, parser.y, scanner.l, variables.c, variables.h, w.png, wcalc.1, wcalc.spec, English.lproj/InfoPlist.strings, English.lproj/MainMenu.nib/classes.nib, English.lproj/MainMenu.nib/info.nib, English.lproj/MainMenu.nib/objects.nib: Initial Import 2002-02-23 14:03 kyle * .DS_Store, .gdb_history, AboutBoxController.h, AboutBoxController.m, ChangeLog, ErrorController.h, ErrorController.m, HistoryList.h, HistoryList.m, Makefile, OldVariableList.h, OldVariableList.m, PrefsController.h, PrefsController.m, README.txt, TheW.icns, VariableList.h, VariableList.m, WcalcController.h, WcalcController.m, calculator.c, calculator.h, historyManager.c, historyManager.h, main.c, main.m, parser.y, scanner.l, variables.c, variables.h, w.png, wcalc.1, wcalc.spec, English.lproj/InfoPlist.strings, English.lproj/MainMenu.nib/classes.nib, English.lproj/MainMenu.nib/info.nib, English.lproj/MainMenu.nib/objects.nib: Initial revision wcalc-2.4/config.h.in0000664000175000000620000001127111074306220012757 0ustar kkstaff/* config.h.in. Generated from configure.in by autoheader. */ /* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ #undef HAVE_DOPRNT /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H /* Define to 1 if you have the header file. */ #undef HAVE_FLOAT_H /* Define to 1 if you have the `gettimeofday' function. */ #undef HAVE_GETTIMEOFDAY /* Define to 1 if you have the header file. */ #undef HAVE_HISTORY_H /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the `gmp' library (-lgmp). */ #undef HAVE_LIBGMP /* Define to 1 if you have the `gmp2' library (-lgmp2). */ #undef HAVE_LIBGMP2 /* Define to 1 if you have the `l' library (-ll). */ #undef HAVE_LIBL /* Define to 1 if you have the `m' library (-lm). */ #undef HAVE_LIBM /* Define to 1 if you have the `mpfr' library (-lmpfr). */ #undef HAVE_LIBMPFR /* Define if you have a readline compatible library */ #undef HAVE_LIBREADLINE /* Define to 1 if you have the header file. */ #undef HAVE_LIMITS_H /* Define to 1 if your system has a GNU libc compatible `malloc' function, and to 0 otherwise. */ #undef HAVE_MALLOC /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `memset' function. */ #undef HAVE_MEMSET /* Define to 1 if you have the `modf' function. */ #undef HAVE_MODF /* "MPFR version 2.2 or better" */ #undef HAVE_MPFR_22 /* Define to 1 if you have the `pow' function. */ #undef HAVE_POW /* Define to 1 if you have the header file. */ #undef HAVE_READLINE_H /* Define if your readline library has \`add_history' */ #undef HAVE_READLINE_HISTORY /* Define to 1 if you have the header file. */ #undef HAVE_READLINE_HISTORY_H /* Define to 1 if you have the header file. */ #undef HAVE_READLINE_READLINE_H /* Define to 1 if your system has a GNU libc compatible `realloc' function, and to 0 otherwise. */ #undef HAVE_REALLOC /* Define to 1 if you have the header file. */ #undef HAVE_STDDEF_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDIO_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the `stpcpy' function. */ #undef HAVE_STPCPY /* Define to 1 if you have the `strchr' function. */ #undef HAVE_STRCHR /* Define to 1 if you have the `strdup' function. */ #undef HAVE_STRDUP /* Define to 1 if you have the `strerror' function. */ #undef HAVE_STRERROR /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the `strrchr' function. */ #undef HAVE_STRRCHR /* Define to 1 if you have the `strtoul' function. */ #undef HAVE_STRTOUL /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIME_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have that is POSIX.1 compatible. */ #undef HAVE_SYS_WAIT_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if you have the `vprintf' function. */ #undef HAVE_VPRINTF /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define to 1 if you can safely include both and . */ #undef TIME_WITH_SYS_TIME /* Version number of package */ #undef VERSION /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #undef YYTEXT_POINTER /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus #undef inline #endif /* Define to rpl_malloc if the replacement function should be used. */ #undef malloc /* Define to rpl_realloc if the replacement function should be used. */ #undef realloc /* Define to `unsigned int' if does not define. */ #undef size_t wcalc-2.4/configure0000774000175000000620000072331511074306220012653 0ustar kkstaff#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.62 for wcalc 2.4. # # Report bugs to . # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # 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 as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # 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.) 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 $as_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. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # 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 || $as_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=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : _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=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : (as_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 bug-autoconf@gnu.org about your system, echo including any error possibly output before this message. echo This can help us improve future autoconf versions. echo Configuration will now proceed without shell functions. } 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" || { $as_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 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: 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='wcalc' PACKAGE_TARNAME='wcalc' PACKAGE_VERSION='2.4' PACKAGE_STRING='wcalc 2.4' PACKAGE_BUGREPORT='kyle-wcalc@memoryhole.net' ac_unique_file="WcalcController.h" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir localstatedir includedir oldincludedir docdir infodir htmldir dvidir pdfdir psdir libdir localedir mandir DEFS ECHO_C ECHO_N ECHO_T LIBS build_alias host_alias target_alias 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 mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar YACC YFLAGS 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 LEX LEX_OUTPUT_ROOT LEXLIB CPP GREP EGREP LIBOBJS LTLIBOBJS' ac_subst_files='' ac_user_opts=' enable_option_checking enable_dependency_tracking with_readline ' ac_precious_vars='build_alias host_alias target_alias YACC YFLAGS CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 { (exit 1); exit 1; }; } ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 { (exit 1); exit 1; }; } ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 { (exit 1); exit 1; }; } ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 { (exit 1); exit 1; }; } ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) { $as_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 && { $as_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. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` { $as_echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) { $as_echo "$as_me: error: Unrecognized options: $ac_unrecognized_opts" >&2 { (exit 1); exit 1; }; } ;; *) $as_echo "$as_me: WARNING: Unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac { $as_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 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || { $as_echo "$as_me: error: Working directory cannot be determined" >&2 { (exit 1); exit 1; }; } test "X$ac_ls_di" = "X$ac_pwd_ls_di" || { $as_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 -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." { $as_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" || { $as_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 wcalc 2.4 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/wcalc] --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 case $ac_init_help in short | recursive ) echo "Configuration of wcalc 2.4:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --without-readline do not try to find and use the readline library Some influential environment variables: YACC The `Yet Another C Compiler' implementation to use. Defaults to the first program found out of: `bison -y', `byacc', `yacc'. YFLAGS The list of arguments that will be passed by default to $YACC. This script will default YFLAGS to the empty string to avoid a default value of `-d' given by some make applications. 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. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF wcalc configure 2.4 generated by GNU Autoconf 2.62 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 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 wcalc $as_me 2.4, which was generated by GNU Autoconf 2.62. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) 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_*) { $as_echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 $as_echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) $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=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_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=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_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 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (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 an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then ac_site_file1=$CONFIG_SITE elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test -r "$ac_site_file"; then { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" 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 { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5 $as_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,) { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 $as_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 { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 $as_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. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:$LINENO: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". { { $as_echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&5 $as_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 { { $as_echo "$as_me:$LINENO: error: newly created file is older than distributed files! Check your system clock" >&5 $as_echo "$as_me: error: newly created file is older than distributed files! Check your system clock" >&2;} { (exit 1); exit 1; }; } fi { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` 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= { $as_echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi { $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if test "${ac_cv_path_mkdir+set}" = set; then $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi 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 { $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AWK+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:$LINENO: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then { { $as_echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 $as_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=wcalc VERSION=2.4 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 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:$LINENO: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$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 $as_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_config_headers="$ac_config_headers config.h" # Checks for programs. for ac_prog in 'bison -y' byacc do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_YACC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$YACC"; then ac_cv_prog_YACC="$YACC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_YACC="$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi YACC=$ac_cv_prog_YACC if test -n "$YACC"; then { $as_echo "$as_me:$LINENO: result: $YACC" >&5 $as_echo "$YACC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$YACC" && break done test -n "$YACC" || YACC="yacc" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$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 $as_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 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$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 $as_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" && { { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 $as_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. $as_echo "$as_me:$LINENO: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? $as_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.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { (ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_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 | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi { $as_echo "$as_me:$LINENO: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } if test -z "$ac_file"; then $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 $as_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. { $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_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 { { $as_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 $as_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 { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } rm -f -r a.out a.out.dSYM 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. { $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } { $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } { $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_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 | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 $as_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 { $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT { $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if test "${ac_cv_objext+set}" = set; then $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_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 | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 $as_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 { $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$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 $as_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 $as_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 { $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat >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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$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 $as_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 $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$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 $as_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 $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$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 $as_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 $as_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 { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$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 $as_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 $as_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) { $as_echo "$as_me:$LINENO: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:$LINENO: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$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. { $as_echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # 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 { $as_echo "$as_me:$LINENO: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi depcc="$CC" am_compiler_list= { $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi 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 { $as_echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi for ac_prog in flex lex do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_LEX+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$LEX"; then ac_cv_prog_LEX="$LEX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_LEX="$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LEX=$ac_cv_prog_LEX if test -n "$LEX"; then { $as_echo "$as_me:$LINENO: result: $LEX" >&5 $as_echo "$LEX" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$LEX" && break done test -n "$LEX" || LEX=":" if test "x$LEX" != "x:"; then cat >conftest.l <<_ACEOF %% a { ECHO; } b { REJECT; } c { yymore (); } d { yyless (1); } e { yyless (input () != 0); } f { unput (yytext[0]); } . { BEGIN INITIAL; } %% #ifdef YYTEXT_POINTER extern char *yytext; #endif int main (void) { return ! yylex () + ! yywrap (); } _ACEOF { (ac_try="$LEX conftest.l" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$LEX conftest.l") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { $as_echo "$as_me:$LINENO: checking lex output file root" >&5 $as_echo_n "checking lex output file root... " >&6; } if test "${ac_cv_prog_lex_root+set}" = set; then $as_echo_n "(cached) " >&6 else if test -f lex.yy.c; then ac_cv_prog_lex_root=lex.yy elif test -f lexyy.c; then ac_cv_prog_lex_root=lexyy else { { $as_echo "$as_me:$LINENO: error: cannot find output from $LEX; giving up" >&5 $as_echo "$as_me: error: cannot find output from $LEX; giving up" >&2;} { (exit 1); exit 1; }; } fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_lex_root" >&5 $as_echo "$ac_cv_prog_lex_root" >&6; } LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root if test -z "${LEXLIB+set}"; then { $as_echo "$as_me:$LINENO: checking lex library" >&5 $as_echo_n "checking lex library... " >&6; } if test "${ac_cv_lib_lex+set}" = set; then $as_echo_n "(cached) " >&6 else ac_save_LIBS=$LIBS ac_cv_lib_lex='none needed' for ac_lib in '' -lfl -ll; do LIBS="$ac_lib $ac_save_LIBS" cat >conftest.$ac_ext <<_ACEOF `cat $LEX_OUTPUT_ROOT.c` _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$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 $as_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 && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_lex=$ac_lib else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext test "$ac_cv_lib_lex" != 'none needed' && break done LIBS=$ac_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_lex" >&5 $as_echo "$ac_cv_lib_lex" >&6; } test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex fi { $as_echo "$as_me:$LINENO: checking whether yytext is a pointer" >&5 $as_echo_n "checking whether yytext is a pointer... " >&6; } if test "${ac_cv_prog_lex_yytext_pointer+set}" = set; then $as_echo_n "(cached) " >&6 else # POSIX says lex can declare yytext either as a pointer or an array; the # default is implementation-dependent. Figure out which it is, since # not all implementations provide the %pointer and %array declarations. ac_cv_prog_lex_yytext_pointer=no ac_save_LIBS=$LIBS LIBS="$LEXLIB $ac_save_LIBS" cat >conftest.$ac_ext <<_ACEOF #define YYTEXT_POINTER 1 `cat $LEX_OUTPUT_ROOT.c` _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$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 $as_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 && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_prog_lex_yytext_pointer=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_lex_yytext_pointer" >&5 $as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; } if test $ac_cv_prog_lex_yytext_pointer = yes; then cat >>confdefs.h <<\_ACEOF #define YYTEXT_POINTER 1 _ACEOF fi rm -f conftest.l $LEX_OUTPUT_ROOT.c fi if test "$LEX" = :; then LEX=${am_missing_run}flex fi # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' # Checks for libraries. # FIXME: Replace `main' with a function in `-ll': { $as_echo "$as_me:$LINENO: checking for main in -ll" >&5 $as_echo_n "checking for main in -ll... " >&6; } if test "${ac_cv_lib_l_main+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ll $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { return main (); ; 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$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 $as_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 && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_l_main=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_l_main=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_l_main" >&5 $as_echo "$ac_cv_lib_l_main" >&6; } if test $ac_cv_lib_l_main = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBL 1 _ACEOF LIBS="-ll $LIBS" fi { $as_echo "$as_me:$LINENO: checking for acos in -lm" >&5 $as_echo_n "checking for acos in -lm... " >&6; } if test "${ac_cv_lib_m_acos+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char acos (); int main () { return acos (); ; 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$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 $as_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 && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_m_acos=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_m_acos=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_m_acos" >&5 $as_echo "$ac_cv_lib_m_acos" >&6; } if test $ac_cv_lib_m_acos = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBM 1 _ACEOF LIBS="-lm $LIBS" fi #AC_CHECK_LIB([termcap], [clear]) # FIXME: Replace `main' with a function in `-lreadline': # Check whether --with-readline was given. if test "${with_readline+set}" = set; then withval=$with_readline; nc_cv_readline=$withval else nc_cv_readline=yes fi if test "$nc_cv_readline" = yes ; then ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$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 $as_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 $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$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 $as_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 $as_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 { $as_echo "$as_me:$LINENO: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$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 $as_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 $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$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 $as_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 $as_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 { { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 $as_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 { $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if test "${ac_cv_path_GREP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break 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 if test -z "$ac_cv_path_GREP"; then { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 $as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:$LINENO: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if test "${ac_cv_path_EGREP+set}" = set; then $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break 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 if test -z "$ac_cv_path_EGREP"; then { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 $as_echo "$as_me: error: no acceptable egrep 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 { $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if test "${ac_cv_header_stdc+set}" = set; then $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$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 $as_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 $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$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 $as_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 eval "$as_ac_Header=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if test `eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` = yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:$LINENO: checking for a readline compatible library" >&5 $as_echo_n "checking for a readline compatible library... " >&6; } if test "${vl_cv_lib_readline+set}" = set; then $as_echo_n "(cached) " >&6 else ORIG_LIBS="$LIBS" for readline_lib in readline edit editline; do for termcap_lib in "" termcap curses ncurses; do if test -z "$termcap_lib"; then TRY_LIB="-l$readline_lib" else TRY_LIB="-l$readline_lib -l$termcap_lib" fi LIBS="$ORIG_LIBS $TRY_LIB" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char readline (); int main () { return readline (); ; 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$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 $as_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 && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then vl_cv_lib_readline="$TRY_LIB" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -n "$vl_cv_lib_readline"; then break fi done if test -n "$vl_cv_lib_readline"; then break fi done if test -z "$vl_cv_lib_readline"; then vl_cv_lib_readline="no" LIBS="$ORIG_LIBS" fi fi { $as_echo "$as_me:$LINENO: result: $vl_cv_lib_readline" >&5 $as_echo "$vl_cv_lib_readline" >&6; } if test "$vl_cv_lib_readline" != "no"; then cat >>confdefs.h <<\_ACEOF #define HAVE_LIBREADLINE 1 _ACEOF for ac_header in readline.h readline/readline.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$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 $as_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_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$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 $as_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 ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ---------------------------------------- ## ## Report this to kyle-wcalc@memoryhole.net ## ## ---------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi if test `eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` = yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:$LINENO: checking whether readline supports history" >&5 $as_echo_n "checking whether readline supports history... " >&6; } if test "${vl_cv_lib_readline_history+set}" = set; then $as_echo_n "(cached) " >&6 else vl_cv_lib_readline_history="no" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char add_history (); int main () { return add_history (); ; 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$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 $as_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 && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then vl_cv_lib_readline_history="yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $vl_cv_lib_readline_history" >&5 $as_echo "$vl_cv_lib_readline_history" >&6; } if test "$vl_cv_lib_readline_history" = "yes"; then cat >>confdefs.h <<\_ACEOF #define HAVE_READLINE_HISTORY 1 _ACEOF for ac_header in history.h readline/history.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$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 $as_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_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$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 $as_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 ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ---------------------------------------- ## ## Report this to kyle-wcalc@memoryhole.net ## ## ---------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi if test `eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` = yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done fi fi fi { $as_echo "$as_me:$LINENO: checking for __gmpz_init in -lgmp" >&5 $as_echo_n "checking for __gmpz_init in -lgmp... " >&6; } if test "${ac_cv_lib_gmp___gmpz_init+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgmp $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char __gmpz_init (); int main () { return __gmpz_init (); ; 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$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 $as_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 && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_gmp___gmpz_init=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_gmp___gmpz_init=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gmp___gmpz_init" >&5 $as_echo "$ac_cv_lib_gmp___gmpz_init" >&6; } if test $ac_cv_lib_gmp___gmpz_init = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBGMP 1 _ACEOF LIBS="-lgmp $LIBS" else { $as_echo "$as_me:$LINENO: checking for mpz_init in -lgmp" >&5 $as_echo_n "checking for mpz_init in -lgmp... " >&6; } if test "${ac_cv_lib_gmp_mpz_init+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgmp $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char mpz_init (); int main () { return mpz_init (); ; 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$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 $as_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 && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_gmp_mpz_init=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_gmp_mpz_init=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gmp_mpz_init" >&5 $as_echo "$ac_cv_lib_gmp_mpz_init" >&6; } if test $ac_cv_lib_gmp_mpz_init = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBGMP 1 _ACEOF LIBS="-lgmp $LIBS" else { $as_echo "$as_me:$LINENO: checking for mpz_init in -lgmp2" >&5 $as_echo_n "checking for mpz_init in -lgmp2... " >&6; } if test "${ac_cv_lib_gmp2_mpz_init+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgmp2 $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char mpz_init (); int main () { return mpz_init (); ; 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$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 $as_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 && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_gmp2_mpz_init=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_gmp2_mpz_init=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gmp2_mpz_init" >&5 $as_echo "$ac_cv_lib_gmp2_mpz_init" >&6; } if test $ac_cv_lib_gmp2_mpz_init = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBGMP2 1 _ACEOF LIBS="-lgmp2 $LIBS" fi fi fi { $as_echo "$as_me:$LINENO: checking for mpfr_free_str in -lmpfr" >&5 $as_echo_n "checking for mpfr_free_str in -lmpfr... " >&6; } if test "${ac_cv_lib_mpfr_mpfr_free_str+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmpfr $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char mpfr_free_str (); int main () { return mpfr_free_str (); ; 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$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 $as_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 && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_mpfr_mpfr_free_str=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_mpfr_mpfr_free_str=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_mpfr_mpfr_free_str" >&5 $as_echo "$ac_cv_lib_mpfr_mpfr_free_str" >&6; } if test $ac_cv_lib_mpfr_mpfr_free_str = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBMPFR 1 _ACEOF LIBS="-lmpfr $LIBS" else { { $as_echo "$as_me:$LINENO: error: Need MPFR 2.1.x or better. see http://www.mpfr.org" >&5 $as_echo "$as_me: error: Need MPFR 2.1.x or better. see http://www.mpfr.org" >&2;} { (exit 1); exit 1; }; } fi # what version of mpfr { $as_echo "$as_me:$LINENO: checking for mpfr_sec" >&5 $as_echo_n "checking for mpfr_sec... " >&6; } if test "${ac_cv_func_mpfr_sec+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define mpfr_sec to an innocuous variant, in case declares mpfr_sec. For example, HP-UX 11i declares gettimeofday. */ #define mpfr_sec innocuous_mpfr_sec /* System header to define __stub macros and hopefully few prototypes, which can conflict with char mpfr_sec (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef mpfr_sec /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char mpfr_sec (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_mpfr_sec || defined __stub___mpfr_sec choke me #endif int main () { return mpfr_sec (); ; 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$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 $as_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 && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_func_mpfr_sec=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_mpfr_sec=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_mpfr_sec" >&5 $as_echo "$ac_cv_func_mpfr_sec" >&6; } if test $ac_cv_func_mpfr_sec = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_MPFR_22 1 _ACEOF fi # Checks for header files. { $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if test "${ac_cv_header_stdc+set}" = set; then $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$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 $as_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 $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi { $as_echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5 $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } if test "${ac_cv_header_sys_wait_h+set}" = set; then $as_echo_n "(cached) " >&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 #ifndef WEXITSTATUS # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8) #endif #ifndef WIFEXITED # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) #endif int main () { int s; wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$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 $as_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_sys_wait_h=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_sys_wait_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 $as_echo "$ac_cv_header_sys_wait_h" >&6; } if test $ac_cv_header_sys_wait_h = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_SYS_WAIT_H 1 _ACEOF fi { $as_echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } if test "${ac_cv_header_time+set}" = set; then $as_echo_n "(cached) " >&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 int main () { if ((struct tm *) 0) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$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 $as_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_time=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_time=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 $as_echo "$ac_cv_header_time" >&6; } if test $ac_cv_header_time = yes; then cat >>confdefs.h <<\_ACEOF #define TIME_WITH_SYS_TIME 1 _ACEOF fi for ac_header in fcntl.h float.h inttypes.h limits.h stddef.h stdint.h stdlib.h string.h sys/time.h unistd.h stdio.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$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 $as_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_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$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 $as_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 ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ---------------------------------------- ## ## Report this to kyle-wcalc@memoryhole.net ## ## ---------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi if test `eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` = yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done # Checks for typedefs, structures, and compiler characteristics. { $as_echo "$as_me:$LINENO: checking for inline" >&5 $as_echo_n "checking for inline... " >&6; } if test "${ac_cv_c_inline+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; static $ac_kw foo_t static_foo () {return 0; } $ac_kw foo_t foo () {return 0; } #endif _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$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 $as_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_c_inline=$ac_kw else $as_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 test "$ac_cv_c_inline" != no && break done fi { $as_echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 $as_echo "$ac_cv_c_inline" >&6; } case $ac_cv_c_inline in inline | yes) ;; *) case $ac_cv_c_inline in no) ac_val=;; *) ac_val=$ac_cv_c_inline;; esac cat >>confdefs.h <<_ACEOF #ifndef __cplusplus #define inline $ac_val #endif _ACEOF ;; esac { $as_echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } if test "${ac_cv_c_const+set}" = set; then $as_echo_n "(cached) " >&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 () { /* FIXME: Include the comments suggested by Paul. */ #ifndef __cplusplus /* Ultrix mips cc rejects this. */ typedef int charset[2]; const charset cs; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this. */ char *t; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; }; struct s *b; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; if (!foo) return 0; } return !cs[0] && !zero.x; #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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$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 $as_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_c_const=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 $as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then cat >>confdefs.h <<\_ACEOF #define const /**/ _ACEOF fi { $as_echo "$as_me:$LINENO: checking for size_t" >&5 $as_echo_n "checking for size_t... " >&6; } if test "${ac_cv_type_size_t+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_type_size_t=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if (sizeof (size_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$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 $as_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 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if (sizeof ((size_t))) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$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 $as_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 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_size_t=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else $as_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 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 $as_echo "$ac_cv_type_size_t" >&6; } if test $ac_cv_type_size_t = yes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi # Checks for library functions. for ac_header in stdlib.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$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 $as_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_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$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 $as_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 ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ---------------------------------------- ## ## Report this to kyle-wcalc@memoryhole.net ## ## ---------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi if test `eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` = yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:$LINENO: checking for GNU libc compatible malloc" >&5 $as_echo_n "checking for GNU libc compatible malloc... " >&6; } if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then ac_cv_func_malloc_0_nonnull=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #if defined STDC_HEADERS || defined HAVE_STDLIB_H # include #else char *malloc (); #endif int main () { return ! malloc (0); ; 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_malloc_0_nonnull=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_malloc_0_nonnull=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_malloc_0_nonnull" >&5 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; } if test $ac_cv_func_malloc_0_nonnull = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_MALLOC 1 _ACEOF else cat >>confdefs.h <<\_ACEOF #define HAVE_MALLOC 0 _ACEOF case " $LIBOBJS " in *" malloc.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS malloc.$ac_objext" ;; esac cat >>confdefs.h <<\_ACEOF #define malloc rpl_malloc _ACEOF fi for ac_header in stdlib.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$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 $as_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_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$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 $as_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 ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ---------------------------------------- ## ## Report this to kyle-wcalc@memoryhole.net ## ## ---------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi if test `eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` = yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:$LINENO: checking for GNU libc compatible realloc" >&5 $as_echo_n "checking for GNU libc compatible realloc... " >&6; } if test "${ac_cv_func_realloc_0_nonnull+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then ac_cv_func_realloc_0_nonnull=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #if defined STDC_HEADERS || defined HAVE_STDLIB_H # include #else char *realloc (); #endif int main () { return ! realloc (0, 0); ; 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_realloc_0_nonnull=yes else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_realloc_0_nonnull=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_realloc_0_nonnull" >&5 $as_echo "$ac_cv_func_realloc_0_nonnull" >&6; } if test $ac_cv_func_realloc_0_nonnull = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_REALLOC 1 _ACEOF else cat >>confdefs.h <<\_ACEOF #define HAVE_REALLOC 0 _ACEOF case " $LIBOBJS " in *" realloc.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS realloc.$ac_objext" ;; esac cat >>confdefs.h <<\_ACEOF #define realloc rpl_realloc _ACEOF fi for ac_func in vprintf do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$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 $as_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 && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if test `eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` = yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF { $as_echo "$as_me:$LINENO: checking for _doprnt" >&5 $as_echo_n "checking for _doprnt... " >&6; } if test "${ac_cv_func__doprnt+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define _doprnt to an innocuous variant, in case declares _doprnt. For example, HP-UX 11i declares gettimeofday. */ #define _doprnt innocuous__doprnt /* System header to define __stub macros and hopefully few prototypes, which can conflict with char _doprnt (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef _doprnt /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char _doprnt (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub__doprnt || defined __stub____doprnt choke me #endif int main () { return _doprnt (); ; 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$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 $as_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 && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_func__doprnt=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func__doprnt=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5 $as_echo "$ac_cv_func__doprnt" >&6; } if test $ac_cv_func__doprnt = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_DOPRNT 1 _ACEOF fi fi done for ac_func in gettimeofday memset modf pow stpcpy strchr strdup strerror strrchr strtoul do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; 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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$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 $as_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 && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if test `eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` = yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done ac_config_files="$ac_config_files Makefile English.lproj/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_*) { $as_echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 $as_echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) $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" && { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. 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 { { $as_echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_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 { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_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_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # 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 as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # 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.) 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 $as_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. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # 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 || $as_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" || { $as_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 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: 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 wcalc $as_me 2.4, which was generated by GNU Autoconf 2.62. 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 || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 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 --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ wcalc config.status 2.4 configured by $0, generated by GNU Autoconf 2.62, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2008 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac CONFIG_FILES="$CONFIG_FILES '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header { $as_echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; };; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) { $as_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 || ac_write_fail=1 if \$ac_cs_recheck; then set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "English.lproj/Makefile") CONFIG_FILES="$CONFIG_FILES English.lproj/Makefile" ;; *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 $as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers 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") } || { $as_echo "$as_me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=' ' ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` = $ac_delim_num; then break elif $ac_last_try; then { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 $as_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 rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\).*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\).*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5 $as_echo "$as_me: error: could not setup config files machinery" >&2;} { (exit 1); exit 1; }; } _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 || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_t=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_t"; then break elif $ac_last_try; then { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5 $as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;} { (exit 1); exit 1; }; } else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] if (D_is_set[macro]) { # Preserve the white space surrounding the "#". prefix = substr(line, 1, index(line, defundef) - 1) print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", line, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5 $as_echo "$as_me: error: could not setup config headers machinery" >&2;} { (exit 1); exit 1; }; } fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 $as_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 || { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 $as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} { (exit 1); exit 1; }; };; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; 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 '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:$LINENO: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin" \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` { as_dir="$ac_dir" 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=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 $as_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=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p ' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } 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"; } && { $as_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 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; esac \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" } >"$tmp/config.h" \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$tmp/config.h" "$ac_file" \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5 $as_echo "$as_me: error: could not create -" >&2;} { (exit 1); exit 1; }; } fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || 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 -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` { as_dir=$dirpart/$fdir 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=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 $as_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 test $ac_write_fail = 0 || { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5 $as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } # 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 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:$LINENO: WARNING: Unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: Unrecognized options: $ac_unrecognized_opts" >&2;} fi wcalc-2.4/configure.in0000644000175000000620000000305511074301367013253 0ustar kkstaff# Process this file with autoconf to produce a configure script. AC_PREREQ(2.50) AC_INIT(wcalc, 2.4, kyle-wcalc@memoryhole.net) AM_INIT_AUTOMAKE(wcalc, 2.4) AC_CONFIG_SRCDIR([WcalcController.h]) AM_CONFIG_HEADER(config.h) # Checks for programs. AC_PROG_YACC AC_PROG_CC AM_PROG_LEX AC_PROG_INSTALL # Checks for libraries. # FIXME: Replace `main' with a function in `-ll': AC_CHECK_LIB([l], [main]) AC_CHECK_LIB([m], [acos]) #AC_CHECK_LIB([termcap], [clear]) # FIXME: Replace `main' with a function in `-lreadline': AC_ARG_WITH(readline,[ --without-readline do not try to find and use the readline library],nc_cv_readline=$withval,nc_cv_readline=yes) if test "$nc_cv_readline" = yes ; then VL_LIB_READLINE fi AC_CHECK_LIB(gmp, __gmpz_init, , [AC_CHECK_LIB(gmp, mpz_init, , [AC_CHECK_LIB(gmp2, mpz_init)])]) AC_CHECK_LIB(mpfr, mpfr_free_str, , [AC_MSG_ERROR( [Need MPFR 2.1.x or better. see http://www.mpfr.org])]) # what version of mpfr AC_CHECK_FUNC(mpfr_sec, [AC_DEFINE(HAVE_MPFR_22,1,"MPFR version 2.2 or better")]) # Checks for header files. AC_HEADER_STDC AC_HEADER_SYS_WAIT AC_HEADER_TIME AC_CHECK_HEADERS([fcntl.h float.h inttypes.h limits.h stddef.h stdint.h stdlib.h string.h sys/time.h unistd.h stdio.h]) # Checks for typedefs, structures, and compiler characteristics. AC_C_INLINE AC_C_CONST AC_TYPE_SIZE_T # Checks for library functions. AC_FUNC_MALLOC AC_FUNC_REALLOC AC_FUNC_VPRINTF AC_CHECK_FUNCS([gettimeofday memset modf pow stpcpy strchr strdup strerror strrchr strtoul]) AC_CONFIG_FILES([Makefile English.lproj/Makefile]) AC_OUTPUT wcalc-2.4/conversion.c0000644000175000000620000031461610725564203013305 0ustar kkstaff/* vim:expandtab * conversion.c * Wcalc * * Created by Kyle Wheeler on Wed Jul 31 2002. * Copyright (c) 2002 Kyle Wheeler. All rights reserved. * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include /* for calloc() */ #include /* for strcmp() */ #include "number.h" #include "calculator.h" #include "conversion.h" #ifdef MEMWATCH #include "memwatch.h" #endif /* The conversion tables */ /* based on Meters */ const struct conversion lengths[] = { {"1e-10", "Angstroms", {"Å","angstrom","angstroms",NULL}}, {/* the following value is from wikipedia. An AU is 149,597,870,691 meters (plus or minus 30). */ "149597870691", "Astronomical Units", {"AU","ua","astronomical_unit","astronomical_units",NULL}}, {"5.291772108e-11", "Atomic Unit", {"au","atomic_unit","a0","b",NULL}}, {"10e-18", "Attometers", {"am","attometer","attometers",NULL}}, {"0.008466667", "Barley Corn", {"barley_corn",NULL}}, {/* 1 cable length = 720 feet, 1 foot = 12 inches, 1 inch = 0.0254 meters. So, 1 cable lenght = 720*12*0.0254 meters */ "219.456", "Cable Lengths (U.S.)", {"cable_length","cable_lengths",NULL}}, {/* 1 cable length = 0.1 NM, 1 NM = 1852 meters. So, 1 cable length = 185.2 meters EXACTLY */ "185.2", "Cable Lengths (International)", {"cable_length.international","cable_lengths.international",NULL}}, {/* 1 cable length = 608 feet, 1 foot = 12 inches, 1 inch = 0.0254 meters. So, 1 cable length = 608*12*0.0254 meters */ "185.3184", "Cable Lengths (Imperial)", {"cable_length.Imp","cable_lengths.Imp",NULL}}, {/* 1 calibre = 1 inch (copy the value from there) */ "0.0254", "Calibre", {"cal","calibre","calibres",NULL}}, {"1e-2", "Centimeters", {"cm","centimeter","centimeters",NULL}}, {/* 1 Chain = 66 feet, 1 foot = 12 inches, 1 inch = 1/39.37 meters EXACTLY. So, 1 chain = 66*12/39.37 meters */ "2.0116840233680467360934721869443738887477774955549911099822199644399288798577597155194310388620777241554483108966217932435864871729743459486918973837947675895351790703581407162814325628651257302514605029210058420116840233680467360934721869443738887477774955549911099822199644399288798577597155194310388620777241554483108966217932435864871729743459486918973837947675895351790703581407162814325628651257302514605029210058420116840233680467360934721869443738887477774955549911099822199644399288798577597155194310388620777241554483108966217932435864871729743459486918973837947675895351790703581407162814325628651257302514605029210058420116840233680467360934721869443738887477774955549911099822199644399288798577597155194310388620777241554483108966217932435864871729743459486918973837947675895351790703581407162814325628651257302514605029210058420116840233680467360934721869443738887477774955549911099822199644399288798577597155194310388620777241554483108966217932435864871729743459486918973837947675895351790703581407162814325628651257302514605029210058420116840233680467360934721869443738887477774955549911099822199644399288798577597155194310388620777241554483108966217932435864871729743459486918973837947675895351790703581407162814325621e1", "Chains (Gunter's)", {"ch","chain","chains","chain_gunter","chain_surveyor",NULL}}, {/* 1 chain = 100 feet, 1 foot = 12 inches, 1 inch = 0.0254 meters EXACTLY. So, 1 chain = 100*12*0.0254 meters */ "30.48", "Chains (Ramsden's)", {"chain_ramsden","chain_engineer",NULL}}, {/* 1 cubit = 18 inches, 1 inch = 0.0254 meters EXACTLY. So 1 cubit = 18*0.0254 meters */ "0.4572", "Cubits", {"cubit","cubits",NULL}}, {"10", "Decameters", {"dam","decameter","decameters",NULL}}, {"0.1", "Decimeters", {"dm","decimeter","decimeters",NULL}}, {/* 1 ell = 45 inches, 1 inch = 0.0254 meters EXACTLY. So, 1 ell = 45*0.0254 meters. */ "1.143", "ell", {"ell",NULL}}, {"1e18", "Exameters", {"Em","exameter","exameters",NULL}}, {/* 1 fathom = 1/1000 NM, 1 NM = 1852 meters. (or 6 ft) */ "1.852", "Fathoms", {"fth","fath","fathom","fathoms",NULL}}, {"1e-15", "Fermis (femtometer)", {"fm","fermi","fermis","femtometer","femtometers",NULL}}, {/* 1 finger = 7/8 inches, 1 inch = 0.0254 meters EXACTLY. So 1 finger = 7/8*0.0254 meters */ "2.2225e-2", "Fingers", {"finger","fingers",NULL}}, {/* 1 finger = 4.5 inches, 1 inch = 0.0254 meters EXACTLY. So 1 finger = 4.5*0.0254 meters */ "0.1143", "Fingers (cloth)", {"finger_cloth","fingers_cloth",NULL}}, {/* 1 foot = 12 inches, 1 inch = 0.0254 meters EXACTLY. So, 1 foot = 12*0.0254 = 0.3048 meters EXACTLY (international) */ "0.3048", "Feet", {"ft","feet","foot","'",NULL}}, {/* 1 foot = 12 inches, 1 inch = 1/39.37 meters EXACTLY (US Survey). So, 1 foot = 12/39.37 meters. */ "3.0480060960121920243840487680975361950723901447802895605791211582423164846329692659385318770637541275082550165100330200660401320802641605283210566421132842265684531369062738125476250952501905003810007620015240030480060960121920243840487680975361950723901447802895605791211582423164846329692659385318770637541275082550165100330200660401320802641605283210566421132842265684531369062738125476250952501905003810007620015240030480060960121920243840487680975361950723901447802895605791211582423164846329692659385318770637541275082550165100330200660401320802641605283210566421132842265684531369062738125476250952501905003810007620015240030480060960121920243840487680975361950723901447802895605791211582423164846329692659385318770637541275082550165100330200660401320802641605283210566421132842265684531369062738125476250952501905003810007620015240030480060960121920243840487680975361950723901447802895605791211582423164846329692659385318770637541275082550165100330200660401320802641605283210566421132842265684531369062738125476250952501905003810007620015240030480060960121920243840487680975361950723901447802895605791211582423164846329692659385318770637541275082550165100330200660401320802641605283210566421132842265684531369062738125476250942e-1", "Feet (U.S. Survey)", {"feet.US","foot.US",NULL}}, {/* 1 furlong = 660 feet, 1 foot = 12 inches, 1 inch = 0.0254 meters EXACTLY. So, 1 furlong = 660*12*0.0254 meters */ "201.168", "Furlongs", {"fur","furlong","furlongs",NULL}}, {/* 1 gm = 6082 feet, 1 foot = 12 inches, 1 inch = 0.0254 meters EXACTLY. So, 1 gm = 6082*12*0.0254 meters */ "1853.7936", "Geographic Mile", {"geographic_mile","geographic_miles",NULL}}, {"1e9", "Gigameters", {"Gm","gigameter","gigameters",NULL}}, {/* 1 hand = 4 inches, 1 inch = 0.0254 meters EXACTLY. So 1 hand = 4*0.0254 meters */ "0.1016", "Hands", {"hand","hands",NULL}}, {"1e-2", "Hectometers", {"hm","hectometer","hectometers",NULL}}, {/* 1 inch = 0.0254 meters EXACTLY. (international) */ "0.0254", "Inches", {"in","inch","inches","\"",NULL}}, {/* 1 inch = 1/39.37 meters EXACTLY. (US Survey) */ "39.37", "Inches (U.S. Survey)", {"inch.US","inches.US","\"",NULL}}, {"1e3", "Kilometers", {"km","kilometer","kilometers",NULL}}, {/* 1 league = 3 miles, 1 mile = 5280 feet, aka 63360 inches, 1 inch = 0.0254 meters EXACTLY. So, 1 league = 3*63360*0.0254 meters */ "4828.032", "Leagues", {"lea","league","leagues",NULL}}, {"299792458", "Light-second", {"lightsecond","light-second",NULL}}, {"17987547480", "Light-minute", {"lightminute","light-minute",NULL}}, {"1079252848800", "Light-hour", {"lighthour","light-hour",NULL}}, {"25902068371200", "Light-day", {"lightday","light-day",NULL}}, {/* this value is from wikipedia; 1 lightyear is exactly 360.25 light-days */ "9460730472580800","Light-years", {"ly","LY","lightyear","lightyears","light-year","light-years",NULL}}, {/* 1 line = 1/12 inch, 1 inch = 0.0254 meters EXACTLY. */ "2.1166666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666677e-3", "Lines", {"ln","line","lines",NULL}}, {/* 1 link = 1 foot (international/engineer), so copy value from foot */ "0.3048", "Links", {"lnk","link","links","link_ramsden","link_engineer",NULL}}, {/* 1 link = 33/50 foot, 1 foot = 12 inches, 1 inch = 1/39.37 meters EXACTLY. So, 1 link = 33/50*12/39.37 meters */ "2.0116840233680467360934721869443738887477774955549911099822199644399288798577597155194310388620777241554483108966217932435864871729743459486918973837947675895351790703581407162814325628651257302514605029210058420116840233680467360934721869443738887477774955549911099822199644399288798577597155194310388620777241554483108966217932435864871729743459486918973837947675895351790703581407162814325628651257302514605029210058420116840233680467360934721869443738887477774955549911099822199644399288798577597155194310388620777241554483108966217932435864871729743459486918973837947675895351790703581407162814325628651257302514605029210058420116840233680467360934721869443738887477774955549911099822199644399288798577597155194310388620777241554483108966217932435864871729743459486918973837947675895351790703581407162814325628651257302514605029210058420116840233680467360934721869443738887477774955549911099822199644399288798577597155194310388620777241554483108966217932435864871729743459486918973837947675895351790703581407162814325628651257302514605029210058420116840233680467360934721869443738887477774955549911099822199644399288798577597155194310388620777241554483108966217932435864871729743459486918973837947675895351790703581407162814325638e-1", "Links (Surveyor's)", {"link_gunter","link_surveyor",NULL}}, {"1e6", "Megameters", {"Mm","megameter","megameters",NULL}}, {"1", "Meters", {"m","meter","meters",NULL}}, {/* 1 mickey = 1/200 inches, 1 inch = 0.0254 meters EXACTLY. So, 1 mickey = 1/(39.37*200) = 1/7874 meters */ "1.2700025400050800101600203200406400812801625603251206502413004826009652019304038608077216154432308864617729235458470916941833883667767335534671069342138684277368554737109474218948437896875793751587503175006350012700025400050800101600203200406400812801625603251206502413004826009652019304038608077216154432308864617729235458470916941833883667767335534671069342138684277368554737109474218948437896875793751587503175006350012700025400050800101600203200406400812801625603251206502413004826009652019304038608077216154432308864617729235458470916941833883667767335534671069342138684277368554737109474218948437896875793751587503175006350012700025400050800101600203200406400812801625603251206502413004826009652019304038608077216154432308864617729235458470916941833883667767335534671069342138684277368554737109474218948437896875793751587503175006350012700025400050800101600203200406400812801625603251206502413004826009652019304038608077216154432308864617729235458470916941833883667767335534671069342138684277368554737109474218948437896875793751587503175006350012700025400050800101600203200406400812801625603251206502413004826009652019304038608077216154432308864617729235458470916941833883667767335534671069342138684277368554737109474218948437896e-4", "Mickeys", {"mickey",NULL}}, {/* 1 microinch = 1e-6 inches, 1 inch = 0.0254 meters EXACTLY. So, 1 microinch = 1e-6*0.0254 meters */ "2.54e-8", "Microinches", {"mci","microinch","microinches",NULL}}, {"1e-6", "Micrometers", {"µm","micrometer","micrometers",NULL}}, {"1e-6", "Microns", {"µ","micron","microns",NULL}}, {/* 1 mil = 1.000e-3 inches, 1 inch = 0.0254 meters EXACTLY. So, 1 mil = 1e-3*0.0254 meters */ "2.54e-5", "Mils", {"mils","mil","thou","thous",NULL}}, {/* 1 mile = 5280 feet, aka 63360 inches, 1 inch = 0.0254 meters EXACTLY. So, 1 mile = 63360*0.0254 = approx 1.609344e3 meters */ "1609.344", "Miles", {"mi","mile","miles",NULL}}, {/* 1 mile = 8000 links, 1 link = 33/50 feet, 1 foot = 12 inches, 1 inch = 1/39.37 meters EXACTLY. So, 1 mile = 8000*33/50*12/39.37 meters */ "1.6093472186944373888747777495554991109982219964439928879857759715519431038862077724155448310896621793243586487172974345948691897383794767589535179070358140716281432562865125730251460502921005842011684023368046736093472186944373888747777495554991109982219964439928879857759715519431038862077724155448310896621793243586487172974345948691897383794767589535179070358140716281432562865125730251460502921005842011684023368046736093472186944373888747777495554991109982219964439928879857759715519431038862077724155448310896621793243586487172974345948691897383794767589535179070358140716281432562865125730251460502921005842011684023368046736093472186944373888747777495554991109982219964439928879857759715519431038862077724155448310896621793243586487172974345948691897383794767589535179070358140716281432562865125730251460502921005842011684023368046736093472186944373888747777495554991109982219964439928879857759715519431038862077724155448310896621793243586487172974345948691897383794767589535179070358140716281432562865125730251460502921005842011684023368046736093472186944373888747777495554991109982219964439928879857759715519431038862077724155448310896621793243586487172974345948691897383794767589535179070358140716281432562865125730251460502e3", "Miles (U.S. Survey)", {"mile.US",NULL}}, {"1e-3", "Millimeters", {"mm","millimeter","millimeters",NULL}}, {/* 1 NL = 3 NM, 1 NM = 1852 meters EXACTLY. */ "5556", "Nautical Leagues", {"NL","nl","nautical_league","nautical_leagues",NULL}}, {"1852", "Nautical Miles", {"nmi","n_mile","n_miles","naut_mi","NM","n.m.","nautical_mile","nautical_miles",NULL}}, {/* 1 NM(adm) = 6080 feet, 1 foot = 12 inches, 1 inch = 0.0254 meters EXACTLY. So, 1 NM(adm) = 6080*12*0.0254 meters */ "1853.184", "Nautical Miles (Admiralty)",{"nautical_mile_admiralty","nautical_miles_admiralty",NULL}}, {"1e-9", "Nanometers", {"nm","nanometer","nanometers",NULL}}, {/* 1 pace = 2.5 feet, 1 foot = 12 inches, 1 inch = 0.0254 meters EXACTLY. So, 1 pace = 2.5*12*0.0254 meters */ "0.762", "Paces", {"pace","paces",NULL}}, {/* 1 palm = 3 inches, 1 inch = 0.0254 meters EXACTLY. So, 1 palm = 3*0.0254 meters */ "0.0762", "Palms", {"palm","palms",NULL}}, {/* Accordingto wikipedia, a parsec is AU/(tan 1"), where 1" is 1 arcsecond. Since an arcminute is one sixtieth of a degree, an arcsecond is one 3600th of a degree (1/(60*60)). 1/tan(1/3600) is 206264.80624548 (or so). Since an AU is 149,597,870,691 meters (plus/minus 30), that makes a parsec equal to... */ "3.0856775812815532551662293307624661169222692502222270426081550857417878384638999664699494407044042861602932526374318282499488847652952634794645249141496980063074636858211454807681864726160105407307641779418881311355100588628419722041218901230894205020947799677195720827607257117521428907774778761405872034835465103085631243748951756567312805730872050305047898113261823840201264119675037598195042586352981308836070658938595405030339374553212392440123798481742099013358058995563100552008571554273559596511759202860948271101418509640612111277024400471208264695880181534297105712763766329751662367524228052400468732985263042049136985383758443443380079254183864371360974040014983302470733443592542873383270001285046347408234028157433258037566336348468957134529293451389011373577259268212813972619554240216664384144944608982944614500982419232106751210208167706334127233172935836463139828831751573494313836207461334598375683284660892786805672511641013972755087507259833750048075706711919506474598156162153778257464270314209204366432992995467924164800500074633057880739313620879317654923853591805278058571465232061488212786096086032554448490686544572188808938011635920419618939912850107913457825562320650694313831446304849437714222898707245175e16", "Parsec", {"pc","psc","parsec","parsecs",NULL}}, {"1e15", "Petameters", {"Pm","petameter","petameters",NULL}}, {/* 1 pica = 1/6 inch, 1 inch = 0.0254 meters EXACTLY. So, 1 pica = 0.0254/6 meters */ "4.2333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333353e-3", "Pica", {"pi","pica","picas",NULL}}, {"4.512e-3", "Pica (French)", {"pica_french",NULL}}, {"4.2175e-3", "Pica (American)", {"pica_american",NULL}}, {"1e-12", "Picometer", {"pm","picometer","picometers",NULL}}, {/* 1 point = 1/72 inches, 1 inch = 0.0254 meters EXACTLY. So, 1point = 0.0254/72 meters */ "3.5277777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777763e-4", "Points (DTP)", {"pt","point","points","point_dtp","points_dtp",NULL}}, {"3.513666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666e-4", "Points (Johnson)", {"johnson_point","johnson_points","points_johnson","point_johnson",NULL}}, {"1.879857552e-4", "Points (Trebuchet)", {"trebuchet_point","trebuchet_points","points_trebuchet","point_trebuchet",NULL}}, {"3.45e-4", "Points (Fournier)", {"fournier_point","fournier_points","point_fournier","points_fournier",NULL}}, {"3.759715104e-4", "Points (Didot)", {"didot_point","didot_points","point_didot","points_didot",NULL}}, {/* 1 quarter = 1/4 yard, 1 yard = 3 feet, 1 foot = 12 inches, 1 inch = 0.0254 meters EXACTLY. So, 1 quarter = 0.25*3*12*0.0254 meters */ "0.1524", "Quarters", {"quarter","quarters",NULL}}, {/* 1 rod = 25 links, 1 link = 33/50 foot, 1 foot = 12 inches, 1 inch = 1/39.37 meters EXACTLY. So, 1 rod = 25*33/50*12/39.37 meters*/ "5.0292100584201168402336804673609347218694437388874777749555499110998221996443992887985775971551943103886207772415544831089662179324358648717297434594869189738379476758953517907035814071628143256286512573025146050292100584201168402336804673609347218694437388874777749555499110998221996443992887985775971551943103886207772415544831089662179324358648717297434594869189738379476758953517907035814071628143256286512573025146050292100584201168402336804673609347218694437388874777749555499110998221996443992887985775971551943103886207772415544831089662179324358648717297434594869189738379476758953517907035814071628143256286512573025146050292100584201168402336804673609347218694437388874777749555499110998221996443992887985775971551943103886207772415544831089662179324358648717297434594869189738379476758953517907035814071628143256286512573025146050292100584201168402336804673609347218694437388874777749555499110998221996443992887985775971551943103886207772415544831089662179324358648717297434594869189738379476758953517907035814071628143256286512573025146050292100584201168402336804673609347218694437388874777749555499110998221996443992887985775971551943103886207772415544831089662179324358648717297434594869189738379476758953517907035814052e0", "Rods", {"rd","rod","rods","pole","poles","perch","perches",NULL}}, {/* 1 rope = 20 feet, 1 foot = 12 inches, 1 inch = 0.0254 meters EXACTLY. So, 1 rope = 20*12*0.0254 meters */ "6.096", "Ropes", {"rope","ropes",NULL}}, {/* 1 span = 6 inches, 1 inch = 0.0254 meters EXACTLY. So, 1 span = 6*0.0254 meters */ "0.1524", "Spans", {"span","spans",NULL}}, {/* 1 span = 9 inches, 1 inch = 0.0254 meters EXACTLY. So, 1 span = 9*0.0254 meters */ "0.2286", "Spans (cloth)", {"span_cloth","spans_cloth",NULL}}, {"1e12", "Spat", {"S","spat","spats",NULL}}, {/* 1 stick = 2 inches, 1 inch = 0.0254 meters EXACTLY. So, 1 stick = 2*0.0254 meters */ "0.0508", "Sticks", {"stick","sticks",NULL}}, {"1e12", "Stigma", {"stigma","stigmas","pm",NULL}}, {/* 1 telegraph mile = 6087 feet, 1 foot = 12 inches, 1 inch = 0.0254 meters EXACTLY. So, 1 telegraph mile = 6087*12*0.0254 meters */ "1.8553176e3", "Telegraph Mile", {"telegraph_mile","telegraph_miles",NULL}}, {"1e12", "Terameters", {"Tm","terameter","terameters",NULL}}, {/* 1 twip = 1/1440 inch, 1 inch = 0.0254 meters EXACTLY. So, 1 twip = 0.0254/1440 meters */ "1.7638888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888893e-5", "Twips", {"twip","twips",NULL}}, {"0.8359", "Varas", {"vara","varas",NULL}}, {"1.0021e-13", "X Unit (aka. Siegbahn)",{"xu","xunit","xunits","siegbahn","siegbahns",NULL}}, {/* 1 yard = 3 feet, 1 foot = 12 inches, 1 inch = 0.0254 meters EXACTLY. So, 1 yard = 3*12*0.0254 meters */ "1.0936132983377077865266841644794400699912510936132983377077865266841644794400699912510936132983377077865266841644794400699912510936132983377077865266841644794400699912510936132983377077865266841644794400699912510936132983377077865266841644794400699912510936132983377077865266841644794400699912510936132983377077865266841644794400699912510936132983377077865266841644794400699912510936132983377077865266841644794400699912510936132983377077865266841644794400699912510936132983377077865266841644794400699912510936132983377077865266841644794400699912510936132983377077865266841644794400699912510936132983377077865266841644794400699912510936132983377077865266841644794400699912510936132983377077865266841644794400699912510936132983377077865266841644794400699912510936132983377077865266841644794400699912510936132983377077865266841644794400699912510936132983377077865266841644794400699912510936132983377077865266841644794400699912510936132983377077865266841644794400699912510936132983377077865266841644794400699912510936132983377077865266841644794400699912510936132983377077865266841644794400699912510936132983377077865266841644794400699912510936132983377077865266841644794400699912510936132983377077865266841644794400699912510936132983377072e0", "Yards", {"yd","yard","yards",NULL}}, {"1e-24", "Yoctometers", {"ym","yoctometer","yoctometers",NULL}}, {"1e24", "Yottameters", {"Ym","yottameter","yottameters",NULL}}, {"1e-21", "Zeptometers", {"zm","zeptometer","zeptometers",NULL}}, {"1e21", "Zettameters", {"Zm","zettameter","zettameters",NULL}}, {NULL,NULL,{NULL}} }; /* based on square meters */ const struct conversion areas[] = { {"4046.8564224",/* EXACT */ "Acre", {"ac","A","acre","acres",NULL}}, {"3344.51", "Acre (Commercial)", {"commercial_acre","commercial_acres","acre_commercial","acres_commercial",NULL}}, {"6555", "Acre (Irish)", {"irish_acre","irish_acres","acre_irish","acres_irish",NULL}}, {"4046.873", "Acre (U.S. Survey)", {"survey_acre","survey_acres","acre_survey","acres_survey",NULL}}, {"100", "Are", {"a","are","ares",NULL}}, {"1e-28", "Barn", {"b","barn","barns",NULL}}, {/* 1 barony = 4000 acres, 1 acre = 4046.8564224 sq.m. EXACTLY. So, 1 barony = 4000*4046.8564224 sq.m. */ "1.61874256896e7", "Barony", {"barony","baronies",NULL}}, {/* estimate... */ "2.023221770682737240319370214656998546438306899547039215588833471320921126417471625370063492421868196787881732426840489464859900344367864146821099843183000038506071225552856842016409065783018158657272198517585250776863236643965216228988156338408792150936839914223551771012803563652400545572335254633969696071915e1", "Base boxe (tin plated steel)", {"base_boxe",NULL}}, {/* 1 board = 1inch x 1ft */ "7.74192e-3", "Board", {"bd","board",NULL}}, {/* (1 sq.ft.)(1 bhp)/(240 BTU(IT)/h) */ "12.958174", "Boiler Horsepower Equivalent Direct Radiation", {"bhp_EDR",NULL}}, {/* estimate... */ "3.305999986112183332250900563641124112558303300929789325905802207264226740664221594002750604630606542223660019712530364281515847019980891998125961680246092111352514042012279280725466865507524133144949184887277902155429993354271259285945652071796744450693961944931539190805938593793207959026039247786833451175548", "Bin (Taiwan)", {"bin","bins",NULL}}, {"3.305999986112183332250900563641124112558303300929789325905802207264226740664221594002750604630606542223660019712530364281515847019980891998125961680246092111352514042012279280725466865507524133144949184887277902155429993354271259285945652071796744450693961944931539190805938593793207959026039247786833451175548e0", "Bu (Japan)", {"bu.JP",NULL}}, {"4.410000059935411421183026945326372834220286611137416097234852550714893241410574459123776977064897518619480425367063529901504324339934038355394105297799988993678993564571415494611534079547367772947225780508895232355968395512690233633682393537001126240867341684697236269205893939385683827627936222183839342584823e2", "Cantero (Ecuador)", {"cantero",NULL}}, {"3.59999992883365115038623756679406629216561690371584415565930818480619801965401056179783277117848271209262157970079531953156885860207229291215190314829252358363842940138069833403135660496662831986569486645100890753605376190657495222069254109056024640636625690269104873222487000576803257426119544521134092701997e2", "Cao (Vietnam)", {"cao",NULL}}, {"1", "Centaire", {"ca","centiare","cetaires",NULL}}, {/* 1 circular inch = pi/4 sq.in. */ "5.067075e-4", "Circular Inch", {"circ_in","circular_inch","circular_inches",NULL}}, {/* 1 circular mil = pi/4 sq.mil. */ "5.067075e-10", "Circular Mil", {"circ_mil","circular_mil","circular_mils",NULL}}, {"5.067075e-10", "Circular Thou", {"circ_thou","circular_thou","circular_thous",NULL}}, {"6.555004219518634722507932857010961029789315628092761379337154926794186297011997686958690831577225289899557638948505674888113915664699717672899027971926028031857770636361722081931551470838347892427381355396853421535580827673563136471057017764092463340400959555792402922725306907214324010437841874146580084196008e3", "Colpa (Ireland)", {"colpa","colpas","colps","collops",NULL}}, {/* 1 cord = 192 bd */ "1.48644864", "Cord", {"cord","cords",NULL}}, {"1000", "Dunam", {"dunam",NULL}}, {"10000", "Hectare", {"ha","hectare","hectares",NULL}}, {/* 1 hide = 100 ac */ "4.0468564224e5", "Hide", {"hide","hides",NULL}}, {"7.168000005668004433796468337287356843034890464043065497687985566426709337293379097745799211651433314333710137544755094384672582410127590322307529625065049207134742281152149431268892610091244243875809771852194031378781046051473273764968402646532970250415978387899093934066229923308357507962660603791257315711045e2", "Labor (Canada)", {"labors.CA",NULL}}, {"7.168921877767936226749335695305580159433126660761736049601417183348095659875996457041629760850310008857395925597874224977856510186005314437555358724534986713906111603188662533215234720992028343666961913197519929140832595217006200177147918511957484499557130203720106288751107174490699734278122232063773250664306e5", "Labor (US)", {"labors.US","labor","labors",NULL}}, {"6.988954745473511146111813427835229588488453222252157033414157323551558106922540222024191932798651551889692523435503146609191829178151272114341768042056107046884822359922353705123688337167291843685021311282890873797138692585607803314474402282414219495851725972132993458092415670182855642827043568966350969542482e3", "Manzana (Costa Rica)", {"manzana","manzanas","manzanas.CR",NULL}}, {"9.999991104214131450062517606242864838417933904310996673964505814384485749445248909030705287556278200876729118378199394098140286543147032514097349550021498149182329015582451579743307156659731248424704585777615237492772173981803175795555072327681214571297252684797596160974187394671424264738587448046139476038248e3", "Manzana (Argentina)", {"manzanas.AR",NULL}}, {"1.600000158147460645992839873719252674174717360835176739671488187373111373372316682382570568362205129117517401162779204399662355171520805286869609395540636978434616897660801372719958407217850103883113211836546692049334100348517466398606720871708803080712533383940520740051042092923494189069242888800589890028205e3", "Rai (Thailand)", {"rai",NULL}}, {/* 1 rood = 1/4 acre, 1 acre = 4046.8564224 sq.m. EXACTLY So, 1 rood = 4046.8564224/4 sq.m. */ "1.0117141056e3", "Rood", {"rood","roods",NULL}}, {"3.59999992883365115038623756679406629216561690371584415565930818480619801965401056179783277117848271209262157970079531953156885860207229291215190314829252358363842940138069833403135660496662831986569486645100890753605376190657495222069254109056024640636625690269104873222487000576803257426119544521134092701997e2", "Sao (Vietnam)", {"sao",NULL}}, {"8.739999699024072597190560766011724964742017758167155430033351139059983759394245689275735294816373843754411729159745185002836032927872224764814179414791183782725927225713959562415556771860748079295857315156852256912567858020497911975184241066306223516990790845003392717450313012372857755891348934195345436654664", "Scruple (ancient Rome)", {"scruples.Rome",NULL}}, {"2.589988110336e6", "Section (US Survey)", {"sec","section","sections",NULL}}, {"9.290304353801154091418566889239602606869718848771024165861935609221250172644061708533453769824659381700018944674839184623380412865536832977961034392239792131671373970973612140722292639402112370615553355591170239284285000921522078762441451988952221740340250382150498762303665022427996846032920281509378670060128", "Square", {"sq","square","squares",NULL}}, {"8.360999920994321177587907040397686158370354160310125387631941962891131827421185224020767584796398398862318224957265861381726680680533099908465805581899964265632298314865067225899053221068136943617382439384628403896864201799676638681907600379359485425105095734056968052946366383381171988090307127138649016114877e1", "Square (Sri Lanka)", {"sq.SL",NULL}}, {"1e-36", "Square Attometer", {"sq.am.","am2","square_attometer",NULL}}, {"6.451600000025805371469845509191320707435529442123245191140166144103673088731225441279514880831979513788959750813070571019621127355870604679843533668010227339185504432925734940505033877235572640058484439547273739780365859541347322329319040875363552976419152218301495776911823523529142004795473690535005333951172e-8", "Square Caliber", {"sq.cal.","cal2","square_caliber",NULL}}, {"1e-4", "Square Centimeter", {"sq.cm.","cm2","square_centimeter",NULL}}, {"404.68564224", "Square Chain", {"sq.chain","chain2","square_chain",NULL}}, {"3.629024956115121479274781435318412530929479925610046753027408418176592990668264764512352827840701682245111697958272531341770230097648193034695161500021667325726687609305971817060116874144668763388228163064633134230769827737668372006218311369490336855293849998545641518734165007769944620370522491497465088272311e-4", "Square Digit", {"sq.digit.","square_digit",NULL}}, {"1e2", "Square Decameter", {"sq.dam.","dam2","square_decameter",NULL}}, {"1e-2", "Square Decimeter", {"sq.dm.","dm2","square_decimeter",NULL}}, {"1e36", "Square Exameter", {"sq.Em.","Em2","square_exameter",NULL}}, {"1e-30", "Square Femtometer", {"sq.fm.","fm2","square_femtometer",NULL}}, {"9.290303999976199816213594024505880622266235765981699256234837482841961280186241242536366837724159960778754603941227262392924018289593397791368431306698621324939571609514158812968601329784961443484290814502159924128111609616044488463423363629132934679087173040863377016714275964833344984500370552446953699258831e-2", "Square Foot", {"sq.ft","sq.ft.IN","ft2",NULL}}, {"9.290341199944321962239728391079895381007507748698769587339156653622117423009029788869627721462743024004179490771308932469255347683139050331331702733192442260292701268222885912435703348136322134671641093162915840707221524442743393444595634067094523114407626461543917038191866957480866104752883111755511144193929e-2", "Square Foot (U.S. Survey)", {"sq.ft.US",NULL}}, {"1e18", "Square Gigameter", {"sq.Gm.","Gm2","square_gigameter",NULL}}, {"1e4", "Square Hectometer", {"sq.hm.","hm2","square_hectometer",NULL}}, {"6.451599999999928578716062176854032557323871669709217231070812650300131239545160671903373783364761529184604934013347379882062581226598819665644930809227374390428023740508140794058426495017818320040469733924648818019814139126101116987142699372767211608266628889752537217536490567427263879494854143719603846218604e-4", "Square Inch", {"sq.in","sq.in.IN","in2","square_inch",NULL}}, {"6.45162583333375249212597612369649690590669930475143890753797286751901735797328249972043220454036172672105543331756798712291379892548324552912891079113363578200382356940299355312792546055537686633488182355297146467925717147321189284121397085636435723290004199447084773018499262702741902422391746036979637780008e-4", "Square Inch (U.S. Survey)", {"sq.in.US",NULL}}, {"1e6", "Square Kilometer", {"sq.km.","km2","square_kilometer",NULL}}, {"4.0468564224e-2", "Square Link", {"sq.lnk.","square_link",NULL}}, {"1e12", "Square Megameter", {"sq.Mm.","Mm2","square_megameter",NULL}}, {"1", "Square Meter", {"sq.m.","square_meter","square_meters","m2",NULL}}, {"6.4516e-10", "Square Mil", {"sq.mil.","mil2","square_mil",NULL}}, {"2.589988110336e6", "Square Mile", {"sq.mi.","square_mile","square_miles",NULL}}, {"2.589998e6", "Square Mile (U.S. Survey)", {"sq.mi.US","square_mile.US","square_miles.US",NULL}}, {"1e-6", "Square Millimeter", {"sq.mm.","mm2","square_millimeter",NULL}}, {"1e-12", "Square Micrometer", {"sq.µm.","µm2","square_micrometer",NULL}}, {"1e-18", "Square Nanometer", {"sq.nm.","nm2","square_nanometer",NULL}}, {"1e30", "Square Petameter", {"sq.Pm.","Pm2","square_petameter",NULL}}, {"1e-24", "Square Picometer", {"sq.pm.","pm2","square_picometer",NULL}}, {"25.29285264", "Square Rod", {"sq.rd.","rd2","square_rod",NULL}}, {"25.29285264", "Square Pole", {"sq.pole","pole2","square_pole",NULL}}, {"25.29285264", "Square Perch", {"sq.perch","perch2","square_perch",NULL}}, {"1e24", "Square Terameter", {"sq.Tm.","Tm2","square_terameter",NULL}}, {"6.4516e-10", "Square Thou", {"sq.thou","mil2","square_thou",NULL}}, {"1e-48", "Square Yoctometer", {"sq.ym.","ym2","square_yoctometer",NULL}}, {"1e48", "Square Yottameter", {"sq.Ym.","Ym2","square_yottameter",NULL}}, {"1e-42", "Square Zeptometer", {"sq.zm.","zm2","square_zeptometer",NULL}}, {"1e42", "Square Zettameter", {"sq.Zm.","Zm2","square_zettameter",NULL}}, {"0.83612736", "Square Yard", {"sq.yd.","yd2","square_yard",NULL}}, {"1000", "Stremma", {"stremma","stremmas",NULL}}, {/* 1 township = 36 sq.mi.(US) */ "9.323994e7", "Township", {"twp","township","townships",NULL}}, {/* 1 yardland = 30 acres */ "1.21405692672e5", "Yardland", {"yardland","yardlands",NULL}}, {NULL,NULL,{NULL}} }; /* based on cubic meters */ const struct conversion volumes[] = { {"9.46352946e-4", "#2.5 can", {"2.5can",NULL}}, {"3.785411784e-3", "#10 can", {"10can",NULL}}, {"102.79015312896", "Acre-inch", {"ac.in.","acre_inch","acre_inches",NULL}}, {"1233.48183754752", "Acre-foot", {"ac.ft.","acre_foot","acre_feet",NULL}}, {"1e-21", "Attoliter", {"al","aL","attoliter","attoliters",NULL}}, {/* 3 bu (Imp) */ "109.10616e-3", "Bag", {"bag",NULL}}, {/* 105 qt US */ "115.628198985075e-3", "Barrel (U.S. dry)", {"bbl","bl.US","barrel.US","barrels.US",NULL}}, {/* 31.5 gal US */ "119.240471196e-3", "Barrel (U.S. fluid)", {"fl.bl.US","fluid_barrel.US","fluid_barrels.US",NULL}}, {/* 42 gal (US) */ "158.987.294.928e-3", "Barrel (petroleum)", {"bl","bl.petrol","barrel.petrol","barrels.petrol",NULL}}, {/* 36 gal Imp */ "163.65924e-3", "Barrel (Imperial)", {"bl.Imp","barrel.Imp","barrels.Imp",NULL}}, {/* 282 cu. in. */ "4.621152048e-3", "Beer Gallon", {"beer_gal","beer_gallon",NULL}}, {/* 10 fl.oz. */ "284.130625e-6", "Breakfast Cup", {"breakfast_cup",NULL}}, {/* 144 cu.in. */ "2.359737216e-3", "Board Foot", {"bd_ft","fbm","BF","board_feet",NULL}}, {/* 4 gal (Imp) */ "18.18436e-3", "Bucket", {"bkt","bucket","buckets",NULL}}, {/* 2150.42 cu.in. */ "35.23907016688e-3", "Bushel (U.S. dry level)", {"bu.USlvl","bushel.USlvl",NULL}}, {/* 8 gal Imp. */ "36.36872e-3", "Bushel (Imperial)", {"bu.Imp","bushel.Imp",NULL}}, {/* 1.25 bu (US lvl) */ "44.0488377086e-3", "Bushel (U.S. dry heaped)", {"bu.US","bushel.US",NULL}}, {/* 126 gal (US.fl.) */ "0.476961884784", "Butt", {"butt","butts",NULL}}, {"1e-5", "Centiliter", {"cl","cL","centiliter","centiliters",NULL}}, {"1.232593620345297455720952457494033544533373789699499794656285986149681595299792021394950518524218500664033568694139341334679893333411134037499605108242281057079990961138502682597151008112501276987632104114117951307487179636796225960779054312078955923059540650966697302213477139425532668523277142534521745167648e-6", "Coffeespoon", {"coffeespoon","coffeespoons",NULL}}, {"1.000294685410741114246915054245905202113032996728842296055257383264619987013613069045568076424301273063504348088220559504362338689167130603830071293351980113434063071578892230315074771833285106977873840849283091091490651752710249437379790457846635698447513366385554038047948391165840769943644113517553355986187e-6", "Cooking Milliliter", {"cooking_milliliter","cooking_milliliters",NULL}}, {/* 4 bu (Imp) */ "145.47488e-3", "Coomb", {"coomb","coombs",NULL}}, {/* 8ftx4ftx4ft */ "3.624556363776", "Cord (firewood)", {"cd","cord","cords",NULL}}, {/* 16 cu.ft. */ "0.453069545472", "Cord Foot (timber)", {"cd_ft","cord_foot","cord_feet",NULL}}, {"1e-6", "Cubic Centimeter", {"cc","cm3","cu.cm.","cubic_centimeter","cubic_centimeters",NULL}}, {"1e-3", "Cubic Decimeter", {"dm3","cu.dm.","cubic_decimeter","cubic_decimeters",NULL}}, {"1e54", "Cubic Exameter", {"Em3","cu.Em.","cubic_exameter","cubic_exameters",NULL}}, {"6.116438863872", "Cubic Fathom", {"fm3","cu.fm.","cubic_fathom","cubic_fathoms",NULL}}, {"1e-45", "Cubic Femtometer", {"cubic_femtometer","cubic_femtometers",NULL}}, {"28.316846592e-3", "Cubic Foot", {"ft3","cu.ft.","cubic_foot","cubic_feet",NULL}}, {"1e27", "Cubic Gigameter", {"Gm3","cu.Gm.","cubic_gigameter","cubic_gigameters",NULL}}, {"16.387064e-6", "Cubic Inch", {"i3","cu.in.","cubic_inch","cubic_inches",NULL}}, {"1e9", "Cubic Kilometer", {"km3","cu.km.","cubic_kilometer","cubic_kilometers",NULL}}, {"1", "Cubic Meter", {"m3","cu.m.","cubic_meter","cubic_meters",NULL}}, {"1e18", "Cubic Megameter", {"Mm3","cu.Mm.","cubic_megameter","cubic_megameter",NULL}}, {"1e-18", "Cubic Micrometer", {"µm3","cu.µm.","cubic_micrometer","cubic_micrometers",NULL}}, {"4.168181825440579584e9","Cubic Mile", {"mi3","cu.mi.","cubic_mile","cubic_miles",NULL}}, {"1e-9", "Cubic Millimeter", {"mm3","cu.mm.","cubic_millimeter","cubic_millimeters",NULL}}, {"1e-27", "Cubic Nanometer", {"nm3","cu.nm.","cubic_nanometer","cubic_nanometers",NULL}}, {"1e45", "Cubic Petameter", {"Pm3","cu.Pm.","cubic_petameter","cubic_petameters",NULL}}, {"1e-36", "Cubic Picometer", {"pm3","cu.pm.","cubic_picometer","cubic_picometers",NULL}}, {"1e36", "Cubic Terameter", {"Tm3","cu.Tm.","cubic_terameter","cubic_terameters",NULL}}, {/* 27 cu.ft. */ "0.764554857984", "Cubic Yard", {"yd3","cu.yd.","cubic_yard","cubic_yards",NULL}}, {"1e72", "Cubic Yottameters", {"Ym3","cu.Ym.","cubic_yottameter","cubic_yottameters",NULL}}, {"1e63", "Cubic Zettameters", {"Zm3","cu.Zm.","cubic_zettameter","cubic_zettameters",NULL}}, {/* 8 fl.oz. */ "227.3045e-6", "Cup (Canadian)", {"cup.CA",NULL}}, {/* 8 US fl.oz. */ "236.5882365e-6", "Cup (US)", {"c","cups","cup",NULL}}, {"250e-6", "Cup (metric)", {"cup.metric",NULL}}, {/* 1/96 US fl.oz. */ "0.308057599609375e-6","Dash (U.S.)", {"ds","dash","dashes","dash.US",NULL}}, {/* 1/384 gi */ "0.36996175130208e-6", "Dash (Imperial)", {"dash.Imp",NULL}}, {"1e-2", "Decaliter", {"dal","daL","decaliter","decaliters",NULL}}, {"1e-4", "Deciliter", {"dl","dL","deciliter","deciliters",NULL}}, {/* 1/12 gi */ "11.838776041e-6", "Dessertspoon", {"dessertspoon",NULL}}, {/* 1/20 mL */ "5e-5", "Drop", {"drops","drop",NULL}}, {/* 1/360 US fl.oz. */ "0.0821486932291e-6", "Drop (U.S.)", {"gtt","drop.US","drops.US",NULL}}, {/* 1/12 mL */ "0.08e-6", "Drop (medical)", {"drop_medical","drops_medical",NULL}}, {/* 1/288 fl.oz. */ "0.098656467013e-6", "Drop (Imperial)", {"drop.Imp","drops.Imp",NULL}}, {"1e15", "Exaliter", {"El","EL","exaliter","exaliters",NULL}}, {"1e-18", "Femtoliter", {"fl","fL","femtoliter","femtoliters",NULL}}, {/* 1/5 gal */ "0.7570823568e-3", "Fifth", {"fifths","fifth",NULL}}, {/* 9 US gal */ "34.068706056e-3", "Firkin", {"firkin",NULL}}, {/* 1/8 fl.oz. */ "3.5516328125e-6", "Fluid Drachm", {"fl.dr.","fluid_drachm",NULL}}, {/* 1/8 US fl.oz. */ "3.6966911953125e-6", "Fluid Dram", {"fl.dram","fluid_dram",NULL}}, {/* 1/128 gal */ "29.5735295625e-6", "Fluid Ounce (U.S.)", {"fl.oz.","fl.oz.US",NULL}}, {/* 1/160 gal */ "28.4130625e-6", "Fluid Ounce (Imperial)", {"fl.oz.UK",NULL}}, {/* 1/24 fl.oz. */ "1.1838776041e-6", "Fluid Scruple", {"fl.s.","fluid_scruple","fluid_scruples",NULL}}, {/* 231 cu. in. */ "3.785411784e-3", "Gallon (U.S. fluid)", {"gal","gallon","gallons","gal.USfl","gallon.USfl",NULL}}, {/* 1/8 bu */ "4.40488377086e-3", "Gallon (U.S. dry)", {"gal.USdry","gallon.USdry",NULL}}, {"4.54609e-3", "Gallon (Imperial)", {"gal.Imp","gallon.Imp",NULL}}, {"1e6", "Gigaliter", {"Gl","GL","gigaliter","gigaliters",NULL}}, {/* 4 US fl.oz. */ "118.29411825e-6", "Gill (U.S.)", {"gi","gill","gills","gill.US",NULL}}, {/* 5 fl.oz. */ "142.0653125e-6", "Gill (Imperial)", {"gill.Imp",NULL}}, {"0.1", "Hectoliter", {"hl","hL","hectoliter","hectoliters",NULL}}, {/* 2 fl.bl. (US) */ "238.480942392e-3", "Hogshead (U.S.)", {"hhd","hhd.US","hogshead","hogshead.US","hogsheads","hogsheads.US",NULL}}, {/* 2 bl (Imp) */ "327.31848e-3", "Hogshead (Imperial)", {"hhd.Imp","hogshead.Imp","hogsheads.Imp",NULL}}, {"44.36029434375e-6", "Jigger", {"jigger","jiggers",NULL}}, {"81.82962e-3", "Kilderkin", {"kilderkin",NULL}}, {"1", "Kiloliter", {"kl","kL","kiloliter","kiloliters",NULL}}, {"1e-9", "Lambda", {"lambda","lambdas",NULL}}, {/* 80 bu (Imp) */ "2.9094976", "Last", {"last","lasts",NULL}}, {"1e-3", "Liter", {"l","liter","liters",NULL}}, {/* 50 cu.ft. */ "1.4158423296", "Load", {"load","loads",NULL}}, {"44.36029434375e-6", "Measure", {"measure","measures",NULL}}, {"1e3", "Megaliter", {"Ml","ML","megaliter","megaliters",NULL}}, {"1e-9", "Microliter", {"µl","microliter","microliters",NULL}}, {"1e-6", "Milliliter", {"ml","mL","milliliter","milliliters",NULL}}, {/* 1 minim = 1/480 fluid ounce */ "0.0591938802083333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333e-6", "Minim (Imperial)", {"minim","minims","minim.Imp",NULL}}, {"0.061611519921875e-6","Minim (U.S.)", {"minim.US",NULL}}, {"1e-12", "Nanoliter", {"nl","nL","nanoliter","nanoliters",NULL}}, {"7.103515625e-5", "Nipperkin (US)", {"nipperkin","nipperkins",NULL}}, {/* 5 fl.oz. */ "142.0653125e-6", "Noggin", {"nog","noggin",NULL}}, {/* 8 bu (Imp) */ "290.94976e-3", "Pail", {"pail","pails",NULL}}, {"1e-15", "Picoliter", {"pl","pL","picoliter","picoliters",NULL}}, {/* 1/8 gal */ "473.176473e-6", "Pint (U.S. fluid)", {"pt","pint","pints","pint.USfl",NULL}}, {/* 1/64 bu */ "0.5506104713575e-3", "Pint (U.S. dry)", {"pint.USdry",NULL}}, {/* 1/8 gal */ "0.56826125e-3", "Pint (Imperial)", {"pint.Imp",NULL}}, {/* 1/4 US lvl bu */ "8.80976754172e-3", "Peck (U.S.)", {"pk","peck","pecks","pk.US","peck.US",NULL}}, {/* 2 gal */ "9.09218e-3", "Peck (Imperial)", {"pk.Imp","peck.Imp",NULL}}, {/* 16.5ftx1.5ftx1ft */ "0.700841953152", "Perch", {"per","perch","perches",NULL}}, {"1e12", "Petaliter", {"Pl","PL","petaliter","petaliters",NULL}}, {"0.61611519921875e-6", "Pinch (U.S.)", {"pinch","pinches","pinch.US",NULL}}, {"0.7399235026041e-6", "Pinch (Imperial)", {"pinch.Imp",NULL}}, {/* 126 gal (US.fl.) */ "0.476961884784", "Pipe", {"pipe","pipes",NULL}}, {/* 3/4 US fl.oz. */ "22.180147171875e-6", "Pony", {"pony","ponies",NULL}}, {/* 1/2 gal (Imp) */ "2.273045e-3", "Pottle", {"pottle",NULL}}, {/* 1/4 gal */ "0.946352946e-3", "Quart (U.S. fluid)", {"qt","quart","quarts","qt.USfl","quart.USfl",NULL}}, {/* 1/32 bu */ "1.101220942715e-3", "Quart (U.S. dry)", {"qt.USdry","quart.USdry",NULL}}, {/* 1/4 gal */ "1.1365225e-3", "Quart (Imperial)", {"qt.Imp","quart.Imp",NULL}}, {/* 8 bu (Imp) */ "290.94976e-3", "Quarter", {"qtr","quarter","quarters",NULL}}, {/* 1/2 gal (Imp) */ "2.273045e-3", "Quatern", {"pottle",NULL}}, {/* 3 bu (US lvl) */ "105.71721050064e-3", "Sack (U.S.)", {"sack","sack.US",NULL}}, {/* 3 bu (Imp) */ "109.10616e-3", "Sack (Imperial)", {"sack.Imp",NULL}}, {/* 8 bu (US lvl) */ "281.91256133504e-3", "Seam", {"seam","seams",NULL}}, {"1", "Stere", {"st","stere","steres",NULL}}, {/* 2 bu (US lvl) */ "70.47814033376e-3", "Strike (U.S.)", {"strike","strike.US",NULL}}, {/* 2 bu (Imp) */ "72.73744e-3", "Strike (Imperial)", {"strike.Imp",NULL}}, {/* 1 US fl.oz. */ "29.5735295625e-6", "Shot", {"shot","shots",NULL}}, {/* 1/2 fl.oz. */ "14.20653125e-6", "Tablespoon (Canadian)", {"tbsp.CA",NULL}}, {/* 1/2 US fl.oz. */ "14.7867647825e-6", "Tablespoon (US)", {"tbsp","tbsp.US","tablespoon","tablespoons",NULL}}, {"15e-6", "Tablespoon (metric)", {"tbsp.metric",NULL}}, {/* 5/8 fl.oz. */ "17.7581640625e-6", "Tablespoon (Imperial)", {"tsp.Imp",NULL}}, {/* 1/6 fl.oz. */ "4.735510416667e-6", "Teaspoon (Canadian)", {"tsp.CA",NULL}}, {"4.928921595e-6", "Teaspoon (U.S.)", {"tsp","tsp.US","teaspoon","teaspoons",NULL}}, {"5e-6", "Teaspoon (metric)", {"tsp.metric",NULL}}, {/* 1/24 gi */ "5.9193880208e-6", "Teaspoon (Imperial)", {"tsp.Imp",NULL}}, {"1e9", "Teraliter", {"Tl","TL","teraliter","teraliters",NULL}}, {/* 1 cu.ft. */ "28.316846592e-3", "Timber Foot", {"timber_foot","timber_feet",NULL}}, {/* 35 cu.ft. */ "0.99108963072", "Ton (Displacement)", {"displacement_ton","displacement_tons","ton.displacement",NULL}}, {/* 28 bu (Imp) */ "1.01832416", "Ton (Water)", {"water_ton","water_tons","ton.water",NULL}}, {/* 40 cu.ft. */ "1.13267386368", "Ton (Freight)", {"freight_ton","freight_tons","ton.freight",NULL}}, {/* 100 cu.ft. */ "2.8316846592", "Ton (Register)", {"register_ton","register_tons","ton.register",NULL}}, {/* 252 gal (US.fl.) */ "0.953923769568", "Tun", {"tun","tuns",NULL}}, {/* 40 bu (US lvl) */ "1.4095628066752", "Wey", {"wey","weys",NULL}}, {"1e-27", "Yoctoliter", {"yl","yL","yoctoliter","yoctoliters",NULL}}, {"1e21", "Yottaliter", {"Yl","YL","yottaliter","yottaliters",NULL}}, {"1e-24", "Zeptoliter", {"zl","zL","zeptoliter","zeptoliters",NULL}}, {"1e18", "Zettaliter", {"Zl","ZL","zettaliter","zettaliters",NULL}}, {NULL,NULL,{NULL}} }; /* based on the radian */ const struct conversion angles[] = { {/* 2pi/6400 */ "9.8174770424681038701957605727484465131161543730472056905467018509619262696444031207126088291941158374442127703540072082721682644048455694741417481504015034920321378209435578784548738894467154841574436388400342989560420191514864007305836973914725059660801517716358135894076697707756668550226882785664803893343956447362130465047528780088414190366105136496643448750354079079650639578793254592248172237794783039698929987248534130816168185394118534534954627326949373835923979746429772652850873068219123410307302292576270520096438168592074850773037209443120654490711579350536759161773512021088077114668910375017753973289486275868305354461180925286676161835045888778163279794692079674542845337258740289341360688123628504031936277001075567494175930461603436266209600354687499949155564060970616616650503009956094514357979590884457578822132917021407351935349630344062598057461027705860412761919394286802160853237445421575898608397848736339496323555862304748680683055641630350837706656310246144099872163013131216815476787533296433227464560504793182124007196936001103182905281117925706231684101553805477608722859861714288826692209248463422909901928995496533596824429832420779353726720637528990677223094057775750401823800111365864378272193185717336e-4", "Angular Mil", {"angular_mil",NULL}}, {/* 1°/60 */ "2.9088820866572159615394846141476878557381198142362090934953190669516818576724157394704026160575158036871741541789650987473091153792135020664123698223411862198613741691684615936162589302064342175281314485451953478388272649337737483646173918196955573232830079323365373598244947468964938829696854158715497449879690799218409026680749268174344945293660781184190651481586393801377967282605408768073532514902157937688571848073639742464049832709368454677023593282059073729162660665608821526770629057250110640091052531133709783732277975879133289117936950946109823552803430918677558270155114672914985811753751222227482658752440378035053438358868422307163307210383967045381712531760616199864546766595182307952995759444038075268721859852170538516792868284919536671469511216203703688638685647694997516044593484431435411661623582484283727058409753191528104277140631213055584609618082283217900077605746455348788400959243087874340328414177403359850762535070312518127609794264186770618579750017850709362925085337224064241622751861717461697026536445864646555261391684741067609749712923829838883461956015942363735917884403470900393093987925470643825156127109776750695355386617013564252956065374082663904362398239340963082021866699663959815784353536508892e-4", "Arcminute", {"arcminute",NULL}}, {/* 1°/3600 */ "4.8481368110953599358991410235794797595635330237270151558255317782528030961206928991173376934291930061452902569649418312455151922986891701106872830372353103664356236152807693226937648836773903625468857475753255797313787748896229139410289863661592622054716798872275622663741579114941564716161423597859162416466151332030681711134582113623908242156101301973651085802643989668963278804342347946789220858170263229480953080122732904106749721182280757795039322136765122881937767776014702544617715095416851066818420885222849639553796626465222148529894918243516372588005718197795930450258524454858309686256252037045804431254067296725089063931447370511938845350639945075636187552934360333107577944325303846588326265740063458781203099753617564194654780474865894452449185360339506147731142746158329193407655807385725686102705970807139545097349588652546840461901052021759307682696803805363166796009577425581314001598738479790567214023629005599751270891783854196879349657106977951030966250029751182271541808895373440402704586436195769495044227409774410925435652807901779349582854873049731472436593359903939559863140672451500655156646542451073041926878516294584492258977695022607088260108956804439840603997065568271803369777832773266359640589227514762e-6", "Arcsecond", {"arcsecond",NULL}}, {/* 1 gr/100 */ "1.570796326794896619231321691639751442098584699687552910487472296153908203143104499314017412671058533991074043256641153323546922304775291115862679704064240558725142051350969260552779822311474477465190982214405487832966723064237824116893391582635600954572824283461730174305227163324106696803630124570636862293503303157794087440760460481414627045857682183946295180005665265274410233260692073475970755804716528635182879795976546093058690966305896552559274037231189981374783675942876362445613969091505974564916836681220328321543010697473197612368595351089930471851385269608588146588376192337409233834702566000284063572631780413892885671378894804586818589360734220450612476715073274792685525396139844629461771009978056064510980432017209079906814887385654980259353605674999999186489024975529865866408048159297512229727673454151321261154126672342517630965594085505001568919376443293766604190710308588834573651799126745214377734365579781431941176893796875978890928890266085613403306500963938305597954608210099469047628600532742931639432968076690913984115150976017650926484497886811299706945624860887641739565757787428621227075347975414766558430863927944537549190877318732469659627530200463850835569504924412006429180801781853830052355090971477e-4", "Centesimal Minute of Arc", {"centesimal_minute",NULL}}, {/* 1 gr/10000 */ "1.5707963267948966192313216916397514420985846996875529104874722961539082031431044993140174126710585339910740432566411533235469223047752911158626797040642405587251420513509692605527798223114744774651909822144054878329667230642378241168933915826356009545728242834617301743052271633241066968036301245706368622935033031577940874407604604814146270458576821839462951800056652652744102332606920734759707558047165286351828797959765460930586909663058965525592740372311899813747836759428763624456139690915059745649168366812203283215430106974731976123685953510899304718513852696085881465883761923374092338347025660002840635726317804138928856713788948045868185893607342204506124767150732747926855253961398446294617710099780560645109804320172090799068148873856549802593536056749999991864890249755298658664080481592975122297276734541513212611541266723425176309655940855050015689193764432937666041907103085888345736517991267452143777343655797814319411768937968759788909288902660856134033065009639383055979546082100994690476286005327429316394329680766909139841151509760176509264844978868112997069456248608876417395657577874286212270753479754147665584308639279445375491908773187324696596275302004638508355695049244120064291808017818538300523550909714765e-6", "Centesimal Second of Arc", {"centesimal_second",NULL}}, {/* pi/180 */ "1.7453292519943295769236907684886127134428718885417254560971914401710091146034494436822415696345094822123044925073790592483854692275281012398474218934047117319168245015010769561697553581238605305168788691271172087032963589602642490187704350918173343939698047594019224158946968481378963297818112495229298469927814479531045416008449560904606967176196468710514390888951836280826780369563245260844119508941294762613143108844183845478429899625621072806214155969235444237497596399365292916062377434350066384054631518680225870239366785527479973470762170567665894131682058551206534962093068803748991487052250733336489595251464226821032063015321053384297984326230380227229027519056369719918728059957109384771797455666422845161233115911302323110075720970951722002881706729722222213183211388616998509626756090658861246996974149490570236235045851914916862566284378727833350765770849369930740046563447873209273040575545852724604197048506442015910457521042187510876565876558512062371147850010710425617755051202334438544973651117030477018215921867518787933156835010844640565849827754297903330077173609565418241550730642082540235856392755282386295093676265866050417213231970208138551773639224449598342617438943604577849213120019798375889470612121905324e-2", "Degree", {"degree","°",NULL}}, {/* 2pi/400 */ "1.5707963267948966192313216916397514420985846996875529104874722961539082031431044993140174126710585339910740432566411533235469223047752911158626797040642405587251420513509692605527798223114744774651909822144054878329667230642378241168933915826356009545728242834617301743052271633241066968036301245706368622935033031577940874407604604814146270458576821839462951800056652652744102332606920734759707558047165286351828797959765460930586909663058965525592740372311899813747836759428763624456139690915059745649168366812203283215430106974731976123685953510899304718513852696085881465883761923374092338347025660002840635726317804138928856713788948045868185893607342204506124767150732747926855253961398446294617710099780560645109804320172090799068148873856549802593536056749999991864890249755298658664080481592975122297276734541513212611541266723425176309655940855050015689193764432937666041907103085888345736517991267452143777343655797814319411768937968759788909288902660856134033065009639383055979546082100994690476286005327429316394329680766909139841151509760176509264844978868112997069456248608876417395657577874286212270753479754147665584308639279445375491908773187324696596275302004638508355695049244120064291808017818538300523550909714774e-2", "Gradian", {"grad","gradian","gon","gradians",NULL}}, {/* 45° */ "7.853981633974483096156608458198757210492923498437764552437361480769541015715522496570087063355292669955370216283205766617734611523876455579313398520321202793625710256754846302763899111557372387325954911072027439164833615321189120584466957913178004772864121417308650871526135816620533484018150622853184311467516515788970437203802302407073135229288410919731475900028326326372051166303460367379853779023582643175914398979882730465293454831529482762796370186155949906873918379714381812228069845457529872824584183406101641607715053487365988061842976755449652359256926348042940732941880961687046169173512830001420317863158902069464428356894474022934092946803671102253062383575366373963427626980699223147308855049890280322554902160086045399534074436928274901296768028374999995932445124877649329332040240796487561148638367270756606305770633361712588154827970427525007844596882216468833020953551542944172868258995633726071888671827898907159705884468984379894454644451330428067016532504819691527989773041050497345238143002663714658197164840383454569920575754880088254632422489434056498534728124304438208697828788937143106135376739877073832792154319639722687745954386593662348298137651002319254177847524622060032145904008909269150261775454857391e-1", "Octant", {"octant",NULL}}, {/* 60° */ "1.0471975511965977461542144610931676280657231331250352736583148641026054687620696662093449417807056893273826955044274355490312815365168607439084531360428270391500947009006461737018532148743163183101273214762703252219778153761585494112622610550904006363818828556411534495368181088827377978690867497137579081956688687718627249605069736542764180305717881226308634533371101768496068221737947156506471705364776857567885865306510307287057939775372643683728493581541266542498557839619175749637426460610039830432778911208135522143620071316487984082457302340599536479009235130723920977255841282249394892231350440001893757150878536092619237809192632030578790595738228136337416511433821831951236835974265630863078473399853707096739869546781393866045432582571033201729024037833333327909926833170199105776053654395316748198184489694342141741027511148950117539770627236700010459462509621958444027938068723925563824345327511634762518229103865209546274512625312506525939525935107237422688710006426255370653030721400663126984190670218286210929553120511272759894101006506784339509896652578741998046304165739250944930438385249524141513835653169431777056205759519630250327939182124883131064183534669759005570463366162746709527872011879025533682367273143194", "Sextant", {"sextant",NULL}}, {/* 30° */ "5.2359877559829887307710723054658381403286156656251763682915743205130273438103483310467247089035284466369134775221371777451564076825843037195422656802141351957504735045032308685092660743715815915506366073813516261098890768807927470563113052754520031819094142782057672476840905444136889893454337485687895409783443438593136248025348682713820901528589406131543172666855508842480341108689735782532358526823884287839429326532551536435289698876863218418642467907706332712492789198095878748187132303050199152163894556040677610718100356582439920412286511702997682395046175653619604886279206411246974461156752200009468785754392680463096189045963160152893952978691140681687082557169109159756184179871328154315392366999268535483699347733906969330227162912855166008645120189166666639549634165850995528880268271976583740990922448471710708705137555744750587698853136183500052297312548109792220139690343619627819121726637558173812591145519326047731372563126562532629697629675536187113443550032131276853265153607003315634920953351091431054647765602556363799470505032533921697549483262893709990231520828696254724652191926247620707569178265847158885281028797598151251639695910624415655320917673348795027852316830813733547639360059395127668411836365715972e-1", "Sign", {"sign",NULL}}, {"1", "Radian", {"rad","radian","radians",NULL}}, {/* 90° */ "1.5707963267948966192313216916397514420985846996875529104874722961539082031431044993140174126710585339910740432566411533235469223047752911158626797040642405587251420513509692605527798223114744774651909822144054878329667230642378241168933915826356009545728242834617301743052271633241066968036301245706368622935033031577940874407604604814146270458576821839462951800056652652744102332606920734759707558047165286351828797959765460930586909663058965525592740372311899813747836759428763624456139690915059745649168366812203283215430106974731976123685953510899304718513852696085881465883761923374092338347025660002840635726317804138928856713788948045868185893607342204506124767150732747926855253961398446294617710099780560645109804320172090799068148873856549802593536056749999991864890249755298658664080481592975122297276734541513212611541266723425176309655940855050015689193764432937666041907103085888345736517991267452143777343655797814319411768937968759788909288902660856134033065009639383055979546082100994690476286005327429316394329680766909139841151509760176509264844978868112997069456248608876417395657577874286212270753479754147665584308639279445375491908773187324696596275302004638508355695049244120064291808017818538300523550909714782", "Quadrant", {"quadrant",NULL}}, {NULL,NULL,{NULL}} }; /* based on the gram */ const struct conversion masses[] = { {"9.10938188e-28", "Atomic Mass Unit", {"atomic_mass_unit","atomic_mass_units",NULL}}, {"1.66053873e-24", "Atomic Mass Unit (Unified)", {"atomic_mass_unit.unified","atomic_mass_units.unified",NULL}}, {"1e-18", "Attogram", {"ag","attogram","attograms",NULL}}, {/* 60 kg */ "60e3", "Bag (Coffee)", {"bag.coffee","bags.coffee",NULL}}, {/* 94 lb. av */ "42.63768278e3", "Bag (Portland Cement)", {"bag.portland","bags.portland",NULL}}, {/* 22.5 sh tn */ "20411.65665e3", "Barge", {"barge","barges",NULL}}, {/* 3 1/6 gr */ "205.196548333e-3","Carat", {"ct","carat","carats",NULL}}, {"200e-3", "Carat (metric)", {"kt","carat.metric","carats.metric",NULL}}, {"45.359237e3", "Cental", {"cental","centals",NULL}}, {"1e-2", "Centigram", {"cg","centigram","centigrams",NULL}}, {/* 8 lb. av */ "3.62873896e3", "Clove", {"clove","cloves",NULL}}, {"89.9349e-3", "Crith", {"crith","criths",NULL}}, {"1.66053873e-24", "Dalton", {"Da","dalton","daltons",NULL}}, {"10", "Decagram", {"dag","decagram","decagrams",NULL}}, {"1e-1", "Decigram", {"dg","decigram","decigrams",NULL}}, {/* 12 11/32 gr */ "1.7718451953125", "Dram (Avoirdupois)", {"dr.Av","dr","dram","drams","dram.Av","drams.Av",NULL}}, {/* 60 gr */ "3.8879346", "Dram (Apothecary)", {"dr.Ap","dram.Ap","drams.Ap",NULL}}, {"9.10938188e-31", "Electron Rest Mass", {"me","electron_rest_mass","electron_rest_masses",NULL}}, {"1e18", "Exagram", {"Eg","exagram","exagrams",NULL}}, {"1e-15", "Femtogram", {"fg","femtogram","femtograms",NULL}}, {"1e-6", "Gamma", {"gamma","gammas",NULL}}, {"14.593903e3", "Geepound", {"geepound","geepounds",NULL}}, {"1e9", "Gigagram", {"Gg","gigagram","gigagrams",NULL}}, {"64.79891e-3", "Grain", {"gr","grain","grains",NULL}}, {"1", "Gram", {"g","gram","grams",NULL}}, {"1e3", "Grave", {"grave","graves",NULL}}, {"100", "Hectogram", {"hg","hectogram","hectograms",NULL}}, {"9.80665", "hyl (CGS unit)", {"hyl_CGS",NULL}}, {"9.80665e3", "hyl (MKS unit)", {"hyl_MKS",NULL}}, {/* 100 lb av */ "45.359237e3", "Hundredweight (Short)", {"sh.Cwt","sh.cwt","hundredweight.short","hundredweights.short",NULL}}, {/* 112 lb av */ "50.80234544e3", "Hundredweight (Long)", {"l.Cwt","l.cwt","hundredweight.long","hundredweights.long",NULL}}, {"1e3", "Kilogram", {"kg","kilogram","kilograms",NULL}}, {/* 1000 lb av */ "453.59237e3", "Kip", {"kip","kips",NULL}}, {/* 8 oz t */ "248.8278144", "Mark", {"mark","marks",NULL}}, {"1e6", "Megagram", {"Mg","megagram","megagrams",NULL}}, {"1e-6", "Microgram", {"µg","mcg","microgram","micrograms",NULL}}, {"1e-3", "Milligram", {"mg","milligram","milligrams",NULL}}, {/* 1/20 gr */ "3.2399455e-3", "Mite", {"mite","mites",NULL}}, {/* 1/20 g */ "50e-3", "Mite (metric)", {"mite.metric","mites.metric",NULL}}, {"1e-9", "Nanogram", {"ng","nanogram","nanograms",NULL}}, {/* 1/12 lb */ "28.349523125", "Ounce (Avoirdupois)", {"oz","ounce","ounces","oz.Av","oz.av",NULL}}, {/* 1/12 lb t */ "31.1034768", "Ounce (Apothecary)", {"ounce.Ap","ounces.Ap","oz.Ap","oz.Tr",NULL}}, {/* 1/20 oz t */ "1.55517384", "Pennyweight", {"dwt","pwt","pennyweight","pennyweights",NULL}}, {"1e15", "Petagram", {"Pg","petagram","petagrams",NULL}}, {"1e-12", "Picogram", {"pg","picogram","picograms",NULL}}, {/*5760 grains */ "0.3732417216e3", "Pound (Troy)", {"lb_t","lb.Tr","#",NULL}}, {/* 7000 grains */ "0.45359237e3", "Pound (Avoirdupois)", {"lb","lb_av","lb.Av","lbs","pounds","pound",NULL}}, {"500", "Pound (metric)", {"lb.metric","pound.metric","pounds.metric",NULL}}, {"100e3", "Quintal (metric)", {"q","quintal","quintals",NULL}}, {/*1/4 long ton */ "254.0017272e3", "Quarter (Long)", {"qtr.long","quarter.long","quarters.long",NULL}}, {"12.70058636e3", "Quarter (Imperial)", {"qtr","Q","Qr","quarter","quarters",NULL}}, {/* 20 gr */ "1.2959782", "Scruple (Avoirdupois)", {"s.Av","scruple.Av","scruples.Av",NULL}}, {/* 1/700 lb.av. */ "647.9891e-3", "Sheet", {"sheet","sheets",NULL}}, {"14.593903e3", "Slug", {"slug","slugs",NULL}}, {/* 14 lb av */ "6.35029318e3", "Stone", {"stone","stones",NULL}}, {"1e12", "Teragram", {"Tg","teragram","teragrams",NULL}}, {"29.16666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666", "Ton (Short Assay)", {"AT","AT.s","assay_ton.short",NULL}}, {"32.66666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666", "Ton (Long Assay)", {"AT.l","assay_ton.long",NULL}}, {/* 2000 lb */ "907.18474e3", "Ton (Short)", {"sh.tn","T","short_ton","short_tons",NULL}}, {/* 2240 lb */ "1016.0469088e3", "Ton (Long)", {"long.tn.","L.T.","LT","ton","tons","long_ton","long_tons",NULL}}, {"1000e3", "Tonne / Metric Ton", {"MT","t","metric_ton","metric_tons","tonne","tonnes",NULL}}, {/* 252 lb */ "114.30527724e3", "Wey", {"wey","weys",NULL}}, {"1e-24", "Yoctogram", {"yg","yoctogram","yoctograms",NULL}}, {"1e24", "Yottagram", {"Yg","yottagram","yottagrams",NULL}}, {"1e-21", "Zeptogram", {"zg","zeptogram","zeptograms",NULL}}, {"1e21", "Zettagram", {"Zg","zettagram","zettagrams",NULL}}, {NULL,NULL,{NULL}} }; /* based on meter per second */ const struct conversion speeds[] = { {"100", "Centimeters/second", {"cm/s",NULL}}, {"1", "Meters/second", {"m/s",NULL}}, {"3.048e-1", "Feet/second", {"f/s","feet_per_second",NULL}}, {"5.08e-3", "Feet/minute", {"f/m","feet_per_minute",NULL}}, {"8.4666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666e-5", "Feet/hour", {"fph","f/h","feet_per_hour",NULL}}, {"1.663095e-4", "Furlongs/fortnight", {"furlong_per_fortnight",NULL}}, {"3.352799999999999999664720000000000000033527999999999999996647200000000000000335279999999999999966472000000000000003352799999999999999664720000000000000033527999999999999996647200000000000000335279999999999999966472000000000000003352799999999999999664720000000000000033527999999999999996647200000000000000335283", "Furlongs/minute", {"fur/m",NULL}}, {"4.2333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333e-4", "inches/minute", {"ipm","in/m","inches_per_minute",NULL}}, {"2.54e-2", "inches/second", {"ips","in/s","inches_per_minute",NULL}}, {"2.7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777e-1", "Kilometers/hour", {"km/h","kph","kilometer/hr","kilometers/hr","kilometer/hour","kilometers/hour",NULL}}, {"0.5144444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444", "Knots", {"k","knot","knots",NULL}}, {"0.514773", "Knots (Admiralty)", {"knot.admiralty","knots.admiralty",NULL}}, {"5.587898399999999857732106736000003622140562501439907780301278713339947913529443958364926121540356820028980945582515362062145125469158881897785105555214866882391212564229489174319728114717205621819722199299944868469872805823403648757038363736143102645803259277796606637849018787298395000363981675382863290733015e-2", "Leagues/day", {"leagues/day","league/day",NULL}}, {"331.5", "Mach (dry air, 273 kelvin)", {"M","Ma","mach","machs",NULL}}, {"1.609344e3", "Miles/second", {"mps","mile/s","miles/s","mile/second","miles/second",NULL}}, {"26.8224", "Miles/minute", {"mpm","mile/m","miles/m","mile/minute","miles/minute",NULL}}, {"0.44704", "Miles/hour", {"mph","mile/hr","miles/hr","mile/hour","miles/hour",NULL}}, {NULL,NULL,{NULL}} }; /* based on Watts */ const struct conversion powers[] = { {"1.68875e-3", "Atmosphere Cubic Centimeter/minute",{"atm.ccm.","atmosphere_cubic_centimeter/minute",NULL}}, {"0.101325", "Atmosphere Cubic Centimeter/second",{"atm.ccs.","atmosphere_cubic_centimeter/second",NULL}}, {"47.82007468224", "Atmosphere Cubic foot/minute", {"atm.cfm.","atmosphere_cubic_foot/minute",NULL}}, {"2.8692044809344e3", "Atmosphere Cubic foot/second", {"atm.cfs.","atmosphere_cubic_foot/second",NULL}}, {"1e-18", "Attowatt", {"aW","attowatt","attowatts",NULL}}, {"0.293071", "BTU/hour", {"BTU/hr",NULL}}, {"1.05505585262e3", "BTU/s", {"BTU/s",NULL}}, {"4.1868", "Calorie/second", {"cal/s","calorie_per_second",NULL}}, {"1e-2", "Centiwatt", {"cW","centiwatt","centiwatts",NULL}}, {"10", "Decawatt", {"daW","decawatt","decawatts",NULL}}, {"0.1", "Deciwatt", {"dW","deciwatt","deciwatts",NULL}}, {"1e-7", "Ergs/sec", {"ergs/s",NULL}}, {"1e18", "Exawatt", {"EW","exawatt","exawatts",NULL}}, {"1e-15", "Femtowatt", {"fW","femtowatt","femtowatts",NULL}}, {"3.766161e-4", "Foot-lbs/hour", {"ft-lbf/h","ft-lb/h","foot-pound_per_hour","foot-pounds_per_hour",NULL}}, {"2.259696580552334e-2", "Foot-lbs/minute", {"ft-lbf/m","ft-lb/m","foot-pound_per_minute","foot-pounds_per_minute",NULL}}, {"1.3558179483314004", "Foot-lbs/sec", {"ft-lbf/s","ft-lb/s","foot-pound_per_second","foot-pounds_per_second",NULL}}, {"100", "Hectowatt", {"hW","hectowatt","hectowatts",NULL}}, {"735.49875", "Horsepower (metric)", {"hp","horse","horsepower","horsepower.metric",NULL}}, {"736", "Horsepower (European electrical)", {"horsepower.ee",NULL}}, {"745.69987158227022", "Horsepower (Imperial mechanical)", {"horsepower.ImpMech",NULL}}, {"746", "Horsepower (Imperial electrical)", {"horsepower.ImpElec",NULL}}, {"9.810657e3", "Horsepower (Boiler)", {"horsepower.boiler","boiler_horsepower",NULL}}, {"1e3", "Kilowatt", {"kW","kilowatt","kilowatts",NULL}}, {"1.68875", "Liter-atmosphere/minute", {"L-atm/min","liter-atmosphere_per_minute",NULL}}, {"101.325", "Liter-atmosphere/sec", {"L-atm/s","liter-atmosphere_per_second",NULL}}, {"1.3333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333e-4", "Lusec", {"lusec","lusecs",NULL}}, {"1e9", "Gigawatts", {"GW","gigawatt","gigawatts",NULL}}, {"1e6", "Megawatt", {"MW","megawatt","megawatts",NULL}}, {"1e-6", "Microwatt", {"µW","microwatt","microwatts",NULL}}, {"1e-3", "Milliwatt", {"mW","milliwatt","milliwatts",NULL}}, {"1e-9", "Nanowatt", {"nW","nanowatt","nanowatts",NULL}}, {"1e15", "Petawatt", {"PW","petawatt","petawatts",NULL}}, {"1e-12", "Picowatt", {"pW","picowatt","picowatts",NULL}}, {"980.665", "Poncelet", {"p","poncelet","poncelets",NULL}}, {"70.337057", "Square Foot Equivalent Direct Radiation",{"sq.ft.EDR",NULL}}, {"1e12", "Terawatt", {"TW","terawatt","terawatts",NULL}}, {"844.2", "Ton of A.C.", {"ton_of_a.c.",NULL}}, {"3.516853e3", "Ton of Refrigeration", {"ton_of_refrigeration",NULL}}, {"3.938875e3", "Ton of Refrigeration (Imperial)", {"ton_of_refrigeration.Imp",NULL}}, {"1", "Watts (joules/sec)", {"W","watt","watts","J/s",NULL}}, {"1e-24", "Yoctowatt", {"yW","yoctowatt","yoctowatts",NULL}}, {"1e24", "Yottawatt", {"YW","yottawatt","yottawatts",NULL}}, {"1e-21", "Zeptowatt", {"zW","zeptowatt","zeptowatts",NULL}}, {"1e21", "Zettawatt", {"ZW","zettawatt","zettawatts",NULL}}, {NULL,NULL,{NULL}} }; /* based on Newtons */ const struct conversion forces[] = { {"1e-5", "Dyne", {"dyn","dyne","dynes",NULL}}, {"9.80665", "Grave-force", {"Gf","grave_force","graves_force",NULL}}, {"9.80665e-3", "Gravet", {"gravet",NULL}}, {"9.80665", "Kilopond", {"kp","kilopond","kiloponds",NULL}}, {"9.80665", "Kilogram-force", {"kgf","kilogram_force","kilograms_force",NULL}}, {"4.4482216152605e3", "Kip (kilopound-force)",{"kip","kipf","klbf","kips","kilopound","kilopounds",NULL}}, {"9.80665e-3", "Milligrave-force", {"gf","milligrave_force","milligraves_force",NULL}}, {"1", "Newton", {"N","newton","newtons",NULL}}, {"0.2780138509537812", "Ounce-force", {"ozf","ounce_force","ounces_force",NULL}}, {"4.4482216152605", "Pound", {"lbf","pound_force","pounds_force",NULL}}, {"0.138254954376", "Poundal", {"pdl","pl","poundal","poundals",NULL}}, {"1e3", "Sthene", {"sn","sthene","sthenes",NULL}}, {"8.896443230521e3", "Ton-force", {"tnf","ton_force","tons_force",NULL}}, {NULL,NULL,{NULL}} }; /* based on meters per square second */ const struct conversion accelerations[] = { {"3.28084", "Celo", {"celo","celos",NULL}}, {"10000", "Centigal", {"centigal","centigals",NULL}}, {"100", "Centimeter/square second", {"cm/s/s","cm/s^2",NULL}}, {"1000", "Decigal", {"Dg","decigal","decigals",NULL}}, {"3.280839895","Foot/square second", {"f/s/s","f/s^2",NULL}}, {"11811.023622047","Foot/hour/second", {"f/h/s",NULL}}, {"196.8503937","Foot/minute/second", {"f/m/s",NULL}}, {"0.101972", "G-unit (G)", {"G","G-units",NULL}}, {"100", "Galileo", {"Gal","gal","galileo","galileos",NULL}}, {"0.101971621","Grav", {"grav","gravs",NULL}}, {"39.370079", "Inch/square second", {"in/s/s","in/s^2",NULL}}, {"2362.204724409","Inch/minute/second", {"in/m/s",NULL}}, {"3.6", "Kilometer/hour/second", {"km/h/s",NULL}}, {"0.001", "Kilometer/square second", {"km/s/s","km/s^2",NULL}}, {"1.943844492","Knot/second", {"k/s",NULL}}, {"0.1", "Leo", {"leo","leos",NULL}}, {"1", "Meter/square second", {"m/s/s","m/s^2",NULL}}, {"134.216178", "Mile/hour/minute", {"mi/h/m",NULL}}, {"2.236936292","Mile/hour/second", {"mi/h/s",NULL}}, {"0.037282271","Mile/minute/second", {"mi/m/s",NULL}}, {"0.000621371","Mile/square second", {"mi/s/s","mi/s^2",NULL}}, {"100000", "Milligal", {"mGal","milligals",NULL}}, {"1000", "Millimeter/square second", {"mm/s/s","mm/s^2",NULL}}, {NULL,NULL,{NULL}} }; /* based on the Pascal */ const struct conversion pressures[] = { {"98.0665e3", "Atmosphere (technical)", {"atm.Tech","atmosphere.Tech",NULL}}, {"101325", "Atmosphere (standard)", {"atm","atmosphere",NULL}}, {"1e-18", "Attopascal", {"aPa","attopascal","attopascals",NULL}}, {"1e5", "Bar", {"bar",NULL}}, {"0.1", "Barye", {"barye","baryes",NULL}}, {"98.0638", "Centimeter of Water (3.98°C)",{"cmH2O","centimeter_of_water","centimeters_of_water",NULL}}, {"1.33322387415e3","Centimeter of Mercury", {"cmHg","centimeter_of_mercury","centimeters_of_mercury",NULL}}, {"1e-2", "Centipascal", {"cPa","centipascal","centipascals",NULL}}, {"10", "Decapascal", {"daPa","decapascal","decapascals",NULL}}, {"0.1", "Decipascal", {"dPa","decipascal","decipascals",NULL}}, {"1e18", "Exapascal", {"EPa","exapascal","exapascals",NULL}}, {"1e-15", "Femtopascal", {"fPa","femtopascal","femtopascals",NULL}}, {"2.98898e3", "Foot of Water (3.98°C)", {"ftH2O","foot_of_water","feet_of_water",NULL}}, {"40.6366636840919e3","Foot of Mercury", {"ftHg","foot_of_mercury","feet_of_mercury",NULL}}, {"1e9", "Gigapascal", {"GPa","gigapascal","gigapascals",NULL}}, {"100", "Hectopascal", {"hPa","hectopascal","hectopascals",NULL}}, {"249.082", "Inch of Water (3.98°C)", {"inH2O","inch_of_water","inches_of_water",NULL}}, {"3.386388640341e3","Inch of Mercury", {"inHg","inch_of_mercury","inches_of_mercury",NULL}}, {"9.80665e6", "Kilogram-force/sq.mm.", {"kgf/mm2","kilogram-force_per_square_millimeter",NULL}}, {"1e3", "Kilopascal", {"kPa","kilopascal","kilopascals",NULL}}, {"6.894757e6", "kip/sq.in.", {"kip/sq.in.","kip_per_square_inch",NULL}}, {"1e6", "Megapascal", {"MPa","megapascal","megapascals",NULL}}, {"1e-6", "Micropascal", {"µPa","micropascal","micropascals",NULL}}, {"133.322387415","Millimeter of Mercury", {"mmHg","millimeter_of_mercury","millimeters_of_mercury",NULL}}, {"9.80638", "Millimeter of Water (3.98°C)",{"mmH2O","millimeter_of_water","millimeters_of_water",NULL}}, {"1e-3", "Millipascal", {"mPa","millipascal","millipascals",NULL}}, {"1e-9", "Nanopascal", {"nPa","nanopascal","nanopascals",NULL}}, {"1", "Pascal", {"Pa","pascal","pascals",NULL}}, {"1e15", "Petapascal", {"PPa","petapascal","petapascals",NULL}}, {"1e-12", "Picopascal", {"pPa","picopascal","picopascals",NULL}}, {"1e3", "Pièze", {"pz","pieze",NULL}}, {"1.488164", "Poundal/sq.ft.", {"pdl/sq.ft.","poundal_per_sqare_foot",NULL}}, {"47.880259", "Pound/sq.ft.", {"psf","lb/sq.ft.","pound_per_square_foot",NULL}}, {"6.894757e3", "Pound/sq.in.", {"psi","lb/sq.ft.","pound_per_square_inch",NULL}}, {"95.760518e3", "Short Ton/sq.ft.", {"ST/sq.ft","short_ton_per_square_foot",NULL}}, {"1e12", "Terapascal", {"TPa","terapascal","terapascals",NULL}}, {"133.3223684", "Torr", {"torr",NULL}}, {"1e-24", "Yoctopascal", {"yPa","yoctopascal","yoctopascals",NULL}}, {"1e24", "Yottapascal", {"YPa","yottapascal","yottapascals",NULL}}, {"1e-21", "Zeptopascal", {"zPa","zeptopascal","zeptopascals",NULL}}, {"1e21", "Zettapascal", {"ZPa","zettapascal","zettapascals",NULL}}, {NULL,NULL,{NULL}} }; const struct conversion temperatures[] = { {"", "Kelvin", {"kelvin", "Kelvin", "K", NULL}}, {"", "Celsius", {"celsius", "Celsius", "C", NULL}}, {"", "Rankine", {"rankine", "Rankine", NULL}}, {"", "Farenheit", {"farenheit", "Farenheit", "F", NULL}}, {"", "Reaumur", {"reaumur", "Reaumur", "R", NULL}}, {NULL,NULL,{NULL}} }; char * from_temperatures[] = { "[%1.15f]", // kelvin "[%1.15f + 273.15]", // celsius "[%1.15f / 1.8]", // rankine "[(%1.15f - 32)/1.8 + 273.15]", // farenheit "[((5/4) * %1.15f) + 273.15]" // reaumur }; char * to_temperatures[] = { "%s", // kelvin "%s - 273.15", // celsius "%s * 1.8", // rankine "1.8*(%s-273.15)+32", // farenheit "(%s-273.15)*(4/5)" // reaumur }; /* time, energy */ const struct conversion * conversions[] = { lengths, areas, volumes, masses, speeds, powers, forces, accelerations, temperatures, angles, pressures, NULL }; #define CONVERS(x) (x>10)?pressures:((x>9)?angles:((x>8)?temperatures:((x>7)?accelerations:((x>6)?forces:((x>5)?powers:((x>4)?speeds:((x>3)?masses:((x>2)?volumes:((x>1)?areas:lengths))))))))) /* returns the category number of the unit */ ssize_t identify_unit(const char * unit) { ssize_t cat_num; for (cat_num = 0; conversions[cat_num] != NULL; cat_num++) { size_t unit_num; const struct conversion * category = conversions[cat_num]; for (unit_num = 0; category[unit_num].name != NULL; unit_num++) { size_t abbrev_num; for (abbrev_num = 0; category[unit_num].aka[abbrev_num] != NULL; abbrev_num++) { if (!strcmp(category[unit_num].aka[abbrev_num], unit)) { return cat_num; } } } } return -1; } ssize_t identify_units(const char * unit1, const char * unit2) { ssize_t cat_num; ssize_t u1 = -1, u2 = -1; for (cat_num = 0; conversions[cat_num] != NULL; cat_num++) { size_t unit_num; const struct conversion *category = conversions[cat_num]; for (unit_num = 0; category[unit_num].name != NULL; unit_num++) { size_t abbrev_num; for (abbrev_num = 0; category[unit_num].aka[abbrev_num] != NULL ; abbrev_num++) { if (!strcmp(category[unit_num].aka[abbrev_num], unit1)) { if (u2 == -1) { u1 = cat_num; } else if (u2 == cat_num) { return u2; } else { return -1; } } else if (!strcmp(category[unit_num].aka[abbrev_num],unit2)) { if (u1 == -1) { u2 = cat_num; } else if (u1 == cat_num) { return u1; } else { return -1; } } } } } if (-1 == u1) { return -3; } else if (-1 == u2) { return -4; } return -2; } ssize_t unit_id(const int utype, const char * unit) { size_t unit_num; for (unit_num = 0; (conversions[utype])[unit_num].name != NULL; unit_num++) { size_t abbrev_num; for (abbrev_num = 0; (conversions[utype])[unit_num].aka[abbrev_num] != NULL ; abbrev_num++) { if (!strcmp((conversions[utype])[unit_num].aka[abbrev_num], unit)) { return (ssize_t)unit_num; } } } return -1; } void uber_conversion (Number output, const int utype, const int fromunit, const int tounit, Number value) { if (utype != TEMPERATURE_C) { const struct conversion *ltable = conversions[utype]; Number tofac, fromfac; /* Moving to a more precise model... * * The essential computation is: * * value * (tofac/fromfac) * * (it used to be : * *((fromfac)/(tofac)) */ (void)num_init_set_str(tofac, ltable[tounit].factor, 10); (void)num_init_set_str(fromfac, ltable[fromunit].factor, 10); switch (utype) { case LENGTH_C: case AREA_C: case VOLUME_C: case ANGLE_C: case MASS_C: case SPEED_C: case FORCE_C: case POWER_C: case PRESSURE_C: num_div(fromfac, fromfac, tofac); num_mul(output, fromfac, value); break; case ACCELERATION_C: default: num_div(tofac, tofac, fromfac); num_mul(output, tofac, value); } num_free(tofac); num_free(fromfac); } else { Number temp; num_init(temp); /* convert to kelvin */ switch (fromunit) { case KELVIN: break; case CELSIUS: num_set_d(temp, 273.15); num_add(value, value, temp); break; case RANKINE: num_set_d(temp, 1.8); num_div(value, value, temp); break; case FARENHEIT: num_sub_ui(value,value, 32); num_set_d(temp, 1.8); num_div(value, value, temp); num_set_d(temp, 273.15); num_add(value, value, temp); break; case REAUMUR: num_set_d(temp, (5.0/4.0)); num_mul(value, value, temp); num_set_d(temp, 273.15); num_add(value, value, temp); break; } /* convert from kelvin */ switch (tounit) { case KELVIN: break; case CELSIUS: num_set_d(temp, 273.15); num_sub(output, value, temp); break; case RANKINE: num_set_d(temp, 1.8); num_mul(output, value, temp); break; case FARENHEIT: num_set_d(temp, 273.15); num_sub(value, value, temp); num_set_d(temp, 1.8); num_mul(value, value, temp); num_add_ui(output, value, 32); break; case REAUMUR: num_set_d(temp, 273.15); num_sub(value, value, temp); num_set_d(temp, (4.0/5.0)); num_mul(output, value, temp); break; } num_free(temp); /* The old way *//* //char stage1[100]; //char composite[100]; //sprintf(stage1,from_temperatures[fromunit],value); //sprintf(composite,to_temperatures[tounit],stage1); //return parseme(composite); */ } } wcalc-2.4/conversion.h0000644000175000000620000000371610753120724013303 0ustar kkstaff/* * conversion.h * Wcalc * * Created by Kyle Wheeler on Wed Jul 31 2002. * Copyright (c) 2002 Kyle Wheeler. All rights reserved. * */ #ifndef WCALC_CONVERSIONS #define WCALC_CONVERSIONS #include /* for ssize_t */ #include /* also for ssize_t */ #include "number.h" void uber_conversion(Number output, const int utype, const int fromunit, const int tounit, Number value); ssize_t identify_unit(const char *unit); ssize_t identify_units(const char *unit1, const char *unit2); ssize_t unit_id(const int utype, const char *unit); struct conversion { char *factor; char *name; char *aka[9]; }; struct conv_req { char *u1; char *u2; }; /* Conversion Types */ #define MAX_TYPE 10 #define LENGTH_C 0 /*-*/ #define AREA_C 1 /*-*/ #define VOLUME_C 2 /*-*/ #define MASS_C 3 /*-*/ #define SPEED_C 4 /*-*/ #define POWER_C 5 /*-*/ #define FORCE_C 6 /*-*/ #define ACCELERATION_C 7 /*-*/ #define TEMPERATURE_C 8 /*-*/ #define ANGLE_C 9 /*-*/ #define PRESSURE_C 10 /**/ /* Astronomical Units */ #define MAX_ASTRONOMICAL_UNIT 5 #define A_METERS 0 #define A_KILOMETERS 1 #define A_MILES 2 #define LIGHT_YEAR 4 #define PARSEC 5 /* Length Units */ #define LENGTH_UNIT_COUNT 87 /* Area Units */ #define AREA_UNIT_COUNT 74 /* Volume Units */ #define VOLUME_UNIT_COUNT 136 /* Angle Units */ #define ANGLE_UNIT_COUNT 12 /* Mass Units */ #define MASS_UNIT_COUNT 66 /* Speed Units */ #define SPEED_UNIT_COUNT 17 /* Power Units */ #define POWER_UNIT_COUNT 45 /* Force Units */ #define FORCE_UNIT_COUNT 13 /* Acceleration Units */ #define ACCELERATION_UNIT_COUNT 23 /* Pressure Units */ #define PRESSURE_UNIT_COUNT 41 /* Temperature Units */ #define TEMPERATURE_UNIT_COUNT 5 #define KELVIN 0 #define CELSIUS 1 #define RANKINE 2 #define FARENHEIT 3 #define REAUMUR 4 extern const struct conversion *conversions[MAX_TYPE + 2]; #endif wcalc-2.4/ConversionList.h0000644000175000000620000000060010304224616014061 0ustar kkstaff/* ConversionList */ #include @interface ConversionList : NSObject { IBOutlet NSTableView *toList; IBOutlet NSTableView *fromList; IBOutlet NSPopUpButton *theType; } - (int)numberOfRowsInTableView:(NSTableView *)atv; - (id)tableView:(NSTableView *)atv objectValueForTableColumn:(NSTableColumn*)col row:(int)rowIndex; - (IBAction)newType:(id)sender; @end wcalc-2.4/ConversionList.m0000644000175000000620000000306110646775446014117 0ustar kkstaff#include "conversion.h" #include "ConversionList.h" #ifdef MEMWATCH #include "memwatch.h" #endif @implementation ConversionList - (IBAction)newType:(id)sender { if ([toList selectedRow]>-1) [toList deselectAll:sender]; if ([fromList selectedRow]>-1) [fromList deselectAll:sender]; [toList reloadData]; [fromList reloadData]; } - (int)numberOfRowsInTableView:(NSTableView *)atv { switch ([theType indexOfSelectedItem]) { case LENGTH_C: return LENGTH_UNIT_COUNT; case AREA_C: return AREA_UNIT_COUNT; case VOLUME_C: return VOLUME_UNIT_COUNT; case MASS_C: return MASS_UNIT_COUNT; case SPEED_C: return SPEED_UNIT_COUNT; case POWER_C: return POWER_UNIT_COUNT; case FORCE_C: return FORCE_UNIT_COUNT; case ACCELERATION_C: return ACCELERATION_UNIT_COUNT; case TEMPERATURE_C: return TEMPERATURE_UNIT_COUNT; case ANGLE_C: return ANGLE_UNIT_COUNT; case PRESSURE_C: return PRESSURE_UNIT_COUNT; default: return 0; } } - (id)tableView:(NSTableView *)atv objectValueForTableColumn:(NSTableColumn*)col row:(int)rowIndex { int type = [theType indexOfSelectedItem]; static NSString * reamur = NULL; if (! reamur) { reamur = [NSString stringWithFormat:@"R%Caumur", 0x00e9]; [reamur retain]; } if (type != TEMPERATURE_C) { return [NSString stringWithUTF8String:conversions[type][rowIndex].name]; } else { switch (rowIndex) { case KELVIN: return @"Kelvin"; case CELSIUS: return @"Celsius"; case RANKINE: return @"Rankine"; case FARENHEIT: return @"Farenheit"; case REAUMUR: return reamur; default: return @"UNKNOWN"; } } } @end wcalc-2.4/COPYING0000644000175000000620000004311007615275746012012 0ustar kkstaff GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. wcalc-2.4/COPYRIGHT0000644000175000000620000003626410660365601012246 0ustar kkstaffThe code in the Wcalc distribution is Copyright 2000-2007 by Kyle Wheeler All code in the Wcalc distribution which is Copyright Kyle Wheeler or which references this COPYRIGHT file is licensed under the GPL version 2 included below, or (at your option) any later version of the GPL. ------------------------------------------------------------------------------- GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 675 Mass Ave, Cambridge, MA 02139, 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. ------------------------------------------------------------------------------- wcalc-2.4/._definitions.h0000644000175000000620000000024711101143022013622 0ustar kkstaffMac OS X  2uATTR  com.apple.TextEncodingMACINTOSH;0wcalc-2.4/definitions.h0000644000175000000620000000735311101143022013412 0ustar kkstaff/* * definitions.h * Wcalc * * Created by Kyle Wheeler on Thu Feb 07 2002. * Copyright (c) 2001 Kyle Wheeler. All rights reserved. * */ #ifndef WCALC_DEFINITIONS #define WCALC_DEFINITIONS #define W_EXTRA 5 #define RAND_FILE "/dev/random" #define DEFAULT_BASE 10 #define W_PI "3.14159265358979323846264338327950288419716939937510582097" #define W_E "2.718281828459045235360287471352662497757247093699959574966" #define W_AVOGADROS_CONSTANT "6.0221415e23" #define W_BOLTZMANN_CONSTANT "1.3806505e-23" #define W_COULOMB_CONSTANT "8987551787.37" #define W_ELEMENTARY_CHARGE "1.60217653e-19" #define W_MOLAR_GAS_CONSTANT "8.314472" #define W_GRAVITATIONAL_CONSTANT "6.6742e-11" /* m^3 kg^-1 s^-2 */ #define W_GRAVITATIONAL_ACCELLERATION "9.80665" /* m s^-2 */ #define W_SPEED_OF_LIGHT "299792458" #define W_PERMEABILITY_OF_FREE_SPACE "1.25663706144e-6" /* 4pi*pow(10,-7) */ #define W_PERMITTIVITY_OF_FREE_SPACE "8.854187817e-12" /* F m^-1 */ #define W_PLANCK_CONSTANT "6.6260693e-34" #define W_BOHR_MAGNETON "927.400949e-26" /* J T^-1 */ #define W_NUCLEAR_MAGNETON "5.05078343e-27" /* J T^-1 */ #define W_WIEN_DISPLACEMENT "2.8977685e-3" /* m K */ #define W_BOHR_RADIUS "5.291772108e-11" /* m */ #define W_FARADAY_CONSTANT "96485.3383" /* C mol^-1 */ #define W_MOLAR_VOLUME_OF_IDEAL_GAS "22.413996e-3" /* m^3 mol^-1 */ #define W_ELECTRON_VOLT "1.60217653e-19" /* J */ #define W_STEFAN_BOLTZMANN "5.670400e-8" #define W_FINE_STRUCTURE "7.297352568e-3" #define W_EULER "0.57721566490153286060651209008240243104215933593992359880576723488486772677766467093694706329174674951463144724980708248096050401448654283622417399764492353625350033374293733773767394279259525824709491600873520394816567" /* http://primes.utm.edu/glossary/page.php?sort=Gamma */ #define W_ELECTRON_RADIUS "2.817940325e-15" /* m */ #define W_JOSEPHSON_CONSTANT "483597.879e9" /* Hz V^-1 */ #define W_VON_KLITZING_CONSTANT "25812.807449" /* omega */ #define W_RYDBERG_CONSTANT "10973731.568525" /* m^-1 */ #define W_HARTREE_ENERGY "4.35974417e-18" /* J */ #define W_FERMI_COUPLING_CONSTANT "1.16638e-5" /* GeV^-2 */ #define W_MUON_MASS "1.88353140e-28" /* kg */ #define W_TAU_MASS "3.16777e-27" /* kg */ #define W_ELECTRON_MASS "9.1093826e-31" /* kg */ #define W_PROTON_MASS "1.67262171e-27" /* kg */ #define W_NEUTRON_MASS "1.67492728e-27" /* kg */ #define W_DEUTERON_MASS "3.34358335e-27" /* kg */ #define W_ATOMIC_MASS "1.66053886e-27" /* kg */ #define W_HELION_MASS "5.00641214e-27" /* kg */ #define W_ALPHA_PARTICLE_MASS "6.6446565e-27" /* kg */ #define W_LOSCHMIDT_CONSTANT "2.6867773e25" /* m^-3 */ #define W_FIRST_RADIATION_CONSTANT "3.74177138e-16" /* W m^2 */ #define W_SECOND_RADIATION_CONSTANT "1.4387752e-2" /* m K */ #define W_CONDUCTANCE_QUANTUM "7.748091733e-5" /* S */ #define W_IMPEDANCE_OF_VACUUM "376.730313461" /* ohms */ #define W_MAGNETIC_FLUX_QUANTUM "2.06783372e-15" /* Wb */ #define W_CATALAN "0.9159655941772190150546035149323841107741493742816721342664981196217630197762547694793565129261151062485744226191961995790358988033258590594315947374811584069953320287733194605190387274781640878659090247064841521630002287276409423882599577415088163974702524820115607076448838078733704899008647751132259971343385815193110992038743101834993784779390390353488916999900473822093605334185626171594509860056" #define SUPPORTED_SYMBOLS \ "+ - () {} [] * %% / ! ^ > >= < <= == != && || << >> | & ~\n"\ "not ** or and equals eq ne xor\n\n"\ "sin cos tan cot asin acos atan acot\n"\ "sinh cosh tanh coth asinh acosh atanh acoth\n"\ "log ln logtwo round abs ceil floor sqrt cbrt comp\n"\ "Gamma lnGamma zeta sinc\n"\ "\n"\ "e pi Na k Cc ec R G g Me Mp Mn Md u amu c h mu0 epsilon0\n"\ "muB muN b ao F Vm NAk eV sigma alpha gamma re Kj Rk Rinf\n"\ "Eh Gf Mmu Mt Mh Malpha n0 c1 c2 G0 Phi0 K\n"\ "random irandom rand irand\n" #endif wcalc-2.4/depcomp0000755000175000000620000002753307615275751012343 0ustar kkstaff#! /bin/sh # depcomp - compile a program generating dependencies as side-effects # Copyright 1999, 2000 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 . 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. 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. stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'` tmpdepfile="$stripped.u" outname="$stripped.o" if test "$libtool" = yes; then "$@" -Wc,-M else "$@" -M fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi if test -f "$tmpdepfile"; then # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^$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" ;; 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 tmpdepfile1="$dir.libs/$base.lo.d" tmpdepfile2="$dir.libs/$base.d" "$@" -Wc,-MD else tmpdepfile1="$dir$base.o.d" tmpdepfile2="$dir$base.d" "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi if test -f "$tmpdepfile1"; then tmpdepfile="$tmpdepfile1" else tmpdepfile="$tmpdepfile2" fi if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a space and a tab 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 proprocessed 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'. We will use -o /dev/null later, # however we can't do the remplacement now because # `-o $object' might simply not be used 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 "$@" -o /dev/null $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 $? # 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 ;; -*) ;; *) 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 proprocessed 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 proprocessed 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 wcalc-2.4/English.lproj/0002775000175000000620000000000011101160226013445 5ustar kkstaffwcalc-2.4/English.lproj/._InfoPlist.strings0000664000175000000620000000024611100237546017215 0ustar kkstaffMac OS X  2tATTRd  com.apple.TextEncodingUTF-16;256wcalc-2.4/English.lproj/InfoPlist.strings0000664000175000000620000000100611100237546016773 0ustar kkstaff/* Localized versions of Info.plist keys */ CFBundleName = "Wcalc"; CFBundleShortVersionString = "Wcalc version 2.4"; CFBundleGetInfoString = "Wcalc version 2.4, Copyright 2001-2008 Kyle Wheeler."; NSHumanReadableCopyright = "Copyright 2008 Kyle Wheeler."; wcalc-2.4/English.lproj/MainMenu.nib/0002775000175000000620000000000011101160226015725 5ustar kkstaffwcalc-2.4/English.lproj/MainMenu.nib/classes.nib0000644000175000000620000002350411101147722020062 0ustar kkstaff IBClasses CLASS theDelegate LANGUAGE ObjC OUTLETS mainWindow NSWindow SUPERCLASS NSObject ACTIONS clearVariables id copyMe id delVariable id newVariable id CLASS VariableList LANGUAGE ObjC OUTLETS theList NSTableView SUPERCLASS NSObject ACTIONS closeIt id onClose id openIt id toggleIt id CLASS InspectorController LANGUAGE ObjC OUTLETS affectInspectorMenu NSMenuItem historyList NSTableView inspectorWindow NSPanel variableList NSTableView SUPERCLASS NSObject ACTIONS clearHistory id copyMe id rowSelected id CLASS HistoryList LANGUAGE ObjC OUTLETS expressionField NSTextField theList NSTableView SUPERCLASS NSObject ACTIONS newType id CLASS ConversionList LANGUAGE ObjC OUTLETS fromList NSTableView theType NSPopUpButton toList NSTableView SUPERCLASS NSObject ACTIONS closeIt id openIt id CLASS AboutBoxController LANGUAGE ObjC OUTLETS aboutBox NSWindow version NSTextField SUPERCLASS NSObject ACTIONS addVar id clearVars id delVar id showList id CLASS PersVarList LANGUAGE ObjC OUTLETS theList NSTableView theWindow NSWindow SUPERCLASS NSObject ACTIONS clear id closeWindow id convert id displayPrefs id enterData id go id menuConstant id menuFunction id open id openBDrawer id openIDrawer id quit id save id saveAs id savePrefs id setPrecision id setPrefs id shConversions id showBaseDrawer id showKeyboardDrawer id showPrefs id toggleSize id CLASS WcalcController LANGUAGE ObjC OUTLETS AnswerField NSTextField ExpressionField NSTextField PrecisionSlider NSSlider affectKeyboardMenu NSMenuItem altInputDecSep NSTextField altInputThouSep NSTextField alternateInputPref NSButton baseDrawer NSDrawer baseMenu NSMenuItem bitsPref NSTextField bitsStepper NSStepper cModPref NSButton capsLockKey NSButton conversionMenu NSMenuItem conversionWindow NSPanel convertFrom NSTableView convertTo NSTableView convertType NSPopUpButton decimalKey NSButton engineeringNotation NSPopUpButton enterKey NSButton errorController id historyDuplicates NSButton historyList id inspector InspectorController inspectorWindow NSWindow keypad id limitHistory NSButton limitHistoryLen NSTextField limitHistoryLenTag NSTextField livePrecision NSButton mainWindow NSWindow meta NSApplication outputFormat NSMatrix outputFormat2 NSMatrix persVarsWindow NSWindow pickyVariables NSButton precisionGuard NSButton printDelimiters NSButton printInts NSButton printPrefixes NSButton rememberErrors NSButton roundingIndication NSPopUpButton saveAsMenuItem NSMenuItem saveMenuItem NSMenuItem shiftKey1 NSButton shiftKey2 NSButton simpleCalculator NSButton sizeToggleMenu NSMenuItem sliderPref NSTextField sliderStepper NSStepper strictSyntax NSButton theKeyboard id thePrefPanel NSPanel updateHistory NSButton useRadians NSButton variableList NSTableView SUPERCLASS NSObject ACTIONS id CLASS FirstResponder LANGUAGE ObjC SUPERCLASS NSObject CLASS WcalcService LANGUAGE ObjC OUTLETS historyList NSTableView inspectorWindow NSWindow variableList NSTableView SUPERCLASS NSObject ACTIONS closeAlert id showAlert id throwAlert NSString CLASS ErrorController LANGUAGE ObjC OUTLETS errorDialog id errorMessage id SUPERCLASS NSObject CLASS MyTextField LANGUAGE ObjC OUTLETS AnswerField NSTextField mainController WcalcController SUPERCLASS NSTextField IBVersion 1 wcalc-2.4/English.lproj/MainMenu.nib/info.nib0000644000175000000620000000116411101147722017356 0ustar kkstaff IBFramework Version 672 IBLastKnownRelativeProjectPath ../Wcalc.xcodeproj IBOldestOS 4 IBOpenObjects 300 29 1793 2306 IBSystem Version 9F33 targetFramework IBCocoaFramework wcalc-2.4/English.lproj/MainMenu.nib/keyedobjects.nib0000644000175000000620000041612211101147722021102 0ustar kkstaffbplist00 X$versionT$topY$archiverX$objects]IB.objectdata_NSKeyedArchiver 156<=B\]^_cg t{ &';<ADGQRZ[\demnwx  &'(12:;CDLTU]^fgopxy $+019:>BEFGKPSTt  #$&'*/@EFKLMPTUXY^efns|   $%&',345:=HOPQXYZelmnuvw~  #$*+167>FMNUV]binowx'HIJKLMNOPQRSTUVadhknquvz       % * 2 7 8 @ A C E F K R S [ ` h i n o t u z          # , - 6 7 @ A J K T U ^ _ h i r s | }      & * 0 5 = A B E N O P S [ \ ` a b e l m u w x y ~ A ` a l  w           & ' / 0 1 6 = > F G L O P U V [ _ f k l m r z {        ' 1 2 @ G H Q X Y Z c l 1 m r t w x 1 1 < 1 b 1  ! 1"@I 1JY`ahipqxy 1  %&/67?@IQRZ[cdmtu|} 1 )2 137@HIQRYZabijqr{ 1| 1 #$,-56>?GHQ 1R`hiqrz{ 1    1&'().3:;DEJOTYZ_dixyz{~  #$,./49:?DINSX]bgnowxy~ #*+34NOV_`cdfmnvw~  "19>?DEOPTYZk\`cfgjkpuv{| "#&.8>EFKPUZ[`ghpqvw|  #* 12345:BCMRW^_glxy{  %,-5<=EFMNVW^_gnow~ "#+23;BCKRS[bckrs{  !&',16;@AFKPWX`ev}~$).38=>CHMTU]^cklwx|  !&-.689>?DIJOTYZ_`ejotuz  %*/:;=?FNRS[\deijk lmnsx}  $).38=>CHMR]^_ahly}  $%,-.56 7  89:?@EJOTUZ_dinoty~     % & * . /   0 1 6 ; @ J K L N V _ h i l u ~    !!! ! !!!!!!!"!#""$4%'D'E'F'G'H'I'J'K'L'M'N'O'P'Q'R'S'T'U'V'W'X'Y'Z'['\']'^'_'`'a'b'c'd'e'f'g'h'i'j'k'l'm'n'o'p'q'r's't'u'v'w'x'y'z'{'|'}'~'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''(((((((((( ( ( ( ( ((((((((((((((((((( (!("(#($(%(&('((()(*(+(,(-(.(/(0(1(2(3(4(5(6(7(8(9(:(;(<(=(>(?(@(A(B(C(D(E(F(G(H(I(J(K(L(M(N(O(P(Q(R(S(T(U(V(W(X(Y(Z([(\(](^(_(`(a(b(c(d(e(f(g(h(i(j(k(l(m(n(o(p(q(r(s(t(u(v(w(x(y(z({(|(}(~(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((+........... .".........................................P. .................................////////// / / / / /////////////////// /!/"/#/$/%/&/'/(/)/*/+/,/-/.///0/1/2/3/4/5/6/7/8/9/:/;//?/@/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O/P/Q/R/S/T/U/V/W/X /Y/Z/[/\/]/^/_/`/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/{/|/}/~/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////0000000000 0 0 0 0 00{00000000000000000 0!0"0#0$0%0&0'0(0)0*0+0,0-0.0/0001024030405060708090:0;0<0=0>0?0@0A0B0C0D0E0F0G0H0I0J0K0L0M0N0O0P0Q0R0S0T0U0V0W0X0Y0Z0[0\0]0^0_0`0a0b0c0d0e0f0g0h0i0j0k0l0m0n0o0p0q0r0s0t0u0v0w0x0y0z0{0|0}0~00000000000000000Y00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001111111111 1 1 1 1 1111111111111q111111 1!1"1#1$1%1&1'1(1)1*1+1,1-1.1/101112131415161718191:1;1<1=~1>1?1@1A1B1C1D1E1F1G1H1I1J1K1L1M1N1O1P1Q1R1S1T1U1V1W1X1Y1Z1[1\1]1^1_1`1a1b1c1d1e1f1g1h1iC1j1k1l1m1n1o1p1q1r1s1t1u1v1w1x1y1z1{1|1}1~11111111111U$null  !"#$%&'()*+,-./0VNSRootV$class]NSObjectsKeys_NSClassesValues_NSAccessibilityOidsValues]NSConnections[NSNamesKeys[NSFramework]NSClassesKeysZNSOidsKeys]NSNamesValues_NSAccessibilityConnectors]NSFontManager_NSVisibleWindows_NSObjectsValues_NSAccessibilityOidsKeysYNSNextOid\NSOidsValues ԁaށ Ӏd݁߁e рc  234[NSClassName]NSApplication789:X$classesZ$classname:;^NSCustomObjectXNSObject_IBCocoaFramework>?@ZNS.objectsACDEFGHIJKLMNOPQRSTUVWXYZ[\NSWindowView\NSScreenRect_NSFrameAutosaveName]NSWindowTitleYNSWTFlags]NSWindowClass\NSWindowRectYNSMaxSize_NSWindowBacking_NSWindowStyleMaskYNSMinSize[NSViewClass 0(  _{{312, 292}, {171, 255}}UWcalcXNSWindow`abYNS.string TView78deef;_NSMutableStringXNSStringhijk^lmnopqms_NSNextResponderZNSSubviewsXNSvFlags[NSFrameSize[NSSuperview>uv{wxyz#+h|}~j^2lOmOWNSFrame_NSOriginalClassNameVNSCellYNSEnabled "  [MyTextField[NSTextField_{{11, 198}, {149, 19}}w[NSCellFlags_NSBackgroundColorZNSContentsYNSSupport]NSControlView\NSCellFlags2_NSDrawsBackground[NSTextColora! PVNSSizeVNSNameXNSfFlags#@& \LucidaGrande78;VNSFontWNSColor\NSColorSpace[NSColorName]NSCatalogNameVSystem_textBackgroundColorWNSWhiteB178; YtextColorǀB078ʤ~;_NSTextFieldCell\NSActionCell78΢;^NSClassSwapperh|~j^lOmO *$%"  _{{11, 176}, {149, 15}}xWNSValue_NSNumberOfTickMarks_NSTickMarkPositionZNSMaxValueZNSMinValueZNSVertical]NSAltIncValue_NSAllowsTickMarkValuesOnly#)&'##@b`# `a #@((YHelvetica78~;\NSSliderCell78;XNSSliderYNSControlVNSView[NSResponderh|ij^2lOmO[NSExtension |, }~ >u {  -49=BGKOSW[_chloswh|~j^ly !"pmy+3./ +_{{37, 35}, {37, 33}}()*+,-./02X3443 89:_NSAlternateContents_NSPeriodicInterval^NSButtonFlags2_NSAlternateImage_NSKeyEquivalent_NSPeriodicDelay]NSButtonFlags2K1001-@Q2>@#@*78BCC~;\NSButtonCell78EFF;XNSButtonh|~j^lHy KLpmyPUNSTag+356 +j_{{114, 101}, {37, 33}}()*+,-.H/02X3VW3 89:P218714a"Q-h|~j^ly _`pmy+3:; +_{{75, 68}, {37, 33}}()*+,-./02X3ii389:21<<19Q6h|~j^lHy qrmyv+3>? +k_{{114, 134}, {37, 33}}()*+,-.H/02X3|}389:v21A@1=aQ*h|~j^lHy my+3CD +i_{{75, 134}, {37, 33}}()*+,-.H/02X3389:21FE1BaQ/h|~j^ly pmy+3HI +_{{114, 68}, {37, 33}}()*+,-./02X3389:21JJ1GQ+h|~j^ly pmy+3LM +_{{75, 101}, {37, 33}}()*+,-./02X3389:21NN1KQ9h|~j^ly pmy+3PQ +_{{-2, 2}, {76, 33}}()*+,-./02X3389:21RR1OQ0h|~j^ly pmy+3TU +_{{75, 35}, {37, 33}}()*+,-./02X3389:21VV1SQ3h|~j^ly pmy+3XY +_{{37, 68}, {37, 33}}()*+,-./02X3389:21ZZ1WQ5h|~j^ly pmy+3\] +_{{-2, 35}, {37, 33}}()*+,-./02X3389:21^^1[Q1h|~j^ly pmy+3`a +_{{75, 2}, {37, 33}}()*+,-./02X3389:21bb1_Q.h|~j^lHy pmy+3de +h_{{114, 2}, {37, 66}}()*+,-.H/02X3"#389:21gf1cQ=Q h|~j^lHy +,my0+3ij +d_{{-2, 134}, {37, 33}}()*+,-.H/02X37389:021k1hQCh|~j^lHy >?my+3mn +_{{37, 134}, {37, 33}}()*+,-.H/02X3##389:21ff1lh|~j^ly OPpmy+3pq +_{{-2, 101}, {37, 33}}()*+,-./02X3YY389:21rr1oQ7h|~j^ly abpmy+3tu +_{{37, 101}, {37, 33}}()*+,-./02X3kk389:21vv1sQ8h|~j^ly stpmy+3xy +_{{-2, 68}, {37, 33}}()*+,-./02X3}}389:21zz1wQ478;^NSMutableArrayWNSArray_{{11, 5}, {149, 165}}78;\NSCustomViewh|~j^lOmO   _{{11, 225}, {149, 21}}3z!1@ 78;Z{171, 255}78;_{{0, 0}, {1680, 1028}}Z{171, 277}_{3.40282e+38, 3.40282e+38}Uwcalc78;_NSWindowTemplate78;\NSMutableSetUNSSet>u{k      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~     ƀҀրހ !'+-KegmƁʁ́ρсԁ )-04~܁݁ !"#$*.9:@BCEGHIJNghmnpuvx{ˁ́́΁ЁՁׁ؁فځށ  āŁƁǁȁ́́΁ρЁсҁӁԁցׁ؁݁  "#$&'*+,-.01346789;<>@ABCDEFGHJKLMNdefghjlmoprtuwyz{|}؁ځہ܁݁߁ CDEIKMOQSUWY[]_ !"#]NSDestinationXNSSourceWNSLabelh|~jl% '(p%3 hijk+n.p/{_{{240, 87}, {30, 30}}()*+,-./02467"89:2Qi<#@$<A 23D_WcalcControllerZenterData:78HIIJ;_NSNibControlConnector^NSNibConnectorLMNOŀ23R_InspectorControllerhUVWXYZ[\jk]^_l`abcdefijklpmopcrYs_NSDraggingSourceMaskForNonLocalYNSTvFlags\NSHeaderView_NSAllowsTypeSelect\NSCornerView_NSIntercellSpacingWidth_NSColumnAutoresizingStyle_NSIntercellSpacingHeight^NSAutosaveName[NSGridColor_NSGridStyleMask^NSTableColumns_NSDraggingSourceMaskForLocal[NSRowHeight@ #@#@ €#@,h|uijvwlxyz{|}~MyMYNScvFlagsYNSDocViewYNSBGColor]NSNextKeyViewCBA Z{432, 262}hjklpM[NSTableViewh|uijvwlxyz|~fyfCKJY{432, 17}78;_NSTableHeaderViewh|jlyyh|ijlxcc[NSHScrollerXNSsFlags_NSHeaderClipView\NSScrollAmts[NSVScroller]NSContentView>HML2@OA A AA>D_{{-26, 0}, {16, 17}}78;]_NSCornerView>u{M^NSIsResizeable\NSHeaderCell\NSIdentifierWNSWidthZNSDataCell^NSResizingMaskZNSMinWidthZNSMaxWidth #@k`#@D#@@Whistory9ZExpression׀K0.33333334 _headerTextColor78~;_NSTableHeaderCellM1@! _controlTextColor78;]NSTableColumnM #@i#@BgVresult/9ӀVResult[headerColorM! _controlBackgroundColorK0.66666669YgridColor"D0.5Yinspector78%;[historyList78())J;_NSNibOutletConnector !-.ǀ0123456H789;<=>?WNSTitle_NSKeyEquivModMaskZNSKeyEquiv]NSMnemonicLocYNSOnImage\NSMixedImageVNSMenuЀʀ΀ 0ABCD[NSMenuItems^Cosecant (csc)2GHIJ^NSResourceNamèˀWNSImage_NSMenuCheckmark78NOO;_NSCustomResource2GHIS̀ˀ_NSMenuMixedState78VWW;ZNSMenuItem]menuFunction: !\#Ӏh|~jl% abp%3Ԁ _{{321, 29}, {30, 30}}()*+,-./0247\89:2FLp!rŀ׀h|~jlHtuvwxt{؀܀ـ h|ij+n_{{148, 135}, {19, 27}}Hp{[NSIncrement\NSAutorepeat#@ #@@#@ 78~;]NSStepperCell78;YNSStepper[bitsStepper !߀h|~jlHt xt؀3 _{{15, 203}, {108, 18}}()*+,-.H/0X321Hu?{@ABCDEG 01234567J9K;<=Ё ʀ΀TUndoQz01234567S9T;<=Ёʀ΀TRedoQZ01[2\345679;<=]NSIsSeparator\NSIsDisabledЀ  ʀ΀01234567g9h;<=Ёʀ΀SCutQx01234567p9q;<=Ёʀ΀TCopyQc01234567y9z;<=Ёʀ΀UPasteQv012345679;<=Ёʀ΀ZSelect AllQa7866;Tmenu !"h|~jlH x#3$% # h|ij+np_{{15, 199}, {183, 18}}()*+,-.H/0X32&1"_Record Errors in History !.(0123456H79;<=Ё*ʀ΁)(0AB_Sampling Function (sinc)Lzwŀ,[AnswerFieldL9ŁB. hUVWXYZ[\jk^_l`abdjklppYs/@1 40 /7h|uijvwlxz|~Á5Ca`.5.hjklpÁ232.h|uijvwlxz|~Ɂ5Cgf151h|jlӁ565h|ijlxƁ]dMh2_]b//_{{-22, 0}, {12, 17}}>u{8=\NSIsEditable :9#@ks+< .Xvariable9Ӏ;XVariable!.  ?>#@iA#@BT .Uvalue'9Ӏ@UValue!.0AB35CDTMenu>u9{:;<=EFHJ0123456H7p9;<=EЁʀ΁B01234567H9;<=€ЁGʀ΁BSNew01234567P9;<=€ЁIʀ΁BVDelete012345679;<=€Ѐʀ΁BL_`aŁQLdh|~jlHc efxcM3NO Mh|ij+nlmpˁ_{{17, 199}, {106, 18}}()*+,-.H/0Xt3`2P1L^Print Prefixesh|~jlHcz{|xcMcRS M _{{20, 71}, {173, 22}}()*+,W-6.k2k_8_NSMenuItemRespectAlignment_NSArrowPosition_NSPreferredEdge_NSUsesItemFromMenu]NSAltersStateA@ TbUVQ W@`a `a 0123456|79;<=kXNSTargetXNSActionWNSStateSЁXʀ΁WY0ABZ[TNone__popUpItemAction:`a ZOtherViews>u{V\_0123456|79;<=SЁ]ʀ΁W^VSimple0123456|79;<=ƁSЁ`ʀ΁Wa_Significant Figures78ʦC~;_NSPopUpButtonCell^NSMenuItemCell78ΦF;]NSPopUpButton[nextKeyView GӀfZselectAll:L!ـŁhl0123456H79;<=Ёjkʀ΁i0ABTSaveQs\saveMenuItemL!Łnh|~jlH#op #_{{286, 176}, {67, 19}}H_NSAllowedInputLocales[NSFormatterqA!nq@      +!+#$VNS.nilZNS.decimalVNS.nan[NS.roundingWNS.zero_NS.negativeattrsVNS.max]NS.attributes_NS.positiveformat_NS.allowsfloats_NS.negativeformat_NS.positiveattrs[NS.thousandVNS.min\NS.localized_NS.hasthousandsbrR  (>)*9WNS.keys+,-./012345678stuvwxyz{|}~$=>!BE#RbWminimum_textAttributesForNegativeValues_attributedStringForNilVlocale\allowsFloatsWmaximum^negativeFormat^positiveFormat_usesGroupingSeparator_attributedStringForZero_decimalSeparator_formatterBehavior_groupingSeparator_attributedStringForNotANumberWXYZ[\]k_ZNS.compact[NS.exponent^NS.mantissa.boYNS.length[NS.mantissa[NS.negativeO78bcc;_NSDecimalNumberPlaceholder(>efg78ijj;\NSDictionaryfl78opp;_NSAttributedStringrst]NS.identifierUen_US78wxx;XNSLocale WXYZ[\]|kk} OR-0fl\NSAttributesR(>eQ,flSNaN78j;_NSMutableDictionary78;_NSNumberFormatter>_&NSAllRomanInputSourcesLocaleIdentifier78;_limitHistoryLen h|~jl p3 h|ij+np>%_{{228, 12}, {91, 32}}()*+,-./0k"32g18@UOops.>(23_ErrorController[closeAlert: Ȁ012345679;<=πЁʀ΁0ABSԁ ݁ZHide WcalcQhUhide: !#WL!Ł012345679;<=Ёʀ΁0ABƁс[Hide KeypadQt^sizeToggleMenuLaŀwSdL!Ł.\variableList ! 0123456H7 9;<=  Ёʀ΁0AB _Boltzmann Constant (k)]menuConstant: ! h|~jlHcu  xc M܁ M_{{152, 25}, {19, 27}} H "  \NSValueWraps#? #@̶  ! ( )h|~jl + - . / +3! h|ij+n 5 6p_{{250, 12}, {94, 32}}()*+,-./0 :k < =3 (2Áā€1XConvert!`a `a Xconvert: ! I#ǀh|~jl% N Op%3ȁ _{{45, 58}, {30, 30}}()*+,-./0247 I89:2 ! ^.ˀ0123456H7 b9;<= gЁ̀ʀ΁)_Logarithm [base 2] (logtwo)LA mŀZmainWindowL! sŁ_errorController ! x.Ҁ0123456H7 |9;<= ЁӀʀ΁)'_Exponential Integral (eint)L ! ŁՀh|~jlHcz xcMcց M_{{18, 113}, {173, 22}}()*+,W-6.k 2k 8  ؁bـځ `a `a 0123456 7 9;<= k׀Ё܀ʀ΁ہ0AB ށYAutomatic`a >u { ځ0123456 7 9;<= ׀Ёʀ΁ہUNever0123456 7 9;<= ȁ׀Ёʀ΁ہVAlways_engineeringNotation ! #耘h|~jl% p%3 _{{0, 116}, {30, 30}}()*+,-./024 7 89:2뀔Q`Lxaŀ[#dL Ł23 ^ConversionListh|~jl +z  +c _{{17, 262}, {324, 26}}()*+,W-6.k2k3 3 8  b11 `a 0123456 7 9;<=  kЁʀ΁0AB  VLength`a >u {        ! "  0123456 7 &9;<=  +Ёʀ΁TArea0123456 7 09;<=  5Ёʀ΁VVolume0123456 7 :9;<=  ?Ёʀ΁TMass0123456 7 D9;<=  IЁʀ΁USpeed0123456 7 N9;<=  SЁʀ΁UPower0123456 7 X9;<=  ]Ё ʀ΁ UForce0123456 7 b9;<=  gЁ ʀ΁\Acceleration0123456 7 l9;<=  qЁʀ΁[Temperature0123456 7 v9;<=  {Ёʀ΁UAngle0123456 7 9;<=  Ёʀ΁XPressureWtheType ! #h|~jl% p%3 _{{327, 87}, {30, 30}}()*+,-./024 7 89:2Q[ E Vpaste: &!(h|~jl  "3#$$ "h|ij+n p^S_{{-2, 0}, {71, 28}}()*+,-./0k H  2%G!`a 23 À'[PersVarListWaddVar: ! *0123456H7 9;<= ҀЁ,ʀ΁+;0AB ցoTau Mass (M/Mtau) ! .0123456H7 9;<= Ё/ʀ΁+._Bohr Radius (ao) ! 10123456H7 9;<= XЁ3ʀ΁20AB Z\QeL ! Ł5}CDEFGHIJKLMN P o     X  :z7px86|{9_{{34, 75}, {440, 341}}YInspector`a WNSPanel`ab hijk+n p ;y>u { <h V|ijl    9  ! %^NSTabViewItems_NSAllowTruncatedLabels_NSSelectedTabViewItem:xTS= : U>u ({>h|ijl n - .p <R?<>u 2{y 4N>u 7{ciDH>u ?{M_{{1, 17}, {432, 262}}78 C D D;ZNSClipViewh|jl Fyy I J Ky MYNSPercentGEF#?}s@_{{-30, 17}, {15, 247}}\_doScroller:78 Q R R;ZNSScrollerh|jl Fyy I Wk Ky ZGIF#?M_{{1, -30}, {417, 15}}>u ^{f_{{1, 0}, {432, 17}}_{{0, 29}, {434, 280}}78 c d d;\NSScrollViewh|~jl h i >3OP >_{{368, -2}, {71, 28}}()*+,-./0k q 4 2QN`a _{{10, 25}, {434, 309}}_{{-7, -10}, {454, 347}}>u {{ % }U[    YNSTabViewZV><XW`a WHistory Y\controlColor78 ;]NSTabViewItem    Z\]<Xw`a; h|ij+n pv^>u { 5inr>u {́/bd24>u {Á.h|jl F I  K 55GcF5#?`_{{-22, 17}, {11, 262}}h|jl F I kp K Á55GeF5#? _{{-100, -100}, {140, 15}}>u ǀ{Ɂ1h|~jl ]3jk% ]_{{181, -2}, {71, 28}}()*+,-./0k P  2lmIi:(`a h|~jl /]3op ]()*+,-./0k   2lqn`a h|~jl ]3st ]_{{-5, -2}, {71, 28}}()*+,-./0k H  2luGr`a YVariables78   ;Z{440, 341}Z{213, 129}_inspectorWindow !#9L   Ł23 _AboutBoxControllerh|~j^l   p   hijk^l n "p #  %_{{14, 20}, {100, 14}}/ *  -!X@]Version 1.1.1Wversion ! 4#h|~jl% 9 :p%3 _{{37, 87}, {30, 30}}()*+,-./024 C7 489:2QqL IMŁ23 N[HistoryListLx! Tŀ#_PrecisionSlider ! #4 ] ^01234567 a9;<= eЁʀ΁0AB h i jZClear Menu_clearRecentDocuments: ! p.0123456H7 t9;<=> yЁʀ΀"_%Inverse Cosecant (acsc/arccsc/csc^-1) } i23 \VariableList\delVariable: I 012345679;<= Ѐʀ΁0AB3 Cy]clearHistory:LaŀB_dLM!OŀL*! Ł^conversionMenu ! h|~jlHc xc M3 M_{{17, 157}, {120, 18}}()*+,-.H/0X 3  21_Print DelimitersLz!ŀ, ! 0123456H7 9;<= πЁʀ΁+9_Proton Mass (Mp) ! 0123456H7 9;<= ݀Ёʀ΁+4o!Fine-Structure Constant (/alpha)L ! Łh|~jlH% p% 뀐3 g_{{350, 29}, {86, 30}}()*+,-.H/027 7 89 2@UshiftYshiftKey2 ! .0123456H7 9;<= Ёʀ΁)_Random Integer (irand) !#GL! ŀTmetaL ŀ0AB   ہXMainMenu>u {  ! " # $ % &āށYÁ (01234567S9;<=  0YNSSubmenuЁ ʀ΁^submenuAction:>u 4{ 5 6 7 8 9 : < = > ?ǁɁʁ́΁Ձց؁ځ0234567 B;<=πЁȀʀ΁[About Wcalc01[2\345679;<=πЀ  ʀ΁01234567 S9 T;<=πЁˁ̀ʀ΁^Preferences...Q;01[2\345679;<=πЀ  ʀ΁ (01234567 e f9;<= kЁсπʀ΁XServices0AB o p qҁԁ`a l >u v{__NSServicesMenu01[2\345679;<=πЀ  ʀ΁01234567 9;<=πЁ׀ʀ΁[Hide Others01234567 9;<=πЁـʀ΁XShow All01[2\345679;<=πЀ  ʀ΁01234567 9 C;<=πЁ܁ʀ΁ZQuit Wcalc\_NSAppleMenu (01234567 9;<=  Ёi߀ʀ΁TFile`a >u {  h01234567 9 ;<=Ёʀ΁iWOpen...Qo (01234567 e 9;<= ȀЁʀ΁i[Open Recent`a ɀ >u ΀{ ]__NSRecentDocumentsMenu01[2\345679;<=Ѐ  ʀ΁i0123456H7 9 ;<= Ёʀ΁iZSave As...QS (01234567 9;<=  Ѐʀ΁ (01234567"9;<=  Ёʀ΁>u { * 0123456796;<=Ёʀ΁^Show Inspector012345679 ;<=Ёʀ΁_Show Base DrawerQb012345679;<=Ёʀ΁_Preloaded VariablesQV (012345679;<=  Ё)ʀ΁YFunctions>u${%&'() ^+,-.0123 x56789:;<=> 568ˁ:;=?(ABDFҁHJLMOQRTVW (01234567>C9;<=HЀȁʀ΁)]Trigonometric>uL{MNOPQ-STUVW p   ǁ0123456H7[9;<=>kЁʀ΀ZSine (sin)0123456H7c9;<=>XЁ ʀ΀\Cosine (cos)0123456H7k9;<=>Ё ʀ΀]Tangent (tan)0123456H7s9;<=> Ёʀ΀_Cotangent (cot)0123456H7{9;<=>Ёʀ΀\Secant (sec)0123456H79;<=>|Ёʀ΀_!Inverse Sine (asin/arcsin/sin^-1)0123456H79;<=>Ёʀ΀_#Inverse Cosine (acos/arccos/cos^-1)0123456H79;<=>Ёʀ΀_$Inverse Tangent (atan/arctan/tan^-1)0123456H79;<=>Ёʀ΀_&Inverse Cotangent (acot/arccot/cot^-1)0123456H79;<=>Ёʀ΀!_#Inverse Secant (asec/arcsec/sec^-1) (012345679;<=Ѐʀ΁)_Hyperbolic Functions>u{ŀ!#%')+-/130123456H79;<=̀Ё ʀ΀_Hyperbolic Cosine (cosh)0123456H79;<=րЁ"ʀ΀ _Hyperbolic Tangent (tanh)0123456H79;<=߀Ё$ʀ΀_Hyperbolic Cotangent (coth)0123456H79;<=Ё&ʀ΀#_Hyperbolic Secant (sech)0123456H79;<=Ё(ʀ΀$_Hyperbolic Cosecant (csch)0123456H79;<=Ё*ʀ΀_0Inverse Hyperbolic Sine (asinh/areasinh/sinh^-1)0123456H79;<=Ё,ʀ΀_2Inverse Hyperbolic Cosine (acosh/areacosh/cosh^-1)0123456H79;<= Ё.ʀ΀ _3Inverse Hyperbolic Tangent (atanh/areatanh/tanh^-1)0123456H79;<=Ё0ʀ΀_5Inverse Hyperbolic Cotangent (acoth/areacoth/coth^-1)0123456H79;<=Ё2ʀ΀%_2Inverse Hyperbolic Secant (asech/areasech/sech^-1)0123456H79;<=$Ё4ʀ΀&_4Inverse Hyperbolic Cosecant (acsch/areacsch/csch^-1)01[2\345679;<=Ѐ  ʀ΁)0123456H719;<=Ё7ʀ΁)_Natural Logarithm (ln)0123456H799;<=>Ё9ʀ΁) _Logarithm [base 10] (log)01[2\345679;<=Ѐ  ʀ΁)0123456H7K9;<=PЁ<ʀ΁)_Gamma Function (Gamma)0123456H7T9;<=YЁ>ʀ΁)_Log Gamma Function (lnGamma)0123456H7]9;<=bЁ@ʀ΁)_Zeta Function (zeta)01[2\345679;<=Ѐ  ʀ΁)0123456H7o9;<=YЁCʀ΁)_Nearest Integer (round)0123456H7w9;<=ЁEʀ΁)_Absolute Value (abs)0123456H79;<=ЁGʀ΁)+_One's Complement (comp)0123456H79;<=ЁIʀ΁))_Exponential Power (exp)0123456H79;<=ЁKʀ΁)*_Factorial (fact)01[2\345679;<=Ѐ  ʀ΁)0123456H79;<= ЁNʀ΁)oSquare Root (sqrt/")0123456H79;<=ЁPʀ΁)_Cube Root (cbrt)01[2\345679;<=Ѐ  ʀ΁)0123456H79;<=ЁSʀ΁)_Next-lowest Integer (floor)0123456H79;<={ЁUʀ΁)_#Next-highest Integer (ceil/ceiling)01[2\345679;<=Ѐ  ʀ΁)0123456H79;<=ۀЁXʀ΁)_Random Value (rand) (01234567 9;<= Ё2Zʀ΁[WSymbols>u{ ]1_aceghy0123456H79;<= kЁ^ʀ΁2dpi/0123456H79;<= Ё`ʀ΁2oEuler's Constant (/gamma)0123456H7 9;<= ̀Ёbʀ΁2_Catalan Constant (K)0123456H79;<= |Ёdʀ΁2_Acceleration due to gravity (g)0123456H79;<= Ёfʀ΁2_Coulomb Constant (Cc)01[2\345679;<= Ѐ  ʀ΁2 (01234567+,9;<= 1Ёkiʀ΁2j_Universal Constants0AB,6il>u9{:;<=>?moqsuw0123456H7B9;<=+GЁnʀ΁ke_Impedance of Vacuum (Z0/Zzero)0123456H7K9;<=+PЁpʀ΁kfo+Permittivity of Free Space (0/epsilonzero)0123456H7T9;<=+ Ёrʀ΁ko&Permeability of Free Space (0/muzero)0123456H7\9;<=+Ёtʀ΁k_Gravitational Constant (G)0123456H7d9;<=+Ёvʀ΁k_Planck Constant (h)0123456H7l9;<=+PЁxʀ΁k_Speed of Light (c) (01234567tu9;<= zЁ|zʀ΁2{_Electromagnetic Constants0ABuz}>u{~0123456H79;<=tЁʀ΁|oBohr Magneton (B/muB)0123456H79;<=tЁʀ΁|oNuclear Magneton (N/muN)0123456H79;<=tЁʀ΁|_Conductance Quantum (G0)0123456H79;<=tЁʀ΁|_Elementary Charge (ec)0123456H79;<=tЁʀ΁|_Josephson Constant (Kj)0123456H79;<=tЁʀ΁|_Von Klitzing Constant (Rk)0123456H79;<=tǀЁʀ΁|oMagnetic Flux Quantum (0) (01234567 9;<= рЁ+ʀ΁2_Atomic and Nuclear Constants>uՀ{    Ɂ.*0123456H79;<= Ёʀ΁+-oAlpha Particle Mass (M/Malpha)0123456H79;<= Ёʀ΁+/_Deuteron Mass (Md)0123456H79;<= Ёʀ΁+0_Electron Mass (Me)0123456H79;<= Ёʀ΁+1_Electron Radius (re)0123456H7 9;<= Ёʀ΁+2_Electron Volt (eV)0123456H79;<= Ёʀ΁+3_Fermi Coupling Constant (Gf)0123456H79;<= "Ёʀ΁+5_Hartree Energy (Eh)0123456H7&9;<= +Ёʀ΁+6_Helion Mass (Mh)0123456H7/9;<= 4Ёʀ΁+7oMuon Mass (M/Mmu)0123456H789;<= =Ёʀ΁+8_Neutron Mass (Mn)0123456H7A9;<= FЁʀ΁+:oRydberg Constant (R"/Rinf) (01234567  9;<= PЁʀ΁2_Physio-Chemical Constants>uT{UVXYZ[\]^_0123456H7b9;<= gЁʀ΁_Atomic Mass Constant (u)0123456H7k9;<= pЁʀ΁_Avogadro's Constant (Na/NA)0123456H7t9;<= yЁʀ΁_Faraday Constant (F)0123456H7}9;<= Ёʀ΁_First Radiation Constant (c1)0123456H79;<= Ёʀ΁_Loschmidt Constant (n0/nzero)0123456H79;<= Ёʀ΁_Molar Gas Constant (R)0123456H79;<= Ёʀ΁_"Molar Volume of Ideal Gas (Vm/NAk)0123456H79;<= Ёʀ΁_Second Radiation Constant (c2)0123456H79;<= Ёʀ΁o#Stefan-Boltzmann Constant (/sigma)0123456H79;<= Ёʀ΁_"Wien Displacement Law Constant (b)01[2\345679;<= Ѐ  ʀ΁20123456H79;<= Ёʀ΁2_A Random Value (random)0123456H79;<= ݀Ё€ʀ΁2_A Random Integer (irandom) (012345679;<= ۀЁĀʀ΁VWindow`a܀ >u{ȁˁ΁012345679;<=ЁɁʀʀ΁XMinimizeQm012345679;<=Ё́̀ʀ΁\Close WindowQw01[2\345679;<=Ѐ  ʀ΁012345679;<=ЁЀʀ΁_Bring All to Front^_NSWindowsMenu (01234567 9;<= ЁՁӀʀ΁THelp0ABց`a >u{01234567!9";<= Ёفڀʀ΁ZWcalc HelpQ?[_NSMainMenu !#l !1#ހh|~jlH% 67p%P3߁ _{{0, 58}, {46, 30}}()*+,-.H/024@7189CP2န6@Tcaps !  !  ! L!XŀcXenterKey !  !).8Lf!hŁꀖhjklmnop+r+ktu<<v+^NSParentWindow_NSMaxContentSize]NSContentSize_NSTrailingOffset_NSLeadingOffset_NSMinContentSizeZNSDelegateY{135, 74}Y{106, 50}\{10000, 400}78|}};XNSDrawerZbaseDrawer !1.B !`LLaŀo9d !,.; !#h|~jl% p%3 _{{103, 58}, {30, 30}}()*+,-./024789:2QdL!Ł"^rememberErrors ȁ_performMiniaturize: !U. !T. !#h|~jl% p%3 _{{211, 87}, {30, 30}}()*+,-./024789:2Qu !8.M ! aLN!oŀ !h|~j^lH xX 3    h|ij^lnp _{{15, 221}, {99, 18}}()*+,-.H/0X3X2 1[Use Radians !#h|~jl%   p%3 _{{124, 87}, {30, 30}}()*+,-./024789:2Qr &h|~jl   / "3 "_{{368, -1}, {71, 28}}()*+,-./0k( 2`a ZclearVars: }< H } 8r\newVariable: !(.6 !#OL aŀG4d !-.= !#S !  !6.J !; oLd!fŁ%)h|~jlH jkx>#3&' #_{{15, 177}, {183, 18}}()*+,-.H/0Xt3d>2(1%_Limit History Length\limitHistory !|#+h|~jl% p%3,- _{{269, 87}, {30, 30}}()*+,-./024 7|89:2倔+L Ł/8hUVXYZ[\jk^al`bdjklppY0R@ 21 04#@1h|uijvwlxz|~C//Z{138, 184}h|j+p3_{{141, 0}, {16, 17}}>u{5 6#@`7#@ /Ӏ3!1/VtoList !V L!ҀŁ;?h|~jlp#<= #_{{259, 178}, {22, 14}}/  -!X>;TTo: _limitHistoryLenTagL NŁA_affectInspectorMenu !   5󀙁ǁDWopenIt: ؁FYshowHelp: !#_ !.1 !  ! #Kh|~jl% p%3LM _{{190, 58}, {30, 30}}()*+,-./0247 89:2KL !aŁSOdh|~jlH &'x݁#3PQ #_{{15, 221}, {183, 18}}()*+,-.H/0X03!݀2R1O_Update History Displayh|56789:j;lH<=>c@ABXC E3HxXcKLM[NSProtoCellYNSNumRows^NSSelectedCell[NSCellClass_NSCellBackgroundColorZNSCellSizeYNSNumCols_NSIntercellSpacing]NSMatrixFlagsWNSCellsMfTdVXc1a MbD(U_{{17, 221}, {219, 38}}>uQ{CSTUV[]_()*+,-.W0YXZY\3 2ZXZW1SWDecimalbY]NSRadioButton`a )*+,-.H/02XZj3 8k2X\1SUOctal()*+,-.H/0YXZYs3 X2ZXZ^1S[Hexadecimal)*+,-.H/02XZ{3 82X`1SVBinaryY{107, 18}V{4, 2})*+,-./02Z382Xe1URadio78;XNSMatrix !< q !ih|~jlHt xt؀3jk _{{15, 223}, {132, 18}}()*+,-.H/0X32l1i_Simple Calculator !#o }:EoWcopyMe: !#qh|~jl% p%3rs _{{161, 58}, {30, 30}}()*+,-./024789:2tqQg ! L!ЀŁwZuseRadiansL I Ł>uـ{ z0123456H7p9;<= EЁʀ΁LŁ|hjkJlp+_NSTextContainerYNSTVFlags\NSSharedData} ~}h|uijvwlxz|~XNSCursor3C675|3|Z{196, 115}kYNSTCFlagsZNSTextView_NSLayoutManager|#@h   p +_NSTextContainers]NSTextStorageYNSLMFlagsfp+`a 78  p;_NSMutableAttributedString>u{78;78!;#$%&'()*+.+0WNSFlags_NSDefaultParagraphStyle_NSInsertionColor_NSSelectedAttributes_NSMarkedAttributes_NSLinkAttributes ` (>e364578<_selectedTextBackgroundColorB _selectedTextColor(>eGK5IJLMN[NSUnderlineQkSUNSRGBF0 0 1UVWX>YNSHotSpot\NSCursorTypeW{8, -8}78[;]+_ZNSTabStops78abb;_NSParagraphStyle78dee;_NSTextViewSharedData\{198, 1e+07}78hi;VNSText\errorMessage !P.  N tYtoggleIt:L!zŁ_affectKeyboardMenuL!wŀ !#h|~jl% p%3 _{{174, 116}, {30, 30}}()*+,-./024i789:2< ![  !.) !_Q !ˁ\closeWindow: !#h|~jl% p%3 _{{74, 58}, {30, 30}}()*+,-./024789:2k ! ĀWsaveAs:Ly!ʀŀ+Vkeypad πρ_arrangeInFront:L ՀŁ&hUVWXYZ[\jk^_l`abdj|lppYs  h|uijvwlxz|~ӁCVUZ{438, 283}hjklpӁh|uijvwlxz|~ځC\[Y{438, 17}h|jlh|ijlx   ׁ"YM]T"W>u{ Á#@h@ Tname9ӀŁĀTName%K0.33333299',!@!1345 ȁ>#@m#@B` '9ӀŁ@'C!WtheListL }ՀŁ. !#BL N Ł5}L !YŁXbaseMenuL!^aŁOсdh|~jlH cdx|#3ҁ #_{{15, 243}, {215, 18}}()*+,-.H/0Xm3^|2Ԁ1_Allow DuplicatesLAfuŀ\parentWindowLaŀWwd !N. L M9Ł  !#ۀh|~jl% p%3܁ _{{66, 87}, {30, 30}}()*+,-./024789:2̀L!Ł߀CDEFGHIJKLMN +P..X x_{{100, 424}, {358, 306}}`ab >u{  (h|ijlx + +MOA A AA>uĀ{h|uijvwlxz|~́C耼>uӀ{́hUVXYZ[\jk^al`bdjklppYÀ  h|j+p_{{139, 0}, {16, 17}}>u{  Ӏ3!1耲_{{1, 1}, {138, 184}}h|jl F Ip KGF#?N _{{139, 1}, {15, 184}}h|jl F I kp K ÁGF_{{-100, -100}, {138, 15}}_{{20, 60}, {155, 186}}h|ijlx + +M00>u{0>u!{/h|jl F I'p KGFh|jl F I.kp K ÁGF_{{183, 60}, {155, 186}}_{{1, 1}, {358, 306}}Z{358, 129}_conversionWindow !8h|~j^lH=>xہ    _{{237, 147}, {96, 22}}D38JqA!1@ Laŀ_Od !U# h|~jl% Z[p%3  _{{95, 87}, {30, 30}}()*+,-./024 7U89:23 Li!kŁCDEFGHIJKLMN%PoprtuX{vw|~}_{{932, 584}, {436, 146}}`ab >u}{4|U"  1 I \ 4 +  $'*-158;K>AEHށǀKNRVqӁY]`cfiloہruxh|~jl% p%3 _{{356, 87}, {30, 30}}()*+,-./024789:2Q]h|~jl% p%3 _{{205, 29}, {30, 30}}()*+,-./024789:2Qnh|~jl% p%3 _{{292, 29}, {30, 30}}()*+,-./024789:2bh|~jl% p%3 _{{116, 116}, {30, 30}}()*+,-./024}789:2zh|~jlH% p%G3!" _{{377, 116}, {59, 30}}()*+,-.H/024789:G2# Vdeleteh|~jl%  p%3%& _{{232, 116}, {30, 30}}()*+,-./024k789:2v$h|~jl% p%3() _{{261, 116}, {30, 30}}()*+,-./024789:2N'h|~jl% ()p%3+, _{{176, 29}, {30, 30}}()*+,-./024 789:2*h|~jl% 89p%3./ _{{277, 58}, {30, 30}}()*+,-./024B789:20-Qlh|~jl% IJp%323 _{{364, 58}, {72, 30}}()*+,-./024S789:241Vreturnh|~jl% Z[p%367 _{{319, 116}, {30, 30}}()*+,-./024V789:285h|~jl% jkp%39: _{{306, 58}, {30, 30}}()*+,-./024 T789:2̀8h|~jl% z{p%3<= _{{29, 116}, {30, 30}}()*+,-./024789:2^;h|~jl% p%3?@ _{{118, 29}, {30, 30}}()*+,-./024q789:2>h|~jl% p%3BC _{{132, 58}, {30, 30}}()*+,-./024789:2DAQfh|~jl% p%3FG _{{58, 116}, {30, 30}}()*+,-./0244789:20Eh|~jl% p%3IJ _{{87, 116}, {30, 30}}()*+,-./024789:2VHh|~jl% p%3LM _{{348, 116}, {30, 30}}()*+,-./024#789:2fKh|~jl% p%3OP _{{182, 87}, {30, 30}}()*+,-./024789:2QNQyh|~jl% p%3ST _{{219, 58}, {30, 30}}()*+,-./024789:2URQjh|~jl% p%3WX _{{147, 29}, {30, 30}}()*+,-./024z789:2Vh|~jl%  p%3Z[ _{{335, 58}, {30, 30}}()*+,-./024789:2\YQ'h|~jl% p%3^_ _{{145, 116}, {30, 30}}()*+,-./024789:2Z]h|~jl% ./p%3ab _{{263, 29}, {30, 30}}()*+,-./024#789:2`h|~jl% >?p%3de _{{290, 116}, {30, 30}}()*+,-./024789:2Rch|~jl% NOp%3gh _{{89, 29}, {30, 30}}()*+,-./024h789:2fh|~jl% ^_p%3jk _{{203, 116}, {30, 30}}()*+,-./024Y789:2rih|~jl% nop%3mn _{{60, 29}, {30, 30}}()*+,-./024K789:2lh|~jlH% ~p% 뀐3pq _{{0, 29}, {61, 30}}()*+,-.H/024 789 2oh|~jl% p%3st _{{153, 87}, {30, 30}}()*+,-./024789:2rh|~jl% p%3vw _{{234, 29}, {30, 30}}()*+,-./024789:2ʀuh|~jl% p%3yz _{{248, 58}, {30, 30}}()*+,-./024789:2xZ{436, 146}Xkeyboard[theKeyboard !  !\ L aŀ4=d !<.T ! 7րʁZshowPrefs: !#= DUcopy: !怙1Sgo:Laŀsod !#8LM IՀŀ ! Հ !#f !h|~jlHt   xt g؀3 _{{15, 183}, {181, 18}}()*+,-.H/0X3 g21_C-style Mod (%) Operator !^р !d%L }%Ł.ZdataSource !./ !# !#r ! ] ! ?_showBaseDrawer: !_  !# !Nh|~jlHtSTxt؀ _{{17, 138}, {126, 22}}H3NJ!1 Lb!dŁh|56789:j;lH<=>f@hiXj l3opXfstufX1 Dhijk2+yz{~_{{18, 18}, {98, 38}}>u{j()*+,-.W0XZ3b2X1SDec`a ()*+,-.H/02XZ3b8k2X1SOct()*+,-.H/0XZ3bX2X1SHex()*+,-.H/02XZ3b82X1SBinX{47, 18})*+,-./02Z382Xe1]outputFormat2L %Ł/ !#c !Z  !#K !W. ! ~ !#V !  !.# IM䀙\rowSelected:L eŀ !#> !#u !O.  !ɀh|~j^lHx ʁ   _{{237, 173}, {96, 22}}D3J!1  !? w !#$L aŀS-d !.-LaŀcGd !#sLxwaŀ#d ! L!<ŁoYshiftKey1Lwaŀhd !3.F !Kـh|~jlHt PQxt ؀3ځ _{{15, 243}, {121, 18}}()*+,-.H/0XZ3K 2܀1_Precision Guard !aހh|~j^lH fgx߁ 3߁   _{{15, 201}, {320, 18}}(m)*+,-.H/0pqt3a]NSNormalImage21_-Use different input number format from output2GHI{̀ˁ !#l !hUsave:LaŀKsd  =؁_unhideAllApplications:LK!Łـ^precisionGuardLN!ŁXbitsPref !  !#x !^  !h|~jlHc xcYM3 M_{{17, 177}, {149, 18}}()*+,-.H/0X3Y21_Print Whole Integers !]  !b !#EL!րŁh|~jlHcxcM M_{{21, 28}, {126, 22}}H3J!1 ZsliderPref }=쀙J_clearVariables: !5.H !2.D !9.OLw Iŀ_expressionField !#KL ! Ł h|~j^lH xk 3   _{{15, 243}, {179, 18}}()*+,-.H0X3 k$2 1_Flag Undefined Variables^pickyVariables $%& h|~jl  )* "3 "_{{181, -1}, {71, 28}}()*+,-./0k2P$ 2I `a WdelVar: =XnewType: !   <Hց_hideOtherApplications: !#  ! LwAXŀ_initialFirstResponderL_!^ŁQ_roundingIndication ! cL aŀ-[d !Q.L^!sŁр!_historyDuplicates !#HLaŀ=Bd ! ?ہ%Uquit: !#`L  Ł5(}23)\WcalcServiceL Aŀ !#cLMOŀ(LNŁ.L`!ŁL/]printPrefixesLaŀhld A2Uredo: !!OL !Ł퀖5^saveAsMenuItem !#* !#; ! #L !ՀŁS:\outputFormat !p׀L!!ŁO=]updateHistoryL!Ł/?YconvertTo !#wL %Ł !#h !  !.' !U  !> u !#R !I[toggleSize: !.! IzoL IM%Ł !L, .ŁO&cCDEFGHIJKLMN P23 567XY89"_bQPa`R_{{60, 137}, {440, 332}}`a^ `ab >uA{ $! >uH{ ݁WY>uP{Ӂ_{{1, 17}, {438, 283}}h|jl F IW KZGXF#?_{{-30, 17}, {15, 265}}h|jl F I`k KcGZF#?_{{1, -30}, {463, 15}}>ug{ځ_{{1, 0}, {438, 17}}_{{0, 31}, {440, 301}}_{{1, 9}, {440, 332}}YpreloadedYtheWindow !  !#5 ! S !#ALa!Łހi_alternateInputPrefL8!Łk_altInputThouSep } 쀙nL ŁnXfromList !;.RL!Łiq_simpleCalculatorL !Łs_printDelimiters ! L!Ł򀖁vYprintIntsL!ŁxXcModPref !>.W !: m !.% !#- !xӀ#~]setPrecision: !#YL !ހŁ[convertType ! 䀙Uopen: !#L!wŀ^mainController !# !X  !n !V. CTcut:L!Łɀ^altInputDecSep ! #- !w怙 I 4 N !Y  ! _ !.+ !S. ! L,!<ŁO^persVarsWindow !#' !#] !#iLO!QŁCDEFGHIJKLMNSPUVWYZX{[\ӁցՁԁ_{{44, 427}, {374, 304}}[Preferences`ab hijk^lndpeg с >uj{h V|ij^l  pS op3rSwxx1  ́>u{{ >u{ a8ށɁh|~j^lx    _{{109, 177}, {123, 14}} @!XB_Decimal Separator:h|~j^lx    _{{109, 151}, {123, 14}} !X_Grouping Separator:_{{10, 33}, {370, 262}}_{{-8, -10}, {390, 308}}>u{w  t Z^؁X>u{KpNفi߁ׁh|~jltxt؀ _{{14, 163}, {129, 14}}/ !X@_Internal Precision Bits:WGeneral  4 Z0#XW>u{^!dЁсO"%n;  c ZMXVItem 2>u{ `_   SLQÁՁh|~jlcxcM M_{{18, 53}, {185, 14}}/ !X€_Maximum Slider Precision:h|~jlcxcMā M_{{18, 95}, {129, 14}}/  -!XƀÀ_Rounding Indication:h|~jlc !xcMȁ M_{{16, 137}, {129, 14}}/ ( -!Xʀǀ_Engineering Notation:WDisplay  0 4Z΁ XVItem 3UInputZ{374, 304}[wcalc_prefs\thePrefPanelL!>ŀ_ZdecimalKey };8F !..?LaŀlcdL!SŁ耖[convertFrom ! e !#NLŁ.( !M. m&YshowList:Laŀ9Wd !#oL!}ŀ߀]livePrecisionL %Ł&Lw!ŀ_ExpressionFieldLaŀOKd ! L1!Łހ[capsLockKeyL }Ł.L !Ł]sliderStepper != sLffŁ>u{bY{134, 74}`a [contentViewL ŁCDFGHIJKLMN P UXŁ _{{288, 212}, {480, 297}}^About Wcalc...`ab >ù{ Ё h|~j^l p  ZNSEditable[NSDragTypes   >?߀_Apple PDF pasteboard type_Apple PNG pasteboard type_1NeXT Encapsulated PostScript v1.2 pasteboard type_NSFilenamesPboardType_NeXT TIFF v4.0 pasteboard type_Apple PICT pasteboard type_{{17, 195}, {94, 89}}WNSStyleWNSAlignWNSScaleZNSAnimates  2GHÌˁ 78~;[NSImageCell78 ;[NSImageViewh|~j^l   p   _{{116, 20}, {347, 257}}/ 3 -!X1 oWcalc started as a project written for my C++ class at Ohio University, way back on January 14th, 2000. I made it to be a "natural language" calculator - in that it would take any valid mathematical expression, or at least, that was the idea (it had some minor problems). Today, it has gone a bit beyond. I reworked it (version 0.2) in November 2001 to use lex and yacc powerful string parsing tools. Then, I got OS X, and thought "why not?" Believe me, Cocoa is every bit as wonderful as they say. More recently, I incorporated MPFR to allow me to do excessively large computations, which has been a real adventure. In any case, enjoy! I hope you find it useful.h|~j^l    p     >?  !_{{17, 86}, {94, 89}} ( 2GHI -̀ˁXNewWcalcZ{480, 297}XaboutBoxLA! mŀ !.L = ?Ł!BCDFGHIJKLMNP C D U F GXk H I?# "A@$_{{375, 153}, {333, 223}}VError!`ab >u P{ Q R S&*03h|~jl Y [ \p ( )' >? a_{{17, 148}, {75, 58}} h|~jl o q rp , -+ >? w_{{14, 148}, {78, 61}}  .2GHI ̀ˁ/TWredh|~jl p12 _{{97, 185}, {219, 21}}/ D3 S -!X#10h|ijlx   p ;M=49}}>u { }9;>u {|_{{1, 1}, {196, 115}}UVW 8W{1, -1}h|jl  I p K ZNSCurValue33G:F3_{{197, 1}, {15, 115}}h|jl F I kp K 33G<F3#?B`_{{-100, -100}, {87, 18}}_{{100, 60}, {213, 117}}_{{1, 9}, {333, 223}}[errorDialog !  !.3 K XNSMarkerVNSFileHفGF_NSToolTipHelpKey_RAttempt to detect inaccuracies near zero due to the internal binary representation78 ڢ ;_NSIBHelpConnector  ՁHiJF_/Remove most advanced features of the calculator N ՁHLF_!% S >  ,>V; 5zQ + i9   "!S %N!V 6 &[^1w  1  #  !M  4W$  < A= 87N !0 Q- xU 42= ]  ^ =+  e ! 9_   ()  D  : }G " p:O38%C OP< "' Y }U ?\_ t Ib*, XVTaOySC\  = ;:jA^M. > ex]U U    : ;      f <t Rc  I+d` 8Z(=p 7N| @? %<SwB > -  f $T5y KE  %6 &0GnځxgÁ;ȁcoǀ3(Ol2Hz%󀖁Ձ#ifbɁՁҁсB\ĺ)nށ`'8ȁ"/=OVo  KST_qsV́Lu9$߁A]&ǁҁND1J4 ˁK!WǁkځɁ΁āhǁ8;1*:5]ہyE~i+)RcrswmF/MV!  q3i5.a[_؁ہ-ӀcQ<؁eǁ#O߁ހ q=([>8 B؁FQ ˁ!Bh?&uр#5_. _ՁRO*K>Siށ5ց|*M΁ρWr:%Lہh6NV|]ׁʁ +;- wYU"H[+W1o=5Y ]H+AفE-'ÁJ234>"y% %c %  + % &O>y $ b%  Oc %i  &  %t =%% %  ,%y%yy %> % c%  + %y%t t%> > M eyw + yy    b + c%t c%% " % cc }% t% # %%t %yy%>+   >>+tt  +  !   %yc  %ft% St>>A%>y   % %%b  +y>%y+ 9O%   %Mt% y%%y %c%yt c b _%c   %% t>%%%y+%  O %   O% t% %%  +#2M)2k2 Ȁ߀)+ہY+Mހ+ҁ#)W|!i]+O+#+ȁ"M)+2nkW")+؀)|ȁ+)ȁ>)2B+́) 2+++hہ iāM)#؁+M5+/MM[ 2B|2|À]i++ȁk))+)S"Ȁȁk؀؁)52<SՁ+M:2|؀Ȁȁ .)>Ȁ++U.B)+Ȁ+)k΀ W2+|i+i)++M+]|++M "yQ)#MՁ 2))32؁)ȁ+k<#BS )2) ]S) ۀ؀+䀐))>$6 S >  ,>V; 5zQ + i9  ! "S N%!V 6 &[^1w  1  #  !M  4W$  < A=7 8N !0 Q- xU 42= ]  ^ =+  e ! 9_   ()  D  : }G " pO:38% C OP< "' Y }U ?\_ t Ib*, XVTaOySC\  = ;:jA M.^> ex]U U    : ;      f <t Rc  I+d8` Z(=p 7|N @? %<SwB > -  f $T5y KE  %6 &0GnځxgÁ;cȁoǀ(3Ol2Hz%Ձfi#bɁՁҁсB\ĺ)nށ`'8ȁ"/=OVo  KST_qsVĹu9$߁A]&ǁҁNDJ14 ˁK!WǁkځɁ΁āh8;ǁ1*:5]ہyE~i+)RcrswmF/MV! 3 qi5.a[_؁ہ-ӀcQ<؁ǁe#O߁ހ q=([>8 B؁FQ ˀh&B!?uр#5_. _ՁRO*KS>iށ5ց|*M΁ρWr:%LہN6hV|]ׁʁ+ ;- wYUH"[+W1o=5Y ]H+AفE-'ÁJ>%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%D%%%%%%R%%%%%%%%%%%%%%%%%%%&&&&&&&&&& & & & & &&&&&&&&&&&&&&&&&&& &!&"&#&$&%&&.&(&)&*&+&,&-&.&/&0&1&2&3&4&5&6&7&8&9&:&;&<"&>&?&@&A&B D&D&E&F&G&H&I&J&K&L&M &O&P&Q&R&S&T&U&V&W&X&Y&Z&[&\&]&^&_&`&a&b&c&d&e&f&g&h&i&j&k&l&m&n&o &q&r&s&t&u&v&w&x&y&z&{&|&}&~&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&'' N''''''' ' ' ' ' ''''''''''''''''''' '!'"'$'%'&'''(')'* ','-'.'/'0'1'2'3'4'5'6'7'8'9':';'<'='>'?'@'A'B'Cfghijklmnopqrstuvwxyz{|)}~ÁāŁƁǁȁɁʁˁ́́΁ρЁсҁӁԁՁցׁ؁فځہ܁݁ށ߁#      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdef'ghijklmnopqrstuvwxyz{|}~ÁāŁƁǁȁɁʁˁ́́΁ρЁсҁӁԁՁցׁ؁فځہ_Static Text (Error!)_Bevel Button (+)\Text Field-3_Push Button (Oops.)[Separator-7_Square Button (k)\Separator-12_Square Button (p)_Menu Item (Show Inspector)_"Static Text (Rounding Indication:)_Menu (OtherViews)_"Menu Item (Gamma Function (Gamma))_Square Button (d)_+Menu Item (Acceleration due to gravity (g))_Menu (Trigonometric)^Image View (w)_'Menu Item (Avogadro's Constant (Na/NA))o7Menu Item (Permittivity of Free Space (0/epsilonzero))\Separator-13\File's Owner_Menu Item (About Wcalc)ZText Field_Menu (Hyperbolic Functions)_Menu Item (Secant (sec))_@Menu Item (Inverse Hyperbolic Cosecant (acsch/areacsch/csch^-1))^Content View-4_Menu Item (Cube Root (cbrt))_Bevel Button (=)_Menu Item (Always)^Menu (Symbols)_Menu Item (Electron Volt (eV))_Menu Item (Area)_Button Cell (Hex)_Square Button (3)_Menu Item (Copy)_Menu Item (View)^Content View-3_$Menu Item (Hyperbolic Secant (sech))_Popup Button (Automatic)_Square Button (x)[Menu (File)^Content View-1_'Menu Item (Hyperbolic Cotangent (coth))o&Menu Item (Rydberg Constant (R"/Rinf))[Application[Separator-8[Menu (Help)_Menu Item (Help)_"Menu Item (Molar Gas Constant (R))_Check Box (Allow Duplicates)_#Menu Item (Nearest Integer (round))_Menu Item (Simple)_Square Button (z)^Content View-2_Selected Tab View Item (Input)o%Menu Item (Nuclear Magneton (N/muN))_Menu Item (Save As...)_Menu Item (Inverse Hyperbolic Secant (asech/areasech/sech^-1))_Table Column (history)_Menu Item (Clear)-2oBevel Button (")_Menu Item (Clear Menu)_Popup Button (Length)_'Menu Item (Logarithm [base 2] (logtwo))_!Static Text (Grouping Separator:)_&Menu Item (A Random Integer (irandom))_Menu Item (Deuteron Mass (Md))_Bevel Button (9)_Bevel Button (5)_Table Column (value)_Menu (Universal Constants)^Table Column-1_Menu Item (Automatic)\Text Field-1_Menu (Open Recent)_Menu Item (Angle)_Menu Item (Services)_.Menu Item (Wien Displacement Law Constant (b))_Menu Item (Wcalc)_$Menu Item (Hyperbolic Cosine (cosh))_Button Cell (Bin)_Push Button (Convert!)_Menu Item (Save)\Menu (Wcalc)_Square Button (4)_%Menu Item (Logarithm [base 10] (log))_Static Text (To: )_#Static Text (Engineering Notation:)_&Static Text (Internal Precision Bits:)o-Menu Item (Fine-Structure Constant (/alpha))_ Check Box (Print Whole Integers)_Square Button (return)_Square Button (b)^Content View-7[Menu (View)_Menu Item (Helion Mass (Mh))_Square Button (6)\Table Column_"Menu Item (Boltzmann Constant (k))_Menu Item (Copy)-2VView-4\Text Field-4WStepper_$Check Box (Flag Undefined Variables)_"Menu Item (Hyperbolic Sine (sinh))_Square Button (w)_%Menu Item (Electromagnetic Constants)_Menu Item (Copy)-1o"Menu Item (Bohr Magneton (B/muB))_Square Button (7)_>Menu Item (Inverse Hyperbolic Cosine (acosh/areacosh/cosh^-1))_Menu (Functions)_(Menu Item (Atomic and Nuclear Constants)_Square Button (j)_Square Button (0)_&Menu Item (Von Klitzing Constant (Rk))]Menu (Window)_Menu Item (Select All)_Push Button (New)-1_Menu Item (Open Recent)_Bevel Button (8)_Bevel Button (4)_Square Button (i)_1Menu Item (Inverse Cosecant (acsc/arccsc/csc^-1))YPrefPanel_*Menu Item (Impedance of Vacuum (Z0/Zzero))_#Menu Item (One's Complement (comp))_AMenu Item (Inverse Hyperbolic Cotangent (acoth/areacoth/coth^-1))o Menu Item (Square Root (sqrt/"))oMenu Item (Muon Mass (M/Mmu))_Menu Item (Trigonometric)_Menu Item (Length)_Button Cell (Decimal)_Push Button (New)_Menu Item (Tangent (tan))_ Bordered Scroll View (Text View)_Menu Item (Cotangent (cot))o2Menu Item (Permeability of Free Space (0/muzero))_$Check Box (C-style Mod (%) Operator)_Check Box (Simple Calculator)_Menu Item (Pressure)_!Bordered Scroll View (Table View)[Separator-2_Menu Item (Clear)_Table View (Variable, Value)_)Menu Item (First Radiation Constant (c1))_ Menu Item (Catalan Constant (K))[Menu (Edit)_Tab View Item (Variables)_Menu Item (Hide Keypad)_Button Cell (Binary)_Menu Item (Wcalc Help)_Menu Item (Quit Wcalc)_?Menu Item (Inverse Hyperbolic Tangent (atanh/areatanh/tanh^-1))_Square Button (/)_Bevel Button (=)-1_Popup Button (None)_!Top Tab View (History, Variables)VView-3_Square Button (a)_!Menu Item (Coulomb Constant (Cc))VView-1VMatrix_"Menu Item (Elementary Charge (ec))_Tab View Item (History)_Menu Item (Conversions)_Persistent Vars Window_Square Button (`)_/Top Tab View (General, History, Display, Input)_ Menu Item (Faraday Constant (F))_Check Box (Live Precision)_2Menu Item (Inverse Cotangent (acot/arccot/cot^-1))_/Menu Item (Inverse Cosine (acos/arccos/cos^-1))_9Check Box (Use different input number format from output)^Content View-5_Square Button (g)_Table Column (value)-1_$Menu Item (Sampling Function (sinc))_#Bordered Scroll View (Table View)-4_-Menu Item (Inverse Sine (asin/arcsin/sin^-1))_Bevel Button (1)_Menu Item (Cut)_Menu Item (Neutron Mass (Mn))_.Menu Item (Molar Volume of Ideal Gas (Vm/NAk))_Image View (NewWcalc)VView-5_Table Column (variable)_Menu Item (Force)]Menu (Menu)-1_Menu Item (Show All)_Menu Item (Show Base Drawer)_Menu Item (New)[Separator-3_Square Button (delete)_Square Button ( )_Button Cell (Dec)_#Bordered Scroll View (Table View)-1_Menu Item (Redo)_Menu Item (Close Window)_Bevel Button (C)oBevel Button ()_Square Button (u)_Menu Item (Sine (sin))_%Menu Item (Hyperbolic Tangent (tanh))_ Menu Item (Zeta Function (zeta))o/Menu Item (Stefan-Boltzmann Constant (/sigma))_Menu Item (Planck Constant (h))_Menu (Services)_Horizontal Slider_Square Button (-)_Menu Item (Significant Figures)_*Menu Item (Second Radiation Constant (c2))_#Menu Item (A Random Value (random))_$Menu Item (Atomic Mass Constant (u))_Menu Item (Bohr Radius (ao))_Square Button (e)_Table Column (result)o&Menu Item (Magnetic Flux Quantum (0))_Square Button (s)\Separator-11_ Menu (Physio-Chemical Constants)_Menu Item (Mass)_Bevel Button (.)\Content View\Separator-10_Square Button (n)_Menu Item (Open...)_'Menu Item (Next-lowest Integer (floor))_Square Button (shift)_Tab View Item (Display)_Bevel Button (0)oMenu Item (Tau Mass (M/Mtau))_Square Button (h)_Bevel Button (3)_Square Button (c)_'Static Text (Maximum Slider Precision:)_Push Button (Delete)-1_$Menu Item (Conductance Quantum (G0))_Menu Item (File)o+Menu Item (Alpha Particle Mass (M/Malpha))_Menu Item (Electron Mass (Me))_ Static Text (Decimal Separator:)_#Bordered Scroll View (Table View)-2_Check Box (Print Delimiters)_Inspector PanelXBaseView_Button Cell (Oct)_Menu Item (Hide Others)_ Menu (Electromagnetic Constants)_Image View (Wred)VView-2_Menu Item (Speed)\Separator-14_Menu Item (Bring All to Front)_Menu (OtherViews)-2_Square Button (t)[Separator-4_ Check Box (Limit History Length)\Text Field-2_Check Box (Print Prefixes)_Table Column (name)_Menu (OtherViews)-1_)Menu Item (Loschmidt Constant (n0/nzero))_Square Button (])_Square Button (y)_"Menu Item (Natural Logarithm (ln))_Menu Item (Universal Constants)[Separator-5YText ViewoMenu Item (pi/)YStepper-1_"Menu Item (Random Integer (irand))_Menu Item (Preferences...)_Square Button (o)_Square Button (r)_Menu Item (Hide Wcalc)_Menu Item (Cosine (cos))_Square Button (1)_Bevel Button (2)_Menu Item (Undo)_Tab View Item (General)_Menu Item (Speed of Light (c))_Square Button (')_ Selected Tab View Item (History)_Menu Item (Delete)_$Check Box (Record Errors in History)_Button Cell (Octal)]My Text Field[Separator-6_#Menu (Atomic and Nuclear Constants)_Menu Item (Random Value (rand))]Menu Item (e)_Square Button (shift)-1_(Menu Item (Log Gamma Function (lnGamma))_Menu Item (Preloaded Variables)_Check Box (Use Radians)ZBaseDrawer_#Bordered Scroll View (Table View)-3_Menu Item (Symbols)oStatic Text (Wcalc started as a project written for my C++ class at Ohio University, way back on January 14th, 2000. I made it to be a "natural language" calculator - in that it would take any valid mathematical expression, or at least, that was the idea (it had some minor problems). Today, it has gone a bit beyond. I reworked it (version 0.2) in November 2001 to use lex and yacc powerful string parsing tools. Then, I got OS X, and thought "why not?" Believe me, Cocoa is every bit as wonderful as they say. More recently, I incorporated MPFR to allow me to do excessively large computations, which has been a real adventure. In any case, enjoy! I hope you find it useful.)_Button Cell (Hexadecimal)_#Menu Item (Exponential Power (exp))[Custom View_Square Button (f)_Menu Item (Never)_Check Box (Precision Guard)_Square Button (2)_Menu Item (Paste)_Menu Item (Proton Mass (Mp))[Menu (Menu)_Square Button (l)\Table View-1_Square Button (9)_Menu Item (Keyboard)_Menu Item (Window)_Menu Item (Factorial (fact))_Static Text (Version 1.1.1)_ Menu Item (Hyperbolic Functions)>(w>(>(ŁA V;j 5}QS{W i9 w!S N%%,  C &^w  K cM  4W$  +8  87- x 4#= ]   ^)O 9d_L )@  1D  :0 }G "= :38CP<y "['Y }Un\ IbM*9VT D =a;:jX xU U      <$ R  I?d8Z= 7@rRuB > -f:Q $xKE * %6 S& >; ,>zt +k   <'  "!!V 6[1 1 #F !N"< pA=.sN !]0 QhiU2^J =~+g  e !3   (G -ze H p(O%B  5O  ?2|_ tmlv, XYqaOfySEC>_\/I ` Z A^ PM.> e V]  & :;  b  fTtco \+` (p N| ?6 %U<S4w  T5y 7 ńgÁmoǀҁ(݁Ёԁ lO ܁̀z%Ձ#fIpC.ՁЁҁс+\}ĺn`>'8с= z 4Sn_V8́Lu9pǁҁNGJ4- lwˁhWցҁ΁ KB8;́1.**]ہyԁE0+{Rec9swgmF/MV 3q΁5.jat[_؁-@ӁF{eρdeǁG#  ߁N~3C+K؁>8Ձ!ghrBH؁́DFQ)!BƁ#_. OK>iށWցH*_ρQrˁ%؁V4ʁ&;- āǁu+KW19o=5Y ́fفEm ÁJG0ځx߀݁M;ȁcƁہ32N$HiCbɁB)"ށ]؁ȁ"/yOVoׁEKTSJqs!vŁ$߁A]&ED1LK!:AӁǁkځɁƁāhǁف܁:5u'Uρ~i*)rYځg݁΁! |imہсEcQ<؁#7ȁOހ q=0([ׁ'xށ ց 1 ˁh&ʁ?u$с5@_JՁR<BO;*S5|Mځ΁6-W:LہDhN6|I]ׁ +ށ-MwYU"H[,#o][H+"A -'>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++,,,,,,,,,, , , , , ,,,,,,,,,,,,,,,,,,, ,!,",#,$,%,&,',(,),*,+,,,-,.,/,0,1,2,3,4,5,6,7,8,9,:,;,<,=,>,?,@,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,[,\,],^,_,`,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,{,|,},~,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,---------- - - - - ------------------- -!-"-#-$-%-&-'-(-)-*-+-,---.-/-0-1-2-3-4-5-6-7-8-9-:-;-<-=->-?-@-A-B-C-D-E-F-G-H-I-J-K-L-M-N-O-P-Q-R-S-T-U-V-W-X-Y-Z-[-\-]-^-_-`-a-b-c-d-e-f-g-h-i-j-k-l-m-n-o-p-q-r-s-t-u-v-w-x-y-z-{-|-}-~---------------------------------------------------------------------------------------------------------------------------------.......... . . . . ................... .!.".#.$.%.&.'.(.).*.+.,.-.../.0.1.2.3.4.5.6.7.8.9.:.;.<.=.>.?.@.A.B.C.D.E.F.G.H.I.J.K.L.M.N.O.P.Q.R.S.T.U.V.W.X.Y.Z.[.\.].^._.`.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.{.|.}.~..........................................                           ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~   Á ā Ł Ɓ ǁ ȁ Ɂ ʁ ˁ ́ ́ ΁ ρ Ё с ҁ Ӂ ԁ Ձ ց ׁ ؁ ف ځ ہ ܁ ݁ ށ ߁                           ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~   Á ā Ł Ɓ ǁ ȁ Ɂ ʁ ˁ ́ ́ ΁ ρ Ё с ҁ Ӂ ԁ Ձ ց ׁ ؁ ف ځ ہ ܁ ݁ ށ ߁                           ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~   Á ā Ł Ɓ ǁ ȁ Ɂ ʁ ˁ ́ ́ ΁ ρ ;= N2F $M26mtF p#]fr}#gJ*k`2  ""` x] kL5=3N $b)\+D,0  CI#W <$5at11&LR_5 +(EX! oEdOG-BUKFL  QyRo;o "uA<6;={%3 F N SKr *zM-OG"aM\: K < I $ P:P S >!y'9tY'i sf"7bW|> j iI@ST9n #Te~4z(j j=H?m[>M;+BJ  ^B0sBh xJ84 9k%4/c 8|_ OQ8p >  !m\#d'!n A9(y:u8 Llq: P@l  ^ ~)e?UN&!h)HVe,J}IGRv  ,3hS [_ 6l13tx\zr'{^gAV v< DwC.P.O+G7oQ "`ci0w>u1{>1>178111;^NSIBObjectData"'1:?DRTfels&9Keo|~!*57:<q~ "$)+-/1357RXajtv{  $&(*,U]sz#1>R^gikmoqvwyz  ")?LTVX[di~!:s{         ' ) : < E G I S \ e r { !"!$!&!(!*!,!.!0!2!4!6!8!:!<!>!@!B!D!F!g!i!k!m!o!p!r!t!!!!!" ""1"?"D"F"H"J"L"N"P"R"T"W"\"e"g"x"z"""""""""""""""""""##P#R#T#V#X#Z#\#^#a#c##################$$$$$$$$$!$:$s$u$w$y${$}$$$$$$$$$$$$$$% % %%%%%%%%%?%A%C%E%G%H%J%L%d%%%%%%%%%%%%%%%%%%&$&&&(&*&,&.&0&2&4&U&W&Y&[&]&^&`&b&x&&&&&&&&&&&&&&&&&''7'9';'='?'A'C'E'G'h'j'l'n'p'q's'u''''''''''''''''''((K(M(O(Q(S(U(W(Y([(|(~(((((((((((((((() ) ) )))))))/)h)j)l)n)p)r)t)v)x)z)))))))))))***** * * **4*6*8*:*<*=*?*A*Y*****************++++!+#+%+'+)+++L+N+P+R+T+U+W+Y+q++++++++++++++++++,0,2,4,6,8,:,<,>,@,I,P,_,g,,,,,,,,,,,,,,- ------ -%-&-(-1-<-G-P-W-p-{-----------0000000000000000000000001111 1111111 1#1&1)1,1/1215181;1>1A1D1G1J1M1P1S1V1Y1\1_1b1e1h1k1n1q1t1w1z1}11111111111111111111111111111111111111111112222 2 2222222"2%2(2+2.2124272:2=2@2C2F2I2L2O2R2U2X2[2^2a2d2g2j2m2p2s2v2y2|22222222222222222222222222222222222222222223333 3 3333333!3$3'3*3-303336393<3?3B3E3H3K3N3Q3T3W3Z3]3`3c3f3i3l3o3r3u3x3{3~33333333333333333333333333333333333333333334444 4444444 4#4&4)4,4/4245484;4>4A4D4G4J4M4P4S4V4Y4\4_4b4e4h4k4n4q4t4w4z4}4444444444444444444444444444444444444444445 55#5+5-5/51535P5R5T5V5X5Y5[5p5r5t5w5z55555555555555666 6 6666,676@6G6_6n66666666677#7-7:7O7\7v77777788888!8#8%8&8(81838<8>8?8A8C8E8G8P8y88888888888888888888889 9"9%9(9+9-9/91939=9F9O9c9x9z9|9~99999999: :::::::!:4:7:::<:>:U:^:g:u:~:::::::::::;;;;;;;#;%;.;7;9;A;^;c;e;g;i;k;m;x;;;;;;;;;;;;<< <<<<<<<.<0<2<4<6>>(>*>,>.>0>U>]>q>|>>>>>>>>>>>>>>>>>>>>? ?????-?6?;?N?[?]?_?a?t?}????????????????@)@+@-@/@1@3@5@7@H@J@L@N@P@q@s@u@w@y@|@}@@@@@@@@@@@AA A AAAA A)A2A@AIATA^AjA{A}AAAAAAAAAAAABBBB B B BBBBBB)B2B>B@BBBKBTBYBoByBBBBBBBBBBBBBCC C C CCCCCC(C*C,C.C0CACCCECGCICnCpCrCtCvCxCzC|CCCCCCCCCCCCCCCCCCCDDDDD!D#D%D'DDDFDHDJDLDMDODgDDDDDDDDDDDDDDDDDDDDDDDEE#E%E(E+E-E/E2E?EBEEEHEQESEiEzE|E~EEEEEEEEEEEEEEEEEEEFFFFFFF F#F&F(F+FLFNFQFTFVFXFZF_FaFFFFFFFFFFFFFFFFFFFFG G GGGGGGGG?GAGDGGGIGKGMGRGTGuGwGzG}GGGGGGGGGGGGGGGGGGGGGGHHHHH H!H$H&H;H=H?HBHEH^HHHHHHHHHHHHHHIIIII I IIII!I$I'IBISIUIWIYI\IhIyI{I~IIIIIIIIIIIIIIIJ#J&J)J,J/J2J4J7J:JSJVJXJ[J^JaJJJJJJJJJJJJJJJJJJKKKK KKKKK.K7K9K>KAKDKqK~KKKKKKKKKKKKKKKKKKKKKKL&L'L)L,L/L8L;LDLELHLNLkLmLoLrLtLvL|LLLLLLLLLLLLLLLLLLLM M MMMMMMM<M>MAMCMEMGMJMNMoMqMtMvMxMzM}MMMMMMMMMMMMMMMMMMMMNNNNNN6NoNqNsNuNwNzN|NNNNNNNNNNNO(OEOWOiO~OOOOOOOOOOOOOOOOOOOOPP PPPPPP!P#P&P)P6P9P<P?PDPXPaPcPnPwPyPPPPPPPPPPPPPPPPPPQQQQQ Q Q)Q6QJQYQbQoQ}QQQQQQQQQQQQQQQQQQQRR RRRRR%R6R8R;R=R@RaRdRfRiRlRoRpRsRuRRRRRRRRRRRRRRSFSMSXS_SkSsSSSSSSSSSTTTT T"T%T'T*T-T0T3T5T6T9T;T>TATBTCTPTXT[TxT{T~TTTTTTTTTTTTTTTTTTTTTTTTTTTTUU*U1U>UFUUUdU|UUUUUVVV%V4V>VJVVVYVZVmVnVwV|VVVVVVVVVVVVVVWWWWWW#W(W1W2WOWRWSWfWgWjWkWxWWWWWWWWWWWWWWWWWWWWXXXXXXCXLXQXcXtXvXyX|XXXXXXXXXXXXXXYYYYY Y#Y%Y(Y-Y6Y<YMYOYQYZY\Y_YqY}YYYYYYYYYYYYYYYYYYYYZZ Z ZZZ!Z#Z&Z(Z+ZLZNZQZTZVZXZ[ZlZoZrZuZxZZZZZZZZZZZZZZZZZZZ[[[[[ ["[%[([5[8[;[>[W[e[v[x[z[}[[[[[[[[[[[\\\\\\\\-\/\1\4\7\T\W\Y\\\_\b\c\f\{\}\\\\\\\\\\\\\\\]]] ]] ]"]%]']D]F]H]K]N]O]Q]h]]]]]]]]]]]]]]]]]]]]]^^+^-^/^1^4^?^P^R^U^W^Z^l^}^^^^^^^^^^^^^^^^^^_____!_"_%_>_________________________` ` ````&`(`1`3`:`=`@`C`l`o`q`t`v`x`z`}``````````````````aaaaa!a"a$a;aparatavaxa{a}aaaaaaaaaaaaaaaaaaaaaabbbjbkbmbpbrbubwbzb}b~bbbbbbbbbbbbbbbbbbbbbccccc!c$c'c*c-c0c3c6c9cbcecgcjclcncpcscvc{cccccccccccccccccccdd*d-d/d2d4d6d8d;d>dDdmdpdrdudwdyd{d~ddddddddddddddddddeeeee=e@eBeEeGeIeKeNeQe]eeeeeeeeeeeeeeeeeeeeeefffff%f'f)f,f/f0f2fJfffffffffffffffffffffffffffg ggggg-gbgdgfghgkgngpgsgxgggggggggggggggggggghhh h h3hDhFhHhKhNhshuhxhzh|h~hhhhhhhhhhhhhhhhhhhhiiiiiiMiPiRiUiWiZi_ibieihikiniiiiiiiiiiiiiiiijjj8jPjSjVjYj\j^jajbjejfjijrjtjwjzjjjjjjjjjjjjjjjjjjjjjjjkk kkk>kHkJkLkOkRkUkWk`kykkkkkkkkkkkkkllll l l8lAlJlWltlwlyl|llllllllllllllmmm'm)m.m1m4mMmWmZm]m`mcmfmimrmtm|mmmmmmmmmmmmmmmmmmnnnnnn!n#n,n/n2n5n8nAnCnNnQnTnWnZn]nfnhnknnnnnnnnnnnnnnnnnnooo(o*o-o0oMoPoRoUoXo[o\o_owooooooooooooooppppp p ppDpFpHpKpNpPpRpUp^p`p}ppppppppppppppppppqqqq'q9qJqLqNqPqRqcqeqhqkqnqwqyq|qqqqqqqqqqqqqqqqr r+r-r0r3r5r8r=r?rMrUrfrhrjrmrorrrrrrrrrrrrrrrrrss s ssssss+s<s>s@sBsEsWshsjslsnsps}sssssssssssssssssttt t tt3t5t8t:t<t>t@tBtjt{t}ttttttttttttttttttttu u uuuu"u3u5u7u9u<uMuOuQuSuUufuhukumupuuuuuuuuuuuuuuuvvv!v#v%v(v*v-v@vQvSvUvWvZvkvmvovrvuvvvvvvvvvvvvvvvwwwww w wwTwewgwjwlwowwwwwwwwwwwwwwwwxx xxx*x,x.x1x3xXxZx]x_xaxcxfxhxxxxxxxxxxxxxxxxxxxxxxxyyyyyyy!y$y'y*y-yVy`ybyeygyiykymypysyyyyyyyyyyyyyyyyyyyyyyyz%z'z)z*z,z-z/z1z4zUzWzZz]z_zazdzszuzzzzzzzzzzzzzzzzzzz{{{ { {{{{${&{'{9{b{d{f{g{i{j{l{n{q{{{{{{{{{{{{{{{{| |||||||||=|?|B|E|G|I|L|W|d||||||||||||||||||||||||}}}}}}9};}>}A}C}E}G}J}M}Y}b}d}m}o}r}u}}}}}}}}}}}}}}}}}}~~ ~3~5~7~:~<~>~@~C~F~o~q~t~w~y~{~}~~~~~~~~~~~~~~~~~~  )+LNQTVX[qs "%(+.147:=@CFILOxz| BDGIKMO\ !FHKMOQSw*OQTVXZ\^ 4=?XZ]`cfilorux{?ADFHJLNl 1368:<>q Bgilnprt:<?ACEGI)+.02479U~ /TVY[]_bd{%'*,.03Joqtvxz} 0Y[]^`aceh 579:<=?ADiknprtwy !#%(MORTVX[]s /1468:=Fkmprtvy!$&(*-Otvy{} %258;DFSVY\_beInpsuwy|@BEGIKNd$&58;>ADGJoqtvxz}=?BDFHKMh*,/1358:W|~(*KNQTWZ]`cfilorux"%:_adfhjmpBDGIKMPSr,.1357:=dDFILNPRUXt}-/2468;>\$&)+-/25Uz|$&)+-/25V{} 0Y[]^`aceh.0368:<?BIRT]_jmpsvy !#$&(+LNQSUWZo~"-/;LNPRTegiln 1358;LNPSVgikmpy"5GZegjloruw "$579<>[]_befh-/146GIKNPacehj  "%(9;=?ARTVY[!->@BEGdfhknoq 0egiknpru~.0257HJLNPacehk|~=?ACEHJMdq #%(+.y|~!#&)RSUXadmnq"%&)Bcehkmprw ,.024EGILN_acfiz|~  #&GJLORSVo ,6EQit~ BKMPSVY[^foqt #/dfiknpsz=?ADGHJc468;>?AY 79<>@BEVX[^a (=GRdgjsv ).7<]e !#%(*H]_adfz &(+49LUZq~&(*,.?ACFHegilopr/1369FWY[^`}  #*79<?Qbdgjm  #.GJLORU~ "%(UVX[^gjkns!$-09:=Z\_bdf  #&)JMORUVYr !#%(*;=@BEVXZ]_|~€ƒ†‡‰ 58:=@CLORUX[vÁÊÌÕØÛÞá GJMPSVX[^giloĺĽĿ :;=@CDGdfhjlnŋōŏőŔŖŭ&),/258TmƞơƤƧƪƭưƳƶƹ =@CFILOiǀNjǞǯDZdzǶǸ-68:<>AFGIZ\^`ctvx{}ȚȜȞȡȤȥȧȾSUWZ]`iloruxɓɜɞɧɩ"%(+.147:<?BEHKNQTWZ]`behknqtvy|ʂʅʈʋʎʑʔʗʚʝʠʣʦʩʬ#%')+.035RTVY\]_wˬˮ˰˲˴˷˹˼˾579;=?ADacehklṅ̼̾KMOQSVX[b͉́̓͆͊͌ͥ ,acegikmp΍ΏΑΔΗΘΚβ!9nprtvy{~πϝϟϡϤϧϨϪ+-/2568QІЈЊЌЎАВЕвджймнп 9;=@CDF^ѓѕїљћѝџѢѿ!$&)FHJMPQSkҠҢҤҦҨҫҭҰҲ)+-/1358UWY\_`bzӯӱӳӵӷӹӻӾ68:<>@BEbdfilmoԇԼԾEGIKMPRUWtvx{~Ձՙ UWY[]`begքֆֈ֋֎֏֑֪ 0egikmpruגהזילםן׸ #$&=rtvxz}؂؟ءأئةتج &(*-013Jفكمهيٌُٰٲٴٷٺٻٽ 9;=@CDF^ړڕڗڙڛڞڠڣ "%'*GIKNQRTlۣۡۥۧ۩۬ۮ۱ۼ!2469;LNPSVartvxz܇܉܌܏ܕܦܨܪܭܴܰ.0257HJLOQrtvy|}ݘ ')+.0ACFILWhjloqނބކމދޜޞޠޣޥ޶޸޺޽ "357:<]_adghj߃߲߬߮߰ߴ߷߸ߺ$'*-0369;=@CDGJORoqsvy|~ DFHKMPRUY,.1368FWY\_bsuwy{+-/24EGJLO\moqtv .SUWY[^_artvy|(*,/2CEHJMWhjlnq%')+-025GXZ\_a CPRTWhjloq  "%.?ACFIZ\^actvx{~ "%'*ARTVY\moqtv "$'(*5FHKNQctvx{} 7:<?BCFIb":oqsux{}!2469<MOQSVn-/146GIKMPacehkq  "%'*;=@BESdfhjmz|+-025BSUWY[lnqsv #%'*,=?ADGXZ\_bsuwz| !$'*_bdgjmpsvy|;>ADGJMVo'1BDFIL]_adfwy{~ $&),/8IKMPRcehjm"$&)+<>@CFWY[^`qsuxz/1358GXZ\_artvy|  "$'8:=@CTVX[^oqsvy !$&79;>@QSVX[ VY\_bdgjknoru~#(*-025:<Qruwz}~ "+.147PSUWZ]`ikz} (ADFILOR[]jmpsvy|5VX[^`ce ),.1458Qrtwz|"358;>OQSVXikmor *;=?ADUWY\^oqsux):<?BDUWZ\_m~#&(+.0369<Wfoqz|  .J~ %058;@ANPRU^eqz   D m p s v w z } ~                        / 1 3 5 8 I K M P R c e h k n                       / 2 5 8 9 < ? @ C L N [ ^ a d g j m                   !BEHIVXZ]b  (*147:CEHKboru} 2Lco9BG[lorux"_psvy|&),/27HKNQT  EVY\_b !$'*-0368;>ADGIKNQTWZ]`cfilorux{~ "$'),/258;=@BEHKNQTWZ]`cfilorux{~  "%(+.0369<?BDFILNQTWZ]`cfiloqtwz|  !$'*,/258;>ADGJMPSVY\_behknqtwz}  !$'024=@ L O Q T W Y \ _ a d g j m p s v y | ~                                                 !!!! ! !!!!!!!!!"!$!&!)!+!.!1!4!6!8!;!=!@!C!F!I!L!O!R!T!V!X!Z!\!_!b!e!g!j!m!o!r!u!w!z!|!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"""" " """""""""""%"'")","/"1"4"7"9";"="?"B"D"G"I"L"O"R"U"X"["]"_"b"e"g"i"l"o"r"u"x"{"~""""""""""""""""""""""""""""""""""""""""""""""""##### # ######## #"#$#'#*#-#0#3#5#7#:#<#?#B#E#G#J#M#P#R#U#W#Z#\#_#a#d#f#h#k#n#q#t#w#z#}#################################################$$$$ $ $$$$$$$ $#$%$'$*$,$.$0$3$5$7$:$<$?$B$E$H$K$T$W'e'h'j'm'p's'v'y'{'~''''''''''''''''''''''''''''''''''''''''''''''(((( ((((((( (#(&()(,(/(2(5(8(;(>(@(C(F(H(J(M(P(S(V(Y(\(_(b(e(h(j(m(p(s(v(y(|(((((((((((((((((((((((((((((((((((((((((((((()))) ))))))) )#)&))),)/)2)5)8);)>)A)D)G)J)M)O)R)U)X)[)^)a)d)g)j)m)p)s)v)y)|))))))))))))))))))))))))))))))))))))))))))))))**** ********!*$*&*)*+*.*1*4*7*:*=*@*C*F*I*L*O*R*T*W*Z*]*`*b*e*g*j*m*p*s*v*y*|*~********************************************++++ + +++++++"+%+(+++.+1+4+6+9+<+?+B+E+H+K+M+P+S+V+Y+\+_+b+e+h+j+m+p+s+v+y+|+++++++++++++++++++++++++++...........//// / ///////"/%/(/+/./1/3/6/9/</?/B/E/H/K/N/Q/S/V/Y/\/_/b/e/g/j/m/p/s/v/y/|///////////////////////////////////////////0000 0 0000000!0$0'0*0-000306090<0?0B0E0H0K0N0Q0T0W0Z0]0`0c0f0i0l0o0r0u0x0{0~00000000000000000000000000000000000000000001111 1111111 1#1&1)1,1/1215181;1>1A1D1G1J1M1P1S1V1Y1\1_1b1e1h1k1n1q1t1w1z1}11111111111111111111111111111111111111111112222 2 2222222"2%2(2+2.2124272:2=2@2C2F2I2L2O2R2U2X2[2^2a2d2g2j2m2p2s2v2y2|22222222222222222222222222222222222222222223333 3 3333333!3$3'3*3-303336393<3?3B3E3H3K3N3Q3T3W3Z3]3`3c3f3i3l3333333344<4P4u444455x555555636B6a6t666666777)7P7k7777888+878J8o888889 9Z9s9999::2:F:^::::::;;+;?;R;t;;;;<<<#>2>O>q>>>>??:?P?????@@>@b@@@@@AAA-A:AOAcAzAAAABB&B3BGBoBBBC0CSClCCCCCCDDDD)D1DXD}DDDEE)EjE}EEEEFF F6FPFcFvFFFFGG_GGGHH*H>HZH}HII)III`IIIIIJJJ:JTJkJJJJKKKBKIK]KKKKKKLLLGLjLLLM*M9MMMfMMMMNN(NYNqNxNNNNNNOO!O5OIOoOOOOOPP(PKPPPPQQ*QWQ}QQQQR>RRR_RRRRRRRSS.SHS[SSSSSTT?TRTTTUU4UFUOUcU}UUUUUUVV'V3VVVcVVVVVWW%WGWSW]WWWWWWX X(X<XOXbX|XXXXYY&Y4Y@YfYYYYYZZ"ZHZ^____``&`D`X`l```````aa5aXaaadagaiarauaxazaagjgmgpgsgvgyg|gggggggggggggggggggggggggggggggggggggggggggggghhhh h hhhhhhh"h%h(h+h.h1h4h7h:h=h@hChFhIhLhNhQhShVhYh\h_hbhehhhkhnhqhthwhzh}hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhiiii iiiiiii i#i&i)i,i/i2i5i8i;i>iAiDiGiJiMiPiSiViYi\i_ibieihijiliniqitiwizi}iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiijjjj jjjjjjjj"j%j(j+j.j1j4j7j:j=j@jCjFjIjLjOjRjUjXj[j^jajdjgjjjmjpjrjujxj{j~jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjkkkk kkkkkkk k#k&k)k,k/k2k5k8k;k>kAkDkGkJkMkPkSkVkYk\k_kbkekhkkknkqktkwkzk}kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkllll lllllll l#l&l)l,l/l2l5l8l;l>lAlDlGlJlMlPlSlUlXl[l^laldlgljlmlplslvlyl{l~llllllllllllllllllllllllllllllllllllllllllllmmmm m mmmmmmm"m%m(m+m.m1m4m7m:m=m@mCmFmImLmOmRmUmXm[m^mamdmgmjmmmpmsmumxm{m~mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmnnnn n nnnnnnn"n%n(n+n-n0n3n6n9n<n?nAnDnFnInLnOnRnUnXn[n^nandngnjnmnonrnunxn{n~nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnoooo o ooooooo"o%o(o+o.o1o4o7o:o=o@oCoFoIoLoOoRoUoXo[o^oaodogojomoposovoyo{o}ooooooooooooooooooooooooooooooooooooooooooooopp uuuuuuvvvv v vvvvvvv"v%v(v+v.v1v4v7v:v=v@vCvFvIvLvOvRvUvXv[v^vavdvgvjvmvpvsvvvyv|vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvwwww w wwwwwww!w$w'w*w-w0w3w6w9w<w?wBwEwHwKwNwQwTwWwZw]w`wcwfwiwlwowrwuwxw{w~wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwxxxx xxxxxxx x#x&x)x,x/x2x5x8x;x>xAxDxGxJxMxPxSxVxYx\x_xbxexhxkxnxqxtxwxzx}xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxyyyy y yyyyyyy"y%y(y+y.y1y4y7y:y=y@yCyFyIyLyOyRyUyXy[y^yaydygyjymypysyvyyy|yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyzzzz z zzzzzzz!z$z'z*z-z0z3z6z9z<z?zBzEzHzKzNzQzTzWzZz]z`zczfzizlzozrzuzxz{z~zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz{{{{ {{{{{{{ {#{&{){,{/{2{5{8{;{>{A{D{G{J{M{P{S{V{Y{\{_{b{e{h{k{n{q{t{w{z{}{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{|||| | |||||||"|%|(|+|.|1|4|7|:|=|@|C|F|I|L|O|R|U|X|[|^|a|d|g|j|m|p|s|v|y|||||||||||||||||||||||||||||||||||||||||||||}}}} } }}}}}}}!}$}'}*}-}0}3}6}9}<}?}B}E}H}K}N}Q}T}W}Z}]}`}c}f}i}l}o}r}u}x}{}~}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}~~~~ ~~~~~~~ ~#~&~)~,~/~2~5~8~;~>~A~D~G~J~M~P~S~V~Y~\~_~b~e~h~k~n~q~t~w~z~}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  !$'*-/258;>ADGJMPSVY\_behknqtwz}  #&),/258:=@CFILORUX[^adgjmpsvy|~  !$'*-0369<?BEHKNQTWZ]`cfilorux{~  "%'*-0369<>ADGJMPSVY\_behknpsvy|  !#&),/258;>ADFIRTWZ]`cfilorux{~   #&),/258;>ADGJMPSVY\_bdgjmpsvy|  #&)+.147:=@CFILORUX[^adgjmpsvy|  #&(+.147:=@CFILORUX[]`cfilortwz}  !$'*-0369BDENQR[^_hm1|wcalc-2.4/English.lproj/Makefile.am0000664000175000000620000000017611074301462015513 0ustar kkstaffEXTRA_DIST = InfoPlist.strings \ MainMenu.nib/classes.nib \ MainMenu.nib/info.nib \ MainMenu.nib/keyedobjects.nib wcalc-2.4/English.lproj/Makefile.in0000664000175000000620000002012411074306205015517 0ustar kkstaff# Makefile.in generated by automake 1.10.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 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 = English.lproj DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = 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@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ 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@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ YACC = @YACC@ YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_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_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = InfoPlist.strings \ MainMenu.nib/classes.nib \ MainMenu.nib/info.nib \ MainMenu.nib/keyedobjects.nib all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu English.lproj/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu English.lproj/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 tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(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 check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic 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-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 -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: wcalc-2.4/ErrorController.h0000644000175000000620000000041410304224616014240 0ustar kkstaff/* ErrorController */ #include @interface ErrorController : NSObject { IBOutlet id errorDialog; IBOutlet id errorMessage; } - (IBAction)closeAlert:(id)sender; - (IBAction)showAlert:(id)sender; - (IBAction)throwAlert:(NSString *)message; @end wcalc-2.4/ErrorController.m0000644000175000000620000000107210404707641014253 0ustar kkstaff#include "ErrorController.h" #ifdef MEMWATCH #include "memwatch.h" #endif @implementation ErrorController - (IBAction)closeAlert:(id)sender { [errorMessage setString:@""]; [errorDialog close]; } - (IBAction)showAlert:(id)sender { [errorDialog makeKeyAndOrderFront:self]; [errorDialog center]; } - (IBAction)throwAlert:(NSString *)message { [errorDialog makeKeyAndOrderFront:self]; [errorDialog center]; [errorMessage setEditable:true]; [errorMessage insertText:message]; [errorMessage insertText:@"\n"]; [errorMessage setEditable:false]; NSBeep(); } @end wcalc-2.4/evalvar.c0000664000175000000620000000114010647174553012553 0ustar kkstaff#include "number.h" #include "variables.h" #include "calculator.h" #include "number_formatting.h" #ifdef MEMWATCH #include "memwatch.h" #endif char *evalvar(const char *varname) { struct answer a; char *varvalue, junk; Number f; a = getvar_full(varname); if (!a.err) { num_init(f); if (a.exp) { // it is an expression parseme(a.exp); num_set(f, last_answer); } else { // it is a value num_set(f, a.val); num_free(a.val); } varvalue = num_to_str_complex(f, 10, 0, -1, 1, &junk); num_free(f); return varvalue; } else { return NULL; } } wcalc-2.4/evalvar.h0000664000175000000620000000012210647174560012555 0ustar kkstaff#ifndef WCALC_EVALVAR #define WCALC_EVALVAR char *evalvar(const char *); #endif wcalc-2.4/explain.c0000644000175000000620000004335111054337412012547 0ustar kkstaff#ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include /* for isspace() */ #include "number.h" #include "uint32_max.h" #include "variables.h" #include "calculator.h" #include "list.h" #include "extract_vars.h" #include "evalvar.h" #include "isconst.h" #include "isfunc.h" #include "explain.h" #ifdef MEMWATCH #include "memwatch.h" #endif static int explain_command(const char *, int); static void explain_variable(const char *); static void explain_constant(const char *); static void explain_function(const char *); void explain(const char *str) { /*{{{ */ size_t curs; char *mystr; if (str == NULL || str[0] == 0) { str = "\\explain"; } mystr = strdup(str); /* for sanity's sake, remove any trailing whitespace */ curs = strlen(mystr) - 1; while (isspace(mystr[curs]) && curs > 0) { mystr[curs] = 0; curs--; } printf("Explaining %s.\n", mystr); if (!strcmp(mystr, "q")) { printf("Quits the program."); } else if (!strcmp(mystr, "constants")) { printf("Wcalc understands many standard physical constants.\n" "Here is the list of the ones currently understood;\n" "each can be explained in detail individually (some\n" "mean the same thing).\n"); printconsts(); } else if (*mystr == '\\') { // it's a command explain_command(mystr, 0); } else if (isconst(mystr) != W_notaconstant) { // it's a constant explain_constant(mystr); } else if (isfunc(mystr)) { // it's a function explain_function(mystr); } else if (varexists(mystr)) { // it's a variable explain_variable(mystr); } else { // it's a call for help int len = strlen(mystr) + 2; char *add_a_slash = calloc(len, sizeof(char)); snprintf(add_a_slash, len, "\\%s", mystr); if (explain_command(add_a_slash, 1) == -1) { printf ("%s is neither a command, constant, function, or variable.\n", mystr); } free(add_a_slash); } free(mystr); } /*}}} */ static int explain_command(const char *str, int test) { /*{{{ */ str++; if (!strcmp(str, "b") || !strcmp(str, "bin") || !strcmp(str, "binary")) { printf("This displays the output in binary.\n"); } else if (!strcmp(str, "store")) { printf ("Saves the variable specified in the preload file, ~/.wcalc_preload. Use like so: \\store variablename\n"); } else if (!strcmp(str, "q")) { printf("Exits the program.\n"); } else if (!strcmp(str, "d") || !strcmp(str, "dec") || !strcmp(str, "decimal")) { printf("This displays the output in decimal.\n"); } else if (!strcmp(str, "dsep")) { printf ("Used like so: \\dsepX This sets the decimal separator to X. By default, it is a period (.).\n"); } else if (!strcmp(str, "e") || !strcmp(str, "eng") || !strcmp(str, "engineering")) { printf ("This toggles the formatting of output between decimal and scientific notation.\n"); } else if (!strcmp(str, "cons") || !strcmp(str, "conservative")) { printf("Toggles precision guards.\n"); } else if (!strcmp(str, "h") || !strcmp(str, "hex") || !strcmp(str, "hexadecimal") || !strcmp(str, "x")) { printf("This displays the output in hexadecimal.\n"); } else if (!strcmp(str, "help")) { printf("This displays a generic help message.\n"); } else if (!strcmp(str, "hlimit")) { printf ("This places (or removes) a limit on the number of things stored in the history. Use like this: \\hlimitX where X is a number. 0 removes the limit.\n"); } else if (!strcmp(str, "ints")) { printf ("Toggles whether long integers will be abbreviated or not (conflicts with engineering notation for large numbers, but not for decimals).\n"); } else if (!strcmp(str, "li") || !strcmp(str, "list") || !strcmp(str, "listvars")) { printf("Prints out the currently defined variables.\n"); } else if (!strcmp(str, "o") || !strcmp(str, "oct") || !strcmp(str, "octal")) { printf("This displays the output in octal.\n"); } else if (!strcmp(str, "open")) { printf ("Loads a saved file. Used like this: \\openXXXXX where XXXXX is the name of the file to load.\n"); } else if (!strcmp(str, "p")) { printf ("Sets the precision. Use it like so: \\pX where X is the desired precision. Precision here is in digits. This setting only affects display. -1 means \"auto\".\n"); } else if (!strcmp(str, "pre") || !strcmp(str, "prefix") || !strcmp(str, "prefixes")) { printf("Toggles whether prefixes are shown with the output.\n"); } else if (!strcmp(str, "pref") || !strcmp(str, "prefs") || !strcmp(str, "preferences")) { printf("Prints out the current preference settings.\n"); } else if (!strcmp(str, "r") || !strcmp(str, "rad") || !strcmp(str, "radians")) { printf("Toggles radian mode for trigonometric functions.\n"); } else if (!strcmp(str, "rou") || !strcmp(str, "round") || !strcmp(str, "rounding")) { printf ("Sets the rounding indication. The possible arguments to this preference are \"none\", \"simple\", and \"sig_fig\". Use like this: \\round none\n"); } else if (!strcmp(str, "re") || !strcmp(str, "remember") || !strcmp(str, "remember_errors")) { printf("Toggles whether errors are remembered in history.\n"); } else if (!strcmp(str, "bits")) { printf ("Sets the number of bits used internally to represent numbers. Used like this: \\bitsX where X is a number that must be above %li and below %li.\n", (long int)NUM_PREC_MIN, (long int)NUM_PREC_MAX); } else if (!strcmp(str, "save")) { printf ("Saves the history and variable list to a file. Used like this: \\saveXXXXX where XXXXX is the name of the file to save.\n"); } else if (!strcmp(str, "tsep")) { printf ("Used like this: \\tsepX Sets the thousands-place separator character to X. The default is a comma (,).\n"); } else if (!strcmp(str, "c") || !strcmp(str, "conv") || !strcmp(str, "convert")) { printf ("Used either like this: \"\\convert unit1 to unit2\" or like this: \"\\convert unit1 unit2\". Converts the previous answer from the first unit to the second.\n"); } else if (!strcmp(str, "base")) { printf("Prints out the previous answer in any base from 2 to 36.\n"); } else if (!strcmp(str, "verbose")) { printf ("Prints out the lines to be evaluated before evaluating them.\n"); } else if (!strcmp(str, "explain")) { printf ("Gives you information about commands, variables, constants and functions.\n"); } else if (!strcmp(str, "cmod")) { printf ("Changes how the modulus operator (%%) behaves with negative numbers.\n The default is to behave like the C programming language modulus, the other is slightly more flexible. For example, with the default setting:\n\n\t-340 %% 60 == -40; 340 %% -60 == 40; -340 %% -60 == -40\n\nWhen this setting is toggled, it behaves like this:\n\n\t-340 %% 60 == -40; 340 %% -60 == -20; -340 %% -60 == 20\n"); } else { if (test == 0) { printf("Undefined command.\n"); } return -1; } return 0; } /*}}} */ static void explain_variable(const char *str) { /*{{{ */ struct answer var; var = getvar_full(str); if (var.err) { printf("This should never happen.\n"); return; } if (var.exp) { // it's an expression (i.e. a function) List strings; printf("%s is the expression: %s\n", str, var.exp); printf("%s uses the following variables:\n", str); strings = extract_vars(var.exp); while (listLen(strings) > 0) { char *curstr = (char *)getHeadOfList(strings); char *value = evalvar(curstr); printf("\t%s\t(currently: %s)\n", curstr, value ? value : "undefined"); if (curstr) { free(curstr); } if (value) { free(value); } } freeList(&strings); } else { char std_save; std_save = standard_output; standard_output = 0; printf("%s is a variable with the value: %s\n", str, print_this_result(var.val)); standard_output = std_save; } if (var.desc != NULL) { printf("Description: %s\n", var.desc); } } /*}}} */ static void explain_constant(const char *str) { /*{{{ */ switch (isconst(str)) { case W_e: printf ("The base of the natural logarithm function. Arbitrary precision. Occasionally called Euler's Number (after Leonhard Eulter) or Napier's Constant (after John Napier)."); break; case W_pi: printf ("The ratio of a circle's circumference to its diameter. Arbitrary precision."); break; case W_random: printf("A random number between 0 and %u.", UINT32_MAX); break; case W_irandom: printf("A random integer between 0 and %u.", UINT32_MAX); break; case W_Na: printf ("Avogadro's Constant. The number of molecules in one mole."); break; case W_k: printf ("Boltzmann's Constant. The physical constant relating temperature to energy."); break; case W_Cc: printf("Coulomb force constant. Equal to 1/(4*pi*epsilonzero)."); break; case W_ec: printf ("Elementary charge. The electric charge carried by a single proton."); break; case W_R: printf ("Molar Gas Constant. Used in equations of state to relate various groups of state functions to one another."); break; case W_G: printf ("The universal gravitational constant. Appears in Einstein's theory of general relativity."); break; case W_g: printf("The gravitational accelleration of Earth at sea-level."); break; case W_Me: printf("The mass of an electron in kilograms."); break; case W_Mp: printf("The mass of a proton in kilograms."); break; case W_Mn: printf("The mass of a neutron in kilograms."); break; case W_Md: printf("The mass of a deuteron in kilograms."); break; case W_u: printf ("Atomic mass unit. One twelfth of the mean mass of an atop of carbon 12 in its nuclear and electronic ground state."); break; case W_c: printf("The speed of light."); break; case W_h: printf ("Planck Constant. Used to describe the sizes of quanta, central to the theory of quantum mechanics."); break; case W_mu0: printf ("Permeability of free space. Also known as the magnetic constant."); break; case W_epsilon0: printf("Permittivity of free space. The ratio of D/E in vacuum."); break; case W_muB: printf("Bohr magneton. A physical constant of magnetic moment."); break; case W_muN: printf ("Nuclear magneton. A physical constant of magnetic moment."); break; case W_b: printf ("Wein displacement constant. Defines the relationship between the thermodynamic temperature of a black body and the wavelength at which the intensity of the radiation is the greatest."); break; case W_a0: printf ("Bohr radius. A single electron orbiting at the lowest possible energy in a hydrogen atom orbits at this distance."); break; case W_F: printf ("Faraday constant. The amount of electric charge in one mole of electrons."); break; case W_Vm: printf("Molar volume of ideal gas."); break; case W_eV: printf ("Electron volt. The amount of kinetic energy gained by a single unbound electron when it passes through an electrostatic potential difference of one volt, in vacuum."); break; case W_sigma: printf ("Stefan-Boltzmann constant. The constant of proportionality between the total energy radiated per unit surface area of a black body in unit time and the fourth power of the thermodynamic temperature, as per the Stefan-Boltzmann law."); break; case W_alpha: printf ("Fine-structure constant. The fundamental physical constant characterizing the strength of the electromagnetic interaction."); break; case W_gamma: printf ("Euler-Mascheroni constant. Used mainly in number theory, defined as the limiting difference between the harmonic series and the natural logarithm."); break; case W_re: printf ("Electron radius, also known as the Compton radius or the Thomson scattering length based on a classical relativistic model of the electron."); break; case W_Kj: printf ("Josephson Constant. The inverse of the magnetic flux quantum."); break; case W_Rk: printf ("von Klitzing constant. Named after Klaus von Klitzing, the basic resistance unit."); break; case W_Rinf: printf ("The \"infinity\" Rydberg constant, named after physicist Janne Rydberg. Used to calculate the Rydberg constant of any other chemical element."); break; case W_Eh: printf ("Hartree energy. The atomic unit of energy, named after physicist Douglas Hartree."); break; case W_Gf: printf("Fermi Coupling Constant."); break; case W_Mmu: printf("The mass of a muon in kilograms."); break; case W_Mt: printf("The tau mass in kilograms."); break; case W_Mh: printf("The mass of a helion in kilograms."); break; case W_Malpha: printf("The mass of an alpha particle in kilograms."); break; case W_n0: printf ("Loschmidt constant. The number of molecules in a cubic meter of ideal gas. Equal to the Avogadro constant divided by molar volume."); break; case W_c1: printf("First radiation constant."); break; case W_c2: printf("Second radiation constant."); break; case W_G0: printf("Conductance quantum."); break; case W_Z0: printf ("Characteristic impedance of vacuum, the characteristic impedance of electromagnetic radiation in vacuum. Equal to mu0*c."); break; case W_Phi0: printf ("Magnetic flux quantum. The quantum of magnetic flux passing through a superconductor."); break; case W_K: printf ("Catalan's constant commonly appears in estimates of combinatorial functions and in certain classes of sums and definite integrals."); break; case W_Inf: printf ("This represents infinity. This is a \"special\" number that has specific (unusual) mathematical consequences."); break; case W_NaN: printf ("Not-a-number. This is a \"special\" number that has specific (unusual) mathematical consequences."); break; case W_half: printf("A special symbol for 0.5."); break; case W_quarter: printf("A special symbol for 0.25."); break; case W_threequarters: printf("A special symbol for 0.75."); break; case W_notaconstant: printf ("This is not a constant... you should not be seeing this message (report the bug!)"); break; } printf("\n"); } /*}}} */ static void explain_function(const char *str) { /*{{{ */ if (!strcmp(str, "sin") || !strcmp(str, "cos") || !strcmp(str, "tan") || !strcmp(str, "cot")) { printf("A trigonometric function."); } else if (!strcmp(str, "asin") || !strcmp(str, "acos") || !strcmp(str, "atan") || !strcmp(str, "acot") || !strcmp(str, "arcsin") || !strcmp(str, "arccos") || !strcmp(str, "arctan") || !strcmp(str, "arccot")) { printf("The inverse of the standard trigonometric function."); } else if (!strcmp(str, "sinh") || !strcmp(str, "cosh") || !strcmp(str, "tanh") || !strcmp(str, "coth")) { printf("A standard hyperbolic trigonometric function."); } else if (!strcmp(str, "asinh") || !strcmp(str, "acosh") || !strcmp(str, "atanh") || !strcmp(str, "acoth") || !strcmp(str, "areasinh") || !strcmp(str, "areacosh") || !strcmp(str, "areatanh") || !strcmp(str, "areacoth")) { printf ("The inverse of the standard hyperbolic trigonometric function."); } else if (!strcmp(str, "log")) { printf("A logarithm (base 10)."); } else if (!strcmp(str, "logtwo")) { printf("A logarithm (base 2)."); } else if (!strcmp(str, "ln")) { printf("A logarithm (base e). Also known as the \"natural\" log."); } else if (!strcmp(str, "round")) { printf("Returns the closest integer to the input number."); } else if (!strcmp(str, "abs")) { printf("The absolute value (the distance of the number from zero)."); } else if (!strcmp(str, "sqrt")) { printf("The square root function."); } else if (!strcmp(str, "floor")) { printf ("Returns the biggest integer that is not bigger than the input number."); } else if (!strcmp(str, "ceil") || !strcmp(str, "ceiling")) { printf ("Returns the smallest integer that is not smaller than the input number."); } else if (!strcmp(str, "cbrt")) { printf("The cube root function."); } else if (!strcmp(str, "rand")) { printf("Returns a random number between 0 and the input number."); } else if (!strcmp(str, "irand")) { printf("Returns a random integer between 0 and the input number."); } else if (!strcmp(str, "fact")) { printf("Returns the factorial of the input number."); } else if (!strcmp(str, "comp")) { printf("Returns the one's complement of the input number."); } else if (!strcmp(str, "zeta")) { printf ("Returns the Riemann zeta function of the input number. This is used primarily in number theory, but also has applications in physics, probability theory, and applied statistics."); } else if (!strcmp(str, "Gamma")) { printf ("Returns the Gamma function of the input number. The Gamma function extends the factorial function to complex and non-natural numbers."); } else if (!strcmp(str, "lnGamma")) { printf ("Returns the natural log of the Gamma function of the input number."); } else if (!strcmp(str, "eint")) { printf("The exponential integral function."); } else if (!strcmp(str, "sinc")) { printf ("Sinus cardinalis, also known as the interpolation function, filtering function, or the first spherical Bessel function, is the product of a sine function and a monotonically decreasing function."); } else if (!strcmp(str, "exp")) { printf ("Returns the value of e to the given power. Equivalent to: e^"); } else { printf ("Hrm... this function doesn't have any documentation! Pester the developer!"); } printf("\n"); } /*}}} */ wcalc-2.4/explain.h0000664000175000000620000000012410647174672012563 0ustar kkstaff#ifndef WCALC_EXPLAIN #define WCALC_EXPLAIN void explain(const char *str); #endif wcalc-2.4/extract_vars.c0000644000175000000620000000356211054336567013626 0ustar kkstaff#include /* for NULL */ #include /* for isalpha() and isdigit() */ #include /* for strdup() */ #include "list.h" /* for List */ #include "isfunc.h" #include "isconst.h" #include "extract_vars.h" #ifdef MEMWATCH #include "memwatch.h" #endif /*@null@*/ List extract_vars(char *str) { char *curs, *eov, save_char; List variables = NULL; char *varname; curs = str; while (curs && *curs) { // search for the first letter of a possible variable while (curs && *curs && !isalpha((int)(*curs))) { if (*curs == '\'' || *curs == '#') { break; } curs++; // skip hex numbers if ((*curs == 'x' || *curs == 'X') && curs != str && *(curs - 1) == '0') { curs++; while (curs && *curs && (isdigit((int)(*curs)) || (*curs >= 'a' && *curs <= 'f') || (*curs >= 'A' && *curs <= 'F'))) { curs++; } } // skip binary numbers if (*curs == 'b' && curs != str && *(curs - 1) == '0') { curs++; } } // if we didn't find a first letter, we're done looking if (*curs == 0 || *curs == '#' || *curs == '\'') { break; } // if we did find something, pull out the variable name eov = curs; while (eov && *eov && (isalpha((int)(*eov)) || *eov == '_' || *eov == ':' || isdigit((int)(*eov)))) { eov++; } save_char = *eov; *eov = 0; varname = (char *)strdup(curs); *eov = save_char; curs = eov; // add it to the set of known variables if (!isfunc(varname) && isconst(varname) == W_notaconstant) { size_t i = 0; char exists = 0; while (i < listLen(variables)) { char *peekstr = peekListElement(variables, i); if (!strcmp(peekstr, varname)) { exists = 1; break; } i++; } if (!exists) { addToList(&variables, (void *)strdup(varname)); } } free(varname); } return variables; } wcalc-2.4/extract_vars.h0000644000175000000620000000017310725564203013620 0ustar kkstaff#ifndef WCALC_EXTRACT_VARS #define WCALC_EXTRACT_VARS #include "list.h" /*@null@*/ List extract_vars(char *str); #endif wcalc-2.4/files.c0000644000175000000620000001463610725564203012221 0ustar kkstaff/* * files.c * Wcalc * * Created by Kyle Wheeler on Sat Mar 22 2003. * Copyright (c) 2003 Kyle Wheeler. All rights reserved. * */ #include /* for open() */ #include /* for close() */ #include /* for errno */ #include /* for open flags */ #include /* for open flags */ #include /* for strlen() */ #include /* for free() */ #include /* for PATH_MAX */ #include "historyManager.h" #include "string_manip.h" #include "calculator.h" #include "variables.h" #include "files.h" #ifdef MEMWATCH #include "memwatch.h" #endif /* this is for communicating with the scanner */ char *open_file = NULL; int saveState(char *filename) { /*{{{ */ int fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); int return_error = 0; free(filename); if (fd >= 0) { //success size_t hindex; int retval; size_t num_vars = numvars(); /* save variables */ for (hindex = 0; hindex < num_vars; hindex++) { struct variable *keyval = getrealnvar(hindex); char *cptr; if (!keyval) { continue; } if (!strcmp(keyval->key, "a")) { continue; } retval = write(fd, keyval->key, strlen(keyval->key)); if (retval < (int)strlen(keyval->key)) { return_error = errno; break; } retval = write(fd, "=", 1); if (retval < 1) { return_error = errno; break; } if (keyval->exp) { cptr = malloc(strlen(keyval->expression) + 3); snprintf(cptr, strlen(keyval->expression) + 3, "'%s'", keyval->expression); } else { cptr = strdup(print_this_result(keyval->value)); } retval = write(fd, cptr, strlen(cptr)); if (retval < (int)strlen(cptr)) { return_error = errno; free(cptr); break; } free(cptr); if (keyval->description) { cptr = malloc(strlen(keyval->description) + 4); snprintf(cptr, strlen(keyval->description) + 4, " '%s'", keyval->description); retval = write(fd, cptr, strlen(cptr)); if (retval < (int)strlen(cptr)) { return_error = errno; free(cptr); break; } free(cptr); } retval = write(fd, "\n", 1); if (retval < 1) { return_error = errno; break; } } /* save history */ for (hindex = 0; hindex < historyLength() && return_error == 0; hindex++) { char *history_entry = historynum(hindex, 1); retval = write(fd, history_entry, strlen(history_entry)); if (retval < (int)strlen(history_entry)) { return_error = errno; break; } retval = write(fd, " # = ", 5); if (retval < 5) { return_error = errno; break; } history_entry = historynum(hindex, 2); retval = write(fd, history_entry, strlen(history_entry)); if (retval < (int)strlen(history_entry)) { return_error = errno; break; } retval = write(fd, "\n", 1); if (retval < 1) { return_error = errno; break; } } if (close(fd) != 0) { return_error = errno; } } else { //failure return_error = errno; } return return_error; } /*}}} */ int loadState(const char *filename, const int into_history) { /*{{{ */ int fd, return_error = 0; int standard_output_save = standard_output; standard_output = 0; fd = open(filename, O_RDONLY); if (fd >= 0) { //success char *linebuf; int retval; unsigned int linelen = 0, maxlinelen = 99; linebuf = calloc(sizeof(char), 100); retval = read(fd, linebuf + linelen, 1); while (retval == 1) { while (retval == 1 && linebuf[linelen] != '\n') { linelen++; if (linelen == maxlinelen) { char *newlinebuf = realloc(linebuf, sizeof(char) * (maxlinelen + 100)); if (newlinebuf) { maxlinelen += 100; linebuf = newlinebuf; } else { return_error = errno; retval = -1; break; } } retval = read(fd, linebuf + linelen, 1); } linebuf[linelen] = 0; if (conf.verbose) { printf("-> %s\n", linebuf); } stripComments(linebuf); while (linebuf[strlen(linebuf) - 1] == ' ') { linebuf[strlen(linebuf) - 1] = 0; } if (strlen(linebuf)) { extern char *errstring; char *safe; safe = strdup(linebuf); parseme(safe); putval("a", last_answer, "previous answer"); if ((!errstring || (errstring && !strlen(errstring)) || conf.remember_errors) && into_history) { addToHistory(linebuf, last_answer); } free(safe); } linelen = 0; memset(linebuf, 0, maxlinelen); if (retval == 1) { retval = read(fd, linebuf + linelen, 1); } } if (close(fd) != 0) { return_error = errno; } free(linebuf); } else { return_error = errno; } standard_output = standard_output_save; return return_error; } /*}}} */ int storeVar(const char *variable) { /*{{{ */ int fd, retval = 0, return_error = 0; char filename[PATH_MAX]; if (!varexists(variable)) { report_error("Variable is not defined."); return -1; } snprintf(filename, PATH_MAX, "%s/.wcalc_preload", getenv("HOME")); fd = open(filename, O_WRONLY | O_CREAT | O_APPEND, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); if (fd >= 0) { // success struct answer keyval = getvar_full(variable); char *cptr; retval = write(fd, variable, strlen(variable)); if (retval < (int)strlen(variable)) { return_error = errno; goto exit_storeVar; } retval = write(fd, "=", 1); if (retval < 1) { return_error = errno; goto exit_storeVar; } if (keyval.exp) { cptr = malloc(strlen(keyval.exp) + 4); snprintf(cptr, strlen(keyval.exp) + 4, "'%s' ", keyval.exp); } else { cptr = strdup(print_this_result(keyval.val)); } retval = write(fd, cptr, strlen(cptr)); if (retval < (int)strlen(cptr)) { return_error = errno; free(cptr); goto exit_storeVar; } free(cptr); if (keyval.desc) { cptr = malloc(strlen(keyval.desc) + 3); snprintf(cptr, strlen(keyval.desc) + 3, "'%s'", keyval.desc); retval = write(fd, cptr, strlen(cptr)); if (retval < (int)strlen(cptr)) { return_error = errno; free(cptr); goto exit_storeVar; } free(cptr); } retval = write(fd, "\n", 1); if (retval < 1) { return_error = errno; goto exit_storeVar; } retval = close(fd); if (retval == -1) { return_error = errno; goto exit_storeVar; } } exit_storeVar: return return_error; } /*}}} */ wcalc-2.4/files.h0000644000175000000620000000054110647175442012222 0ustar kkstaff/* * files.h * Wcalc * * Created by Kyle Wheeler on Sat Mar 22 2003. * Copyright (c) 2003 Kyle Wheeler. All rights reserved. * */ #ifndef WCALC_FILES #define WCALC_FILES int saveState(char *filename); // filename is freed by saveState int loadState(const char *filename, const int into_history); int storeVar(const char *variable); #endif wcalc-2.4/help.c0000644000175000000620000001050111101144345012020 0ustar kkstaff/* * help.c * Wcalc * * Created by Kyle Wheeler on Wed Feb 12 2003. * Copyright (c) 2003 Kyle Wheeler. All rights reserved. * */ #include #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "definitions.h" #include "help.h" #ifdef MEMWATCH #include "memwatch.h" #endif void print_interactive_help (void) { printf("Wcalc "VERSION" by Kyle Wheeler.\nVersion 0.1.x written in C++ for CS240C at Ohio University, Jan 14 2000\n"); printf("Version 0.2.x rewritten for lex/yacc in C, Nov 25 2001\n"); printf("Version 0.3.x released under GPL, Jan 2003\n"); printf( "This calculator recognizes the following symbols:\n" SUPPORTED_SYMBOLS "\nThe following commands are supported:\n" "\\p \\bitsX \\e \\eng \\engineering \\q \\help " "\\prefs " "\\cons \\conservative\n" "\\pre \\prefix \\prefixes " "\\b \\bin \\binary " "\\d \\dec \\decimal " "\\h \\x \\hex\n\\hexadecimal " "\\o \\oct \\octal " "\\r \\rad \\radians " "\\re \\remember \\remember_errors\n" "\\rou \\round \\rounding " "\\dsep " "\\tsep " "\\hlimit " "\\openXXXXX " "\\saveXXXXX " "\\ints\n" "\\convert " "\\li \\list \\listvars " "\\store " "\\explain " "\n\n" "Variables are supported and may be assigned using the = operator.\n" "To assign a variable, use the form:\n" "foo = anylegalexpression\n" "Thereafter, that variable name is the same as the literal value it represents.\n" "Variables may also be assigned like so:\n" "foo = 'anylegalexpression'\n" "Thereafter, that expression is evaluated to get a value for the variable\n" "whenever the variable is used.\n" "\"a\" is a reserved variable that represents the previous answer.\n\n" "Detail about any command, symbol, or variable can be gotten by \\explain'ing it.\n" "\n" "This calculator accepts input in decimal (1.00), scientific notation (1.0e5),\n" "octal (088), hexadecimal (0xff), and binary (0b11).\n\n" "Comments (ignored expressions) are either between /* and */ or\n" "after a // or #\n"); } void print_command_help (void) { printf("Wcalc "VERSION" by Kyle Wheeler.\n"); printf("Version 0.1.x written in C++ for CS240C at Ohio University, Jan 14 2000\n"); printf("Version 0.2.x rewritten for lex/yacc in C, Nov 25 2001\n\n"); printf( "This calculator recognized the following symbols:\n" SUPPORTED_SYMBOLS "\nThe ! is factorial or boolean, depending on use.\n" "Spaces are ignored (unknown symbols cause errors or are treated as variables)\n" "This calculator accepts input in decimal (1.00), scientific notation (1.0e5),\n" "octal (088), hexadecimal (0xff), and in binary (0b11).\n\n" "-H, --help Prints this help.\n" "-v, --version Prints the version number.\n" "-Px Sets the precision, where x is the desired precision.\n" " This setting only affects output.\n" "-E Toggles the formatting of output between decimal\n" " and scientific notation.\n" " This setting only applies when precision is specified.\n" "-d, -dec, --decimal Prints the output in decimal form.\n" "-h, -hex, --hexadecimal Prints the output in hexadeximal form.\n" "-o, -oct, --octal Prints the output in octal form.\n" "-b, -bin, --binary Prints the output in binary form.\n" "-p Prints the prefixes for hexadecimal, octal and\n" " binary forms.\n" "-l, --lenient Makes the parser assume that uninitialized variables\n" " have a value of zero.\n" "-r, --radians This makes all trigonometric functions work in radians.\n" "-q, --quiet This suppresses the = sign.\n" "-c, --conservative This toggles the precision guard for display.\n" "\n" "Variables are supported and may be assigned using the = operator.\n" "To assign a variable, use the form:\n" "foo = anylegalexpression\n" "Thereafter, that variable name is the same as the literal value it represents.\n\n" "Executing this program without any arguments enters an 'interactive' mode\n" "with a few more features and options.\n" "\n" "This is only a subset of the supporte options. See the man page for complete documentation.\n" ); } wcalc-2.4/help.h0000644000175000000620000000037510374647647012065 0ustar kkstaff/* * help.h * Wcalc * * Created by Kyle Wheeler on Wed Feb 12 2003. * Copyright (c) 2003 Kyle Wheeler. All rights reserved. * */ #ifndef WCALC_HELP #define WCALC_HELP void print_interactive_help(void); void print_command_help(void); #endif wcalc-2.4/HistoryList.h0000644000175000000620000000070310401365320013375 0ustar kkstaff/* HistoryList */ #include #include "WcalcController.h" @interface HistoryList : NSObject { IBOutlet NSTextField *expressionField; IBOutlet NSTableView *theList; } - (IBAction)rowSelected:(id)sender; - (int)numberOfRowsInTableView:(NSTableView *)atv; - (id)tableView:(NSTableView *)atv objectValueForTableColumn:(NSTableColumn*)col row:(int)rowIndex; - (IBAction)clearHistory:(id)sender; - (IBAction)copyMe:(id)sender; @end wcalc-2.4/HistoryList.m0000644000175000000620000000372210650213725013415 0ustar kkstaff#include "historyManager.h" #include "HistoryList.h" #ifdef MEMWATCH #include "memwatch.h" #endif @implementation HistoryList - (int)numberOfRowsInTableView:(NSTableView *)atv { return historyLength(); } /* returns the correct text for a given column and row */ - (id)tableView:(NSTableView *)atv objectValueForTableColumn:(NSTableColumn*)col row:(int)rowIndex { char * val; if ([[col identifier] isEqualToString:@"history"]) val = historynum(rowIndex,1); else val = historynum(rowIndex,2); if (! val) return @"BAD ROW (history manager)"; return [NSString stringWithUTF8String:val]; } - (IBAction)rowSelected:(id)sender { int row = [sender selectedRow]; // printf("selected: %i\n",[sender selectedRow]); if (row > -1) { [expressionField setStringValue:[NSString stringWithUTF8String:historynum([sender selectedRow],1)]]; } [expressionField selectText:self]; } - (IBAction)clearHistory:(id)sender { clearHistory(); [theList reloadData]; } - (IBAction)copyMe:(id)sender { NSPasteboard* pboard=[NSPasteboard generalPasteboard]; NSString *theString = @""; NSIndexSet* rowEnumerator=[theList selectedRowIndexes]; unsigned int theIndex=0; // Set the pasteboard types you want here. [pboard declareTypes:[NSArray arrayWithObject:NSStringPboardType] owner:self]; theIndex = [rowEnumerator firstIndex]; do { // Here, you'd look up the data in your data source instead, and add data to the pasteboard for one or more of the types. theString = [theString stringByAppendingFormat:@"%s\t%s\n", historynum(theIndex,1), historynum(theIndex,2)]; } while ((theIndex = [rowEnumerator indexGreaterThanIndex:theIndex]) != NSNotFound); [pboard setString:theString forType:NSStringPboardType]; } // ** Make sure we don't enable the copy menu item unless there is something to copy. - (BOOL)validateMenuItem:(id )menuItem { if ([menuItem tag]==666) { return ([theList numberOfSelectedRows]>0); } return YES; } @end wcalc-2.4/._historyManager.c0000644000175000000620000000024711101156624014312 0ustar kkstaffMac OS X  2uATTR  com.apple.TextEncodingMACINTOSH;0wcalc-2.4/historyManager.c0000644000175000000620000000757611101156624014111 0ustar kkstaff/* * historyManager.c * Wcalc * * Created by Kyle Wheeler on Mon Jan 21 2002. * Copyright (c) 2001 Kyle Wheeler. All rights reserved. * */ #include #include #include /* might make readline happy */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "number.h" #include "historyManager.h" #include "calculator.h" #ifdef HAVE_READLINE_HISTORY # if defined(HAVE_READLINE_HISTORY_H) # include # elif defined(HAVE_HISTORY_H) # include # else /* ! defined(HAVE_HISTORY_H) */ extern void add_history(); extern int write_history(); extern int read_history(); # endif /* defined(HAVE_READLINE_HISTORY_H) */ /* no history */ #endif /* HAVE_READLINE_HISTORY */ #ifdef MEMWATCH #include "memwatch.h" #endif /* Configuration Variables */ short allow_duplicates = 0; short recalculate = 0; /* Data Types */ struct entry { char *exp; Number ans; unsigned int calc:1; }; /* Private Variables */ static struct entry *history = NULL; static size_t histlen = 0; /* Private Functions */ static int all_calculated(void); static void clear_calculated(void); void clearHistory() { unsigned int i; for (i = 0; i < histlen; i++) { free(history[i].exp); num_free(history[i].ans); } if (histlen) { free(history); histlen = 0; } } void addToHistory(char *expression, Number answer) { #if defined(HAVE_READLINE_HISTORY) && ! defined(GUI) add_history(expression); #endif if (!histlen) { /* this is the beginning of a new history record */ if (!conf.history_limit || conf.history_limit_len > 0) { history = malloc(sizeof(struct entry)); if (!history) return; history->exp = strdup(expression); if (!history->exp) { free(history); return; } num_init_set(history->ans, answer); histlen = 1; } } else { /* a history exists */ // eliminate duplicates if (allow_duplicates || strcmp(history[histlen - 1].exp, expression)) { if (!conf.history_limit || histlen < conf.history_limit_len) { /* history not too long, just add a new entry */ struct entry *temp = realloc(history, sizeof(struct entry) * (histlen + 1)); if (!temp) { // if it couldn't be realloced, try malloc and memcpy temp = malloc(sizeof(struct entry) * (histlen + 1)); if (!temp) return; memcpy(temp, history, sizeof(struct entry) * histlen); free(history); } history = temp; if (expression) history[histlen].exp = strdup(expression); else history[histlen].exp = NULL; num_init_set(history[histlen].ans, answer); /* why is this if statement here? */ if (!temp[histlen].exp) return; ++histlen; } else { /* history too long */ unsigned long i; if (history[0].exp) free(history[0].exp); for (i = 0; i < histlen - 1; ++i) { history[i].exp = history[i + 1].exp; num_set(history[i].ans, history[i + 1].ans); history[i].calc = history[i + 1].calc; } if (expression) history[histlen - 1].exp = strdup(expression); else history[histlen - 1].exp = NULL; num_set(history[histlen - 1].ans, answer); return; } } } } char *historynum(int step, int col) { if (col == 1) return history[step].exp; else { static char *temp; if (recalculate) { parseme(history[step].exp); num_set(history[step].ans, last_answer); history[step].calc = 1; if (all_calculated()) { recalculate = 0; clear_calculated(); } } temp = print_this_result(history[step].ans); return (temp ? temp : "Not Enough Memory"); } } static int all_calculated(void) { unsigned long i, ret = 0; for (i = 0; i < histlen; ++i) { if (history[i].calc) ++ret; } return (ret == histlen); } static void clear_calculated(void) { unsigned long i; for (i = 0; i < histlen; ++i) { history[i].calc = 0; } } size_t historyLength(void) { return histlen; } wcalc-2.4/historyManager.h0000644000175000000620000000060010650215471014077 0ustar kkstaff/* * historyManager.h * Wcalc * * Created by Kyle Wheeler on Mon Jan 21 2002. * Copyright (c) 2001 Kyle Wheeler. All rights reserved. * */ #ifndef WCALC_HISTORY_MANAGER #include "number.h" void clearHistory(void); void addToHistory(char *, Number); char *historynum(int, int); size_t historyLength(void); extern short allow_duplicates; extern short recalculate; #endif wcalc-2.4/._Info.plist0000644000175000000620000000032511101142237013112 0ustar kkstaffMac OS X  2ATTRS55com.apple.xcode.PlistTypecom.apple.xcode.plist.structure-definition.info-plistwcalc-2.4/Info.plist0000644000175000000620000000262711101142237012704 0ustar kkstaff CFBundleDevelopmentRegion English CFBundleGetInfoString Wcalc Version ${CURRENT_PROJECT_VERSION} CFBundleShortVersionString Wcalc ${CURRENT_PROJECT_VERSION} CFBundleExecutable Wcalc CFBundleIconFile NewWcalc CFBundleIdentifier Wcalc CFBundleInfoDictionaryVersion 6.0 CFBundlePackageType APPL CFBundleSignature Wcal CFBundleVersion ${CURRENT_PROJECT_VERSION} NSMainNibFile MainMenu NSPrincipalClass NSApplication NSServices NSMenuItem default Wcalc Compute NSMessage doWcalcCalculateService NSPortName WcalcService NSReturnTypes NSStringPboardType NSSendTypes NSStringPboardType wcalc-2.4/InspectorController.h0000644000175000000620000000061310401355012015107 0ustar kkstaff/* InspectorController */ #import @interface InspectorController : NSObject { IBOutlet NSPanel *inspectorWindow; IBOutlet NSMenuItem *affectInspectorMenu; IBOutlet NSTableView *variableList; IBOutlet NSTableView *historyList; } - (IBAction)closeIt:(id)sender; - (IBAction)openIt:(id)sender; - (IBAction)toggleIt:(id)sender; - (IBAction)onClose:(id)sender; @end wcalc-2.4/InspectorController.m0000644000175000000620000000222510646776664015154 0ustar kkstaff#import "InspectorController.h" #ifdef MEMWATCH #include "memwatch.h" #endif @implementation InspectorController - (IBAction)closeIt:(id)sender { [inspectorWindow close]; } - (IBAction)openIt:(id)sender { NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults]; [prefs setObject:@"YES" forKey:@"historyShowing"]; [affectInspectorMenu setTitle:@"Hide Inspector"]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onClose:) name:NSWindowWillCloseNotification object:inspectorWindow]; [variableList reloadData]; [historyList reloadData]; [inspectorWindow setBecomesKeyOnlyIfNeeded:YES]; [inspectorWindow orderFront:self]; } - (IBAction)toggleIt:(id)sender { if ([inspectorWindow isVisible]) { [self closeIt:sender]; } else { [self openIt:sender]; } } - (IBAction)onClose:(id)sender { NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults]; [[NSNotificationCenter defaultCenter] removeObserver:self name:NSWindowWillCloseNotification object:inspectorWindow]; [prefs setObject:@"NO" forKey:@"historyShowing"]; [affectInspectorMenu setTitle:@"Show Inspector"]; } @end wcalc-2.4/INSTALL0000644000175000000620000002202407615275751012005 0ustar kkstaffCopyright 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is free documentation; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. Basic 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, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. (Caching is disabled by default to prevent problems with accidental use of stale cache files.) 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 you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You only need `configure.ac' 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. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix *Note Defining Variables::, for more details. 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 support 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' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the `--target=TYPE' option to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc will cause the specified gcc to be used as the C compiler (unless it is overridden in the site shell script). `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of the options to `configure', and exit. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. wcalc-2.4/install-sh0000755000175000000620000001270107615275751012761 0ustar kkstaff#!/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 : fi if [ x"$dir_arg" != x ]; then dst=$src src="" if [ -d $dst ]; then instcmd=: chmodcmd="" else instcmd=$mkdirprog 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" ] || [ -d "$src" ] then : else echo "install: $src does not exist" exit 1 fi if [ x"$dst" = x ] then echo "install: no destination specified" exit 1 else : 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 : 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 : fi pathcomp="${pathcomp}/" done fi if [ x"$dir_arg" != x ] then $doit $instcmd $dst && if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else : ; fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else : ; fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else : ; fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else : ; 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 : 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 :;fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else :;fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else :;fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else :;fi && # Now rename the file to the real destination. $doit $rmcmd -f $dstdir/$dstfile && $doit $mvcmd $dsttmp $dstdir/$dstfile fi && exit 0 wcalc-2.4/iscmd.c0000644000175000000620000000263010725564203012205 0ustar kkstaff#include #include "iscmd.h" #ifdef MEMWATCH #include "memwatch.h" #endif const char *commands[] = { "b", "bin", "binary", "store", "q", "d", "dec", "decimal", "dsep", "e", "eng", "engineering", "cons", "conservative", "h", "hex", "hexadecimal", "x", "help", "hlimit", "ints", "li", "list", "listvars", "o", "oct", "octal", "open", "p", "pre", "prefix", "prefixes", "pref", "prefs", "preferences", "r", "rad", "radians", "rou", "round", "rounding", "re", "remember", "remember_errors", "bits", "save", "tsep", "c", "convert", "conv", "base", "verbose", "explain", "cmod", 0 }; const char *qcommands[] = { "\\b", "\\bin", "\\binary", "\\store", "\\q", "\\d", "\\dec", "\\decimal", "\\dsep", "\\e", "\\eng", "\\engineering", "\\cons", "\\conservative", "\\h", "\\hex", "\\hexadecimal", "\\x", "\\help", "\\hlimit", "\\ints", "\\li", "\\list", "\\listvars", "\\o", "\\oct", "\\octal", "\\open", "\\p", "\\pre", "\\prefix", "\\prefixes", "\\pref", "\\prefs", "\\preferences", "\\r", "\\rad", "\\radians", "\\rou", "\\round", "\\rounding", "\\re", "\\remember", "\\remember_errors", "\\bits", "\\save", "\\tsep", "\\c", "\\convert", "\\conv", "\\base", "\\verbose", "\\explain", "\\cmod", 0 }; int iscmd(const char *str) { size_t i; for (i = 0; commands[i]; i++) { if (strcmp(commands[i], str) == 0) { return 1; } } return 0; } wcalc-2.4/iscmd.h0000664000175000000620000000012110647175471012215 0ustar kkstaff#ifndef WCALC_ISCONST #define WCALC_ISCONST int iscmd(const char *str); #endif wcalc-2.4/isconst.c0000644000175000000620000000574111054337372012577 0ustar kkstaff#include #include #include "isconst.h" #ifdef MEMWATCH #include "memwatch.h" #endif #warning this is all in utf8... should probably use iconv const constdef consts[] = { {W_e,"e"}, {W_pi,"pi"}, {W_pi,"pI"}, {W_pi,"Pi"}, {W_pi,"PI"}, {W_pi,"\317\200"}, {W_random,"random"}, {W_Na,"Na"}, {W_Na,"NA"}, {W_k,"k"}, {W_Cc,"Cc"}, {W_ec,"ec"}, {W_R,"R"}, {W_G,"G"}, {W_g,"g"}, {W_Me,"Me"}, {W_Mp,"Mp"}, {W_Mn,"Mn"}, {W_Md,"Md"}, {W_u,"u"}, {W_u,"amu"}, {W_c,"c"}, {W_h,"h"}, {W_mu0, "mu0"}, {W_mu0, "muzero"}, {W_mu0, "muZERO"}, {W_mu0, "\302\2650"}, {W_mu0, "\302\265zero"}, {W_mu0, "\302\265ZERO"}, {W_mu0, "\316\2740"}, {W_mu0, "\316\274zero"}, {W_mu0, "\316\274ZERO"}, {W_epsilon0, "epsilonzero"}, {W_epsilon0, "epsilonZERO"}, {W_epsilon0, "epsilon0"}, {W_epsilon0, "EPSILONzero"}, {W_epsilon0, "EPSILONZERO"}, {W_epsilon0, "EPSILON0"}, {W_epsilon0, "\316\265zero"}, {W_epsilon0, "\316\265ZERO"}, {W_epsilon0, "\316\2650"}, {W_muB, "\302\265B"}, {W_muB, "\316\274B"}, {W_muB, "muB"}, {W_muN, "\302\265N"}, {W_muN, "\316\274N"}, {W_muN, "muN"}, {W_b, "b"}, {W_a0, "a0"}, {W_F, "F"}, {W_Vm, "Vm"}, {W_Vm, "NAk"}, {W_eV, "eV"}, {W_sigma, "sigma"}, {W_sigma, "\317\203"}, {W_alpha, "alpha"}, {W_alpha, "\316\261"}, {W_gamma, "gamma"}, {W_gamma, "GAMMA"}, {W_gamma, "\316\263"}, {W_re, "re"}, {W_Kj, "Kj"}, {W_Rk, "Rk"}, {W_Rinf, "Rinf"}, {W_Rinf, "R\342\210\236"}, {W_Eh, "Eh"}, {W_Gf, "Gf"}, {W_Mmu, "Mmu"}, {W_Mmu, "M\302\265"}, {W_Mmu, "M\316\274"}, {W_Mt, "Mt"}, {W_Mt, "Mtau"}, {W_Mt, "M\317\204"}, {W_Mh, "Mh"}, {W_Malpha, "Malpha"}, {W_Malpha, "M\316\261"}, {W_n0, "n0"}, {W_n0, "nzero"}, {W_n0, "nZERO"}, {W_c1, "c1"}, {W_c2, "c2"}, {W_G0, "G0"}, {W_G0, "Gzero"}, {W_G0, "GZERO"}, {W_Z0, "Z0"}, {W_Z0, "Zzero"}, {W_Z0, "ZZERO"}, {W_Phi0, "Phi0"}, {W_Phi0, "Phizero"}, {W_Phi0, "PhiZERO"}, {W_Phi0, "\316\2460"}, {W_Phi0, "\316\246zero"}, {W_Phi0, "\316\246ZERO"}, {W_quarter, "\302\274"}, {W_half, "\302\275"}, {W_threequarters, "\302\276"}, {W_K, "K"}, {W_NaN, "@NaN@"}, {W_Inf, "@Inf@"}, {W_notaconstant,0} }; consttype isconst(const char *str) { int i; for (i=0; consts[i].label; i++) { if (strcmp(consts[i].label, str) == 0) { return consts[i].type; } } return W_notaconstant; } void printconsts() { size_t i; size_t linelen = 0; for (i=0; consts[i].label; i++) { if (linelen + strlen(consts[i].label) + 2 > 70) { printf(",\n"); linelen = 0; } if (linelen == 0) { printf("%s", consts[i].label); linelen = strlen(consts[i].label); } else { printf(", %s", consts[i].label); linelen += strlen(consts[i].label) + 2; } } printf("\n"); } wcalc-2.4/isconst.h0000644000175000000620000000121211054336346012571 0ustar kkstaff#ifndef WCALC_ISCONST #define WCALC_ISCONST typedef enum constnames { W_notaconstant, W_e, W_pi, W_random, W_irandom, W_Na, W_k, W_Cc, W_ec, W_R, W_G, W_g, W_Me, W_Mp, W_Mn, W_Md, W_u, W_c, W_h, W_mu0, W_epsilon0, W_muB, W_muN, W_b, W_a0, W_F, W_Vm, W_eV, W_sigma, W_alpha, W_gamma, W_re, W_Kj, W_Rk, W_Rinf, W_Eh, W_Gf, W_Mmu, W_Mt, W_Mh, W_Malpha, W_n0, W_c1, W_c2, W_G0, W_Z0, W_Phi0, W_quarter, W_half, W_threequarters, W_K, W_NaN, W_Inf, } consttype; typedef struct { consttype type; char *label; } constdef; extern const constdef consts[]; consttype isconst(const char *str); void printconsts(); #endif wcalc-2.4/isfunc.c0000644000175000000620000000143310725564203012375 0ustar kkstaff#include #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "isfunc.h" #ifdef MEMWATCH #include "memwatch.h" #endif const char *funcs[] = { "sin", "cos", "tan", "cot", "asin", "acos", "atan", "acot", "arcsin", "arccos", "arctan", "arccot", "sinh", "cosh", "tanh", "coth", "asinh", "acosh", "atanh", "acoth", "areasinh", "areacosh", "areatanh", "areacoth", "log", "logtwo", "ln", "round", "abs", "floor", "ceil", "ceiling", "sqrt", "cbrt", "exp", "fact", "comp", #ifdef HAVE_MPFR_22 "eint","Gamma","gamma","lngamma","lnGamma", #endif "rand", "irand", "zeta","sinc", 0 }; int isfunc(const char *str) { size_t i; for (i = 0; funcs[i]; i++) { if (strcmp(funcs[i], str) == 0) { return 1; } } return 0; } wcalc-2.4/isfunc.h0000664000175000000620000000012010647175560012403 0ustar kkstaff#ifndef WCALC_ISFUNC #define WCALC_ISFUNC int isfunc(const char *str); #endif wcalc-2.4/list.c0000644000175000000620000002377610725564203012077 0ustar kkstaff#include /* for free() */ #include /* for fprintf() */ #include /* for memset() */ #include "list.h" #ifdef MEMWATCH #include "memwatch.h" #endif /* structures for constructing the list */ struct _listheader { struct _listheader *next; void *payload; struct _listheader *pool_next; }; struct _list { struct _listheader *head; struct _listheader *tail; unsigned long len; struct _list *pool_next; struct _list *pool_prev; }; struct _list_iterator { struct _listheader *cur; List l; }; struct cleanup { struct cleanup *next; void *data; }; /*@null@*/ static List lPool = NULL; /*@null@*/ static List lPoolUsed = NULL; static unsigned long long lPoolSize = 0; /* for exponential growth */ /*@null@*/ static struct cleanup *lCleanupPool = NULL; static inline List get_l(void); static void fill_l_pool(void); /*@null@*/ static struct _listheader *lhPool = NULL; static unsigned long long lhPoolSize = 0; /* for exponential growth */ /*@null@*/ static struct cleanup *lhCleanupPool = NULL; static inline struct _listheader * get_lh(void); static void fill_lh_pool(void); static void poolReturn(struct _listheader *lh); /* This sets up the memory pool(s) */ void lists_init() { /*{{{ */ fill_lh_pool(); fill_l_pool(); } /*}}} */ /* This clean up the memory pool(s) */ void lists_cleanup() { /*{{{ */ struct cleanup *freec; struct _listheader *freeme; List freeme2; while (lhCleanupPool != NULL) { freec = lhCleanupPool; freeme = freec->data; lhCleanupPool = lhCleanupPool->next; free(freeme); free(freec); } while (lCleanupPool != NULL) { freec = lCleanupPool; freeme2 = freec->data; lCleanupPool = lCleanupPool->next; free(freeme2); free(freec); } } /*}}} */ /* This returns a struct to the pool */ void poolReturn(struct _listheader *lh) { /*{{{ */ memset(lh, 0, sizeof(struct _listheader)); lh->pool_next = lhPool; lhPool = lh; } /*}}} */ /* This fills the list header memory pool with 1024 items (or doubles the pool * size) */ static void fill_lh_pool() { /*{{{ */ struct _listheader *tlist; struct _listheader *temp; struct cleanup *ch; size_t newobjcount; size_t i; newobjcount = (lhPoolSize == 0) ? 1024 : lhPoolSize; tlist = calloc(newobjcount, sizeof(struct _listheader)); ch = calloc(1, sizeof(struct cleanup)); ch->data = tlist; ch->next = lhCleanupPool; lhCleanupPool = ch; for (i = 0; i < newobjcount; ++i) { temp = &(tlist[i]); temp->pool_next = lhPool; lhPool = temp; } lhPoolSize += newobjcount; } /*}}} */ /* This fills the list item memory pool with 2 items (or doubles the pool * size) */ static void fill_l_pool() { /*{{{ */ size_t i, newobjcount; List temp; List tlist; struct cleanup *ch; newobjcount = (lPoolSize == 0) ? 2 : lPoolSize; tlist = calloc(newobjcount, sizeof(struct _list)); ch = calloc(1, sizeof(struct cleanup)); ch->data = tlist; ch->next = lCleanupPool; lCleanupPool = ch; for (i = 0; i < newobjcount; ++i) { temp = &(tlist[i]); temp->pool_next = lPool; lPool = temp; } lPoolSize += newobjcount; } /*}}} */ /* This frees up the memory allocated by the list */ void freeList(List * lst) { /*{{{ */ List thelist; if (!lst) { return; } thelist = *lst; if (!thelist) { return; } while (thelist->len > 0 && thelist->head != NULL) { struct _listheader *h = thelist->head; thelist->head = h->next; thelist->len--; poolReturn(h); } if (lPoolUsed == thelist) { lPoolUsed = thelist->pool_next; } if (thelist->pool_next) { thelist->pool_next->pool_prev = thelist->pool_prev; } if (thelist->pool_prev) { thelist->pool_prev->pool_next = thelist->pool_next; } thelist->pool_next = lPool; thelist->pool_prev = NULL; lPool = thelist; *lst = NULL; } /*}}} */ /* this fetches a new list header from the pool */ static inline struct _listheader *get_lh() { /*{{{ */ struct _listheader *lh; if (NULL == lhPool) { fill_lh_pool(); } lh = lhPool; lhPool = lh->pool_next; lh->pool_next = NULL; return lh; } /*}}} */ /* this fetches a new list from the pool */ static inline List get_l() { /*{{{ */ List l; if (NULL == lPool) { fill_l_pool(); } l = lPool; lPool = l->pool_next; l->pool_next = lPoolUsed; if (lPoolUsed) { lPoolUsed->pool_prev = l; } lPoolUsed = l; lPoolUsed->pool_prev = NULL; return l; } /*}}} */ /* This adds "addme" to the end of the list */ void addToList(List * lst, void *addme) { /*{{{ */ List list; struct _listheader *pl; pl = get_lh(); pl->payload = addme; pl->next = NULL; if (!lst) { fprintf(stderr, "null list passed\n"); exit(EXIT_FAILURE); } list = *lst; if (!list) { list = *lst = get_l(); list->tail = list->head = pl; list->len = 1; } else { if (list->tail) { list->tail->next = pl; list->tail = pl; list->len++; } else { list->tail = list->head = pl; list->len = 1; } } } /*}}} */ /* This adds "addme" to the head of the list */ void addToListHead(List * lst, void *addme) { /*{{{ */ List list; struct _listheader *pl; pl = get_lh(); pl->payload = addme; pl->next = NULL; if (!lst) { fprintf(stderr, "null list passed\n"); exit(EXIT_FAILURE); } list = *lst; if (!list) { list = *lst = get_l(); list->tail = list->head = pl; list->len = 1; } else { if (list->head) { pl->next = list->head; list->head = pl; list->len++; } else { list->tail = list->head = pl; list->len = 1; } } } /*}}} */ /* This removes the front of the list from the list and returns it */ void *getHeadOfList(List list) { /*{{{ */ void *payload; struct _listheader *pl; if (!list || !list->head) { return NULL; } payload = list->head->payload; pl = list->head; list->head = list->head->next; poolReturn(pl); list->len--; if (list->len == 0) { list->head = list->tail = NULL; } return payload; } /*}}} */ /* This returns the n'th element of the list, as if the list was an array */ void *peekListElement(List list, size_t n) { /*{{{ */ struct _listheader *pl; size_t counter; if (!list || !list->head || list->len <= n) { if (!list) { fprintf(stderr, "peekListElement: null List passed\n"); } return NULL; } pl = list->head; for (counter = 1; counter <= n; counter++) { if (pl->next == NULL) { return NULL; } pl = pl->next; } return pl->payload; } /*}}} */ /* This returns the n'th element of the list, as if the list was an array, * and removes it from the list */ void *getListElement(List list, size_t n) { /*{{{ */ struct _listheader *pl; size_t counter; void *payload = NULL; struct _listheader *returnme; if (!list || !list->head || list->len <= n) { if (!list) { fprintf(stderr, "getListElement: null List passed\n"); } return NULL; } pl = list->head; if (n > 0) { for (counter = 1; counter < n; counter++) { if (pl->next == NULL) { return NULL; } pl = pl->next; } if (pl->next) { payload = pl->next->payload; returnme = pl->next; pl->next = pl->next->next; poolReturn(returnme); } } else { payload = pl->payload; returnme = pl; list->head = pl->next; if (list->tail == returnme) { list->tail = NULL; } } list->len --; return payload; } /*}}} */ /* This returns the head of the list */ inline void *peekAheadInList(List list) { /*{{{ */ if (list && list->head) { return list->head->payload; } return NULL; } /*}}} */ /* This tells you how many items there are in the list */ inline size_t listLen(List list) { /*{{{ */ if (list) { return list->len; } else { return 0; } } /*}}} */ /* This returns a list iterator to a list */ ListIterator getListIterator(List list) { /*{{{ */ ListIterator li; if (!list) { return NULL; } li = malloc(sizeof(struct _list_iterator)); li->cur = list->head; li->l = list; return li; } /*}}} */ /* This returns the value of the current element in the list Iterator */ void *currentListElement(ListIterator li) { /*{{{ */ if (!li || !(li->cur)) { return NULL; } return li->cur->payload; } /*}}} */ /* This iterates a list iterator */ void *nextListElement(ListIterator li) { /*{{{ */ void *payload; if (!li || !(li->cur)) { return NULL; } payload = li->cur->payload; li->cur = li->cur->next; return payload; } /*}}} */ /* This sets the iterator back to the beginning */ void resetListIterator(ListIterator li) { /*{{{ */ if (li) { li->cur = li->l->head; } } /*}}} */ /* This frees up a list iterator */ void freeListIterator(ListIterator li) { /*{{{ */ if (li) { free(li); } } /*}}} */ /* This searches the list for a specific value, and removes it */ void removeFromList(List list, void * item) { struct _listheader *pl; struct _listheader *returnme; if (!list || !list->head) { if (!list) { fprintf(stderr, "getListElement: null List passed\n"); } return; } pl = list->head; if (pl->payload == item) { if (list->head == list->tail) { list->head = list->tail = NULL; list->len = 0; } else { list->len --; list->head = list->head->next; } poolReturn(pl); } else { while (pl->next && pl->next != list->tail) { if (pl->next->payload == item) { break; } if (pl->next->next == NULL) { return; } pl = pl->next; } if (pl->next && pl->next->payload == item) { returnme = pl->next; pl->next = pl->next->next; poolReturn(returnme); } } } wcalc-2.4/list.h0000644000175000000620000000163311012405121012047 0ustar kkstaff/* * * This file is the header of a basic, generic list (well, technically, a * queue) object implementation. * */ #ifndef WCALC_PACKETLIST #define WCALC_PACKETLIST struct _list; typedef struct _list *List; struct _list_iterator; typedef struct _list_iterator *ListIterator; /* this is for the memory pools */ void lists_init(void); void lists_cleanup(void); /* List operations */ void addToList(List *, void *); void addToListHead(List *, void *); void *getHeadOfList(List/*@null@*/); void *peekListElement(List/*@null@*/, size_t); void *getListElement(List, size_t); void *peekAheadInList(List); size_t listLen(List/*@null@*/); void removeFromList(List, void *); void freeList(List *); /* ListIterator operations */ ListIterator getListIterator(List); void *currentListElement(ListIterator); void *nextListElement(ListIterator); void resetListIterator(ListIterator); void freeListIterator(ListIterator); #endif wcalc-2.4/main.c0000644000175000000620000006535511101144362012034 0ustar kkstaff/* Based (very loosely) on Ostermann's headstart for the shell project * Modified by Kyle Wheeler */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #include #include /* for stat() */ #include /* for isdigit and isalpha */ #include #include /* for open() */ #include /* for stroul() and PATH_MAX */ #include "number.h" #ifdef HAVE_LIBREADLINE # if defined(HAVE_READLINE_READLINE_H) # include # elif defined(HAVE_READLINE_H) # include # else /* !defined(HAVE_READLINE_H) */ extern char *readline(); # endif /* !defined(HAVE_READLINE_H) */ /*@null@*/ char *cmdline = NULL; #else /* !defined(HAVE_READLINE_READLINE_H) */ /* no readline */ #endif /* HAVE_LIBREADLINE */ #ifdef HAVE_READLINE_HISTORY # if defined(HAVE_READLINE_HISTORY_H) # include # elif defined(HAVE_HISTORY_H) # include # else /* ! defined(HAVE_HISTORY_H) */ extern void add_history(); extern int write_history(); extern int read_history(); extern int history_truncate_file(char *, int); # endif /* defined(HAVE_READLINE_HISTORY_H) */ /* no history */ #endif /* HAVE_READLINE_HISTORY */ #include "calculator.h" #include "conversion.h" #ifdef HAVE_CONFIG_H /* auto-tool build */ # include "parser.h" #else # include "y.tab.h" #endif #include "variables.h" #include "help.h" #include "files.h" #include "historyManager.h" #include "list.h" #include "isconst.h" #ifdef MEMWATCH #include "memwatch.h" #endif #define TRUEFALSE (! strcmp(value,"yes") || ! strcmp(value,"true") || ! strcmp(value,"1")) #define BIG_STRING 4096 static int read_prefs(char *filename); static int read_preload(char *filename); /* * These are declared here because they're not in any header files. * yyparse() is declared with an empty argument list so that it is * compatible with the generated C code from yacc/bison. * This part is taken from http://www.bgw.org/tutorials/programming/c/lex_yacc/main.c */ extern int yyparse(void); extern int yy_scan_string(const char *); #ifdef HAVE_LIBREADLINE /*@null@*/ static List tc_options = NULL; /*@null@*/ char *tc_generator(const char *text, int state) { /*{{{ */ char *ret = getHeadOfList(tc_options); if (ret) { return ret; } else return NULL; } /*}}} */ /*@null@*/ char *tc_rounding(const char *text, int state) { /*{{{ */ static unsigned int i = 0; char *rounding[] = { "none", "simple", "sig_fig", 0 }; if (state == 0) { i = 0; } while (rounding[i] != NULL) { if (strncmp(text, rounding[i], strlen(text)) == 0) { return strdup(rounding[i++]); } i++; } return NULL; } /*}}} */ /*@null@*/ char *tc_engineering(const char *text, int state) { /*{{{ */ static unsigned int i = 0; char *engineering[] = { "always", "never", "auto", "automatic", 0 }; if (state == 0) { i = 0; } while (engineering[i] != NULL) { if (strncmp(text, engineering[i], strlen(text)) == 0) { return strdup(engineering[i++]); } i++; } return NULL; } /*}}} */ #define COMPLETE(strs) do { \ int compareword = 0; \ int comparechar = 0; \ int textcurs = 0; \ while (strs[compareword] != NULL) { \ if (text[textcurs] == 0) { /* add to the list of possibilities */ \ addToList(&tc_options, strdup(strs[compareword])); \ textcurs = 0; \ comparechar = 0; \ compareword++; \ } else if (text[textcurs] == strs[compareword][comparechar]) { \ textcurs++; \ comparechar++; \ } else { /* not a possibility: next! */ \ textcurs = 0; \ compareword++; \ comparechar = 0; \ } \ } \ } while (0) #define COMPLETE2(strs) do { \ int compareword = 0; \ int comparechar = 0; \ int textcurs = 0; \ while (strs[compareword].label != NULL) { \ if (text[textcurs] == 0) { /* add to the list of possibilities */ \ addToList(&tc_options, strdup(strs[compareword].label)); \ textcurs = 0; \ comparechar = 0; \ compareword++; \ } else if (text[textcurs] == strs[compareword].label[comparechar]) { \ textcurs++; \ comparechar++; \ } else { /* not a possibility: next! */ \ textcurs = 0; \ compareword++; \ comparechar = 0; \ } \ } \ } while (0) char **wcalc_completion(const char *text, int start, int end) { /*{{{ */ /*extern const char *commands[];*/ extern const char *qcommands[]; extern const char *funcs[]; char **variables; char **retvals = NULL; //printf("\ncompleting: %s\n", text); if ('\\' == rl_line_buffer[0]) { if (NULL == strchr(rl_line_buffer, ' ') && NULL == strchr(rl_line_buffer, '\t')) { COMPLETE(qcommands); } else if (strncmp("\\explain", rl_line_buffer, 8) == 0) { int i = 8; while (isspace(rl_line_buffer[i])) ++i; if (i == start) { COMPLETE(qcommands); COMPLETE2(consts); COMPLETE(funcs); variables = listvarnames(); COMPLETE(variables); free(variables); } } else if (strncmp("\\open", rl_line_buffer, 5) == 0 || strncmp("\\save", rl_line_buffer, 5) == 0) { int i = 5; while (isspace(rl_line_buffer[i])) ++i; if (i == start) { retvals = rl_completion_matches(text, rl_filename_completion_function); return retvals; } } else if ((strncmp("\\rou", rl_line_buffer, 4) == 0 && isspace(rl_line_buffer[4])) || (strncmp("\\round", rl_line_buffer, 6) == 0 && isspace(rl_line_buffer[6])) || (strncmp("\\rounding", rl_line_buffer, 9) == 0 && isspace(rl_line_buffer[9]))) { int i = 4; while (!isspace(rl_line_buffer[i])) ++i; while (isspace(rl_line_buffer[i])) ++i; if (i == start) { retvals = rl_completion_matches(text, tc_rounding); return retvals; } } else if ((strncmp("\\e", rl_line_buffer, 2) == 0 && isspace(rl_line_buffer[2])) || (strncmp("\\eng", rl_line_buffer, 4) == 0 && isspace(rl_line_buffer[4])) || (strncmp("\\engineering", rl_line_buffer, 12) == 0 && isspace(rl_line_buffer[12]))) { int i = 2; while (!isspace(rl_line_buffer[i])) ++i; while (isspace(rl_line_buffer[i])) ++i; if (i == start) { retvals = rl_completion_matches(text, tc_engineering); return retvals; } } else if ((strncmp("\\c", rl_line_buffer, 2) == 0 && isspace(rl_line_buffer[2])) || (strncmp("\\conv", rl_line_buffer, 5) == 0 && isspace(rl_line_buffer[5])) || (strncmp("\\convert", rl_line_buffer, 8) == 0 && isspace(rl_line_buffer[8]))) { int i = 2; /*extern const struct conversion lengths[], areas[], volumes[], masses[], speeds[], powers[], forces[], accelerations[];*/ extern const struct conversion *conversions[]; while (!isspace(rl_line_buffer[i])) ++i; while (isspace(rl_line_buffer[i])) ++i; if (i == start) { /* complete on ALL units */ size_t unit, conversion; for (conversion = 0; conversions[conversion]; conversion++) { for (unit = 0; conversions[conversion][unit].name; unit++) { COMPLETE(conversions[conversion][unit].aka); } } } else { /* seek past the previous unit... */ char *unit1 = rl_line_buffer + i; char saved_char; ssize_t unit_cat; while (!isspace(rl_line_buffer[i])) ++i; saved_char = rl_line_buffer[i]; rl_line_buffer[i] = 0; unit_cat = identify_unit(unit1); rl_line_buffer[i] = saved_char; if (unit_cat != -1) { while (isspace(rl_line_buffer[i])) ++i; if (i == start) { size_t unit; /* complete on COMPATABLE units */ for (unit = 0; conversions[unit_cat][unit].name; unit++) { COMPLETE(conversions[unit_cat][unit].aka); } addToList(&tc_options, strdup("to")); } else if (strncmp(rl_line_buffer + i, "to", 2) == 0 && isspace(rl_line_buffer[i + 2])) { i += 2; while (isspace(rl_line_buffer[i])) ++i; if (i == start) { size_t unit; /* complete on COMPATABLE units */ for (unit = 0; conversions[unit_cat][unit].name; unit++) { COMPLETE(conversions[unit_cat][unit].aka); } } } } } } } else { COMPLETE(qcommands); COMPLETE2(consts); COMPLETE(funcs); variables = listvarnames(); COMPLETE(variables); free(variables); } rl_attempted_completion_over = 1; // do not use standard file completion rl_completion_entry_function = tc_generator; retvals = rl_completion_matches(text, tc_generator); return retvals; } /*}}} */ #endif int main(int argc, char *argv[]) { /*{{{ */ extern int yydebug; extern int lines; #ifdef HAVE_LIBREADLINE char *readme = NULL; #else char readme[BIG_STRING]; #endif int tty, i; short cmdline_input = 0; yydebug = 1; /* turn on ugly YACC debugging */ yydebug = 0; /* turn off ugly YACC debugging */ initvar(); lists_init(); /* initialize the preferences */ conf.precision = -1; conf.engineering = automatic; standard_output = 1; conf.picky_variables = 1; conf.print_prefixes = 1; conf.precision_guard = 1; conf.in_thou_delimiter = 0; conf.in_dec_delimiter = 0; conf.thou_delimiter = ','; conf.dec_delimiter = '.'; conf.print_equal = 1; conf.print_ints = 0; conf.print_commas = 0; conf.verbose = 0; conf.c_style_mod = 1; init_numbers(); num_init_set_ui(last_answer, 0); /* load the preferences */ { char filename[PATH_MAX]; int foundflag = 0; /* quick check the commandline for a --defaults argument */ for (i = 1; i < argc; ++i) { if (!strcmp(argv[i], "--defaults")) { foundflag = 1; break; } } if (foundflag == 0) { snprintf(filename, PATH_MAX, "%s/.wcalcrc", getenv("HOME")); if (read_prefs(filename)) { perror("Writing Preferences"); } snprintf(filename, PATH_MAX, "%s/.wcalc_preload", getenv("HOME")); if (read_preload(filename)) { perror("Reading Preload File"); } } } /* Parse commandline options */ for (i = 1; i < argc; ++i) { if (!strncmp(argv[i], "-P", 2)) { long int argnum; char *endptr; argnum = strtol(&(argv[i][2]), &endptr, 0); if (endptr != NULL && (strlen(endptr) > 0)) { fprintf(stderr, "-P option requires a valid integer without spaces.\n"); fflush(stderr); num_free(last_answer); exit(EXIT_FAILURE); } else { conf.precision = (int)argnum; } } else if (!strcmp(argv[i], "-E") || !strcmp(argv[i], "--engineering")) { conf.engineering = always; } else if (!strcmp(argv[i], "-EE")) { conf.engineering = never; } else if (!strcmp(argv[i], "-H") || !strcmp(argv[i], "--help")) { print_command_help(); num_free(last_answer); exit(EXIT_SUCCESS); } else if (!strcmp(argv[i], "-v") || !strcmp(argv[i], "--version")) { printf("wcalc "VERSION"\n"); num_free(last_answer); exit(EXIT_SUCCESS); } else if (!strcmp(argv[i], "-d") || !strcmp(argv[i], "--decimal") || !strcmp(argv[i], "-dec") || !strcmp(argv[i], "--dec")) { conf.output_format = DECIMAL_FORMAT; } else if (!strcmp(argv[i], "-h") || !strcmp(argv[i], "--hexadecimal") || !strcmp(argv[i], "-hex") || !strcmp(argv[i], "--hex")) { conf.output_format = HEXADECIMAL_FORMAT; } else if (!strcmp(argv[i], "-o") || !strcmp(argv[i], "--octal") || !strcmp(argv[i], "-oct") || !strcmp(argv[i], "--oct")) { conf.output_format = OCTAL_FORMAT; } else if (!strcmp(argv[i], "-b") || !strcmp(argv[i], "--binary") || !strcmp(argv[i], "-bin") || !strcmp(argv[i], "--bin")) { conf.output_format = BINARY_FORMAT; } else if (!strcmp(argv[i], "-p") || !strcmp(argv[i], "--prefixes")) { conf.print_prefixes = !conf.print_prefixes; /*} else if (!strcmp(argv[i], "-l") || !strcmp(argv[i], "--lenient")) { * conf.picky_variables = 0; */ } else if (!strcmp(argv[i], "-r") || !strcmp(argv[i], "--radians")) { conf.use_radians = !conf.use_radians; } else if (!strcmp(argv[i], "-q") || !strcmp(argv[i], "--quiet")) { conf.print_equal = !conf.print_equal; } else if (!strcmp(argv[i], "-c") || !strcmp(argv[i], "--conservative")) { conf.precision_guard = !conf.precision_guard; } else if (!strcmp(argv[i], "-R") || !strcmp(argv[i], "--remember")) { conf.remember_errors = !conf.remember_errors; } else if (!strncmp(argv[i], "--round=", 8)) { if (!strcmp(&(argv[i][8]), "no") || !strcmp(&(argv[i][8]), "none")) { conf.rounding_indication = NO_ROUNDING_INDICATION; } else if (!strcmp(&(argv[i][8]), "simple")) { conf.rounding_indication = SIMPLE_ROUNDING_INDICATION; } else if (!strcmp(&(argv[i][8]), "sig_fig")) { conf.rounding_indication = SIG_FIG_ROUNDING_INDICATION; } } else if (!strcmp(argv[i], "--round")) { fprintf(stderr, "--round requires an argument (none|simple|sig_fig)\n"); exit(EXIT_FAILURE); } else if (!strncmp(argv[i], "--idsep=", 7)) { if (strlen(argv[i]) > 8 || strlen(argv[i]) == 7) { fprintf(stderr, "--idsep= must have an argument\n"); exit(EXIT_FAILURE); } if (conf.in_thou_delimiter != argv[i][7] && (conf.in_thou_delimiter != 0 || conf.thou_delimiter != argv[i][7])) { conf.in_dec_delimiter = argv[i][7]; } else { fprintf(stderr, "%c cannot be the decimal separator. It is the thousands separator.\n", argv[i][7]); exit(EXIT_FAILURE); } } else if (!strncmp(argv[i], "--dsep=", 7)) { if (strlen(argv[i]) > 8 || strlen(argv[i]) == 7) { fprintf(stderr, "--dsep= must have an argument\n"); exit(EXIT_FAILURE); } if (conf.thou_delimiter != argv[i][7]) { conf.dec_delimiter = argv[i][7]; } else { fprintf(stderr, "%c cannot be the decimal separator. It is the thousands separator.\n", argv[i][7]); exit(EXIT_FAILURE); } } else if (!strncmp(argv[i], "--itsep=", 7)) { if (strlen(argv[i]) > 8 || strlen(argv[i]) == 7) { fprintf(stderr, "--itsep= must have an argument\n"); exit(EXIT_FAILURE); } if (conf.in_dec_delimiter != argv[i][7] && (conf.in_dec_delimiter != 0 || conf.dec_delimiter != argv[i][7])) { conf.in_thou_delimiter = argv[i][7]; } else { fprintf(stderr, "%c cannot be the thousands separator. It is the decimal separator.\n", argv[i][7]); exit(EXIT_FAILURE); } } else if (!strncmp(argv[i], "--tsep=", 7)) { if (strlen(argv[i]) > 8 || strlen(argv[i]) == 7) { fprintf(stderr, "--tsep= must have an argument\n"); exit(EXIT_FAILURE); } if (conf.dec_delimiter != argv[i][7]) { conf.thou_delimiter = argv[i][7]; } else { fprintf(stderr, "%c cannot be the thousands separator. It is the decimal separator.\n", argv[i][7]); exit(EXIT_FAILURE); } } else if (!strncmp(argv[i], "--bits", 6)) { unsigned long int argnum; char *endptr; argnum = strtoul(&(argv[i][6]), &endptr, 0); if (endptr != NULL && (strlen(endptr) > 0)) { fprintf(stderr, "--bits option requires a valid integer without spaces.\n"); num_free(last_answer); exit(EXIT_FAILURE); } else { if (argnum < NUM_PREC_MIN) { fprintf(stderr,"Minimum precision is %lu.\n", (unsigned long)NUM_PREC_MIN); } else if (argnum > NUM_PREC_MAX) { fprintf(stderr,"Maximum precision is %lu.\n", (unsigned long)NUM_PREC_MAX); } else { num_set_default_prec(argnum); } } } else if (!strcmp(argv[i], "--ints")) { conf.print_ints = !conf.print_ints; } else if (!strcmp(argv[i], "--delim")) { conf.print_commas = !conf.print_commas; } else if (!strcmp(argv[i], "--verbose")) { conf.verbose = !conf.verbose; } else if (!strcmp(argv[i], "--yydebug")) { yydebug = 1; } else if (!strcmp(argv[i], "-n")) { conf.print_equal = 0; } else if (!strcmp(argv[i], "--defaults")) { /* ignore this argument */ } else { extern char *errstring; if (!cmdline_input) { #ifdef HAVE_READLINE_HISTORY char filename[PATH_MAX]; using_history(); snprintf(filename, PATH_MAX, "%s/.wcalc_history", getenv("HOME")); if (read_history(filename)) { if (errno != ENOENT) { perror("Reading History"); } } #endif cmdline_input = 1; } if (conf.verbose) { printf("-> %s\n", argv[i]); } parseme(argv[i]); if (!errstring || (errstring && !strlen(errstring)) || conf.remember_errors) { addToHistory(argv[i], last_answer); } if (errstring && strlen(errstring)) { fprintf(stderr, "%s", errstring); if (errstring[strlen(errstring) - 1] != '\n') fprintf(stderr, "\n"); free(errstring); errstring = NULL; } if (putval("a", last_answer, "previous answer") != 0) { fprintf(stderr, "error storing last answer\n"); } } } if (! cmdline_input) { extern char *errstring; char * envinput = getenv("wcalc_input"); if (envinput) { #ifdef HAVE_READLINE_HISTORY char filename[PATH_MAX]; using_history(); snprintf(filename, PATH_MAX, "%s/.wcalc_history", getenv("HOME")); if (read_history(filename)) { if (errno != ENOENT) { perror("Reading History"); } } #endif cmdline_input = 1; if (conf.verbose) { printf("-> %s\n", envinput); } parseme(envinput); if (!errstring || (errstring && !strlen(errstring)) || conf.remember_errors) { addToHistory(envinput, last_answer); } if (errstring && strlen(errstring)) { fprintf(stderr, "%s", errstring); if (errstring[strlen(errstring) - 1] != '\n') fprintf(stderr, "\n"); free(errstring); errstring = NULL; } if (putval("a", last_answer, "previous answer") != 0) { fprintf(stderr, "error storing last answer\n"); } } } if (cmdline_input) { #ifdef HAVE_READLINE_HISTORY char filename[PATH_MAX]; snprintf(filename, PATH_MAX, "%s/.wcalc_history", getenv("HOME")); if (write_history(filename)) perror("Saving History"); if (conf.history_limit) { if (history_truncate_file(filename, conf.history_limit_len)) perror("Truncating History"); } #endif clearHistory(); cleanupvar(); num_free(last_answer); lists_cleanup(); exit(EXIT_SUCCESS); } tty = isatty(0); /* Find out where stdin is coming from... */ if (tty > 0) { /* if stdin is a keyboard or terminal, then use readline and prompts */ #ifdef HAVE_READLINE_HISTORY char filename[PATH_MAX]; snprintf(filename, PATH_MAX, "%s/.wcalc_history", getenv("HOME")); using_history(); if (read_history(filename)) { if (errno != ENOENT) { perror("Reading History"); } } #endif #ifdef HAVE_LIBREADLINE rl_attempted_completion_function = wcalc_completion; rl_basic_word_break_characters = " \t\n\"\'+-*/[{()}]=<>!|~&^%"; #endif printf ("Enter an expression to evaluate, q to quit, or ? for help:\n"); while (1) { lines = 1; fflush(NULL); #ifdef HAVE_LIBREADLINE readme = readline("-> "); #else { char c; unsigned int i = 0; memset(readme, 0, BIG_STRING); printf("-> "); fflush(stdout); c = fgetc(stdin); while (c != '\n' && i < BIG_STRING && !feof(stdin) && !ferror(stdin)) { readme[i] = c; c = fgetc(stdin); ++i; } if (feof(stdin) || ferror(stdin)) break; } #endif if (!readme) { /* from the readline manpage: * readline returns the text of the line read. A blank * line returns the empty string. If EOF is encountered * while reading a line, and the line is empty, NULL is * returned. If an eof is read with a non-empty line, it * is treated as a newline. * This means: readme == NULL is a perfectly reasonable * response from readline(), AND it means something * significant. DO NOT DO errno PARSING HERE!!!! */ printf("\n"); break; } /* if there is a line */ if (strlen(readme)) { if (!strcmp(readme, "q") || !strcmp(readme, "quit") || !strcmp(readme, "\\q")) { break; } else if (!strncmp(readme, "\\yydebug", 8)) { //addToHistory(readme, 0); yydebug = !yydebug; printf("Debug Mode %s\n", yydebug ? "On" : "Off"); } else { if (conf.verbose) { printf("-> %s\n", readme); } parseme(readme); { extern char *errstring; if (!errstring || (errstring && !strlen(errstring)) || conf.remember_errors) { addToHistory(readme, last_answer); } } } if (putval("a", last_answer, "previous answer") != 0) { fprintf(stderr, "error storing last answer\n"); } { extern char *errstring; if (errstring && strlen(errstring)) { display_and_clear_errstring(); /*rl_stuff_char('f');*/ } } } #ifdef HAVE_LIBREADLINE free(readme); #endif } #ifdef HAVE_READLINE_HISTORY if (write_history(filename)) perror("Saving History"); if (conf.history_limit) { if (history_truncate_file(filename, conf.history_limit_len)) perror("Truncating History"); } #endif } else if (tty < 0) { fprintf(stderr, "Could not determine terminal type.\n"); } else { /* if stdin is ANYTHING ELSE (a pipe, a file, etc), don't prompt */ char *line, gotten; unsigned int linelen = 0, maxlinelen = BIG_STRING; extern int show_line_numbers; show_line_numbers = 1; while (1) { line = calloc(maxlinelen, sizeof(char)); gotten = fgetc(stdin); while (gotten != '\n' && !feof(stdin) && !ferror(stdin)) { line[linelen] = gotten; gotten = fgetc(stdin); linelen++; if (linelen > maxlinelen) { char *temp; temp = realloc(line, (maxlinelen + BIG_STRING) * sizeof(char)); if (!temp) { free(line); fprintf(stderr, "Ran out of memory. Line too long.\n"); exit(EXIT_FAILURE); } memset(temp + maxlinelen, 0, BIG_STRING); maxlinelen += BIG_STRING; line = temp; } } if (ferror(stdin) || (feof(stdin) && linelen == 0)) { free(line); break; } if (conf.verbose) { printf("-> %s\n", line); } parseme(line); if (putval("a", last_answer, "previous answer") != 0) { fprintf(stderr, "error storing last answer\n"); } { extern int errloc; if (errloc != -1) { errloc = -1; display_and_clear_errstring(); /*fprintf(stderr, "%s", errstring); if (errstring[strlen(errstring) - 1] != '\n') fprintf(stderr, "\n"); free(errstring); errstring = NULL;*/ } } free(line); linelen = 0; } } clearHistory(); cleanupvar(); if (pretty_answer) { extern char *pa; free(pretty_answer); if (pa) { free(pa); } } num_free(last_answer); lists_cleanup(); exit(EXIT_SUCCESS); } /*}}} */ static int read_preload(char *filename) { /*{{{ */ struct stat sb; if (-1 == stat(filename, &sb)) { if (errno != ENOENT) { return -1; } else { return 0; } } return loadState(filename, 0); } /*}}} */ static int read_prefs(char *filename) { /*{{{ */ int fd = open(filename, O_RDONLY); char key[BIG_STRING], value[BIG_STRING]; size_t curs = 0; int retval = 1; fd = open(filename, O_RDONLY); if (fd < 0) return 0; retval = 1; while (retval == 1) { char quoted = 0; char junk; memset(value, 0, BIG_STRING); memset(key, 0, BIG_STRING); curs = 0; // read until we find a non-comment while (1 == (retval = read(fd, &(key[curs]), 1))) { // if we find a comment if (key[curs] == '#') { // read until the end of line junk = 0; while (read(fd, &junk, 1) == 1 && junk != '\n') ; } else if (isalpha((int)(key[curs]))) break; } if (retval != 1) break; // read in the key quoted = 1; if (key[curs] != '\'') { curs++; quoted = 0; } while (retval == 1 && curs < BIG_STRING) { retval = read(fd, &(key[curs]), 1); if ((!quoted && isspace((int)(key[curs]))) || (!quoted && key[curs] == '=') || (quoted && key[curs] != '\'')) break; ++curs; } if (retval != 1) break; junk = key[curs]; key[curs] = 0; // eat the equals sign (and any surrounding space) while (retval == 1 && (isspace((int)junk) || junk == '=')) { retval = read(fd, &junk, 1); } if (retval != 1) break; value[0] = junk; // junk now contains the next non-junk character curs = 0; // read in the value quoted = 1; if (value[0] != '\'') { ++curs; quoted = 0; } while (retval == 1 && value[curs-1] && curs < BIG_STRING) { retval = read(fd, &(value[curs]), 1); if ((!quoted && isspace((int)(value[curs]))) || (quoted && value[curs] != '\'')) break; curs++; } value[curs] = 0; if (!strcmp(key, "precision")) conf.precision = atoi(value); else if (!strcmp(key, "show_equals")) conf.print_equal = TRUEFALSE; else if (!strcmp(key, "flag_undeclared")) conf.picky_variables = TRUEFALSE; else if (!strcmp(key, "use_radians")) conf.use_radians = TRUEFALSE; else if (!strcmp(key, "print_prefixes")) conf.print_prefixes = TRUEFALSE; else if (!strcmp(key, "save_errors")) conf.remember_errors = TRUEFALSE; else if (!strcmp(key, "remember_errors")) conf.remember_errors = TRUEFALSE; else if (!strcmp(key, "precision_guard")) conf.precision_guard = TRUEFALSE; else if (!strcmp(key, "print_integers")) conf.print_ints = TRUEFALSE; else if (!strcmp(key, "print_delimiters")) conf.print_commas = TRUEFALSE; else if (!strcmp(key, "input_thousands_delimiter")) conf.in_thou_delimiter = value[0]; else if (!strcmp(key, "input_decimal_delimiter")) conf.in_dec_delimiter = value[0]; else if (!strcmp(key, "thousands_delimiter")) conf.thou_delimiter = value[0]; else if (!strcmp(key, "decimal_delimiter")) conf.dec_delimiter = value[0]; else if (!strcmp(key, "history_limit")) { if (!strcmp(value, "no")) conf.history_limit = conf.history_limit_len = 0; else { conf.history_limit = 1; conf.history_limit_len = strtoul(value, NULL, 0); } } else if (!strcmp(key, "output_format")) { if (!strcmp(value, "decimal")) conf.output_format = DECIMAL_FORMAT; else if (!strcmp(value, "octal")) conf.output_format = OCTAL_FORMAT; else if (!strcmp(value, "binary")) conf.output_format = BINARY_FORMAT; else if (!strcmp(value, "hex") || !strcmp(value, "hexadecimal")) conf.output_format = HEXADECIMAL_FORMAT; } else if (!strcmp(key, "rounding_indication")) { if (!strcmp(value, "no")) conf.rounding_indication = NO_ROUNDING_INDICATION; else if (!strcmp(value, "simple")) conf.rounding_indication = SIMPLE_ROUNDING_INDICATION; else if (!strcmp(value, "sig_fig")) conf.rounding_indication = SIG_FIG_ROUNDING_INDICATION; } else if (!strcmp(key, "engineering")) { if (!strcmp(value,"auto") || !strcmp(value,"automatic") || !strcmp(value,"yes") || !strcmp(value,"true") || !strcmp(value,"1")) { conf.engineering = automatic; } else if (!strcmp(value, "always")) { conf.engineering = always; } else { conf.engineering = never; } } else if (!strcmp(key, "c_style_mod")) { conf.c_style_mod = TRUEFALSE; } else { fprintf(stderr, "Unrecognized key in wcalcrc: %s\n", key); } memset(key, 0, sizeof(key)); memset(value, 0, sizeof(value)); } return 0; } /*}}} */ wcalc-2.4/main.m0000644000175000000620000000146010650210323012030 0ustar kkstaff// // main.m // Wcalc // // Created by Kyle Wheeler on Thu Jan 17 2002. // Copyright (c) 2001 Kyle Wheeler. All rights reserved. // #include #include "calculator.h" /* needed to set standard_output = 0 */ #include "variables.h" /* needed to run variable initialization */ #include "WcalcService.h" /* needed to init the service */ #ifdef MEMWATCH #include "memwatch.h" #endif int main(int argc, const char *argv[]) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; WcalcService* wserv = [[WcalcService alloc] init]; int retval; initvar(); standard_output = 0; NSRegisterServicesProvider(wserv,@"Wcalc"); [NSApp setServicesProvider:wserv]; retval = NSApplicationMain(argc, argv); [pool release]; exit(0); return 0; } wcalc-2.4/Makefile.am0000644000175000000620000000310111074301233012756 0ustar kkstaffSUBDIRS = English.lproj bin_PROGRAMS = wcalc AM_YFLAGS = -d #AM_LFLAGS = -w EXTRA_DIST = WcalcController.h WcalcController.m \ AboutBoxController.h AboutBoxController.m \ ConversionList.h ConversionList.m \ ErrorController.h ErrorController.m \ HistoryList.h HistoryList.m \ InspectorController.h InspectorController.m \ MyTextField.h MyTextField.m \ OldVariableList.h OldVariableList.m \ PersVarList.h PersVarList.m \ VariableList.h VariableList.m \ WcalcService.h WcalcService.m \ theDelegate.h theDelegate.m \ main.m \ simpleCalc.h simpleCalc.c \ Wcalc.xcodeproj/kyle.mode1 \ Wcalc.xcodeproj/kyle.pbxuser \ Wcalc.xcodeproj/project.pbxproj \ Info.plist \ test.errors test.recursion test.simple test.vars \ TheW.icns w.png Wred.png \ wcalc.info wcalc.rc wcalc.spec \ COPYRIGHT INCLUDES = -I$(top_builddir) BUILT_SOURCES = parser.h wcalc_SOURCES = \ number.h calculator.h variables.h help.h files.h conversion.h \ number_formatting.h \ parser.y \ string_manip.h historyManager.h \ definitions.h \ uint32_max.h \ number_formatting.h number_formatting.c \ scanner.l help.c calculator.c string_manip.c historyManager.c \ files.c variables.c conversion.c main.c \ explain.h explain.c \ list.h list.c \ extract_vars.h extract_vars.c \ isconst.h isconst.c \ isfunc.h isfunc.c \ iscmd.h iscmd.c \ add_commas.h add_commas.c \ number.h number.c \ evalvar.h evalvar.c wcalc_LDADD = @LEXLIB@ man_MANS = wcalc.1 EXTRA_DIST += $(man_MANS) clean-local: $(RM) parser.h parser.c scanner.c wcalc-2.4/Makefile.in0000664000175000000620000006552511074306223013017 0ustar kkstaff# Makefile.in generated by automake 1.10.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 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 = wcalc$(EXEEXT) subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \ depcomp install-sh missing mkinstalldirs parser.c parser.h \ scanner.c ylwrap ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(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_HEADER = config.h CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) am_wcalc_OBJECTS = parser.$(OBJEXT) number_formatting.$(OBJEXT) \ scanner.$(OBJEXT) help.$(OBJEXT) calculator.$(OBJEXT) \ string_manip.$(OBJEXT) historyManager.$(OBJEXT) \ files.$(OBJEXT) variables.$(OBJEXT) conversion.$(OBJEXT) \ main.$(OBJEXT) explain.$(OBJEXT) list.$(OBJEXT) \ extract_vars.$(OBJEXT) isconst.$(OBJEXT) isfunc.$(OBJEXT) \ iscmd.$(OBJEXT) add_commas.$(OBJEXT) number.$(OBJEXT) \ evalvar.$(OBJEXT) wcalc_OBJECTS = $(am_wcalc_OBJECTS) wcalc_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 $@ LEXCOMPILE = $(LEX) $(LFLAGS) $(AM_LFLAGS) YLWRAP = $(top_srcdir)/ylwrap YACCCOMPILE = $(YACC) $(YFLAGS) $(AM_YFLAGS) SOURCES = $(wcalc_SOURCES) DIST_SOURCES = $(wcalc_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 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@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ 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@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ YACC = @YACC@ YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_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_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = English.lproj AM_YFLAGS = -d #AM_LFLAGS = -w EXTRA_DIST = WcalcController.h WcalcController.m AboutBoxController.h \ AboutBoxController.m ConversionList.h ConversionList.m \ ErrorController.h ErrorController.m HistoryList.h \ HistoryList.m InspectorController.h InspectorController.m \ MyTextField.h MyTextField.m OldVariableList.h \ OldVariableList.m PersVarList.h PersVarList.m VariableList.h \ VariableList.m WcalcService.h WcalcService.m theDelegate.h \ theDelegate.m main.m simpleCalc.h simpleCalc.c \ Wcalc.xcodeproj/kyle.mode1 Wcalc.xcodeproj/kyle.pbxuser \ Wcalc.xcodeproj/project.pbxproj Info.plist test.errors \ test.recursion test.simple test.vars TheW.icns w.png Wred.png \ wcalc.info wcalc.rc wcalc.spec COPYRIGHT $(man_MANS) INCLUDES = -I$(top_builddir) BUILT_SOURCES = parser.h wcalc_SOURCES = \ number.h calculator.h variables.h help.h files.h conversion.h \ number_formatting.h \ parser.y \ string_manip.h historyManager.h \ definitions.h \ uint32_max.h \ number_formatting.h number_formatting.c \ scanner.l help.c calculator.c string_manip.c historyManager.c \ files.c variables.c conversion.c main.c \ explain.h explain.c \ list.h list.c \ extract_vars.h extract_vars.c \ isconst.h isconst.c \ isfunc.h isfunc.c \ iscmd.h iscmd.c \ add_commas.h add_commas.c \ number.h number.c \ evalvar.h evalvar.c wcalc_LDADD = @LEXLIB@ man_MANS = wcalc.1 all: $(BUILT_SOURCES) config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: .SUFFIXES: .c .l .o .obj .y 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) config.h: stamp-h1 @if test ! -f $@; then \ rm -f stamp-h1; \ $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: $(am__configure_deps) cd $(top_srcdir) && $(AUTOHEADER) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 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) parser.h: parser.c @if test ! -f $@; then \ rm -f parser.c; \ $(MAKE) $(AM_MAKEFLAGS) parser.c; \ else :; fi wcalc$(EXEEXT): $(wcalc_OBJECTS) $(wcalc_DEPENDENCIES) @rm -f wcalc$(EXEEXT) $(LINK) $(wcalc_OBJECTS) $(wcalc_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/add_commas.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/calculator.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/conversion.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evalvar.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/explain.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/extract_vars.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/files.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/help.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/historyManager.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iscmd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isconst.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isfunc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/list.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/number.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/number_formatting.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parser.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scanner.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/string_manip.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/variables.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) '$<'` .l.c: $(am__skiplex) $(SHELL) $(YLWRAP) $< $(LEX_OUTPUT_ROOT).c $@ -- $(LEXCOMPILE) .y.c: $(am__skipyacc) $(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h $*.h y.output $*.output -- $(YACCCOMPILE) 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; nonemtpy = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) 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) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ 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) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$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-lzma: distdir tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma $(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.lzma*) \ unlzma -c $(distdir).tar.lzma | $(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: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-recursive all-am: Makefile $(PROGRAMS) $(MANS) config.h installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: 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." -rm -f parser.c -rm -f parser.h -rm -f scanner.c -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-recursive clean-am: clean-binPROGRAMS clean-generic clean-local mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr 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-binPROGRAMS 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 -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-binPROGRAMS 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-binPROGRAMS \ clean-generic clean-local ctags ctags-recursive dist dist-all \ dist-bzip2 dist-gzip dist-lzma dist-shar dist-tarZ dist-zip \ distcheck distclean distclean-compile distclean-generic \ distclean-hdr distclean-tags distcleancheck distdir \ distuninstallcheck 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-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-compile mostlyclean-generic pdf pdf-am ps ps-am \ tags tags-recursive uninstall uninstall-am \ uninstall-binPROGRAMS uninstall-man uninstall-man1 clean-local: $(RM) parser.h parser.c scanner.c # 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: wcalc-2.4/missing0000755000175000000620000002403607615275751012360 0ustar kkstaff#! /bin/sh # Common stub for a few missing GNU programs while installing. # Copyright (C) 1996, 1997, 1999, 2000, 2002 Free Software Foundation, Inc. # Originally by Fran,cois 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. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi case "$1" in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. 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 --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch]" ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing 0.4 - GNU automake" ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; aclocal*) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case "$f" in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi 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. You can get \`$1Help2man' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison|yacc) echo 1>&2 "\ WARNING: \`$1' 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 ;; help2man) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` fi if [ -f "$file" ]; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit 1 fi ;; makeinfo) if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then # We have makeinfo, but it failed. exit 1 fi 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 ;; tar) shift if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 fi # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case "$firstarg" in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case "$firstarg" in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and 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 wcalc-2.4/mkinstalldirs0000755000175000000620000000341107615275751013561 0ustar kkstaff#! /bin/sh # mkinstalldirs --- make directory hierarchy # Author: Noah Friedman # Created: 1993-05-16 # Public domain errstatus=0 dirmode="" usage="\ Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..." # process command line arguments while test $# -gt 0 ; do case "${1}" in -h | --help | --h* ) # -h for help echo "${usage}" 1>&2; exit 0 ;; -m ) # -m PERM arg shift test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; } dirmode="${1}" shift ;; -- ) shift; break ;; # stop option processing -* ) echo "${usage}" 1>&2; exit 1 ;; # unknown option * ) break ;; # first non-opt arg esac done for file do if test -d "$file"; then shift else break fi done case $# in 0) exit 0 ;; esac case $dirmode in '') if mkdir -p -- . 2>/dev/null; then echo "mkdir -p -- $*" exec mkdir -p -- "$@" fi ;; *) if mkdir -m "$dirmode" -p -- . 2>/dev/null; then echo "mkdir -m $dirmode -p -- $*" exec mkdir -m "$dirmode" -p -- "$@" fi ;; esac 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 else if test ! -z "$dirmode"; then echo "chmod $dirmode $pathcomp" lasterr="" chmod "$dirmode" "$pathcomp" || lasterr=$? if test ! -z "$lasterr"; then errstatus=$lasterr fi fi fi fi pathcomp="$pathcomp/" done done exit $errstatus # Local Variables: # mode: shell-script # sh-indentation: 3 # End: # mkinstalldirs ends here wcalc-2.4/MyTextField.h0000644000175000000620000000071710570430123013304 0ustar kkstaff/* MyTextField */ #include #include "WcalcController.h" #include "number.h" @interface MyTextField : NSTextField { IBOutlet WcalcController *mainController; IBOutlet NSTextField *AnswerField; /* "Simple Calculator" Variables */ char lastchar; char oper; Number cur_number; Number prev_number; } - (void)keyDown:(NSEvent*) theEvent; - (void)keyUp:(NSEvent*) theEvent; - (BOOL) acceptsFirstResponder; - (BOOL) refusesFirstResponder; @end wcalc-2.4/MyTextField.m0000644000175000000620000000626310663350172013323 0ustar kkstaff#include "MyTextField.h" #include "calculator.h" #include "variables.h" #include "simpleCalc.h" #ifdef MEMWATCH #include "memwatch.h" #endif @implementation MyTextField - (void)keyDown:(NSEvent*) theEvent { printf("mtf keydown\n"); fflush(NULL); } - (void)keyUp:(NSEvent*) theEvent { static char * ret = NULL; int keycode = [theEvent keyCode]; //printf("mtf keyup\n"); fflush(NULL); if (! conf.simple_calc) { //printf("not simple_calc\n"); switch (keycode) { case 71: // the clear button [self setStringValue:@""]; //[self selectText:self]; break; case 81: // = // case 24: { char * temp; extern NSButton *e; extern NSTextField *ef; temp = strdup([[ef stringValue] UTF8String]); while (strlen(temp) && temp[strlen(temp)-1]=='=') { temp[strlen(temp)-1] = '\0'; } [ef setStringValue:[NSString stringWithUTF8String:temp]]; if (temp) free(temp); [e performClick:self]; break; } case 123: // leftarrow case 124: // rightarrow case 126: // uparrow case 125: // downarrow break; default: // printf("keyup %i => ", keycode); // fflush(NULL); // printf("%s\n", [[theEvent characters] UTF8String]); break; } } else { //printf("here, keycode: %i\n", keycode); switch(keycode) { case 123: // leftarrow case 124: // rightarrow case 126: // uparrow case 125: // downarrow break; case 71: if (! [[self stringValue] isEqualToString:@"0"]) { [self setStringValue:@"0"]; [self selectText:self]; simpleClearEntry(); } else if (! [[AnswerField stringValue] isEqualToString:@"0"]) { [AnswerField setStringValue:@"0"]; [self selectText:self]; simpleClearAll(); } break; case 76: // enter { char *expr = strdup([[self stringValue] UTF8String]); ret = simpleCalc('=', expr); if (ret) { [self setStringValue:[NSString stringWithUTF8String:ret]]; } else { [mainController displayAnswer]; [self setStringValue:[AnswerField stringValue]]; ret = strdup([[AnswerField stringValue] UTF8String]); } free(expr); break; } case 117: // delete case 51: // backspace if (! [[self stringValue] isEqualToString:@"0"]) { [self setStringValue:@"0"]; [self selectText:self]; simpleClearEntry(); } else { [AnswerField setStringValue:@"0"]; [self selectText:self]; simpleClearAll(); } if (ret) { free(ret); } ret = strdup("0"); break; default: { char thechar = [[theEvent characters] characterAtIndex:0]; char * expr; unsigned len = [[self stringValue] length]; if (ret) { expr = ret; } else { expr = strdup([[[self stringValue] substringToIndex:len-1] UTF8String]); } ret = simpleCalc(thechar,expr); if (ret) { [self setStringValue:[NSString stringWithUTF8String:ret]]; } else { [mainController displayAnswer]; [self setStringValue:[AnswerField stringValue]]; ret = strdup([[AnswerField stringValue] UTF8String]); } free(expr); break; } } } } - (BOOL) acceptsFirstResponder { return YES; } - (BOOL) refusesFirstResponder { return NO; } @end wcalc-2.4/._NEWS0000644000175000000620000000024711101147451011647 0ustar kkstaffMac OS X  2uATTR  com.apple.TextEncodingMACINTOSH;0wcalc-2.4/NEWS0000644000175000000620000004131211101147451011430 0ustar kkstaff--- Version 2.4 --- Oct 25 2008 - Kyle Wheeler - Allow alternate input internationalization characters (BOTH) - Use the OSX 10.4+ method of fetching internationalization settings (GUI) - Fixed display if thousands/grouping separator is unset (BOTH) - Made binary operations use a more intuitive rounding mode (BOTH) Oct 10 2008 - Kyle Wheeler - Fixed a potential crash (CLI) - Made bit-shifts behave a bit more intuitively for C programmers (BOTH) Aug 24 2008 - Kyle Wheeler - Improved documentation of features (CLI) Jun 24 2008 - Kyle Wheeler - Corrected engineering flag behavior (CLI) Jun 17 2008 - Kyle Wheeler - Output localization more reliable (BOTH) May 13 2008 - Kyle Wheeler - Corrected isinf/isnan behavior on some platforms (CLI) - Improved Solaris compatibility (CLI) Mar 30 2008 - Kyle Wheeler - Made preference file parsing more tolerant (CLI) Feb 20 2008 - Kyle Wheeler - Made command explanations more tolerant of typos (BOTH) - Expanded tab-completion (CLI) Feb 17 2008 - Kyle Wheeler - Improved readline history detection (CLI) Feb 12 2008 - Kyle Wheeler - Fixed the backwards compatibility logic (GUI) --- Version 2.3.1 --- Feb 08 2008 - Kyle Wheeler - Make engineering notation a three-way toggle (BOTH) - Accept input from a "wcalc_input" environment variable (CLI) Feb 04 2008 - Kyle Wheeler - Make engineering configuration more reliable (CLI) Dec 05 2007 - Kyle Wheeler - Accept @NaN@ and @Inf@ as input, fixes some compound operations (BOTH) Aug 24 2007 - Kyle Wheeler - Add documentation for sinc and exp functions (CLI) Aug 23 2007 - Kyle Wheeler - Sync preferences to disk more predictably (GUI) Aug 22 2007 - Kyle Wheeler - Fix display glitches when auto-resizing (GUI) - Add max-precision preference (GUI) - Overhaul simpleCalc form, remove crashes, make more robust (GUI) Aug 14 2007 - Kyle Wheeler - Fixed FORTRAN-style syntax errors (BOTH) Aug 02 2007 - Kyle Wheeler - Updated licensing to be GPLv2+ compatible (BOTH) --- Version 2.3 --- Jul 20 2007 - Kyle Wheeler - Added Wcalc Service to the Service menu (GUI) - Compiled as a Universal Binary (BOTH) - Lots of cleanup (BOTH) Jul 16 2007 - Kyle Wheeler - Fixed the inspector-window-quits-program bug (GUI) - Added angle and pressure conversions (BOTH) - Fixed the insufficient variable precision bug (BOTH) - Many number formatting fixes (BOTH) Jul 11 2007 - Kyle Wheeler - Improved \prefs listing (CLI) Jul 10 2007 - Kyle Wheeler - Avoid unexploitable buffer overflow in number formatting (BOTH) Apr 05 2007 - Kyle Wheeler - Bohr title corrected (BOTH) - kph synonyms added (BOTH) Dec 28 2006 - Kyle Wheeler - Better error reporting (CLI) Dec 26 2006 - Kyle Wheeler - Added tab-completion (CLI) - Made conversion more forgiving (CLI) --- Version 2.2.2 --- Jul 09 2006 - Kyle Wheeler - Added live precision toggle (GUI) - Added modulus style preferences (BOTH) - Improved preferences versioning (GUI) - Eliminated negative zeros (BOTH) - Improved commandline help (CLI) - Plugged several small memory leaks (BOTH) - Put a mutex around the precision slider update (GUI) Apr 21 2006 - Kyle Wheeler - Better readline history detection (CLI) Mar 20 2006 - Kyle Wheeler - Made modulus operator (%) efficient (BOTH) Mar 09 2006 - Kyle Wheeler - Improved exponent handling for hex numbers (BOTH) - Fixed the negative exponent bug (BOTH) Mar 02 2006 - Kyle Wheeler - Improved several UI inconsistencies (GUI) Mar 01 2006 - Kyle Wheeler - Added ability to copy from history/variable list (GUI) --- Version 2.2.1 --- Mar 01 2006 - Kyle Wheeler - Fixed crash if you open the Persistent Variables window and immediately close it (GUI) --- Version 2.2 --- Feb 28 2006 - Kyle Wheeler - Added sinc (BOTH) - Added documentation of Gamma, lnGamma, zeta, K, and sinc (CLI) - Added persistent variables (GUI) Feb 27 2006 - Kyle Wheeler - Non-base ten decimals no longer infinitely long (BOTH) Feb 26 2006 - Kyle Wheeler - Added internal bitcount control to GUI (GUI) - MPFR version compatibility (CLI) Feb 23 2006 - Kyle Wheeler - Implemented ~ as binary not (BOTH) Feb 21 2006 - Kyle Wheeler - Units may be plural (CLI) - Corrected unit names (BOTH) Feb 15 2006 - Kyle Wheeler - Corrected several memory use errors and potential crashes (BOTH) - Corrected lost errors (CLI) - Added Gamma, lnGamma, sinc, and zeta functions (BOTH) - added catalan (K) and enhanced the Euler constant (BOTH) Feb 14 2006 - Kyle Wheeler - Much more extensive documentation (CLI) - Added the ability to print numbers with separators (BOTH) Feb 13 2006 - Kyle Wheeler - Corrected behavior for systems without READLINE_HISTORY (CLI) - Corrected precision_guard test (BOTH) - Corrected significant figure counting (BOTH) Jan 19 2006 - Kyle Wheeler - Corrected the print_integers preference (CLI) Dec 10 2006 - Kyle Wheeler - Better portability (CLI) - Added a \explain command (CLI) - Added a \store command (CLI) - Faster recursion detection (BOTH) - No longer confuses equivalence testing with assignment (BOTH) - Corrected some minor usability bugs (GUI) - Corrected \save behavior (BOTH) --- Version 2.1.2 --- Dec 01 2005 - Kyle Wheeler - Fixed the resize behavior once and for all with a separate inspector (GUI) Nov 10 2005 - Kyle Wheeler - Fix the menu display of arcsinh to be areasinh (GUI) Nov 08 2005 - Kyle Wheeler - Variables should be quoted when read in from files (BOTH) Nov 07 2005 - Kyle Wheeler - Connected drawers to main window again (GUI) --- Version 2.1.1 --- Nov 05 2005 - Kyle Wheeler - Corrected UTF-8 parsing (thanks Marco Thill!) (BOTH) - Corrected areasinh function names (thanks Marco Thill!) (BOTH) - Compatibility with locales without thousands separators (thanks Marco Thill!) (GUI) - Fixed repeat calculations bug (GUI) - Fixed error reporting (GUI) Nov 02 2005 - Kyle Wheeler - Fix possible double-free (BOTH) - Fix logic errors in variable handling: variables where one is the prefix of another will not be confused (BOTH) - Correct unabbreviated integer output for big numbers (BOTH) --- Version 2.1 --- Nov 01 2005 - Kyle Wheeler - Make UTF-8 compatable (BOTH) - Added Phi0 (magnetic flux quantum) (BOTH) - Made gamma more accurate (BOTH) Oct 27 2005 - Kyle Wheeler - Fix bug in storing variables when there's only one variable (BOTH) - Added verbose command (CLI) Oct 26 2005 - Kyle Wheeler - Fixed up autoconf/automake for Debian (CLI) - Updated man page (CLI) - Removed potential buffer overflow in variable name (BOTH) Oct 02 2005 - Kyle Wheeler - Corrected man page bug (thanks Daniele Sempione!) (CLI) Aug 30 2005 - Kyle Wheeler - Fix memory-leaks (BOTH) --- Version 2.0 --- Aug 28 2005 - Kyle Wheeler - Answer field expands to reveal the entire answer, if necessary (GUI) - Fixed the bizarre resizing behavior, finally! (GUI) - Can display much more precision now (GUI) Jul 19 2005 - Kyle Wheeler - Added a binary xor operator (BOTH) - Added a comp(x) function that returns the one's compliment (BOTH) - Can convert units from the command-line now (CLI) - Improved the man page and online help (CLI) - Reorganized the conversion units, to be easier to use (GUI) - Many more scientific symbols, in standardized units now (BOTH) Jul 18 2005 - Kyle Wheeler - Significant-figure rounding indication is more reliable now (BOTH) - Added support for the \bits command for arbitrary precision (BOTH) - \prefs display is more useful (CLI) - ~/.wcalcrc parsing works now (CLI) - Receiving an EOF will now *never* cause an ugly error message (CLI) Jun 10 2005 - Kyle Wheeler - Selecting the Planck constant from the menu produces the correct symbol (GUI) - Fixed the reduce/reduce conflicts in the parser (BOTH) --- Version 1.7 --- Jan 04 2004 - Kyle Wheeler - Compiling tweaks for Solaris Dec 29 2003 - Kyle Wheeler - Added a "simple" calculator feature (GUI) - Updated autoconf/automake (CLI) - Committed old fix for bad variable substitution (BOTH) - Misc bug fixes (BOTH) - Accepts numbers of the form "5." without the quotes (BOTH) Dec 25 2003 - Kyle Wheeler - More informative math errors. (BOTH) - Code cleanup (BOTH) Sep 30 2003 - Kyle Wheeler - Fixed file loading (CLI) Aug 25 2003 - Kyle Wheeler - Fixed error stickyness. Thanks Ingo van Lil! (CLI) - Cleaned up variable recursion detection. Thanks Ingo! (BOTH) --- Version 1.6.2 --- Aug 21 2003 - Kyle Wheeler - Fixed the print integers preference (GUI) - Fixed the recursion detection, so symbols should work again (BOTH) - Fixed incorrect output on some errors (CLI) - Fixed a crash in Linux when errors are reported (CLI) --- Version 1.6.1 --- Aug 19 2003 - Kyle Wheeler - Avoid command/variable conflicts (BOTH) Aug 18 2003 - Kyle Wheeler - Fixed repeatable crash on Linux (CLI) - Fixed recursion detection (BOTH) Aug 17 2003 - Kyle Wheeler - Fixed small, one time, memory leak (CLI) Aug 09 2003 - Kyle Wheeler - Added irandom, rand(), and irand() (BOTH) Jul 12 2003 - Kyle Wheeler - Added bitwise operators & and | and ~ (BOTH) Apr 19 2003 - Kyle Wheeler - Fix some flatten problems (BOTH) - Compilation fixes (Solaris) Mar 25 2003 - Kyle Wheeler - Made "always print integers" a preference (BOTH) - Compilation fixes (Linux) Mar 24 2003 - Kyle Wheeler - Added cot to the menus (GUI) - Fixed log2 silliness (BOTH) --- Version 1.6 --- Mar 22 2003 - Kyle Wheeler - Errors now beep. (GUI) - Added open/save/saveAs to create/load script files. (BOTH) Mar 20 2003 - Thomas Steinhausen - Fixed decimal key display in non-USA countries (GUI) Mar 19 2003 - Kyle Wheeler - Added recursion detection. (BOTH) Feb 28 2003 - Kyle Wheeler - Fixed the arc- trig functions in degree mode. (BOTH) - Made readline respect the history length preference. (CLI) - Added rounding indication to the CLI. (CLI) - Added rounding indication command. (BOTH) Feb 24 2003 - Kyle Wheeler - If it's just an integer, print the whole thing (BOTH) - Added support for persistent preferences in ~/.wcalcrc (CLI) Feb 21 2003 - Kyle Wheeler - Added cot acot coth acoth and reformatted a little (BOTH) Feb 19 2003 - Kyle Wheeler - Added some display functions for variables and prefs (CLI) - Finally fixed the bizarre window behavior (GUI) --- Version 1.5.2.1 --- Feb 02 2003 - Kyle Wheeler - Fixed the ^D bug when compiled without readline (CLI) Jan 29 2003 - Kyle Wheeler - Uses more standard rpm macros (CLI) --- Version 1.5.2 --- Jan 27 2003 - Kyle Wheeler - Modified to use automake/autoconf (CLI) Jan 23 2003 - Kyle Wheeler - Fixed the internationalization stuff (BOTH). - Added history length limiting. Jan 17 2003 - Kyle Wheeler - Added clearing functions for History and Variables (BOTH) Jan 16 2003 - Kyle Wheeler - Alphabetized conversion listings (GUI) - Fixed sticky error messages (BOTH) Dec 18 2002 - Kyle Wheeler - Added the log2 command (BOTH). Nov 01 2002 - Kyle Wheeler - Fixed a crasher in error reporting (BOTH). --- Version 1.5.1 --- Oct 20 2002 - Kyle Wheeler - Added an option to avoid precision pitfalls (BOTH). - Recompiled for Jaguar (BOTH). Oct 03 2002 - Kyle Wheeler - Lists variables in command-line mode (CLI) Sep 08 2002 - Kyle Wheeler - Another way to tell it "hex" (BOTH) - Fixed the division thing (GUI) --- Version 1.5 --- Aug 08 2002 - Kyle Wheeler - Added conversions (GUI) Jul 31 2002 - Kyle Wheeler - Added support for comments (#, //, /* */) (BOTH) - Supports "active" variables (BOTH) Jul 30 2002 - Kyle Wheeler - Prints prefixes (0x, etc) by default. (CLI) Jul 29 2002 - Kyle Wheeler - Added left and right bitshift operations (BOTH) May 21 2002 - Kyle Wheeler - '=' and 'clear' work when you press the keys (GUI) Apr 12 2002 - Kyle Wheeler - Pre-process input to solve comma/period problem (BOTH) - Specify separators on the fly in the command-line (CLI) Apr 10 2002 - Kyle Wheeler - Added a preference to ignore erroneous expressions (GUI) Mar 28 2002 - Kyle Wheeler - Saves drawer states (GUI) --- Version 1.4.5 --- Mar 07 2002 - Kyle Wheeler - Added cube root (cbrt) (BOTH) - Added rounding indicator (GUI) - Added square function (BOTH) Mar 04 2002 - Kyle Wheeler - Added a base-drawer (GUI) Mar 02 2002 - Kyle Wheeler - Fixed the live preference display (GUI) - Fixed the menu's response to the drawer state (GUI) - Made the preference Panel Modeless (GUI) - Implemented strict_syntax preference (BOTH) Mar 01 2002 - Kyle Wheeler - Removed all but one reserved variable (CLI) - Period button becomes a comma button depending on comma preference (GUI) - Added confusing-number garbage collector (BOTH) - Moved commands to parser for GUI and piped file support (BOTH) - Fixed division symbol & continuous expressions (GUI) - Full international comma support (BOTH) - CLI doesn't ignore some errors anymore (CLI) - Fixed crasher in precision output (BOTH) Feb 28 2002 - Kyle Wheeler - Added CLI variable parsing strictness toggle (CLI) - Added sqrt, ceil, and floor functions (BOTH) - Fixed binary output (BOTH) - Fixed crasher in comma output (BOTH) Feb 27 2002 - Kyle Wheeler - Fixed the comma parsing (BOTH) --- Version 1.4.4 --- Feb 27 2002 - Kyle Wheeler - Fixed clamping errors (BOTH) --- Version 1.4.3 --- Feb 26 2002 - Kyle Wheeler - Added a preference to output numbers with a comma (BOTH) - Added error reporting to the commandline (CLI) - Fixed a rounding error (BOTH) Feb 24 2002 - Kyle Wheeler - Fixed the scanner (0.9 now means 0.9 and not 0 * .9) (BOTH) - History redisplay is configurable now (GUI) --- Version 1.4.2 --- Feb 20 2002 - Kyle Wheeler - Fixed the editing-after-pressing-a-button error (I'm an idiot) (GUI) - Fixed the window-position saving routines (GUI) - The problem with window sizing has gotten *worse* since updating OS X (GUI) Feb 12 2002 - Kyle Wheeler - Accepts commas as period replacements (BOTH) --- Version 1.4.1 --- Feb 10 2002 - Kyle Wheeler - Added output commands to the GUI too (GUI) - Fixed debug output in the CLI (CLI) - Compiled everything statically - no more library problems! (BOTH) - Supports real division symbol () (BOTH) - Random is now truly random, if the system supports it - relies on /dev/random (BOTH) --- Version 1.4 --- Feb 6 2002 - Kyle Wheeler - Saves the history (max of 1000 lines - should this be configurable?) (CLI) - New commands in the CLI - (most) old ones will disappear next version (CLI) - Supports hex (0x), octal (0), and binary (0b) input and output (BOTH) - Cleared out some pointless error messages (CLI) - Improved factorials (BOTH) - Miscellaneous Bugfixes (BOTH) - Tried to fix a window drifting problem (GUI) Feb 4 2002 - Kyle Wheeler - Added a "Result" column to the history (GUI) --- Version 1.3 --- Feb 3 2002 - Kyle Wheeler - More improvements to the parser (BOTH) - Added LOTS of constants (BOTH) Feb 2 2002 - Kyle Wheeler - Added menus for functions and symbols (GUI) - Added absolute value "abs()" (BOTH) - Added a bunch of physical constants to the symbols (BOTH) - Saves toggled status (GUI) Jan 30 2002 - Kyle Wheeler - Added the ability to toggle the presence of the keypad (GUI) --- Version 1.2 --- Jan 29 2002 - Kyle Wheeler - Fixed the grammar again (BOTH) - Began work on continuous calculations (GUI) Jan 28 2002 - Kyle Wheeler - Fixed a typo in the grammar (BOTH) - Added a command-equivalent to the preferences window (GUI) - Added the version number to the about box (GUI) - Corrected the version number display Jan 26 2002 - Kyle Wheeler - Fixed the grammar (MUCH better now) (BOTH) Jan 25 2002 - Kyle Wheeler - Added checks to catch values with too much precision (BOTH) - Precision slider won't go too far anymore (GUI) - Remembers the window position (GUI) - Quits when the window is closed (GUI) - Saves Preferences! (GUI) - Expanded the vocabulary (asin,arcsin,sin^-1) (BOTH) Jan 24 2002 - Kyle Wheeler - Added a preference to toggle using Radians (GUI) - Made the history font smaller (GUI) - Fixed a crasher in the history list. (GUI) - Can now do floating point mods (BOTH) - "random" means a random value (BOTH) - added round() to round a value to the nearest value (BOTH) Jan 21 2002 - Kyle Wheeler - Rewrote the Variable management - now it's simpler, slower, more useful (BOTH) - Variable GUI list is functioning! - History list selection now replaces the current expression - Pickiness about undefined variables is configurable (GUI-only) - Made it approximately the size of Apple's calculator - Prefs are their own window now - Logging duplicates in the history is configurable (GUI-only). - Need to redo commands in command-line version (perhaps \q to quit, \dups for history dups... eh?) - Fixed the boolean thing - now both !4 and 4! work (!4 = 0, 4! = 24, !0 = 1) - Discovered that 9+-9 doesn't work... dunno how to fix. I'll think about it. (is this critical?) Jan 20 2002 - Kyle Wheeler - Fixed the factorial parsing (non-elegant solution) - Added GUI Engineering Notation toggle (template for future preferences, if any) - Decided I have to rewrite the variable storage mechanism to get the GUI list working. :( - Need to save prefs somehow... wcalc-2.4/number.c0000644000175000000620000003263511100245104012366 0ustar kkstaff#include "number.h" #include "calculator.h" #include /* for gettimeofday() */ #include /* for perror() */ #include /* for strlen() */ #include /* for atexit() */ #ifdef HAVE_LIBMPFR gmp_randstate_t randstate; #endif void numbers_cleanup(void) { #ifdef HAVE_LIBMPFR mpfr_free_cache(); #endif } void init_numbers(void) { #ifdef HAVE_LIBMPFR struct timeval tp; /* seed the random number generator */ if (gettimeofday(&tp, NULL) != 0) { perror("gettimeofday"); exit(EXIT_FAILURE); } gmp_randinit_default(randstate); gmp_randseed_ui(randstate, (unsigned long)(tp.tv_usec)); mpfr_set_default_prec(1024); #else srandom(time(NULL)); #endif atexit(numbers_cleanup); } int is_int(const Number potential_int) { Number temp; int ret; num_init(temp); num_trunc(temp, potential_int); ret = num_is_equal(temp, potential_int); num_free(temp); return ret; } #ifndef HAVE_LIBMPFR #include #include /* for HUGE_VAL, according to C89 */ void num_init(Number n) { n->nan = 1; } void num_init_set(Number n1, const Number n2) { num_init(n1); memcpy(n1, n2, sizeof(struct numberstruct)); } void num_init_set_d(Number n, const double d) { num_init(n); n->value = d; n->nan = 0; } void num_init_set_ui(Number n, const unsigned int ui) { num_init(n); n->value = (double)ui; n->nan = 0; } int num_init_set_str(Number n, const char * str, const int base) { num_init(n); return num_set_str(n, str, base); } void num_set(Number n1, const Number n2) { memcpy(n1, n2, sizeof(struct numberstruct)); } void num_set_d(Number n, const double d) { n->value = d; n->nan = 0; } void num_set_ui(Number n, const unsigned int ui) { n->value = (double)ui; n->nan = 0; } int num_set_str(Number n, const char * str, const int base) { char * endptr; Dprintf("base = %i, %c%c\n", base, str[0], str[1]); errno = 0; n->value = strtod(str, &endptr); if (endptr == str) { return -1; } if (errno == ERANGE && (n->value == HUGE_VAL || n->value == 0.0)) { n->nan = 1; return -1; } n->nan = 0; return 0; } void num_set_nan(Number n) { n->value = 0.0; n->nan = 1; } void num_mul(Number ret, const Number n1, const Number n2) { if (n1->nan == 0 && n2->nan == 0) { num_set_d(ret, n1->value * n2->value); } else { num_set_nan(ret); } } void num_mul_si(Number ret, const Number n, const int si) { if (n->nan == 0) { num_set_d(ret, n->value * si); } else { num_set_nan(ret); } } void num_mul_ui(Number ret, const Number n, const unsigned int ui) { if (n->nan == 0) { num_set_d(ret, n->value * ui); } else { num_set_nan(ret); } } void num_sqr(Number ret, const Number n) { num_mul(ret, n, n); } void num_sqrt(Number ret, const Number n) { if (n->nan == 0 && n->value >= 0.0) { num_set_d(ret, sqrt(n->value)); } else { num_set_nan(ret); } } void num_cbrt(Number ret, const Number n) { if (n->nan == 0) { num_set_d(ret, cbrt(n->value)); } else { num_set_nan(ret); } } void num_pow(Number ret, const Number n, const Number exp) { if (n->nan == 0 && exp->nan == 0) { errno = 0; num_set_d(ret, pow(n->value, exp->value)); if (errno == EDOM) { num_set_nan(ret); } } else { num_set_nan(ret); } } void num_pow_si(Number ret, const Number n, const int exp) { if (n->nan == 0) { errno = 0; num_set_d(ret, pow(n->value, exp)); if (errno == EDOM) { num_set_nan(ret); } } else { num_set_nan(ret); } } void num_exp(Number ret, const Number n) { if (n->nan == 0) { num_set_d(ret, exp(n->value)); } else { num_set_nan(ret); } } void num_factorial(Number ret, unsigned int n) { ret->value = (double)n; n--; while (n > 1 && ret->value < DBL_MAX) { ret->value *= n; n--; } if (ret->value < DBL_MAX) { ret->nan = 0; } else { num_set_nan(ret); } } void num_log10(Number ret, const Number n) { if (n->nan == 0 && n->value > 0.0) { num_set_d(ret, log10(n->value)); } else { num_set_nan(ret); } } void num_log2(Number ret, const Number n) { if (n->nan == 0 && n->value > 0.0) { num_set_d(ret, log10(n->value)/log10(2.0)); } else { num_set_nan(ret); } } void num_log(Number ret, const Number n) { if (n->nan == 0 && n->value > 0.0) { num_set_d(ret, log(n->value)); } else { num_set_nan(ret); } } void num_sin(Number ret, const Number n) { if (n->nan == 0) { num_set_d(ret, sin(n->value)); } else { num_set_nan(ret); } } void num_cos(Number ret, const Number n) { if (n->nan == 0) { num_set_d(ret, cos(n->value)); } else { num_set_nan(ret); } } void num_tan(Number ret, const Number n) { if (n->nan == 0) { num_set_d(ret, tan(n->value)); } else { num_set_nan(ret); } } void num_asin(Number ret, const Number n) { if (n->nan == 0) { num_set_d(ret, asin(n->value)); } else { num_set_nan(ret); } } void num_acos(Number ret, const Number n) { if (n->nan == 0) { num_set_d(ret, acos(n->value)); } else { num_set_nan(ret); } } void num_atan(Number ret, const Number n) { if (n->nan == 0) { num_set_d(ret, atan(n->value)); } else { num_set_nan(ret); } } void num_sinh(Number ret, const Number n) { if (n->nan == 0) { num_set_d(ret, sinh(n->value)); } else { num_set_nan(ret); } } void num_cosh(Number ret, const Number n) { if (n->nan == 0) { num_set_d(ret, cosh(n->value)); } else { num_set_nan(ret); } } void num_tanh(Number ret, const Number n) { if (n->nan == 0) { num_set_d(ret, tanh(n->value)); } else { num_set_nan(ret); } } void num_asinh(Number ret, const Number n) { if (n->nan == 0) { num_set_d(ret, asinh(n->value)); } else { num_set_nan(ret); } } void num_acosh(Number ret, const Number n) { if (n->nan == 0) { num_set_d(ret, acosh(n->value)); } else { num_set_nan(ret); } } void num_atanh(Number ret, const Number n) { if (n->nan == 0) { num_set_d(ret, atanh(n->value)); } else { num_set_nan(ret); } } void num_acoth(Number ret, const Number n) { if (n->nan == 0 && !num_is_zero(n)) { num_set_d(ret, atanh(1.0/n->value)); } else { num_set_nan(ret); } } void num_asech(Number ret, const Number n) { if (n->nan == 0 && !num_is_zero(n)) { num_set_d(ret, acosh(1.0/n->value)); } else { num_set_nan(ret); } } void num_acsch(Number ret, const Number n) { if (n->nan == 0 && !num_is_zero(n)) { num_set_d(ret, asinh(1.0/n->value)); } else { num_set_nan(ret); } } double num_get_d(const Number n) { return n->value; } unsigned int num_get_ui(const Number n) { return (unsigned int) n->value; } char * num_get_str(char *str, num_exp_t *expptr, const int b, const size_t n, const Number op) { char * dec; if (!str) str = malloc(1024); sprintf(str, "%.1000g",op->value); printf("the str: %s\n", str); dec = strchr(str, conf.dec_delimiter); if (dec == NULL) { *expptr = strlen(str); } if (str[0] == -1) { *expptr -= 1; } strstrip(conf.dec_delimiter, str); printf("the str (2): %s\n", str); return str; } num_prec_t num_get_default_prec() { return DBL_MANT_DIG; } void num_add(Number ret, const Number n1, const Number n2) { if (n1->nan == 0 && n2->nan == 0) { num_set_d(ret, n1->value + n2->value); } else { num_set_nan(ret); } } void num_sub(Number ret, const Number n1, const Number n2) { if (n1->nan == 0 && n2->nan == 0) { num_set_d(ret, n1->value - n2->value); } else { num_set_nan(ret); } } void num_add_ui(Number ret, const Number n, const unsigned int ui) { if (n->nan == 0) { num_set_d(ret, n->value + ui); } else { num_set_nan(ret); } } void num_sub_ui(Number ret, const Number n, const unsigned int ui) { if (n->nan == 0) { num_set_d(ret, n->value - ui); } else { num_set_nan(ret); } } void num_div(Number ret, const Number n1, const Number n2) { if (n1->nan == 0 && n2->nan == 0 && n2->value != 0.0) { num_set_d(ret, n1->value / n2->value); } else { num_set_nan(ret); } } void num_div_ui(Number ret, const Number n, const unsigned int ui) { if (n->nan == 0 && ui != 0) { num_set_d(ret, n->value / ui); } else { num_set_nan(ret); } } void num_rint(Number ret, const Number n) { if (n->nan == 0) { num_set_d(ret, rint(n->value)); } else { num_set_nan(ret); } } void num_rintz(Number ret, const Number n) { if (n->nan == 0) { if (n->value < 0.0) { num_set_d(ret, ceil(n->value)); } else { num_set_d(ret, floor(n->value)); } } else { num_set_nan(ret); } } void num_floor(Number ret, const Number n) { if (n->nan == 0) { num_set_d(ret, floor(n->value)); } else { num_set_nan(ret); } } void num_ceil(Number ret, const Number n) { if (n->nan == 0) { num_set_d(ret, ceil(n->value)); } else { num_set_nan(ret); } } int num_random(Number n) { num_set_d(n, random()/(double)RAND_MAX); return 0; } void num_sinc(Number ret, const Number n) { if (n->nan == 0) { if (num_is_zero(n)) { num_set_d(ret, 1); } else { num_sin(ret, n); num_div(ret, ret, n); } } else { num_set_nan(ret); } } void num_const_pi(Number n) { num_set_d(n, atan(1)*4.0); // as accurate as the underlying math library can do } void num_const_euler(Number n) { num_set_d(n, 2.718281828459045235360287471352662497757247093699959574966967627724076630353547594571382178525166427427466391932003059921817413596629043572900334295260595630); } void num_const_catalan(Number n) { num_set_d(n, 0.91596559417721901505460351493238411077414937428167213426649811962176301977625476947935651292611510624857442261919619957903589880332585905943159473748115840); } void num_out_str(FILE *fd, const int base, const Number n) { if (n->nan == 1) { fprintf(fd,"@NaN@"); return; } switch (base) { case 10: fprintf(fd, "%g", n->value); break; case 16: fprintf(fd, "%#x", (unsigned int)(n->value)); break; case 8: fprintf(fd, "%#o", (unsigned int)(n->value)); break; default: fprintf(fd, "-->oops!<--"); } } int num_is_nan(const Number n) { return n->nan; } int num_is_inf(const Number n) { return (n->nan == 0 && isinf(n->value)); } int num_is_zero(const Number n) { return (n->nan == 0 && n->value == 0.0); } int num_is_equal(const Number n1, const Number n2) { return (n1->nan == 0 && n2->nan == 0 && n1->value == n2->value); } int num_is_greater(const Number n1, const Number n2) { return (n1->nan == 0 && n2->nan == 0 && n1->value > n2->value); } int num_is_greaterequal(const Number n1, const Number n2) { return (n1->nan == 0 && n2->nan == 0 && n1->value >= n2->value); } int num_is_less(const Number n1, const Number n2) { return (n1->nan == 0 && n2->nan == 0 && n1->value < n2->value); } int num_is_lessequal(const Number n1, const Number n2) { return (n1->nan == 0 && n2->nan == 0 && n1->value <= n2->value); } int num_sign(const Number n) { if (n->value > 0.0) { return 1; } else if (n->value < 0.0) { return -1; } else { return 0; } } void num_neg(Number ret, const Number n) { if (n->nan == 0) { num_set_d(ret, n->value*-1); } else { num_set_nan(ret); } } void num_abs(Number ret, const Number n) { if (n->nan == 0) { num_set_d(ret, fabs(n->value)); } else { num_set_nan(ret); } } int num_cmp_si(const Number n, const int si) { if (n->value > si) { return 1; } else if (n->value < si) { return -1; } else { return 0; } } void num_free(Number n) { } void num_cot(Number ret, const Number n) { num_tan(ret, n); if (ret->nan == 0 && !num_is_zero(ret)) { num_set_d(ret, 1.0/ret->value); } } void num_sec(Number ret, const Number n) { num_cos(ret, n); if (ret->nan == 0 && !num_is_zero(ret)) { num_set_d(ret, 1.0/ret->value); } } void num_csc(Number ret, const Number n) { num_sin(ret, n); if (ret->nan == 0 && !num_is_zero(ret)) { num_set_d(ret, 1.0/ret->value); } } void num_coth(Number ret, const Number n) { num_tanh(ret, n); if (ret->nan == 0 && !num_is_zero(ret)) { num_set_d(ret, 1.0/ret->value); } } void num_sech(Number ret, const Number n) { num_cosh(ret, n); if (ret->nan == 0 && !num_is_zero(ret)) { num_set_d(ret, 1.0/ret->value); } } void num_csch(Number ret, const Number n) { num_sinh(ret, n); if (ret->nan == 0 && !num_is_zero(ret)) { num_set_d(ret, 1.0/ret->value); } } void num_comp(Number ret, const Number n) { if (n->nan == 0) { num_set_d(ret, (((int)(n->value))*-1)-1); } else { num_set_nan(ret); } } void num_bnot(Number ret, const Number n) { if (n->nan == 0) { num_set_ui(ret, ~num_get_ui(n)); } else { num_set_nan(ret); } } void num_band(Number ret, const Number n1, const Number n2) { if (n1->nan == 0 && n2->nan == 0) { num_set_ui(ret, num_get_ui(n1) & num_get_ui(n2)); } else { num_set_nan(ret); } } void num_bxor(Number ret, const Number n1, const Number n2) { if (n1->nan == 0 && n2->nan == 0) { num_set_ui(ret, num_get_ui(n1) ^ num_get_ui(n2)); } else { num_set_nan(ret); } } void num_bor(Number ret, const Number n1, const Number n2) { if (n1->nan == 0 && n2->nan == 0) { num_set_ui(ret, num_get_ui(n1) | num_get_ui(n2)); } else { num_set_nan(ret); } } void num_trunc(Number ret, const Number n) { if (n->nan == 0) { num_set_d(ret, trunc(n->value)); } else { num_set_nan(ret); } } void num_unimplemented() { fprintf(stderr,"This function is unimplemented when not using libmpfr.\n"); } #endif wcalc-2.4/number.h0000664000175000000620000003151311100710642012373 0ustar kkstaff#ifndef NUMBER_H #define NUMBER_H #ifdef HAVE_CONFIG_H #include "config.h" #else # ifndef HAVE_LIBMPFR # define HAVE_LIBMPFR # endif #endif #ifdef HAVE_LIBMPFR #if HAVE_LIMITS_H # include /* MPFR uses ULONG_MAX on some systems */ #endif #ifndef S_SPLINT_S /* splint barfs on the gmp.h header */ #include #include #endif #define Number mpfr_t #define NUM_PREC_MIN MPFR_PREC_MIN #define NUM_PREC_MAX MPFR_PREC_MAX #define num_init(n) mpfr_init(n) #define num_init_set(n1,n2) mpfr_init_set((n1), (n2), GMP_RNDN) #define num_init_set_d(n,d) mpfr_init_set_d((n), (d), GMP_RNDN) #define num_init_set_ui(n,ui) mpfr_init_set_ui((n), (ui), GMP_RNDN) #define num_init_set_str(n,str,base) mpfr_init_set_str((n), (str), (base), GMP_RNDN) #define num_free(n) mpfr_clear(n) typedef mp_exp_t num_exp_t; #define num_get_d(n) mpfr_get_d((n), GMP_RNDN) #define num_get_ui(n) mpfr_get_ui((n), GMP_RNDN) #define num_get_str(a, b, c, d, e) mpfr_get_str(a, b, c, d, e, GMP_RNDN) #define num_free_str(a) mpfr_free_str(a) #define num_set(n1,n2) mpfr_set((n1), (n2), GMP_RNDN) #define num_set_d(n,d) mpfr_set_d((n), (d), GMP_RNDN) #define num_set_ui(n,ui) mpfr_set_ui((n), (ui), GMP_RNDN) #define num_set_str(n,str,base) mpfr_set_str((n), (str), (base), GMP_RNDN) #define num_set_nan(n) mpfr_set_nan(n) #define num_set_inf(n,s) mpfr_set_inf(n,s) #define num_add(ret,n1,n2) mpfr_add((ret), (n1), (n2), GMP_RNDN) #define num_sub(ret,n1,n2) mpfr_sub((ret), (n1), (n2), GMP_RNDN) #define num_add_ui(ret,n,ui) mpfr_add_ui((ret), (n), (ui), GMP_RNDN) #define num_sub_ui(ret,n,ui) mpfr_sub_ui((ret), (n), (ui), GMP_RNDN) #define num_mul(ret,n1,n2) mpfr_mul((ret), (n1), (n2), GMP_RNDN) #define num_mul_si(ret,n,si) mpfr_mul_si((ret), (n), (si), GMP_RNDN) #define num_mul_ui(ret,n,ui) mpfr_mul_ui((ret), (n), (ui), GMP_RNDN) #define num_sqr(ret,n) mpfr_sqr((ret), (n), GMP_RNDN) #define num_sqrt(ret,n) mpfr_sqrt((ret), (n), GMP_RNDN) #define num_cbrt(ret,n) mpfr_cbrt((ret), (n), GMP_RNDN) #define num_div(ret,n1,n2) mpfr_div((ret), (n1), (n2), GMP_RNDN) #define num_div_ui(ret,n,ui) mpfr_div_ui((ret), (n), (ui), GMP_RNDN) #define num_rint(ret,n) mpfr_rint((ret), (n), GMP_RNDN) #define num_rintz(ret,n) mpfr_rint((ret), (n), GMP_RNDZ) #define num_floor(ret,n) mpfr_floor((ret), (n)) #define num_ceil(ret,n) mpfr_ceil((ret), (n)) #define num_pow(ret,n,exp) mpfr_pow((ret), (n), (exp), GMP_RNDN) #define num_pow_si(ret,n,exp) mpfr_pow_si((ret), (n), (exp), GMP_RNDN) #define num_exp(ret,n) mpfr_exp((ret), (n), GMP_RNDN) #define num_factorial(ret,op) mpfr_fac_ui((ret), (op), GMP_RNDN) #define num_log10(ret,n) mpfr_log10((ret), (n), GMP_RNDN) #define num_log2(ret,n) mpfr_log2((ret), (n), GMP_RNDN) #define num_log(ret,n) mpfr_log((ret), (n), GMP_RNDN) #define num_sin(ret,n) mpfr_sin((ret), (n), GMP_RNDN) #define num_cos(ret,n) mpfr_cos((ret), (n), GMP_RNDN) #define num_tan(ret,n) mpfr_tan((ret), (n), GMP_RNDN) #define num_asin(ret,n) mpfr_asin((ret), (n), GMP_RNDN) #define num_acos(ret,n) mpfr_acos((ret), (n), GMP_RNDN) #define num_atan(ret,n) mpfr_atan((ret), (n), GMP_RNDN) #define num_sinh(ret,n) mpfr_sinh((ret), (n), GMP_RNDN) #define num_cosh(ret,n) mpfr_cosh((ret), (n), GMP_RNDN) #define num_tanh(ret,n) mpfr_tanh((ret), (n), GMP_RNDN) #define num_asinh(ret,n) mpfr_asinh((ret), (n), GMP_RNDN) #define num_acosh(ret,n) mpfr_acosh((ret), (n), GMP_RNDN) #define num_atanh(ret,n) mpfr_atanh((ret), (n), GMP_RNDN) #define num_acoth(ret,n) do { \ mpfr_pow_si((n), (n), -1, GMP_RNDN); \ mpfr_atanh((ret), (n), GMP_RNDN); \ } while (0) #define num_asech(ret,n) do { \ mpfr_pow_si((n), (n), -1, GMP_RNDN); \ mpfr_acosh((ret), (n), GMP_RNDN); \ } while (0) #define num_acsch(ret,n) do { \ mpfr_pow_si((n), (n), -1, GMP_RNDN); \ mpfr_asinh((ret), (n), GMP_RNDN); \ } while (0) extern gmp_randstate_t randstate; #define num_random(n) mpfr_urandomb((n), randstate) #define num_zeta(ret,n) mpfr_zeta((ret), (n), GMP_RNDN); #define num_sinc(ret,n) do { \ if(mpfr_zero_p((n))) { \ mpfr_set_ui((ret), 1, GMP_RNDN); \ } else { \ mpfr_sin((ret), (n), GMP_RNDN); \ mpfr_div((ret), (ret), (n), GMP_RNDN); \ } \ } while (0) #define num_const_pi(n) mpfr_const_pi((n), GMP_RNDN) #define num_const_euler(n) mpfr_const_euler((n), GMP_RNDN) #define num_out_str(fd,base,n) mpfr_out_str((fd), (base), 0, (n), GMP_RNDN) #define num_is_nan(n) mpfr_nan_p(n) #define num_is_inf(n) mpfr_inf_p(n) #define num_is_zero(n) mpfr_zero_p(n) #define num_is_equal(n1,n2) mpfr_equal_p((n1), (n2)) #define num_is_greater(n1,n2) mpfr_greater_p((n1), (n2)) #define num_is_greaterequal(n1,n2) mpfr_greaterequal_p((n1), (n2)) #define num_is_less(n1,n2) mpfr_less_p((n1), (n2)) #define num_is_lessequal(n1,n2) mpfr_lessequal_p((n1), (n2)) #define num_sign(n) mpfr_sgn(n) #define num_neg(ret,n) mpfr_neg((ret), (n), GMP_RNDN) #define num_abs(ret,n) mpfr_abs((ret), (n), GMP_RNDN) #define num_cmp_si(n,si) mpfr_cmp_si((n), (si)) typedef mp_prec_t num_prec_t; #define num_get_default_prec() mpfr_get_default_prec() #define num_set_default_prec(prec) mpfr_set_default_prec(prec) #ifdef HAVE_MPFR_22 # define num_const_catalan(n) mpfr_const_catalan((n), GMP_RNDN) # define num_cot(ret,n) mpfr_cot((ret), (n), GMP_RNDN) # define num_sec(ret,n) mpfr_sec((ret), (n), GMP_RNDN) # define num_csc(ret,n) mpfr_csc((ret), (n), GMP_RNDN) # define num_coth(ret,n) mpfr_coth((ret), (n), GMP_RNDN) # define num_sech(ret,n) mpfr_sech((ret), (n), GMP_RNDN) # define num_csch(ret,n) mpfr_csch((ret), (n), GMP_RNDN) # define num_eint(ret,n) mpfr_eint((ret), (n), GMP_RNDN) # define num_gamma(ret,n) mpfr_gamma((ret), (n), GMP_RNDN) # define num_lngamma(ret,n) mpfr_lngamma((ret), (n), GMP_RNDN) #else # define num_const_catalan(n) num_set_str((n), W_CATALAN, 0) # define num_cot(ret,n) do { \ mpfr_tan((ret), (n), GMP_RNDN); \ mpfr_pow_si((ret), (n), -1, GMP_RNDN); \ } while (0) # define num_sec(ret,n) do { \ mpfr_cos((ret), (n), GMP_RNDN); \ mpfr_pow_si((ret), (n), -1, GMP_RNDN); \ } while (0) # define num_csc(ret,n) do { \ mpfr_sin((ret), (n), GMP_RNDN); \ mpfr_pow_si((ret), (n), -1, GMP_RNDN); \ } while (0) # define num_coth(ret,n) do { \ mpfr_tanh((ret), (n), GMP_RNDN); \ mpfr_pow_si((ret), (n), -1, GMP_RNDN); \ } while (0) # define num_sech(ret,n) do { \ mpfr_cosh((ret), (n), GMP_RNDN); \ mpfr_pow_si((ret), (n), -1, GMP_RNDN); \ } while (0) # define num_csch(ret,n) do { \ mpfr_sinh((ret), (n), GMP_RNDN); \ mpfr_pow_si((ret), (n), -1, GMP_RNDN); \ } while (0) #endif #define num_bor(ret,n1,n2) do { \ mpz_t intfirst, intsecond, intoutput; \ mpz_init(intfirst); \ mpz_init(intsecond); \ mpz_init(intoutput); \ mpfr_get_z(intfirst, (n1), GMP_RNDZ); \ mpfr_get_z(intsecond, (n2), GMP_RNDZ); \ mpz_ior(intoutput, intfirst, intsecond); \ mpfr_set_z((ret), intoutput, GMP_RNDN); \ mpz_clear(intfirst); \ mpz_clear(intsecond); \ mpz_clear(intoutput); \ } while (0) #define num_band(ret,n1,n2) do { \ mpz_t intfirst, intsecond, intoutput; \ mpz_init(intfirst); \ mpz_init(intsecond); \ mpz_init(intoutput); \ mpfr_get_z(intfirst, (n1), GMP_RNDZ); \ mpfr_get_z(intsecond, (n2), GMP_RNDZ); \ mpz_and(intoutput, intfirst, intsecond); \ mpfr_set_z((ret), intoutput, GMP_RNDN); \ mpz_clear(intfirst); \ mpz_clear(intsecond); \ mpz_clear(intoutput); \ } while (0) #define num_bxor(ret,n1,n2) do { \ mpz_t intfirst, intsecond, intoutput; \ mpz_init(intfirst); \ mpz_init(intsecond); \ mpz_init(intoutput); \ mpfr_get_z(intfirst, (n1), GMP_RNDZ); \ mpfr_get_z(intsecond, (n2), GMP_RNDZ); \ mpz_xor(intoutput, intfirst, intsecond); \ mpfr_set_z((ret), intoutput, GMP_RNDN); \ mpz_clear(intfirst); \ mpz_clear(intsecond); \ mpz_clear(intoutput); \ } while (0) #define num_trunc(ret,n) mpfr_trunc((ret),(n)) #define num_comp(ret,n) do { \ mpz_t integer, intoutput; \ mpz_init(integer); \ mpz_init(intoutput); \ mpfr_get_z(integer, (n), GMP_RNDZ); \ mpz_com(intoutput, integer); \ mpfr_set_z((ret), intoutput, GMP_RNDN); \ mpz_clear(integer); \ mpz_clear(intoutput); \ } while (0) /* this is because binary not doesn't make sense when your integer can be * arbitrarily big */ #ifdef _MPFR_H_HAVE_INTMAX_T # define num_bnot(ret,n) mpfr_set_uj((ret),~mpfr_get_uj((n),GMP_RNDN),GMP_RNDN) #else # define num_bnot(ret,n) mpfr_set_ui((ret),~mpfr_get_ui((n),GMP_RNDN),GMP_RNDN) #endif #else /* this is to reimplement mpfr using doubles */ #include /* for DBL_MANT_DIG, according to C89 */ #include /* for size_t, according to C89 */ #include /* for FILE* */ struct numberstruct { double value; unsigned int nan; }; typedef struct numberstruct Number[1]; #define NUM_PREC_MIN DBL_MANT_DIG #define NUM_PREC_MAX DBL_MANT_DIG typedef int num_exp_t; typedef long int num_prec_t; void num_init(Number n); void num_init_set(Number n1, const Number n2); void num_init_set_d(Number n, const double d); void num_init_set_ui(Number n, const unsigned int ui); int num_init_set_str(Number n, const char * str, const int base); void num_set(Number n1, const Number n2); void num_set_d(Number n, const double d); void num_set_ui(Number n, const unsigned int ui); int num_set_str(Number n, const char * str, const int base); void num_set_nan(Number n); void num_mul(Number ret, const Number n1, const Number n2); void num_mul_si(Number ret, const Number n, const int si); void num_mul_ui(Number ret, const Number n, const unsigned int ui); void num_sqr(Number ret, const Number n); void num_sqrt(Number ret, const Number n); void num_cbrt(Number ret, const Number n); void num_pow(Number ret, const Number n, const Number exp); void num_pow_si(Number ret, const Number n, const int exp); void num_exp(Number ret, const Number n); void num_factorial(Number ret, unsigned int op); void num_log10(Number ret, const Number n); void num_log2(Number ret, const Number n); void num_log(Number ret, const Number n); void num_sin(Number ret, const Number n); void num_cos(Number ret, const Number n); void num_tan(Number ret, const Number n); void num_asin(Number ret, const Number n); void num_acos(Number ret, const Number n); void num_atan(Number ret, const Number n); void num_sinh(Number ret, const Number n); void num_cosh(Number ret, const Number n); void num_tanh(Number ret, const Number n); void num_asinh(Number ret, const Number n); void num_acosh(Number ret, const Number n); void num_atanh(Number ret, const Number n); void num_acoth(Number ret, const Number n); void num_asech(Number ret, const Number n); void num_acsch(Number ret, const Number n); void num_add(Number ret, const Number n1, const Number n2); void num_sub(Number ret, const Number n1, const Number n2); void num_add_ui(Number ret, const Number n, const unsigned int ui); void num_sub_ui(Number ret, const Number n, const unsigned int ui); void num_div(Number ret, const Number n1, const Number n2); void num_div_ui(Number ret, const Number n, const unsigned int ui); void num_rint(Number ret, const Number n); void num_rintz(Number ret, const Number n); void num_floor(Number ret, const Number n); void num_ceil(Number ret, const Number n); int num_random(Number n); #define num_zeta(ret,n) num_unimplemented() void num_sinc(Number ret, const Number n); void num_const_pi(Number n); void num_const_euler(Number n); void num_const_catalan(Number n); void num_out_str(FILE *fd, const int base, const Number n); int num_is_nan(const Number n); int num_is_inf(const Number n); int num_is_zero(const Number n); int num_is_equal(const Number n1, const Number n2); int num_is_greater(const Number n1, const Number n2); int num_is_greaterequal(const Number n1, const Number n2); int num_is_less(const Number n1, const Number n2); int num_is_lessequal(const Number n1, const Number n2); int num_sign(const Number n); void num_neg(Number ret, const Number n); void num_abs(Number ret, const Number n); int num_cmp_si(const Number n, const int si); void num_free(Number); double num_get_d(const Number); unsigned int num_get_ui(const Number); char * num_get_str(char *str, num_exp_t *expptr, const int b, const size_t n, const Number op); #define num_free_str(a) free(a); num_prec_t num_get_default_prec(); #define num_set_default_prec(prec) /* num_set_default_prec doesn't exist */ void num_cot(Number ret, const Number n); void num_sec(Number ret, const Number n); void num_csc(Number ret, const Number n); void num_coth(Number ret, const Number n); void num_sech(Number ret, const Number n); void num_csch(Number ret, const Number n); #define num_lngamma(ret, n) num_unimplemented() #define num_gamma(ret,n) num_unimplemented() #define num_eint(ret,n) num_unimplemented() void num_comp(Number ret, const Number n); void num_bnot(Number ret, const Number n); void num_band(Number ret, const Number n1, const Number n2); void num_bxor(Number ret, const Number n1, const Number n2); void num_bor(Number ret, const Number n1, const Number n2); #endif void init_numbers(void); int is_int(const Number); #endif /* NUMBER_H */ wcalc-2.4/._number_formatting.c0000644000175000000620000000024711100236721015034 0ustar kkstaffMac OS X  2uATTR  com.apple.TextEncodingMACINTOSH;0wcalc-2.4/number_formatting.c0000644000175000000620000004036211100236721014621 0ustar kkstaff#if HAVE_CONFIG_H # include "config.h" #endif #if ! defined(HAVE_CONFIG_H) || HAVE_STRING_H # include #endif #include /* for snprintf() */ #include /* for calloc() */ #include "number.h" #include "calculator.h" #include "string_manip.h" #include "number_formatting.h" #ifdef MEMWATCH #include "memwatch.h" #endif static size_t zero_strip(char *num); static void add_prefix(char *num, size_t length, int base); static char *engineering_formatted_number(char *digits, num_exp_t exp, const int precision, const int base, const int prefix, char *truncated_flag); static char *full_precision_formatted_number(char *digits, num_exp_t exp, const int base, const int prefix); static char *automatically_formatted_number(char *digits, num_exp_t exp, const int precision, const int base, const int prefix, char *truncated_flag); static char *precision_formatted_number(char *digits, num_exp_t exp, const int precision, const int base, const int prefix); /* this function takes a number (mpfr_t) and prints it. * This is a blatant ripoff of mpfr's mpfr_out_str(), because it formats things * (sorta) the way I want them formatted, though this prints things out to a * string, and does all the fancy presentation stuff we've come to expect from * wcalc. */ char *num_to_str_complex(const Number num, const int base, const enum engineering_modes engr, const int prec, const int prefix, char *truncated_flag) { char *s, *retstr; num_exp_t e; Dprintf("num_to_str_complex: base: %i, engr: %i, prec: %i, prefix: %i\n", base, engr, prec, prefix); if (num_is_nan(num)) { return (char *)strdup("@NaN@"); } if (num_is_inf(num)) { if (num_sign(num) > 0) { return (char *)strdup("@Inf@"); } else { return (char *)strdup("-@Inf@"); } } if (num_is_zero(num)) { if (num_sign(num) >= 0) { return (char *)strdup("0"); } else { return (char *)strdup("-0"); } } s = num_get_str(NULL, &e, base, 0, num); /* s is the string * e is the number of integers (the exponent) if positive * * Now, if there's odd formatting involved, make mpfr do the rounding, * so we know it's "correct": */ if (prec > -1) { if (engr == never) { size_t significant_figures = 0; Dprintf("prec > -1 && engr == never\n"); /*printf("e: %li\n", (long)e); * printf("s: %s\n", s); * printf("prec: %i\n", prec); */ significant_figures = ((e > 0) ? e : 0) + prec; if (significant_figures < 2) { /* why is this the minimum? */ s = num_get_str(s, &e, base, 2, num); if (s[1] > '4') { /* XXX: LAME! */ unsigned foo; foo = s[0] - '0'; foo++; snprintf(s, 3, "%u", foo); e++; } } else { num_free_str(s); s = num_get_str(NULL, &e, base, significant_figures, num); } } else { int left_digits = 0; Number temp; Dprintf("engr == auto || engr == always\n"); /* first, count how many figures to the left of the decimal */ num_init_set(temp, num); while (num_get_d(temp) >= 1.0) { num_div_ui(temp, temp, base); left_digits++; } num_free(temp); if (left_digits == 0) { left_digits = 1; } Dprintf("left_digits = %i, asking for %i\n", left_digits, left_digits + prec); s = num_get_str(NULL, &e, base, left_digits + prec, num); } } Dprintf("post-mpfr e: %li s: %s\n", (long int)e, s); *truncated_flag = 0; if (-2 == prec) { retstr = full_precision_formatted_number(s, e, base, prefix); } else { switch (engr) { case always: Dprintf("ALWAYS print engineering\n"); retstr = engineering_formatted_number(s, e, prec, base, prefix, truncated_flag); break; case never: Dprintf("NEVER print engineering\n"); retstr = precision_formatted_number(s, e, prec, base, prefix); break; default: case automatic: Dprintf("AUTOMATICALLY decide on engineering formatting\n"); retstr = automatically_formatted_number(s, e, prec, base, prefix, truncated_flag); } } num_free_str(s); Dprintf("return string: %s\n", retstr); return retstr; } char *precision_formatted_number(char *digits, num_exp_t exp, const int precision, const int base, const int prefix) { size_t length; size_t full_length; size_t decimal_count = 0; size_t print_limit; char *retstring, *curs, *dcurs = digits; length = strlen(digits); /* testing against both zero and length because length is unsigned */ if (exp > 0 && (size_t) exp > length) length = exp; length += 3; if (length < (size_t) (precision + 3)) { // leading zero, decimal, and null length = (size_t) (precision + 3); } Dprintf("Precision Formatted Number\n"); Dprintf("digits: %s(%u), exp: %i, base: %i, prefix: %i, precision: %i\n", digits, (unsigned)length, (int)exp, base, prefix, precision); // ten extra, 'cuz of the *possible* exponent full_length = length + 10; curs = retstring = (char *)calloc(full_length, sizeof(char)); Dprintf("length: %lu, full_length: %lu\n", length, full_length); // now, copy the digits into the output string, carefully // copy over the negative sign if (*dcurs == '-') { snprintf(curs++, length--, "%c", *dcurs++); } // copy in a prefix if (prefix) { char *nc; add_prefix(curs, length, base); nc = strchr(curs, '\0'); length -= nc - curs; curs = nc; } // copy in the integers if (exp > 0) { snprintf(curs++, length--, "%c", *dcurs++); exp--; // leading digit while (exp > 0 && *dcurs) { snprintf(curs++, length--, "%c", *dcurs++); exp--; } for (; exp > 0; exp--) { snprintf(curs++, length--, "0"); } } else { snprintf(curs++, length--, "0"); } if (precision > 0) { // the decimal snprintf(curs++, length--, "."); Dprintf("the integers: %s\n", retstring); Dprintf("l: %lu, fl: %lu, dc: %u, p: %i, e: %i\n", length, full_length, (unsigned)decimal_count, (int)precision, (int)exp); // everything after this is affected by decimalcount // copy in the leading zeros while (exp < 0 && (ssize_t) decimal_count <= precision) { snprintf(curs++, length--, "0"); exp++; decimal_count++; } Dprintf("l: %lu, fl: %lu, dc: %u, p: %i, e: %i\n", length, full_length, (unsigned)decimal_count, (int)precision, (int)exp); // copy in the rest of the mantissa (the decimals) Dprintf("leading zeros: %s\n", retstring); // this variable exists because snprintf's return value is unreliable, // and can be larger than the number of digits printed print_limit = ((length < (precision - decimal_count + 1)) ? length : (precision - decimal_count + 1)); snprintf(curs, print_limit, "%s", dcurs); } return retstring; } char *full_precision_formatted_number(char *digits, num_exp_t exp, const int base, const int prefix) { size_t length; size_t full_length; size_t decimal_count = 0; size_t printed; char *retstring, *curs, *dcurs = digits; length = strlen(digits); /* testing against both zero and length because length is unsigned */ if (exp > 0 && (size_t) exp > length) length = exp; length += 3; /* the null, the (possible) sign, and the decimal */ Dprintf("Full Precision Formatted Number\n"); Dprintf("digits: %s(%u), exp: %i, base: %i, prefix: %i\n", digits, (unsigned)length, (int)exp, base, prefix); Dprintf("strlen(digits): %u\n", (unsigned)strlen(digits)); // ten extra, 'cuz of the *possible* exponent full_length = length + 10; curs = retstring = (char *)calloc(sizeof(char), full_length); Dprintf("length: %lu, full_length: %lu\n", length, full_length); // now, copy the digits into the output string, carefully // copy over the negative sign if (*dcurs == '-') { snprintf(curs++, length--, "%c", *dcurs++); } // copy in a prefix if (prefix) { char *nc; add_prefix(curs, length, base); nc = strchr(curs, '\0'); length -= nc - curs; curs = nc; } Dprintf("ready for ints: %s\n", retstring); // copy over the integers if (exp > 0) { snprintf(curs++, length--, "%c", *dcurs++); exp--; // leading digit while (exp > 0 && *dcurs) { snprintf(curs++, length--, "%c", *dcurs++); exp--; } for (; exp > 0; exp--) { snprintf(curs++, length--, "0"); } } else { snprintf(curs++, length--, "0"); } // the decimal snprintf(curs++, length--, "."); Dprintf("the integers: %s\n", retstring); Dprintf("length: %lu, full_length: %lu\n", length, full_length); // XXX: Currently, this function is not used for decimals, so... // the leading decimal zeros while (exp < 0) { snprintf(curs++, length--, "0"); exp++; decimal_count++; } // the rest of the mantissa (the decimals) // this variable exists because snprintf's return value is unreliable. // and can be larger than the number of digits printed printed = ((length - 1 < strlen(dcurs)) ? length - 1 : strlen(dcurs)); snprintf(curs, length, "%s", dcurs); length -= printed; decimal_count += printed; // strip off the trailing 0's zero_strip(retstring); // copy in an exponent if necessary if (exp != 0) { curs = strchr(retstring, '\0'); Dprintf("space left: %lu\n", full_length - (curs - retstring)); snprintf(curs, full_length - (curs - retstring), (base <= 10 ? "e%ld" : "@%ld"), (long)exp); } return retstring; } char *automatically_formatted_number(char *digits, num_exp_t exp, const int precision, const int base, const int prefix, char *truncated_flag) { size_t length; size_t full_length; size_t decimal_count = 0; size_t printed; char *retstring, *curs, *dcurs = digits; length = strlen(digits); /* testing against both zero and length because length is unsigned */ if (exp > 0 && (size_t) exp > length) length = exp; length += 3; /* the null, the (possible) sign, and the decimal */ Dprintf("Automatically Formatted Number\n"); Dprintf("digits: %s(%u), exp: %i, base: %i, prefix: %i\n", digits, (unsigned)length, (int)exp, base, prefix); Dprintf("strlen(digits): %u\n", (unsigned)strlen(digits)); // ten extra, 'cuz of the *possible* exponent full_length = length + 10; curs = retstring = (char *)calloc(sizeof(char), full_length); Dprintf("length: %lu, full_length: %lu\n", length, full_length); // now, copy the digits into the output string, carefully // copy over the negative sign if (*dcurs == '-') { snprintf(curs++, length--, "%c", *dcurs++); } // copy in a prefix if (prefix) { char *nc; add_prefix(curs, length, base); nc = strchr(curs, '\0'); length -= nc - curs; curs = nc; } Dprintf("ready for ints: %s\n", retstring); // copy over the integers if (exp > 0) { snprintf(curs++, length--, "%c", *dcurs++); exp--; // leading digit while (exp > 0 && *dcurs) { snprintf(curs++, length--, "%c", *dcurs++); exp--; } for (; exp > 0; exp--) { snprintf(curs++, length--, "0"); } } else { snprintf(curs++, length--, "0"); } // the decimal snprintf(curs++, length--, "."); Dprintf("the integers: %s\n", retstring); Dprintf("length: %lu, full_length: %lu\n", length, full_length); // XXX: Currently, this function is not used for decimals, so... // the leading decimal zeros while (exp < 0) { snprintf(curs++, length--, "0"); exp++; decimal_count++; } // the rest of the mantissa (the decimals) // this variable exists because snprintf's return value is unreliable. // and can be larger than the number of digits printed printed = ((length - 1 < strlen(dcurs)) ? length - 1 : strlen(dcurs)); snprintf(curs, length, "%s", dcurs); length -= printed; decimal_count += printed; if (precision == -1) { char *period; // strip off the trailing 0's zero_strip(retstring); /* XXX: This is a stupid hack; the idea is just to get the mpfr output * to match the double output. */ period = strchr(retstring, '.'); Dprintf("retstring: %s\n", retstring); Dprintf("period: %s\n", period); if (period && strlen(period) > 10) { period[10] = 0; *truncated_flag = 1; zero_strip(retstring); } } else if (precision >= 0) { char *period = strchr(retstring, '.'); Dprintf("period: %s\n", period); if (period != NULL) { if (precision == 0) { // this removes extraneous periods *period = 0; } period ++; if (strlen(period) > (size_t) precision) { Dprintf("truncating down to precision...\n"); period[precision] = 0; *truncated_flag = 1; } } } // copy in an exponent if necessary if (exp != 0) { curs = strchr(retstring, '\0'); Dprintf("space left: %lu\n", full_length - (curs - retstring)); snprintf(curs, full_length - (curs - retstring), (base <= 10 ? "e%ld" : "@%ld"), (long)exp); } return retstring; } char *engineering_formatted_number(char *digits, num_exp_t exp, const int precision, const int base, const int prefix, char *truncated_flag) { size_t length; size_t full_length; char *retstring, *curs, *dcurs = digits; length = strlen(digits); /* testing against both zero and length because length is unsigned */ if (exp > 0 && (size_t) exp > length) length = exp; length += 3; /* the null, the (possible) sign, and the decimal */ Dprintf("Engineering Formatted Number\n"); Dprintf("digits: %s(%u), exp: %i, prec: %i, prefix: %i\n", digits, (unsigned)length, (int)exp, precision, prefix); // ten extra, 'cuz of the exponent full_length = length + 10; curs = retstring = (char *)calloc(sizeof(char), full_length); Dprintf("length: %lu, full_length: %lu\n", length, full_length); // now, copy the digits into the output string, carefully // copy over the negative sign if (*dcurs == '-') { snprintf(curs++, length--, "%c", *dcurs++); } // copy in a prefix if (prefix) { char *nc; add_prefix(curs, length, base); nc = strchr(curs, '\0'); length -= nc - curs; curs = nc; } // copy over the integer snprintf(curs++, length--, "%c", *dcurs++); exp--; // the decimal snprintf(curs++, length--, "."); Dprintf("the integers: %s\n", retstring); Dprintf("length: %lu, full_length: %lu\n", length, full_length); // now, add in the rest of the digits // note that the digits are already correctly rounded and I've already // allocated enough space, because of how I asked mpfr for the original // digit string. snprintf(curs, length + 1, "%s", dcurs); Dprintf("the decimals: %s\n", retstring); // strip off the trailing 0's if (-1 == precision) { char *period; zero_strip(retstring); /* XXX: This is a stupid hack; the idea is just to get the mpfr output * to match (roughly) the double output. */ period = strchr(retstring, '.'); Dprintf("retstring: %s\n", retstring); Dprintf("period: %s\n", period); if (period && strlen(period) > 10) { period[10] = 0; *truncated_flag = 1; zero_strip(retstring); } } else { char *period = strchr(retstring, '.') + 1; Dprintf("period: %s\n", period); if (period && (int)strlen(period) > precision) { Dprintf("truncating down to precision...\n"); period[precision] = 0; *truncated_flag = 1; } } // copy in an exponent curs = strchr(retstring, '\0'); Dprintf("space left: %lu\n", full_length - (curs - retstring)); snprintf(curs, full_length - (curs - retstring), (base <= 10 ? "e%+ld" : "@%+ld"), (long)exp); return retstring; } /* this function removes zeros and decimals from the back end of a number, * and returns how many characters it stripped */ size_t zero_strip(char *num) { size_t curs = strlen(num) - 1; size_t count = 0; while ('0' == num[curs]) { num[curs--] = '\0'; count++; } if ('.' == num[curs]) { num[curs] = '\0'; count++; } return count; } /* this function prints a prefix for the specified base into the specified * string */ void add_prefix(char *num, size_t length, int base) { switch (base) { case 16: snprintf(num, length, "0x"); return; case 10: return; case 8: snprintf(num, length, "0"); return; case 2: snprintf(num, length, "0b"); return; } } wcalc-2.4/number_formatting.h0000644000175000000620000000040110753103563014626 0ustar kkstaff#ifndef WCALC_NUMBER_FORMATTING_H #define WCALC_NUMBER_FORMATTING_H #include "number.h" char *num_to_str_complex(const Number num, const int base, const enum engineering_modes engr, const int prec, const int prefix, char *truncated_flag); #endif wcalc-2.4/OldVariableList.h0000644000175000000620000000113110347026562014127 0ustar kkstaff/* * VariableList.h * Wcalc * * Created by Kyle Wheeler on Sun Jan 20 2002. * Copyright (c) 2001 Kyle Wheeler. All rights reserved. * */ #ifndef VARIABLELIST_H #define VARIABLELIST_H #import @interface NSTableDataSource : NSObject { } - (int)numberOfRowsInTableView:(NSTableView *)aTableView; - (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn*) aTableColumn row:(int)rowIndex; - (void)tableView:(NSTableView*)aTableView setObjectValue:(id)anObject forTableColumn:(NSTableColumn*)aTableColumn row:(int)rowIndex; @end #endif VARIABLELIST_H wcalc-2.4/OldVariableList.m0000644000175000000620000000241410404707656014145 0ustar kkstaff// // VariableList.m // Wcalc // // Created by Kyle Wheeler on Sun Jan 20 2002. // Copyright (c) 2001 Kyle Wheeler. All rights reserved. // #import "variables.h" #import "VariableList.h" #ifdef MEMWATCH #include "memwatch.h" #endif @implementation NSTableDataSource // needs to be REALLY fast - (int)numberOfRowsInTableView:(NSTableView *)aTableView { extern int contents; printf("contents = %i\n",contents); return contents; } // needs to be fast - (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn*) aTableColumn row:(int)rowIndex { extern struct variable *them; struct variable *cursor = them; int i; for (i=1;inext; } if ([[[aTableColumn headerCell] stringValue] isEqualToString:@"Value"]) { printf("Value = %s!\n",strchr(cursor->keyvalue,'=')+1); return [NSString stringWithUTF8String:(strchr(cursor->keyvalue,'=')+1)]; } else { char *temp = strchr(cursor->keyvalue,'='); NSString *foo; *temp=0; printf("Variable! = %s\n",temp2); foo = [NSString stringWithUTF8String:cursor->keyvalue]; *temp = '='; return foo; } } - (void)tableView:(NSTableView*)aTableView setObjectValue:(id)anObject forTableColumn:(NSTableColumn*)aTableColumn row:(int)rowIndex { printf("setvalue\n"); } @end wcalc-2.4/parser.c0000664000175000000620000030144411101153601012372 0ustar kkstaff/* A Bison parser, made by GNU Bison 2.3. */ /* Skeleton implementation for Bison's Yacc-like parsers in C Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work under terms of your choice, so long as that work isn't itself a parser generator using the skeleton or a modified version thereof as a parser skeleton. Alternatively, if you modify or redistribute the parser skeleton itself, you may (at your option) remove this special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ /* C LALR(1) parser skeleton written by Richard Stallman, by simplifying the original so-called "semantic" parser. */ /* All symbols defined below should begin with yy or YY, to avoid infringing on user name space. This should be done even for local variables, as they might otherwise be expanded by user macros. There are some unavoidable exceptions within include files to define necessary library symbols; they are noted "INFRINGES ON USER NAME SPACE" below. */ /* Identify Bison output. */ #define YYBISON 1 /* Bison version. */ #define YYBISON_VERSION "2.3" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" /* Pure parsers. */ #define YYPURE 0 /* Using locations. */ #define YYLSP_NEEDED 0 /* Tokens. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE /* Put the tokens into the symbol table, so that GDB and other debuggers know about them. */ enum yytokentype { DEC_CMD = 258, OCT_CMD = 259, HEX_CMD = 260, BIN_CMD = 261, GUARD_CMD = 262, DISPLAY_PREFS_CMD = 263, RADIAN_CMD = 264, REMEMBER_CMD = 265, LISTVAR_CMD = 266, STORE_CMD = 267, CMOD_CMD = 268, PRINT_HELP_CMD = 269, PREFIX_CMD = 270, INT_CMD = 271, VERBOSE_CMD = 272, DELIM_CMD = 273, ENG_CMD = 274, HLIMIT_CMD = 275, ROUNDING_INDICATION_CMD = 276, PRECISION_CMD = 277, BITS_CMD = 278, BASE_CMD = 279, CONVERT_CMD = 280, EOLN = 281, OPEN_PARENTHESES = 282, CLOSE_PARENTHESES = 283, OPEN_BRACE = 284, CLOSE_BRACE = 285, OPEN_BRACKET = 286, CLOSE_BRACKET = 287, WPLUS = 288, WMINUS = 289, WMULT = 290, WDIV = 291, WMOD = 292, EQUALS_SIGN = 293, WPOW = 294, WEXP = 295, WSQR = 296, WOR = 297, WAND = 298, WEQUAL = 299, WNEQUAL = 300, WGT = 301, WLT = 302, WGEQ = 303, WLEQ = 304, WLSHFT = 305, WRSHFT = 306, WBOR = 307, WBAND = 308, WBXOR = 309, WBNOT = 310, WNOT = 311, WLOG = 312, WLN = 313, WROUND = 314, WABS = 315, WSQRT = 316, WCEIL = 317, WFLOOR = 318, WCBRT = 319, WLOGTWO = 320, WBANG = 321, WSIN = 322, WCOS = 323, WTAN = 324, WASIN = 325, WACOS = 326, WATAN = 327, WSINH = 328, WCOSH = 329, WTANH = 330, WASINH = 331, WACOSH = 332, WATANH = 333, WCOT = 334, WACOT = 335, WCOTH = 336, WACOTH = 337, WRAND = 338, WIRAND = 339, WFACT = 340, WCOMP = 341, WSEC = 342, WCSC = 343, WASEC = 344, WACSC = 345, WSECH = 346, WCSCH = 347, WASECH = 348, WACSCH = 349, WEINT = 350, WGAMMA = 351, WLNGAMMA = 352, WZETA = 353, WSINC = 354, NUMBER = 355, VARIABLE = 356, STRING = 357, OPEN_CMD = 358, SAVE_CMD = 359, ASSIGNMENT = 360, IDSEP_CMD = 361, DSEP_CMD = 362, ITSEP_CMD = 363, TSEP_CMD = 364, WNEG = 365 }; #endif /* Tokens. */ #define DEC_CMD 258 #define OCT_CMD 259 #define HEX_CMD 260 #define BIN_CMD 261 #define GUARD_CMD 262 #define DISPLAY_PREFS_CMD 263 #define RADIAN_CMD 264 #define REMEMBER_CMD 265 #define LISTVAR_CMD 266 #define STORE_CMD 267 #define CMOD_CMD 268 #define PRINT_HELP_CMD 269 #define PREFIX_CMD 270 #define INT_CMD 271 #define VERBOSE_CMD 272 #define DELIM_CMD 273 #define ENG_CMD 274 #define HLIMIT_CMD 275 #define ROUNDING_INDICATION_CMD 276 #define PRECISION_CMD 277 #define BITS_CMD 278 #define BASE_CMD 279 #define CONVERT_CMD 280 #define EOLN 281 #define OPEN_PARENTHESES 282 #define CLOSE_PARENTHESES 283 #define OPEN_BRACE 284 #define CLOSE_BRACE 285 #define OPEN_BRACKET 286 #define CLOSE_BRACKET 287 #define WPLUS 288 #define WMINUS 289 #define WMULT 290 #define WDIV 291 #define WMOD 292 #define EQUALS_SIGN 293 #define WPOW 294 #define WEXP 295 #define WSQR 296 #define WOR 297 #define WAND 298 #define WEQUAL 299 #define WNEQUAL 300 #define WGT 301 #define WLT 302 #define WGEQ 303 #define WLEQ 304 #define WLSHFT 305 #define WRSHFT 306 #define WBOR 307 #define WBAND 308 #define WBXOR 309 #define WBNOT 310 #define WNOT 311 #define WLOG 312 #define WLN 313 #define WROUND 314 #define WABS 315 #define WSQRT 316 #define WCEIL 317 #define WFLOOR 318 #define WCBRT 319 #define WLOGTWO 320 #define WBANG 321 #define WSIN 322 #define WCOS 323 #define WTAN 324 #define WASIN 325 #define WACOS 326 #define WATAN 327 #define WSINH 328 #define WCOSH 329 #define WTANH 330 #define WASINH 331 #define WACOSH 332 #define WATANH 333 #define WCOT 334 #define WACOT 335 #define WCOTH 336 #define WACOTH 337 #define WRAND 338 #define WIRAND 339 #define WFACT 340 #define WCOMP 341 #define WSEC 342 #define WCSC 343 #define WASEC 344 #define WACSC 345 #define WSECH 346 #define WCSCH 347 #define WASECH 348 #define WACSCH 349 #define WEINT 350 #define WGAMMA 351 #define WLNGAMMA 352 #define WZETA 353 #define WSINC 354 #define NUMBER 355 #define VARIABLE 356 #define STRING 357 #define OPEN_CMD 358 #define SAVE_CMD 359 #define ASSIGNMENT 360 #define IDSEP_CMD 361 #define DSEP_CMD 362 #define ITSEP_CMD 363 #define TSEP_CMD 364 #define WNEG 365 /* Copy the first part of user declarations. */ #line 4 "parser.y" /*#define REENTRANT_PARSER */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #if ! defined(HAVE_CONFIG_H) || HAVE_STRING_H # include #else # if !HAVE_STRCHR # define strchr index # define strrchr rindex # endif char *strchr (), *strrchr (); #endif #include #include #include "number.h" #include #include #include #include /* for isatty() */ #include "calculator.h" #include "variables.h" #include "help.h" #include "files.h" #include "conversion.h" #include "number_formatting.h" #ifdef MEMWATCH #include "memwatch.h" #endif /* Based on the headstart code by Shawn Ostermann * modified by Kyle Wheeler */ /* include debugging code, in case we want it */ #define YYDEBUG 1 /* to make it stop complaining about undeclared functions */ int yylex(); int yyerror(char *error_string, ...); int lines = 1; int synerrors = 0; short scanerror = 0; char * errstring = NULL; int errloc = -1; int show_line_numbers = 0; /* Enabling traces. */ #ifndef YYDEBUG # define YYDEBUG 0 #endif /* Enabling verbose error messages. */ #ifdef YYERROR_VERBOSE # undef YYERROR_VERBOSE # define YYERROR_VERBOSE 1 #else # define YYERROR_VERBOSE 0 #endif /* Enabling the token table. */ #ifndef YYTOKEN_TABLE # define YYTOKEN_TABLE 0 #endif #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE #line 59 "parser.y" { /* the types that we use in the tokens */ enum functions function; enum operations operation; Number number; int integer; enum commands cmd; char * variable; char character; struct conv_req conver; } /* Line 187 of yacc.c. */ #line 381 "parser.c" YYSTYPE; # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 # define YYSTYPE_IS_TRIVIAL 1 #endif /* Copy the second part of user declarations. */ /* Line 216 of yacc.c. */ #line 394 "parser.c" #ifdef short # undef short #endif #ifdef YYTYPE_UINT8 typedef YYTYPE_UINT8 yytype_uint8; #else typedef unsigned char yytype_uint8; #endif #ifdef YYTYPE_INT8 typedef YYTYPE_INT8 yytype_int8; #elif (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) typedef signed char yytype_int8; #else typedef short int yytype_int8; #endif #ifdef YYTYPE_UINT16 typedef YYTYPE_UINT16 yytype_uint16; #else typedef unsigned short int yytype_uint16; #endif #ifdef YYTYPE_INT16 typedef YYTYPE_INT16 yytype_int16; #else typedef short int yytype_int16; #endif #ifndef YYSIZE_T # ifdef __SIZE_TYPE__ # define YYSIZE_T __SIZE_TYPE__ # elif defined size_t # define YYSIZE_T size_t # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) # include /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # else # define YYSIZE_T unsigned int # endif #endif #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) #ifndef YY_ # if YYENABLE_NLS # if ENABLE_NLS # include /* INFRINGES ON USER NAME SPACE */ # define YY_(msgid) dgettext ("bison-runtime", msgid) # endif # endif # ifndef YY_ # define YY_(msgid) msgid # endif #endif /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ # define YYUSE(e) ((void) (e)) #else # define YYUSE(e) /* empty */ #endif /* Identity function, used to suppress warnings about constant conditions. */ #ifndef lint # define YYID(n) (n) #else #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static int YYID (int i) #else static int YYID (i) int i; #endif { return i; } #endif #if ! defined yyoverflow || YYERROR_VERBOSE /* The parser invokes alloca or malloc; define the necessary symbols. */ # ifdef YYSTACK_USE_ALLOCA # if YYSTACK_USE_ALLOCA # ifdef __GNUC__ # define YYSTACK_ALLOC __builtin_alloca # elif defined __BUILTIN_VA_ARG_INCR # include /* INFRINGES ON USER NAME SPACE */ # elif defined _AIX # define YYSTACK_ALLOC __alloca # elif defined _MSC_VER # include /* INFRINGES ON USER NAME SPACE */ # define alloca _alloca # else # define YYSTACK_ALLOC alloca # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) # include /* INFRINGES ON USER NAME SPACE */ # ifndef _STDLIB_H # define _STDLIB_H 1 # endif # endif # endif # endif # endif # ifdef YYSTACK_ALLOC /* Pacify GCC's `empty if-body' warning. */ # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) # ifndef YYSTACK_ALLOC_MAXIMUM /* The OS might guarantee only one guard page at the bottom of the stack, and a page size can be as small as 4096 bytes. So we cannot safely invoke alloca (N) if N exceeds 4096. Use a slightly smaller number to allow for a few compiler-allocated temporary stack slots. */ # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ # endif # else # define YYSTACK_ALLOC YYMALLOC # define YYSTACK_FREE YYFREE # ifndef YYSTACK_ALLOC_MAXIMUM # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM # endif # if (defined __cplusplus && ! defined _STDLIB_H \ && ! ((defined YYMALLOC || defined malloc) \ && (defined YYFREE || defined free))) # include /* INFRINGES ON USER NAME SPACE */ # ifndef _STDLIB_H # define _STDLIB_H 1 # endif # endif # ifndef YYMALLOC # define YYMALLOC malloc # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ # endif # endif # ifndef YYFREE # define YYFREE free # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif # endif # endif #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ #if (! defined yyoverflow \ && (! defined __cplusplus \ || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc { yytype_int16 yyss; YYSTYPE yyvs; }; /* The size of the maximum gap between one aligned stack and the next. */ # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) /* The size of an array large to enough to hold all stacks, each with N elements. */ # define YYSTACK_BYTES(N) \ ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + YYSTACK_GAP_MAXIMUM) /* Copy COUNT objects from FROM to TO. The source and destination do not overlap. */ # ifndef YYCOPY # if defined __GNUC__ && 1 < __GNUC__ # define YYCOPY(To, From, Count) \ __builtin_memcpy (To, From, (Count) * sizeof (*(From))) # else # define YYCOPY(To, From, Count) \ do \ { \ YYSIZE_T yyi; \ for (yyi = 0; yyi < (Count); yyi++) \ (To)[yyi] = (From)[yyi]; \ } \ while (YYID (0)) # endif # endif /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ # define YYSTACK_RELOCATE(Stack) \ do \ { \ YYSIZE_T yynewbytes; \ YYCOPY (&yyptr->Stack, Stack, yysize); \ Stack = &yyptr->Stack; \ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ while (YYID (0)) #endif /* YYFINAL -- State number of the termination state. */ #define YYFINAL 110 /* YYLAST -- Last index in YYTABLE. */ #define YYLAST 995 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 111 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 17 /* YYNRULES -- Number of rules. */ #define YYNRULES 132 /* YYNRULES -- Number of states. */ #define YYNSTATES 175 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 #define YYMAXUTOK 365 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ static const yytype_uint8 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110 }; #if YYDEBUG /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in YYRHS. */ static const yytype_uint16 yyprhs[] = { 0, 0, 3, 5, 6, 8, 11, 14, 17, 20, 22, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 84, 86, 88, 89, 93, 97, 102, 107, 111, 115, 119, 123, 127, 131, 135, 139, 143, 147, 151, 155, 159, 163, 167, 171, 175, 179, 181, 183, 185, 187, 189, 191, 193, 195, 197, 199, 201, 203, 205, 207, 209, 211, 213, 215, 217, 219, 221, 223, 225, 227, 229, 231, 233, 235, 237, 239, 241, 243, 245, 247, 249, 251, 253, 255, 257, 259, 261, 263, 265, 267, 269, 271, 274, 277, 280, 282, 284, 285, 287, 291, 294, 295, 298, 304, 308, 312, 316, 318, 320, 322, 325, 328, 331 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ static const yytype_int8 yyrhs[] = { 112, 0, -1, 113, -1, -1, 114, -1, 114, 113, -1, 119, 115, -1, 118, 115, -1, 116, 115, -1, 115, -1, 1, 115, -1, 26, -1, 5, -1, 4, -1, 6, -1, 3, -1, 107, -1, 106, -1, 109, -1, 108, -1, 18, -1, 16, -1, 17, -1, 8, -1, 9, -1, 7, -1, 22, -1, 20, -1, 11, -1, 19, -1, 21, -1, 15, -1, 10, -1, 14, -1, 103, -1, 104, -1, 23, -1, 25, -1, 24, -1, 12, 101, -1, 13, -1, 102, -1, -1, 105, 119, 117, -1, 105, 102, 117, -1, 100, 38, 119, 117, -1, 100, 38, 102, 117, -1, 119, 34, 119, -1, 119, 33, 119, -1, 119, 43, 119, -1, 119, 42, 119, -1, 119, 52, 119, -1, 119, 54, 119, -1, 119, 53, 119, -1, 119, 44, 119, -1, 119, 45, 119, -1, 119, 46, 119, -1, 119, 47, 119, -1, 119, 48, 119, -1, 119, 49, 119, -1, 119, 50, 119, -1, 119, 51, 119, -1, 119, 35, 119, -1, 119, 36, 119, -1, 119, 37, 119, -1, 123, -1, 67, -1, 68, -1, 69, -1, 79, -1, 87, -1, 88, -1, 70, -1, 71, -1, 72, -1, 80, -1, 89, -1, 90, -1, 73, -1, 74, -1, 75, -1, 81, -1, 91, -1, 92, -1, 76, -1, 77, -1, 78, -1, 82, -1, 93, -1, 94, -1, 57, -1, 65, -1, 58, -1, 59, -1, 60, -1, 61, -1, 40, -1, 63, -1, 62, -1, 64, -1, 83, -1, 84, -1, 55, -1, 56, -1, 85, -1, 86, -1, 95, -1, 96, -1, 97, -1, 98, -1, 99, -1, 27, 28, -1, 29, 30, -1, 31, 32, -1, 34, -1, 33, -1, -1, 125, -1, 122, 123, 124, -1, 125, 124, -1, -1, 127, 124, -1, 127, 39, 122, 125, 124, -1, 27, 119, 28, -1, 29, 119, 30, -1, 31, 119, 32, -1, 121, -1, 126, -1, 100, -1, 127, 66, -1, 127, 41, -1, 120, 126, -1, 120, 122, 127, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { 0, 111, 111, 112, 115, 116, 119, 138, 144, 161, 171, 185, 188, 193, 198, 203, 208, 217, 226, 235, 244, 251, 258, 266, 291, 296, 301, 309, 319, 323, 341, 359, 365, 371, 377, 395, 403, 413, 436, 447, 457, 466, 469, 474, 504, 528, 536, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 614, 615, 616, 619, 620, 621, 624, 625, 632, 637, 640, 644, 653, 655, 657, 659, 662, 664, 665, 671, 672, 678 }; #endif #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { "$end", "error", "$undefined", "DEC_CMD", "OCT_CMD", "HEX_CMD", "BIN_CMD", "GUARD_CMD", "DISPLAY_PREFS_CMD", "RADIAN_CMD", "REMEMBER_CMD", "LISTVAR_CMD", "STORE_CMD", "CMOD_CMD", "PRINT_HELP_CMD", "PREFIX_CMD", "INT_CMD", "VERBOSE_CMD", "DELIM_CMD", "ENG_CMD", "HLIMIT_CMD", "ROUNDING_INDICATION_CMD", "PRECISION_CMD", "BITS_CMD", "BASE_CMD", "CONVERT_CMD", "EOLN", "OPEN_PARENTHESES", "CLOSE_PARENTHESES", "OPEN_BRACE", "CLOSE_BRACE", "OPEN_BRACKET", "CLOSE_BRACKET", "WPLUS", "WMINUS", "WMULT", "WDIV", "WMOD", "EQUALS_SIGN", "WPOW", "WEXP", "WSQR", "WOR", "WAND", "WEQUAL", "WNEQUAL", "WGT", "WLT", "WGEQ", "WLEQ", "WLSHFT", "WRSHFT", "WBOR", "WBAND", "WBXOR", "WBNOT", "WNOT", "WLOG", "WLN", "WROUND", "WABS", "WSQRT", "WCEIL", "WFLOOR", "WCBRT", "WLOGTWO", "WBANG", "WSIN", "WCOS", "WTAN", "WASIN", "WACOS", "WATAN", "WSINH", "WCOSH", "WTANH", "WASINH", "WACOSH", "WATANH", "WCOT", "WACOT", "WCOTH", "WACOTH", "WRAND", "WIRAND", "WFACT", "WCOMP", "WSEC", "WCSC", "WASEC", "WACSC", "WSECH", "WCSCH", "WASECH", "WACSCH", "WEINT", "WGAMMA", "WLNGAMMA", "WZETA", "WSINC", "NUMBER", "VARIABLE", "STRING", "OPEN_CMD", "SAVE_CMD", "ASSIGNMENT", "IDSEP_CMD", "DSEP_CMD", "ITSEP_CMD", "TSEP_CMD", "WNEG", "$accept", "input", "lines", "oneline", "eoln", "command", "optionalstring", "assignment", "exp", "func", "nullexp", "sign", "exp_l2", "oval", "exp_l3", "parenthated", "capsule", 0 }; #endif # ifdef YYPRINT /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to token YYLEX-NUM. */ static const yytype_uint16 yytoknum[] = { 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365 }; # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_uint8 yyr1[] = { 0, 111, 112, 112, 113, 113, 114, 114, 114, 114, 114, 115, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 117, 117, 118, 118, 118, 118, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 121, 121, 121, 122, 122, 122, 123, 123, 124, 124, 125, 125, 126, 126, 126, 126, 127, 127, 127, 127, 127, 127 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ static const yytype_uint8 yyr2[] = { 0, 2, 1, 0, 1, 2, 2, 2, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 0, 3, 3, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 0, 1, 3, 2, 0, 2, 5, 3, 3, 3, 1, 1, 1, 2, 2, 2, 3 }; /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state STATE-NUM when YYTABLE doesn't specify something else to do. Zero means the default is an error. */ static const yytype_uint8 yydefact[] = { 0, 0, 15, 13, 12, 14, 25, 23, 24, 32, 28, 0, 40, 33, 31, 21, 22, 20, 29, 27, 30, 26, 36, 38, 37, 11, 0, 0, 0, 115, 114, 96, 102, 103, 90, 92, 93, 94, 95, 98, 97, 99, 91, 66, 67, 68, 72, 73, 74, 78, 79, 80, 84, 85, 86, 69, 75, 81, 87, 100, 101, 104, 105, 70, 71, 76, 77, 82, 83, 88, 89, 106, 107, 108, 109, 110, 128, 34, 35, 0, 17, 16, 19, 18, 0, 2, 0, 9, 0, 0, 0, 116, 126, 0, 65, 117, 127, 120, 10, 39, 111, 128, 0, 112, 0, 113, 0, 0, 42, 42, 1, 5, 8, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 131, 120, 116, 130, 129, 121, 120, 123, 124, 125, 42, 42, 41, 44, 43, 48, 47, 62, 63, 64, 50, 49, 54, 55, 56, 57, 58, 59, 60, 61, 51, 53, 52, 132, 118, 0, 119, 46, 45, 120, 122 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { -1, 84, 85, 86, 87, 88, 147, 89, 90, 91, 92, 93, 94, 139, 95, 96, 97 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ #define YYPACT_NINF -90 static const yytype_int16 yypact[] = { 0, 4, -90, -90, -90, -90, -90, -90, -90, -90, -90, -69, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, 398, 472, 546, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, -2, -90, -90, 248, -90, -90, -90, -90, 38, -90, 110, -90, 4, 4, 844, 8, -90, 694, -90, -90, -90, 620, -90, -90, -90, -90, 871, -90, 896, -90, 919, 322, -57, 767, -90, -90, -90, -90, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, -90, 768, -90, 768, 10, -90, -90, -90, 768, -90, -90, -90, -57, 767, -90, -90, -90, 235, 235, -8, -8, -8, 619, 619, 187, 187, 187, 187, 187, 187, -8, -8, 619, 619, 941, -13, -90, 768, -90, -90, -90, 768, -90 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { -90, -90, -38, -90, 65, -90, 3, -90, 132, -90, -90, -89, -44, 92, 129, -41, -82 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule which number is the opposite. If zero, do what YYDEFACT says. If YYTABLE_NINF, syntax error. */ #define YYTABLE_NINF -5 static const yytype_int16 yytable[] = { -3, 1, 133, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 137, 27, 25, 28, 99, 29, 30, 26, 107, 27, 110, 28, 31, 29, 30, 29, 30, 146, 131, 169, 111, 135, 134, 167, 0, 138, 0, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 98, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 0, 0, 77, 78, 79, 80, 81, 82, 83, -4, 1, 148, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 0, 27, 0, 28, 0, 29, 30, 0, 0, 171, 172, 0, 31, 0, 0, 112, 113, 132, 0, 0, 102, 104, 106, 0, 0, 0, 0, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 0, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 109, 0, 77, 78, 79, 80, 81, 82, 83, 114, 115, 116, 117, 118, 0, 140, 168, 0, 0, 0, 0, 170, 0, 0, 0, 0, 127, 128, 145, 0, 131, 0, 0, 0, 0, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 140, 174, 0, 0, 0, 140, 116, 117, 118, 0, 0, 26, 0, 27, 0, 28, 0, 29, 30, 0, 0, 127, 128, 0, 31, 131, 0, 0, 0, 0, 0, 0, 0, 0, 173, 0, 0, 0, 140, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 0, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 101, 26, 108, 27, 0, 28, 0, 29, 30, 0, 0, 0, 0, 0, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 0, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 101, 0, 144, 26, 100, 27, 0, 28, 0, 29, 30, 0, 0, 0, 0, 0, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 0, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 101, 26, 0, 27, 103, 28, 0, 29, 30, 0, 0, 0, 0, 0, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 0, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 101, 26, 0, 27, 0, 28, 105, 29, 30, 0, 0, 0, 0, 0, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 0, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 101, 26, 0, 27, 0, 28, 114, 115, 116, 117, 118, 0, 0, 136, 31, 137, 0, 121, 122, 123, 124, 125, 126, 127, 128, 0, 0, 131, 0, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 138, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 101, 26, 0, 27, 0, 28, 0, 29, 30, 0, 0, 0, 0, 0, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 0, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 101, 26, 0, 27, 0, 28, 114, 115, 116, 117, 118, 0, 0, 0, 31, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 0, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 0, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 101, 146, 25, 0, 0, 0, 0, 0, 0, 114, 115, 116, 117, 118, 0, 0, 0, 0, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 141, 0, 0, 0, 0, 114, 115, 116, 117, 118, 0, 0, 0, 0, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 142, 0, 0, 114, 115, 116, 117, 118, 0, 0, 0, 0, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 143, 114, 115, 116, 117, 118, 0, 0, 0, 0, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 114, 115, 116, 117, 118, 0, 0, 0, 0, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131 }; static const yytype_int16 yycheck[] = { 0, 1, 91, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 41, 29, 26, 31, 101, 33, 34, 27, 38, 29, 0, 31, 40, 33, 34, 33, 34, 102, 54, 136, 86, 93, 91, 133, -1, 66, -1, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 1, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, -1, -1, 103, 104, 105, 106, 107, 108, 109, 0, 1, 109, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, -1, 29, -1, 31, -1, 33, 34, -1, -1, 144, 145, -1, 40, -1, -1, 88, 89, 90, -1, -1, 26, 27, 28, -1, -1, -1, -1, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, -1, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 79, -1, 103, 104, 105, 106, 107, 108, 109, 33, 34, 35, 36, 37, -1, 97, 135, -1, -1, -1, -1, 140, -1, -1, -1, -1, 50, 51, 107, -1, 54, -1, -1, -1, -1, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 135, 173, -1, -1, -1, 140, 35, 36, 37, -1, -1, 27, -1, 29, -1, 31, -1, 33, 34, -1, -1, 50, 51, -1, 40, 54, -1, -1, -1, -1, -1, -1, -1, -1, 169, -1, -1, -1, 173, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, -1, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 27, 102, 29, -1, 31, -1, 33, 34, -1, -1, -1, -1, -1, 40, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, -1, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, -1, 102, 27, 28, 29, -1, 31, -1, 33, 34, -1, -1, -1, -1, -1, 40, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, -1, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 27, -1, 29, 30, 31, -1, 33, 34, -1, -1, -1, -1, -1, 40, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, -1, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 27, -1, 29, -1, 31, 32, 33, 34, -1, -1, -1, -1, -1, 40, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, -1, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 27, -1, 29, -1, 31, 33, 34, 35, 36, 37, -1, -1, 39, 40, 41, -1, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, 54, -1, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 27, -1, 29, -1, 31, -1, 33, 34, -1, -1, -1, -1, -1, 40, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, -1, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 27, -1, 29, -1, 31, 33, 34, 35, 36, 37, -1, -1, -1, 40, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, -1, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, -1, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 102, 26, -1, -1, -1, -1, -1, -1, 33, 34, 35, 36, 37, -1, -1, -1, -1, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 28, -1, -1, -1, -1, 33, 34, 35, 36, 37, -1, -1, -1, -1, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 30, -1, -1, 33, 34, 35, 36, 37, -1, -1, -1, -1, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 32, 33, 34, 35, 36, 37, -1, -1, -1, -1, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 33, 34, 35, 36, 37, -1, -1, -1, -1, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { 0, 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 29, 31, 33, 34, 40, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 103, 104, 105, 106, 107, 108, 109, 112, 113, 114, 115, 116, 118, 119, 120, 121, 122, 123, 125, 126, 127, 115, 101, 28, 100, 119, 30, 119, 32, 119, 38, 102, 119, 0, 113, 115, 115, 33, 34, 35, 36, 37, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 115, 122, 126, 123, 39, 41, 66, 124, 125, 28, 30, 32, 102, 119, 102, 117, 117, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 127, 124, 122, 124, 117, 117, 125, 124 }; #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) #define YYEMPTY (-2) #define YYEOF 0 #define YYACCEPT goto yyacceptlab #define YYABORT goto yyabortlab #define YYERROR goto yyerrorlab /* Like YYERROR except do call yyerror. This remains here temporarily to ease the transition to the new meaning of YYERROR, for GCC. Once GCC version 2 has supplanted version 1, this can go. */ #define YYFAIL goto yyerrlab #define YYRECOVERING() (!!yyerrstatus) #define YYBACKUP(Token, Value) \ do \ if (yychar == YYEMPTY && yylen == 1) \ { \ yychar = (Token); \ yylval = (Value); \ yytoken = YYTRANSLATE (yychar); \ YYPOPSTACK (1); \ goto yybackup; \ } \ else \ { \ yyerror (YY_("syntax error: cannot back up")); \ YYERROR; \ } \ while (YYID (0)) #define YYTERROR 1 #define YYERRCODE 256 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. If N is 0, then set CURRENT to the empty location which ends the previous symbol: RHS[0] (always defined). */ #define YYRHSLOC(Rhs, K) ((Rhs)[K]) #ifndef YYLLOC_DEFAULT # define YYLLOC_DEFAULT(Current, Rhs, N) \ do \ if (YYID (N)) \ { \ (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ } \ else \ { \ (Current).first_line = (Current).last_line = \ YYRHSLOC (Rhs, 0).last_line; \ (Current).first_column = (Current).last_column = \ YYRHSLOC (Rhs, 0).last_column; \ } \ while (YYID (0)) #endif /* YY_LOCATION_PRINT -- Print the location on the stream. This macro was not mandated originally: define only if we know we won't break user code: when these are the locations we know. */ #ifndef YY_LOCATION_PRINT # if YYLTYPE_IS_TRIVIAL # define YY_LOCATION_PRINT(File, Loc) \ fprintf (File, "%d.%d-%d.%d", \ (Loc).first_line, (Loc).first_column, \ (Loc).last_line, (Loc).last_column) # else # define YY_LOCATION_PRINT(File, Loc) ((void) 0) # endif #endif /* YYLEX -- calling `yylex' with the right arguments. */ #ifdef YYLEX_PARAM # define YYLEX yylex (YYLEX_PARAM) #else # define YYLEX yylex () #endif /* Enable debugging if requested. */ #if YYDEBUG # ifndef YYFPRINTF # include /* INFRINGES ON USER NAME SPACE */ # define YYFPRINTF fprintf # endif # define YYDPRINTF(Args) \ do { \ if (yydebug) \ YYFPRINTF Args; \ } while (YYID (0)) # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ do { \ if (yydebug) \ { \ YYFPRINTF (stderr, "%s ", Title); \ yy_symbol_print (stderr, \ Type, Value); \ YYFPRINTF (stderr, "\n"); \ } \ } while (YYID (0)) /*--------------------------------. | Print this symbol on YYOUTPUT. | `--------------------------------*/ /*ARGSUSED*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) #else static void yy_symbol_value_print (yyoutput, yytype, yyvaluep) FILE *yyoutput; int yytype; YYSTYPE const * const yyvaluep; #endif { if (!yyvaluep) return; # ifdef YYPRINT if (yytype < YYNTOKENS) YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); # else YYUSE (yyoutput); # endif switch (yytype) { default: break; } } /*--------------------------------. | Print this symbol on YYOUTPUT. | `--------------------------------*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) #else static void yy_symbol_print (yyoutput, yytype, yyvaluep) FILE *yyoutput; int yytype; YYSTYPE const * const yyvaluep; #endif { if (yytype < YYNTOKENS) YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); else YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); yy_symbol_value_print (yyoutput, yytype, yyvaluep); YYFPRINTF (yyoutput, ")"); } /*------------------------------------------------------------------. | yy_stack_print -- Print the state stack from its BOTTOM up to its | | TOP (included). | `------------------------------------------------------------------*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) #else static void yy_stack_print (bottom, top) yytype_int16 *bottom; yytype_int16 *top; #endif { YYFPRINTF (stderr, "Stack now"); for (; bottom <= top; ++bottom) YYFPRINTF (stderr, " %d", *bottom); YYFPRINTF (stderr, "\n"); } # define YY_STACK_PRINT(Bottom, Top) \ do { \ if (yydebug) \ yy_stack_print ((Bottom), (Top)); \ } while (YYID (0)) /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_reduce_print (YYSTYPE *yyvsp, int yyrule) #else static void yy_reduce_print (yyvsp, yyrule) YYSTYPE *yyvsp; int yyrule; #endif { int yynrhs = yyr2[yyrule]; int yyi; unsigned long int yylno = yyrline[yyrule]; YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", yyrule - 1, yylno); /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { fprintf (stderr, " $%d = ", yyi + 1); yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], &(yyvsp[(yyi + 1) - (yynrhs)]) ); fprintf (stderr, "\n"); } } # define YY_REDUCE_PRINT(Rule) \ do { \ if (yydebug) \ yy_reduce_print (yyvsp, Rule); \ } while (YYID (0)) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ # define YYDPRINTF(Args) # define YY_SYMBOL_PRINT(Title, Type, Value, Location) # define YY_STACK_PRINT(Bottom, Top) # define YY_REDUCE_PRINT(Rule) #endif /* !YYDEBUG */ /* YYINITDEPTH -- initial size of the parser's stacks. */ #ifndef YYINITDEPTH # define YYINITDEPTH 200 #endif /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only if the built-in stack extension method is used). Do not make this value too large; the results are undefined if YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) evaluated with infinite-precision integer arithmetic. */ #ifndef YYMAXDEPTH # define YYMAXDEPTH 10000 #endif #if YYERROR_VERBOSE # ifndef yystrlen # if defined __GLIBC__ && defined _STRING_H # define yystrlen strlen # else /* Return the length of YYSTR. */ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static YYSIZE_T yystrlen (const char *yystr) #else static YYSIZE_T yystrlen (yystr) const char *yystr; #endif { YYSIZE_T yylen; for (yylen = 0; yystr[yylen]; yylen++) continue; return yylen; } # endif # endif # ifndef yystpcpy # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE # define yystpcpy stpcpy # else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static char * yystpcpy (char *yydest, const char *yysrc) #else static char * yystpcpy (yydest, yysrc) char *yydest; const char *yysrc; #endif { char *yyd = yydest; const char *yys = yysrc; while ((*yyd++ = *yys++) != '\0') continue; return yyd - 1; } # endif # endif # ifndef yytnamerr /* Copy to YYRES the contents of YYSTR after stripping away unnecessary quotes and backslashes, so that it's suitable for yyerror. The heuristic is that double-quoting is unnecessary unless the string contains an apostrophe, a comma, or backslash (other than backslash-backslash). YYSTR is taken from yytname. If YYRES is null, do not copy; instead, return the length of what the result would have been. */ static YYSIZE_T yytnamerr (char *yyres, const char *yystr) { if (*yystr == '"') { YYSIZE_T yyn = 0; char const *yyp = yystr; for (;;) switch (*++yyp) { case '\'': case ',': goto do_not_strip_quotes; case '\\': if (*++yyp != '\\') goto do_not_strip_quotes; /* Fall through. */ default: if (yyres) yyres[yyn] = *yyp; yyn++; break; case '"': if (yyres) yyres[yyn] = '\0'; return yyn; } do_not_strip_quotes: ; } if (! yyres) return yystrlen (yystr); return yystpcpy (yyres, yystr) - yyres; } # endif /* Copy into YYRESULT an error message about the unexpected token YYCHAR while in state YYSTATE. Return the number of bytes copied, including the terminating null byte. If YYRESULT is null, do not copy anything; just return the number of bytes that would be copied. As a special case, return 0 if an ordinary "syntax error" message will do. Return YYSIZE_MAXIMUM if overflow occurs during size calculation. */ static YYSIZE_T yysyntax_error (char *yyresult, int yystate, int yychar) { int yyn = yypact[yystate]; if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) return 0; else { int yytype = YYTRANSLATE (yychar); YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); YYSIZE_T yysize = yysize0; YYSIZE_T yysize1; int yysize_overflow = 0; enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; int yyx; # if 0 /* This is so xgettext sees the translatable formats that are constructed on the fly. */ YY_("syntax error, unexpected %s"); YY_("syntax error, unexpected %s, expecting %s"); YY_("syntax error, unexpected %s, expecting %s or %s"); YY_("syntax error, unexpected %s, expecting %s or %s or %s"); YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); # endif char *yyfmt; char const *yyf; static char const yyunexpected[] = "syntax error, unexpected %s"; static char const yyexpecting[] = ", expecting %s"; static char const yyor[] = " or %s"; char yyformat[sizeof yyunexpected + sizeof yyexpecting - 1 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) * (sizeof yyor - 1))]; char const *yyprefix = yyexpecting; /* Start YYX at -YYN if negative to avoid negative indexes in YYCHECK. */ int yyxbegin = yyn < 0 ? -yyn : 0; /* Stay within bounds of both yycheck and yytname. */ int yychecklim = YYLAST - yyn + 1; int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; int yycount = 1; yyarg[0] = yytname[yytype]; yyfmt = yystpcpy (yyformat, yyunexpected); for (yyx = yyxbegin; yyx < yyxend; ++yyx) if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) { if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) { yycount = 1; yysize = yysize0; yyformat[sizeof yyunexpected - 1] = '\0'; break; } yyarg[yycount++] = yytname[yyx]; yysize1 = yysize + yytnamerr (0, yytname[yyx]); yysize_overflow |= (yysize1 < yysize); yysize = yysize1; yyfmt = yystpcpy (yyfmt, yyprefix); yyprefix = yyor; } yyf = YY_(yyformat); yysize1 = yysize + yystrlen (yyf); yysize_overflow |= (yysize1 < yysize); yysize = yysize1; if (yysize_overflow) return YYSIZE_MAXIMUM; if (yyresult) { /* Avoid sprintf, as that infringes on the user's name space. Don't have undefined behavior even if the translation produced a string with the wrong number of "%s"s. */ char *yyp = yyresult; int yyi = 0; while ((*yyp = *yyf) != '\0') { if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) { yyp += yytnamerr (yyp, yyarg[yyi++]); yyf += 2; } else { yyp++; yyf++; } } } return yysize; } } #endif /* YYERROR_VERBOSE */ /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ /*ARGSUSED*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) #else static void yydestruct (yymsg, yytype, yyvaluep) const char *yymsg; int yytype; YYSTYPE *yyvaluep; #endif { YYUSE (yyvaluep); if (!yymsg) yymsg = "Deleting"; YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); switch (yytype) { default: break; } } /* Prevent warnings from -Wmissing-prototypes. */ #ifdef YYPARSE_PARAM #if defined __STDC__ || defined __cplusplus int yyparse (void *YYPARSE_PARAM); #else int yyparse (); #endif #else /* ! YYPARSE_PARAM */ #if defined __STDC__ || defined __cplusplus int yyparse (void); #else int yyparse (); #endif #endif /* ! YYPARSE_PARAM */ /* The look-ahead symbol. */ int yychar; /* The semantic value of the look-ahead symbol. */ YYSTYPE yylval; /* Number of syntax errors so far. */ int yynerrs; /*----------. | yyparse. | `----------*/ #ifdef YYPARSE_PARAM #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) int yyparse (void *YYPARSE_PARAM) #else int yyparse (YYPARSE_PARAM) void *YYPARSE_PARAM; #endif #else /* ! YYPARSE_PARAM */ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) int yyparse (void) #else int yyparse () #endif #endif { int yystate; int yyn; int yyresult; /* Number of tokens to shift before error messages enabled. */ int yyerrstatus; /* Look-ahead token as an internal (translated) token number. */ int yytoken = 0; #if YYERROR_VERBOSE /* Buffer for error messages, and its allocated size. */ char yymsgbuf[128]; char *yymsg = yymsgbuf; YYSIZE_T yymsg_alloc = sizeof yymsgbuf; #endif /* Three stacks and their tools: `yyss': related to states, `yyvs': related to semantic values, `yyls': related to locations. Refer to the stacks thru separate pointers, to allow yyoverflow to reallocate them elsewhere. */ /* The state stack. */ yytype_int16 yyssa[YYINITDEPTH]; yytype_int16 *yyss = yyssa; yytype_int16 *yyssp; /* The semantic value stack. */ YYSTYPE yyvsa[YYINITDEPTH]; YYSTYPE *yyvs = yyvsa; YYSTYPE *yyvsp; #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) YYSIZE_T yystacksize = YYINITDEPTH; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; /* The number of symbols on the RHS of the reduced rule. Keep to zero when no symbol should be popped. */ int yylen = 0; YYDPRINTF ((stderr, "Starting parse\n")); yystate = 0; yyerrstatus = 0; yynerrs = 0; yychar = YYEMPTY; /* Cause a token to be read. */ /* Initialize stack pointers. Waste one element of value and location stack so that they stay on the same level as the state stack. The wasted elements are never initialized. */ yyssp = yyss; yyvsp = yyvs; goto yysetstate; /*------------------------------------------------------------. | yynewstate -- Push a new state, which is found in yystate. | `------------------------------------------------------------*/ yynewstate: /* In all cases, when you get here, the value and location stacks have just been pushed. So pushing a state here evens the stacks. */ yyssp++; yysetstate: *yyssp = yystate; if (yyss + yystacksize - 1 <= yyssp) { /* Get the current used size of the three stacks, in elements. */ YYSIZE_T yysize = yyssp - yyss + 1; #ifdef yyoverflow { /* Give user a chance to reallocate the stack. Use copies of these so that the &'s don't force the real ones into memory. */ YYSTYPE *yyvs1 = yyvs; yytype_int16 *yyss1 = yyss; /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. This used to be a conditional around just the two extra args, but that might be undefined if yyoverflow is a macro. */ yyoverflow (YY_("memory exhausted"), &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), &yystacksize); yyss = yyss1; yyvs = yyvs1; } #else /* no yyoverflow */ # ifndef YYSTACK_RELOCATE goto yyexhaustedlab; # else /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) goto yyexhaustedlab; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) yystacksize = YYMAXDEPTH; { yytype_int16 *yyss1 = yyss; union yyalloc *yyptr = (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) goto yyexhaustedlab; YYSTACK_RELOCATE (yyss); YYSTACK_RELOCATE (yyvs); # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); } # endif #endif /* no yyoverflow */ yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; YYDPRINTF ((stderr, "Stack size increased to %lu\n", (unsigned long int) yystacksize)); if (yyss + yystacksize - 1 <= yyssp) YYABORT; } YYDPRINTF ((stderr, "Entering state %d\n", yystate)); goto yybackup; /*-----------. | yybackup. | `-----------*/ yybackup: /* Do appropriate processing given the current state. Read a look-ahead token if we need one and don't already have one. */ /* First try to decide what to do without reference to look-ahead token. */ yyn = yypact[yystate]; if (yyn == YYPACT_NINF) goto yydefault; /* Not known => get a look-ahead token if don't already have one. */ /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); yychar = YYLEX; } if (yychar <= YYEOF) { yychar = yytoken = YYEOF; YYDPRINTF ((stderr, "Now at end of input.\n")); } else { yytoken = YYTRANSLATE (yychar); YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); } /* If the proper action on seeing token YYTOKEN is to reduce or to detect an error, take that action. */ yyn += yytoken; if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) goto yydefault; yyn = yytable[yyn]; if (yyn <= 0) { if (yyn == 0 || yyn == YYTABLE_NINF) goto yyerrlab; yyn = -yyn; goto yyreduce; } if (yyn == YYFINAL) YYACCEPT; /* Count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; /* Shift the look-ahead token. */ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); /* Discard the shifted token unless it is eof. */ if (yychar != YYEOF) yychar = YYEMPTY; yystate = yyn; *++yyvsp = yylval; goto yynewstate; /*-----------------------------------------------------------. | yydefault -- do the default action for the current state. | `-----------------------------------------------------------*/ yydefault: yyn = yydefact[yystate]; if (yyn == 0) goto yyerrlab; goto yyreduce; /*-----------------------------. | yyreduce -- Do a reduction. | `-----------------------------*/ yyreduce: /* yyn is the number of a rule to reduce with. */ yylen = yyr2[yyn]; /* If YYLEN is nonzero, implement the default value of the action: `$$ = $1'. Otherwise, the following line sets YYVAL to garbage. This behavior is undocumented and Bison users should not rely upon it. Assigning to YYVAL unconditionally makes the parser a bit smaller, and it avoids a GCC warning that YYVAL may be used uninitialized. */ yyval = yyvsp[1-yylen]; YY_REDUCE_PRINT (yyn); switch (yyn) { case 6: #line 120 "parser.y" { extern int line_is_a_command; if (scanerror) { scanerror = synerrors = 0; } else { if (! synerrors && ! yynerrs) { set_prettyanswer((yyvsp[(1) - (2)].number)); num_set(last_answer,(yyvsp[(1) - (2)].number)); } else { synerrors = 0; report_error("Too many errors."); } } num_free((yyvsp[(1) - (2)].number)); compute = 1; line_is_a_command = 0; } break; case 7: #line 138 "parser.y" { extern int line_is_a_command; compute = 1; line_is_a_command = 0; } break; case 8: #line 144 "parser.y" { extern int line_is_a_command; switch ((yyvsp[(1) - (2)].cmd)) { case redisplay: if (! synerrors) { set_prettyanswer(last_answer); } else { synerrors = 0; report_error("Too many errors."); } break; case nothing: break; } compute = 1; line_is_a_command = 0; } break; case 9: #line 162 "parser.y" { extern int line_is_a_command; if (scanerror) { scanerror = synerrors = 0; } compute = 1; line_is_a_command = 0; } break; case 10: #line 171 "parser.y" { extern int line_is_a_command; /* there is the possibility of lost memory here, * because "error" has no data type * (and because I'm passing around *actual* Number's * rather than pointers to them) */ /* report_error("3 Error in scanner halts parser."); */ compute = 1; line_is_a_command = 0; } break; case 11: #line 185 "parser.y" { ++lines; } break; case 12: #line 188 "parser.y" { (yyval.cmd) = isatty(0)?redisplay:nothing; conf.output_format = HEXADECIMAL_FORMAT; if (standard_output) printf("Hexadecimal Formatted Output\n");} break; case 13: #line 193 "parser.y" { (yyval.cmd) = isatty(0)?redisplay:nothing; conf.output_format = OCTAL_FORMAT; if (standard_output) printf("Octal Formatted Output\n");} break; case 14: #line 198 "parser.y" { (yyval.cmd) = isatty(0)?redisplay:nothing; conf.output_format = BINARY_FORMAT; if (standard_output) printf("Binary Formatted Output\n");} break; case 15: #line 203 "parser.y" { (yyval.cmd) = isatty(0)?redisplay:nothing; conf.output_format = DECIMAL_FORMAT; if (standard_output) printf("Decimal Formatted Output\n");} break; case 16: #line 208 "parser.y" { (yyval.cmd) = nothing; if (conf.thou_delimiter != (yyvsp[(1) - (1)].character)) { conf.dec_delimiter = (yyvsp[(1) - (1)].character); if (standard_output) printf("%c is now the decimal separator.\n", (yyvsp[(1) - (1)].character)); } else if (standard_output) { printf("%c cannot be the decimal separator. It is the thousands separator.\n", (yyvsp[(1) - (1)].character)); }} break; case 17: #line 217 "parser.y" { (yyval.cmd) = nothing; if (conf.in_thou_delimiter != (yyvsp[(1) - (1)].character) && (conf.in_thou_delimiter != 0 || conf.thou_delimiter != (yyvsp[(1) - (1)].character))) { conf.in_dec_delimiter = (yyvsp[(1) - (1)].character); if (standard_output) printf("%c is now the decimal separator for input.\n", (yyvsp[(1) - (1)].character)); } else if (standard_output) { printf("%c cannot be the decimal separator. It is the thousands separator.\n", (yyvsp[(1) - (1)].character)); }} break; case 18: #line 226 "parser.y" { (yyval.cmd) = nothing; if (conf.dec_delimiter != (yyvsp[(1) - (1)].character)) { conf.thou_delimiter = (yyvsp[(1) - (1)].character); if (standard_output) printf("%c is now the thousands separator.\n", (yyvsp[(1) - (1)].character)); } else if (standard_output) { printf("%c cannot be the thousands separator. It is the decimal separator.\n", (yyvsp[(1) - (1)].character)); }} break; case 19: #line 235 "parser.y" { (yyval.cmd) = nothing; if (conf.in_dec_delimiter != (yyvsp[(1) - (1)].character) && (conf.in_dec_delimiter != 0 || conf.dec_delimiter != (yyvsp[(1) - (1)].character))) { conf.in_thou_delimiter = (yyvsp[(1) - (1)].character); if (standard_output) printf("%c is now the thousands separator for input.\n", (yyvsp[(1) - (1)].character)); } else if (standard_output) { printf("%c cannot be the thousands separator. It is the decimal separator.\n", (yyvsp[(1) - (1)].character)); }} break; case 20: #line 244 "parser.y" { (yyval.cmd) = nothing; conf.print_commas = ! conf.print_commas; if (standard_output) { printf("Will %sshow separators when printing large numbers.\n",conf.print_commas?"":"not "); } } break; case 21: #line 251 "parser.y" { (yyval.cmd) = nothing; conf.print_ints = ! conf.print_ints; if (standard_output) { printf("Will %suse abbreviations for large integers.\n",conf.print_ints?"not ":""); } } break; case 22: #line 259 "parser.y" { (yyval.cmd) = nothing; conf.verbose = ! conf.verbose; if (standard_output) { printf("Will %secho the lines to be evaluated.\n",conf.verbose?"":"not "); } } break; case 23: #line 266 "parser.y" { if (standard_output) { printf(" Display Precision: %-3i %s -> \\p\n",conf.precision,((conf.precision==-1)?"(auto)":" ")); printf(" Internal Precision: %-24lu -> \\bits\n", (unsigned long) num_get_default_prec()); printf(" Engineering Output: %s -> \\e\n", (conf.engineering==always)?"always":(conf.engineering==never)?"never ":"auto "); printf(" Output Format: %s -> \\b, \\d, \\h, \\o\n",output_string(conf.output_format)); printf(" Use Radians: %s -> \\r or \\radians\n",conf.use_radians?"yes":"no "); printf(" Print Prefixes: %s -> \\pre or \\prefixes\n",conf.print_prefixes?"yes":"no "); printf("Avoid Abbreviating Integers: %s -> \\ints\n",conf.print_ints?"yes":"no "); printf(" Rounding Indication: %s -> \\round\n",conf.rounding_indication==SIMPLE_ROUNDING_INDICATION?"yes (simple) ":(conf.rounding_indication==SIG_FIG_ROUNDING_INDICATION?"yes (sig_fig)":"no ")); printf(" Save Errors in History: %s -> \\re\n",conf.remember_errors?"yes":"no "); printf(" Thousands Delimiter: '%c' -> \\tsep\n",conf.thou_delimiter); printf(" Decimal Delimiter: '%c' -> \\dsep\n",conf.dec_delimiter); printf(" Precision Guard: %s -> \\cons\n",conf.precision_guard?"yes":"no "); printf(" History Limit: %s -> \\hlimit\n",conf.history_limit?"yes":"no "); if (conf.history_limit) { printf(" History Limited To: %lu\n",conf.history_limit_len); } printf(" Verbose: %s -> \\verbose\n",conf.verbose?"yes":"no "); printf(" Display Delimiters: %s -> \\delim\n",conf.print_commas?"yes":"no "); printf(" Modulo Operator: %s -> \\cmod\n",conf.c_style_mod?"C-style ":"not C-style"); } (yyval.cmd) = nothing; } break; case 24: #line 291 "parser.y" { (yyval.cmd) = nothing; conf.use_radians = ! conf.use_radians; if (standard_output) printf("Now Using %s\n", conf.use_radians?"Radians":"Degrees");} break; case 25: #line 296 "parser.y" { (yyval.cmd) = nothing; conf.precision_guard = ! conf.precision_guard; if (standard_output) printf("Now %sUsing Conservative Precision\n", conf.precision_guard?"":"Not ");} break; case 26: #line 301 "parser.y" { (yyval.cmd) = isatty(0)?redisplay:nothing; conf.precision = (yyvsp[(1) - (1)].integer); if (standard_output) { printf("Precision = "); if (conf.precision == -1) printf("auto\n"); else printf("%i\n", conf.precision); }} break; case 27: #line 309 "parser.y" { (yyval.cmd) = nothing; if ((yyvsp[(1) - (1)].integer)) { conf.history_limit = 1; conf.history_limit_len = (yyvsp[(1) - (1)].integer); } else { conf.history_limit = 0; conf.history_limit_len = 0; } } break; case 28: #line 319 "parser.y" { printvariables(); (yyval.cmd) = nothing; } break; case 29: #line 323 "parser.y" { if ((yyvsp[(1) - (1)].integer) < 0) { switch (conf.engineering) { case always: conf.engineering = never; break; case never: conf.engineering = automatic; break; case automatic: conf.engineering = always; break; } } else { switch((yyvsp[(1) - (1)].integer)) { case 1: conf.engineering = automatic; break; case 2: conf.engineering = always; break; case 3: conf.engineering = never; break; } } if (standard_output) printf("Engineering notation is %s\n",(conf.engineering==always)?"always used":(conf.engineering==never)?"never used":"used if convenient"); (yyval.cmd) = isatty(0)?redisplay:nothing; } break; case 30: #line 341 "parser.y" { (yyval.cmd) = nothing; if ((yyvsp[(1) - (1)].integer) != -1) conf.rounding_indication = (yyvsp[(1) - (1)].integer); else { conf.rounding_indication += 1; conf.rounding_indication %= 3; } if (standard_output) { printf("Will display "); switch(conf.rounding_indication) { case NO_ROUNDING_INDICATION: printf("no"); break; case SIMPLE_ROUNDING_INDICATION: printf("simple"); break; case SIG_FIG_ROUNDING_INDICATION: printf("significant figure"); break; } printf(" rounding indication\n"); } } break; case 31: #line 359 "parser.y" { (yyval.cmd) = nothing; conf.print_prefixes = ! conf.print_prefixes; if (standard_output) printf("Will %sprint number prefixes\n",conf.print_prefixes?"":"not "); } break; case 32: #line 365 "parser.y" { (yyval.cmd) = nothing; conf.remember_errors = ! conf.remember_errors; if (standard_output) printf("Statements that produce errors are %s.\n",conf.remember_errors?"recorded":"forgotten"); } break; case 33: #line 371 "parser.y" { (yyval.cmd) = nothing; if (standard_output) { print_interactive_help(); } } break; case 34: #line 377 "parser.y" { extern char* open_file; int i; unsigned int len = strlen((yyvsp[(1) - (1)].variable))+1; open_file = malloc(len); snprintf(open_file,len,"%s",(yyvsp[(1) - (1)].variable)); /* strip trailing spaces */ for (i=strlen(open_file)-1;i>=0;i--) { if (open_file[i] != ' ') break; open_file[i] = 0; } if (strlen(open_file) == 0) { free(open_file); open_file = NULL; report_error("Please specify a file name to open."); } (yyval.cmd) = nothing; } break; case 35: #line 395 "parser.y" { int retval; retval = saveState((yyvsp[(1) - (1)].variable)); if (retval) { report_error("Could not save file. (%s)", (char*)strerror(retval)); } (yyval.cmd) = nothing; } break; case 36: #line 403 "parser.y" { if ((yyvsp[(1) - (1)].integer) < NUM_PREC_MIN) { report_error("Minimum precision is %lu.\n", (unsigned long)NUM_PREC_MIN); } else if ((yyvsp[(1) - (1)].integer) > (signed)NUM_PREC_MAX) { report_error("Maximum precision is %lu.\n", (unsigned long)NUM_PREC_MAX); } else { num_set_default_prec((yyvsp[(1) - (1)].integer)); } (yyval.cmd) = nothing; } break; case 37: #line 414 "parser.y" { int category = identify_units((yyvsp[(1) - (1)].conver).u1,(yyvsp[(1) - (1)].conver).u2); switch (category) { case -1: report_error("Units must be in the same category."); break; case -2: report_error("Units provided are not recognized."); break; case -3: report_error("First unit provided was not recognized (%s).", (yyvsp[(1) - (1)].conver).u1); break; case -4: report_error("Second unit provided was not recognized (%s).", (yyvsp[(1) - (1)].conver).u2); break; default: uber_conversion(last_answer,category,unit_id(category,(yyvsp[(1) - (1)].conver).u1),unit_id(category,(yyvsp[(1) - (1)].conver).u2),last_answer); } free((yyvsp[(1) - (1)].conver).u1); free((yyvsp[(1) - (1)].conver).u2); (yyval.cmd) = redisplay; } break; case 38: #line 437 "parser.y" { if ((yyvsp[(1) - (1)].integer) >= 2 && (yyvsp[(1) - (1)].integer) <= 36) { char * str, junk; str = num_to_str_complex(last_answer, (yyvsp[(1) - (1)].integer), conf.engineering, -1, conf.print_prefixes, &junk); printf("base %i: %s\n",(yyvsp[(1) - (1)].integer),str); } else { report_error("Base must be greater than one and less than 37."); } (yyval.cmd) = nothing; } break; case 39: #line 448 "parser.y" { int retval = storeVar((yyvsp[(2) - (2)].variable)); if (retval == 0) { printf("successfully stored %s\n",(yyvsp[(2) - (2)].variable)); } else { report_error("Failure to store variable!"); } free((yyvsp[(2) - (2)].variable)); } break; case 40: #line 458 "parser.y" { (yyval.cmd) = nothing; conf.c_style_mod = ! conf.c_style_mod; if (standard_output) printf("The mod (%%) operation will %sbehave like it does in the C programming language.\n",conf.c_style_mod?"":"not "); } break; case 41: #line 466 "parser.y" { (yyval.variable) = (yyvsp[(1) - (1)].variable); } break; case 42: #line 469 "parser.y" { (yyval.variable) = NULL; } break; case 43: #line 475 "parser.y" { if (compute && ! scanerror) { /* if standard_error, q is reserved */ if (standard_output && !strcmp((yyvsp[(1) - (3)].variable),"q")) { report_error("q cannot be assigned a value. q is used to exit."); } else { if (putval((yyvsp[(1) - (3)].variable),(yyvsp[(2) - (3)].number),(yyvsp[(3) - (3)].variable)) == 0) { if (standard_output) { Number val; num_init(val); printf((yyvsp[(1) - (3)].variable)); getvarval(val, (yyvsp[(1) - (3)].variable)); print_this_result(val); num_free(val); } } else { report_error("There was a problem assigning the value."); } } num_free((yyvsp[(2) - (3)].number)); } else { scanerror = 0; report_error("Scanner error halts parser."); } free((yyvsp[(1) - (3)].variable)); if ((yyvsp[(3) - (3)].variable) != NULL) { free((yyvsp[(3) - (3)].variable)); } } break; case 44: #line 505 "parser.y" { if (compute && ! scanerror) { if (standard_output && !strcmp((yyvsp[(1) - (3)].variable),"q")) { report_error("q cannot be assigned an expression. q is used to exit."); } else { if (putexp((yyvsp[(1) - (3)].variable),(yyvsp[(2) - (3)].variable),(yyvsp[(3) - (3)].variable)) == 0) { if (standard_output) { printf("%s = %s\n", (yyvsp[(1) - (3)].variable), getvar_full((yyvsp[(1) - (3)].variable)).exp); } } else { report_error("There was a problem assigning the expression."); } } } else { scanerror = 0; report_error("Scanner error halts parser."); } free((yyvsp[(1) - (3)].variable)); free((yyvsp[(2) - (3)].variable)); if ((yyvsp[(3) - (3)].variable) != NULL) { free((yyvsp[(3) - (3)].variable)); } } break; case 45: #line 529 "parser.y" { report_error("Constants cannot be assigned to other values."); num_free((yyvsp[(3) - (4)].number)); if ((yyvsp[(4) - (4)].variable) != NULL) { free((yyvsp[(4) - (4)].variable)); } } break; case 46: #line 537 "parser.y" { report_error("Constants cannot be assigned to other values."); free((yyvsp[(3) - (4)].variable)); if ((yyvsp[(4) - (4)].variable) != NULL) { free((yyvsp[(4) - (4)].variable)); } } break; case 47: #line 546 "parser.y" { num_init((yyval.number)); simple_exp((yyval.number), (yyvsp[(1) - (3)].number), wminus, (yyvsp[(3) - (3)].number)); num_free((yyvsp[(1) - (3)].number)); num_free((yyvsp[(3) - (3)].number)); } break; case 48: #line 547 "parser.y" { num_init((yyval.number)); simple_exp((yyval.number), (yyvsp[(1) - (3)].number), wplus, (yyvsp[(3) - (3)].number)); num_free((yyvsp[(1) - (3)].number)); num_free((yyvsp[(3) - (3)].number)); } break; case 49: #line 548 "parser.y" { num_init((yyval.number)); simple_exp((yyval.number), (yyvsp[(1) - (3)].number), wand, (yyvsp[(3) - (3)].number)); num_free((yyvsp[(1) - (3)].number)); num_free((yyvsp[(3) - (3)].number)); } break; case 50: #line 549 "parser.y" { num_init((yyval.number)); simple_exp((yyval.number), (yyvsp[(1) - (3)].number), wor, (yyvsp[(3) - (3)].number)); num_free((yyvsp[(1) - (3)].number)); num_free((yyvsp[(3) - (3)].number)); } break; case 51: #line 550 "parser.y" { num_init((yyval.number)); simple_exp((yyval.number), (yyvsp[(1) - (3)].number), wbor, (yyvsp[(3) - (3)].number)); num_free((yyvsp[(1) - (3)].number)); num_free((yyvsp[(3) - (3)].number)); } break; case 52: #line 551 "parser.y" { num_init((yyval.number)); simple_exp((yyval.number), (yyvsp[(1) - (3)].number), wbxor, (yyvsp[(3) - (3)].number)); num_free((yyvsp[(1) - (3)].number)); num_free((yyvsp[(3) - (3)].number)); } break; case 53: #line 552 "parser.y" { num_init((yyval.number)); simple_exp((yyval.number), (yyvsp[(1) - (3)].number), wband, (yyvsp[(3) - (3)].number)); num_free((yyvsp[(1) - (3)].number)); num_free((yyvsp[(3) - (3)].number)); } break; case 54: #line 553 "parser.y" { num_init((yyval.number)); simple_exp((yyval.number), (yyvsp[(1) - (3)].number), wequal, (yyvsp[(3) - (3)].number)); num_free((yyvsp[(1) - (3)].number)); num_free((yyvsp[(3) - (3)].number)); } break; case 55: #line 554 "parser.y" { num_init((yyval.number)); simple_exp((yyval.number), (yyvsp[(1) - (3)].number), wnequal, (yyvsp[(3) - (3)].number)); num_free((yyvsp[(1) - (3)].number)); num_free((yyvsp[(3) - (3)].number)); } break; case 56: #line 555 "parser.y" { num_init((yyval.number)); simple_exp((yyval.number), (yyvsp[(1) - (3)].number), wgt, (yyvsp[(3) - (3)].number)); num_free((yyvsp[(1) - (3)].number)); num_free((yyvsp[(3) - (3)].number)); } break; case 57: #line 556 "parser.y" { num_init((yyval.number)); simple_exp((yyval.number), (yyvsp[(1) - (3)].number), wlt, (yyvsp[(3) - (3)].number)); num_free((yyvsp[(1) - (3)].number)); num_free((yyvsp[(3) - (3)].number)); } break; case 58: #line 557 "parser.y" { num_init((yyval.number)); simple_exp((yyval.number), (yyvsp[(1) - (3)].number), wgeq, (yyvsp[(3) - (3)].number)); num_free((yyvsp[(1) - (3)].number)); num_free((yyvsp[(3) - (3)].number)); } break; case 59: #line 558 "parser.y" { num_init((yyval.number)); simple_exp((yyval.number), (yyvsp[(1) - (3)].number), wleq, (yyvsp[(3) - (3)].number)); num_free((yyvsp[(1) - (3)].number)); num_free((yyvsp[(3) - (3)].number)); } break; case 60: #line 559 "parser.y" { num_init((yyval.number)); simple_exp((yyval.number), (yyvsp[(1) - (3)].number), wlshft, (yyvsp[(3) - (3)].number)); num_free((yyvsp[(1) - (3)].number)); num_free((yyvsp[(3) - (3)].number)); } break; case 61: #line 560 "parser.y" { num_init((yyval.number)); simple_exp((yyval.number), (yyvsp[(1) - (3)].number), wrshft, (yyvsp[(3) - (3)].number)); num_free((yyvsp[(1) - (3)].number)); num_free((yyvsp[(3) - (3)].number)); } break; case 62: #line 561 "parser.y" { num_init((yyval.number)); simple_exp((yyval.number), (yyvsp[(1) - (3)].number), wmult, (yyvsp[(3) - (3)].number)); num_free((yyvsp[(1) - (3)].number)); num_free((yyvsp[(3) - (3)].number)); } break; case 63: #line 562 "parser.y" { num_init((yyval.number)); simple_exp((yyval.number), (yyvsp[(1) - (3)].number), wdiv, (yyvsp[(3) - (3)].number)); num_free((yyvsp[(1) - (3)].number)); num_free((yyvsp[(3) - (3)].number)); } break; case 64: #line 563 "parser.y" { num_init((yyval.number)); simple_exp((yyval.number), (yyvsp[(1) - (3)].number), wmod, (yyvsp[(3) - (3)].number)); num_free((yyvsp[(1) - (3)].number)); num_free((yyvsp[(3) - (3)].number)); } break; case 66: #line 567 "parser.y" { (yyval.function) = wsin; } break; case 67: #line 568 "parser.y" { (yyval.function) = wcos; } break; case 68: #line 569 "parser.y" { (yyval.function) = wtan; } break; case 69: #line 570 "parser.y" { (yyval.function) = wcot; } break; case 70: #line 571 "parser.y" { (yyval.function) = wsec; } break; case 71: #line 572 "parser.y" { (yyval.function) = wcsc; } break; case 72: #line 573 "parser.y" { (yyval.function) = wasin; } break; case 73: #line 574 "parser.y" { (yyval.function) = wacos; } break; case 74: #line 575 "parser.y" { (yyval.function) = watan; } break; case 75: #line 576 "parser.y" { (yyval.function) = wacot; } break; case 76: #line 577 "parser.y" { (yyval.function) = wasec; } break; case 77: #line 578 "parser.y" { (yyval.function) = wacsc; } break; case 78: #line 579 "parser.y" { (yyval.function) = wsinh; } break; case 79: #line 580 "parser.y" { (yyval.function) = wcosh; } break; case 80: #line 581 "parser.y" { (yyval.function) = wtanh; } break; case 81: #line 582 "parser.y" { (yyval.function) = wcoth; } break; case 82: #line 583 "parser.y" { (yyval.function) = wsech; } break; case 83: #line 584 "parser.y" { (yyval.function) = wcsch; } break; case 84: #line 585 "parser.y" { (yyval.function) = wasinh; } break; case 85: #line 586 "parser.y" { (yyval.function) = wacosh; } break; case 86: #line 587 "parser.y" { (yyval.function) = watanh; } break; case 87: #line 588 "parser.y" { (yyval.function) = wacoth; } break; case 88: #line 589 "parser.y" { (yyval.function) = wasech; } break; case 89: #line 590 "parser.y" { (yyval.function) = wacsch; } break; case 90: #line 591 "parser.y" { (yyval.function) = wlog; } break; case 91: #line 592 "parser.y" { (yyval.function) = wlogtwo; } break; case 92: #line 593 "parser.y" { (yyval.function) = wln; } break; case 93: #line 594 "parser.y" { (yyval.function) = wround; } break; case 94: #line 595 "parser.y" { (yyval.function) = wabs; } break; case 95: #line 596 "parser.y" { (yyval.function) = wsqrt; } break; case 96: #line 597 "parser.y" { (yyval.function) = wexp; } break; case 97: #line 598 "parser.y" { (yyval.function) = wfloor; } break; case 98: #line 599 "parser.y" { (yyval.function) = wceil; } break; case 99: #line 600 "parser.y" { (yyval.function) = wcbrt; } break; case 100: #line 601 "parser.y" { (yyval.function) = wrand; } break; case 101: #line 602 "parser.y" { (yyval.function) = wirand; } break; case 102: #line 603 "parser.y" { (yyval.function) = wbnot; } break; case 103: #line 604 "parser.y" { (yyval.function) = wnot; } break; case 104: #line 605 "parser.y" { (yyval.function) = wfact; } break; case 105: #line 606 "parser.y" { (yyval.function) = wcomp; } break; case 106: #line 607 "parser.y" { (yyval.function) = weint; } break; case 107: #line 608 "parser.y" { (yyval.function) = wgamma; } break; case 108: #line 609 "parser.y" { (yyval.function) = wlngamma; } break; case 109: #line 610 "parser.y" { (yyval.function) = wzeta; } break; case 110: #line 611 "parser.y" { (yyval.function) = wsinc; } break; case 114: #line 619 "parser.y" { (yyval.integer) = -1; } break; case 115: #line 620 "parser.y" { (yyval.integer) = 1; } break; case 116: #line 621 "parser.y" { (yyval.integer) = 1; } break; case 118: #line 625 "parser.y" { num_init((yyval.number)); num_mul((yyvsp[(2) - (3)].number),(yyvsp[(2) - (3)].number),(yyvsp[(3) - (3)].number)); num_mul_si((yyval.number),(yyvsp[(2) - (3)].number),(yyvsp[(1) - (3)].integer)); num_free((yyvsp[(2) - (3)].number)); num_free((yyvsp[(3) - (3)].number)); } break; case 119: #line 632 "parser.y" { num_init_set((yyval.number),(yyvsp[(1) - (2)].number)); num_free((yyvsp[(1) - (2)].number)); num_free((yyvsp[(2) - (2)].number)); } break; case 120: #line 637 "parser.y" { num_init_set_ui((yyval.number),1); } break; case 121: #line 640 "parser.y" { num_init((yyval.number)); simple_exp((yyval.number),(yyvsp[(1) - (2)].number),wmult,(yyvsp[(2) - (2)].number)); num_free((yyvsp[(1) - (2)].number)); num_free((yyvsp[(2) - (2)].number));} break; case 122: #line 644 "parser.y" { num_init((yyval.number)); num_mul_si((yyvsp[(4) - (5)].number),(yyvsp[(4) - (5)].number),(yyvsp[(3) - (5)].integer)); num_pow((yyvsp[(1) - (5)].number),(yyvsp[(1) - (5)].number),(yyvsp[(4) - (5)].number)); num_mul((yyval.number),(yyvsp[(1) - (5)].number),(yyvsp[(5) - (5)].number)); num_free((yyvsp[(1) - (5)].number)); num_free((yyvsp[(4) - (5)].number)); num_free((yyvsp[(5) - (5)].number));} break; case 123: #line 654 "parser.y" { num_init((yyval.number)); num_set((yyval.number),(yyvsp[(2) - (3)].number)); num_free((yyvsp[(2) - (3)].number)); } break; case 124: #line 656 "parser.y" { num_init((yyval.number)); num_set((yyval.number),(yyvsp[(2) - (3)].number)); num_free((yyvsp[(2) - (3)].number)); } break; case 125: #line 658 "parser.y" { num_init((yyval.number)); num_set((yyval.number),(yyvsp[(2) - (3)].number)); num_free((yyvsp[(2) - (3)].number)); } break; case 126: #line 659 "parser.y" { num_init_set_ui((yyval.number),0); } break; case 127: #line 663 "parser.y" { num_init((yyval.number)); num_set((yyval.number),(yyvsp[(1) - (1)].number)); num_free((yyvsp[(1) - (1)].number)); } break; case 129: #line 666 "parser.y" { num_init((yyval.number)); num_factorial((yyval.number),num_get_ui((yyvsp[(1) - (2)].number))); num_free((yyvsp[(1) - (2)].number)); } break; case 130: #line 671 "parser.y" { num_init((yyval.number)); num_sqr((yyval.number),(yyvsp[(1) - (2)].number)); num_free((yyvsp[(1) - (2)].number)); } break; case 131: #line 673 "parser.y" { num_init((yyval.number)); uber_function((yyval.number),(yyvsp[(1) - (2)].function),(yyvsp[(2) - (2)].number)); num_free((yyvsp[(2) - (2)].number)); } break; case 132: #line 679 "parser.y" { num_init((yyval.number)); num_mul_si((yyvsp[(3) - (3)].number),(yyvsp[(3) - (3)].number),(yyvsp[(2) - (3)].integer)); uber_function((yyval.number),(yyvsp[(1) - (3)].function),(yyvsp[(3) - (3)].number)); num_free((yyvsp[(3) - (3)].number)); } break; /* Line 1267 of yacc.c. */ #line 2949 "parser.c" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); YYPOPSTACK (yylen); yylen = 0; YY_STACK_PRINT (yyss, yyssp); *++yyvsp = yyval; /* Now `shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ yyn = yyr1[yyn]; yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) yystate = yytable[yystate]; else yystate = yydefgoto[yyn - YYNTOKENS]; goto yynewstate; /*------------------------------------. | yyerrlab -- here on detecting error | `------------------------------------*/ yyerrlab: /* If not already recovering from an error, report this error. */ if (!yyerrstatus) { ++yynerrs; #if ! YYERROR_VERBOSE yyerror (YY_("syntax error")); #else { YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) { YYSIZE_T yyalloc = 2 * yysize; if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) yyalloc = YYSTACK_ALLOC_MAXIMUM; if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); yymsg = (char *) YYSTACK_ALLOC (yyalloc); if (yymsg) yymsg_alloc = yyalloc; else { yymsg = yymsgbuf; yymsg_alloc = sizeof yymsgbuf; } } if (0 < yysize && yysize <= yymsg_alloc) { (void) yysyntax_error (yymsg, yystate, yychar); yyerror (yymsg); } else { yyerror (YY_("syntax error")); if (yysize != 0) goto yyexhaustedlab; } } #endif } if (yyerrstatus == 3) { /* If just tried and failed to reuse look-ahead token after an error, discard it. */ if (yychar <= YYEOF) { /* Return failure if at end of input. */ if (yychar == YYEOF) YYABORT; } else { yydestruct ("Error: discarding", yytoken, &yylval); yychar = YYEMPTY; } } /* Else will try to reuse look-ahead token after shifting the error token. */ goto yyerrlab1; /*---------------------------------------------------. | yyerrorlab -- error raised explicitly by YYERROR. | `---------------------------------------------------*/ yyerrorlab: /* Pacify compilers like GCC when the user code never invokes YYERROR and the label yyerrorlab therefore never appears in user code. */ if (/*CONSTCOND*/ 0) goto yyerrorlab; /* Do not reclaim the symbols of the rule which action triggered this YYERROR. */ YYPOPSTACK (yylen); yylen = 0; YY_STACK_PRINT (yyss, yyssp); yystate = *yyssp; goto yyerrlab1; /*-------------------------------------------------------------. | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ yyerrlab1: yyerrstatus = 3; /* Each real token shifted decrements this. */ for (;;) { yyn = yypact[yystate]; if (yyn != YYPACT_NINF) { yyn += YYTERROR; if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) { yyn = yytable[yyn]; if (0 < yyn) break; } } /* Pop the current state because it cannot handle the error token. */ if (yyssp == yyss) YYABORT; yydestruct ("Error: popping", yystos[yystate], yyvsp); YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); } if (yyn == YYFINAL) YYACCEPT; *++yyvsp = yylval; /* Shift the error token. */ YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); yystate = yyn; goto yynewstate; /*-------------------------------------. | yyacceptlab -- YYACCEPT comes here. | `-------------------------------------*/ yyacceptlab: yyresult = 0; goto yyreturn; /*-----------------------------------. | yyabortlab -- YYABORT comes here. | `-----------------------------------*/ yyabortlab: yyresult = 1; goto yyreturn; #ifndef yyoverflow /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ yyexhaustedlab: yyerror (YY_("memory exhausted")); yyresult = 2; /* Fall through. */ #endif yyreturn: if (yychar != YYEOF && yychar != YYEMPTY) yydestruct ("Cleanup: discarding lookahead", yytoken, &yylval); /* Do not reclaim the symbols of the rule which action triggered this YYABORT or YYACCEPT. */ YYPOPSTACK (yylen); YY_STACK_PRINT (yyss, yyssp); while (yyssp != yyss) { yydestruct ("Cleanup: popping", yystos[*yyssp], yyvsp); YYPOPSTACK (1); } #ifndef yyoverflow if (yyss != yyssa) YYSTACK_FREE (yyss); #endif #if YYERROR_VERBOSE if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); #endif /* Make sure YYID is used. */ return YYID (yyresult); } #line 687 "parser.y" int yyerror(char *error_string, ...) { va_list ap; char error[1000]; ++synerrors; va_start(ap,error_string); vsnprintf(error,1000,error_string,ap); va_end(ap); report_error(error); return 0; } wcalc-2.4/parser.h0000664000175000000620000001474311101153601012402 0ustar kkstaff/* A Bison parser, made by GNU Bison 2.3. */ /* Skeleton interface for Bison's Yacc-like parsers in C Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work under terms of your choice, so long as that work isn't itself a parser generator using the skeleton or a modified version thereof as a parser skeleton. Alternatively, if you modify or redistribute the parser skeleton itself, you may (at your option) remove this special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ /* Tokens. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE /* Put the tokens into the symbol table, so that GDB and other debuggers know about them. */ enum yytokentype { DEC_CMD = 258, OCT_CMD = 259, HEX_CMD = 260, BIN_CMD = 261, GUARD_CMD = 262, DISPLAY_PREFS_CMD = 263, RADIAN_CMD = 264, REMEMBER_CMD = 265, LISTVAR_CMD = 266, STORE_CMD = 267, CMOD_CMD = 268, PRINT_HELP_CMD = 269, PREFIX_CMD = 270, INT_CMD = 271, VERBOSE_CMD = 272, DELIM_CMD = 273, ENG_CMD = 274, HLIMIT_CMD = 275, ROUNDING_INDICATION_CMD = 276, PRECISION_CMD = 277, BITS_CMD = 278, BASE_CMD = 279, CONVERT_CMD = 280, EOLN = 281, OPEN_PARENTHESES = 282, CLOSE_PARENTHESES = 283, OPEN_BRACE = 284, CLOSE_BRACE = 285, OPEN_BRACKET = 286, CLOSE_BRACKET = 287, WPLUS = 288, WMINUS = 289, WMULT = 290, WDIV = 291, WMOD = 292, EQUALS_SIGN = 293, WPOW = 294, WEXP = 295, WSQR = 296, WOR = 297, WAND = 298, WEQUAL = 299, WNEQUAL = 300, WGT = 301, WLT = 302, WGEQ = 303, WLEQ = 304, WLSHFT = 305, WRSHFT = 306, WBOR = 307, WBAND = 308, WBXOR = 309, WBNOT = 310, WNOT = 311, WLOG = 312, WLN = 313, WROUND = 314, WABS = 315, WSQRT = 316, WCEIL = 317, WFLOOR = 318, WCBRT = 319, WLOGTWO = 320, WBANG = 321, WSIN = 322, WCOS = 323, WTAN = 324, WASIN = 325, WACOS = 326, WATAN = 327, WSINH = 328, WCOSH = 329, WTANH = 330, WASINH = 331, WACOSH = 332, WATANH = 333, WCOT = 334, WACOT = 335, WCOTH = 336, WACOTH = 337, WRAND = 338, WIRAND = 339, WFACT = 340, WCOMP = 341, WSEC = 342, WCSC = 343, WASEC = 344, WACSC = 345, WSECH = 346, WCSCH = 347, WASECH = 348, WACSCH = 349, WEINT = 350, WGAMMA = 351, WLNGAMMA = 352, WZETA = 353, WSINC = 354, NUMBER = 355, VARIABLE = 356, STRING = 357, OPEN_CMD = 358, SAVE_CMD = 359, ASSIGNMENT = 360, IDSEP_CMD = 361, DSEP_CMD = 362, ITSEP_CMD = 363, TSEP_CMD = 364, WNEG = 365 }; #endif /* Tokens. */ #define DEC_CMD 258 #define OCT_CMD 259 #define HEX_CMD 260 #define BIN_CMD 261 #define GUARD_CMD 262 #define DISPLAY_PREFS_CMD 263 #define RADIAN_CMD 264 #define REMEMBER_CMD 265 #define LISTVAR_CMD 266 #define STORE_CMD 267 #define CMOD_CMD 268 #define PRINT_HELP_CMD 269 #define PREFIX_CMD 270 #define INT_CMD 271 #define VERBOSE_CMD 272 #define DELIM_CMD 273 #define ENG_CMD 274 #define HLIMIT_CMD 275 #define ROUNDING_INDICATION_CMD 276 #define PRECISION_CMD 277 #define BITS_CMD 278 #define BASE_CMD 279 #define CONVERT_CMD 280 #define EOLN 281 #define OPEN_PARENTHESES 282 #define CLOSE_PARENTHESES 283 #define OPEN_BRACE 284 #define CLOSE_BRACE 285 #define OPEN_BRACKET 286 #define CLOSE_BRACKET 287 #define WPLUS 288 #define WMINUS 289 #define WMULT 290 #define WDIV 291 #define WMOD 292 #define EQUALS_SIGN 293 #define WPOW 294 #define WEXP 295 #define WSQR 296 #define WOR 297 #define WAND 298 #define WEQUAL 299 #define WNEQUAL 300 #define WGT 301 #define WLT 302 #define WGEQ 303 #define WLEQ 304 #define WLSHFT 305 #define WRSHFT 306 #define WBOR 307 #define WBAND 308 #define WBXOR 309 #define WBNOT 310 #define WNOT 311 #define WLOG 312 #define WLN 313 #define WROUND 314 #define WABS 315 #define WSQRT 316 #define WCEIL 317 #define WFLOOR 318 #define WCBRT 319 #define WLOGTWO 320 #define WBANG 321 #define WSIN 322 #define WCOS 323 #define WTAN 324 #define WASIN 325 #define WACOS 326 #define WATAN 327 #define WSINH 328 #define WCOSH 329 #define WTANH 330 #define WASINH 331 #define WACOSH 332 #define WATANH 333 #define WCOT 334 #define WACOT 335 #define WCOTH 336 #define WACOTH 337 #define WRAND 338 #define WIRAND 339 #define WFACT 340 #define WCOMP 341 #define WSEC 342 #define WCSC 343 #define WASEC 344 #define WACSC 345 #define WSECH 346 #define WCSCH 347 #define WASECH 348 #define WACSCH 349 #define WEINT 350 #define WGAMMA 351 #define WLNGAMMA 352 #define WZETA 353 #define WSINC 354 #define NUMBER 355 #define VARIABLE 356 #define STRING 357 #define OPEN_CMD 358 #define SAVE_CMD 359 #define ASSIGNMENT 360 #define IDSEP_CMD 361 #define DSEP_CMD 362 #define ITSEP_CMD 363 #define TSEP_CMD 364 #define WNEG 365 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE #line 59 "parser.y" { /* the types that we use in the tokens */ enum functions function; enum operations operation; Number number; int integer; enum commands cmd; char * variable; char character; struct conv_req conver; } /* Line 1489 of yacc.c. */ #line 280 "parser.h" YYSTYPE; # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 # define YYSTYPE_IS_TRIVIAL 1 #endif extern YYSTYPE yylval; wcalc-2.4/parser.y0000644000175000000620000004542411100723356012432 0ustar kkstaff/*%pure-parser */ /* this may be a bison-only thing... */ /*%error-verbose*/ %{ /*#define REENTRANT_PARSER */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #if ! defined(HAVE_CONFIG_H) || HAVE_STRING_H # include #else # if !HAVE_STRCHR # define strchr index # define strrchr rindex # endif char *strchr (), *strrchr (); #endif #include #include #include "number.h" #include #include #include #include /* for isatty() */ #include "calculator.h" #include "variables.h" #include "help.h" #include "files.h" #include "conversion.h" #include "number_formatting.h" #ifdef MEMWATCH #include "memwatch.h" #endif /* Based on the headstart code by Shawn Ostermann * modified by Kyle Wheeler */ /* include debugging code, in case we want it */ #define YYDEBUG 1 /* to make it stop complaining about undeclared functions */ int yylex(); int yyerror(char *error_string, ...); int lines = 1; int synerrors = 0; short scanerror = 0; char * errstring = NULL; int errloc = -1; int show_line_numbers = 0; %} %union { /* the types that we use in the tokens */ enum functions function; enum operations operation; Number number; int integer; enum commands cmd; char * variable; char character; struct conv_req conver; } %token DEC_CMD OCT_CMD HEX_CMD BIN_CMD GUARD_CMD DISPLAY_PREFS_CMD %token RADIAN_CMD REMEMBER_CMD LISTVAR_CMD STORE_CMD CMOD_CMD %token PRINT_HELP_CMD PREFIX_CMD INT_CMD VERBOSE_CMD DELIM_CMD %token ENG_CMD HLIMIT_CMD ROUNDING_INDICATION_CMD %token PRECISION_CMD BITS_CMD BASE_CMD %token CONVERT_CMD %token EOLN OPEN_PARENTHESES CLOSE_PARENTHESES OPEN_BRACE %token CLOSE_BRACE OPEN_BRACKET CLOSE_BRACKET %token WPLUS WMINUS WMULT WDIV WMOD EQUALS_SIGN WPOW WEXP WSQR %token WOR WAND WEQUAL WNEQUAL WGT WLT WGEQ WLEQ %token WLSHFT WRSHFT WBOR WBAND WBXOR %token WBNOT WNOT WLOG WLN WROUND WABS WSQRT WCEIL WFLOOR WCBRT WLOGTWO WBANG %token WSIN WCOS WTAN WASIN WACOS WATAN WSINH WCOSH WTANH WASINH WACOSH WATANH %token WCOT WACOT WCOTH WACOTH WRAND WIRAND WFACT WCOMP WSEC WCSC WASEC WACSC %token WSECH WCSCH WASECH WACSCH WEINT WGAMMA WLNGAMMA WZETA WSINC %token NUMBER %token VARIABLE STRING OPEN_CMD SAVE_CMD ASSIGNMENT %token IDSEP_CMD DSEP_CMD ITSEP_CMD TSEP_CMD %type exp exp_l2 exp_l3 %type oval capsule parenthated %type sign %type command %type func %type optionalstring %left WAND WOR WBAND WBOR %left WEQUAL WNEQUAL WGT WLT WGEQ WLEQ %left WMINUS WPLUS %left WMULT WDIV WMOD WLSHFT WRSHFT %right WBANG WSQR %left WNOT WBNOT WNEG %right WPOW %expect 1560 %% /* beginning of the parsing rules */ input : lines | ; lines : oneline | oneline lines ; oneline : exp eoln { extern int line_is_a_command; if (scanerror) { scanerror = synerrors = 0; } else { if (! synerrors && ! yynerrs) { set_prettyanswer($1); num_set(last_answer,$1); } else { synerrors = 0; report_error("Too many errors."); } } num_free($1); compute = 1; line_is_a_command = 0; } | assignment eoln { extern int line_is_a_command; compute = 1; line_is_a_command = 0; } | command eoln { extern int line_is_a_command; switch ($1) { case redisplay: if (! synerrors) { set_prettyanswer(last_answer); } else { synerrors = 0; report_error("Too many errors."); } break; case nothing: break; } compute = 1; line_is_a_command = 0; } | eoln /* blank line */ { extern int line_is_a_command; if (scanerror) { scanerror = synerrors = 0; } compute = 1; line_is_a_command = 0; } | error eoln { extern int line_is_a_command; /* there is the possibility of lost memory here, * because "error" has no data type * (and because I'm passing around *actual* Number's * rather than pointers to them) */ /* report_error("3 Error in scanner halts parser."); */ compute = 1; line_is_a_command = 0; } /* if we got an error on the line */ ; eoln : EOLN { ++lines; } ; command : HEX_CMD { $$ = isatty(0)?redisplay:nothing; conf.output_format = HEXADECIMAL_FORMAT; if (standard_output) printf("Hexadecimal Formatted Output\n");} | OCT_CMD { $$ = isatty(0)?redisplay:nothing; conf.output_format = OCTAL_FORMAT; if (standard_output) printf("Octal Formatted Output\n");} | BIN_CMD { $$ = isatty(0)?redisplay:nothing; conf.output_format = BINARY_FORMAT; if (standard_output) printf("Binary Formatted Output\n");} | DEC_CMD { $$ = isatty(0)?redisplay:nothing; conf.output_format = DECIMAL_FORMAT; if (standard_output) printf("Decimal Formatted Output\n");} | DSEP_CMD { $$ = nothing; if (conf.thou_delimiter != $1) { conf.dec_delimiter = $1; if (standard_output) printf("%c is now the decimal separator.\n", $1); } else if (standard_output) { printf("%c cannot be the decimal separator. It is the thousands separator.\n", $1); }} | IDSEP_CMD { $$ = nothing; if (conf.in_thou_delimiter != $1 && (conf.in_thou_delimiter != 0 || conf.thou_delimiter != $1)) { conf.in_dec_delimiter = $1; if (standard_output) printf("%c is now the decimal separator for input.\n", $1); } else if (standard_output) { printf("%c cannot be the decimal separator. It is the thousands separator.\n", $1); }} | TSEP_CMD { $$ = nothing; if (conf.dec_delimiter != $1) { conf.thou_delimiter = $1; if (standard_output) printf("%c is now the thousands separator.\n", $1); } else if (standard_output) { printf("%c cannot be the thousands separator. It is the decimal separator.\n", $1); }} | ITSEP_CMD { $$ = nothing; if (conf.in_dec_delimiter != $1 && (conf.in_dec_delimiter != 0 || conf.dec_delimiter != $1)) { conf.in_thou_delimiter = $1; if (standard_output) printf("%c is now the thousands separator for input.\n", $1); } else if (standard_output) { printf("%c cannot be the thousands separator. It is the decimal separator.\n", $1); }} | DELIM_CMD { $$ = nothing; conf.print_commas = ! conf.print_commas; if (standard_output) { printf("Will %sshow separators when printing large numbers.\n",conf.print_commas?"":"not "); } } | INT_CMD { $$ = nothing; conf.print_ints = ! conf.print_ints; if (standard_output) { printf("Will %suse abbreviations for large integers.\n",conf.print_ints?"not ":""); } } | VERBOSE_CMD { $$ = nothing; conf.verbose = ! conf.verbose; if (standard_output) { printf("Will %secho the lines to be evaluated.\n",conf.verbose?"":"not "); } } | DISPLAY_PREFS_CMD { if (standard_output) { printf(" Display Precision: %-3i %s -> \\p\n",conf.precision,((conf.precision==-1)?"(auto)":" ")); printf(" Internal Precision: %-24lu -> \\bits\n", (unsigned long) num_get_default_prec()); printf(" Engineering Output: %s -> \\e\n", (conf.engineering==always)?"always":(conf.engineering==never)?"never ":"auto "); printf(" Output Format: %s -> \\b, \\d, \\h, \\o\n",output_string(conf.output_format)); printf(" Use Radians: %s -> \\r or \\radians\n",conf.use_radians?"yes":"no "); printf(" Print Prefixes: %s -> \\pre or \\prefixes\n",conf.print_prefixes?"yes":"no "); printf("Avoid Abbreviating Integers: %s -> \\ints\n",conf.print_ints?"yes":"no "); printf(" Rounding Indication: %s -> \\round\n",conf.rounding_indication==SIMPLE_ROUNDING_INDICATION?"yes (simple) ":(conf.rounding_indication==SIG_FIG_ROUNDING_INDICATION?"yes (sig_fig)":"no ")); printf(" Save Errors in History: %s -> \\re\n",conf.remember_errors?"yes":"no "); printf(" Thousands Delimiter: '%c' -> \\tsep\n",conf.thou_delimiter); printf(" Decimal Delimiter: '%c' -> \\dsep\n",conf.dec_delimiter); printf(" Precision Guard: %s -> \\cons\n",conf.precision_guard?"yes":"no "); printf(" History Limit: %s -> \\hlimit\n",conf.history_limit?"yes":"no "); if (conf.history_limit) { printf(" History Limited To: %lu\n",conf.history_limit_len); } printf(" Verbose: %s -> \\verbose\n",conf.verbose?"yes":"no "); printf(" Display Delimiters: %s -> \\delim\n",conf.print_commas?"yes":"no "); printf(" Modulo Operator: %s -> \\cmod\n",conf.c_style_mod?"C-style ":"not C-style"); } $$ = nothing; } | RADIAN_CMD { $$ = nothing; conf.use_radians = ! conf.use_radians; if (standard_output) printf("Now Using %s\n", conf.use_radians?"Radians":"Degrees");} | GUARD_CMD { $$ = nothing; conf.precision_guard = ! conf.precision_guard; if (standard_output) printf("Now %sUsing Conservative Precision\n", conf.precision_guard?"":"Not ");} | PRECISION_CMD { $$ = isatty(0)?redisplay:nothing; conf.precision = $1; if (standard_output) { printf("Precision = "); if (conf.precision == -1) printf("auto\n"); else printf("%i\n", conf.precision); }} | HLIMIT_CMD { $$ = nothing; if ($1) { conf.history_limit = 1; conf.history_limit_len = $1; } else { conf.history_limit = 0; conf.history_limit_len = 0; } } | LISTVAR_CMD { printvariables(); $$ = nothing; } | ENG_CMD { if ($1 < 0) { switch (conf.engineering) { case always: conf.engineering = never; break; case never: conf.engineering = automatic; break; case automatic: conf.engineering = always; break; } } else { switch($1) { case 1: conf.engineering = automatic; break; case 2: conf.engineering = always; break; case 3: conf.engineering = never; break; } } if (standard_output) printf("Engineering notation is %s\n",(conf.engineering==always)?"always used":(conf.engineering==never)?"never used":"used if convenient"); $$ = isatty(0)?redisplay:nothing; } | ROUNDING_INDICATION_CMD { $$ = nothing; if ($1 != -1) conf.rounding_indication = $1; else { conf.rounding_indication += 1; conf.rounding_indication %= 3; } if (standard_output) { printf("Will display "); switch(conf.rounding_indication) { case NO_ROUNDING_INDICATION: printf("no"); break; case SIMPLE_ROUNDING_INDICATION: printf("simple"); break; case SIG_FIG_ROUNDING_INDICATION: printf("significant figure"); break; } printf(" rounding indication\n"); } } | PREFIX_CMD { $$ = nothing; conf.print_prefixes = ! conf.print_prefixes; if (standard_output) printf("Will %sprint number prefixes\n",conf.print_prefixes?"":"not "); } | REMEMBER_CMD { $$ = nothing; conf.remember_errors = ! conf.remember_errors; if (standard_output) printf("Statements that produce errors are %s.\n",conf.remember_errors?"recorded":"forgotten"); } | PRINT_HELP_CMD { $$ = nothing; if (standard_output) { print_interactive_help(); } } | OPEN_CMD { extern char* open_file; int i; unsigned int len = strlen($1)+1; open_file = malloc(len); snprintf(open_file,len,"%s",$1); /* strip trailing spaces */ for (i=strlen(open_file)-1;i>=0;i--) { if (open_file[i] != ' ') break; open_file[i] = 0; } if (strlen(open_file) == 0) { free(open_file); open_file = NULL; report_error("Please specify a file name to open."); } $$ = nothing; } | SAVE_CMD { int retval; retval = saveState($1); if (retval) { report_error("Could not save file. (%s)", (char*)strerror(retval)); } $$ = nothing; } | BITS_CMD { if ($1 < NUM_PREC_MIN) { report_error("Minimum precision is %lu.\n", (unsigned long)NUM_PREC_MIN); } else if ($1 > (signed)NUM_PREC_MAX) { report_error("Maximum precision is %lu.\n", (unsigned long)NUM_PREC_MAX); } else { num_set_default_prec($1); } $$ = nothing; } | CONVERT_CMD { int category = identify_units($1.u1,$1.u2); switch (category) { case -1: report_error("Units must be in the same category."); break; case -2: report_error("Units provided are not recognized."); break; case -3: report_error("First unit provided was not recognized (%s).", $1.u1); break; case -4: report_error("Second unit provided was not recognized (%s).", $1.u2); break; default: uber_conversion(last_answer,category,unit_id(category,$1.u1),unit_id(category,$1.u2),last_answer); } free($1.u1); free($1.u2); $$ = redisplay; } | BASE_CMD { if ($1 >= 2 && $1 <= 36) { char * str, junk; str = num_to_str_complex(last_answer, $1, conf.engineering, -1, conf.print_prefixes, &junk); printf("base %i: %s\n",$1,str); } else { report_error("Base must be greater than one and less than 37."); } $$ = nothing; } | STORE_CMD VARIABLE { int retval = storeVar($2); if (retval == 0) { printf("successfully stored %s\n",$2); } else { report_error("Failure to store variable!"); } free($2); } | CMOD_CMD { $$ = nothing; conf.c_style_mod = ! conf.c_style_mod; if (standard_output) printf("The mod (%%) operation will %sbehave like it does in the C programming language.\n",conf.c_style_mod?"":"not "); } ; optionalstring : STRING { $$ = $1; } | { $$ = NULL; } ; assignment : ASSIGNMENT exp optionalstring { if (compute && ! scanerror) { /* if standard_error, q is reserved */ if (standard_output && !strcmp($1,"q")) { report_error("q cannot be assigned a value. q is used to exit."); } else { if (putval($1,$2,$3) == 0) { if (standard_output) { Number val; num_init(val); printf($1); getvarval(val, $1); print_this_result(val); num_free(val); } } else { report_error("There was a problem assigning the value."); } } num_free($2); } else { scanerror = 0; report_error("Scanner error halts parser."); } free($1); if ($3 != NULL) { free($3); } } | ASSIGNMENT STRING optionalstring { if (compute && ! scanerror) { if (standard_output && !strcmp($1,"q")) { report_error("q cannot be assigned an expression. q is used to exit."); } else { if (putexp($1,$2,$3) == 0) { if (standard_output) { printf("%s = %s\n", $1, getvar_full($1).exp); } } else { report_error("There was a problem assigning the expression."); } } } else { scanerror = 0; report_error("Scanner error halts parser."); } free($1); free($2); if ($3 != NULL) { free($3); } } | NUMBER EQUALS_SIGN exp optionalstring { report_error("Constants cannot be assigned to other values."); num_free($3); if ($4 != NULL) { free($4); } } | NUMBER EQUALS_SIGN STRING optionalstring { report_error("Constants cannot be assigned to other values."); free($3); if ($4 != NULL) { free($4); } } ; exp : exp WMINUS exp { num_init($$); simple_exp($$, $1, wminus, $3); num_free($1); num_free($3); } | exp WPLUS exp { num_init($$); simple_exp($$, $1, wplus, $3); num_free($1); num_free($3); } | exp WAND exp { num_init($$); simple_exp($$, $1, wand, $3); num_free($1); num_free($3); } | exp WOR exp { num_init($$); simple_exp($$, $1, wor, $3); num_free($1); num_free($3); } | exp WBOR exp { num_init($$); simple_exp($$, $1, wbor, $3); num_free($1); num_free($3); } | exp WBXOR exp { num_init($$); simple_exp($$, $1, wbxor, $3); num_free($1); num_free($3); } | exp WBAND exp { num_init($$); simple_exp($$, $1, wband, $3); num_free($1); num_free($3); } | exp WEQUAL exp { num_init($$); simple_exp($$, $1, wequal, $3); num_free($1); num_free($3); } | exp WNEQUAL exp { num_init($$); simple_exp($$, $1, wnequal, $3); num_free($1); num_free($3); } | exp WGT exp { num_init($$); simple_exp($$, $1, wgt, $3); num_free($1); num_free($3); } | exp WLT exp { num_init($$); simple_exp($$, $1, wlt, $3); num_free($1); num_free($3); } | exp WGEQ exp { num_init($$); simple_exp($$, $1, wgeq, $3); num_free($1); num_free($3); } | exp WLEQ exp { num_init($$); simple_exp($$, $1, wleq, $3); num_free($1); num_free($3); } | exp WLSHFT exp { num_init($$); simple_exp($$, $1, wlshft, $3); num_free($1); num_free($3); } | exp WRSHFT exp { num_init($$); simple_exp($$, $1, wrshft, $3); num_free($1); num_free($3); } | exp WMULT exp { num_init($$); simple_exp($$, $1, wmult, $3); num_free($1); num_free($3); } | exp WDIV exp { num_init($$); simple_exp($$, $1, wdiv, $3); num_free($1); num_free($3); } | exp WMOD exp { num_init($$); simple_exp($$, $1, wmod, $3); num_free($1); num_free($3); } | exp_l2 ; func : WSIN { $$ = wsin; } | WCOS { $$ = wcos; } | WTAN { $$ = wtan; } | WCOT { $$ = wcot; } | WSEC { $$ = wsec; } | WCSC { $$ = wcsc; } | WASIN { $$ = wasin; } | WACOS { $$ = wacos; } | WATAN { $$ = watan; } | WACOT { $$ = wacot; } | WASEC { $$ = wasec; } | WACSC { $$ = wacsc; } | WSINH { $$ = wsinh; } | WCOSH { $$ = wcosh; } | WTANH { $$ = wtanh; } | WCOTH { $$ = wcoth; } | WSECH { $$ = wsech; } | WCSCH { $$ = wcsch; } | WASINH { $$ = wasinh; } | WACOSH { $$ = wacosh; } | WATANH { $$ = watanh; } | WACOTH { $$ = wacoth; } | WASECH { $$ = wasech; } | WACSCH { $$ = wacsch; } | WLOG { $$ = wlog; } | WLOGTWO { $$ = wlogtwo; } | WLN { $$ = wln; } | WROUND { $$ = wround; } | WABS { $$ = wabs; } | WSQRT { $$ = wsqrt; } | WEXP { $$ = wexp; } | WFLOOR { $$ = wfloor; } | WCEIL { $$ = wceil; } | WCBRT { $$ = wcbrt; } | WRAND { $$ = wrand; } | WIRAND { $$ = wirand; } | WBNOT { $$ = wbnot; } | WNOT { $$ = wnot; } | WFACT { $$ = wfact; } | WCOMP { $$ = wcomp; } | WEINT { $$ = weint; } | WGAMMA { $$ = wgamma; } | WLNGAMMA { $$ = wlngamma; } | WZETA { $$ = wzeta; } | WSINC { $$ = wsinc; } ; nullexp : OPEN_PARENTHESES CLOSE_PARENTHESES | OPEN_BRACE CLOSE_BRACE | OPEN_BRACKET CLOSE_BRACKET ; sign : WMINUS { $$ = -1; } | WPLUS { $$ = 1; } | { $$ = 1; } ; exp_l2 : exp_l3 | sign exp_l2 oval { num_init($$); num_mul($2,$2,$3); num_mul_si($$,$2,$1); num_free($2); num_free($3); } ; oval : exp_l3 oval { num_init_set($$,$1); num_free($1); num_free($2); } | { num_init_set_ui($$,1); } ; exp_l3 : capsule oval { num_init($$); simple_exp($$,$1,wmult,$2); num_free($1); num_free($2);} | capsule WPOW sign exp_l3 oval { num_init($$); num_mul_si($4,$4,$3); num_pow($1,$1,$4); num_mul($$,$1,$5); num_free($1); num_free($4); num_free($5);} ; parenthated: OPEN_PARENTHESES exp CLOSE_PARENTHESES { num_init($$); num_set($$,$2); num_free($2); } | OPEN_BRACE exp CLOSE_BRACE { num_init($$); num_set($$,$2); num_free($2); } | OPEN_BRACKET exp CLOSE_BRACKET { num_init($$); num_set($$,$2); num_free($2); } | nullexp { num_init_set_ui($$,0); } ; capsule: parenthated { num_init($$); num_set($$,$1); num_free($1); } | NUMBER | capsule WBANG { num_init($$); num_factorial($$,num_get_ui($1)); num_free($1); } | capsule WSQR { num_init($$); num_sqr($$,$1); num_free($1); } | func parenthated %prec WMULT { num_init($$); uber_function($$,$1,$2); num_free($2); } | func sign capsule %prec WEQUAL { num_init($$); num_mul_si($3,$3,$2); uber_function($$,$1,$3); num_free($3); } ; %% int yyerror(char *error_string, ...) { va_list ap; char error[1000]; ++synerrors; va_start(ap,error_string); vsnprintf(error,1000,error_string,ap); va_end(ap); report_error(error); return 0; } wcalc-2.4/PersVarList.h0000644000175000000620000000045610400422327013323 0ustar kkstaff/* PersVarList */ #include #include "list.h" @interface PersVarList : NSObject { IBOutlet NSTableView *theList; IBOutlet NSWindow *theWindow; } - (IBAction)addVar:(id)sender; - (IBAction)clearVars:(id)sender; - (IBAction)delVar:(id)sender; - (IBAction)showList:(id)sender; @end wcalc-2.4/PersVarList.m0000644000175000000620000001152510650214635013337 0ustar kkstaff#include "string_manip.h" #include "calculator.h" #include "list.h" #include "PersVarList.h" #ifdef MEMWATCH #include "memwatch.h" #endif struct pers_var { char *name; char *exp; }; static List persVars = NULL; @implementation PersVarList - (int)numberOfRowsInTableView:(NSTableView *)aTableView { return listLen(persVars); } - (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn*)col row:(int)rowIndex { struct pers_var * cursor = peekListElement(persVars, rowIndex); if (! cursor) { return @"BAD ROW"; } if ([[col identifier] isEqualToString:@"value"]) { return [NSString stringWithUTF8String:cursor->exp]; } else if ([[col identifier] isEqualToString:@"name"]) { return [NSString stringWithUTF8String:(cursor->name)]; } else { return @"BAD COLUMN"; } } - (void)tableView:(NSTableView*)aTableView setObjectValue:(id)anObject forTableColumn:(NSTableColumn*)col row:(int)rowIndex { struct pers_var *cursor = peekListElement(persVars, rowIndex); NSMutableDictionary *temp = [NSMutableDictionary dictionaryWithCapacity:listLen(persVars)]; ListIterator li = NULL; NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults]; if ([[col identifier] isEqualToString:@"value"]) { free(cursor->exp); cursor->exp = strdup([anObject UTF8String]); } else if ([[col identifier] isEqualToString:@"name"]) { free(cursor->name); cursor->name = strdup([anObject UTF8String]); strstrip(' ',cursor->name); } li = getListIterator(persVars); while ((cursor = (struct pers_var *)nextListElement(li)) != NULL) { [temp setObject:[NSString stringWithUTF8String:cursor->exp] forKey:[NSString stringWithUTF8String:cursor->name]]; } [prefs setObject:temp forKey:@"persistentVariables"]; } struct pers_var *getpersvar(char *key) { struct pers_var *cursor = NULL; ListIterator li = NULL; if (!persVars || key == NULL || *key == 0 || listLen(persVars) == 0) { return NULL; } li = getListIterator(persVars); while ((cursor = (struct pers_var *)nextListElement(li)) != NULL) { if (!strncmp(cursor->name, key, strlen(cursor->name)+1)) break; else cursor = NULL; } freeListIterator(li); return cursor; } int putpersvar(char *name, char *expr) { struct pers_var *cursor = NULL; if (name == NULL || *name == 0) { return -1; } cursor = getpersvar(name); if (!cursor) { cursor = calloc(1, sizeof(struct pers_var)); addToList(&persVars, cursor); } if (!cursor->name) { cursor->name = strdup(name); } else if (cursor->exp) { free(cursor->exp); } cursor->exp = strdup(expr); return 0; } int persvarexists(char* key) { struct pers_var *cursor = NULL; ListIterator li = NULL; if (!persVars || !strlen(key) || listLen(persVars) == 0) { return 0; } li = getListIterator(persVars); while ((cursor = (struct pers_var *)nextListElement(li)) != NULL) { if (!strncmp(cursor->name, key, strlen(cursor->name) + 1)) break; else cursor = NULL; } freeListIterator(li); return cursor ? 1 : 0; } - (IBAction)addVar:(id)sender { char varname[20]; int i=1; sprintf(varname,"NewVariable%i",i); while(persvarexists(varname)) { ++i; sprintf(varname,"NewVariable%i",i); } putpersvar(varname,"0"); [theList reloadData]; } - (IBAction)clearVars:(id)sender { while (listLen(persVars) > 0) { getListElement(persVars,0); } [theList reloadData]; } - (IBAction)delVar:(id)sender { if ([theList selectedRow] > -1) { getListElement(persVars,[theList selectedRow]); [theList reloadData]; } } - (IBAction)showList:(id)sender { if (persVars == NULL) { NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults]; NSDictionary *temp = [prefs dictionaryForKey:@"persistentVariables"]; NSEnumerator *enumerator = [temp keyEnumerator]; id key; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onClose:) name:NSWindowWillCloseNotification object:theWindow]; while ((key = [enumerator nextObject])) { putpersvar(strdup([key UTF8String]),strdup([[temp objectForKey:key] UTF8String])); } } [theWindow makeKeyAndOrderFront:self]; } - (IBAction)onClose:(id)sender { struct pers_var *cursor = NULL; NSMutableDictionary *temp = [NSMutableDictionary dictionaryWithCapacity:listLen(persVars)]; ListIterator li = NULL; NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults]; [[NSNotificationCenter defaultCenter] removeObserver:self name:NSWindowWillCloseNotification object:theWindow]; li = getListIterator(persVars); while ((cursor = (struct pers_var *)nextListElement(li)) != NULL) { [temp setObject:[NSString stringWithUTF8String:cursor->exp] forKey:[NSString stringWithUTF8String:cursor->name]]; } [prefs setObject:temp forKey:@"persistentVariables"]; freeListIterator(li); } @end wcalc-2.4/._README0000644000175000000620000000024711101147453012032 0ustar kkstaffMac OS X  2uATTR  com.apple.TextEncodingMACINTOSH;0wcalc-2.4/README0000644000175000000620000001465611101147453011626 0ustar kkstaffHello! This is Wcalc 2.4! 1. What's New 2. Intro 3. Installation 4. License 5. Known Bugs 6. Contact Info ************** * What's New * ************** IMPROVEMENTS: - Allow separate input internationalization characters from output (BOTH) - Made binary operations use a more intuitive rounding mode (BOTH) - Improved documentation of features (CLI) - Made command explanations more tolerant of typos (BOTH) - Expanded tab-completion (CLI) - Improved readline history detection (CLI) - Reorganized the preferences window (GUI) BUGFIXES: - Fixed display if thousands/grouping separator is unset (BOTH) - Fixed a potential crash (CLI) - Corrected engineering flag behavior (CLI) - Output localization more reliable (BOTH) - Corrected isinf/isnan behavior on some platforms (CLI) - Improved Solaris compatibility (CLI) - Made preference file parsing more tolerant (CLI) - Fixed the backwards compatibility logic (GUI) ********* * INTRO * ********* Wcalc started as a project written for my C++ class at Ohio University (CS 240B), way back on January 14th, 2000. I made it to be a "natural language" calculator - in that it would successfully interpret any valid mathematical expression. As you can imagine, being a beginner programmer, the code was rather heinous, to say the least! I reworked it after learning lex and yacc (powerful string parsing tools for C programmers - if you're a C programmer and you don't know them... go google!) in November 2001. Then I thought to myself - I have MacOS X, the standard calculator leaves something to be desired, and they say Cocoa programming is easy... what the heck, I'll give it a shot. Wcalc has turned out better than I thought it would - so I'm putting it on the web, for you! (If you're curious, yes, Cocoa is as wonderful as they say.) I keep refining and adding to its capabilities - both the GUI/Cocoa version and the command line version (they use the same innards). I think I may personally use the command line version more frequently, but both are excellent (I have fun with the GUI). Wcalc takes "expressions" and calculates the answer. My goal was to make the expressions relatively intutive - no reverse polish, or anything like that. So, by way of a record, here is what Wcalc can do: ********** * Syntax * ********** Wcalc recognizes the following symbols: + (plus) - (minus) * (multiply) / (divide) % (modulo (read: the remainder when integers are divided)) ! (factorial or boolean NOT) ^ (exponent. four squared is 4^2) < (less than) > (greater than) <= (less than or equal to) >= (greater than or equal to) == (equal) != (not equal) && (logical and) || (logical or) << (bitshift left) >> (bitshift right) | (bitwise or) ~ (bitwise not) & (bitwise and) Wcalc also allows you to group operations with parenthesis (), brackets [], and braces {}. Wcalc supports the following functions: sin cos tan cot asin acos atan acot sinh cosh tanh coth asinh acosh atanh acoth log ln logtwo round abs ceil floor sqrt cbrt comp Gamma lnGamma zeta sinc Wcalc has a few built-in constants: e pi Na k Cc ec R G g Me Mp Mn Md u amu c h mu0 epsilon0 muB muN b a0 F Vm NAk eV sigma alpha gamma re Kj Rk Rinf Eh Gf Mmu Mt Mh Malpha n0 c1 c2 G0 Phi0 K random irandom rand irand Wcalc supports user-defined variables. You define a variable like this: mynewvariable=5 Then you can use it in an expression like this: 1+3*mynewvariable/4 You can also define "active" variables. In the GUI, just type an expression into the appropriate spot of the variable list. In the command-line, when you assign a variable, put it in single-quotes, like this: twicepreviousanswer='a * 2' In expressions, these work just like regular variables, except the value is calculated when it's used, not when it's defined. Some special notes about variables - two things are reserved: a - this variable represents the last answer, and may be used in expressions. q - this variable is reserved in the command-line version (it means quit), and cannot be used in expressions. Also, built-in constants cannot be re-defined, although they are treated as variables in all other cases. ********* * Bases * ********* When you type a number into Wcalc, the number is normally assumed to be in decimal form. However, if the number has a prefix, it may be interpreted as a different form number. Specifically: 0x - this means "the following is a hexadecimal" 0 - this means "the following is octal" 0b - this means "the following is binary" This prefix affects only the number it prefixes, and none of the other numbers in the expression. Answers are, by default, displayed in decimal form. This can be changed in the preferences window - and display of the prefixes can be toggled in the preferences window as well. You can also change the display using the \hex, \oct, \bin, or \dec commands. You can, however, print a number in any base (without a prefix) by using the \base command. **************** * Installation * **************** Installing the regular (GUI) version of Wcalc is easy - copy it to your Applications folder! To install the command-line version on OSX, use the .pkg file. For people who may install and use Wcalc on other Unix systems, there are other packages available for download. The source for Wcalc is available on SourceForge from the Wcalc home page. Install as you would usually install from source. If you're really new to this sort of thing, there's some information in the INSTALL file. *********** * License * *********** Wcalc is made available under the GNU Public License (GPL), version 2, or (at your option) any later version of that license. The full text of the License is in the file titled COPYING as distributed with the source, or is available here: http://www.gnu.org/copyleft/gpl.html The general gist of the GPL is this: This program is free. You may do as you like with it, including sell the binaries, as long as you don't modify the program or use it as part of another program. If, however, you download the source code of this program and either modify the source (and give it to people) or use pieces of the source in your own program (and give THAT to people), you must distribute that program and its source code under the GPL as well. ************** * Known Bugs * ************** The grammar has too many shift/reduce conflicts. Leaks memory when there's a parse error. If you find more bugs, please LET ME KNOW! **************** * Contact Info * **************** The Wcalc homepage is http://w-calc.sourceforge.net/ Contact me at kyle-wcalc-sf@memoryhole.net wcalc-2.4/scanner.c0000664000175000000620000042576111101153601012540 0ustar kkstaff #line 3 "scanner.c" #define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 #define YY_FLEX_SUBMINOR_VERSION 35 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif /* First, we deal with platform-specific or compiler-specific issues. */ /* begin standard C headers. */ #include #include #include #include /* end standard C headers. */ /* flex integer type definitions */ #ifndef FLEXINT_H #define FLEXINT_H /* C99 systems have . Non-C99 systems may or may not. */ #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include typedef int8_t flex_int8_t; typedef uint8_t flex_uint8_t; typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; #else typedef signed char flex_int8_t; typedef short int flex_int16_t; typedef int flex_int32_t; typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; #endif /* ! C99 */ /* Limits of integral types. */ #ifndef INT8_MIN #define INT8_MIN (-128) #endif #ifndef INT16_MIN #define INT16_MIN (-32767-1) #endif #ifndef INT32_MIN #define INT32_MIN (-2147483647-1) #endif #ifndef INT8_MAX #define INT8_MAX (127) #endif #ifndef INT16_MAX #define INT16_MAX (32767) #endif #ifndef INT32_MAX #define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX #define UINT8_MAX (255U) #endif #ifndef UINT16_MAX #define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX #define UINT32_MAX (4294967295U) #endif #endif /* ! FLEXINT_H */ #ifdef __cplusplus /* The "const" storage-class-modifier is valid. */ #define YY_USE_CONST #else /* ! __cplusplus */ /* C99 requires __STDC__ to be defined as 1. */ #if defined (__STDC__) #define YY_USE_CONST #endif /* defined (__STDC__) */ #endif /* ! __cplusplus */ #ifdef YY_USE_CONST #define yyconst const #else #define yyconst #endif /* Returned upon end-of-file. */ #define YY_NULL 0 /* Promotes a possibly negative, possibly signed char to an unsigned * integer for use as an array index. If the signed char is negative, * we want to instead treat it as an 8-bit unsigned char, hence the * double cast. */ #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) /* Enter a start condition. This macro really ought to take a parameter, * but we do it the disgusting crufty way forced on us by the ()-less * definition of BEGIN. */ #define BEGIN (yy_start) = 1 + 2 * /* Translate the current start state into a value that can be later handed * to BEGIN to return to the state. The YYSTATE alias is for lex * compatibility. */ #define YY_START (((yy_start) - 1) / 2) #define YYSTATE YY_START /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) /* Special action meaning "start processing a new file". */ #define YY_NEW_FILE yyrestart(yyin ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ #ifndef YY_BUF_SIZE #define YY_BUF_SIZE 16384 #endif /* The state buf must be large enough to hold one state per character in the main buffer. */ #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) #ifndef YY_TYPEDEF_YY_BUFFER_STATE #define YY_TYPEDEF_YY_BUFFER_STATE typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif extern int yyleng; extern FILE *yyin, *yyout; #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 #define YY_LESS_LINENO(n) /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ do \ { \ /* Undo effects of setting up yytext. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ *yy_cp = (yy_hold_char); \ YY_RESTORE_YY_MORE_OFFSET \ (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ YY_DO_BEFORE_ACTION; /* set up yytext again */ \ } \ while ( 0 ) #define unput(c) yyunput( c, (yytext_ptr) ) #ifndef YY_TYPEDEF_YY_SIZE_T #define YY_TYPEDEF_YY_SIZE_T typedef size_t yy_size_t; #endif #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state { FILE *yy_input_file; char *yy_ch_buf; /* input buffer */ char *yy_buf_pos; /* current position in input buffer */ /* Size of input buffer in bytes, not including room for EOB * characters. */ yy_size_t yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. */ int yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to * delete it. */ int yy_is_our_buffer; /* Whether this is an "interactive" input source; if so, and * if we're using stdio for input, then we want to use getc() * instead of fread(), to make sure we stop fetching input after * each newline. */ int yy_is_interactive; /* Whether we're considered to be at the beginning of a line. * If so, '^' rules will be active on the next match, otherwise * not. */ int yy_at_bol; int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ /* Whether to try to fill the input buffer when we reach the * end of it. */ int yy_fill_buffer; int yy_buffer_status; #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 /* When an EOF's been seen but there's still some text to process * then we mark the buffer as YY_EOF_PENDING, to indicate that we * shouldn't try reading from the input source any more. We might * still have a bunch of tokens to match, though, because of * possible backing-up. * * When we actually see the EOF, we change the status to "new" * (via yyrestart()), so that the user can continue scanning by * just pointing yyin at a new input file. */ #define YY_BUFFER_EOF_PENDING 2 }; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ /* Stack of input buffers. */ static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ /* We provide macros for accessing buffer states in case in the * future we want to put the buffer states in a more general * "scanner state". * * Returns the top of the stack, or NULL. */ #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ : NULL) /* Same as previous macro, but useful when we know that the buffer stack is not * NULL or when we need an lvalue. For internal use only. */ #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] /* yy_hold_char holds the character lost when yytext is formed. */ static char yy_hold_char; static int yy_n_chars; /* number of characters read into yy_ch_buf */ int yyleng; /* Points to current character in buffer. */ static char *yy_c_buf_p = (char *) 0; static int yy_init = 0; /* whether we need to initialize */ static int yy_start = 0; /* start state number */ /* Flag which is used to allow yywrap()'s to do buffer switches * instead of setting up a fresh yyin. A bit of a hack ... */ static int yy_did_buffer_switch_on_eof; void yyrestart (FILE *input_file ); void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ); YY_BUFFER_STATE yy_create_buffer (FILE *file,int size ); void yy_delete_buffer (YY_BUFFER_STATE b ); void yy_flush_buffer (YY_BUFFER_STATE b ); void yypush_buffer_state (YY_BUFFER_STATE new_buffer ); void yypop_buffer_state (void ); static void yyensure_buffer_stack (void ); static void yy_load_buffer_state (void ); static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file ); #define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER ) YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ); YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ); YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len ); void *yyalloc (yy_size_t ); void *yyrealloc (void *,yy_size_t ); void yyfree (void * ); #define yy_new_buffer yy_create_buffer #define yy_set_interactive(is_interactive) \ { \ if ( ! YY_CURRENT_BUFFER ){ \ yyensure_buffer_stack (); \ YY_CURRENT_BUFFER_LVALUE = \ yy_create_buffer(yyin,YY_BUF_SIZE ); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ } #define yy_set_bol(at_bol) \ { \ if ( ! YY_CURRENT_BUFFER ){\ yyensure_buffer_stack (); \ YY_CURRENT_BUFFER_LVALUE = \ yy_create_buffer(yyin,YY_BUF_SIZE ); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ } #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) /* Begin user sect3 */ typedef unsigned char YY_CHAR; FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; typedef int yy_state_type; extern int yylineno; int yylineno = 1; extern char *yytext; #define yytext_ptr yytext static yy_state_type yy_get_previous_state (void ); static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); static int yy_get_next_buffer (void ); static void yy_fatal_error (yyconst char msg[] ); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. */ #define YY_DO_BEFORE_ACTION \ (yytext_ptr) = yy_bp; \ yyleng = (size_t) (yy_cp - yy_bp); \ (yy_hold_char) = *yy_cp; \ *yy_cp = '\0'; \ (yy_c_buf_p) = yy_cp; #define YY_NUM_RULES 188 #define YY_END_OF_BUFFER 189 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info { flex_int32_t yy_verify; flex_int32_t yy_nxt; }; static yyconst flex_int16_t yy_accept[775] = { 0, 0, 0, 189, 187, 1, 2, 105, 44, 111, 115, 187, 97, 98, 109, 108, 186, 133, 181, 110, 184, 182, 126, 112, 125, 34, 187, 179, 179, 179, 69, 54, 179, 94, 179, 179, 179, 53, 179, 179, 101, 187, 102, 113, 179, 67, 61, 45, 179, 55, 62, 179, 50, 179, 179, 179, 179, 179, 179, 179, 179, 60, 179, 179, 99, 114, 100, 116, 187, 187, 187, 187, 187, 1, 122, 44, 119, 0, 177, 106, 186, 181, 0, 0, 43, 181, 184, 0, 0, 0, 186, 182, 182, 0, 128, 131, 121, 129, 127, 0, 0, 0, 179, 178, 179, 51, 179, 79, 88, 179, 179, 179, 80, 179, 179, 76, 179, 59, 56, 83, 179, 58, 57, 82, 0, 0, 0, 49, 49, 46, 179, 179, 77, 0, 70, 89, 179, 179, 3, 0, 4, 7, 12, 0, 0, 19, 0, 24, 0, 0, 0, 17, 68, 179, 179, 179, 179, 179, 179, 179, 179, 86, 87, 179, 179, 179, 179, 71, 52, 179, 179, 121, 179, 179, 179, 179, 179, 161, 179, 179, 85, 179, 122, 179, 179, 117, 179, 75, 179, 179, 179, 179, 179, 179, 179, 117, 104, 107, 0, 91, 92, 93, 109, 110, 0, 73, 74, 0, 46, 72, 0, 0, 0, 181, 0, 0, 43, 181, 0, 184, 0, 184, 185, 183, 186, 182, 182, 0, 0, 182, 0, 0, 179, 179, 179, 179, 179, 179, 179, 81, 179, 81, 84, 82, 179, 179, 0, 179, 179, 0, 0, 0, 0, 0, 0, 0, 7, 7, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 0, 21, 0, 0, 29, 0, 0, 0, 0, 0, 163, 179, 179, 179, 60, 119, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 135, 137, 139, 179, 179, 179, 165, 179, 179, 179, 179, 179, 159, 63, 65, 66, 179, 179, 179, 103, 179, 179, 179, 138, 179, 134, 179, 136, 124, 179, 63, 65, 66, 0, 0, 90, 0, 0, 64, 0, 0, 133, 164, 120, 118, 123, 132, 130, 181, 42, 0, 181, 184, 185, 0, 183, 0, 186, 182, 182, 182, 0, 0, 179, 179, 179, 179, 179, 35, 179, 82, 90, 179, 179, 78, 78, 179, 179, 0, 3, 0, 0, 0, 0, 4, 16, 0, 0, 0, 7, 0, 0, 12, 0, 0, 15, 0, 0, 19, 0, 21, 22, 24, 0, 28, 0, 0, 0, 0, 141, 143, 145, 179, 179, 179, 179, 179, 179, 179, 179, 144, 140, 142, 168, 167, 172, 0, 179, 147, 179, 0, 149, 0, 151, 173, 179, 179, 171, 179, 179, 179, 179, 179, 179, 179, 179, 179, 169, 179, 0, 179, 150, 179, 0, 158, 134, 146, 164, 0, 148, 176, 0, 0, 0, 0, 0, 0, 181, 185, 0, 185, 183, 0, 0, 183, 182, 180, 182, 96, 95, 179, 74, 88, 174, 179, 179, 179, 89, 0, 0, 0, 0, 41, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 15, 0, 18, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 153, 155, 157, 73, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 156, 152, 154, 179, 0, 139, 0, 135, 0, 0, 0, 179, 179, 166, 170, 179, 179, 179, 179, 85, 179, 162, 0, 179, 0, 72, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 183, 182, 0, 179, 84, 179, 179, 0, 37, 0, 0, 30, 36, 36, 0, 0, 0, 16, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 20, 0, 0, 23, 0, 0, 0, 0, 28, 31, 40, 32, 32, 0, 141, 143, 145, 144, 140, 142, 179, 179, 179, 179, 179, 179, 141, 179, 0, 135, 143, 145, 0, 179, 121, 179, 179, 160, 63, 47, 144, 138, 0, 140, 0, 142, 0, 0, 180, 180, 179, 90, 3, 36, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 6, 6, 33, 33, 0, 20, 20, 0, 22, 0, 0, 25, 0, 0, 31, 0, 179, 179, 179, 179, 179, 179, 167, 179, 153, 157, 48, 175, 156, 152, 154, 180, 180, 64, 179, 179, 0, 0, 0, 4, 0, 0, 0, 10, 0, 39, 0, 0, 14, 0, 0, 0, 24, 0, 0, 0, 0, 0, 38, 139, 179, 179, 0, 0, 9, 0, 0, 39, 39, 0, 18, 0, 22, 29, 25, 0, 0, 28, 179, 179, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 0, 16, 0, 0, 0, 0, 0, 0, 26, 0, 8, 7, 12, 0, 27, 11, 0, 0, 0, 29, 0 } ; static yyconst flex_int32_t yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 4, 1, 5, 1, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 20, 20, 20, 20, 20, 20, 21, 1, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 36, 43, 44, 36, 36, 45, 36, 36, 36, 46, 47, 48, 49, 50, 51, 1, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 1, 82, 1, 1, 83, 84, 85, 1, 1, 86, 87, 1, 1, 1, 1, 1, 1, 1, 1, 88, 1, 1, 1, 1, 89, 1, 1, 90, 1, 1, 1, 91, 1, 92, 1, 1, 1, 93, 94, 95, 96, 97, 1, 1, 1, 98, 1, 1, 1, 1, 99, 100, 101, 1, 102, 1, 103, 1, 1, 1, 1, 104, 105, 106, 1, 1, 1, 107, 108, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 109, 110, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 111, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } ; static yyconst flex_int32_t yy_meta[112] = { 0, 1, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 5, 6, 7, 8, 8, 8, 8, 9, 1, 9, 1, 1, 10, 8, 8, 8, 8, 8, 8, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 7, 2, 8, 8, 8, 8, 8, 8, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 7, 7, 1, 1, 1 } ; static yyconst flex_int16_t yy_base[793] = { 0, 0, 0, 1326, 3931, 1317, 3931, 1290, 0, 3931, 1304, 1299, 3931, 3931, 1295, 3931, 99, 3931, 107, 112, 116, 124, 123, 1281, 125, 3931, 116, 156, 164, 191, 202, 211, 140, 199, 227, 113, 250, 254, 276, 272, 3931, 288, 3931, 3931, 318, 333, 350, 377, 384, 411, 390, 406, 414, 421, 446, 454, 452, 447, 471, 472, 508, 516, 526, 531, 3931, 1224, 3931, 3931, 215, 61, 99, 70, 74, 1300, 3931, 0, 3931, 1288, 3931, 3931, 538, 557, 229, 1283, 0, 585, 602, 611, 380, 617, 637, 646, 663, 672, 3931, 3931, 3931, 3931, 3931, 1227, 1237, 166, 176, 3931, 669, 677, 685, 692, 204, 697, 713, 708, 738, 757, 762, 768, 777, 783, 788, 827, 832, 843, 850, 765, 1170, 136, 1185, 838, 855, 862, 653, 873, 803, 1181, 876, 235, 892, 910, 61, 200, 199, 951, 132, 181, 1204, 205, 970, 209, 153, 1187, 1200, 3931, 272, 938, 943, 947, 952, 976, 984, 992, 1015, 278, 285, 1029, 1020, 1041, 1048, 1059, 1064, 1075, 1103, 1118, 1093, 1110, 1126, 1133, 1148, 1174, 1166, 1181, 303, 1213, 1189, 1222, 1235, 1242, 1244, 1262, 1264, 1271, 1290, 1300, 1316, 1318, 1328, 3931, 3931, 3931, 566, 3931, 3931, 3931, 3931, 3931, 396, 3931, 3931, 513, 3931, 3931, 242, 299, 399, 431, 1244, 362, 0, 1387, 1059, 1395, 476, 590, 1402, 297, 1258, 1410, 1419, 856, 620, 1065, 1195, 1210, 1409, 1414, 1419, 1438, 1443, 1454, 1470, 1472, 1474, 3931, 3931, 3931, 1506, 1508, 1157, 1534, 1547, 1177, 281, 1243, 1176, 1172, 351, 1180, 1553, 1267, 1176, 1162, 215, 1168, 1152, 1148, 1147, 1145, 1143, 1157, 1595, 1193, 1304, 1154, 1149, 1138, 1123, 1114, 1115, 1124, 1107, 1549, 1569, 1563, 1574, 1591, 1601, 1625, 1575, 1617, 1636, 1644, 1649, 1661, 1673, 1689, 1678, 1709, 1721, 1733, 1745, 1750, 1653, 1745, 1792, 1324, 1808, 1814, 1794, 1830, 511, 1831, 1839, 1872, 1874, 1892, 1886, 1894, 1913, 1919, 1940, 1924, 1955, 1975, 1977, 1984, 1996, 3931, 3931, 3931, 1141, 1111, 3931, 1135, 1107, 3931, 1131, 1102, 3931, 3931, 3931, 3931, 3931, 3931, 3931, 1428, 1146, 1655, 1811, 2043, 1903, 2052, 1128, 441, 2062, 2070, 2078, 1817, 1123, 1122, 2067, 2075, 2089, 2090, 2092, 2104, 2119, 2131, 540, 2137, 2146, 2158, 3931, 2164, 2173, 1090, 1089, 1063, 1128, 1073, 342, 1065, 1057, 1047, 363, 1054, 2229, 1040, 1034, 1048, 1035, 1040, 1021, 1034, 1018, 1018, 1004, 3931, 1011, 1006, 1008, 481, 1007, 988, 986, 996, 2200, 2218, 2226, 2181, 2242, 2244, 2268, 2274, 2286, 2288, 2311, 2327, 2329, 2347, 2352, 1984, 2197, 1033, 2344, 2370, 2381, 1027, 2397, 1021, 2408, 2424, 2426, 2442, 2452, 2462, 2375, 2486, 2487, 2501, 2509, 2508, 2542, 2531, 2552, 2554, 1020, 2561, 2584, 2589, 1019, 2596, 2611, 2612, 2628, 1015, 2644, 2660, 985, 956, 980, 949, 974, 936, 1835, 2664, 2299, 2342, 974, 2696, 2711, 2727, 2756, 2773, 2782, 3931, 3931, 2779, 2788, 2791, 2800, 2815, 2827, 2836, 2849, 2572, 929, 2690, 295, 3931, 939, 562, 929, 922, 983, 909, 911, 908, 914, 926, 3931, 922, 915, 907, 3931, 906, 892, 901, 956, 511, 903, 890, 597, 895, 947, 891, 943, 876, 2863, 2864, 2872, 2881, 2841, 2576, 2877, 2894, 2897, 2914, 2926, 2957, 2959, 2978, 2980, 2994, 3016, 3017, 3031, 3032, 917, 3033, 920, 3046, 913, 908, 911, 3048, 3068, 3073, 3088, 3104, 3109, 3128, 3130, 3137, 3148, 3153, 906, 3169, 908, 3192, 899, 897, 892, 891, 853, 826, 850, 821, 845, 815, 3224, 3251, 3212, 3219, 3231, 3242, 3272, 2716, 2355, 801, 3113, 2680, 865, 495, 797, 795, 808, 799, 3931, 854, 800, 771, 779, 775, 769, 770, 749, 817, 814, 762, 3931, 810, 740, 730, 3931, 738, 746, 732, 737, 476, 0, 3931, 3931, 791, 720, 3274, 3281, 3292, 3297, 3299, 3304, 3353, 3319, 3321, 3337, 3353, 3371, 3931, 3382, 771, 3398, 3931, 3931, 770, 3409, 3425, 3427, 3444, 3451, 3472, 3487, 3931, 3488, 767, 3931, 766, 3931, 759, 2804, 3133, 3285, 3489, 3490, 3931, 771, 698, 699, 705, 694, 684, 695, 685, 696, 684, 692, 3415, 3931, 740, 3931, 738, 668, 0, 732, 668, 667, 648, 661, 649, 298, 647, 0, 653, 3526, 3534, 3535, 3543, 3571, 3579, 3580, 3587, 3931, 3931, 3588, 3624, 3931, 3931, 3931, 3492, 3537, 546, 3632, 3624, 706, 654, 703, 3931, 645, 630, 647, 3931, 628, 691, 625, 3556, 3635, 609, 610, 598, 3931, 591, 597, 600, 575, 574, 3931, 3642, 3649, 3654, 556, 557, 3931, 553, 554, 0, 609, 531, 3931, 537, 3931, 538, 3931, 529, 517, 576, 3681, 3699, 506, 482, 478, 454, 456, 449, 447, 425, 410, 3707, 313, 3931, 330, 322, 313, 304, 256, 212, 3931, 183, 3931, 3711, 3931, 93, 3931, 3931, 88, 63, 45, 3931, 3931, 3777, 3787, 3796, 3805, 3815, 3824, 3828, 3837, 3838, 3845, 3852, 3860, 3870, 3880, 3890, 3900, 3910, 3920 } ; static yyconst flex_int16_t yy_def[793] = { 0, 774, 1, 774, 774, 774, 774, 774, 775, 774, 774, 776, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 777, 777, 777, 777, 777, 31, 31, 31, 31, 31, 31, 31, 31, 774, 774, 774, 774, 31, 31, 31, 31, 31, 31, 46, 46, 46, 46, 46, 31, 31, 47, 46, 47, 31, 31, 46, 46, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 775, 774, 776, 774, 774, 774, 774, 774, 778, 779, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 780, 774, 46, 46, 46, 46, 780, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 31, 774, 774, 774, 31, 31, 31, 47, 47, 47, 774, 47, 780, 47, 46, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 780, 46, 46, 47, 47, 47, 46, 46, 31, 780, 780, 31, 47, 46, 47, 47, 47, 47, 46, 46, 47, 47, 46, 46, 31, 31, 31, 31, 780, 31, 31, 31, 46, 46, 46, 46, 46, 47, 47, 47, 47, 47, 47, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 778, 778, 779, 774, 774, 774, 774, 774, 774, 781, 774, 774, 774, 774, 774, 774, 774, 774, 47, 47, 47, 47, 47, 47, 47, 47, 47, 774, 774, 774, 31, 31, 774, 31, 31, 774, 774, 782, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 31, 46, 47, 47, 47, 47, 46, 31, 47, 31, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 31, 31, 31, 46, 46, 46, 31, 31, 780, 31, 31, 31, 46, 46, 46, 46, 46, 46, 31, 31, 46, 46, 46, 46, 31, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 778, 774, 774, 774, 774, 774, 783, 784, 774, 774, 774, 774, 774, 774, 31, 31, 31, 31, 46, 46, 46, 46, 780, 46, 46, 46, 774, 46, 46, 774, 774, 774, 782, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 46, 46, 46, 31, 46, 46, 46, 31, 46, 46, 46, 46, 46, 46, 46, 47, 47, 774, 47, 47, 47, 774, 47, 774, 47, 47, 47, 47, 47, 47, 31, 31, 31, 31, 31, 31, 31, 46, 46, 46, 774, 46, 46, 31, 774, 31, 31, 31, 31, 774, 31, 31, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 783, 774, 774, 774, 774, 774, 774, 774, 774, 31, 31, 31, 31, 31, 31, 31, 31, 774, 774, 774, 785, 774, 774, 774, 774, 774, 786, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 787, 774, 31, 31, 31, 31, 46, 47, 47, 47, 47, 47, 47, 46, 46, 31, 31, 31, 31, 31, 31, 31, 774, 31, 774, 46, 774, 774, 774, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 774, 46, 774, 46, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 46, 46, 46, 46, 774, 774, 774, 774, 774, 785, 785, 774, 774, 774, 774, 774, 786, 774, 774, 774, 774, 774, 774, 774, 788, 789, 774, 774, 790, 774, 774, 774, 774, 774, 774, 774, 774, 791, 774, 774, 787, 774, 46, 46, 46, 46, 46, 46, 46, 47, 47, 47, 47, 47, 774, 47, 774, 47, 774, 774, 774, 47, 47, 47, 31, 31, 31, 31, 774, 31, 774, 774, 774, 774, 774, 774, 774, 774, 31, 31, 774, 785, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 788, 774, 789, 774, 790, 790, 774, 774, 774, 774, 774, 774, 774, 791, 774, 31, 31, 31, 31, 31, 31, 31, 31, 774, 774, 31, 31, 774, 774, 774, 774, 774, 780, 31, 46, 785, 774, 774, 774, 774, 774, 774, 774, 774, 792, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 46, 46, 46, 774, 774, 774, 774, 774, 792, 792, 774, 774, 774, 774, 774, 774, 774, 774, 774, 46, 46, 774, 774, 774, 774, 774, 774, 774, 774, 774, 46, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 0, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774 } ; static yyconst flex_int16_t yy_nxt[4043] = { 0, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 21, 21, 4, 22, 23, 24, 25, 26, 27, 27, 28, 27, 29, 30, 31, 32, 27, 27, 33, 27, 34, 35, 27, 36, 37, 27, 38, 39, 40, 41, 42, 43, 4, 44, 45, 46, 27, 47, 48, 49, 50, 51, 27, 52, 53, 54, 55, 56, 57, 27, 58, 59, 60, 61, 27, 27, 62, 27, 63, 64, 65, 66, 67, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 68, 69, 70, 71, 72, 80, 249, 80, 773, 80, 80, 80, 80, 80, 250, 80, 83, 81, 81, 81, 81, 84, 80, 102, 85, 772, 86, 86, 86, 86, 90, 82, 91, 127, 92, 92, 92, 92, 94, 95, 87, 97, 98, 202, 99, 208, 209, 771, 93, 100, 102, 101, 104, 210, 211, 770, 82, 203, 128, 101, 104, 101, 88, 104, 114, 87, 102, 102, 102, 102, 102, 101, 103, 93, 102, 102, 102, 102, 102, 104, 103, 260, 103, 104, 89, 104, 101, 204, 261, 114, 104, 205, 103, 206, 207, 251, 198, 101, 275, 101, 102, 102, 102, 102, 102, 102, 101, 103, 102, 102, 104, 105, 102, 102, 102, 102, 102, 276, 103, 104, 103, 108, 102, 102, 102, 102, 106, 103, 242, 262, 101, 109, 769, 241, 212, 102, 212, 102, 104, 263, 213, 213, 213, 107, 104, 264, 102, 104, 254, 104, 110, 103, 266, 115, 272, 102, 111, 252, 273, 253, 102, 112, 255, 768, 102, 267, 104, 101, 274, 104, 104, 386, 116, 101, 104, 117, 118, 104, 129, 119, 101, 113, 135, 387, 120, 121, 102, 122, 103, 104, 486, 123, 104, 104, 103, 104, 104, 104, 101, 104, 104, 103, 130, 129, 104, 350, 196, 131, 197, 132, 198, 136, 199, 200, 201, 104, 351, 104, 767, 103, 104, 104, 104, 336, 104, 337, 104, 124, 152, 125, 126, 338, 339, 134, 138, 139, 140, 141, 104, 374, 142, 143, 137, 102, 144, 375, 104, 145, 146, 719, 147, 148, 149, 104, 150, 720, 151, 104, 133, 581, 102, 161, 162, 104, 153, 154, 215, 602, 104, 766, 104, 344, 104, 765, 155, 156, 157, 764, 104, 763, 158, 159, 160, 104, 340, 341, 342, 102, 104, 104, 222, 222, 222, 222, 102, 104, 163, 104, 379, 164, 104, 102, 102, 104, 104, 488, 330, 380, 489, 165, 213, 213, 213, 166, 114, 167, 104, 102, 102, 493, 104, 102, 104, 104, 168, 102, 102, 104, 494, 173, 169, 104, 102, 102, 104, 331, 104, 170, 171, 114, 174, 343, 343, 343, 343, 172, 467, 104, 467, 104, 104, 468, 104, 104, 104, 104, 175, 102, 102, 762, 104, 104, 102, 104, 180, 104, 332, 104, 176, 104, 104, 510, 104, 104, 104, 129, 510, 104, 761, 177, 178, 104, 102, 102, 104, 104, 221, 221, 221, 221, 774, 104, 104, 181, 104, 104, 760, 104, 759, 104, 129, 758, 104, 182, 104, 104, 101, 104, 104, 104, 104, 179, 757, 183, 185, 104, 186, 104, 102, 104, 187, 189, 104, 333, 184, 190, 102, 103, 104, 677, 188, 756, 104, 191, 104, 101, 104, 102, 102, 511, 104, 101, 102, 102, 80, 755, 80, 104, 80, 80, 80, 80, 334, 192, 652, 104, 103, 251, 104, 754, 600, 104, 103, 80, 601, 80, 104, 81, 81, 81, 81, 510, 104, 752, 602, 104, 325, 104, 104, 751, 194, 82, 750, 335, 749, 193, 104, 326, 748, 104, 104, 80, 510, 80, 104, 217, 217, 217, 217, 327, 221, 221, 221, 221, 732, 328, 82, 747, 80, 218, 219, 583, 86, 86, 86, 86, 220, 746, 220, 745, 744, 221, 221, 221, 221, 741, 87, 223, 223, 223, 223, 229, 229, 229, 218, 740, 329, 223, 223, 223, 223, 223, 223, 80, 739, 80, 738, 224, 224, 224, 224, 87, 80, 737, 80, 605, 225, 225, 225, 225, 606, 736, 223, 223, 223, 223, 223, 223, 735, 90, 93, 91, 734, 226, 226, 226, 226, 227, 733, 227, 102, 102, 228, 229, 229, 229, 732, 93, 102, 102, 730, 104, 729, 728, 727, 93, 102, 102, 251, 726, 104, 700, 722, 102, 102, 721, 244, 718, 102, 102, 717, 716, 93, 104, 104, 104, 715, 714, 104, 102, 102, 104, 232, 104, 102, 102, 104, 670, 104, 233, 713, 104, 104, 667, 104, 665, 104, 234, 104, 710, 104, 104, 709, 104, 104, 708, 104, 707, 104, 102, 102, 104, 706, 705, 104, 104, 104, 104, 704, 104, 104, 703, 104, 702, 701, 235, 700, 104, 102, 102, 694, 104, 104, 102, 102, 102, 104, 693, 692, 102, 102, 689, 688, 679, 104, 104, 611, 104, 102, 102, 676, 675, 674, 237, 102, 102, 673, 104, 672, 102, 102, 104, 671, 104, 104, 670, 236, 668, 104, 667, 240, 104, 665, 663, 104, 104, 104, 104, 237, 662, 104, 104, 661, 104, 660, 104, 104, 104, 659, 104, 658, 104, 104, 238, 104, 104, 104, 104, 102, 102, 104, 104, 104, 102, 102, 657, 104, 104, 102, 587, 104, 104, 656, 655, 102, 102, 104, 654, 104, 653, 774, 102, 102, 104, 104, 102, 228, 229, 229, 229, 651, 104, 102, 104, 333, 104, 104, 104, 104, 333, 330, 104, 104, 104, 330, 325, 104, 325, 104, 104, 104, 104, 104, 134, 104, 104, 104, 239, 645, 104, 104, 104, 104, 644, 643, 104, 104, 104, 104, 104, 642, 104, 104, 104, 104, 641, 247, 639, 631, 630, 104, 102, 102, 104, 629, 104, 104, 627, 625, 104, 104, 245, 104, 104, 104, 612, 104, 104, 611, 104, 609, 104, 608, 607, 104, 104, 256, 604, 603, 102, 102, 599, 104, 104, 102, 102, 104, 598, 597, 248, 104, 257, 257, 257, 257, 268, 596, 595, 594, 104, 593, 592, 591, 104, 590, 589, 588, 269, 587, 585, 270, 270, 270, 270, 104, 104, 584, 104, 582, 104, 104, 577, 104, 351, 104, 102, 102, 104, 567, 104, 104, 279, 280, 102, 102, 104, 281, 282, 104, 258, 566, 565, 104, 104, 104, 104, 564, 283, 563, 259, 104, 562, 560, 104, 284, 102, 558, 554, 541, 104, 104, 285, 271, 286, 540, 104, 104, 104, 104, 102, 536, 289, 515, 104, 104, 290, 514, 287, 288, 104, 513, 104, 102, 102, 104, 104, 512, 509, 104, 508, 291, 507, 506, 505, 345, 104, 345, 104, 104, 221, 346, 346, 346, 293, 104, 355, 355, 355, 355, 104, 104, 104, 504, 503, 502, 104, 104, 104, 104, 501, 104, 292, 500, 499, 498, 297, 497, 104, 294, 104, 104, 104, 104, 495, 295, 296, 104, 492, 104, 104, 491, 104, 104, 104, 102, 102, 104, 104, 490, 104, 104, 487, 104, 486, 104, 104, 485, 104, 104, 102, 102, 104, 104, 298, 484, 104, 104, 102, 102, 483, 104, 474, 473, 104, 102, 102, 104, 351, 104, 104, 215, 461, 104, 301, 104, 460, 459, 302, 102, 458, 457, 104, 104, 104, 104, 456, 299, 104, 104, 403, 104, 104, 104, 402, 401, 104, 102, 104, 104, 104, 400, 104, 104, 300, 102, 303, 104, 104, 399, 104, 304, 308, 104, 305, 104, 398, 104, 397, 104, 102, 306, 104, 309, 396, 395, 104, 394, 393, 392, 104, 391, 104, 390, 104, 310, 389, 104, 307, 104, 104, 311, 388, 385, 102, 104, 306, 104, 384, 104, 381, 378, 104, 102, 104, 104, 377, 104, 313, 251, 104, 373, 370, 104, 357, 104, 356, 102, 102, 215, 278, 277, 312, 104, 102, 102, 102, 102, 265, 104, 104, 246, 104, 243, 104, 80, 241, 80, 104, 352, 352, 352, 352, 104, 102, 102, 102, 102, 257, 257, 257, 257, 104, 231, 104, 315, 230, 314, 215, 104, 78, 104, 104, 104, 104, 104, 73, 195, 96, 104, 79, 78, 104, 316, 104, 76, 104, 74, 104, 104, 104, 104, 104, 73, 104, 270, 270, 270, 270, 318, 774, 774, 104, 774, 104, 104, 104, 774, 104, 104, 317, 774, 104, 104, 774, 774, 102, 102, 104, 104, 104, 774, 319, 774, 104, 774, 774, 774, 104, 320, 774, 104, 104, 774, 104, 104, 774, 104, 774, 104, 774, 104, 104, 321, 104, 774, 104, 104, 774, 104, 104, 104, 104, 774, 104, 322, 104, 104, 104, 104, 104, 323, 104, 774, 433, 104, 774, 104, 104, 104, 104, 774, 774, 324, 80, 774, 80, 104, 217, 217, 217, 217, 80, 774, 80, 774, 347, 347, 347, 347, 774, 348, 218, 222, 222, 222, 222, 80, 774, 80, 87, 353, 353, 353, 353, 774, 90, 349, 91, 774, 354, 354, 354, 354, 774, 93, 774, 218, 358, 343, 343, 343, 343, 774, 93, 87, 774, 359, 104, 774, 774, 774, 349, 104, 774, 774, 360, 104, 104, 774, 93, 774, 104, 104, 774, 774, 774, 104, 104, 93, 104, 104, 774, 104, 774, 104, 104, 104, 104, 774, 104, 104, 104, 104, 774, 774, 104, 774, 104, 774, 363, 104, 104, 104, 774, 774, 361, 104, 774, 104, 104, 774, 104, 774, 104, 104, 362, 104, 104, 104, 774, 104, 104, 104, 774, 363, 104, 366, 104, 102, 104, 774, 104, 104, 104, 774, 104, 104, 104, 104, 774, 364, 104, 104, 104, 104, 104, 774, 774, 104, 365, 104, 774, 104, 774, 102, 367, 774, 104, 256, 774, 774, 104, 774, 104, 104, 774, 104, 102, 369, 102, 774, 774, 774, 257, 257, 257, 257, 104, 774, 104, 371, 774, 774, 104, 774, 774, 368, 774, 104, 104, 102, 102, 774, 774, 104, 102, 104, 774, 104, 774, 268, 774, 104, 774, 104, 104, 774, 104, 382, 104, 774, 104, 269, 774, 104, 270, 270, 270, 270, 372, 406, 383, 104, 774, 104, 104, 104, 104, 104, 104, 412, 104, 774, 104, 104, 104, 407, 104, 104, 104, 774, 104, 404, 405, 104, 104, 102, 102, 104, 104, 774, 774, 104, 774, 104, 104, 102, 774, 104, 774, 774, 104, 104, 774, 104, 104, 104, 774, 774, 104, 774, 104, 104, 102, 104, 221, 346, 346, 346, 104, 413, 104, 408, 104, 104, 104, 774, 104, 104, 774, 774, 414, 104, 774, 409, 104, 104, 104, 410, 411, 774, 415, 104, 774, 774, 774, 104, 104, 431, 104, 774, 774, 104, 104, 104, 104, 104, 416, 104, 104, 104, 104, 104, 774, 104, 774, 104, 104, 774, 417, 104, 104, 104, 104, 774, 104, 104, 104, 774, 104, 774, 104, 774, 104, 104, 774, 104, 418, 420, 104, 774, 104, 104, 774, 774, 419, 104, 104, 774, 104, 104, 774, 421, 774, 774, 102, 104, 104, 422, 104, 774, 423, 424, 774, 425, 104, 774, 774, 104, 104, 104, 104, 774, 426, 104, 774, 427, 104, 774, 774, 104, 104, 104, 104, 104, 428, 104, 774, 104, 104, 104, 774, 104, 104, 104, 104, 774, 104, 104, 774, 774, 104, 102, 430, 102, 104, 104, 774, 774, 429, 104, 104, 104, 104, 104, 104, 774, 774, 104, 102, 102, 462, 462, 462, 462, 102, 102, 355, 355, 355, 355, 104, 774, 104, 774, 774, 774, 104, 774, 436, 102, 102, 104, 774, 104, 462, 462, 462, 462, 102, 104, 104, 774, 774, 104, 774, 432, 104, 774, 104, 104, 774, 104, 104, 104, 434, 774, 104, 774, 104, 104, 104, 435, 104, 774, 104, 104, 104, 104, 774, 104, 104, 102, 774, 104, 102, 102, 774, 774, 104, 774, 774, 104, 774, 437, 774, 438, 102, 102, 774, 104, 104, 774, 102, 102, 102, 102, 774, 774, 104, 774, 104, 774, 463, 463, 463, 463, 104, 774, 774, 104, 774, 104, 439, 102, 102, 774, 349, 440, 774, 102, 102, 104, 104, 102, 104, 774, 104, 104, 774, 104, 104, 104, 104, 104, 104, 774, 774, 774, 104, 102, 104, 349, 104, 774, 104, 441, 104, 774, 104, 104, 442, 104, 104, 774, 104, 102, 102, 104, 104, 774, 774, 104, 774, 104, 774, 104, 443, 104, 104, 774, 447, 104, 444, 774, 445, 102, 102, 102, 102, 104, 774, 446, 774, 104, 102, 102, 774, 448, 774, 774, 104, 449, 774, 450, 774, 102, 451, 774, 774, 104, 774, 774, 774, 104, 774, 104, 774, 104, 774, 453, 104, 104, 104, 104, 774, 104, 774, 774, 454, 104, 104, 774, 104, 104, 104, 104, 535, 104, 452, 104, 455, 774, 104, 104, 104, 104, 104, 774, 80, 774, 80, 104, 347, 347, 347, 347, 464, 774, 464, 774, 774, 465, 465, 465, 465, 104, 87, 80, 774, 80, 774, 470, 470, 470, 470, 80, 102, 80, 774, 471, 471, 471, 471, 80, 102, 472, 104, 354, 354, 354, 354, 87, 774, 93, 476, 774, 774, 475, 102, 102, 774, 93, 102, 102, 774, 104, 774, 774, 104, 104, 774, 104, 774, 104, 102, 102, 104, 774, 93, 104, 774, 774, 477, 774, 104, 774, 93, 104, 104, 102, 102, 774, 774, 104, 478, 774, 104, 104, 104, 104, 104, 102, 102, 774, 104, 774, 774, 102, 102, 104, 477, 774, 104, 774, 104, 774, 102, 102, 104, 104, 480, 774, 104, 774, 104, 774, 104, 104, 102, 102, 479, 774, 774, 774, 102, 102, 104, 104, 774, 104, 774, 104, 104, 102, 102, 104, 774, 774, 774, 104, 102, 104, 774, 104, 481, 104, 774, 482, 774, 104, 104, 774, 774, 104, 104, 774, 104, 774, 104, 104, 102, 102, 104, 774, 774, 774, 104, 774, 104, 104, 104, 104, 104, 256, 774, 519, 104, 774, 102, 102, 104, 482, 774, 774, 104, 104, 102, 102, 257, 257, 257, 257, 774, 104, 774, 104, 774, 774, 104, 104, 104, 516, 102, 102, 102, 102, 104, 104, 104, 774, 774, 774, 104, 104, 104, 774, 104, 774, 774, 517, 774, 104, 774, 774, 104, 774, 104, 518, 102, 102, 104, 496, 774, 102, 104, 774, 774, 104, 104, 104, 104, 774, 104, 104, 774, 774, 102, 102, 102, 102, 520, 774, 104, 774, 521, 774, 522, 523, 465, 465, 465, 465, 104, 104, 774, 774, 524, 774, 526, 774, 525, 102, 102, 104, 774, 774, 104, 774, 774, 774, 104, 104, 527, 104, 104, 774, 104, 102, 102, 102, 102, 774, 774, 104, 104, 530, 104, 774, 528, 529, 104, 465, 465, 465, 465, 774, 104, 102, 102, 104, 774, 774, 102, 102, 576, 576, 576, 576, 531, 104, 774, 774, 104, 104, 104, 104, 774, 104, 532, 774, 533, 104, 774, 774, 102, 104, 774, 104, 774, 104, 537, 104, 104, 774, 104, 104, 104, 104, 534, 774, 104, 774, 774, 104, 104, 104, 774, 104, 774, 104, 104, 104, 538, 104, 104, 774, 104, 774, 104, 476, 774, 774, 104, 774, 104, 774, 774, 104, 774, 104, 104, 774, 774, 104, 104, 774, 774, 104, 539, 774, 104, 104, 774, 104, 104, 104, 774, 774, 104, 104, 542, 774, 774, 774, 104, 774, 104, 104, 774, 774, 104, 104, 774, 104, 104, 774, 774, 104, 104, 774, 104, 774, 104, 774, 774, 104, 104, 774, 104, 104, 774, 543, 774, 104, 104, 104, 104, 774, 104, 104, 774, 104, 774, 104, 104, 102, 102, 544, 104, 104, 774, 104, 104, 774, 104, 104, 104, 774, 104, 104, 102, 104, 104, 774, 104, 774, 774, 102, 102, 104, 104, 104, 104, 545, 104, 104, 774, 104, 104, 104, 104, 104, 774, 546, 774, 104, 104, 774, 774, 104, 774, 102, 102, 547, 549, 104, 104, 104, 774, 774, 104, 102, 104, 104, 774, 104, 104, 104, 104, 774, 774, 104, 102, 102, 102, 102, 575, 548, 774, 550, 104, 102, 102, 774, 774, 551, 104, 104, 104, 104, 104, 576, 576, 576, 576, 774, 104, 774, 774, 551, 774, 104, 774, 104, 102, 102, 774, 104, 102, 104, 104, 553, 104, 774, 774, 102, 104, 774, 104, 104, 552, 104, 104, 104, 104, 104, 104, 774, 555, 104, 102, 102, 615, 104, 774, 774, 556, 104, 104, 104, 104, 104, 104, 557, 104, 104, 104, 102, 104, 774, 104, 774, 104, 104, 774, 104, 104, 104, 774, 104, 104, 774, 774, 102, 559, 104, 104, 774, 104, 774, 104, 104, 774, 104, 774, 104, 104, 774, 774, 102, 774, 774, 104, 463, 463, 463, 463, 104, 774, 104, 104, 104, 104, 774, 578, 774, 561, 349, 104, 579, 579, 579, 579, 104, 774, 774, 774, 104, 104, 579, 579, 579, 579, 774, 104, 468, 469, 469, 469, 104, 575, 774, 349, 104, 774, 469, 469, 469, 469, 469, 469, 469, 469, 469, 774, 576, 576, 576, 576, 104, 469, 469, 469, 469, 469, 469, 568, 568, 568, 568, 469, 469, 469, 469, 469, 469, 568, 568, 568, 568, 568, 568, 774, 774, 774, 469, 469, 469, 469, 469, 469, 90, 774, 472, 774, 80, 80, 80, 80, 774, 774, 568, 568, 568, 568, 568, 568, 774, 80, 93, 80, 774, 569, 569, 569, 569, 774, 80, 102, 80, 774, 569, 569, 569, 569, 774, 93, 102, 104, 774, 102, 774, 774, 774, 93, 93, 774, 104, 774, 102, 104, 774, 571, 647, 648, 648, 648, 104, 774, 104, 774, 570, 774, 104, 102, 774, 104, 774, 104, 104, 93, 774, 104, 774, 104, 104, 102, 104, 104, 774, 104, 774, 774, 774, 104, 102, 104, 774, 104, 104, 774, 102, 102, 104, 774, 104, 774, 104, 102, 572, 104, 774, 573, 774, 104, 104, 774, 774, 104, 104, 774, 104, 102, 102, 104, 774, 104, 774, 774, 774, 104, 102, 104, 104, 104, 104, 104, 104, 774, 104, 102, 104, 774, 104, 774, 774, 104, 574, 104, 104, 104, 104, 104, 613, 614, 104, 774, 104, 104, 774, 104, 774, 104, 104, 104, 774, 104, 774, 104, 104, 774, 104, 774, 104, 774, 104, 774, 774, 516, 104, 104, 104, 104, 104, 104, 774, 104, 104, 774, 774, 104, 104, 774, 616, 104, 517, 104, 774, 774, 104, 104, 104, 774, 104, 104, 774, 104, 104, 774, 774, 104, 104, 774, 104, 104, 774, 104, 102, 102, 102, 102, 617, 104, 104, 104, 774, 774, 774, 104, 774, 774, 104, 774, 618, 774, 104, 104, 102, 774, 102, 774, 774, 774, 104, 774, 774, 774, 104, 774, 104, 774, 774, 104, 102, 104, 104, 774, 621, 774, 774, 774, 622, 774, 104, 774, 619, 104, 104, 104, 620, 774, 104, 623, 774, 104, 102, 102, 104, 774, 104, 774, 533, 104, 774, 774, 104, 104, 774, 104, 774, 102, 102, 102, 104, 774, 534, 774, 104, 774, 104, 104, 104, 104, 774, 104, 104, 102, 102, 102, 102, 104, 104, 774, 104, 774, 104, 104, 774, 774, 104, 104, 104, 774, 774, 774, 104, 104, 626, 102, 102, 104, 104, 104, 102, 102, 104, 104, 774, 774, 624, 774, 104, 774, 104, 628, 774, 104, 774, 102, 102, 104, 104, 104, 774, 104, 774, 632, 578, 104, 774, 104, 774, 774, 104, 102, 102, 104, 774, 104, 102, 102, 104, 579, 579, 579, 579, 104, 774, 774, 774, 633, 104, 774, 104, 774, 104, 104, 774, 102, 102, 102, 102, 695, 648, 648, 648, 634, 102, 102, 104, 104, 774, 104, 774, 104, 774, 774, 104, 102, 102, 635, 637, 104, 102, 102, 774, 104, 636, 774, 774, 774, 104, 774, 104, 774, 104, 104, 774, 104, 102, 102, 774, 104, 774, 774, 104, 104, 774, 637, 774, 104, 774, 104, 104, 774, 104, 104, 774, 104, 104, 774, 104, 102, 102, 638, 774, 104, 774, 774, 774, 104, 104, 774, 774, 104, 104, 646, 104, 646, 774, 774, 647, 648, 648, 648, 774, 774, 104, 774, 102, 102, 104, 640, 568, 568, 568, 568, 104, 774, 774, 104, 102, 102, 568, 568, 568, 568, 568, 568, 774, 104, 649, 102, 102, 104, 774, 80, 774, 80, 774, 569, 569, 569, 569, 104, 774, 774, 104, 568, 568, 568, 568, 568, 568, 93, 650, 104, 104, 774, 104, 774, 104, 102, 102, 102, 102, 774, 104, 774, 104, 104, 102, 102, 104, 696, 696, 696, 696, 774, 93, 104, 774, 102, 102, 104, 774, 774, 102, 102, 102, 102, 774, 774, 774, 102, 102, 774, 104, 774, 104, 104, 774, 104, 774, 774, 774, 104, 774, 774, 104, 650, 774, 104, 774, 104, 774, 104, 104, 774, 104, 104, 774, 104, 104, 104, 104, 774, 104, 774, 104, 104, 774, 104, 774, 104, 104, 104, 104, 104, 104, 774, 104, 104, 102, 102, 682, 104, 683, 774, 774, 774, 104, 774, 104, 104, 774, 774, 774, 104, 104, 104, 104, 774, 104, 774, 774, 104, 774, 104, 104, 104, 774, 774, 774, 684, 774, 104, 104, 104, 104, 774, 104, 774, 774, 104, 104, 774, 774, 104, 711, 685, 104, 104, 104, 774, 680, 681, 104, 774, 104, 104, 686, 774, 104, 712, 712, 712, 712, 104, 774, 104, 104, 774, 774, 104, 104, 774, 774, 104, 687, 774, 104, 104, 774, 104, 774, 104, 774, 774, 104, 104, 774, 774, 102, 774, 104, 774, 104, 104, 774, 102, 104, 104, 104, 104, 104, 649, 774, 104, 104, 104, 104, 774, 104, 774, 774, 104, 104, 774, 104, 774, 102, 104, 690, 104, 104, 104, 104, 691, 104, 774, 104, 104, 104, 104, 104, 102, 102, 697, 102, 104, 695, 695, 695, 695, 774, 104, 104, 104, 104, 104, 774, 774, 104, 774, 774, 104, 774, 774, 774, 104, 104, 774, 774, 774, 104, 104, 698, 104, 774, 774, 104, 104, 104, 104, 102, 104, 104, 104, 104, 774, 104, 774, 102, 102, 104, 696, 696, 696, 696, 711, 774, 102, 104, 104, 774, 104, 104, 699, 104, 774, 774, 104, 774, 104, 712, 712, 712, 712, 774, 104, 774, 104, 104, 774, 104, 774, 516, 104, 104, 102, 104, 774, 104, 104, 517, 518, 104, 102, 102, 104, 774, 104, 774, 532, 104, 102, 102, 104, 104, 774, 774, 774, 104, 104, 774, 104, 104, 774, 104, 774, 774, 104, 774, 774, 104, 774, 104, 104, 774, 104, 774, 533, 104, 104, 104, 104, 774, 104, 104, 534, 104, 104, 102, 102, 102, 104, 104, 774, 774, 104, 102, 774, 104, 712, 712, 712, 712, 104, 104, 723, 104, 102, 102, 774, 724, 104, 104, 774, 102, 102, 774, 104, 774, 102, 102, 774, 774, 104, 104, 104, 774, 725, 104, 774, 774, 104, 774, 774, 774, 774, 104, 104, 774, 742, 774, 104, 104, 774, 774, 104, 102, 102, 104, 104, 774, 774, 104, 774, 104, 104, 104, 104, 774, 104, 256, 774, 104, 774, 102, 102, 104, 104, 774, 753, 743, 104, 102, 102, 774, 257, 257, 257, 257, 774, 774, 104, 774, 774, 104, 774, 774, 774, 774, 774, 774, 774, 774, 774, 104, 774, 774, 774, 104, 104, 774, 774, 104, 774, 774, 774, 774, 104, 774, 774, 104, 774, 753, 774, 774, 774, 104, 774, 774, 774, 104, 774, 774, 774, 104, 75, 75, 774, 75, 75, 75, 75, 75, 75, 75, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 104, 774, 774, 774, 774, 774, 104, 104, 214, 214, 774, 214, 214, 214, 214, 214, 214, 214, 216, 216, 774, 216, 216, 216, 216, 216, 216, 216, 102, 774, 774, 774, 774, 774, 102, 102, 223, 774, 223, 774, 223, 376, 774, 774, 376, 376, 376, 376, 466, 774, 466, 469, 469, 774, 774, 469, 580, 774, 774, 580, 580, 580, 580, 586, 586, 774, 586, 586, 586, 586, 586, 586, 586, 610, 610, 774, 610, 610, 610, 610, 610, 610, 610, 664, 664, 774, 664, 664, 664, 664, 664, 664, 664, 666, 666, 774, 666, 666, 666, 666, 666, 666, 666, 669, 669, 774, 669, 669, 669, 669, 669, 669, 669, 678, 678, 774, 678, 678, 678, 678, 678, 678, 678, 731, 731, 774, 731, 731, 731, 731, 731, 731, 731, 3, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774 } ; static yyconst flex_int16_t yy_chk[4043] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16, 138, 16, 772, 16, 16, 16, 16, 18, 138, 18, 19, 18, 18, 18, 18, 19, 20, 35, 20, 771, 20, 20, 20, 20, 21, 18, 21, 35, 21, 21, 21, 21, 22, 22, 20, 24, 24, 69, 26, 71, 71, 770, 21, 26, 32, 27, 35, 72, 72, 767, 18, 69, 35, 28, 32, 101, 20, 35, 32, 20, 27, 27, 27, 27, 27, 102, 27, 21, 28, 28, 28, 28, 28, 32, 28, 142, 101, 35, 20, 32, 29, 70, 142, 32, 32, 70, 102, 70, 70, 139, 70, 30, 148, 108, 27, 29, 29, 29, 29, 29, 31, 29, 28, 33, 32, 28, 30, 30, 30, 30, 30, 148, 30, 33, 108, 31, 31, 31, 31, 31, 29, 31, 125, 143, 135, 31, 763, 125, 82, 29, 82, 34, 33, 143, 82, 82, 82, 29, 33, 143, 30, 34, 140, 33, 31, 135, 145, 33, 147, 31, 31, 139, 147, 139, 36, 31, 140, 761, 37, 145, 34, 152, 147, 33, 36, 260, 34, 161, 37, 34, 34, 34, 36, 34, 162, 31, 39, 260, 34, 34, 38, 34, 152, 36, 486, 34, 39, 37, 161, 36, 38, 34, 180, 37, 36, 162, 36, 36, 37, 223, 68, 37, 68, 37, 68, 39, 68, 68, 68, 38, 223, 39, 760, 180, 36, 38, 39, 210, 37, 210, 38, 34, 44, 34, 34, 210, 210, 38, 41, 41, 41, 41, 44, 250, 41, 41, 39, 45, 41, 250, 38, 41, 41, 676, 41, 41, 41, 45, 41, 676, 41, 44, 37, 486, 46, 46, 46, 44, 44, 44, 215, 759, 44, 758, 46, 215, 45, 757, 44, 44, 44, 756, 45, 754, 44, 44, 44, 45, 211, 211, 211, 47, 44, 46, 88, 88, 88, 88, 48, 46, 46, 47, 254, 46, 46, 50, 50, 45, 48, 378, 204, 254, 378, 46, 212, 212, 212, 46, 50, 47, 47, 51, 51, 382, 46, 49, 47, 48, 47, 52, 52, 47, 382, 48, 47, 49, 53, 53, 48, 204, 50, 47, 47, 50, 48, 213, 213, 213, 213, 47, 351, 47, 351, 50, 49, 351, 51, 50, 48, 51, 49, 54, 54, 752, 52, 49, 56, 52, 55, 51, 204, 53, 51, 51, 53, 607, 56, 52, 55, 57, 399, 52, 751, 53, 53, 49, 58, 58, 53, 57, 220, 220, 220, 220, 581, 56, 54, 55, 57, 54, 750, 56, 749, 55, 57, 748, 56, 55, 55, 54, 308, 57, 57, 54, 59, 54, 747, 55, 56, 57, 58, 58, 60, 59, 58, 59, 56, 207, 55, 59, 61, 308, 60, 607, 58, 746, 59, 59, 58, 366, 61, 62, 62, 399, 59, 697, 63, 63, 80, 745, 80, 60, 80, 80, 80, 80, 207, 60, 581, 61, 366, 489, 60, 744, 507, 61, 697, 81, 507, 81, 61, 81, 81, 81, 81, 741, 62, 740, 507, 62, 198, 63, 60, 739, 63, 81, 737, 207, 735, 62, 61, 198, 733, 62, 63, 85, 510, 85, 63, 85, 85, 85, 85, 198, 221, 221, 221, 221, 732, 198, 81, 730, 86, 85, 86, 489, 86, 86, 86, 86, 87, 729, 87, 727, 726, 87, 87, 87, 87, 721, 86, 89, 89, 89, 89, 228, 228, 228, 85, 720, 198, 89, 89, 89, 89, 89, 89, 90, 719, 90, 718, 90, 90, 90, 90, 86, 91, 717, 91, 510, 91, 91, 91, 91, 510, 715, 89, 89, 89, 89, 89, 89, 714, 92, 91, 92, 713, 92, 92, 92, 92, 93, 710, 93, 104, 104, 93, 93, 93, 93, 709, 92, 105, 105, 708, 130, 706, 705, 704, 91, 106, 106, 702, 701, 130, 700, 679, 107, 107, 677, 130, 675, 109, 109, 674, 673, 92, 130, 130, 104, 672, 671, 104, 111, 111, 130, 106, 105, 110, 110, 105, 670, 104, 109, 668, 106, 104, 667, 106, 665, 105, 110, 107, 662, 105, 107, 661, 109, 106, 660, 109, 659, 106, 112, 112, 107, 658, 657, 111, 107, 109, 111, 656, 110, 109, 655, 110, 654, 653, 111, 652, 111, 113, 113, 645, 111, 110, 114, 114, 123, 110, 643, 641, 115, 115, 631, 627, 612, 112, 123, 611, 112, 116, 116, 606, 605, 604, 114, 117, 117, 603, 112, 601, 118, 118, 112, 600, 113, 123, 599, 113, 597, 114, 596, 123, 114, 595, 594, 115, 123, 113, 115, 114, 593, 113, 114, 592, 116, 591, 114, 116, 115, 590, 117, 589, 115, 117, 116, 118, 123, 116, 118, 119, 119, 116, 132, 117, 120, 120, 588, 117, 118, 127, 587, 132, 118, 585, 584, 121, 121, 132, 583, 127, 582, 580, 122, 122, 132, 132, 128, 227, 227, 227, 227, 577, 132, 129, 119, 567, 128, 119, 127, 120, 566, 565, 120, 129, 127, 564, 563, 119, 562, 127, 121, 119, 120, 121, 127, 128, 120, 122, 120, 561, 122, 128, 129, 121, 560, 559, 128, 121, 129, 127, 122, 558, 131, 129, 122, 134, 556, 136, 554, 542, 541, 131, 137, 137, 134, 540, 128, 131, 538, 536, 134, 136, 131, 129, 131, 131, 515, 134, 134, 514, 136, 513, 131, 512, 511, 134, 136, 141, 509, 508, 153, 153, 506, 136, 136, 154, 154, 137, 505, 504, 137, 136, 141, 141, 141, 141, 146, 503, 501, 500, 137, 499, 497, 496, 137, 495, 494, 493, 146, 492, 491, 146, 146, 146, 146, 153, 155, 490, 153, 488, 154, 156, 484, 154, 466, 155, 158, 158, 153, 461, 156, 155, 153, 154, 159, 159, 156, 154, 155, 155, 141, 460, 459, 156, 156, 157, 155, 458, 156, 457, 141, 156, 456, 453, 157, 157, 160, 448, 444, 427, 157, 158, 158, 146, 158, 425, 160, 157, 157, 159, 163, 421, 159, 403, 158, 157, 159, 402, 158, 158, 163, 401, 159, 165, 165, 160, 159, 400, 398, 164, 397, 160, 396, 394, 393, 218, 160, 218, 164, 163, 218, 218, 218, 218, 164, 163, 229, 229, 229, 229, 163, 164, 164, 392, 391, 390, 160, 166, 165, 164, 389, 165, 163, 388, 387, 386, 166, 385, 167, 165, 163, 165, 166, 168, 383, 165, 165, 167, 381, 166, 166, 380, 168, 167, 169, 170, 170, 166, 168, 379, 167, 167, 377, 169, 376, 168, 168, 375, 167, 169, 171, 171, 172, 168, 169, 374, 169, 169, 174, 174, 373, 172, 357, 356, 169, 175, 175, 172, 350, 173, 170, 344, 335, 170, 172, 172, 334, 332, 173, 176, 331, 329, 172, 170, 173, 171, 328, 170, 171, 176, 278, 173, 173, 174, 277, 276, 174, 178, 171, 173, 175, 275, 171, 175, 171, 177, 174, 178, 176, 274, 174, 175, 179, 175, 176, 177, 273, 175, 272, 176, 182, 177, 179, 179, 271, 269, 178, 267, 266, 265, 182, 264, 178, 263, 177, 179, 262, 178, 178, 176, 177, 179, 261, 259, 181, 177, 177, 179, 258, 182, 255, 253, 179, 183, 181, 182, 252, 178, 181, 251, 182, 249, 246, 183, 231, 177, 230, 184, 184, 214, 150, 149, 179, 181, 185, 185, 186, 186, 144, 181, 182, 133, 183, 126, 181, 224, 124, 224, 183, 224, 224, 224, 224, 183, 187, 187, 188, 188, 257, 257, 257, 257, 184, 100, 181, 184, 99, 183, 83, 185, 77, 186, 185, 183, 186, 184, 73, 65, 23, 184, 14, 11, 185, 186, 186, 10, 185, 7, 186, 187, 189, 188, 187, 5, 188, 270, 270, 270, 270, 189, 3, 0, 187, 0, 188, 189, 187, 0, 188, 190, 188, 0, 189, 189, 0, 0, 303, 303, 190, 191, 189, 0, 190, 0, 190, 0, 0, 0, 191, 190, 0, 190, 190, 0, 191, 192, 0, 193, 0, 190, 0, 191, 191, 191, 192, 0, 193, 194, 0, 191, 192, 303, 193, 0, 303, 192, 194, 192, 192, 193, 193, 193, 194, 0, 303, 192, 0, 193, 303, 194, 194, 0, 0, 194, 217, 0, 217, 194, 217, 217, 217, 217, 219, 0, 219, 0, 219, 219, 219, 219, 0, 222, 217, 222, 222, 222, 222, 225, 0, 225, 219, 225, 225, 225, 225, 0, 226, 222, 226, 0, 226, 226, 226, 226, 0, 225, 0, 217, 232, 343, 343, 343, 343, 0, 226, 219, 0, 233, 232, 0, 0, 0, 222, 233, 0, 0, 234, 232, 234, 0, 225, 0, 233, 232, 0, 0, 0, 234, 233, 226, 232, 232, 0, 234, 0, 233, 233, 235, 232, 0, 234, 234, 236, 233, 0, 0, 235, 0, 234, 0, 237, 236, 235, 237, 0, 0, 235, 236, 0, 235, 235, 0, 237, 0, 236, 236, 236, 235, 237, 238, 0, 239, 236, 240, 0, 237, 237, 244, 238, 245, 239, 0, 240, 237, 238, 0, 239, 244, 240, 245, 0, 238, 238, 239, 239, 240, 240, 0, 0, 238, 240, 239, 0, 240, 0, 247, 244, 0, 245, 256, 0, 0, 244, 0, 245, 247, 0, 244, 248, 245, 279, 0, 0, 0, 256, 256, 256, 256, 248, 0, 279, 247, 0, 0, 247, 0, 0, 244, 0, 245, 247, 280, 280, 0, 0, 247, 286, 248, 0, 279, 0, 268, 0, 248, 0, 279, 286, 0, 248, 256, 279, 0, 281, 268, 0, 247, 268, 268, 268, 268, 248, 281, 256, 282, 0, 286, 280, 281, 248, 280, 279, 286, 282, 0, 281, 281, 286, 282, 282, 280, 283, 0, 281, 280, 280, 282, 282, 285, 285, 283, 284, 0, 0, 282, 0, 283, 286, 288, 0, 284, 0, 0, 283, 283, 0, 284, 287, 288, 0, 0, 283, 0, 284, 284, 300, 287, 345, 345, 345, 345, 284, 287, 285, 285, 300, 285, 288, 0, 287, 287, 0, 0, 288, 289, 0, 285, 287, 288, 290, 285, 285, 0, 289, 300, 0, 0, 0, 290, 289, 300, 291, 0, 0, 290, 300, 289, 289, 288, 290, 291, 290, 290, 292, 289, 0, 291, 0, 294, 290, 0, 291, 292, 291, 291, 300, 0, 294, 292, 293, 0, 291, 0, 294, 0, 292, 292, 0, 293, 292, 294, 294, 0, 292, 293, 0, 0, 293, 294, 295, 0, 293, 293, 0, 295, 0, 0, 301, 295, 293, 295, 296, 0, 295, 295, 0, 296, 301, 0, 0, 296, 295, 295, 297, 0, 296, 296, 0, 297, 295, 0, 0, 297, 296, 296, 298, 301, 297, 297, 0, 299, 296, 301, 0, 298, 297, 297, 301, 0, 299, 298, 0, 0, 297, 302, 299, 306, 298, 298, 0, 0, 298, 299, 299, 302, 298, 306, 301, 0, 0, 299, 304, 304, 346, 346, 346, 346, 305, 305, 355, 355, 355, 355, 302, 0, 306, 0, 0, 0, 302, 0, 306, 307, 309, 302, 0, 306, 462, 462, 462, 462, 310, 307, 309, 0, 0, 304, 0, 302, 304, 0, 310, 305, 0, 302, 305, 306, 304, 0, 304, 0, 307, 309, 304, 305, 305, 0, 307, 309, 305, 310, 0, 307, 309, 311, 0, 310, 312, 312, 0, 0, 310, 0, 0, 311, 0, 307, 0, 311, 314, 314, 0, 307, 309, 0, 313, 313, 315, 315, 0, 0, 310, 0, 311, 0, 348, 348, 348, 348, 311, 0, 0, 312, 0, 311, 312, 316, 316, 0, 348, 313, 0, 317, 317, 314, 312, 319, 314, 0, 312, 313, 0, 315, 313, 311, 315, 319, 314, 0, 0, 0, 314, 318, 313, 348, 315, 0, 313, 315, 315, 0, 316, 318, 316, 316, 319, 0, 317, 320, 320, 317, 319, 0, 0, 316, 0, 319, 0, 316, 317, 317, 318, 0, 319, 317, 318, 0, 318, 321, 321, 322, 322, 318, 0, 318, 0, 319, 323, 323, 0, 320, 0, 0, 320, 320, 0, 320, 0, 324, 320, 0, 0, 318, 0, 0, 0, 320, 0, 324, 0, 320, 0, 322, 321, 419, 322, 321, 0, 322, 0, 0, 322, 323, 419, 0, 323, 321, 324, 322, 419, 321, 321, 322, 324, 0, 323, 419, 419, 324, 323, 0, 347, 0, 347, 419, 347, 347, 347, 347, 349, 0, 349, 0, 0, 349, 349, 349, 349, 324, 347, 352, 0, 352, 0, 352, 352, 352, 352, 353, 358, 353, 0, 353, 353, 353, 353, 354, 359, 354, 358, 354, 354, 354, 354, 347, 0, 353, 359, 0, 0, 358, 360, 361, 0, 354, 362, 362, 0, 358, 0, 0, 360, 361, 0, 358, 0, 359, 363, 363, 358, 0, 353, 359, 0, 0, 360, 0, 359, 0, 354, 360, 361, 364, 364, 0, 0, 360, 361, 0, 358, 362, 360, 361, 362, 365, 365, 0, 359, 0, 0, 367, 367, 363, 362, 0, 363, 0, 362, 0, 368, 368, 360, 361, 367, 0, 363, 0, 364, 0, 363, 364, 369, 369, 364, 0, 0, 0, 371, 371, 365, 364, 0, 365, 0, 364, 367, 372, 372, 367, 0, 0, 0, 365, 407, 368, 0, 365, 368, 367, 0, 371, 0, 367, 407, 0, 0, 369, 368, 0, 369, 0, 368, 371, 404, 404, 371, 0, 0, 0, 369, 0, 372, 407, 369, 372, 371, 384, 0, 407, 371, 0, 405, 405, 407, 372, 0, 0, 420, 372, 406, 406, 384, 384, 384, 384, 0, 420, 0, 404, 0, 0, 404, 420, 407, 404, 408, 408, 409, 409, 420, 420, 404, 0, 0, 0, 404, 405, 420, 0, 405, 0, 0, 405, 0, 406, 0, 0, 406, 0, 405, 406, 410, 410, 405, 384, 0, 411, 406, 0, 0, 408, 406, 409, 408, 0, 409, 411, 0, 0, 412, 412, 413, 413, 408, 0, 409, 0, 408, 0, 409, 409, 464, 464, 464, 464, 411, 410, 0, 0, 410, 0, 411, 0, 410, 414, 414, 411, 0, 0, 410, 0, 0, 0, 410, 412, 412, 413, 412, 0, 413, 415, 415, 416, 416, 0, 0, 411, 412, 413, 413, 0, 412, 412, 413, 465, 465, 465, 465, 0, 414, 417, 417, 414, 0, 0, 418, 418, 576, 576, 576, 576, 414, 414, 0, 0, 415, 414, 416, 415, 0, 416, 415, 0, 416, 422, 0, 0, 434, 415, 0, 416, 0, 415, 422, 416, 417, 0, 434, 417, 422, 418, 417, 0, 418, 0, 0, 422, 422, 417, 0, 423, 0, 417, 418, 422, 423, 434, 418, 0, 423, 0, 424, 434, 0, 0, 423, 0, 434, 0, 0, 424, 0, 423, 423, 0, 0, 424, 426, 0, 0, 423, 424, 0, 424, 424, 0, 426, 434, 428, 0, 0, 424, 426, 428, 0, 0, 0, 428, 0, 426, 426, 0, 0, 428, 429, 0, 430, 426, 0, 0, 428, 428, 0, 429, 0, 430, 0, 0, 428, 429, 0, 430, 431, 0, 430, 0, 429, 429, 430, 430, 0, 431, 432, 0, 429, 0, 430, 431, 435, 436, 431, 432, 433, 0, 431, 431, 0, 432, 435, 436, 0, 433, 431, 437, 432, 432, 0, 433, 0, 0, 439, 438, 432, 437, 433, 433, 433, 435, 436, 0, 439, 438, 433, 435, 436, 0, 435, 0, 435, 436, 0, 0, 437, 0, 441, 441, 436, 438, 437, 439, 438, 0, 0, 437, 440, 439, 438, 0, 435, 436, 439, 438, 0, 0, 440, 442, 442, 443, 443, 483, 437, 0, 439, 437, 445, 445, 0, 0, 440, 441, 439, 438, 441, 440, 483, 483, 483, 483, 0, 440, 0, 0, 441, 0, 440, 0, 441, 446, 446, 0, 442, 447, 443, 442, 443, 443, 0, 0, 449, 445, 0, 447, 445, 442, 440, 443, 521, 442, 449, 443, 0, 445, 445, 450, 451, 521, 445, 0, 0, 446, 447, 521, 446, 450, 451, 446, 447, 449, 521, 521, 452, 447, 0, 449, 0, 446, 521, 0, 449, 446, 452, 0, 450, 451, 0, 0, 454, 451, 450, 451, 0, 447, 0, 450, 451, 0, 454, 0, 449, 452, 0, 0, 455, 0, 0, 452, 463, 463, 463, 463, 452, 0, 455, 450, 451, 454, 0, 485, 0, 454, 463, 454, 579, 579, 579, 579, 454, 0, 0, 0, 452, 455, 485, 485, 485, 485, 0, 455, 467, 467, 467, 467, 455, 575, 0, 463, 454, 0, 467, 467, 467, 467, 467, 467, 468, 468, 468, 0, 575, 575, 575, 575, 455, 468, 468, 468, 468, 468, 468, 469, 469, 469, 469, 467, 467, 467, 467, 467, 467, 469, 469, 469, 469, 469, 469, 0, 0, 0, 468, 468, 468, 468, 468, 468, 470, 0, 470, 0, 470, 470, 470, 470, 0, 0, 469, 469, 469, 469, 469, 469, 0, 471, 470, 471, 0, 471, 471, 471, 471, 0, 472, 475, 472, 0, 472, 472, 472, 472, 0, 471, 476, 475, 0, 477, 0, 0, 0, 470, 472, 0, 476, 0, 478, 477, 0, 475, 646, 646, 646, 646, 475, 0, 478, 0, 471, 0, 475, 479, 0, 476, 0, 475, 477, 472, 0, 476, 0, 479, 477, 480, 476, 478, 0, 477, 0, 0, 0, 478, 481, 480, 0, 475, 478, 0, 520, 520, 479, 0, 481, 0, 476, 482, 479, 477, 0, 480, 0, 479, 480, 0, 0, 482, 478, 0, 480, 516, 517, 481, 0, 480, 0, 0, 0, 481, 518, 516, 517, 479, 481, 520, 482, 0, 520, 519, 518, 0, 482, 0, 0, 480, 481, 482, 520, 519, 516, 517, 520, 520, 481, 0, 516, 517, 0, 518, 0, 516, 517, 522, 0, 518, 0, 482, 519, 0, 518, 0, 522, 0, 519, 0, 0, 522, 522, 519, 523, 516, 517, 524, 0, 522, 522, 0, 0, 523, 518, 0, 524, 522, 523, 523, 0, 0, 524, 519, 525, 0, 523, 523, 0, 524, 524, 0, 0, 525, 523, 0, 526, 524, 0, 525, 527, 527, 528, 528, 525, 526, 525, 525, 0, 0, 0, 526, 0, 0, 525, 0, 526, 0, 526, 526, 529, 0, 530, 0, 0, 0, 526, 0, 0, 0, 529, 0, 530, 0, 0, 527, 531, 528, 527, 0, 528, 0, 0, 0, 528, 0, 531, 0, 527, 529, 528, 530, 527, 0, 528, 529, 0, 530, 532, 533, 529, 0, 530, 0, 530, 531, 0, 0, 532, 533, 0, 531, 0, 534, 535, 537, 531, 0, 531, 0, 529, 0, 530, 534, 535, 537, 0, 532, 533, 539, 539, 543, 543, 532, 533, 0, 531, 0, 532, 533, 0, 0, 534, 535, 537, 0, 0, 0, 534, 535, 537, 544, 544, 534, 535, 537, 545, 545, 532, 533, 0, 0, 535, 0, 539, 0, 543, 539, 0, 543, 0, 546, 546, 534, 535, 537, 0, 539, 0, 543, 578, 539, 0, 543, 0, 0, 544, 547, 547, 544, 0, 545, 548, 548, 545, 578, 578, 578, 578, 544, 0, 0, 0, 544, 545, 0, 546, 0, 545, 546, 0, 549, 549, 550, 550, 647, 647, 647, 647, 546, 551, 551, 547, 546, 0, 547, 0, 548, 0, 0, 548, 552, 552, 547, 549, 547, 553, 553, 0, 547, 548, 0, 0, 0, 548, 0, 549, 0, 550, 549, 0, 550, 555, 555, 0, 551, 0, 0, 551, 549, 0, 550, 0, 549, 0, 550, 552, 0, 551, 552, 0, 553, 551, 0, 553, 557, 557, 552, 0, 552, 0, 0, 0, 552, 553, 0, 0, 555, 553, 570, 555, 570, 0, 0, 570, 570, 570, 570, 0, 0, 555, 0, 571, 571, 555, 555, 568, 568, 568, 568, 557, 0, 0, 557, 572, 572, 568, 568, 568, 568, 568, 568, 0, 557, 571, 573, 573, 557, 0, 569, 0, 569, 0, 569, 569, 569, 569, 571, 0, 0, 571, 568, 568, 568, 568, 568, 568, 569, 573, 572, 571, 0, 572, 0, 571, 574, 574, 613, 613, 0, 573, 0, 572, 573, 614, 614, 572, 648, 648, 648, 648, 0, 569, 573, 0, 615, 615, 573, 0, 0, 616, 616, 617, 617, 0, 0, 0, 618, 618, 0, 574, 0, 613, 574, 0, 613, 0, 0, 0, 614, 0, 0, 614, 574, 0, 613, 0, 574, 0, 613, 615, 0, 614, 615, 0, 616, 614, 617, 616, 0, 617, 0, 618, 615, 0, 618, 0, 615, 616, 620, 617, 621, 616, 0, 617, 618, 619, 619, 620, 618, 621, 0, 0, 0, 620, 0, 621, 622, 0, 0, 0, 620, 620, 621, 621, 0, 622, 0, 0, 620, 0, 621, 622, 623, 0, 0, 0, 622, 0, 622, 622, 619, 623, 0, 619, 0, 0, 622, 623, 0, 0, 624, 663, 623, 619, 623, 623, 0, 619, 619, 624, 0, 626, 623, 624, 0, 624, 663, 663, 663, 663, 626, 0, 624, 624, 0, 0, 626, 628, 0, 0, 624, 626, 0, 626, 626, 0, 628, 0, 632, 0, 0, 626, 628, 0, 0, 635, 0, 632, 0, 628, 628, 0, 636, 632, 633, 635, 634, 628, 632, 0, 632, 632, 636, 633, 0, 634, 0, 0, 632, 633, 0, 634, 0, 637, 635, 634, 633, 633, 634, 634, 635, 636, 0, 637, 633, 635, 634, 636, 638, 640, 649, 650, 636, 695, 695, 695, 695, 0, 638, 640, 649, 650, 637, 0, 0, 635, 0, 0, 637, 0, 0, 0, 636, 637, 0, 0, 0, 638, 640, 649, 650, 0, 0, 638, 640, 649, 650, 680, 638, 640, 649, 650, 0, 637, 0, 681, 682, 680, 696, 696, 696, 696, 711, 0, 683, 681, 682, 0, 638, 640, 649, 650, 0, 0, 683, 0, 680, 711, 711, 711, 711, 0, 680, 0, 681, 682, 0, 680, 0, 680, 681, 682, 684, 683, 0, 681, 682, 681, 682, 683, 685, 686, 684, 0, 683, 0, 683, 680, 687, 690, 685, 686, 0, 0, 0, 681, 682, 0, 687, 690, 0, 684, 0, 0, 683, 0, 0, 684, 0, 685, 686, 0, 684, 0, 684, 685, 686, 687, 690, 0, 685, 686, 685, 687, 690, 691, 699, 699, 687, 690, 0, 0, 684, 698, 0, 691, 712, 712, 712, 712, 685, 686, 687, 698, 723, 723, 0, 698, 687, 690, 0, 724, 724, 0, 691, 0, 725, 725, 0, 0, 691, 699, 698, 0, 699, 691, 0, 0, 698, 0, 0, 0, 0, 698, 699, 0, 724, 0, 699, 723, 0, 0, 723, 742, 742, 691, 724, 0, 0, 724, 0, 725, 723, 698, 725, 0, 723, 765, 0, 724, 0, 743, 743, 724, 725, 0, 742, 725, 725, 753, 753, 0, 765, 765, 765, 765, 0, 0, 742, 0, 0, 742, 0, 0, 0, 0, 0, 0, 0, 0, 0, 742, 0, 0, 0, 742, 743, 0, 0, 743, 0, 0, 0, 0, 753, 0, 0, 753, 0, 743, 0, 0, 0, 743, 0, 0, 0, 753, 0, 0, 0, 753, 775, 775, 0, 775, 775, 775, 775, 775, 775, 775, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 777, 0, 0, 0, 0, 0, 777, 777, 778, 778, 0, 778, 778, 778, 778, 778, 778, 778, 779, 779, 0, 779, 779, 779, 779, 779, 779, 779, 780, 0, 0, 0, 0, 0, 780, 780, 781, 0, 781, 0, 781, 782, 0, 0, 782, 782, 782, 782, 783, 0, 783, 784, 784, 0, 0, 784, 785, 0, 0, 785, 785, 785, 785, 786, 786, 0, 786, 786, 786, 786, 786, 786, 786, 787, 787, 0, 787, 787, 787, 787, 787, 787, 787, 788, 788, 0, 788, 788, 788, 788, 788, 788, 788, 789, 789, 0, 789, 789, 789, 789, 789, 789, 789, 790, 790, 0, 790, 790, 790, 790, 790, 790, 790, 791, 791, 0, 791, 791, 791, 791, 791, 791, 791, 792, 792, 0, 792, 792, 792, 792, 792, 792, 792, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774, 774 } ; static yy_state_type yy_last_accepting_state; static char *yy_last_accepting_cpos; extern int yy_flex_debug; int yy_flex_debug = 0; /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. */ #define REJECT reject_used_but_not_detected #define yymore() yymore_used_but_not_detected #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET char *yytext; #line 1 "scanner.l" #line 2 "scanner.l" /* * Simple example lex input file * Original provided by * Shawn Ostermann -- Mon Sep 24, 2001 * * Modified by Kyle Wheeler */ #include #include #include #include #ifdef HAVE_INTTYPES_H #include #endif #ifdef HAVE_STDINT_H #include #endif #include #include #include /* for isdigit() */ #include "number.h" #include "calculator.h" #include "conversion.h" #ifdef HAVE_CONFIG_H #include "parser.h" #else #include "y.tab.h" #endif #include "string_manip.h" #include "explain.h" #include "isfunc.h" /* for isfunc() */ #include "isconst.h" /* for isconst() */ #ifdef MEMWATCH #include "memwatch.h" #endif extern short scanerror; #ifndef HUGE_VALF # define HUGE_VALF HUGE_VAL #endif #ifndef UINT32_MAX # define UINT32_MAX 4294967295U #endif #ifdef REENTRANT_PARSER /* Re-entrant */ #define YY_DECL int yylex (YYSTYPE *yylval) #define YYLVALAC yylval #else #define YYLVALAC (&yylval) #endif int line_is_a_command = 0; int column = 0; #define POS_CHAR() do { column ++; } while(0) #define POS_STR() do { column += yyleng; } while (0) /* Everything up to the funny characters on the next line */ /* goes directly into the lex.yy.c file */ #define YY_NO_INPUT 1 /* shorthand definitions for later */ /* The rest of this after the '%%' is lex rules */ #line 1673 "scanner.c" #define INITIAL 0 #ifndef YY_NO_UNISTD_H /* Special case for "unistd.h", since it is non-ANSI. We include it way * down here because we want the user's section 1 to have been scanned first. * The user has a chance to override it with an option. */ #include #endif #ifndef YY_EXTRA_TYPE #define YY_EXTRA_TYPE void * #endif static int yy_init_globals (void ); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ int yylex_destroy (void ); int yyget_debug (void ); void yyset_debug (int debug_flag ); YY_EXTRA_TYPE yyget_extra (void ); void yyset_extra (YY_EXTRA_TYPE user_defined ); FILE *yyget_in (void ); void yyset_in (FILE * in_str ); FILE *yyget_out (void ); void yyset_out (FILE * out_str ); int yyget_leng (void ); char *yyget_text (void ); int yyget_lineno (void ); void yyset_lineno (int line_number ); /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus extern "C" int yywrap (void ); #else extern int yywrap (void ); #endif #endif #ifndef yytext_ptr static void yy_flex_strncpy (char *,yyconst char *,int ); #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * ); #endif #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (void ); #else static int input (void ); #endif #endif /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE #define YY_READ_BUF_SIZE 8192 #endif /* Copy whatever the last rule matched to the standard output. */ #ifndef ECHO /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ #define ECHO fwrite( yytext, yyleng, 1, yyout ) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, * is returned in "result". */ #ifndef YY_INPUT #define YY_INPUT(buf,result,max_size) \ if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ int n; \ for ( n = 0; n < max_size && \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ if ( c == '\n' ) \ buf[n++] = (char) c; \ if ( c == EOF && ferror( yyin ) ) \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ result = n; \ } \ else \ { \ errno=0; \ while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ { \ if( errno != EINTR) \ { \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ break; \ } \ errno=0; \ clearerr(yyin); \ } \ }\ \ #endif /* No semi-colon after return; correct usage is to write "yyterminate();" - * we don't want an extra ';' after the "return" because that will cause * some compilers to complain about unreachable statements. */ #ifndef yyterminate #define yyterminate() return YY_NULL #endif /* Number of entries by which start-condition stack grows. */ #ifndef YY_START_STACK_INCR #define YY_START_STACK_INCR 25 #endif /* Report a fatal error. */ #ifndef YY_FATAL_ERROR #define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) #endif /* end tables serialization structures and prototypes */ /* Default declaration of generated scanner - a define so the user can * easily add parameters. */ #ifndef YY_DECL #define YY_DECL_IS_OURS 1 extern int yylex (void); #define YY_DECL int yylex (void) #endif /* !YY_DECL */ /* Code executed at the beginning of each rule, after yytext and yyleng * have been set up. */ #ifndef YY_USER_ACTION #define YY_USER_ACTION #endif /* Code executed at the end of each rule. */ #ifndef YY_BREAK #define YY_BREAK break; #endif #define YY_RULE_SETUP \ YY_USER_ACTION /** The main scanner function which does all the work. */ YY_DECL { register yy_state_type yy_current_state; register char *yy_cp, *yy_bp; register int yy_act; #line 78 "scanner.l" #line 1856 "scanner.c" if ( !(yy_init) ) { (yy_init) = 1; #ifdef YY_USER_INIT YY_USER_INIT; #endif if ( ! (yy_start) ) (yy_start) = 1; /* first start state */ if ( ! yyin ) yyin = stdin; if ( ! yyout ) yyout = stdout; if ( ! YY_CURRENT_BUFFER ) { yyensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin,YY_BUF_SIZE ); } yy_load_buffer_state( ); } while ( 1 ) /* loops until end-of-file is reached */ { yy_cp = (yy_c_buf_p); /* Support of yytext. */ *yy_cp = (yy_hold_char); /* yy_bp points to the position in yy_ch_buf of the start of * the current run. */ yy_bp = yy_cp; yy_current_state = (yy_start); yy_match: do { register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 775 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ++yy_cp; } while ( yy_base[yy_current_state] != 3931 ); yy_find_action: yy_act = yy_accept[yy_current_state]; if ( yy_act == 0 ) { /* have to back up */ yy_cp = (yy_last_accepting_cpos); yy_current_state = (yy_last_accepting_state); yy_act = yy_accept[yy_current_state]; } YY_DO_BEFORE_ACTION; do_action: /* This label is used only to access EOF actions. */ switch ( yy_act ) { /* beginning of action switch */ case 0: /* must back up */ /* undo the effects of YY_DO_BEFORE_ACTION */ *yy_cp = (yy_hold_char); yy_cp = (yy_last_accepting_cpos); yy_current_state = (yy_last_accepting_state); goto yy_find_action; case 1: YY_RULE_SETUP #line 80 "scanner.l" { POS_STR(); } YY_BREAK case 2: /* rule 2 can match eol */ YY_RULE_SETUP #line 82 "scanner.l" { return(EOLN); } YY_BREAK /* These are commands */ case 3: YY_RULE_SETUP #line 87 "scanner.l" { line_is_a_command = 1; POS_STR(); return(BIN_CMD); } YY_BREAK case 4: YY_RULE_SETUP #line 88 "scanner.l" { line_is_a_command = 1; POS_STR(); return(DEC_CMD); } YY_BREAK case 5: YY_RULE_SETUP #line 89 "scanner.l" { int i = 5; while (isspace(yytext[i])) i++; if (yytext[i] == 0) i--; YYLVALAC->character = yytext[i]; line_is_a_command = 1; POS_STR(); return(DSEP_CMD); } YY_BREAK case 6: YY_RULE_SETUP #line 98 "scanner.l" { int i = 5; while (isspace(yytext[i])) i++; if (yytext[i] == 0) i--; YYLVALAC->character = yytext[i]; line_is_a_command = 1; POS_STR(); return(IDSEP_CMD); } YY_BREAK case 7: YY_RULE_SETUP #line 107 "scanner.l" { int i = 2; while (yytext[i] != 0 && ! isdigit((int)(yytext[i]))) ++i; if (yytext[i] != 0 && yytext[i] != '\n') { YYLVALAC->integer = strtoul(yytext+i, NULL, 0); } else { YYLVALAC->integer = -1; } line_is_a_command = 1; POS_STR(); return(ENG_CMD); } YY_BREAK case 8: YY_RULE_SETUP #line 119 "scanner.l" { POS_STR(); YYLVALAC->integer = 1; line_is_a_command = 1; return(ENG_CMD); } YY_BREAK case 9: YY_RULE_SETUP #line 125 "scanner.l" { POS_STR(); YYLVALAC->integer = 2; line_is_a_command = 1; return(ENG_CMD); } YY_BREAK case 10: YY_RULE_SETUP #line 131 "scanner.l" { POS_STR(); YYLVALAC->integer = 3; line_is_a_command = 1; return(ENG_CMD); } YY_BREAK case 11: YY_RULE_SETUP #line 137 "scanner.l" { line_is_a_command = 1; POS_STR(); return(GUARD_CMD); } YY_BREAK case 12: YY_RULE_SETUP #line 138 "scanner.l" { line_is_a_command = 1; POS_STR(); return(HEX_CMD); } YY_BREAK case 13: YY_RULE_SETUP #line 139 "scanner.l" { line_is_a_command = 1; POS_STR(); return(PRINT_HELP_CMD); } YY_BREAK case 14: YY_RULE_SETUP #line 140 "scanner.l" { int i = 7; while (isspace(yytext[i])) ++i; if (yytext[i] != 0) YYLVALAC->integer = strtoul(yytext+i, NULL, 0); else YYLVALAC->integer = 0; line_is_a_command = 1; POS_STR(); return(HLIMIT_CMD); } YY_BREAK case 15: YY_RULE_SETUP #line 149 "scanner.l" { line_is_a_command = 1; POS_STR(); return(INT_CMD); } YY_BREAK case 16: YY_RULE_SETUP #line 150 "scanner.l" { line_is_a_command = 1; POS_STR(); return(DELIM_CMD); } YY_BREAK case 17: YY_RULE_SETUP #line 151 "scanner.l" { line_is_a_command = 1; POS_STR(); return(HEX_CMD); } YY_BREAK case 18: YY_RULE_SETUP #line 152 "scanner.l" { line_is_a_command = 1; POS_STR(); return(LISTVAR_CMD); } YY_BREAK case 19: YY_RULE_SETUP #line 153 "scanner.l" { line_is_a_command = 1; POS_STR(); return(OCT_CMD); } YY_BREAK case 20: YY_RULE_SETUP #line 154 "scanner.l" { int i = 5; char *returnme; Dprintf("open\n"); while (isspace(yytext[i])) ++i; returnme = strdup(yytext + i); /* now trim trailing whitespace */ i = (int)strlen(returnme) - 1; while (isspace(returnme[i])) { returnme[i] = 0; i--; } YYLVALAC->variable = returnme; Dprintf("filename: %s\n",returnme); line_is_a_command = 1; POS_STR(); return(OPEN_CMD); } YY_BREAK case 21: YY_RULE_SETUP #line 172 "scanner.l" { int i = 2; while (isspace(yytext[i])) ++i; YYLVALAC->integer = strtol(yytext+i, NULL, 0); line_is_a_command = 1; POS_STR(); return(PRECISION_CMD); } YY_BREAK case 22: YY_RULE_SETUP #line 180 "scanner.l" { line_is_a_command = 1; POS_STR(); return(PREFIX_CMD); } YY_BREAK case 23: YY_RULE_SETUP #line 181 "scanner.l" { line_is_a_command = 1; POS_STR(); return(DISPLAY_PREFS_CMD); } YY_BREAK case 24: YY_RULE_SETUP #line 182 "scanner.l" { line_is_a_command = 1; POS_STR(); return(RADIAN_CMD); } YY_BREAK case 25: YY_RULE_SETUP #line 183 "scanner.l" { YYLVALAC->integer = NO_ROUNDING_INDICATION; line_is_a_command = 1; POS_STR(); return(ROUNDING_INDICATION_CMD); } YY_BREAK case 26: YY_RULE_SETUP #line 189 "scanner.l" { YYLVALAC->integer = SIMPLE_ROUNDING_INDICATION; line_is_a_command = 1; POS_STR(); return(ROUNDING_INDICATION_CMD); } YY_BREAK case 27: YY_RULE_SETUP #line 195 "scanner.l" { YYLVALAC->integer = SIG_FIG_ROUNDING_INDICATION; line_is_a_command = 1; POS_STR(); return(ROUNDING_INDICATION_CMD); } YY_BREAK case 28: YY_RULE_SETUP #line 201 "scanner.l" { YYLVALAC->integer = -1; line_is_a_command = 1; POS_STR(); return(ROUNDING_INDICATION_CMD); } YY_BREAK case 29: YY_RULE_SETUP #line 207 "scanner.l" { line_is_a_command = 1; POS_STR(); return(REMEMBER_CMD); } YY_BREAK case 30: YY_RULE_SETUP #line 208 "scanner.l" { int i = 5; while (isspace(yytext[i])) ++i; YYLVALAC->integer = strtoul(yytext+i, NULL, 0); line_is_a_command = 1; POS_STR(); return(BITS_CMD); } YY_BREAK case 31: YY_RULE_SETUP #line 216 "scanner.l" { int i = 5; char *returnme; while (isspace(yytext[i])) ++i; returnme = strdup(yytext + i); /* now trim trailing whitespace */ i = (int)strlen(returnme) - 1; while (isspace(returnme[i])) { returnme[i] = 0; i--; } YYLVALAC->variable = returnme; line_is_a_command = 1; POS_STR(); return(SAVE_CMD); } YY_BREAK case 32: YY_RULE_SETUP #line 232 "scanner.l" { int i = 5; while (isspace(yytext[i])) ++i; if (yytext[i] == 0) i--; YYLVALAC->character = yytext[i]; line_is_a_command = 1; POS_STR(); return(TSEP_CMD); } YY_BREAK case 33: YY_RULE_SETUP #line 241 "scanner.l" { int i = 5; while (isspace(yytext[i])) ++i; if (yytext[i] == 0) i--; YYLVALAC->character = yytext[i]; line_is_a_command = 1; POS_STR(); return(ITSEP_CMD); } YY_BREAK case 34: YY_RULE_SETUP #line 250 "scanner.l" { line_is_a_command = 1; POS_STR(); return(PRINT_HELP_CMD); } YY_BREAK case 35: YY_RULE_SETUP #line 251 "scanner.l" { line_is_a_command = 1; POS_STR(); return(PRINT_HELP_CMD); } YY_BREAK case 36: YY_RULE_SETUP #line 252 "scanner.l" { char *unitone; int i = 2; /* find the first space */ while (yytext[i] != 0 && ! isspace(yytext[i])) ++i; /* find the end of that space */ while (isspace(yytext[i])) ++i; unitone = yytext + i; /* skip the unit */ while (yytext[i] != 0 && ! isspace(yytext[i])) ++i; yytext[i++] = 0; /* onward to the word "to" */ while (isspace(yytext[i])) ++i; if (yytext[i] == 't' && yytext[i+1] == 'o' && isspace(yytext[i+2])) { i += 3; /* to */ } /* seek the next unit */ while (isspace(yytext[i])) ++i; YYLVALAC->conver.u1 = strdup(unitone); YYLVALAC->conver.u2 = strdup(yytext+i); line_is_a_command = 1; POS_STR(); return(CONVERT_CMD); } YY_BREAK case 37: YY_RULE_SETUP #line 276 "scanner.l" { int i = 5; while (isspace(yytext[i])) ++i; YYLVALAC->integer = strtoul(yytext + i, NULL, 0); line_is_a_command = 1; POS_STR(); return(BASE_CMD); } YY_BREAK case 38: YY_RULE_SETUP #line 284 "scanner.l" { line_is_a_command = 1; POS_STR(); return(VERBOSE_CMD); } YY_BREAK case 39: YY_RULE_SETUP #line 285 "scanner.l" { int i = 9, j; while (isspace(yytext[i])) ++i; j = strlen(yytext+i); while (isspace(yytext[j])) { yytext[j] = 0; j--; } explain(yytext+i); line_is_a_command = 1; POS_STR(); } YY_BREAK case 40: YY_RULE_SETUP #line 297 "scanner.l" { line_is_a_command = 1; POS_STR(); return(STORE_CMD); } YY_BREAK case 41: YY_RULE_SETUP #line 298 "scanner.l" { line_is_a_command = 1; POS_STR(); return(CMOD_CMD); } YY_BREAK /* These are comments */ case 42: YY_RULE_SETUP #line 302 "scanner.l" { POS_STR(); } YY_BREAK case 43: YY_RULE_SETUP #line 303 "scanner.l" { POS_STR(); } YY_BREAK case 44: YY_RULE_SETUP #line 304 "scanner.l" { POS_STR(); } YY_BREAK /* These are the constants (except random) */ case 45: YY_RULE_SETUP #line 309 "scanner.l" { num_init_set_str(YYLVALAC->number,W_E,0); POS_STR(); return(NUMBER); } YY_BREAK case 46: YY_RULE_SETUP #line 314 "scanner.l" { num_init(YYLVALAC->number); num_const_pi(YYLVALAC->number); POS_STR(); return(NUMBER); } YY_BREAK case 47: YY_RULE_SETUP #line 320 "scanner.l" { num_init(YYLVALAC->number); while (num_random(YYLVALAC->number) != 0) ; num_mul_ui(YYLVALAC->number,YYLVALAC->number,UINT32_MAX); POS_STR(); return(NUMBER); } YY_BREAK case 48: YY_RULE_SETUP #line 327 "scanner.l" { num_init(YYLVALAC->number); while (num_random(YYLVALAC->number) != 0) ; num_mul_ui(YYLVALAC->number,YYLVALAC->number,UINT32_MAX); num_rint(YYLVALAC->number,YYLVALAC->number); POS_STR(); return(NUMBER); } YY_BREAK case 49: YY_RULE_SETUP #line 335 "scanner.l" { num_init_set_str(YYLVALAC->number,W_AVOGADROS_CONSTANT,0); POS_STR(); return(NUMBER); } YY_BREAK case 50: YY_RULE_SETUP #line 340 "scanner.l" { num_init_set_str(YYLVALAC->number,W_BOLTZMANN_CONSTANT,0); POS_STR(); return(NUMBER); } YY_BREAK case 51: YY_RULE_SETUP #line 345 "scanner.l" { num_init_set_str(YYLVALAC->number,W_COULOMB_CONSTANT,0); POS_STR(); return(NUMBER); } YY_BREAK case 52: YY_RULE_SETUP #line 348 "scanner.l" { num_init_set_str(YYLVALAC->number,W_ELEMENTARY_CHARGE,0); POS_STR(); return(NUMBER); } YY_BREAK case 53: YY_RULE_SETUP #line 351 "scanner.l" { num_init_set_str(YYLVALAC->number,W_MOLAR_GAS_CONSTANT,0); POS_STR(); return(NUMBER); } YY_BREAK case 54: YY_RULE_SETUP #line 354 "scanner.l" { num_init_set_str(YYLVALAC->number,W_GRAVITATIONAL_CONSTANT,0); POS_STR(); return(NUMBER); } YY_BREAK case 55: YY_RULE_SETUP #line 357 "scanner.l" { num_init_set_str(YYLVALAC->number,W_GRAVITATIONAL_ACCELLERATION,0); POS_STR(); return(NUMBER); } YY_BREAK case 56: YY_RULE_SETUP #line 360 "scanner.l" { num_init_set_str(YYLVALAC->number,W_ELECTRON_MASS,0); POS_STR(); return(NUMBER); } YY_BREAK case 57: YY_RULE_SETUP #line 363 "scanner.l" { num_init_set_str(YYLVALAC->number,W_PROTON_MASS,0); POS_STR(); return(NUMBER); } YY_BREAK case 58: YY_RULE_SETUP #line 366 "scanner.l" { num_init_set_str(YYLVALAC->number,W_NEUTRON_MASS,0); POS_STR(); return(NUMBER); } YY_BREAK case 59: YY_RULE_SETUP #line 369 "scanner.l" { num_init_set_str(YYLVALAC->number,W_DEUTERON_MASS,0); POS_STR(); return(NUMBER); } YY_BREAK case 60: YY_RULE_SETUP #line 372 "scanner.l" { num_init_set_str(YYLVALAC->number,W_ATOMIC_MASS,0); POS_STR(); return(NUMBER); } YY_BREAK case 61: YY_RULE_SETUP #line 375 "scanner.l" { num_init_set_str(YYLVALAC->number,W_SPEED_OF_LIGHT,0); POS_STR(); return(NUMBER); } YY_BREAK case 62: YY_RULE_SETUP #line 378 "scanner.l" { num_init_set_str(YYLVALAC->number,W_PLANCK_CONSTANT,0); POS_STR(); return(NUMBER); } YY_BREAK case 63: YY_RULE_SETUP #line 381 "scanner.l" { Number temp; num_init(YYLVALAC->number); num_init(temp); num_set_d(temp,1e-7); num_const_pi(YYLVALAC->number); num_mul_ui(YYLVALAC->number,YYLVALAC->number,4); num_mul(YYLVALAC->number,YYLVALAC->number,temp); num_free(temp); POS_STR(); return(NUMBER); } YY_BREAK case 64: YY_RULE_SETUP #line 392 "scanner.l" { num_init_set_str(YYLVALAC->number,W_PERMITTIVITY_OF_FREE_SPACE,0); POS_STR(); return(NUMBER); } YY_BREAK case 65: YY_RULE_SETUP #line 395 "scanner.l" { num_init_set_str(YYLVALAC->number,W_BOHR_MAGNETON,0); POS_STR(); return(NUMBER); } YY_BREAK case 66: YY_RULE_SETUP #line 398 "scanner.l" { num_init_set_str(YYLVALAC->number,W_NUCLEAR_MAGNETON,0); POS_STR(); return(NUMBER); } YY_BREAK case 67: YY_RULE_SETUP #line 401 "scanner.l" { num_init_set_str(YYLVALAC->number,W_WIEN_DISPLACEMENT,0); POS_STR(); return(NUMBER); } YY_BREAK case 68: YY_RULE_SETUP #line 404 "scanner.l" { num_init_set_str(YYLVALAC->number,W_BOHR_RADIUS,0); POS_STR(); return(NUMBER); } YY_BREAK case 69: YY_RULE_SETUP #line 407 "scanner.l" { num_init_set_str(YYLVALAC->number,W_FARADAY_CONSTANT,0); POS_STR(); return(NUMBER); } YY_BREAK case 70: YY_RULE_SETUP #line 410 "scanner.l" { num_init_set_str(YYLVALAC->number,W_MOLAR_VOLUME_OF_IDEAL_GAS,0); POS_STR(); return(NUMBER); } YY_BREAK case 71: YY_RULE_SETUP #line 413 "scanner.l" { num_init_set_str(YYLVALAC->number,W_ELECTRON_VOLT,0); POS_STR(); return(NUMBER); } YY_BREAK case 72: YY_RULE_SETUP #line 416 "scanner.l" { num_init_set_str(YYLVALAC->number,W_STEFAN_BOLTZMANN,0); POS_STR(); return(NUMBER); } YY_BREAK case 73: YY_RULE_SETUP #line 419 "scanner.l" { num_init_set_str(YYLVALAC->number,W_FINE_STRUCTURE,0); POS_STR(); return(NUMBER); } YY_BREAK case 74: YY_RULE_SETUP #line 422 "scanner.l" { num_init(YYLVALAC->number); num_const_euler(YYLVALAC->number); POS_STR(); return(NUMBER); } YY_BREAK case 75: YY_RULE_SETUP #line 425 "scanner.l" { num_init_set_str(YYLVALAC->number,W_ELECTRON_RADIUS,0); POS_STR(); return(NUMBER); } YY_BREAK case 76: YY_RULE_SETUP #line 428 "scanner.l" { num_init_set_str(YYLVALAC->number,W_JOSEPHSON_CONSTANT,0); POS_STR(); return(NUMBER); } YY_BREAK case 77: YY_RULE_SETUP #line 431 "scanner.l" { num_init_set_str(YYLVALAC->number,W_VON_KLITZING_CONSTANT,0); POS_STR(); return(NUMBER); } YY_BREAK case 78: YY_RULE_SETUP #line 434 "scanner.l" { num_init_set_str(YYLVALAC->number,W_RYDBERG_CONSTANT,0); POS_STR(); return(NUMBER); } YY_BREAK case 79: YY_RULE_SETUP #line 437 "scanner.l" { num_init_set_str(YYLVALAC->number,W_HARTREE_ENERGY,0); POS_STR(); return(NUMBER); } YY_BREAK case 80: YY_RULE_SETUP #line 440 "scanner.l" { num_init_set_str(YYLVALAC->number,W_FERMI_COUPLING_CONSTANT,0); POS_STR(); return(NUMBER); } YY_BREAK case 81: YY_RULE_SETUP #line 443 "scanner.l" { num_init_set_str(YYLVALAC->number,W_MUON_MASS,0); POS_STR(); return(NUMBER); } YY_BREAK case 82: YY_RULE_SETUP #line 446 "scanner.l" { num_init_set_str(YYLVALAC->number,W_TAU_MASS,0); POS_STR(); return(NUMBER); } YY_BREAK case 83: YY_RULE_SETUP #line 449 "scanner.l" { num_init_set_str(YYLVALAC->number,W_HELION_MASS,0); POS_STR(); return(NUMBER); } YY_BREAK case 84: YY_RULE_SETUP #line 452 "scanner.l" { num_init_set_str(YYLVALAC->number,W_ALPHA_PARTICLE_MASS,0); POS_STR(); return(NUMBER); } YY_BREAK case 85: YY_RULE_SETUP #line 455 "scanner.l" { num_init_set_str(YYLVALAC->number,W_LOSCHMIDT_CONSTANT,0); POS_STR(); return(NUMBER); } YY_BREAK case 86: YY_RULE_SETUP #line 458 "scanner.l" { num_init_set_str(YYLVALAC->number,W_FIRST_RADIATION_CONSTANT,0); POS_STR(); return(NUMBER); } YY_BREAK case 87: YY_RULE_SETUP #line 461 "scanner.l" { num_init_set_str(YYLVALAC->number,W_SECOND_RADIATION_CONSTANT,0); POS_STR(); return(NUMBER); } YY_BREAK case 88: YY_RULE_SETUP #line 464 "scanner.l" { num_init_set_str(YYLVALAC->number,W_CONDUCTANCE_QUANTUM,0); POS_STR(); return(NUMBER); } YY_BREAK case 89: YY_RULE_SETUP #line 467 "scanner.l" { num_init_set_str(YYLVALAC->number,W_IMPEDANCE_OF_VACUUM,0); POS_STR(); return(NUMBER); } YY_BREAK case 90: YY_RULE_SETUP #line 470 "scanner.l" { num_init_set_str(YYLVALAC->number,W_MAGNETIC_FLUX_QUANTUM,0); POS_STR(); return(NUMBER); } YY_BREAK case 91: YY_RULE_SETUP #line 473 "scanner.l" { num_init_set_d(YYLVALAC->number,0.25); POS_STR(); return(NUMBER); } YY_BREAK case 92: YY_RULE_SETUP #line 476 "scanner.l" { num_init_set_d(YYLVALAC->number,0.5); POS_STR(); return(NUMBER); } YY_BREAK case 93: YY_RULE_SETUP #line 479 "scanner.l" { num_init_set_d(YYLVALAC->number,0.75); POS_STR(); return(NUMBER); } YY_BREAK case 94: YY_RULE_SETUP #line 482 "scanner.l" { num_init(YYLVALAC->number); num_const_catalan(YYLVALAC->number); POS_STR(); return(NUMBER); } YY_BREAK case 95: YY_RULE_SETUP #line 486 "scanner.l" { num_init(YYLVALAC->number); num_set_nan(YYLVALAC->number); POS_STR(); return (NUMBER); } YY_BREAK case 96: YY_RULE_SETUP #line 490 "scanner.l" { num_init(YYLVALAC->number); num_set_inf(YYLVALAC->number,1); POS_STR(); return (NUMBER); } YY_BREAK /* These are the grouping symbols */ case 97: YY_RULE_SETUP #line 497 "scanner.l" { POS_STR(); return(OPEN_PARENTHESES); } YY_BREAK case 98: YY_RULE_SETUP #line 498 "scanner.l" { POS_STR(); return(CLOSE_PARENTHESES); } YY_BREAK case 99: YY_RULE_SETUP #line 499 "scanner.l" { POS_STR(); return(OPEN_BRACE); } YY_BREAK case 100: YY_RULE_SETUP #line 500 "scanner.l" { POS_STR(); return(CLOSE_BRACE); } YY_BREAK case 101: YY_RULE_SETUP #line 501 "scanner.l" { POS_STR(); return(OPEN_BRACKET); } YY_BREAK case 102: YY_RULE_SETUP #line 502 "scanner.l" { POS_STR(); return(CLOSE_BRACKET); } YY_BREAK /* These are the binary operations */ case 103: YY_RULE_SETUP #line 506 "scanner.l" { POS_STR(); return(WNOT); } YY_BREAK case 104: YY_RULE_SETUP #line 507 "scanner.l" { POS_CHAR(); return(WNOT); } YY_BREAK case 105: YY_RULE_SETUP #line 508 "scanner.l" { POS_CHAR(); return(WBANG); } YY_BREAK case 106: YY_RULE_SETUP #line 509 "scanner.l" { POS_STR(); return(WPOW); } YY_BREAK case 107: YY_RULE_SETUP #line 510 "scanner.l" { POS_CHAR(); return(WSQR); } YY_BREAK case 108: YY_RULE_SETUP #line 511 "scanner.l" { POS_CHAR(); return(WPLUS); } YY_BREAK case 109: YY_RULE_SETUP #line 512 "scanner.l" { POS_CHAR(); return(WMULT); } YY_BREAK case 110: YY_RULE_SETUP #line 513 "scanner.l" { POS_CHAR(); return(WDIV); } YY_BREAK case 111: YY_RULE_SETUP #line 514 "scanner.l" { POS_CHAR(); return(WMOD); } YY_BREAK case 112: YY_RULE_SETUP #line 515 "scanner.l" { POS_CHAR(); return(EQUALS_SIGN); } YY_BREAK case 113: YY_RULE_SETUP #line 516 "scanner.l" { POS_CHAR(); return(WPOW); } YY_BREAK case 114: YY_RULE_SETUP #line 517 "scanner.l" { POS_CHAR(); return(WBOR); } YY_BREAK case 115: YY_RULE_SETUP #line 518 "scanner.l" { POS_CHAR(); return(WBAND); } YY_BREAK case 116: YY_RULE_SETUP #line 519 "scanner.l" { POS_CHAR(); return(WBNOT); } YY_BREAK case 117: YY_RULE_SETUP #line 520 "scanner.l" { POS_STR(); return(WOR); } YY_BREAK case 118: YY_RULE_SETUP #line 521 "scanner.l" { POS_CHAR(); return(WOR); } YY_BREAK case 119: YY_RULE_SETUP #line 522 "scanner.l" { POS_STR(); return(WAND); } YY_BREAK case 120: YY_RULE_SETUP #line 523 "scanner.l" { POS_CHAR(); return(WAND); } YY_BREAK case 121: YY_RULE_SETUP #line 524 "scanner.l" { POS_STR(); return(WEQUAL); } YY_BREAK case 122: YY_RULE_SETUP #line 525 "scanner.l" { POS_STR(); return(WNEQUAL); } YY_BREAK case 123: YY_RULE_SETUP #line 526 "scanner.l" { POS_CHAR(); return(WNEQUAL); } YY_BREAK case 124: YY_RULE_SETUP #line 527 "scanner.l" { POS_STR(); return(WBXOR); } YY_BREAK case 125: YY_RULE_SETUP #line 528 "scanner.l" { POS_CHAR(); return(WGT); } YY_BREAK case 126: YY_RULE_SETUP #line 529 "scanner.l" { POS_CHAR(); return(WLT); } YY_BREAK case 127: YY_RULE_SETUP #line 530 "scanner.l" { POS_STR(); return(WRSHFT); } YY_BREAK case 128: YY_RULE_SETUP #line 531 "scanner.l" { POS_STR(); return(WLSHFT); } YY_BREAK case 129: YY_RULE_SETUP #line 532 "scanner.l" { POS_STR(); return(WGEQ); } YY_BREAK case 130: YY_RULE_SETUP #line 533 "scanner.l" { POS_CHAR(); return(WGEQ); } YY_BREAK case 131: YY_RULE_SETUP #line 534 "scanner.l" { POS_STR(); return(WLEQ); } YY_BREAK case 132: YY_RULE_SETUP #line 535 "scanner.l" { POS_CHAR(); return(WLEQ); } YY_BREAK /* This is a special operator/function */ case 133: YY_RULE_SETUP #line 539 "scanner.l" { POS_CHAR(); return(WMINUS); } YY_BREAK /* These are functions (unary operations) */ case 134: YY_RULE_SETUP #line 543 "scanner.l" { POS_STR(); return(WSIN); } YY_BREAK case 135: YY_RULE_SETUP #line 544 "scanner.l" { POS_STR(); return(WCOS); } YY_BREAK case 136: YY_RULE_SETUP #line 545 "scanner.l" { POS_STR(); return(WTAN); } YY_BREAK case 137: YY_RULE_SETUP #line 546 "scanner.l" { POS_STR(); return(WCOT); } YY_BREAK case 138: YY_RULE_SETUP #line 547 "scanner.l" { POS_STR(); return(WSEC); } YY_BREAK case 139: YY_RULE_SETUP #line 548 "scanner.l" { POS_STR(); return(WCSC); } YY_BREAK case 140: YY_RULE_SETUP #line 549 "scanner.l" { POS_STR(); return(WASIN); } YY_BREAK case 141: YY_RULE_SETUP #line 550 "scanner.l" { POS_STR(); return(WACOS); } YY_BREAK case 142: YY_RULE_SETUP #line 551 "scanner.l" { POS_STR(); return(WATAN); } YY_BREAK case 143: YY_RULE_SETUP #line 552 "scanner.l" { POS_STR(); return(WACOT); } YY_BREAK case 144: YY_RULE_SETUP #line 553 "scanner.l" { POS_STR(); return(WASEC); } YY_BREAK case 145: YY_RULE_SETUP #line 554 "scanner.l" { POS_STR(); return(WACSC); } YY_BREAK case 146: YY_RULE_SETUP #line 555 "scanner.l" { POS_STR(); return(WSINH); } YY_BREAK case 147: YY_RULE_SETUP #line 556 "scanner.l" { POS_STR(); return(WCOSH); } YY_BREAK case 148: YY_RULE_SETUP #line 557 "scanner.l" { POS_STR(); return(WTANH); } YY_BREAK case 149: YY_RULE_SETUP #line 558 "scanner.l" { POS_STR(); return(WCOTH); } YY_BREAK case 150: YY_RULE_SETUP #line 559 "scanner.l" { POS_STR(); return(WSECH); } YY_BREAK case 151: YY_RULE_SETUP #line 560 "scanner.l" { POS_STR(); return(WCSCH); } YY_BREAK case 152: YY_RULE_SETUP #line 561 "scanner.l" { POS_STR(); return(WASINH); } YY_BREAK case 153: YY_RULE_SETUP #line 562 "scanner.l" { POS_STR(); return(WACOSH); } YY_BREAK case 154: YY_RULE_SETUP #line 563 "scanner.l" { POS_STR(); return(WATANH); } YY_BREAK case 155: YY_RULE_SETUP #line 564 "scanner.l" { POS_STR(); return(WACOTH); } YY_BREAK case 156: YY_RULE_SETUP #line 565 "scanner.l" { POS_STR(); return(WASECH); } YY_BREAK case 157: YY_RULE_SETUP #line 566 "scanner.l" { POS_STR(); return(WACSCH); } YY_BREAK case 158: YY_RULE_SETUP #line 567 "scanner.l" { POS_STR(); return(WSINC); } YY_BREAK case 159: YY_RULE_SETUP #line 568 "scanner.l" { POS_STR(); return(WLOG); } YY_BREAK case 160: YY_RULE_SETUP #line 569 "scanner.l" { POS_STR(); return(WLOGTWO); } YY_BREAK case 161: YY_RULE_SETUP #line 570 "scanner.l" { POS_STR(); return(WLN); } YY_BREAK case 162: YY_RULE_SETUP #line 571 "scanner.l" { POS_STR(); return(WROUND); } YY_BREAK case 163: YY_RULE_SETUP #line 572 "scanner.l" { POS_STR(); return(WABS); } YY_BREAK case 164: YY_RULE_SETUP #line 573 "scanner.l" { POS_STR(); return(WSQRT); } YY_BREAK case 165: YY_RULE_SETUP #line 574 "scanner.l" { POS_STR(); return(WEXP); } YY_BREAK case 166: YY_RULE_SETUP #line 575 "scanner.l" { POS_STR(); return(WFLOOR); } YY_BREAK case 167: YY_RULE_SETUP #line 576 "scanner.l" { POS_STR(); return(WCEIL); } YY_BREAK case 168: YY_RULE_SETUP #line 577 "scanner.l" { POS_STR(); return(WCBRT); } YY_BREAK case 169: YY_RULE_SETUP #line 578 "scanner.l" { POS_STR(); return(WRAND); } YY_BREAK case 170: YY_RULE_SETUP #line 579 "scanner.l" { POS_STR(); return(WIRAND); } YY_BREAK case 171: YY_RULE_SETUP #line 580 "scanner.l" { POS_STR(); return(WFACT); } YY_BREAK case 172: YY_RULE_SETUP #line 581 "scanner.l" { POS_STR(); return(WCOMP); } YY_BREAK case 173: YY_RULE_SETUP #line 582 "scanner.l" { POS_STR(); return(WEINT); } YY_BREAK case 174: YY_RULE_SETUP #line 583 "scanner.l" { POS_STR(); return(WGAMMA); } YY_BREAK case 175: YY_RULE_SETUP #line 584 "scanner.l" { POS_STR(); return(WLNGAMMA); } YY_BREAK case 176: YY_RULE_SETUP #line 585 "scanner.l" { POS_STR(); return(WZETA); } YY_BREAK case 177: /* rule 177 can match eol */ YY_RULE_SETUP #line 587 "scanner.l" { char * temp = strdup(yytext+1); temp[yyleng-2] = 0; YYLVALAC->variable = temp; POS_STR(); return(STRING); } YY_BREAK case 178: YY_RULE_SETUP #line 595 "scanner.l" { int i = 0; while (yytext[i] != 0 && !isspace(yytext[i]) && yytext[i] != '=') i++; yytext[i] = 0; if (isfunc(yytext)) { report_error("'%s' is a function and functions cannot be reassigned.", yytext); scanerror = 1; } else if (isconst(yytext) != W_notaconstant) { report_error("'%s' is a pre-defined constant, which cannot be reassigned.", yytext); scanerror = 1; } else { YYLVALAC->variable = strdup(yytext); } POS_STR(); if (! scanerror) { return(ASSIGNMENT); } } YY_BREAK case 179: YY_RULE_SETUP #line 614 "scanner.l" { if (line_is_a_command) { YYLVALAC->variable = strdup(yytext); POS_STR(); return(VARIABLE); } else { report_error("Undefined variable: %s", yytext); scanerror = 1; POS_STR(); } } YY_BREAK case 180: YY_RULE_SETUP #line 629 "scanner.l" { /* simple decimals */ extern int yydebug; int retval; /* take out the ignored char */ strstrip(',', yytext); if (yydebug) printf("ambiguous %s\n", yytext); retval = num_init_set_str(YYLVALAC->number, yytext, DEFAULT_BASE); if (-1 == retval) { report_error("Invalid characters for base 10"); scanerror = 1; } else { unsigned int t = count_digits(yytext); Dprintf("simple decimals digits in %s: %u (%u)\n",yytext,t,sig_figs); if (t ", yytext); retval = num_init_set_str(YYLVALAC->number, yytext, DEFAULT_BASE); if (-1 == retval) { report_error("Invalid characters for base 10"); scanerror = 1; } else { unsigned int t = count_digits(yytext); Dprintf("zero optional decimal digits in %s: %u (%u)\n",yytext,t,sig_figs); if (t ", yytext); retval = num_init_set_str(YYLVALAC->number, yytext, DEFAULT_BASE); if (-1 == retval) { report_error("Invalid characters for base 10"); scanerror = 1; } else { unsigned int t = count_digits(yytext); char * period = strchr(yytext,'.'); Dprintf("period: %s\n",period); if (period == NULL) { // no period means subtract the zeros period = yytext+strlen(yytext)-1; while (*period == '0') { t--; period--; } Dprintf("period: %s\n",period); } Dprintf("big ugly digits in %s: %u (%u)\n",yytext,t,sig_figs); if (t ", yytext); retval = num_init_set_str(YYLVALAC->number,yytext,16); if (-1 == retval) { report_error("some characters invalid for base 16"); scanerror = 1; } else { unsigned int t = count_digits(yytext); //strlen(yytext+2); if (yydebug) { num_out_str(stdout,DEFAULT_BASE,YYLVALAC->number); printf("\n"); } Dprintf("hex digits in %s: %u (%u)\n",yytext,t,sig_figs); if (tnumber,yytext,8); if (-1 == retval) { report_error(strerror(errno)); scanerror = 1; } /*sscanf(yytext,"%lo",&value); yylval.number = value; */ t = yyleng-1; //strlen(yytext+1); Dprintf("octal digits in %s: %u (%u)\n",yytext,t,sig_figs); if (tnumber,yytext,2); if (-1 == retval) { report_error("Expected a 0 or 1 for binary."); scanerror = 1; } else { unsigned int t = count_digits(yytext); //strlen(yytext+2); if (yydebug) { num_out_str(stdout,DEFAULT_BASE,YYLVALAC->number); printf("\n"); } Dprintf("binary digits in %s: %u (%u)\n",yytext,t,sig_figs); if (tyy_buffer_status == YY_BUFFER_NEW ) { /* We're scanning a new file or input source. It's * possible that this happened because the user * just pointed yyin at a new source and called * yylex(). If so, then we have to assure * consistency between YY_CURRENT_BUFFER and our * globals. Here is the right place to do so, because * this is the first action (other than possibly a * back-up) that will match for the new input source. */ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; } /* Note that here we test for yy_c_buf_p "<=" to the position * of the first EOB in the buffer, since yy_c_buf_p will * already have been incremented past the NUL character * (since all states make transitions on EOB to the * end-of-buffer state). Contrast this with the test * in input(). */ if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) { /* This was really a NUL. */ yy_state_type yy_next_state; (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state( ); /* Okay, we're now positioned to make the NUL * transition. We couldn't have * yy_get_previous_state() go ahead and do it * for us because it doesn't know how to deal * with the possibility of jamming (and we don't * want to build jamming into it because then it * will run more slowly). */ yy_next_state = yy_try_NUL_trans( yy_current_state ); yy_bp = (yytext_ptr) + YY_MORE_ADJ; if ( yy_next_state ) { /* Consume the NUL. */ yy_cp = ++(yy_c_buf_p); yy_current_state = yy_next_state; goto yy_match; } else { yy_cp = (yy_c_buf_p); goto yy_find_action; } } else switch ( yy_get_next_buffer( ) ) { case EOB_ACT_END_OF_FILE: { (yy_did_buffer_switch_on_eof) = 0; if ( yywrap( ) ) { /* Note: because we've taken care in * yy_get_next_buffer() to have set up * yytext, we can now set up * yy_c_buf_p so that if some total * hoser (like flex itself) wants to * call the scanner after we return the * YY_NULL, it'll still work - another * YY_NULL will get returned. */ (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; yy_act = YY_STATE_EOF(YY_START); goto do_action; } else { if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; } break; } case EOB_ACT_CONTINUE_SCAN: (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state( ); yy_cp = (yy_c_buf_p); yy_bp = (yytext_ptr) + YY_MORE_ADJ; goto yy_match; case EOB_ACT_LAST_MATCH: (yy_c_buf_p) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; yy_current_state = yy_get_previous_state( ); yy_cp = (yy_c_buf_p); yy_bp = (yytext_ptr) + YY_MORE_ADJ; goto yy_find_action; } break; } default: YY_FATAL_ERROR( "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ } /* end of yylex */ /* yy_get_next_buffer - try to read in a new buffer * * Returns a code representing an action: * EOB_ACT_LAST_MATCH - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ static int yy_get_next_buffer (void) { register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; register char *source = (yytext_ptr); register int number_to_move, i; int ret_val; if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) YY_FATAL_ERROR( "fatal flex scanner internal error--end of buffer missed" ); if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) { /* Don't try to fill the buffer, so this is an EOF. */ if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) { /* We matched a single character, the EOB, so * treat this as a final EOF. */ return EOB_ACT_END_OF_FILE; } else { /* We matched some text prior to the EOB, first * process it. */ return EOB_ACT_LAST_MATCH; } } /* Try to read more data. */ /* First move last chars to start of buffer. */ number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) /* don't do the read, it's not guaranteed to return an EOF, * just force an EOF */ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; else { int num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) { /* Not enough room in the buffer - grow it. */ /* just a shorter name for the current buffer */ YY_BUFFER_STATE b = YY_CURRENT_BUFFER; int yy_c_buf_p_offset = (int) ((yy_c_buf_p) - b->yy_ch_buf); if ( b->yy_is_our_buffer ) { int new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; else b->yy_buf_size *= 2; b->yy_ch_buf = (char *) /* Include room in for 2 EOB chars. */ yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); } else /* Can't grow it, we don't own it. */ b->yy_ch_buf = 0; if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "fatal error - scanner input buffer overflow" ); (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; } if ( num_to_read > YY_READ_BUF_SIZE ) num_to_read = YY_READ_BUF_SIZE; /* Read in more data. */ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), (yy_n_chars), (size_t) num_to_read ); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } if ( (yy_n_chars) == 0 ) { if ( number_to_move == YY_MORE_ADJ ) { ret_val = EOB_ACT_END_OF_FILE; yyrestart(yyin ); } else { ret_val = EOB_ACT_LAST_MATCH; YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_EOF_PENDING; } } else ret_val = EOB_ACT_CONTINUE_SCAN; if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { /* Extend the array by 50%, plus the number we really need. */ yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); } (yy_n_chars) += number_to_move; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; return ret_val; } /* yy_get_previous_state - get the state just before the EOB char was reached */ static yy_state_type yy_get_previous_state (void) { register yy_state_type yy_current_state; register char *yy_cp; yy_current_state = (yy_start); for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) { register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 775 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; } return yy_current_state; } /* yy_try_NUL_trans - try to make a transition on the NUL character * * synopsis * next_state = yy_try_NUL_trans( current_state ); */ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) { register int yy_is_jam; register char *yy_cp = (yy_c_buf_p); register YY_CHAR yy_c = 1; if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 775 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; yy_is_jam = (yy_current_state == 774); return yy_is_jam ? 0 : yy_current_state; } #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (void) #else static int input (void) #endif { int c; *(yy_c_buf_p) = (yy_hold_char); if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) { /* yy_c_buf_p now points to the character we want to return. * If this occurs *before* the EOB characters, then it's a * valid NUL; if not, then we've hit the end of the buffer. */ if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) /* This was really a NUL. */ *(yy_c_buf_p) = '\0'; else { /* need more input */ int offset = (yy_c_buf_p) - (yytext_ptr); ++(yy_c_buf_p); switch ( yy_get_next_buffer( ) ) { case EOB_ACT_LAST_MATCH: /* This happens because yy_g_n_b() * sees that we've accumulated a * token and flags that we need to * try matching the token before * proceeding. But for input(), * there's no matching to consider. * So convert the EOB_ACT_LAST_MATCH * to EOB_ACT_END_OF_FILE. */ /* Reset buffer status. */ yyrestart(yyin ); /*FALLTHROUGH*/ case EOB_ACT_END_OF_FILE: { if ( yywrap( ) ) return EOF; if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; #ifdef __cplusplus return yyinput(); #else return input(); #endif } case EOB_ACT_CONTINUE_SCAN: (yy_c_buf_p) = (yytext_ptr) + offset; break; } } } c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ *(yy_c_buf_p) = '\0'; /* preserve yytext */ (yy_hold_char) = *++(yy_c_buf_p); return c; } #endif /* ifndef YY_NO_INPUT */ /** Immediately switch to a different input stream. * @param input_file A readable stream. * * @note This function does not reset the start condition to @c INITIAL . */ void yyrestart (FILE * input_file ) { if ( ! YY_CURRENT_BUFFER ){ yyensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin,YY_BUF_SIZE ); } yy_init_buffer(YY_CURRENT_BUFFER,input_file ); yy_load_buffer_state( ); } /** Switch to a different input buffer. * @param new_buffer The new input buffer. * */ void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) { /* TODO. We should be able to replace this entire function body * with * yypop_buffer_state(); * yypush_buffer_state(new_buffer); */ yyensure_buffer_stack (); if ( YY_CURRENT_BUFFER == new_buffer ) return; if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ *(yy_c_buf_p) = (yy_hold_char); YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } YY_CURRENT_BUFFER_LVALUE = new_buffer; yy_load_buffer_state( ); /* We don't actually know whether we did this switch during * EOF (yywrap()) processing, but the only time this flag * is looked at is after yywrap() is called, so it's safe * to go ahead and always set it. */ (yy_did_buffer_switch_on_eof) = 1; } static void yy_load_buffer_state (void) { (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; (yy_hold_char) = *(yy_c_buf_p); } /** Allocate and initialize an input buffer state. * @param file A readable stream. * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. * * @return the allocated buffer state. */ YY_BUFFER_STATE yy_create_buffer (FILE * file, int size ) { YY_BUFFER_STATE b; b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); b->yy_buf_size = size; /* yy_ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. */ b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 ); if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); b->yy_is_our_buffer = 1; yy_init_buffer(b,file ); return b; } /** Destroy the buffer. * @param b a buffer created with yy_create_buffer() * */ void yy_delete_buffer (YY_BUFFER_STATE b ) { if ( ! b ) return; if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; if ( b->yy_is_our_buffer ) yyfree((void *) b->yy_ch_buf ); yyfree((void *) b ); } #ifndef __cplusplus extern int isatty (int ); #endif /* __cplusplus */ /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a yyrestart() or at EOF. */ static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file ) { int oerrno = errno; yy_flush_buffer(b ); b->yy_input_file = file; b->yy_fill_buffer = 1; /* If b is the current buffer, then yy_init_buffer was _probably_ * called from yyrestart() or through yy_get_next_buffer. * In that case, we don't want to reset the lineno or column. */ if (b != YY_CURRENT_BUFFER){ b->yy_bs_lineno = 1; b->yy_bs_column = 0; } b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; errno = oerrno; } /** Discard all buffered characters. On the next scan, YY_INPUT will be called. * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. * */ void yy_flush_buffer (YY_BUFFER_STATE b ) { if ( ! b ) return; b->yy_n_chars = 0; /* We always need two end-of-buffer characters. The first causes * a transition to the end-of-buffer state. The second causes * a jam in that state. */ b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; b->yy_buf_pos = &b->yy_ch_buf[0]; b->yy_at_bol = 1; b->yy_buffer_status = YY_BUFFER_NEW; if ( b == YY_CURRENT_BUFFER ) yy_load_buffer_state( ); } /** Pushes the new state onto the stack. The new state becomes * the current state. This function will allocate the stack * if necessary. * @param new_buffer The new state. * */ void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) { if (new_buffer == NULL) return; yyensure_buffer_stack(); /* This block is copied from yy_switch_to_buffer. */ if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ *(yy_c_buf_p) = (yy_hold_char); YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } /* Only push if top exists. Otherwise, replace top. */ if (YY_CURRENT_BUFFER) (yy_buffer_stack_top)++; YY_CURRENT_BUFFER_LVALUE = new_buffer; /* copied from yy_switch_to_buffer. */ yy_load_buffer_state( ); (yy_did_buffer_switch_on_eof) = 1; } /** Removes and deletes the top of the stack, if present. * The next element becomes the new top. * */ void yypop_buffer_state (void) { if (!YY_CURRENT_BUFFER) return; yy_delete_buffer(YY_CURRENT_BUFFER ); YY_CURRENT_BUFFER_LVALUE = NULL; if ((yy_buffer_stack_top) > 0) --(yy_buffer_stack_top); if (YY_CURRENT_BUFFER) { yy_load_buffer_state( ); (yy_did_buffer_switch_on_eof) = 1; } } /* Allocates the stack if it does not exist. * Guarantees space for at least one push. */ static void yyensure_buffer_stack (void) { int num_to_alloc; if (!(yy_buffer_stack)) { /* First allocation is just for 2 elements, since we don't know if this * scanner will even need a stack. We use 2 instead of 1 to avoid an * immediate realloc on the next call. */ num_to_alloc = 1; (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc (num_to_alloc * sizeof(struct yy_buffer_state*) ); if ( ! (yy_buffer_stack) ) YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); (yy_buffer_stack_max) = num_to_alloc; (yy_buffer_stack_top) = 0; return; } if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ /* Increase the buffer to prepare for a possible push. */ int grow_size = 8 /* arbitrary grow size */; num_to_alloc = (yy_buffer_stack_max) + grow_size; (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc ((yy_buffer_stack), num_to_alloc * sizeof(struct yy_buffer_state*) ); if ( ! (yy_buffer_stack) ) YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); /* zero only the new slots.*/ memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); (yy_buffer_stack_max) = num_to_alloc; } } /** Setup the input buffer state to scan directly from a user-specified character buffer. * @param base the character buffer * @param size the size in bytes of the character buffer * * @return the newly allocated buffer state object. */ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) { YY_BUFFER_STATE b; if ( size < 2 || base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) /* They forgot to leave room for the EOB's. */ return 0; b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ b->yy_buf_pos = b->yy_ch_buf = base; b->yy_is_our_buffer = 0; b->yy_input_file = 0; b->yy_n_chars = b->yy_buf_size; b->yy_is_interactive = 0; b->yy_at_bol = 1; b->yy_fill_buffer = 0; b->yy_buffer_status = YY_BUFFER_NEW; yy_switch_to_buffer(b ); return b; } /** Setup the input buffer state to scan a string. The next call to yylex() will * scan from a @e copy of @a str. * @param yystr a NUL-terminated string to scan * * @return the newly allocated buffer state object. * @note If you want to scan bytes that may contain NUL values, then use * yy_scan_bytes() instead. */ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr ) { return yy_scan_bytes(yystr,strlen(yystr) ); } /** Setup the input buffer state to scan the given bytes. The next call to yylex() will * scan from a @e copy of @a bytes. * @param bytes the byte buffer to scan * @param len the number of bytes in the buffer pointed to by @a bytes. * * @return the newly allocated buffer state object. */ YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len ) { YY_BUFFER_STATE b; char *buf; yy_size_t n; int i; /* Get memory for full buffer, including space for trailing EOB's. */ n = _yybytes_len + 2; buf = (char *) yyalloc(n ); if ( ! buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); for ( i = 0; i < _yybytes_len; ++i ) buf[i] = yybytes[i]; buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; b = yy_scan_buffer(buf,n ); if ( ! b ) YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); /* It's okay to grow etc. this buffer, and we should throw it * away when we're done. */ b->yy_is_our_buffer = 1; return b; } #ifndef YY_EXIT_FAILURE #define YY_EXIT_FAILURE 2 #endif static void yy_fatal_error (yyconst char* msg ) { (void) fprintf( stderr, "%s\n", msg ); exit( YY_EXIT_FAILURE ); } /* Redefine yyless() so it works in section 3 code. */ #undef yyless #define yyless(n) \ do \ { \ /* Undo effects of setting up yytext. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ yytext[yyleng] = (yy_hold_char); \ (yy_c_buf_p) = yytext + yyless_macro_arg; \ (yy_hold_char) = *(yy_c_buf_p); \ *(yy_c_buf_p) = '\0'; \ yyleng = yyless_macro_arg; \ } \ while ( 0 ) /* Accessor methods (get/set functions) to struct members. */ /** Get the current line number. * */ int yyget_lineno (void) { return yylineno; } /** Get the input stream. * */ FILE *yyget_in (void) { return yyin; } /** Get the output stream. * */ FILE *yyget_out (void) { return yyout; } /** Get the length of the current token. * */ int yyget_leng (void) { return yyleng; } /** Get the current token. * */ char *yyget_text (void) { return yytext; } /** Set the current line number. * @param line_number * */ void yyset_lineno (int line_number ) { yylineno = line_number; } /** Set the input stream. This does not discard the current * input buffer. * @param in_str A readable stream. * * @see yy_switch_to_buffer */ void yyset_in (FILE * in_str ) { yyin = in_str ; } void yyset_out (FILE * out_str ) { yyout = out_str ; } int yyget_debug (void) { return yy_flex_debug; } void yyset_debug (int bdebug ) { yy_flex_debug = bdebug ; } static int yy_init_globals (void) { /* Initialization is the same as for the non-reentrant scanner. * This function is called from yylex_destroy(), so don't allocate here. */ (yy_buffer_stack) = 0; (yy_buffer_stack_top) = 0; (yy_buffer_stack_max) = 0; (yy_c_buf_p) = (char *) 0; (yy_init) = 0; (yy_start) = 0; /* Defined in main.c */ #ifdef YY_STDINIT yyin = stdin; yyout = stdout; #else yyin = (FILE *) 0; yyout = (FILE *) 0; #endif /* For future reference: Set errno on error, since we are called by * yylex_init() */ return 0; } /* yylex_destroy is for both reentrant and non-reentrant scanners. */ int yylex_destroy (void) { /* Pop the buffer stack, destroying each element. */ while(YY_CURRENT_BUFFER){ yy_delete_buffer(YY_CURRENT_BUFFER ); YY_CURRENT_BUFFER_LVALUE = NULL; yypop_buffer_state(); } /* Destroy the stack itself. */ yyfree((yy_buffer_stack) ); (yy_buffer_stack) = NULL; /* Reset the globals. This is important in a non-reentrant scanner so the next time * yylex() is called, initialization will occur. */ yy_init_globals( ); return 0; } /* * Internal utility routines. */ #ifndef yytext_ptr static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) { register int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * s ) { register int n; for ( n = 0; s[n]; ++n ) ; return n; } #endif void *yyalloc (yy_size_t size ) { return (void *) malloc( size ); } void *yyrealloc (void * ptr, yy_size_t size ) { /* The cast to (char *) in the following accommodates both * implementations that use char* generic pointers, and those * that use void* generic pointers. It works with the latter * because both ANSI C and C++ allow castless assignment from * any pointer type to void*, and deal with argument conversions * as though doing an assignment. */ return (void *) realloc( (char *) ptr, size ); } void yyfree (void * ptr ) { free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ } #define YYTABLES_NAME "yytables" #line 816 "scanner.l" wcalc-2.4/scanner.l0000644000175000000620000005723011100723015012540 0ustar kkstaff%{ /* * Simple example lex input file * Original provided by * Shawn Ostermann -- Mon Sep 24, 2001 * * Modified by Kyle Wheeler */ #include #include #include #include #ifdef HAVE_INTTYPES_H #include #endif #ifdef HAVE_STDINT_H #include #endif #include #include #include /* for isdigit() */ #include "number.h" #include "calculator.h" #include "conversion.h" #ifdef HAVE_CONFIG_H #include "parser.h" #else #include "y.tab.h" #endif #include "string_manip.h" #include "explain.h" #include "isfunc.h" /* for isfunc() */ #include "isconst.h" /* for isconst() */ #ifdef MEMWATCH #include "memwatch.h" #endif extern short scanerror; #ifndef HUGE_VALF # define HUGE_VALF HUGE_VAL #endif #ifndef UINT32_MAX # define UINT32_MAX 4294967295U #endif #ifdef REENTRANT_PARSER /* Re-entrant */ #define YY_DECL int yylex (YYSTYPE *yylval) #define YYLVALAC yylval #else #define YYLVALAC (&yylval) #endif int line_is_a_command = 0; int column = 0; #define POS_CHAR() do { column ++; } while(0) #define POS_STR() do { column += yyleng; } while (0) /* Everything up to the funny characters on the next line */ /* goes directly into the lex.yy.c file */ %} %pointer %option nounput noinput /* shorthand definitions for later */ DIGIT [0123456789] NDIGIT [123456789] LETTER [a-zA-Z] WHITESPACE [ \t] ACCEPTABLE [_:0-9] UNITCHRS [-_a-zA-Z0-9^./µÅ] SPACE [ ] /* The rest of this after the '%%' is lex rules */ %% {WHITESPACE}+ { POS_STR(); } "\n" { return(EOLN); } %{ /* These are commands */ %} \\b(in(ary)?)? { line_is_a_command = 1; POS_STR(); return(BIN_CMD); } \\d(ec(imal)?)? { line_is_a_command = 1; POS_STR(); return(DEC_CMD); } \\dsep{WHITESPACE}*. { int i = 5; while (isspace(yytext[i])) i++; if (yytext[i] == 0) i--; YYLVALAC->character = yytext[i]; line_is_a_command = 1; POS_STR(); return(DSEP_CMD); } \\idsep{WHITESPACE}*. { int i = 5; while (isspace(yytext[i])) i++; if (yytext[i] == 0) i--; YYLVALAC->character = yytext[i]; line_is_a_command = 1; POS_STR(); return(IDSEP_CMD); } \\e(ng(ineering)?)?{WHITESPACE}*{DIGIT}* { int i = 2; while (yytext[i] != 0 && ! isdigit((int)(yytext[i]))) ++i; if (yytext[i] != 0 && yytext[i] != '\n') { YYLVALAC->integer = strtoul(yytext+i, NULL, 0); } else { YYLVALAC->integer = -1; } line_is_a_command = 1; POS_STR(); return(ENG_CMD); } \\e(ng(ineering)?)?{WHITESPACE}+auto(matic)? { POS_STR(); YYLVALAC->integer = 1; line_is_a_command = 1; return(ENG_CMD); } \\e(ng(ineering)?)?{WHITESPACE}+always { POS_STR(); YYLVALAC->integer = 2; line_is_a_command = 1; return(ENG_CMD); } \\e(ng(ineering)?)?{WHITESPACE}+never { POS_STR(); YYLVALAC->integer = 3; line_is_a_command = 1; return(ENG_CMD); } \\cons(ervative)? { line_is_a_command = 1; POS_STR(); return(GUARD_CMD); } \\h(ex(adecimal)?)? { line_is_a_command = 1; POS_STR(); return(HEX_CMD); } \\help { line_is_a_command = 1; POS_STR(); return(PRINT_HELP_CMD); } \\hlimit{WHITESPACE}*{DIGIT}+ { int i = 7; while (isspace(yytext[i])) ++i; if (yytext[i] != 0) YYLVALAC->integer = strtoul(yytext+i, NULL, 0); else YYLVALAC->integer = 0; line_is_a_command = 1; POS_STR(); return(HLIMIT_CMD); } \\ints? { line_is_a_command = 1; POS_STR(); return(INT_CMD); } \\del(im(iters)?)? { line_is_a_command = 1; POS_STR(); return(DELIM_CMD); } \\x { line_is_a_command = 1; POS_STR(); return(HEX_CMD); } \\li(st(vars)?)? { line_is_a_command = 1; POS_STR(); return(LISTVAR_CMD); } \\o(ct(al)?)? { line_is_a_command = 1; POS_STR(); return(OCT_CMD); } \\open{WHITESPACE}+.* { int i = 5; char *returnme; Dprintf("open\n"); while (isspace(yytext[i])) ++i; returnme = strdup(yytext + i); /* now trim trailing whitespace */ i = (int)strlen(returnme) - 1; while (isspace(returnme[i])) { returnme[i] = 0; i--; } YYLVALAC->variable = returnme; Dprintf("filename: %s\n",returnme); line_is_a_command = 1; POS_STR(); return(OPEN_CMD); } \\p{WHITESPACE}*(({DIGIT}+)|(-1)) { int i = 2; while (isspace(yytext[i])) ++i; YYLVALAC->integer = strtol(yytext+i, NULL, 0); line_is_a_command = 1; POS_STR(); return(PRECISION_CMD); } \\pre(fix(es)?)? { line_is_a_command = 1; POS_STR(); return(PREFIX_CMD); } \\pref(s|erences)? { line_is_a_command = 1; POS_STR(); return(DISPLAY_PREFS_CMD); } \\r(ad(ians)?)? { line_is_a_command = 1; POS_STR(); return(RADIAN_CMD); } \\rou(nd(ing)?)?{WHITESPACE}+no(ne)? { YYLVALAC->integer = NO_ROUNDING_INDICATION; line_is_a_command = 1; POS_STR(); return(ROUNDING_INDICATION_CMD); } \\rou(nd(ing)?)?{WHITESPACE}+simple { YYLVALAC->integer = SIMPLE_ROUNDING_INDICATION; line_is_a_command = 1; POS_STR(); return(ROUNDING_INDICATION_CMD); } \\rou(nd(ing)?)?{WHITESPACE}+sig_fig { YYLVALAC->integer = SIG_FIG_ROUNDING_INDICATION; line_is_a_command = 1; POS_STR(); return(ROUNDING_INDICATION_CMD); } \\rou(nd(ing)?)? { YYLVALAC->integer = -1; line_is_a_command = 1; POS_STR(); return(ROUNDING_INDICATION_CMD); } \\re(member(_errors)?)? { line_is_a_command = 1; POS_STR(); return(REMEMBER_CMD); } \\bits{WHITESPACE}*{DIGIT}+ { int i = 5; while (isspace(yytext[i])) ++i; YYLVALAC->integer = strtoul(yytext+i, NULL, 0); line_is_a_command = 1; POS_STR(); return(BITS_CMD); } \\save{WHITESPACE}.* { int i = 5; char *returnme; while (isspace(yytext[i])) ++i; returnme = strdup(yytext + i); /* now trim trailing whitespace */ i = (int)strlen(returnme) - 1; while (isspace(returnme[i])) { returnme[i] = 0; i--; } YYLVALAC->variable = returnme; line_is_a_command = 1; POS_STR(); return(SAVE_CMD); } \\tsep{WHITESPACE}*. { int i = 5; while (isspace(yytext[i])) ++i; if (yytext[i] == 0) i--; YYLVALAC->character = yytext[i]; line_is_a_command = 1; POS_STR(); return(TSEP_CMD); } \\itsep{WHITESPACE}*. { int i = 5; while (isspace(yytext[i])) ++i; if (yytext[i] == 0) i--; YYLVALAC->character = yytext[i]; line_is_a_command = 1; POS_STR(); return(ITSEP_CMD); } \? { line_is_a_command = 1; POS_STR(); return(PRINT_HELP_CMD); } [Hh][Ee][Ll][Pp] { line_is_a_command = 1; POS_STR(); return(PRINT_HELP_CMD); } \\c(onv(ert)?)?{WHITESPACE}+{UNITCHRS}+({WHITESPACE}+to)?{WHITESPACE}+{UNITCHRS}+ { char *unitone; int i = 2; /* find the first space */ while (yytext[i] != 0 && ! isspace(yytext[i])) ++i; /* find the end of that space */ while (isspace(yytext[i])) ++i; unitone = yytext + i; /* skip the unit */ while (yytext[i] != 0 && ! isspace(yytext[i])) ++i; yytext[i++] = 0; /* onward to the word "to" */ while (isspace(yytext[i])) ++i; if (yytext[i] == 't' && yytext[i+1] == 'o' && isspace(yytext[i+2])) { i += 3; /* to */ } /* seek the next unit */ while (isspace(yytext[i])) ++i; YYLVALAC->conver.u1 = strdup(unitone); YYLVALAC->conver.u2 = strdup(yytext+i); line_is_a_command = 1; POS_STR(); return(CONVERT_CMD); } \\base{WHITESPACE}*{DIGIT}+ { int i = 5; while (isspace(yytext[i])) ++i; YYLVALAC->integer = strtoul(yytext + i, NULL, 0); line_is_a_command = 1; POS_STR(); return(BASE_CMD); } \\verbose { line_is_a_command = 1; POS_STR(); return(VERBOSE_CMD); } \\explain{WHITESPACE}*.* { int i = 9, j; while (isspace(yytext[i])) ++i; j = strlen(yytext+i); while (isspace(yytext[j])) { yytext[j] = 0; j--; } explain(yytext+i); line_is_a_command = 1; POS_STR(); } \\store { line_is_a_command = 1; POS_STR(); return(STORE_CMD); } \\cmod { line_is_a_command = 1; POS_STR(); return(CMOD_CMD); } %{ /* These are comments */ %} \/\*.*\*\/ { POS_STR(); } \/\/.* { POS_STR(); } \#.* { POS_STR(); } %{ /* These are the constants (except random) */ %} (e) { num_init_set_str(YYLVALAC->number,W_E,0); POS_STR(); return(NUMBER); } ([pP][iI])|(\317\200) { num_init(YYLVALAC->number); num_const_pi(YYLVALAC->number); POS_STR(); return(NUMBER); } random { num_init(YYLVALAC->number); while (num_random(YYLVALAC->number) != 0) ; num_mul_ui(YYLVALAC->number,YYLVALAC->number,UINT32_MAX); POS_STR(); return(NUMBER); } irandom { num_init(YYLVALAC->number); while (num_random(YYLVALAC->number) != 0) ; num_mul_ui(YYLVALAC->number,YYLVALAC->number,UINT32_MAX); num_rint(YYLVALAC->number,YYLVALAC->number); POS_STR(); return(NUMBER); } N[aA] { num_init_set_str(YYLVALAC->number,W_AVOGADROS_CONSTANT,0); POS_STR(); return(NUMBER); } k { num_init_set_str(YYLVALAC->number,W_BOLTZMANN_CONSTANT,0); POS_STR(); return(NUMBER); } Cc { num_init_set_str(YYLVALAC->number,W_COULOMB_CONSTANT,0); POS_STR(); return(NUMBER); } ec { num_init_set_str(YYLVALAC->number,W_ELEMENTARY_CHARGE,0); POS_STR(); return(NUMBER); } R { num_init_set_str(YYLVALAC->number,W_MOLAR_GAS_CONSTANT,0); POS_STR(); return(NUMBER); } G { num_init_set_str(YYLVALAC->number,W_GRAVITATIONAL_CONSTANT,0); POS_STR(); return(NUMBER); } g { num_init_set_str(YYLVALAC->number,W_GRAVITATIONAL_ACCELLERATION,0); POS_STR(); return(NUMBER); } Me { num_init_set_str(YYLVALAC->number,W_ELECTRON_MASS,0); POS_STR(); return(NUMBER); } Mp { num_init_set_str(YYLVALAC->number,W_PROTON_MASS,0); POS_STR(); return(NUMBER); } Mn { num_init_set_str(YYLVALAC->number,W_NEUTRON_MASS,0); POS_STR(); return(NUMBER); } Md { num_init_set_str(YYLVALAC->number,W_DEUTERON_MASS,0); POS_STR(); return(NUMBER); } (u)|(amu) { num_init_set_str(YYLVALAC->number,W_ATOMIC_MASS,0); POS_STR(); return(NUMBER); } c { num_init_set_str(YYLVALAC->number,W_SPEED_OF_LIGHT,0); POS_STR(); return(NUMBER); } h { num_init_set_str(YYLVALAC->number,W_PLANCK_CONSTANT,0); POS_STR(); return(NUMBER); } (\302\265|\316\274|mu)(0|zero|ZERO) { Number temp; num_init(YYLVALAC->number); num_init(temp); num_set_d(temp,1e-7); num_const_pi(YYLVALAC->number); num_mul_ui(YYLVALAC->number,YYLVALAC->number,4); num_mul(YYLVALAC->number,YYLVALAC->number,temp); num_free(temp); POS_STR(); return(NUMBER); } (epsilon|EPSILON|\316\265)(0|zero|ZERO) { num_init_set_str(YYLVALAC->number,W_PERMITTIVITY_OF_FREE_SPACE,0); POS_STR(); return(NUMBER); } (\302\265|\316\274|mu)B { num_init_set_str(YYLVALAC->number,W_BOHR_MAGNETON,0); POS_STR(); return(NUMBER); } (\302\265|\316\274|mu)N { num_init_set_str(YYLVALAC->number,W_NUCLEAR_MAGNETON,0); POS_STR(); return(NUMBER); } b { num_init_set_str(YYLVALAC->number,W_WIEN_DISPLACEMENT,0); POS_STR(); return(NUMBER); } a0 { num_init_set_str(YYLVALAC->number,W_BOHR_RADIUS,0); POS_STR(); return(NUMBER); } F { num_init_set_str(YYLVALAC->number,W_FARADAY_CONSTANT,0); POS_STR(); return(NUMBER); } (Vm)|(NAk) { num_init_set_str(YYLVALAC->number,W_MOLAR_VOLUME_OF_IDEAL_GAS,0); POS_STR(); return(NUMBER); } eV { num_init_set_str(YYLVALAC->number,W_ELECTRON_VOLT,0); POS_STR(); return(NUMBER); } sigma|\317\203 { num_init_set_str(YYLVALAC->number,W_STEFAN_BOLTZMANN,0); POS_STR(); return(NUMBER); } alpha|\316\261 { num_init_set_str(YYLVALAC->number,W_FINE_STRUCTURE,0); POS_STR(); return(NUMBER); } gamma|GAMMA|\316\263 { num_init(YYLVALAC->number); num_const_euler(YYLVALAC->number); POS_STR(); return(NUMBER); } re { num_init_set_str(YYLVALAC->number,W_ELECTRON_RADIUS,0); POS_STR(); return(NUMBER); } Kj { num_init_set_str(YYLVALAC->number,W_JOSEPHSON_CONSTANT,0); POS_STR(); return(NUMBER); } Rk { num_init_set_str(YYLVALAC->number,W_VON_KLITZING_CONSTANT,0); POS_STR(); return(NUMBER); } R(inf|\342\210\236) { num_init_set_str(YYLVALAC->number,W_RYDBERG_CONSTANT,0); POS_STR(); return(NUMBER); } Eh { num_init_set_str(YYLVALAC->number,W_HARTREE_ENERGY,0); POS_STR(); return(NUMBER); } Gf { num_init_set_str(YYLVALAC->number,W_FERMI_COUPLING_CONSTANT,0); POS_STR(); return(NUMBER); } M(\302\265|\316\274|mu) { num_init_set_str(YYLVALAC->number,W_MUON_MASS,0); POS_STR(); return(NUMBER); } M(t|tau|\317\204) { num_init_set_str(YYLVALAC->number,W_TAU_MASS,0); POS_STR(); return(NUMBER); } Mh { num_init_set_str(YYLVALAC->number,W_HELION_MASS,0); POS_STR(); return(NUMBER); } M(alpha|\316\261) { num_init_set_str(YYLVALAC->number,W_ALPHA_PARTICLE_MASS,0); POS_STR(); return(NUMBER); } n(0|zero|ZERO) { num_init_set_str(YYLVALAC->number,W_LOSCHMIDT_CONSTANT,0); POS_STR(); return(NUMBER); } c1 { num_init_set_str(YYLVALAC->number,W_FIRST_RADIATION_CONSTANT,0); POS_STR(); return(NUMBER); } c2 { num_init_set_str(YYLVALAC->number,W_SECOND_RADIATION_CONSTANT,0); POS_STR(); return(NUMBER); } G(0|zero|ZERO) { num_init_set_str(YYLVALAC->number,W_CONDUCTANCE_QUANTUM,0); POS_STR(); return(NUMBER); } Z(0|zero|ZERO) { num_init_set_str(YYLVALAC->number,W_IMPEDANCE_OF_VACUUM,0); POS_STR(); return(NUMBER); } (Phi|\316\246)(0|zero|ZERO) { num_init_set_str(YYLVALAC->number,W_MAGNETIC_FLUX_QUANTUM,0); POS_STR(); return(NUMBER); } \302\274 { num_init_set_d(YYLVALAC->number,0.25); POS_STR(); return(NUMBER); } \302\275 { num_init_set_d(YYLVALAC->number,0.5); POS_STR(); return(NUMBER); } \302\276 { num_init_set_d(YYLVALAC->number,0.75); POS_STR(); return(NUMBER); } K { num_init(YYLVALAC->number); num_const_catalan(YYLVALAC->number); POS_STR(); return(NUMBER); } @NaN@ { num_init(YYLVALAC->number); num_set_nan(YYLVALAC->number); POS_STR(); return (NUMBER); } @Inf@ { num_init(YYLVALAC->number); num_set_inf(YYLVALAC->number,1); POS_STR(); return (NUMBER); } %{ /* These are the grouping symbols */ %} [(] { POS_STR(); return(OPEN_PARENTHESES); } [)] { POS_STR(); return(CLOSE_PARENTHESES); } [{] { POS_STR(); return(OPEN_BRACE); } [}] { POS_STR(); return(CLOSE_BRACE); } \[ { POS_STR(); return(OPEN_BRACKET); } \] { POS_STR(); return(CLOSE_BRACKET); } %{ /* These are the binary operations */ %} not { POS_STR(); return(WNOT); } \302\254 { POS_CHAR(); return(WNOT); } [!] { POS_CHAR(); return(WBANG); } [*][*] { POS_STR(); return(WPOW); } \302\262 { POS_CHAR(); return(WSQR); } [+] { POS_CHAR(); return(WPLUS); } [*]|\303\227 { POS_CHAR(); return(WMULT); } [/]|\303\267 { POS_CHAR(); return(WDIV); } [%] { POS_CHAR(); return(WMOD); } [=] { POS_CHAR(); return(EQUALS_SIGN); } (\^) { POS_CHAR(); return(WPOW); } \| { POS_CHAR(); return(WBOR); } \& { POS_CHAR(); return(WBAND); } \~ { POS_CHAR(); return(WBNOT); } (\|\|)|(or) { POS_STR(); return(WOR); } \342\210\250 { POS_CHAR(); return(WOR); } (\&\&)|(and) { POS_STR(); return(WAND); } \342\210\247 { POS_CHAR(); return(WAND); } (\=\=)|(equals)|(eq) { POS_STR(); return(WEQUAL); } (\!\=)|(ne) { POS_STR(); return(WNEQUAL); } \342\211\240 { POS_CHAR(); return(WNEQUAL); } xor { POS_STR(); return(WBXOR); } \> { POS_CHAR(); return(WGT); } \< { POS_CHAR(); return(WLT); } \>\> { POS_STR(); return(WRSHFT); } \<\< { POS_STR(); return(WLSHFT); } \>\= { POS_STR(); return(WGEQ); } \342\211\245 { POS_CHAR(); return(WGEQ); } \<\= { POS_STR(); return(WLEQ); } \342\211\244 { POS_CHAR(); return(WLEQ); } %{ /* This is a special operator/function */ %} \-|\342\210\222 { POS_CHAR(); return(WMINUS); } %{ /* These are functions (unary operations) */ %} sin(e)? { POS_STR(); return(WSIN); } cos(in(e)?)? { POS_STR(); return(WCOS); } tan { POS_STR(); return(WTAN); } cot { POS_STR(); return(WCOT); } sec(ant)? { POS_STR(); return(WSEC); } csc|cosec(ant)? { POS_STR(); return(WCSC); } (asin)|(arcsin)|(sin^-1) { POS_STR(); return(WASIN); } (acos)|(arccos)|(cos^-1) { POS_STR(); return(WACOS); } (atan)|(arctan)|(tan^-1) { POS_STR(); return(WATAN); } (acot)|(arccot)|(cot^-1) { POS_STR(); return(WACOT); } (asec)|(arcsec)|(sec^-1) { POS_STR(); return(WASEC); } (acsc)|(arccsc)|(csc^-1) { POS_STR(); return(WACSC); } sinh { POS_STR(); return(WSINH); } cosh { POS_STR(); return(WCOSH); } tanh { POS_STR(); return(WTANH); } coth { POS_STR(); return(WCOTH); } sech { POS_STR(); return(WSECH); } csch { POS_STR(); return(WCSCH); } asinh|arsinh|areasinh|(sinh^-1) { POS_STR(); return(WASINH); } acosh|arcosh|areacosh|(cosh^-1) { POS_STR(); return(WACOSH); } atanh|artanh|areatanh|(tanh^-1) { POS_STR(); return(WATANH); } acoth|arcoth|areacoth|(tanh^-1) { POS_STR(); return(WACOTH); } asech|areasech|(sech^-1) { POS_STR(); return(WASECH); } acsch|areacsch|(csch^-1) { POS_STR(); return(WACSCH); } sinc { POS_STR(); return(WSINC); } log { POS_STR(); return(WLOG); } logtwo { POS_STR(); return(WLOGTWO); } ln { POS_STR(); return(WLN); } round { POS_STR(); return(WROUND); } abs { POS_STR(); return(WABS); } (sqrt)|(\342\210\232) { POS_STR(); return(WSQRT); } exp { POS_STR(); return(WEXP); } floor { POS_STR(); return(WFLOOR); } (ceil)|(ceiling) { POS_STR(); return(WCEIL); } cbrt { POS_STR(); return(WCBRT); } rand { POS_STR(); return(WRAND); } irand { POS_STR(); return(WIRAND); } fact { POS_STR(); return(WFACT); } comp { POS_STR(); return(WCOMP); } eint { POS_STR(); return(WEINT); } Gamma { POS_STR(); return(WGAMMA); } ln[gG]amma { POS_STR(); return(WLNGAMMA); } zeta { POS_STR(); return(WZETA); } '[^']*' { char * temp = strdup(yytext+1); temp[yyleng-2] = 0; YYLVALAC->variable = temp; POS_STR(); return(STRING); } {LETTER}+({LETTER}|{ACCEPTABLE})*{WHITESPACE}*= { int i = 0; while (yytext[i] != 0 && !isspace(yytext[i]) && yytext[i] != '=') i++; yytext[i] = 0; if (isfunc(yytext)) { report_error("'%s' is a function and functions cannot be reassigned.", yytext); scanerror = 1; } else if (isconst(yytext) != W_notaconstant) { report_error("'%s' is a pre-defined constant, which cannot be reassigned.", yytext); scanerror = 1; } else { YYLVALAC->variable = strdup(yytext); } POS_STR(); if (! scanerror) { return(ASSIGNMENT); } } {LETTER}+({LETTER}|{ACCEPTABLE})* { if (line_is_a_command) { YYLVALAC->variable = strdup(yytext); POS_STR(); return(VARIABLE); } else { report_error("Undefined variable: %s", yytext); scanerror = 1; POS_STR(); } } %{ %} ({NDIGIT}{DIGIT}{0,2}\.{DIGIT}{3})(e[+-]?{DIGIT}+)? { /* simple decimals */ extern int yydebug; int retval; /* take out the ignored char */ strstrip(',', yytext); if (yydebug) printf("ambiguous %s\n", yytext); retval = num_init_set_str(YYLVALAC->number, yytext, DEFAULT_BASE); if (-1 == retval) { report_error("Invalid characters for base 10"); scanerror = 1; } else { unsigned int t = count_digits(yytext); Dprintf("simple decimals digits in %s: %u (%u)\n",yytext,t,sig_figs); if (t ", yytext); retval = num_init_set_str(YYLVALAC->number, yytext, DEFAULT_BASE); if (-1 == retval) { report_error("Invalid characters for base 10"); scanerror = 1; } else { unsigned int t = count_digits(yytext); Dprintf("zero optional decimal digits in %s: %u (%u)\n",yytext,t,sig_figs); if (t ", yytext); retval = num_init_set_str(YYLVALAC->number, yytext, DEFAULT_BASE); if (-1 == retval) { report_error("Invalid characters for base 10"); scanerror = 1; } else { unsigned int t = count_digits(yytext); char * period = strchr(yytext,'.'); Dprintf("period: %s\n",period); if (period == NULL) { // no period means subtract the zeros period = yytext+strlen(yytext)-1; while (*period == '0') { t--; period--; } Dprintf("period: %s\n",period); } Dprintf("big ugly digits in %s: %u (%u)\n",yytext,t,sig_figs); if (t ", yytext); retval = num_init_set_str(YYLVALAC->number,yytext,16); if (-1 == retval) { report_error("some characters invalid for base 16"); scanerror = 1; } else { unsigned int t = count_digits(yytext); //strlen(yytext+2); if (yydebug) { num_out_str(stdout,DEFAULT_BASE,YYLVALAC->number); printf("\n"); } Dprintf("hex digits in %s: %u (%u)\n",yytext,t,sig_figs); if (tnumber,yytext,8); if (-1 == retval) { report_error(strerror(errno)); scanerror = 1; } /*sscanf(yytext,"%lo",&value); yylval.number = value; */ t = yyleng-1; //strlen(yytext+1); Dprintf("octal digits in %s: %u (%u)\n",yytext,t,sig_figs); if (tnumber,yytext,2); if (-1 == retval) { report_error("Expected a 0 or 1 for binary."); scanerror = 1; } else { unsigned int t = count_digits(yytext); //strlen(yytext+2); if (yydebug) { num_out_str(stdout,DEFAULT_BASE,YYLVALAC->number); printf("\n"); } Dprintf("binary digits in %s: %u (%u)\n",yytext,t,sig_figs); if (t // for isdigit #include // for strcmp/strlen/stpcpy/strdup #include // for calloc #include #ifdef MEMWATCH #include "memwatch.h" #endif static char append = 1; static Number cur_number; static Number prev_number; static unsigned char operationPending = 0; void simpleCalcInit(); void simpleCalcEval(const unsigned char op) { Dprintf("op: %c\n", op); switch (op) { case '+': simple_exp(prev_number, prev_number, wplus, cur_number); break; case '-': simple_exp(prev_number, prev_number, wminus, cur_number); break; case '*': simple_exp(prev_number, prev_number, wmult, cur_number); break; case '/': simple_exp(prev_number, prev_number, wdiv, cur_number); break; default: num_set(prev_number, cur_number); break; } } char *simpleCalc(const unsigned char input, const char *expStr) { unsigned int expStrLen = strlen(expStr); simpleCalcInit(); Dprintf("simpleCalc: %c, %s\n", input, expStr); Dprintf(" ~ cur: %f, prev: %f\n", num_get_d(cur_number), num_get_d(prev_number)); switch (input) { case '+': case '-': case '*': case '/': { char * expdup = strdup(expStr); // Americanize the numbers if (conf.in_thou_delimiter != 0) { strstrip(conf.in_thou_delimiter, expdup); } else { strstrip(conf.thou_delimiter, expdup); } if (conf.in_dec_delimiter != 0 && conf.in_dec_delimiter != '.') { strswap(conf.in_dec_delimiter, '.', expdup); } else if (conf.dec_delimiter != '.') { strswap(conf.dec_delimiter, '.', expdup); } // ... and now, depending on the state... if (operationPending) { num_set_str(cur_number, expdup, 10); free(expdup); simpleCalcEval(operationPending); operationPending = input; append = 0; set_prettyanswer(prev_number); return strdup(pretty_answer); } else { num_set_str(prev_number, expdup, 10); free(expdup); operationPending = input; append = 0; return strdup(expStr); } } break; case '=': append = 0; { char * expdup = strdup(expStr); // Americanize the numbers if (conf.in_thou_delimiter != 0) { strstrip(conf.in_thou_delimiter, expdup); } else { strstrip(conf.thou_delimiter, expdup); } if (conf.in_dec_delimiter != 0 && conf.in_dec_delimiter != '.') { strswap(conf.in_dec_delimiter, '.', expdup); } else if (conf.dec_delimiter != '.') { strswap(conf.dec_delimiter, '.', expdup); } // ... and now, depending on the state... if (! operationPending) { num_set_str(prev_number, expdup, 10); free(expdup); } else { num_set_str(cur_number, expdup, 10); free(expdup); simpleCalcEval(operationPending); operationPending = 0; } } set_prettyanswer(prev_number); return NULL; // This should cause it to go through the displayAnswer logic break; default: if (input == conf.dec_delimiter || isdigit(input)) { char *newStr; if (append && (strcmp("0",expStr) || input == conf.dec_delimiter)) { newStr = malloc(expStrLen + 2); snprintf(newStr, expStrLen + 2, "%s%c", expStr, input); } else { newStr = malloc(2); snprintf(newStr, 2, "%c", input); append = 1; } return newStr; } } return NULL; } void simpleClearEntry() { simpleCalcInit(); num_set_ui(cur_number, 0); } void simpleCalcInit() { static int initialized = 0; if (!initialized) { num_init(cur_number); num_init(prev_number); num_init(last_answer); num_init_set_ui(cur_number, 0); num_init_set_ui(last_answer, 0); initialized = 1; } } void simpleClearAll() { simpleCalcInit(); num_set_ui(cur_number, 0); num_set_ui(last_answer, 0); num_set_ui(prev_number, 0); operationPending = 0; } wcalc-2.4/simpleCalc.h0000644000175000000620000000026710663125360013171 0ustar kkstaff#ifndef SIMPLECALC_H #define SIMPLECALC_H void simpleEval(); char *simpleCalc(const unsigned char input, const char *expStr); void simpleClearEntry(); void simpleClearAll(); #endif wcalc-2.4/string_manip.c0000644000175000000620000000540210725564204013601 0ustar kkstaff/* * string_manip.c * Wcalc * * Created by Kyle Wheeler on Fri Mar 01 2002. * Copyright (c) 2001 Kyle Wheeler. All rights reserved. * */ #include #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "string_manip.h" #if ! defined(HAVE_CONFIG_H) || HAVE_STRING_H # include #else # if !HAVE_STRCHR # define strchr index # define strrchr rindex # endif char *strchr(), *strrchr(); #endif #ifdef MEMWATCH #include "memwatch.h" #endif void strstrip(const char strip, char *str) { size_t left, right; for (left = right = 0; str[right] != 0; ++right) { if (str[right] != 0 && str[right] != strip) { str[left++] = str[right]; } } while (left != right) { str[left++] = 0; } } void strswap(const char sw, const char ap, char *str) { size_t curs = 0; if (!str) return; while (str[curs] != 0) { if (str[curs] == sw) str[curs] = ap; curs++; } } void strswap2(const char sw, const char ap, char *str) { size_t curs = 0; if (!str) return; while (str[curs] != 0) { if (str[curs] == sw) str[curs] = ap; else if (str[curs] == ap) str[curs] = sw; ++curs; } } unsigned int count_digits(const char *str) { size_t curs = 0; unsigned int counter = 0; char base = 10; char * exponent_chars = "eE"; char * base_chars = "1234567890"; if (!str) return 0; if (str[0] == '0' && str[1] == 'x') { base = 16; curs += 2; exponent_chars = "@"; base_chars = "1234567890abcdefABCDEF"; } else if (str[0] == '0' && str[1] == 'b') { base = 2; curs += 2; exponent_chars = "eE"; base_chars = "01"; } else if (str[0] == '0') { base = 8; curs += 1; exponent_chars = "eE"; base_chars = "12345670"; } while (str[curs] != 0 && strchr(exponent_chars, str[curs]) == NULL) { if (strchr(base_chars, str[curs]) != NULL) { counter ++; } ++curs; } return counter; } int justnumbers(const char *str) { size_t curs = 0; if (!str) return 0; while (str[curs] != 0 && (isdigit((int)(str[curs])) || ispunct((int)(str[curs])))) curs++; if (str[curs] == 0) // if we reached the end of the string return 1; else return 0; } void stripComments(char *str) { size_t curs = 0; size_t follower = 0; int update_follower = 1; if (!str) return; while (str[curs] != '\0') { if (str[curs] == '#') { str[curs] = 0; return; } else if (str[curs] == '/' && str[curs + 1] == '/') { str[curs] = 0; return; } else if (str[curs] == '/' && str[curs + 1] == '*') { update_follower = 0; curs++; } else if (str[curs] == '*' && str[curs + 1] == '/') { update_follower = 1; curs += 2; } if (update_follower != 0) { str[follower] = str[curs]; follower++; } curs++; } str[follower] = 0; } wcalc-2.4/string_manip.h0000644000175000000620000000113610647177761013621 0ustar kkstaff/* * string_manip.h * Wcalc * * Created by Kyle Wheeler on Fri Mar 01 2002. * Copyright (c) 2001 Kyle Wheeler. All rights reserved. * */ #ifndef KBW_STRING_MANIP #define KBW_STRING_MANIP void strstrip(const char, char *); /* this replaces all instances of sw in str with ap */ void strswap(const char sw, const char ap, char * str); /* this replaces all instances of sw in str with ap, and all instances of ap in str with sw */ void strswap2(const char sw, const char ap, char * str); unsigned int count_digits(const char *); int justnumbers(const char *); void stripComments(char *); #endif wcalc-2.4/test.errors0000664000175000000620000000032610346606115013157 0ustar kkstaff5? # error on line 1 q=7 # q cannot be assigned a value \convert feet cups # must be same category \convert feet to cups # must be same category foo='foo' foo foo='bar' bar='foo' foo bar='baz' baz='foo' foo foo==5 wcalc-2.4/test.recursion0000644000175000000620000000007510333145136013650 0ustar kkstafffoo=5 foobar='foo' boink='foobar+5' boink # should return 10 wcalc-2.4/test.simple0000644000175000000620000000250111100246274013122 0ustar kkstaff1 a 5.2 m=5.6 f='2m' f # should return 11.2 P=7 2P # should return 14 04+1 # should return 5 040+1 # should return 33 1,000,000 a+1+1 # should return 1000002 5.6*5.6 # should return 31.36 sin(8) # should return 0.139173 sin 8 # should return 0.139173 6cosh 4 # should return 163.849 1-0.9-0.1 # if precision_guard is on, this should return 0 random irandom \convert feet to meters 5 5sin(4) # should return 0.348782 5sin(4!) # should return 2.03368 5sin(4!)-7 # should return -4.96632 5sin(4!)-7*2 # should return -11.9663 5sin(4!)-7*2(4%6) # should return -53.9663 5sin(4!)-7*2(4%6)^2 # should return -221.966 \p0 100! # should be 93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000 \p-1 \ints 100! # should be the same as above \ints 100! # should be abbreviated 1410.06-645.06 # should be 765 if precision_guard is on 1e-9 # should be 1E-9 0.9e-9 # should be 9E-10 50e-9 # check the rounding indicator -340%-60 360%60 23.05-14.5-8.55 # should be zero if precision_guard is on 23.05 # should be 23.05 a # should be 23.05 a-14.5-8.55 # should be 0, not -1E-09 2^3 # should be 8 2**3 # should be 8, equiv to 2^3 6.6 & 0xff # should be 6 -6.6 & 0xff # should be 250 (67113132 >> 8) & 0xff # should be 16 pi << 60 >> 60 # should be 3.14159 wcalc-2.4/test.vars0000644000175000000620000000020110333145136012601 0ustar kkstaff8/6 # should return 1.3333 8/1 # should return 8 a+2 # should return 10 foo=5 foobar='sin(foo)' foobar # should return 0.0871557 wcalc-2.4/theDelegate.h0000644000175000000620000000031010304241164013306 0ustar kkstaff/* theDelegate */ #include @interface theDelegate : NSObject { IBOutlet NSWindow *mainWindow; } - (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication*)theApp; @end wcalc-2.4/theDelegate.m0000644000175000000620000000031010404707700013317 0ustar kkstaff#include "theDelegate.h" #ifdef MEMWATCH #include "memwatch.h" #endif @implementation theDelegate - (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication*)theApp { return YES; } @end wcalc-2.4/TheW.icns0000644000175000000620000010050207435772573012503 0ustar kkstafficnsBics#H@aq33;llx8 8 8 0@aq33;llx8 8 8 0is323݂f̂fD"DUD3f "" w3 fDU fff"D "3݀f3"UD̪f݂f̂fD"DUD3f "" w3 fDU fff"D "3݀f3"UD̪f݂f̂fD"DUD3f "" w3 fDU fff"D "3݀f3"UD̪fs8mkICN#xx|<<><8x8x0xp<8x8x0xp~><~|?|<|?|px~|~? ?|8|8p>p>p>` >~><~|?|<|?|px~|~? ?|8|8p>p>p>`ih32 UD3̎fDwUwD݂D3w"Űwf"D݀3UU"ݐ"݁fw"̄UwDD3"U݇3̅"̇3̅̈wwfD̈DfDwwDf3"3݁ww3DfwDU"́́"݁3"UDfDDݏDUfU3̏Uw"wD̆̀wf""U"3"3U33"Ü""fUD́wfff́̕3"wD̘UUD3̎fDwUwD݂D3w"Űwf"D݀3UU"ݐ"݁fw"̄UwDD3"U݇3̅"̇3̅̈wwfD̈DfDwwDf3"3݁ww3DfwDU"́́"݁3"UDfDDݏDUfU3̏Uw"wD̆̀wf""U"3"3U33"Ü""fUD́wfff́̕3"wD̘UUD3̎fDwUwD݂D3w"Űwf"D݀3UU"ݐ"݁fw"̄UwDD3"U݇3̅"̇3̅̈wwfD̈DfDwwDf3"3݁ww3DfwDU"́́"݁3"UDfDDݏDUfU3̏Uw"wD̆̀wf""U"3"3U33"Ü""fUD́wfff́̕3"wD̘Uh8mk it32DUD݊3w3w33DUfwf3̆3wU̇w݋3D݈Ũ݈wwDw̉3"3̊3݇f3fwDDDfUݤݟ̒"wUD3DDU"Ŭ݊ݱUݟUDDݏfD"w"U3""3w̆wUw̑D"DUݑݢ"DݑU̅Ufݘw3UDUDݠݔwf3w݅3ݜ33f"wUDDwU"ff̖3Dffw"f3www3D3"݇3̂3wݓ3UU"3UUw"U"UfݠD"3̒f3wU݉"U"Dfww3"UU"3w3̥wwwD̈݌3f݈fݧD"̂33̄3݋wf3"w"3U"3w̖"w33ݮD݅3̉wUw"̂"33ݮUwU݆ݛw3D3U333fẃ݄UḟwDݻwD3݄݁33UwwfUU̘D33UU3̸"UD3̄UfDDf3DwDDw"www"33DwDD3UwffD33"3Uw3Uf3̈̊fD"̢UݣwݣwDݣ݇"3݄33"fwݭ3D3"݁UUDUfUDUD݊3w3w33DUfwf3̆3wU̇w݋3D݈Ũ݈wwDw̉3"3̊3݇f3fwDDDfUݤݟ̒"wUD3DDU"Ŭ݊ݱUݟUDDݏfD"w"U3""3w̆wUw̑D"DUݑݢ"DݑU̅Ufݘw3UDUDݠݔwf3w݅3ݜ33f"wUDDwU"ff̖3Dffw"f3www3D3"݇3̂3wݓ3UU"3UUw"U"UfݠD"3̒f3wU݉"U"Dfww3"UU"3w3̥wwwD̈݌3f݈fݧD"̂33̄3݋wf3"w"3U"3w̖"w33ݮD݅3̉wUw"̂"33ݮUwU݆ݛw3D3U333fẃ݄UḟwDݻwD3݄݁33UwwfUU̘D33UU3̸"UD3̄UfDDf3DwDDw"www"33DwDD3UwffD33"3Uw3Uf3̈̊fD"̢UݣwݣwDݣ݇"3݄33"fwݭ3D3"݁UUDUfUDUD݊3w3w33DUfwf3̆3wU̇w݋3D݈Ũ݈wwDw̉3"3̊3݇f3fwDDDfUݤݟ̒"wUD3DDU"Ŭ݊ݱUݟUDDݏfD"w"U3""3w̆wUw̑D"DUݑݢ"DݑU̅Ufݘw3UDUDݠݔwf3w݅3ݜ33f"wUDDwU"ff̖3Dffw"f3www3D3"݇3̂3wݓ3UU"3UUw"U"UfݠD"3̒f3wU݉"U"Dfww3"UU"3w3̥wwwD̈݌3f݈fݧD"̂33̄3݋wf3"w"3U"3w̖"w33ݮD݅3̉wUw"̂"33ݮUwU݆ݛw3D3U333fẃ݄UḟwDݻwD3݄݁33UwwfUU̘D33UU3̸"UD3̄UfDDf3DwDDw"www"33DwDD3UwffD33"3Uw3Uf3̈̊fD"̢UݣwݣwDݣ݇"3݄33"fwݭ3D3"݁UUDUfUt8mk@wcalc-2.4/uint32_max.h0000644000175000000620000000040510347030350013071 0ustar kkstaff#ifdef HAVE_CONFIG_H #include "config.h" #endif #ifdef HAVE_INTTYPES_H #include /* for UINT32_MAX */ #endif #ifdef HAVE_STDINT_H #include /* for UINT32_MAX */ #endif #ifndef UINT32_MAX # define UINT32_MAX 4294967295U #endif wcalc-2.4/VariableList.h0000644000175000000620000000107510401366101013462 0ustar kkstaff/* VariableList */ #include @interface VariableList : NSObject { IBOutlet NSTableView *theList; } - (int)numberOfRowsInTableView:(NSTableView *)aTableView; - (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn*) aTableColumn row:(int)rowIndex; - (void)tableView:(NSTableView*)aTableView setObjectValue:(id)anObject forTableColumn:(NSTableColumn*)aTableColumn row:(int)rowIndex; - (IBAction)newVariable:(id)sender; - (IBAction)delVariable:(id)sender; - (IBAction)clearVariables:(id)sender; - (IBAction)copyMe:(id)sender; @end wcalc-2.4/VariableList.m0000644000175000000620000000710210650213661013474 0ustar kkstaff#include "variables.h" #include "calculator.h" #include "string_manip.h" #include "VariableList.h" #include "number.h" #ifdef MEMWATCH #include "memwatch.h" #endif @implementation VariableList // needs to be REALLY fast - (int)numberOfRowsInTableView:(NSTableView *)aTableView { return numvars(); } // needs to be fast - (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn*)col row:(int)rowIndex { struct variable *keyval; static struct variable *keyval_cache = NULL; static int rowIndex_cache = -1; if (rowIndex == rowIndex_cache) { rowIndex_cache = -1; keyval = keyval_cache; } else { rowIndex_cache = rowIndex; keyval = keyval_cache = getrealnvar(rowIndex); } if (! keyval) return @"BAD ROW (VariableList)"; if ([[col identifier] isEqualToString:@"value"]) { if (keyval->exp) return [NSString stringWithUTF8String:keyval->expression]; else return [NSString stringWithUTF8String:print_this_result(keyval->value)]; } else if ([[col identifier] isEqualToString:@"variable"]) { return [NSString stringWithUTF8String:(keyval->key)]; } else { return @"BAD COLUMN"; } } - (void)tableView:(NSTableView*)aTableView setObjectValue:(id)anObject forTableColumn:(NSTableColumn*)col row:(int)rowIndex { struct variable *theval = getrealnvar(rowIndex); NSString *ch = [col identifier]; // printf("Column %s, Row %i was %s,%s becomes %s\n", [ch UTF8String], rowIndex, theval->key, theval->value, [anObject UTF8String]); if ([ch isEqualToString:@"value"]) { char * input=strdup([anObject UTF8String]); if (justnumbers(input)) { Number la; num_init_set(la, last_answer); parseme(input); num_set(theval->value, last_answer); theval->exp = 0; num_set(last_answer, la); num_free(la); } else { theval->expression = input; theval->exp = 1; } } else if ([ch isEqualToString:@"variable"]) { free(theval->key); theval->key = strdup([anObject UTF8String]); strstrip(' ',theval->key); } } - (IBAction)newVariable:(id)sender { char varname[20]; int i=1; Number blank; num_init_set_ui(blank,0); sprintf(varname,"NewVariable%i",i); while(varexists(varname)) { ++i; sprintf(varname,"NewVariable%i",i); } putval(varname,blank,NULL); [theList reloadData]; } - (IBAction)delVariable:(id)sender { if ([theList selectedRow] > -1) { delnvar([theList selectedRow]); [theList reloadData]; } } - (IBAction)clearVariables:(id)sender { int i, total=numvars(); for (i=0; ikey, keyval->exp?keyval->expression:print_this_result(keyval->value)]; } } while ((theIndex = [rowEnumerator indexGreaterThanIndex:theIndex]) != NSNotFound); [pboard setString:theString forType:NSStringPboardType]; } // ** Make sure we don't enable the copy menu item unless there is something to copy. - (BOOL)validateMenuItem:(id )menuItem { if ([menuItem tag]==666) { return ([theList numberOfSelectedRows]>0); } return YES; } @end wcalc-2.4/variables.c0000644000175000000620000001622710647156133013067 0ustar kkstaff#ifdef HAVE_CONFIG_H #include "config.h" #endif #include #if HAVE_STRING_H || !defined(HAVE_CONFIG_H) # include #endif #include "number.h" #include "calculator.h" /* for report_error */ #include "list.h" #include "variables.h" #ifdef MEMWATCH #include "memwatch.h" #endif #define THE_VALUE 0 #define THE_STRUCTURE 2 #define THE_EXPRESSION 4 #define HASH_LENGTH = 101 List them = NULL; /* Hidden, internal functions */ static void *getvar_core(const char *key, const int all_or_nothing); void initvar(void) { /*{{{ */ } /*}}} */ /* This function deletes all the variables and frees all the memory. */ void cleanupvar(void) { /*{{{ */ struct variable *freeme; while ((freeme = (struct variable *)getHeadOfList(them)) != NULL) { free(freeme->key); if (freeme->exp == 1) { free(freeme->expression); } else { num_free(freeme->value); } if (freeme->description) { free(freeme->description); } free(freeme); } } /*}}} */ /* Returns the number of variables */ size_t numvars() { /*{{{ */ return listLen(them); } /*}}} */ /* prints out all the variables */ void printvariables(void) {/*{{{*/ ListIterator li = NULL; struct variable *cursor = NULL; if (!them || listLen(them) == 0) return; li = getListIterator(them); while ((cursor = (struct variable *)nextListElement(li)) != NULL) { printf("%s = ", cursor->key); if (cursor->exp) { printf("%s\n", cursor->expression); } else { printf("%g\n", num_get_d(cursor->value)); } } freeListIterator(li); }/*}}}*/ /* returns a list of variables (only the base array is malloc'd, the rest must * NOT be freed */ char **listvarnames(void) {/*{{{*/ size_t i; char **ret = calloc(listLen(them) + 1, sizeof(char *)); ListIterator li = NULL; struct variable *cursor = NULL; if (!them || listLen(them) == 0) return ret; li = getListIterator(them); i = 0; while ((cursor = (struct variable *)nextListElement(li)) != NULL) { ret[i++] = cursor->key; } freeListIterator(li); return ret; /*}}}*/} void delnvar(const size_t i) { /*{{{ */ struct variable *freeme; freeme = (struct variable *)getListElement(them, i); if (freeme) { free(freeme->key); if (freeme->exp == 1) { free(freeme->expression); } else { num_free(freeme->value); } free(freeme); } } /*}}} */ struct variable *getrealnvar(const size_t i) { /*{{{ */ return (struct variable *)peekListElement(them, i); } /*}}} */ struct answer getvar(const char *key) { /*{{{ */ struct answer ans; Number *t = getvar_core(key, THE_VALUE); if (t) { num_init_set(ans.val, *t); ans.err = 0; ans.exp = NULL; } else { /* it's an error. * if you access ans.val, you deserve what you get */ ans.exp = NULL; ans.err = 1; } return ans; } /*}}} */ void getvarval(Number out, const char *key) { /*{{{ */ Number *t = getvar_core(key, THE_VALUE); if (t) { num_set(out, *t); } } /*}}} */ struct answer getvar_full(const char *key) { /*{{{ */ struct answer ans; struct variable *var; var = getvar_core(key, THE_STRUCTURE); if (var && !var->exp) { num_init_set(ans.val, var->value); ans.err = 0; ans.exp = NULL; ans.desc = var->description; } else if (var && var->exp) { ans.exp = var->expression; ans.desc = var->description; ans.err = 0; } else { ans.exp = NULL; ans.err = 1; } return ans; } /*}}} */ /* This function returns 1 if a variable by that key has already been created * and returns 0 if a variable by that key has not been created yet */ int varexists(const char *key) { /*{{{ */ struct variable *cursor = NULL; ListIterator li = NULL; if (!them || !strlen(key) || listLen(them) == 0) return 0; li = getListIterator(them); while ((cursor = (struct variable *)nextListElement(li)) != NULL) { if (!strncmp(cursor->key, key, strlen(cursor->key) + 1)) break; else cursor = NULL; } freeListIterator(li); return cursor ? 1 : 0; } /*}}} */ static void *getvar_core(const char *key, const int all_or_nothing) { /*{{{ */ struct variable *cursor = NULL; ListIterator li = NULL; if (!them || key == NULL || *key == 0 || listLen(them) == 0) { return NULL; } li = getListIterator(them); while ((cursor = (struct variable *)nextListElement(li)) != NULL) { if (!strncmp(cursor->key, key, strlen(cursor->key) + 1)) break; else cursor = NULL; } freeListIterator(li); if (cursor) { switch (all_or_nothing) { case THE_VALUE: if (cursor->exp) { return NULL; } else { return &(cursor->value); } case THE_STRUCTURE: return cursor; case THE_EXPRESSION: return cursor->expression; } } return NULL; } /*}}} */ /* this adds the key-expression pair to the list. * if the key already exists, change the value to this */ int putexp(const char *key, const char *value, const char *desc) { /*{{{ */ struct variable *cursor = NULL; if (*key == 0) return -1; cursor = getvar_core(key, THE_STRUCTURE); if (!cursor) { // variable named "key" doesn't exist yet, so allocate memory cursor = calloc(sizeof(struct variable), 1); addToList(&them, cursor); } // by this point, we have a variable (cursor) in the list (them) if (cursor->key) { if (cursor->expression) { free(cursor->expression); } else { num_free(cursor->value); } if (cursor->description) { free(cursor->description); } } else { cursor->key = (char *)strdup(key); } // by this point, the cursor has been prepared to accept the exp/desc cursor->expression = (char *)strdup(value); if (desc != NULL) { cursor->description = (char *)strdup(desc); } else { cursor->description = NULL; } cursor->exp = 1; return 0; } /*}}} */ /* this adds the key-value pair to the list. * if the key already exists, change the value to this */ int putval(const char *key, const Number value, const char *desc) { /*{{{ */ struct variable *cursor = NULL; if (key == NULL || *key == 0) { return -1; } cursor = getvar_core(key, THE_STRUCTURE); if (!cursor) { // variable named "key" doesn't exist yet, so allocate memory cursor = calloc(1, sizeof(struct variable)); addToList(&them, cursor); } // by this point, we have a variable (cursor) in the list (them) // but key may not exist, and value may not be properly initialized if (!cursor->key) { cursor->key = (char *)strdup(key); num_init(cursor->value); } else if (cursor->expression) { free(cursor->expression); cursor->expression = NULL; num_init(cursor->value); } if (cursor->description) { free(cursor->description); } cursor->exp = 0; // by this point, the variable has a key, and an initialized value, // and is ready to receive the correct value/desc if (desc != NULL) { cursor->description = (char *)strdup(desc); } else { cursor->description = NULL; } num_set(cursor->value, value); return 0; } /*}}} */ wcalc-2.4/variables.h0000644000175000000620000000317710647156043013074 0ustar kkstaff#ifndef KBW_VARIABLES #define KBW_VARIABLES #ifdef HAVE_CONFIG_H #include "config.h" #endif #if HAVE_STRING_H # include #else # if !HAVE_STRCHR # define strchr index # define strrchr rindex # endif char *strchr(), *strrchr(); #endif #include #include #include "number.h" struct variable { char *key; char *expression; char *description; Number value; unsigned int exp:1; struct variable *next; }; struct answer { Number val; char *exp; char *desc; unsigned int err:1; }; // requires a working Number void getvarval(Number out, const char *key); // requires a working Number int putval(const char *key, const Number value, const char *desc); int putexp(const char *key, const char *value, const char *desc); int varexists(const char *key); void initvar(void); void delnvar(const size_t n); void cleanupvar(void); size_t numvars(); void printvariables(void); // this returns a char ** that must be freed. DO NOT free its contents char ** listvarnames(void); /* ****************************** * NOTE! * If you use these functions, they return * fully functioning Number structures that must be * num_free()'d when you're done with 'em. */ /* getvar returns only the value, or an error if it doesn't have one */ struct answer getvar(const char *key); /* getvar returns whatever is known about the variable, or an error if * it doesn't exist */ struct answer getvar_full(const char *key); /* THIS function, however, exposes the innards of the variable system. * do not under any circumstance un-initialize the Number */ struct variable *getrealnvar(const size_t n); #endif wcalc-2.4/._w.png0000644000175000000620000000012210370300715012115 0ustar kkstaffMac OS X  2 RPNGf8BIMwcalc-2.4/w.png0000644000175000000620000000534010370300715011707 0ustar kkstaffPNG  IHDRrdgAMAOX2tEXtSoftwareAdobe ImageReadyqe< rIDATxb?( F @DP|a4$P@,? R4O@J9 FrHF4@hN !q@ 84e( DLq+ @% 0q  DFp~ƕ[b[qC10 K9bKnx/ H)2[;`~ 4q0,0PHH3x (| /fbx "ҡF?q5 (ibmP PiZ@1A#X;|8{@C@Ii7X=.bBb$>v' ڗ$$0)Ӈc7Ą?IN)a0L@TmbQD0"aydž!08'fx(m `C0;1XKJ@v+>@s r Hƺ p ì5)(Z@@Q;p_'.g7 hQ_* Bl Q@L ud(;BvM<7̌D\3[Ti)1@J7@p`)`%@* ``Q g; T~"]$~ܠH:b"2@8 m6@$ -g<#(Z ъ誀/qED%b" &.id@~'@Ѣ9؆M/J)n Rs%a@A zJt HmH b`/YAt HLyI Z֛4HЄ@1? RQ.U H@f }K [&j @2 `yz`-[qc g@r? &2BL:xztUa @QH2 Z4ޱE/'!g|C((9K=@QHY؀d#5h7dw_, q [@uDqz%*PHUPה@hi?`|CTHd |Ql 1:5Gpt_Dn` }@5̥ ?M$j́N6*hj@ܕDf .L2ޤBy&7a`['0Po^R^%@V@@Fgnh]-V 4()@@L4b# A@| J\P£*E &jc 4W up? -)-YR۞J р' ZuH3ї-qcC1@(>F2)?q`#{<@B •CXvɭ h0oZ@m(~10~mxsDkDJÉj> O>!I h`D>ä>Ы z Y(2~KH'LA TUi 4غ. @n!ekCS)K020+h0 8Y|B D*4Y@@LtLԃ]Kl D@gxp 4@D\1aq`1B=$ [7؆ ^E M 4(4T) R? n &:jr<1xJ2B'Ӵ@u,`E&KR$er@r2"Jr"4Hm_Do4q(Hm[0PH-@ 4J D0%)<&nBzhܓ@dW Nȸ8HDlql)SJ: @,pq\Xaeh4ߞJf}0h@n]Z0G@0Tpu`~#n )P! 4 ,@Lpzn#f `H @#JôZ<@ 4lm@ taЦ@_@OG 8rZJ]Gףi!Pvh('V  L?l@ Q @&%0@1 @*H%B4X9E -6YE ba(0 QMl9ǯ  @1 0\Jޡp @C 䤜#a'~hu@ ) ApC$۫y0kh%,h`K`0i4AU@L0 'j)éQ;(3@ nP-Dh 60zkȽž ;Z @!`|s,IENDB`wcalc-2.4/wcalc.10000644000175000000620000005672411101151024012110 0ustar kkstaff.de Id .ds Dt \\$4 .. .ds = \-\^\- .de Sp .. .TH wcalc 1 .SH NAME wcalc \- a natural-expression command-line calculator .SH SYNOPSIS .B wcalc [ \fIoptions\fR ] [ \fIexpression ...\fR ] .SH DESCRIPTION wcalc is a command-line calculator designed to accept all valid mathematical expressions. It supports all standard mathematical operations, parenthesis, brackets, trigonometric functions, hyperbolic trig functions, logs, and boolean operators. .PP wcalc accepts input in a variety of manners. I it will evaluate If no mathematical expression is given at the commandline, it will evaluate the contents of an environment variable named \fIwcalc_input\fP if one exists. If that variable is not set, wcalc will try to read input from standard input (i.e. piped input). If there is no input from that, wcalc enters "interactive" mode. Interactive mode has more features. .PP Within wcalc, detailed information about commands, functions, symbols, and variables can be obtained by executing: \fB\eexplain\fP \fIthing-to-explain\fP .SS OPTIONS .TP 4 \fB\-H\fP or \fB\*=help\fP Prints a help usage message to standard output, then exits. .TP \fB\-E\fP Specifies that numerical output should be in scientific notation. .TP \fB\-EE\fP Specifies that numerical output should NOT be in scientific notation. .TP \fB\-P\fIXXX\fP Sets the precision to be \fIXXX\fP. This setting only affects output, not internal representations. A setting of -1 means formats output in whatever precision seems appropriate. .br Precision is set to autoadjust (-1) by default. .br Example: wcalc -P6 .TP \fB\-v\fP or \fB\*=version\fP Prints the version number and exits. .TP \fB\-d\fP or \fB\-dec\fP or \fB\*=decimal\fP Results are printed in decimal (base 10). This option is the default, and does not have a default prefix to indicate that numbers are in base 10. .TP \fB\-h\fP or \fB\-hex\fP or \fB\*=hexadecimal\fP Results are printed in hexadecimal (base 16). Numbers printed in hexadecimal have a prefix of \fI0x\fP unless the \fB\-p\fP or \fB\*=prefixes\fP option is used. .TP \fB\-o\fP or \fB\-oct\fP or \fB\*=octal\fP Results are printed in octal (base 8). Numbers printed in octal have a prefix of \fI0\fP unless the \fB\-p\fP or \fB\*=prefixes\fP option is used. .TP \fB\-b\fP or \fB\-bin\fP or \fB\*=binary\fP Results are printed in binary (base 2). Numbers printed in binary have a prefix of \fI0b\fP unless the \fB\-p\fP or \fB\*=prefixes\fP option is used. .TP \fB\-p\fP or \fB\*=prefixes\fP Toggles printing prefixes for hexadecimal, octal, and binary forms. .TP \fB\-l\fP or \fB\*=lenient\fP Makes the parser assume that uninitialized variables have a value of zero. .TP \fB\-r\fP or \fB\*=radians\fP Toggles whether trigonometric functions assume input (and output) is in radians. By default, trigonometric functions assume input is in degrees. .TP \fB\-q\fP or \fB\*=quiet\fP Toggles whether the equals sign will be printed before the results. .TP \fB\-c\fP or \fB\*=conservative\fP Toggles precision guards. Because of the way floating point numbers are stored, some operations, like 1-.9-.1, can return an extremely small number that is not zero but is less than the official precision of the floating point number and thus for all intents and purposes, it is 0. The precision guard will round numbers to zero if they are less than the official precision of the floating point number. However, sometimes numbers that small or smaller need to be displayed, and thus the precision guard should be turned off. .TP \fB\*=remember\fP Toggles whether or not expressions that produce errors are remembered in the history. Does not affect command-line math. .TP \fB\*=round=\fP { \fInone\fP | \fIsimple\fP | \fIsig_fig\fP } Wcalc can attempt to warn you when numbers have been rounded in the output display. It has two methods of keeping track---either by using significant figures (sig_fig), or by a simple digit-counting algorithm. Rounding in the command-line version is denoted by a tilde before the equals sign (~=). Rounding in the GUI version is denoted by changing the text color to red. In some cases, Wcalc may think that the number has been rounded even if it shouldn't have been necessary (this is because of the way floating point numbers are represented internally). .TP \fB\*=dsep=\fIX\fP Sets the decimal separator character to be X. .TP \fB\*=tsep=\fIX\fP Sets the thousands separator character to be X. .TP \fB\*=idsep=\fIX\fP Sets the input-only decimal separator character to be X. .TP \fB\*=itsep=\fIX\fP Sets the input-only thousands separator character to be X. .TP \fB\*=bits\fIXXXX\fP Sets the number of bits of precision that will be used to internally represent numbers to be \fIXXXX\fP. The default is 1024. Set higher if you need more precision, set lower if you want to use less memory. .TP \fB\*=ints\fP Toggles whether long integers will be abbreviated or not. This conflicts with engineering notation for large numbers, but not for decimals. .SH USER-DEFINED VARIABLES Variables are supported and may be assigned using the = operator. To assign a variable use the form: .RS .PP foo = anylegalexpression .RE .PP Thereafter, that variable name is the same as the literal value it represents. Expressions can be stored in variables like this: .RS .PP foo = 'anylegalexpression' .RE .PP Expressions stored this way will be interpreted at evaluation time, rather than assignment-time. Note that these cannot be recursive. .PP All variables may also be stored with a description of what they are. This description is added in the form of a quoted string after the assignment, like this: .RS .PP foo = 'anylegalexpression' 'description' .RE .SS ACTIVE VARIABLES Active variables are designed to give a functionality similar to user-defined functions. They are variables that rather than representing a value, represent an expression that is evaluated whenever the variable is evaluated. This expression may contain other variable names. For example, after the following sequence of commands: .RS .PP foo=5 .br bar='foo+4' .RE .PP The variable \fIbar\fP will evaluate to 9, or four more than whatever \fIfoo\fP evaluates to be. These can be stacked, like so: .RS .PP baz='sin(bar)+foo' .RE .PP In this case, \fIbaz\fP will evaluate to be 5.15643, or the sin of whatever \fIfoo\fP+4 is plus whatever \fIfoo\fP is. .PP To demonstrate the utility of these active variables, here are two functions written by Stephen M. Lawson. The first computes the weekday of a given day (\fIdy\fP) in a given month (\fImo\fP) in a given year (\fIyr\fP). The value it returns is in the range of 1 to 7, where 1 is Sunday, 2 is Monday, 3 is Tuesday, and so forth. .PP weekday='(((floor((yr - floor(0.6 + 1 / mo)) / 400) - floor((yr - floor(0.6 + 1 / mo)) / 100) + floor((5 * (yr - floor(0.6 + 1 / mo))) / 4) + floor(13 * (mo + 12 * floor(0.6 + 1 / mo) + 1) / 5)) - (7 * floor((floor((yr - floor(0.6 + 1 / mo)) / 400) - floor((yr - floor(0.6 + 1 / mo)) / 100) + floor((5 * (yr - floor(0.6 + 1 / mo))) / 4) + floor(13 * (mo + 12 * floor(0.6 + 1 / mo) + 1) / 5)) / 7)) + 1) + 5 + dy) % 7 + 1' .PP The second function computes what day Easter will be for a given year (\fIyr\fP) and returns an offset from March 31st. For example, for the year 2005, it returns -4, which means March 27th. Because of leap-year problems, this only works from the year 1900 to 2099, but is a good demonstration nevertheless. .PP easter='((19 * (yr - 19 * floor(yr / 19)) + 24) - floor((19 * (yr - 19 * floor(yr / 19)) + 24) / 30) * 30) + ((2 * (yr - 4 * floor(yr / 4)) + 4 * (yr - 7 * floor(yr / 7)) + 6 * ((19 * (yr - 19 * floor(yr / 19)) + 24) - floor((19 * (yr - 19 * floor(yr / 19)) + 24) / 30) * 30) + 5) - floor((2 * (yr - 4 * floor(yr / 4)) + 4 * (yr - 7 * floor(yr / 7)) + 6 * ((19 * (yr - 19 * floor(yr / 19)) + 24) - floor((19 * (yr - 19 * floor(yr / 19)) + 24) / 30) * 30) + 5) / 7) * 7) - 9' .SH BUILT-IN SYMBOLS There are two basic kinds of built-in symbols in wcalc: functions and constants. .SS FUNCTIONS The functions supported in wcalc are almost all self-explanatory. Here are the basic descriptions. .TP 4 .B "sin cos tan cot" The standard trigonometric functions .TP \fBasin acos atan acot\fP or \fBarcsin arccos arctan arccot\fP or \fBsin^-1 cos^-1 tan^-1 cot^-1\fP The standard arc- trigonometric functions. .TP .B "sinh cosh tanh coth" The standard hyperbolic trigonometric functions. .TP \fBasinh acosh atanh acoth\fP or \fBarcsinh arccosh arctanh arccoth\fP or \fBsinh^-1 cosh^-1 tanh^-1 coth^-1\fP The standard arc- hyperbolic trigonometric functions. .TP .B "log ln logtwo" Log-base-ten, log-base-e and log-base-two, respectively. Remember, you can also construct log-base-X of number Y by computing log(Y)/log(X). .TP .B "round" Returns the integral value nearest to the argument according to the typical rounding rules. .TP .B "abs" Returns the absolute value of the argument. .TP .B "ceil ceiling floor" Returns the ceiling or floor of the argument. .TP .B "sqrt cbrt" The square and cube root functions. .TP .B "rand" Returns a random number between 0 and the number given. .TP .B "irand" Returns a random integer between 0 and the number given. .TP .B "fact" Returns the factorial of a number. .TP .B "Gamma" Returns the value of the Gamma function at that value. .TP .B "lnGamma" Returns the value of the log Gamma function at that value. .TP .B "zeta" Returns the value of the Riemann zeta function at that value. .TP .B "sinc" Returns the sinc function (for sinus cardinalis) of the input, also known as the interpolation function, filtering function or the first spherical Bessel function, is the product of a sine function and a monotonically decreasing function. .SS CONSTANTS Wcalc supports a lot of constants. Some are special (like \fBpi\fP), and some are simply mathematical or physical constants that have been hardcoded in. The physics constants are taken from \fIhttp://physics.nist.gov/constants\fP, and should all be in predictable SI units. .PP The value of \fBpi\fP is special, as it is calculated to however many bits of precision have been specified with the \fB\ebits\fP command. The default number of bits is 1024, or a value of: .br 3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245869974724822361502823407955151120558811684656967313093357387193011055974127397801166600823447367841524950037348489795545416453901986117572722731871388422643588974212021713194956805142308399313566247553371620129340026051601856684677033122428187855479365508702723110143458240736806341798963338923286460351089772720817919599675133363110147505797173662675795471777702814318804385560929672479177350549251018537674006123614790110383192502897923367993783619310166679013187969315172579438604030363957033826325935372151289640167976948453904619615481368332936937026831888367580239969088932697527811653282224950410336573385944190516446146423694037380609059088222036945727944116946240616684848934170304346480406820774078369140625 .PP Similarly, all values that rely on the value of \fBpi\fP, like mu0, have the same level of precision. Here is a complete list of the symbols used to represent the constants hardcoded into wcalc: .TP 4 .B "e" The logarithm constant: .br 2.718281828459045235360287471352662497757247093699959574966 .TP .B "gamma" Euler's Constant: 0.57721566490153286060651209008240243104215933593992359880576723488486772677766467093694706329174674951463144724980708248096050401448654283622417399764492353625350033374293733773767394279259525824709491600873520394816567 .TP .B K Catalan Constant: 0.91596559417721901505460351493238411077414937428167213426649811962176301977625476947935651292611510624857442261919619957903589880332585905943159473748115840699533202877331946051903872747816408786590902 .TP .B "g" Acceleration due to gravity: 9.80665 m/s/s .TP .B Cc Coulomb's Constant: 8987551787.37 .SS Universal Constants .TP 4 \fBZ0\fP or \fBZzero\fP Impedance of Vacuum: 376.730313461 ohms .TP \fBepsilon0\fP or \fBepsilonzero\fP Permittivity of Free Space: 8.854187817e-12 F/m .TP \fBmu0\fP or \fBmuzero\fP Permeability of Free Space calculated as 4*pi*10^-7. .TP .B "G" Gravitational Constant: 6.67259e-11 .TP .B "h" Planck Constant: 6.6260755e-34 .TP .B "c" Speed of Light: 299792458 .SS Electromagnetic Constants .TP 4 .B "muB" Bohr Magneton: 5.78838174943e-11 J/T .TP .B "muN" Nuclear Magneton: 3.15245123824e-14 J/T .TP .B "G0" Conductance Quantum: 7.748091733e-5 S .TP .B "ec" Elementary Charge: 1.60217653e-19 .TP .B Kj Josephson Constant: 483597.879e9 Hz/V .TP .B Rk Von Klitzing Constant: 25812.807449 omega .SS Atomic and Nuclear Constants .TP 4 .B Malpha Alpha Particle Mass: 6.6446565e-27 kg .TP .B "a0" Bohr Radius: 5.291772108e-11 m .TP .B "Md" Deuteron Mass: 3.34358335e-27 kg .TP .B "Me" Electron Mass: 9.1093897e-31 kg .TP .B "re" Electron Radius: 2.817940325e-15 m .TP .B "eV" Electron Volt: 1.602177250e-12 J .TP .B Gf Fermi Coupling Constant: 1.16638e-5 GeV^-2 .TP .B "alpha" Fine Structure Constant: 7.29735253327e-3 .TP .B eh Hartree Energy: 4.35974417e-18 J .TP .B Mh Helion Mass: 5.00641214e-27 kg .TP .B Mmu Muon Mass: 1.88353140e-28 kg .TP .B "Mn" Neutron Mass: 1.67492728e-27 kg .TP .B "Mp" Proton Mass: 1.67262171e-27 kg .TP .B Rinf Rydberg Constant: 10973731.568525 1/m .TP .B Mt Tau Mass: 3.16777e-27 kg .SS Physio-Chemical Constants .TP 4 .B "u" Atomic Mass Constant: 1.66053886e-27 kg .TP \fBNa\fP or \fBNA\fP Avogadro's Constant: 6.0221367e23 .TP .B "k" Boltzmann Constant: 1.3806505e-23 .TP .B "F" Faraday Constant: 96485.3383 C/mol .TP .B c1 First Radiation Constant: 3.74177138e-16 W m^2 .TP \fBn0\fP or \fBnzero\fP Loschmidt Constant: 2.6867773e25 m^-3 .TP .B "R" Molar Gas Constant: 8.314472 .TP \fBVm\fP or \fBNAk\fP Molar Volume of Ideal Gas: 22.413996e-3 (m^3)/mol .TP .B c2 Second Radiation Constant: 1.4387752e-2 m K .TP .B "sigma" Stefan-Boltzmann Constant: 5.670400e-8 .TP .B "b" Wien Displacement Law Constant: 2.8977686e-3 m K .SS Random Constants .TP 4 .B "random" A Random Value .TP .B "irandom" A Random Integer .SH COMMANDS There are several commands that are supported in wcalc. .TP \fB\ep\fIXXX\fP Sets the precision to \fIXXX\fP. This setting only affects output, not internal representations. A setting of -1 means formats output in whatever precision seems appropriate. .TP \fB\ee\fP or \fB\eeng\fP or \fB\eengineering\fP Rotates between always using scientific notation, never using scientific notation, and choosing to do scientific notation when convenient. Can also take an argument that is one of \fIalways\fP, \fInever\fP, and \fIautomatic\fP to choose a mode directly. .TP \fB\ehelp\fP or \fB?\fP Displays a help screen. .TP .B "\eprefs" Prints out the current preference settings. .TP \fB\eli\fP or \fB\elist\fP or \fB\elistvars\fP Prints out the currently defined variables. .TP \fB\er\fP or \fB\eradians\fP Toggles between using and not using radians for trigonometric calculations. .TP \fB\econs\fP or \fB\econservative\fP Toggles precision guards. Because of the way floating point numbers are stored, some operations, like 1-.9-.1, can return an extremely small number that is not zero but is less than the official precision of the floating point number and thus for all intents and purposes, it is 0. The precision guard will round numbers to zero if they are less than the official precision of the floating point number. However, sometimes numbers that small or smaller need to be displayed, and thus the precision guard should be turned off. .TP \fB\ep\fP or \fB\epicky\fP or \fB\el\fP or \fB\elenient\fP Toggles variable parsing rules. When wcalc is "picky" it will complain if you use undefined variables. If it is "lenient", wcalc will assume a value of 0 for undefined variables. .TP \fB\ere\fP or \fB\eremember\fP or \fB\eremember_errors\fP Toggles whether or not expressions that produce errors are remembered in the history. .TP \fB\epre\fP or \fB\eprefix\fP or \fB\eprefixes\fP Toggles the display of prefixes for hexadecimal, octal, and binary output. .TP \fB\eb\fP or \fB\ebin\fP or \fB\ebinary\fP Results are printed in binary (base 2). Numbers printed in binary have a prefix of \fI0b\fP unless the \fB\eprefixes\fP command is used. .TP \fB\ed\fP or \fB\edec\fP or \fB\edecimal\fP Results are printed in decimal (base 10). This option is the default, and does not have a default prefix to indicate that numbers are in base 10. .TP \fB\eh\fP or \fB\ex\fP or \fB\ehex\fP or \fB\ehexadecimal\fP Results are printed in hexadecimal (base 16). Numbers printed in hexadecimal have a prefix of \fI0x\fP unless the \fB\eprefixes\fP command is used. .TP \fB\eo\fP or \fB\eoct\fP or \fB\eoctal\fP Results are printed in octal (base 8). Numbers printed in octal have a prefix of \fI0\fP unless the \fB\eprefixes\fP command is used. .TP \fB\eround\fP \fInone\fP|\fIsimple\fP|\fIsig_fig\fP Wcalc can attempt to warn you when numbers have been rounded in the output display. It has two methods of keeping track---either by using significant figures (sig_fig), or by a simple digit-counting algorithm. Rounding in the command-line version is denoted by a tilde before the equals sign (~=). Rounding in the GUI version is denoted by changing the text color to red. In some cases, Wcalc may think that the number has been rounded even if it shouldn't have been necessary (this is because of the way floating point numbers are represented internally). .TP \fB\edsep\fIX\fP Sets the decimal separator character to be \fIX\fP. .TP \fB\etsep\fIX\fP Sets the thousands-place separator character to be \fIX\fP. .TP \fB\eidsep\fIX\fP Sets the input-only decimal separator character to be \fIX\fP. .TP \fB\eitsep\fIX\fP Sets the input-only thousands-place separator character to be \fIX\fP. .TP \fB\ehlimit\fIX\fP Sets the limit (\fIX\fP) on the length of the history. .TP \fB\eopen\fIXXXXX\fP Loads file \fIXXXXX\fP. .TP \fB\esave\fIXXXXX\fP Saves the history and variable list to a file, \fIXXXXX\fP. .TP \fB\ebits\fIXXXX\fP Sets the number of bits of precision that will be used to internally represent numbers to be \fIXXXX\fP. The default is 1024. Set higher if you need more precision, set lower if you want to use less memory. .TP .B \eints Toggles whether long integers will be abbreviated or not. This conflicts with engineering notation for large numbers, but not for decimals. .TP \fB\eprefs\fP or \fB\epreferences\fP Displays the current preference settings. .TP \fB\econvert\fP \fIunit1\fP \fIunit1\fP Converts the previous answer from \fIunit1\fP to \fIunit2\fP. .TP \fB\estore\fP \fIvariablename\fP Saves the specified variable in the preload file, ~/.wcalc_preload .TP \fB\eexplain\fP \fIobject\fP Explains the specified object. The object can be a variable, constant, function, or command. .TP \fB\everbose\fP Verbose mode displays the expression to be calculated before calculating it. .TP \fB\edel\fP or \fB\edelim\fP or \fB\edelimiters\fP Display delimiters in numerical output. .TP \fB\ecmod\fP Toggle between C-style modulus operation and a more flexible method. .SH PREFERENCES Preferences and settings can be retained between invocations of wcalc by storing them in the file \fB~/.wcalcrc\fP .PP The format of the file is that each line is either blank or an assignment. Comments are ignored, and are defined as anything to the right of and including a hash mark (#). Assignments are of the form: \fIkey=value\fP .PP The possible keys are: .TP .B precision A number defining the display precision. Equivalent to the \fB\eP\fP command, where -1 means "auto" and anything else specifies the number of decimal places. This does not affect the behind-the-scenes precision. .TP .B show_equals Either true ("yes" or "true") or false (anything else). Equivalent to the \fB--quiet\fP argument. Specifies whether answers will begin with an equals sign or not. .TP .B engineering Either "always", "never", or "automatic". Equivalent to the \fB\eengineering\fP command. Specifies whether answers will be displayed in engineering notation or not. .TP .B use_radians Either true ("yes" or "true") or false (anything else). Equivalent to the \fB\eradians\fP command. Specifies whether trigonometric functions accept input in radians or degrees. .TP .B print_prefixes Either true ("yes" or "true") or false (anything else). Equivalent to the \fB\eprefixes\fP command. Specifies whether base prefixes (e.g. 0x for hexadecimal numbers) are used when displaying output. .TP .B save_errors Either true ("yes" or "true") or false (anything else). Equivalent to the \fB\eremember_errors\fP command. Specifies whether lines that contain a syntax error are added to the history or not. .TP .B precision_guard Either true ("yes" or "true") or false (anything else). Equivalent to the \fB\econservative\fP command. Specifies whether the display will attempt to eliminate numbers too small to be accurate (hopefully, these are only errors created by the binary approximation of the inputs). .TP .B print_integers Either true ("yes" or "true") or false (anything else). Equivalent to the \fB\eints\fP command. Specifies whether whole integers will be printed un-abbreviated or not. This conflicts with engineering notation for large integers, but not for decimals. .TP .B print_delimiters Either true ("yes" or "true") or false (anything else). Equivalent to the \fB\edelimiters\fP command. Specifies whether delimiters will be added to output when displaying. .TP .B thousands_delimiter Uses the next character after the equals sign as its value. Equivalent to the \fB\etsep\fP command. Specifies what the thousands delimiter is, and can affect output if \fBprint_delimiters\fP is enabled. .TP .B decimal_delimiter Uses the next character after the equals sign as its value. Equivalent to the \fB\edsep\fP command. Specifies what the decimal delimiter is. .TP .B input_thousands_delimiter Uses the next character after the equals sign as its value. Equivalent to the \fB\eitsep\fP command. Specifies what the input-only thousands delimiter is, and cannot affect output. .TP .B input_decimal_delimiter Uses the next character after the equals sign as its value. Equivalent to the \fB\eidsep\fP command. Specifies what the input-only decimal delimiter is, and cannot affect output. .TP .B history_limit Either "no", for no limit, or a number. Equivalent to the \fB\ehlimit\fP command. .TP .B output_format Either \fIdecimal\fP, \fIoctal\fP, \fIbinary\fP, \fIhex\fP, or \fIhexadecimal\fP. .TP .B rounding_indication Either \fIno\fP, \fIsimple\fP, or \fIsig_fig\fP. Equivalent to the \fB\erounding\fP command. .TP .B c_style_mod Either true ("yes" or "true") or false (anything else). Equivalent to the \fB\ecmod\fP command. Specifies whether the modulo operator (%) will behave as it does in the C programming language, or whether it will use a more flexible method. This only affects modulo operations where negative numbers are involved. As an example, with \fBc_style_mod\fP set to true (the default): .RS .PP -340 % 60 == -40; 340 % -60 == 40; -340 % -60 == -40 .PP However, with \fBc_style_mod\fP set to false: .PP -340 % 60 == -40; 340 % -60 == -20; -340 % -60 == 20 .RE .SH PRELOAD Wcalc uses a file, \fB~/.wcalc_preload\fP, to store persistent information between instances. Typically, this is used to store variables that are frequently defined. This file can be edited by hand with a standard text editor. There is also a command within wcalc (\fB\estore\fP) to append a variable definition to the end of this file. Any variable defined in this file is defined and available for use in any subsequent invocation of wcalc. .SH COPYRIGHT wcalc is Copyright (C) 2000-2007 Kyle Wheeler. .br It is distributed under the GPL, version 2, or (at your option) any later version.. .SH SUGGESTIONS AND BUG REPORTS Any bugs found should be reported to .br Kyle Wheeler at \fIkyle-wcalc@memoryhole.net\fP. wcalc-2.4/wcalc.info0000644000175000000620000000211710340110206012667 0ustar kkstaffPackage: wcalc Version: 2.1 Revision: 1 Maintainer: Kyle Wheeler Source: mirror:sourceforge:w-calc/Wcalc-%v.tar.bz2 Source-MD5: 56f5235a576c46b09a50ec6cd42bb82c DocFiles: AUTHORS COPYING COPYRIGHT INSTALL NEWS ReadMe.rtf wcalc.rc ConfigureParams: --mandir=%i/share/man/ Depends: readline-shlibs,gmp-shlibs,libmpfr1-shlibs BuildDepends: readline,gmp,libmpfr1 Description: Command-line calculator DescDetail: << Wcalc is a very capable command-line calculator (also has a Cocoa GUI version). It has standard functions (sin, asinh, and sqrt for example, in either radians or degrees), many pre-defined constants (pi, e, c, G, etc.), support for using variables, "active" variables, a command history, hex/octal/binary input and output, unit conversions, embedded comments, and the ability to save history to a file and load it from a file. Wcalc evaluates expressions using the standard order of operations. Wcalc uses intuitive expressions. For example, Wcalc will evaluate 5sin 4!-7*2(4%6)^2 to be -221.96631678. << License: GPL Homepage: http://w-calc.sourceforge.net/ wcalc-2.4/wcalc.rc0000644000175000000620000000353507721236757012402 0ustar kkstaff# What precision should the numbers print in? # -1 : automatic # n : n decimal places precision = -1 # Should the numbers be printed in engineering notation? # true/false or yes/no engineering = false # Should undeclared variables be considered errors? # if no, the undeclared variables are considered 0. # true/false or yes/no flag_undeclared = yes # Whether trig functions use radians or not # true/false or yes/no use_radians = no # What format (base) should numbers be printed in # decimal : the number is printed "normally", in base 10 # octal : the number is printed like 031 # binary : the number is printed like 0b1101101 # hexadecimal : the number is printed like 0x3af913 output_format = decimal # octal, binary, hexadecimal # Should alternate-format numbers be printed with the indicative prefixes # true/false or yes/no print_prefixes = yes # Should there be any indication or warning that things have been rounded # no : there is no indication # simple : was there any rounding at all # sig_fig : only if a significant figure has been rounded rounding_indication = no # simple, sig_fig # Should errors be remembered in the history # true/false or yes/no save_errors = no # This specifies the thousands and decimal delimiters # for international numbers. This affects input and output. # For spaces, use ' ' - may only be one character. thousands_delimiter = , decimal_delimiter = . # Should numbers be rounded to the pre-defined precision limit of # the computer # true/false or yes/no precision_guard = no # Should the history be limited in length, and if so, how? # no : no limit # n : some number # eg. history_limit = 1000 history_limit = no # Should the equals sign be printed for results? # true/false or yes/no show_equals = true # Should integers be printed whole, or can long ones be compressed? # true/false or yes/no print_integers = yes wcalc-2.4/wcalc.spec0000644000175000000620000000254510332034512012701 0ustar kkstaff%define name Wcalc %define version 2.1 Summary: A flexible command-line calculator Name: %{name} Version: %{version} Release: 1 Group: Applications Url: http://w-calc.sf.net/ Source: http://prdownloads.sf.net/w-calc/Wcalc-%{version}.tar.bz2 License: GPL BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root Vendor: Kyle Wheeler Packager: Kyle Wheeler %description Wcalc is a command-line calculator designed to accept all valid mathematical expressions. It supports all standard mathematical operations, parenthesis, brackets, braces, trigonometric functions, hyperbolic trig functions, logs, and most boolean operators. %prep %setup -q %build %configure make %install [ -d $RPM_BUILD_ROOT ] && rm -rf ${RPM_BUILD_ROOT} make DESTDIR=$RPM_BUILD_ROOT install %clean [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT; %files %defattr(-,root,root) %doc ChangeLog COPY* NEWS README %{_bindir}/* %{_mandir}/*/* %changelog * Wed Jan 29 2003 Kyle Wheeler - A few minor modifications * Wed Jan 29 2003 Mark Schreiber - Fixed spec file to build on Red Hat * Mon Jan 27 2003 Kyle Wheeler - Fixed spec file for new URL - Fixed spec file to use automake/autoconf * Tue Jan 22 2002 Kyle Wheeler - Initial spec file. wcalc-2.4/Wcalc.xcodeproj/0002775000175000000620000000000011101160225013753 5ustar kkstaffwcalc-2.4/Wcalc.xcodeproj/kyle.mode10000644000175000000620000013027510756367752015707 0ustar kkstaff ActivePerspectiveName Project AllowedModules BundleLoadPath MaxInstances n Module PBXSmartGroupTreeModule Name Groups and Files Outline View BundleLoadPath MaxInstances n Module PBXNavigatorGroup Name Editor BundleLoadPath MaxInstances n Module XCTaskListModule Name Task List BundleLoadPath MaxInstances n Module XCDetailModule Name File and Smart Group Detail Viewer BundleLoadPath MaxInstances 1 Module PBXBuildResultsModule Name Detailed Build Results Viewer BundleLoadPath MaxInstances 1 Module PBXProjectFindModule Name Project Batch Find Tool BundleLoadPath MaxInstances n Module PBXRunSessionModule Name Run Log BundleLoadPath MaxInstances n Module PBXBookmarksModule Name Bookmarks Tool BundleLoadPath MaxInstances n Module PBXClassBrowserModule Name Class Browser BundleLoadPath MaxInstances n Module PBXCVSModule Name Source Code Control Tool BundleLoadPath MaxInstances n Module PBXDebugBreakpointsModule Name Debug Breakpoints Tool BundleLoadPath MaxInstances n Module XCDockableInspector Name Inspector BundleLoadPath MaxInstances n Module PBXOpenQuicklyModule Name Open Quickly Tool BundleLoadPath MaxInstances 1 Module PBXDebugSessionModule Name Debugger BundleLoadPath MaxInstances 1 Module PBXDebugCLIModule Name Debug Console Description DefaultDescriptionKey DockingSystemVisible Extension mode1 FavBarConfig PBXProjectModuleGUID 27B38F970859DCBE00C2FE3C XCBarModuleItemNames XCBarModuleItems FirstTimeWindowDisplayed Identifier com.apple.perspectives.project.mode1 MajorVersion 31 MinorVersion 1 Name Default Notifications OpenEditors PerspectiveWidths -1 -1 Perspectives ChosenToolbarItems active-target-popup active-buildstyle-popup NSToolbarFlexibleSpaceItem buildOrClean build-and-runOrDebug run com.apple.ide.PBXToolbarStopButton toggle-editor Quick Model NSToolbarFlexibleSpaceItem com.apple.pbx.toolbar.searchfield ControllerClassBaseName IconName WindowOfProjectWithEditor Identifier perspective.project IsVertical Layout BecomeActive ContentConfiguration PBXBottomSmartGroupGIDs 1C37FBAC04509CD000000102 1C37FAAC04509CD000000102 1C08E77C0454961000C914BD 1C37FABC05509CD000000102 1C37FABC05539CD112110102 E2644B35053B69B200211256 1C37FABC04509CD000100104 1CC0EA4004350EF90044410B 1CC0EA4004350EF90041110B PBXProjectModuleGUID 1CE0B1FE06471DED0097A5F4 PBXProjectModuleLabel Files PBXProjectStructureProvided yes PBXSmartGroupTreeModuleColumnData PBXSmartGroupTreeModuleColumnWidthsKey 252 PBXSmartGroupTreeModuleColumnsKey_v4 MainColumn PBXSmartGroupTreeModuleOutlineStateKey_v7 PBXSmartGroupTreeModuleOutlineStateExpansionKey 29B97314FDCFA39411CA2CEA 080E96DDFE201D6D7F000001 29B97315FDCFA39411CA2CEA 29B97317FDCFA39411CA2CEA 29B97323FDCFA39411CA2CEA 1058C7A0FEA54F0111CA2CBB 19C28FACFE9D520D11CA2CBB 1C37FBAC04509CD000000102 1C37FAAC04509CD000000102 1C37FABC05509CD000000102 PBXSmartGroupTreeModuleOutlineStateSelectionKey 0 PBXSmartGroupTreeModuleOutlineStateVisibleRectKey {{0, 0}, {252, 628}} PBXTopSmartGroupGIDs XCIncludePerspectivesSwitch XCSharingToken com.apple.Xcode.GFSharingToken GeometryConfiguration Frame {{0, 0}, {269, 646}} GroupTreeTableConfiguration MainColumn 252 RubberWindowFrame 390 335 963 687 0 0 1680 1028 Module PBXSmartGroupTreeModule Proportion 269pt Dock ContentConfiguration PBXProjectModuleGUID 1CE0B20306471E060097A5F4 PBXProjectModuleLabel number.h PBXSplitModuleInNavigatorKey Split0 PBXProjectModuleGUID 1CE0B20406471E060097A5F4 PBXProjectModuleLabel number.h _historyCapacity 0 bookmark 277E70E80D6A276A001C912C history 2721CD220869C0C400E3BB4D 2754E75508C0D6E1007F45CF 2754E80108C0F6E5007F45CF 2754E80A08C10043007F45CF 2754E80F08C10043007F45CF 272C35D908C16738009EA18F 272C35DD08C16738009EA18F 272C35E408C16738009EA18F 272C373F08C21615009EA18F 2773DCF40917EF3400DBDA9D 27E050E50918749700928DC2 276C7002091D1AB7005A5B75 27FAECD6093FAA8400D7EE3E 27FAECD7093FAA8400D7EE3E 27FAECFE093FAF2400D7EE3E 2736561D094C69B80043391C 2736561F094C69B80043391C 27EC73FD0992B6BB0097E39E 27EC73FE0992B6BB0097E39E 2729A45C09B22FE2001F07F4 27C40A7809B5DA910043C42F 27C40AAF09B5E58B0043C42F 27C40B6709B623D00043C42F 27C40B8909B626690043C42F 27C40BBB09B628F50043C42F 27B4AFFD09C1EE4F00EE3874 27C1F31F0A61C2890072F397 27C1F33B0A61F4840072F397 27C1F3590A622F000072F397 270437A10C458C830024DB8D 275D2B270C4DDA3B0056D137 275D2B2A0C4DDA3B0056D137 275D2CC00C5137330056D137 275D2D050C513D390056D137 275D2D160C513E300056D137 275D2D690C5144DD0056D137 275D2DA60C5148550056D137 275D2DB80C514AE60056D137 278132170C7CF38500EF848E 2781326C0C7E07BB00EF848E 2781326D0C7E07BB00EF848E 27239AD30C7F35C600204808 27239AE90C7F8EB400204808 279AB3E40D5CD6FC002AFBEA 279AB4210D5CDB02002AFBEA 277E70C70D6A22A2001C912C 277E70C80D6A22A2001C912C prevStack 27B38FB5085A077900C2FE3C 2721CBBA0865FD2800E3BB4D 2721CBC30865FD3C00E3BB4D 2721CBE90865FDFE00E3BB4D 2721CBFF086604FD00E3BB4D 2721CC090866055400E3BB4D 2721CC4108660C9200E3BB4D 2721CC49086652BA00E3BB4D 2721CD280869C0C400E3BB4D 2721CD2B0869C0C400E3BB4D 2721CD2C0869C0C400E3BB4D 2721CD2E0869C0C400E3BB4D 2754E75608C0D6E1007F45CF 2754E7E408C0E659007F45CF 2754E7E508C0E659007F45CF 2754E7E708C0E659007F45CF 2754E7E808C0E659007F45CF 2754E81108C10043007F45CF 2754E81208C10043007F45CF 2754E81308C10043007F45CF 2754E81408C10043007F45CF 2754E81508C10043007F45CF 2754E81708C10043007F45CF 2754E8CB08C126B6007F45CF 272C35EB08C16738009EA18F 272C35ED08C16738009EA18F 272C35F008C16738009EA18F 272C35F308C16738009EA18F 272C35F608C16738009EA18F 272C35F708C16738009EA18F 272C35F908C16738009EA18F 272C35FB08C16738009EA18F 272C35FC08C16738009EA18F 272C35FD08C16738009EA18F 272C363C08C17E7F009EA18F 272C374508C21615009EA18F 272C374608C21615009EA18F 2773DCF80917EF3400DBDA9D 27E050E60918749700928DC2 27FAED01093FAF2400D7EE3E 27FAED1B093FB0BB00D7EE3E 27365622094C69B80043391C 2729A45D09B22FE2001F07F4 2729A55E09B25AE9001F07F4 2729A55F09B25AE9001F07F4 275D2C930C50346B0056D137 275D2C940C50346B0056D137 277E70C90D6A22A2001C912C SplitCount 1 StatusBarVisibility GeometryConfiguration Frame {{0, 0}, {689, 546}} RubberWindowFrame 390 335 963 687 0 0 1680 1028 Module PBXNavigatorGroup Proportion 546pt ContentConfiguration PBXProjectModuleGUID 1CE0B20506471E060097A5F4 PBXProjectModuleLabel Detail GeometryConfiguration Frame {{0, 551}, {689, 95}} RubberWindowFrame 390 335 963 687 0 0 1680 1028 Module XCDetailModule Proportion 95pt Proportion 689pt Name Project ServiceClasses XCModuleDock PBXSmartGroupTreeModule XCModuleDock PBXNavigatorGroup XCDetailModule TableOfContents 277E70B90D6A0FF6001C912C 1CE0B1FE06471DED0097A5F4 277E70BA0D6A0FF6001C912C 1CE0B20306471E060097A5F4 1CE0B20506471E060097A5F4 ToolbarConfiguration xcode.toolbar.config.default ControllerClassBaseName IconName WindowOfProject Identifier perspective.morph IsVertical 0 Layout BecomeActive 1 ContentConfiguration PBXBottomSmartGroupGIDs 1C37FBAC04509CD000000102 1C37FAAC04509CD000000102 1C08E77C0454961000C914BD 1C37FABC05509CD000000102 1C37FABC05539CD112110102 E2644B35053B69B200211256 1C37FABC04509CD000100104 1CC0EA4004350EF90044410B 1CC0EA4004350EF90041110B PBXProjectModuleGUID 11E0B1FE06471DED0097A5F4 PBXProjectModuleLabel Files PBXProjectStructureProvided yes PBXSmartGroupTreeModuleColumnData PBXSmartGroupTreeModuleColumnWidthsKey 186 PBXSmartGroupTreeModuleColumnsKey_v4 MainColumn PBXSmartGroupTreeModuleOutlineStateKey_v7 PBXSmartGroupTreeModuleOutlineStateExpansionKey 29B97314FDCFA39411CA2CEA 1C37FABC05509CD000000102 PBXSmartGroupTreeModuleOutlineStateSelectionKey 0 PBXSmartGroupTreeModuleOutlineStateVisibleRectKey {{0, 0}, {186, 337}} PBXTopSmartGroupGIDs XCIncludePerspectivesSwitch 1 XCSharingToken com.apple.Xcode.GFSharingToken GeometryConfiguration Frame {{0, 0}, {203, 355}} GroupTreeTableConfiguration MainColumn 186 RubberWindowFrame 373 269 690 397 0 0 1440 878 Module PBXSmartGroupTreeModule Proportion 100% Name Morph PreferredWidth 300 ServiceClasses XCModuleDock PBXSmartGroupTreeModule TableOfContents 11E0B1FE06471DED0097A5F4 ToolbarConfiguration xcode.toolbar.config.default.short PerspectivesBarVisible ShelfIsVisible SourceDescription file at '/System/Library/PrivateFrameworks/DevToolsInterface.framework/Versions/A/Resources/XCPerspectivesSpecificationMode1.xcperspec' StatusbarIsVisible TimeStamp 0.0 ToolbarDisplayMode 2 ToolbarIsVisible ToolbarSizeMode 1 Type Perspectives UpdateMessage The Default Workspace in this version of Xcode now includes support to hide and show the detail view (what has been referred to as the "Metro-Morph" feature). You must discard your current Default Workspace settings and update to the latest Default Workspace in order to gain this feature. Do you wish to update to the latest Workspace defaults for project '%@'? WindowJustification 5 WindowOrderList 276C702E09208343005A5B75 /Users/kyle/Wcalc_Development/Wcalc/Wcalc.xcodeproj WindowString 390 335 963 687 0 0 1680 1028 WindowTools FirstTimeWindowDisplayed Identifier windowTool.build IsVertical Layout Dock ContentConfiguration PBXProjectModuleGUID 1CD0528F0623707200166675 PBXProjectModuleLabel number.h StatusBarVisibility GeometryConfiguration Frame {{0, 0}, {789, 186}} RubberWindowFrame 783 237 789 686 0 0 1680 1028 Module PBXNavigatorGroup Proportion 186pt BecomeActive ContentConfiguration PBXBuildLogShowsTranscriptDefaultKey {{0, 130}, {789, 324}} PBXProjectModuleGUID XCMainBuildResultsModuleGUID PBXProjectModuleLabel Build XCBuildResultsTrigger_Collapse 1021 XCBuildResultsTrigger_Open 1011 GeometryConfiguration Frame {{0, 191}, {789, 454}} RubberWindowFrame 783 237 789 686 0 0 1680 1028 Module PBXBuildResultsModule Proportion 454pt Proportion 645pt Name Build Results ServiceClasses PBXBuildResultsModule StatusbarIsVisible TableOfContents 276C702E09208343005A5B75 277E70BB0D6A0FF6001C912C 1CD0528F0623707200166675 XCMainBuildResultsModuleGUID ToolbarConfiguration xcode.toolbar.config.build WindowString 783 237 789 686 0 0 1680 1028 WindowToolGUID 276C702E09208343005A5B75 WindowToolIsVisible FirstTimeWindowDisplayed Identifier windowTool.debugger IsVertical Layout Dock ContentConfiguration Debugger HorizontalSplitView _collapsingFrameDimension 0.0 _indexOfCollapsedView 0 _percentageOfCollapsedView 0.0 isCollapsed yes sizes {{0, 0}, {524, 350}} {{524, 0}, {525, 350}} VerticalSplitView _collapsingFrameDimension 0.0 _indexOfCollapsedView 0 _percentageOfCollapsedView 0.0 isCollapsed yes sizes {{0, 0}, {1049, 350}} {{0, 350}, {1049, 330}} LauncherConfigVersion 8 PBXProjectModuleGUID 1C162984064C10D400B95A72 PBXProjectModuleLabel Debug - GLUTExamples (Underwater) GeometryConfiguration DebugConsoleDrawerSize {100, 120} DebugConsoleVisible None DebugConsoleWindowFrame {{200, 200}, {500, 300}} DebugSTDIOWindowFrame {{200, 200}, {500, 300}} Frame {{0, 0}, {1049, 680}} RubberWindowFrame 511 307 1049 721 0 0 1680 1028 Module PBXDebugSessionModule Proportion 680pt Proportion 680pt Name Debugger ServiceClasses PBXDebugSessionModule StatusbarIsVisible TableOfContents 1CD10A99069EF8BA00B06720 271E0C350D68FBA7006D1356 1C162984064C10D400B95A72 271E0C360D68FBA7006D1356 271E0C370D68FBA7006D1356 271E0C380D68FBA7006D1356 271E0C390D68FBA7006D1356 271E0C3A0D68FBA7006D1356 271E0C3B0D68FBA7006D1356 ToolbarConfiguration xcode.toolbar.config.debug WindowString 511 307 1049 721 0 0 1680 1028 WindowToolGUID 1CD10A99069EF8BA00B06720 WindowToolIsVisible FirstTimeWindowDisplayed Identifier windowTool.find IsVertical Layout Dock Dock ContentConfiguration PBXProjectModuleGUID 1CDD528C0622207200134675 PBXProjectModuleLabel StatusBarVisibility GeometryConfiguration Frame {{0, 0}, {781, 212}} RubberWindowFrame 96 372 781 470 0 0 1680 1028 Module PBXNavigatorGroup Proportion 781pt Proportion 212pt ContentConfiguration PBXProjectModuleGUID 1CD0528E0623707200166675 PBXProjectModuleLabel Project Find GeometryConfiguration Frame {{0, 217}, {781, 212}} RubberWindowFrame 96 372 781 470 0 0 1680 1028 Module PBXProjectFindModule Proportion 212pt Proportion 429pt Name Project Find ServiceClasses PBXProjectFindModule StatusbarIsVisible TableOfContents 1C530D57069F1CE1000CFCEE 279AB41E0D5CDB01002AFBEA 279AB41F0D5CDB01002AFBEA 1CDD528C0622207200134675 1CD0528E0623707200166675 WindowString 96 372 781 470 0 0 1680 1028 WindowToolGUID 1C530D57069F1CE1000CFCEE WindowToolIsVisible Identifier MENUSEPARATOR FirstTimeWindowDisplayed Identifier windowTool.debuggerConsole IsVertical Layout Dock ContentConfiguration PBXProjectModuleGUID 1C78EAAC065D492600B07095 PBXProjectModuleLabel Debugger Console GeometryConfiguration Frame {{0, 0}, {440, 358}} RubberWindowFrame 287 95 440 400 0 0 1680 1028 Module PBXDebugCLIModule Proportion 358pt Proportion 359pt Name Debugger Console ServiceClasses PBXDebugCLIModule StatusbarIsVisible TableOfContents 2721CC52086652BA00E3BB4D 271E0C3C0D68FBA7006D1356 1C78EAAC065D492600B07095 WindowString 287 95 440 400 0 0 1680 1028 WindowToolGUID 2721CC52086652BA00E3BB4D WindowToolIsVisible FirstTimeWindowDisplayed Identifier windowTool.run IsVertical Layout Dock ContentConfiguration LauncherConfigVersion 3 PBXProjectModuleGUID 1CD0528B0623707200166675 PBXProjectModuleLabel Run Runner HorizontalSplitView _collapsingFrameDimension 0.0 _indexOfCollapsedView 0 _percentageOfCollapsedView 0.0 isCollapsed yes sizes {{0, 0}, {367, 168}} {{0, 173}, {367, 270}} VerticalSplitView _collapsingFrameDimension 0.0 _indexOfCollapsedView 0 _percentageOfCollapsedView 0.0 isCollapsed yes sizes {{0, 0}, {406, 443}} {{411, 0}, {517, 443}} GeometryConfiguration Frame {{0, 0}, {622, 544}} RubberWindowFrame 107 443 622 585 0 0 1680 1028 Module PBXRunSessionModule Proportion 544pt Proportion 544pt Name Run Log ServiceClasses PBXRunSessionModule StatusbarIsVisible TableOfContents 1C0AD2B3069F1EA900FABCE6 271E0C3D0D68FBA7006D1356 1CD0528B0623707200166675 271E0C3E0D68FBA7006D1356 ToolbarConfiguration xcode.toolbar.config.run WindowString 107 443 622 585 0 0 1680 1028 WindowToolGUID 1C0AD2B3069F1EA900FABCE6 WindowToolIsVisible Identifier windowTool.scm Layout Dock ContentConfiguration PBXProjectModuleGUID 1C78EAB2065D492600B07095 PBXProjectModuleLabel <No Editor> PBXSplitModuleInNavigatorKey Split0 PBXProjectModuleGUID 1C78EAB3065D492600B07095 SplitCount 1 StatusBarVisibility 1 GeometryConfiguration Frame {{0, 0}, {452, 0}} RubberWindowFrame 743 379 452 308 0 0 1280 1002 Module PBXNavigatorGroup Proportion 0pt BecomeActive 1 ContentConfiguration PBXProjectModuleGUID 1CD052920623707200166675 PBXProjectModuleLabel SCM GeometryConfiguration ConsoleFrame {{0, 259}, {452, 0}} Frame {{0, 7}, {452, 259}} RubberWindowFrame 743 379 452 308 0 0 1280 1002 TableConfiguration Status 30 FileName 199 Path 197.09500122070312 TableFrame {{0, 0}, {452, 250}} Module PBXCVSModule Proportion 262pt Proportion 266pt Name SCM ServiceClasses PBXCVSModule StatusbarIsVisible 1 TableOfContents 1C78EAB4065D492600B07095 1C78EAB5065D492600B07095 1C78EAB2065D492600B07095 1CD052920623707200166675 ToolbarConfiguration xcode.toolbar.config.scm WindowString 743 379 452 308 0 0 1280 1002 FirstTimeWindowDisplayed Identifier windowTool.breakpoints IsVertical Layout Dock ContentConfiguration PBXBottomSmartGroupGIDs 1C77FABC04509CD000000102 PBXProjectModuleGUID 1CE0B1FE06471DED0097A5F4 PBXProjectModuleLabel Files PBXProjectStructureProvided no PBXSmartGroupTreeModuleColumnData PBXSmartGroupTreeModuleColumnWidthsKey 168 PBXSmartGroupTreeModuleColumnsKey_v4 MainColumn PBXSmartGroupTreeModuleOutlineStateKey_v7 PBXSmartGroupTreeModuleOutlineStateExpansionKey 1C77FABC04509CD000000102 PBXSmartGroupTreeModuleOutlineStateSelectionKey 0 PBXSmartGroupTreeModuleOutlineStateVisibleRectKey {{0, 0}, {168, 350}} PBXTopSmartGroupGIDs XCIncludePerspectivesSwitch GeometryConfiguration Frame {{0, 0}, {185, 368}} GroupTreeTableConfiguration MainColumn 168 RubberWindowFrame 349 280 744 409 0 0 1152 746 Module PBXSmartGroupTreeModule Proportion 185pt BecomeActive ContentConfiguration PBXProjectModuleGUID 1CA1AED706398EBD00589147 PBXProjectModuleLabel Detail GeometryConfiguration Frame {{190, 0}, {554, 368}} RubberWindowFrame 349 280 744 409 0 0 1152 746 Module XCDetailModule Proportion 554pt Proportion 368pt MajorVersion 2 MinorVersion 0 Name Breakpoints ServiceClasses PBXSmartGroupTreeModule XCDetailModule StatusbarIsVisible TableOfContents 27C1F3020A61B0220072F397 27C1F3030A61B0220072F397 1CE0B1FE06471DED0097A5F4 1CA1AED706398EBD00589147 ToolbarConfiguration xcode.toolbar.config.breakpoints WindowString 349 280 744 409 0 0 1152 746 WindowToolGUID 27C1F3020A61B0220072F397 WindowToolIsVisible FirstTimeWindowDisplayed Identifier windowTool.debugAnimator IsVertical Layout Dock BecomeActive ContentConfiguration PBXProjectModuleGUID 2721CC5A08672C4600E3BB4D PBXProjectModuleLabel StatusBarVisibility GeometryConfiguration Frame {{0, 0}, {700, 459}} RubberWindowFrame 533 177 700 500 0 0 1152 746 Module PBXNavigatorGroup Proportion 459pt Proportion 459pt Name Debug Visualizer ServiceClasses PBXNavigatorGroup StatusbarIsVisible TableOfContents 27C1F2F90A61AF940072F397 27C1F2FA0A61AF940072F397 2721CC5A08672C4600E3BB4D ToolbarConfiguration xcode.toolbar.config.debugAnimator WindowString 533 177 700 500 0 0 1152 746 WindowToolGUID 27C1F2F90A61AF940072F397 WindowToolIsVisible Identifier windowTool.bookmarks Layout Dock Module PBXBookmarksModule Proportion 100% Proportion 100% Name Bookmarks ServiceClasses PBXBookmarksModule StatusbarIsVisible 0 WindowString 538 42 401 187 0 0 1280 1002 Identifier windowTool.classBrowser Layout Dock BecomeActive 1 ContentConfiguration OptionsSetName Hierarchy, all classes PBXProjectModuleGUID 1CA6456E063B45B4001379D8 PBXProjectModuleLabel Class Browser - NSObject GeometryConfiguration ClassesFrame {{0, 0}, {374, 96}} ClassesTreeTableConfiguration PBXClassNameColumnIdentifier 208 PBXClassBookColumnIdentifier 22 Frame {{0, 0}, {630, 331}} MembersFrame {{0, 105}, {374, 395}} MembersTreeTableConfiguration PBXMemberTypeIconColumnIdentifier 22 PBXMemberNameColumnIdentifier 216 PBXMemberTypeColumnIdentifier 97 PBXMemberBookColumnIdentifier 22 PBXModuleWindowStatusBarHidden2 1 RubberWindowFrame 385 179 630 352 0 0 1440 878 Module PBXClassBrowserModule Proportion 332pt Proportion 332pt Name Class Browser ServiceClasses PBXClassBrowserModule StatusbarIsVisible 0 TableOfContents 1C0AD2AF069F1E9B00FABCE6 1C0AD2B0069F1E9B00FABCE6 1CA6456E063B45B4001379D8 ToolbarConfiguration xcode.toolbar.config.classbrowser WindowString 385 179 630 352 0 0 1440 878 WindowToolGUID 1C0AD2AF069F1E9B00FABCE6 WindowToolIsVisible 0 wcalc-2.4/Wcalc.xcodeproj/kyle.pbxuser0000644000175000000620000021726711101157264016355 0ustar kkstaff// !$*UTF8*$! { 089C165DFE840E0CC02AAC07 /* English */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {745, 664}}"; sepNavSelRange = "{258, 0}"; sepNavVisRange = "{0, 258}"; sepNavVisRect = "{{0, 0}, {642, 609}}"; }; }; 2704376A0C4584640024DB8D /* number.c */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {742, 1106}}"; sepNavSelRange = "{1557, 0}"; sepNavVisRect = "{{0, 854}, {742, 154}}"; }; }; 2704376B0C4584640024DB8D /* number.h */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {745, 5166}}"; sepNavSelRange = "{311, 17}"; sepNavVisRange = "{0, 608}"; sepNavVisRect = "{{0, 0}, {648, 514}}"; }; }; 270437A10C458C830024DB8D /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 27FAECF1093FAE5A00D7EE3E /* InspectorController.m */; name = "InspectorController.m: 44"; rLen = 0; rLoc = 1173; rType = 0; vrLen = 1173; vrLoc = 0; }; 27085D720EB3D3BE009B43DD /* PBXBookmark */ = { isa = PBXBookmark; fRef = F5B29D6F01F7393A01A80164 /* TheW.icns */; }; 27085D7A0EB3D5AE009B43DD /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = F5A165F8030711ED01A80164 /* ConversionList.m */; name = "ConversionList.m: 60"; rLen = 0; rLoc = 1585; rType = 0; vrLen = 1326; vrLoc = 0; }; 27085D940EB3D881009B43DD /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = F5B29D6601F7391601A80164 /* calculator.h */; name = "calculator.h: 132"; rLen = 0; rLoc = 2268; rType = 0; vrLen = 1280; vrLoc = 1220; }; 27085D990EB40B1B009B43DD /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = F5B29D7701F7395001A80164 /* WcalcController.h */; name = "WcalcController.h: 50"; rLen = 0; rLoc = 1654; rType = 0; vrLen = 1528; vrLoc = 454; }; 27085DDF0EB41838009B43DD /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = F5B29D7801F7395001A80164 /* WcalcController.m */; name = "WcalcController.m: 983"; rLen = 0; rLoc = 33915; rType = 0; vrLen = 957; vrLoc = 33336; }; 27085DF90EB418EC009B43DD /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 2704376B0C4584640024DB8D /* number.h */; name = "number.h: 19"; rLen = 17; rLoc = 311; rType = 0; vrLen = 608; vrLoc = 0; }; 27085E7F0EB4FC43009B43DD /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = F5B29D6101F7391001A80164 /* AboutBoxController.h */; name = "AboutBoxController.h: 3"; rLen = 0; rLoc = 34; rType = 0; vrLen = 230; vrLoc = 0; }; 27085E8F0EB4FE3E009B43DD /* PlistBookmark */ = { isa = PlistBookmark; fRef = 2721CD490869C13400E3BB4D /* Info.plist */; fallbackIsa = PBXBookmark; isK = 0; kPath = ( ); name = /Users/kyle/Wcalc_Development/Wcalc/Info.plist; rLen = 0; rLoc = 2147483647; }; 27085E910EB4FE3E009B43DD /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = F5DEAE8F021254A501A80164 /* definitions.h */; name = "definitions.h: 1"; rLen = 147; rLoc = 0; rType = 0; vrLen = 2083; vrLoc = 0; }; 27085EB40EB4FFB8009B43DD /* PBXTextBookmark */ = { isa = PBXTextBookmark; comments = "warning: format '%s' expects type 'char *', but argument 2 has type 'double'"; fRef = 2799DA4403FAD61400CA71DD /* help.c */; rLen = 1; rLoc = 22; rType = 1; }; 27085F2D0EB51634009B43DD /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = F574E09E01FD122F01A80164 /* historyManager.c */; name = "historyManager.c: 74"; rLen = 0; rLoc = 1447; rType = 0; vrLen = 1380; vrLoc = 1319; }; 2721CBBA0865FD2800E3BB4D /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = F5DEAE8F021254A501A80164 /* definitions.h */; name = "definitions.h: 77"; rLen = 0; rLoc = 2984; rType = 0; vrLen = 2091; vrLoc = 212; }; 2721CBC30865FD3C00E3BB4D /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 089C165DFE840E0CC02AAC07 /* English */; name = "English: 6"; rLen = 0; rLoc = 241; rType = 0; vrLen = 258; vrLoc = 0; }; 2721CBE90865FDFE00E3BB4D /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = F521994801FA927601A80164 /* ChangeLog */; name = "ChangeLog: 1587"; rLen = 0; rLoc = 43050; rType = 0; vrLen = 1129; vrLoc = 2217; }; 2721CBFF086604FD00E3BB4D /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = F5B29D6601F7391601A80164 /* calculator.h */; name = "#include "; rLen = 17; rLoc = 276; rType = 0; vrLen = 416; vrLoc = 0; }; 2721CC090866055400E3BB4D /* PBXBookmark */ = { isa = PBXBookmark; fRef = F5B29D6F01F7393A01A80164 /* TheW.icns */; }; 2721CC4108660C9200E3BB4D /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 29B97316FDCFA39411CA2CEA /* main.m */; name = "#import \"calculator.h\""; rLen = 64; rLoc = 163; rType = 0; vrLen = 375; vrLoc = 0; }; 2721CC49086652BA00E3BB4D /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = F521993F01F8D2B801A80164 /* main.c */; name = "main.c: 1"; rLen = 0; rLoc = 0; rType = 0; vrLen = 1086; vrLoc = 1144; }; 2721CD220869C0C400E3BB4D /* PBXBookmark */ = { isa = PBXBookmark; fRef = F5463560020065B401A80164 /* Wred.png */; }; 2721CD280869C0C400E3BB4D /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = F5B29D6101F7391001A80164 /* AboutBoxController.h */; name = "AboutBoxController.h: 1"; rLen = 0; rLoc = 0; rType = 0; vrLen = 229; vrLoc = 0; }; 2721CD2B0869C0C400E3BB4D /* PBXBookmark */ = { isa = PBXBookmark; fRef = F5463560020065B401A80164 /* Wred.png */; }; 2721CD2C0869C0C400E3BB4D /* PBXBookmark */ = { isa = PBXBookmark; fRef = F5B29D8301F73C2701A80164 /* w.png */; }; 2721CD2E0869C0C400E3BB4D /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 277DB27F042F51A5004ACA36 /* NEWS */; name = "NEWS: 1"; rLen = 0; rLoc = 0; rType = 0; vrLen = 726; vrLoc = 0; }; 2721CD490869C13400E3BB4D /* Info.plist */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {686, 742}}"; sepNavSelRange = "{1188, 0}"; sepNavVisRect = "{{0, 119}, {642, 609}}"; sepNavWindowFrame = "{{651, 111}, {879, 764}}"; }; }; 2729A40109B1ECE5001F07F4 /* add_commas.c */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {988, 1778}}"; sepNavSelRange = "{3018, 0}"; sepNavVisRange = "{1079, 395}"; sepNavVisRect = "{{0, 874}, {748, 255}}"; }; }; 2729A45C09B22FE2001F07F4 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 273655E5094C63910043391C /* list.c */; name = getListElement; rLen = 14; rLoc = 6847; rType = 0; vrLen = 994; vrLoc = 6651; }; 2729A45D09B22FE2001F07F4 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 273655E5094C63910043391C /* list.c */; name = getListElement; rLen = 14; rLoc = 6847; rType = 0; vrLen = 994; vrLoc = 6651; }; 2729A53609B256DA001F07F4 /* PersVarList.h */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {642, 609}}"; sepNavSelRange = "{164, 0}"; sepNavVisRect = "{{0, 0}, {642, 609}}"; }; }; 2729A53709B256DA001F07F4 /* PersVarList.m */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {890, 2604}}"; sepNavSelRange = "{4949, 0}"; sepNavVisRect = "{{0, 1064}, {742, 154}}"; }; }; 2729A55E09B25AE9001F07F4 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 2729A53709B256DA001F07F4 /* PersVarList.m */; name = "PersVarList.m: 7"; rLen = 0; rLoc = 316; rType = 0; vrLen = 322; vrLoc = 0; }; 2729A55F09B25AE9001F07F4 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 2729A53609B256DA001F07F4 /* PersVarList.h */; name = "PersVarList.h: 4"; rLen = 0; rLoc = 61; rType = 0; vrLen = 255; vrLoc = 0; }; 272C359B08C1557A009EA18F /* WcalcController.m:430 */ = { isa = PBXFileBreakpoint; actions = ( ); breakpointStyle = 0; continueAfterActions = 0; countType = 0; delayBeforeContinue = 0; fileReference = F5B29D7801F7395001A80164 /* WcalcController.m */; functionName = "-awakeFromNib"; hitCount = 0; ignoreCount = 0; lineNumber = 430; location = Wcalc; modificationTime = 246742379.307883; state = 1; }; 272C35D908C16738009EA18F /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = F5B29D6901F7392301A80164 /* ErrorController.h */; name = include; rLen = 7; rLoc = 24; rType = 0; vrLen = 268; vrLoc = 0; }; 272C35DD08C16738009EA18F /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 27BDF4C5059F712100CF1DF6 /* simpleCalc.h */; name = "simpleCalc.h: 1"; rLen = 0; rLoc = 0; rType = 0; vrLen = 171; vrLoc = 0; }; 272C35E408C16738009EA18F /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = F5D446D00263B46801A80164 /* MyTextField.h */; name = "MyTextField.h: 7"; rLen = 0; rLoc = 99; rType = 0; vrLen = 478; vrLoc = 0; }; 272C35EB08C16738009EA18F /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = F5B29D6901F7392301A80164 /* ErrorController.h */; name = "ErrorController.h: 3"; rLen = 0; rLoc = 31; rType = 0; vrLen = 268; vrLoc = 0; }; 272C35ED08C16738009EA18F /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = F5B29D6A01F7392301A80164 /* ErrorController.m */; name = "ErrorController.m: 1"; rLen = 0; rLoc = 0; rType = 0; vrLen = 570; vrLoc = 0; }; 272C35F008C16738009EA18F /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = F5B29D6201F7391001A80164 /* AboutBoxController.m */; name = "AboutBoxController.m: 2"; rLen = 0; rLoc = 33; rType = 0; vrLen = 324; vrLoc = 0; }; 272C35F308C16738009EA18F /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = F5B29D7701F7395001A80164 /* WcalcController.h */; name = "WcalcController.h: 3"; rLen = 0; rLoc = 85; rType = 0; vrLen = 912; vrLoc = 0; }; 272C35F608C16738009EA18F /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 27BDF4C5059F712100CF1DF6 /* simpleCalc.h */; name = "simpleCalc.h: 1"; rLen = 0; rLoc = 0; rType = 0; vrLen = 171; vrLoc = 0; }; 272C35F708C16738009EA18F /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = F521994601FA8EC401A80164 /* VariableList.h */; name = "VariableList.h: 3"; rLen = 0; rLoc = 28; rType = 0; vrLen = 542; vrLoc = 0; }; 272C35F908C16738009EA18F /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = F574E09901FD0FD701A80164 /* HistoryList.h */; name = "HistoryList.h: 5"; rLen = 0; rLoc = 53; rType = 0; vrLen = 420; vrLoc = 0; }; 272C35FB08C16738009EA18F /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = F5EF54D302022A7001A80164 /* theDelegate.h */; name = "theDelegate.h: 3"; rLen = 0; rLoc = 27; rType = 0; vrLen = 200; vrLoc = 0; }; 272C35FC08C16738009EA18F /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = F5EF54D202022A7001A80164 /* theDelegate.m */; name = "theDelegate.m: 1"; rLen = 0; rLoc = 8; rType = 0; vrLen = 155; vrLoc = 0; }; 272C35FD08C16738009EA18F /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = F5D446D00263B46801A80164 /* MyTextField.h */; name = "MyTextField.h: 7"; rLen = 0; rLoc = 99; rType = 0; vrLen = 478; vrLoc = 0; }; 272C363C08C17E7F009EA18F /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 2721CD490869C13400E3BB4D /* Info.plist */; name = "Info.plist: 1"; rLen = 0; rLoc = 0; rType = 0; vrLen = 759; vrLoc = 0; }; 272C373F08C21615009EA18F /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = F5B29D7401F7394501A80164 /* variables.h */; name = "variables.h: 12"; rLen = 0; rLoc = 197; rType = 0; vrLen = 428; vrLoc = 0; }; 272C374508C21615009EA18F /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = F5B29D7401F7394501A80164 /* variables.h */; name = "variables.h: 12"; rLen = 0; rLoc = 197; rType = 0; vrLen = 428; vrLoc = 0; }; 272C374608C21615009EA18F /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = F5B29D7301F7394501A80164 /* variables.c */; name = "variables.c: 137"; rLen = 0; rLoc = 2506; rType = 0; vrLen = 640; vrLoc = 2062; }; 272C375F08C3FDAF009EA18F /* number_formatting.h */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {627, 429}}"; sepNavSelRange = "{164, 0}"; sepNavVisRect = "{{0, 0}, {627, 429}}"; }; }; 272C376008C3FDAF009EA18F /* number_formatting.c */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {728, 8216}}"; sepNavSelRange = "{12708, 0}"; sepNavVisRange = "{12665, 366}"; sepNavVisRect = "{{0, 574}, {748, 154}}"; }; }; 273655E5094C63910043391C /* list.c */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {688, 6230}}"; sepNavSelRange = "{4145, 0}"; sepNavVisRect = "{{0, 2220}, {688, 503}}"; }; }; 273655EF094C63F20043391C /* explain.c */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {2468, 5390}}"; sepNavSelRange = "{17655, 0}"; sepNavVisRect = "{{0, 2240}, {742, 154}}"; }; }; 273655F1094C63F20043391C /* extract_vars.c */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {742, 1148}}"; sepNavSelRange = "{1878, 0}"; sepNavVisRect = "{{0, 840}, {742, 154}}"; }; }; 273655FD094C64170043391C /* isconst.c */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {728, 2072}}"; sepNavSelRange = "{106, 58}"; sepNavVisRange = "{98, 201}"; }; }; 27365609094C642B0043391C /* evalvar.c */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {627, 429}}"; sepNavSelRange = "{0, 0}"; sepNavVisRect = "{{0, 0}, {627, 429}}"; }; }; 2736561D094C69B80043391C /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 27365609094C642B0043391C /* evalvar.c */; name = "evalvar.c: 1"; rLen = 0; rLoc = 0; rType = 0; vrLen = 548; vrLoc = 0; }; 27365622094C69B80043391C /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 27365609094C642B0043391C /* evalvar.c */; name = "evalvar.c: 1"; rLen = 0; rLoc = 0; rType = 0; vrLen = 548; vrLoc = 0; }; 2754E75508C0D6E1007F45CF /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 277DB27D042F5173004ACA36 /* COPYING */; name = "COPYING: 1"; rLen = 0; rLoc = 0; rType = 0; vrLen = 886; vrLoc = 0; }; 2754E75608C0D6E1007F45CF /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 277DB27D042F5173004ACA36 /* COPYING */; name = "COPYING: 1"; rLen = 0; rLoc = 0; rType = 0; vrLen = 886; vrLoc = 0; }; 2754E7E408C0E659007F45CF /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = F5A165F8030711ED01A80164 /* ConversionList.m */; name = "ConversionList.m: 26"; rLen = 0; rLoc = 728; rType = 0; vrLen = 807; vrLoc = 0; }; 2754E7E508C0E659007F45CF /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = F5A165F7030711ED01A80164 /* ConversionList.h */; name = "ConversionList.h: 1"; rLen = 0; rLoc = 0; rType = 0; vrLen = 383; vrLoc = 0; }; 2754E7E708C0E659007F45CF /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = F5DD321602F8F43501A80164 /* conversion.c */; name = "conversion.c: lengths"; rLen = 0; rLoc = 380; rType = 0; vrLen = 2064; vrLoc = 337; }; 2754E7E808C0E659007F45CF /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = F5DD321702F8F43501A80164 /* conversion.h */; name = "conversion.h: 13"; rLen = 0; rLoc = 317; rType = 0; vrLen = 663; vrLoc = 216; }; 2754E80108C0F6E5007F45CF /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = F5DD321602F8F43501A80164 /* conversion.c */; name = "conversion.c: 60"; rLen = 0; rLoc = 2862; rType = 0; vrLen = 618; vrLoc = 15054; }; 2754E80A08C10043007F45CF /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = F574E09E01FD122F01A80164 /* historyManager.c */; name = "history = temp;"; rLen = 20; rLoc = 2336; rType = 0; vrLen = 902; vrLoc = 1782; }; 2754E81108C10043007F45CF /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = F5B29D6501F7391601A80164 /* calculator.c */; name = "#ifndef GUI"; rLen = 12; rLoc = 0; rType = 0; vrLen = 672; vrLoc = 0; }; 2754E81208C10043007F45CF /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = F574E09E01FD122F01A80164 /* historyManager.c */; name = "history = temp;"; rLen = 20; rLoc = 2336; rType = 0; vrLen = 902; vrLoc = 1782; }; 2754E81308C10043007F45CF /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = F5D446D10263B46801A80164 /* MyTextField.m */; name = "}"; rLen = 1; rLoc = 208; rType = 0; vrLen = 610; vrLoc = 0; }; 2754E81408C10043007F45CF /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = F574E09A01FD0FD701A80164 /* HistoryList.m */; name = "if ([[col identifier] isEqualToString:@\"history\"])"; rLen = 52; rLoc = 336; rType = 0; vrLen = 606; vrLoc = 0; }; 2754E81508C10043007F45CF /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = F521994301FA86B001A80164 /* VariableList.m */; name = "struct variable *keyval = getrealnvar(rowIndex);"; rLen = 84; rLoc = 422; rType = 0; vrLen = 767; vrLoc = 96; }; 2754E81708C10043007F45CF /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = F5B29D6E01F7393A01A80164 /* scanner.l */; name = "return(NUMBER); }"; rLen = 24; rLoc = 8655; rType = 0; vrLen = 1484; vrLoc = 7560; }; 2754E8CB08C126B6007F45CF /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 27BDF4C4059F712100CF1DF6 /* simpleCalc.c */; name = "simpleCalc.c: simpleEval"; rLen = 0; rLoc = 371; rType = 0; vrLen = 1060; vrLoc = 0; }; 275710BD042D0472004ACA36 /* files.c */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {742, 3850}}"; sepNavSelRange = "{2394, 65}"; sepNavVisRect = "{{0, 1344}, {742, 154}}"; }; }; 275D2B270C4DDA3B0056D137 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 27FAECF0093FAE5A00D7EE3E /* InspectorController.h */; name = "InspectorController.h: historyList"; rLen = 0; rLoc = 225; rType = 0; vrLen = 395; vrLoc = 0; }; 275D2B5C0C5032E50056D137 /* WcalcService.h */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {642, 417}}"; sepNavSelRange = "{315, 0}"; sepNavVisRect = "{{0, 0}, {642, 417}}"; }; }; 275D2B5D0C5032E50056D137 /* WcalcService.m */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {642, 1050}}"; sepNavSelRange = "{794, 0}"; sepNavVisRect = "{{0, 212}, {642, 417}}"; sepNavWindowFrame = "{{15, 259}, {879, 764}}"; }; }; 275D2C930C50346B0056D137 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 275D2B5C0C5032E50056D137 /* WcalcService.h */; name = "WcalcService.h: 1"; rLen = 0; rLoc = 0; rType = 0; vrLen = 210; vrLoc = 0; }; 275D2C940C50346B0056D137 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 275D2B5D0C5032E50056D137 /* WcalcService.m */; name = "WcalcService.m: 46"; rLen = 0; rLoc = 2222; rType = 0; vrLen = 1138; vrLoc = 129; }; 275D2CC00C5137330056D137 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = F5A165F7030711ED01A80164 /* ConversionList.h */; name = "ConversionList.h: 14"; rLen = 0; rLoc = 383; rType = 0; vrLen = 384; vrLoc = 0; }; 275D2D690C5144DD0056D137 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 275D2B5C0C5032E50056D137 /* WcalcService.h */; name = "WcalcService.h: historyList"; rLen = 0; rLoc = 315; rType = 0; vrLen = 324; vrLoc = 0; }; 275D2DA60C5148550056D137 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 275D2B5D0C5032E50056D137 /* WcalcService.m */; name = "WcalcService.m: 30"; rLen = 0; rLoc = 794; rType = 0; vrLen = 1105; vrLoc = 391; }; 276C7002091D1AB7005A5B75 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = F5B29D6E01F7393A01A80164 /* scanner.l */; name = "scanner.l: 333"; rLen = 0; rLoc = 12226; rType = 0; vrLen = 958; vrLoc = 11505; }; 2773DCF40917EF3400DBDA9D /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 272C375F08C3FDAF009EA18F /* number_formatting.h */; name = "number_formatting.h: 8"; rLen = 0; rLoc = 164; rType = 0; vrLen = 164; vrLoc = 0; }; 2773DCF80917EF3400DBDA9D /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 272C375F08C3FDAF009EA18F /* number_formatting.h */; name = "number_formatting.h: 8"; rLen = 0; rLoc = 164; rType = 0; vrLen = 164; vrLoc = 0; }; 2773DD3209180D4300DBDA9D /* wcalc */ = { activeExec = 0; executables = ( 2773DD5009180D4300DBDA9D /* wcalc */, ); }; 2773DD5009180D4300DBDA9D /* wcalc */ = { isa = PBXExecutable; activeArgIndices = ( ); argumentStrings = ( ); autoAttachOnCrash = 1; breakpointsEnabled = 1; configStateDict = { }; customDataFormattersEnabled = 1; debuggerPlugin = GDBDebugging; disassemblyDisplayState = 0; dylibVariantSuffix = ""; enableDebugStr = 1; environmentEntries = ( ); executableSystemSymbolLevel = 0; executableUserSymbolLevel = 0; libgmallocEnabled = 0; name = wcalc; savedGlobals = { }; sourceDirectories = ( ); }; 277DB27D042F5173004ACA36 /* COPYING */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {487, 4774}}"; sepNavSelRange = "{0, 0}"; sepNavVisRect = "{{0, 0}, {487, 261}}"; }; }; 277DB27F042F51A5004ACA36 /* NEWS */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {704, 4578}}"; sepNavSelRange = "{0, 0}"; sepNavVisRect = "{{0, 0}, {621, 417}}"; }; }; 278131A50C7CDB3B00EF848E /* WcalcController.m:606 */ = { isa = PBXFileBreakpoint; actions = ( ); breakpointStyle = 0; continueAfterActions = 0; countType = 0; delayBeforeContinue = 0; fileReference = F5B29D7801F7395001A80164 /* WcalcController.m */; functionName = "-enterData:"; hitCount = 0; ignoreCount = 0; lineNumber = 606; location = Wcalc; modificationTime = 246742379.307924; state = 1; }; 278132170C7CF38500EF848E /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = F5B29D6A01F7392301A80164 /* ErrorController.m */; name = "ErrorController.m: 1"; rLen = 0; rLoc = 8; rType = 0; vrLen = 570; vrLoc = 0; }; 2781321D0C7CF3D300EF848E /* simpleCalc.c:45 */ = { isa = PBXFileBreakpoint; actions = ( ); breakpointStyle = 0; continueAfterActions = 0; countType = 0; delayBeforeContinue = 0; fileReference = 27BDF4C4059F712100CF1DF6 /* simpleCalc.c */; functionName = "simpleCalc()"; hitCount = 0; ignoreCount = 0; lineNumber = 45; location = Wcalc; modificationTime = 246742379.307934; state = 1; }; 278132280C7CF5DF00EF848E /* MyTextField.m:113 */ = { isa = PBXFileBreakpoint; actions = ( ); breakpointStyle = 0; continueAfterActions = 0; countType = 0; delayBeforeContinue = 0; fileReference = F5D446D10263B46801A80164 /* MyTextField.m */; functionName = "-keyUp:"; hitCount = 0; ignoreCount = 0; lineNumber = 113; location = Wcalc; modificationTime = 246742379.307943; state = 1; }; 2781326D0C7E07BB00EF848E /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 27BDF4C4059F712100CF1DF6 /* simpleCalc.c */; name = "simpleCalc.c: 110"; rLen = 0; rLoc = 2976; rType = 0; vrLen = 1208; vrLoc = 811; }; 2789AAE40EB178B0008DEB99 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = F5D446D10263B46801A80164 /* MyTextField.m */; name = "MyTextField.m: 124"; rLen = 0; rLoc = 3141; rType = 0; vrLen = 928; vrLoc = 2323; }; 2789AAE60EB178B0008DEB99 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 2789AAE70EB178B0008DEB99 /* gmp.h */; name = "gmp.h: 1607"; rLen = 2; rLoc = 61886; rType = 0; vrLen = 1766; vrLoc = 61000; }; 2789AAE70EB178B0008DEB99 /* gmp.h */ = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = gmp.h; path = /opt/local/include/gmp.h; sourceTree = ""; }; 2789AAE90EB178B0008DEB99 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 089C165DFE840E0CC02AAC07 /* English */; name = "InfoPlist.strings: 7"; rLen = 0; rLoc = 258; rType = 0; vrLen = 258; vrLoc = 0; }; 2789AAEA0EB178B0008DEB99 /* PBXBookmark */ = { isa = PBXBookmark; fRef = 2789AAD90EB1772B008DEB99 /* NewWcalc.icns */; }; 2789AAEE0EB178B0008DEB99 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 2789AAEF0EB178B0008DEB99 /* gmp.h */; name = "gmp.h: 1607"; rLen = 2; rLoc = 61886; rType = 0; vrLen = 1766; vrLoc = 61000; }; 2789AAEF0EB178B0008DEB99 /* gmp.h */ = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = gmp.h; path = /opt/local/include/gmp.h; sourceTree = ""; }; 2789AAF30EB178B0008DEB99 /* PBXBookmark */ = { isa = PBXBookmark; fRef = 2789AAD90EB1772B008DEB99 /* NewWcalc.icns */; }; 2789AB560EB18869008DEB99 /* WcalcController.m:919 */ = { isa = PBXFileBreakpoint; actions = ( ); breakpointStyle = 0; continueAfterActions = 0; countType = 0; delayBeforeContinue = 0; fileReference = F5B29D7801F7395001A80164 /* WcalcController.m */; functionName = "-setPrefs:"; hitCount = 0; ignoreCount = 0; lineNumber = 919; location = Wcalc; modificationTime = 246742077.302476; state = 2; }; 2789AB640EB18A8E008DEB99 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = F5B29D6501F7391601A80164 /* calculator.c */; name = "calculator.c: 943"; rLen = 0; rLoc = 23210; rType = 0; vrLen = 1089; vrLoc = 12179; }; 2789AB6D0EB18E9F008DEB99 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 2729A40109B1ECE5001F07F4 /* add_commas.c */; name = "add_commas.c: 1"; rLen = 0; rLoc = 0; rType = 0; vrLen = 1111; vrLoc = 0; }; 2789AB6E0EB18E9F008DEB99 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 2729A40109B1ECE5001F07F4 /* add_commas.c */; name = "add_commas.c: 1"; rLen = 0; rLoc = 0; rType = 0; vrLen = 1111; vrLoc = 0; }; 2798434D0E084DE100CE1ED5 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 2704376B0C4584640024DB8D /* number.h */; name = "number.h: 19"; rLen = 17; rLoc = 311; rType = 0; vrLen = 921; vrLoc = 0; }; 279843660E08515400CE1ED5 /* scanner.yy.c */ = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = scanner.yy.c; path = "/Users/kyle/Wcalc_Development/Wcalc/build/Wcalc.build/Deployment 10.3.9/Wcalc.app.build/DerivedSources/scanner.yy.c"; sourceTree = ""; }; 2798437B0E0851D500CE1ED5 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 279843660E08515400CE1ED5 /* scanner.yy.c */; name = "scanner.yy.c: 3634"; rLen = 68; rLoc = 133960; rType = 0; vrLen = 870; vrLoc = 133325; }; 2798437D0E0851D500CE1ED5 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 279843660E08515400CE1ED5 /* scanner.yy.c */; name = "scanner.yy.c: 3634"; rLen = 68; rLoc = 133960; rType = 0; vrLen = 870; vrLoc = 133325; }; 2799DA4403FAD61400CA71DD /* help.c */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {774, 1834}}"; sepNavSelRange = "{335, 121}"; sepNavVisRange = "{0, 1156}"; sepNavVisRect = "{{0, 679}, {705, 449}}"; sepNavWindowFrame = "{{15, 183}, {750, 558}}"; }; }; 279AB4210D5CDB02002AFBEA /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = F5DD321702F8F43501A80164 /* conversion.h */; name = "ssize_t identify_unit(const char *unit);"; rLen = 41; rLoc = 417; rType = 0; vrLen = 564; vrLoc = 81; }; 27B38FB5085A077900C2FE3C /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = F5B29D7801F7395001A80164 /* WcalcController.m */; name = "WcalcController.m: 876"; rLen = 0; rLoc = 36682; rType = 0; vrLen = 1790; vrLoc = 25728; }; 27B4AFFD09C1EE4F00EE3874 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = F574E09A01FD0FD701A80164 /* HistoryList.m */; name = "HistoryList.m: 50"; rLen = 0; rLoc = 1141; rType = 0; vrLen = 1353; vrLoc = 594; }; 27BDF4C4059F712100CF1DF6 /* simpleCalc.c */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {536, 2128}}"; sepNavSelRange = "{1065, 0}"; sepNavVisRect = "{{0, 299}, {480, 648}}"; }; }; 27BDF4C5059F712100CF1DF6 /* simpleCalc.h */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {742, 154}}"; sepNavSelRange = "{85, 0}"; sepNavVisRect = "{{0, 0}, {742, 154}}"; }; }; 27C1F2E80A61AF0C0072F397 /* WcalcController.m:747 */ = { isa = PBXFileBreakpoint; actions = ( ); breakpointStyle = 0; continueAfterActions = 0; countType = 0; delayBeforeContinue = 0; fileReference = F5B29D7801F7395001A80164 /* WcalcController.m */; functionName = "-setPrefs:"; hitCount = 0; ignoreCount = 0; lineNumber = 747; location = Wcalc; modificationTime = 246742379.3079039; state = 1; }; 27C1F3530A622C980072F397 /* ThrottledSlider.m */ = { isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = ThrottledSlider.m; path = /Users/kyle/Wcalc_Development/Wcalc/ThrottledSlider.m; sourceTree = ""; }; 27C1F3590A622F000072F397 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 2729A53609B256DA001F07F4 /* PersVarList.h */; name = "PersVarList.h: theWindow"; rLen = 0; rLoc = 164; rType = 0; vrLen = 302; vrLoc = 0; }; 27C1F3810A6232230072F397 /* ThrottledSlider.m:13 */ = { isa = PBXFileBreakpoint; actions = ( ); breakpointStyle = 0; continueAfterActions = 0; countType = 0; delayBeforeContinue = 0; fileReference = 27C1F3530A622C980072F397 /* ThrottledSlider.m */; functionName = "-sendAction:to:"; hitCount = 0; ignoreCount = 0; lineNumber = 13; modificationTime = 246742379.307915; state = 1; }; 27C40A7809B5DA910043C42F /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 2729A53709B256DA001F07F4 /* PersVarList.m */; name = "PersVarList.m: 152"; rLen = 468; rLoc = 3677; rType = 0; vrLen = 1255; vrLoc = 3312; }; 27C40AAF09B5E58B0043C42F /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = F521994801FA927601A80164 /* ChangeLog */; name = "ChangeLog: 1824"; rLen = 0; rLoc = 43050; rType = 0; vrLen = 538; vrLoc = 0; }; 27C40B6709B623D00043C42F /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = F574E09901FD0FD701A80164 /* HistoryList.h */; name = "HistoryList.h: copyMe:"; rLen = 0; rLoc = 415; rType = 0; vrLen = 451; vrLoc = 0; }; 27C40B8909B626690043C42F /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = F521994301FA86B001A80164 /* VariableList.m */; name = "VariableList.m: 124"; rLen = 0; rLoc = 3398; rType = 0; vrLen = 1043; vrLoc = 2592; }; 27C40BBB09B628F50043C42F /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = F521994601FA8EC401A80164 /* VariableList.h */; name = "- (IBAction)copyMe:(id)sender;"; rLen = 31; rLoc = 537; rType = 0; vrLen = 573; vrLoc = 0; }; 27D39127059BEA850035F25F /* Wcalc.app */ = { activeExec = 0; executables = ( 27D3915B059BEA860035F25F /* Wcalc.app */, ); }; 27D3915B059BEA860035F25F /* Wcalc.app */ = { isa = PBXExecutable; activeArgIndices = ( ); argumentStrings = ( ); autoAttachOnCrash = 1; breakpointsEnabled = 1; configStateDict = { }; customDataFormattersEnabled = 1; debuggerPlugin = GDBDebugging; disassemblyDisplayState = 0; dylibVariantSuffix = ""; enableDebugStr = 1; environmentEntries = ( ); executableSystemSymbolLevel = 0; executableUserSymbolLevel = 0; libgmallocEnabled = 0; name = Wcalc.app; savedGlobals = { }; sourceDirectories = ( ); variableFormatDictionary = { }; }; 27DA4EAE0521141D00F8327E /* Source Control */ = { isa = PBXSourceControlManager; fallbackIsa = XCSourceControlManager; isSCMEnabled = 0; scmConfiguration = { }; scmType = scm.cvs; }; 27DA4EAF0521141D00F8327E /* Code sense */ = { isa = PBXCodeSenseManager; indexTemplatePath = ""; }; 27E050E50918749700928DC2 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = F574E09D01FD122F01A80164 /* historyManager.h */; name = "historyManager.h: 1"; rLen = 0; rLoc = 0; rType = 0; vrLen = 397; vrLoc = 0; }; 27E050E60918749700928DC2 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = F574E09D01FD122F01A80164 /* historyManager.h */; name = "historyManager.h: 1"; rLen = 0; rLoc = 0; rType = 0; vrLen = 397; vrLoc = 0; }; 27EC73FD0992B6BB0097E39E /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = F5B29D7301F7394501A80164 /* variables.c */; name = "variables.c: 259"; rLen = 0; rLoc = 6125; rType = 0; vrLen = 863; vrLoc = 2475; }; 27EC73FE0992B6BB0097E39E /* PBXBookmark */ = { isa = PBXBookmark; fRef = F5B29D8301F73C2701A80164 /* w.png */; }; 27FAECD6093FAA8400D7EE3E /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = F5EF54D302022A7001A80164 /* theDelegate.h */; name = "theDelegate.h: 3"; rLen = 0; rLoc = 27; rType = 0; vrLen = 200; vrLoc = 0; }; 27FAECD7093FAA8400D7EE3E /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = F5EF54D202022A7001A80164 /* theDelegate.m */; name = "theDelegate.m: 1"; rLen = 0; rLoc = 8; rType = 0; vrLen = 155; vrLoc = 0; }; 27FAECF0093FAE5A00D7EE3E /* InspectorController.h */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {642, 609}}"; sepNavSelRange = "{225, 0}"; sepNavVisRect = "{{0, 0}, {642, 609}}"; }; }; 27FAECF1093FAE5A00D7EE3E /* InspectorController.m */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {902, 616}}"; sepNavSelRange = "{1173, 0}"; sepNavVisRect = "{{0, 330}, {642, 286}}"; }; }; 27FAED01093FAF2400D7EE3E /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 27FAECF1093FAE5A00D7EE3E /* InspectorController.m */; name = "InspectorController.m: 1"; rLen = 0; rLoc = 0; rType = 0; vrLen = 146; vrLoc = 0; }; 27FAED1B093FB0BB00D7EE3E /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 27FAECF0093FAE5A00D7EE3E /* InspectorController.h */; name = "InspectorController.h: 13"; rLen = 0; rLoc = 395; rType = 0; vrLen = 239; vrLoc = 0; }; 29B97313FDCFA39411CA2CEA /* Project object */ = { activeArchitecturePreference = i386; activeBuildConfigurationName = "Deployment Universal"; activeExecutable = 27D3915B059BEA860035F25F /* Wcalc.app */; activeTarget = 27D39127059BEA850035F25F /* Wcalc.app */; addToTargets = ( 2773DD3209180D4300DBDA9D /* wcalc */, ); breakpoints = ( 27C1F2E80A61AF0C0072F397 /* WcalcController.m:747 */, 27C1F3810A6232230072F397 /* ThrottledSlider.m:13 */, 278131A50C7CDB3B00EF848E /* WcalcController.m:606 */, 2781321D0C7CF3D300EF848E /* simpleCalc.c:45 */, 278132280C7CF5DF00EF848E /* MyTextField.m:113 */, 272C359B08C1557A009EA18F /* WcalcController.m:430 */, 2789AB560EB18869008DEB99 /* WcalcController.m:919 */, ); codeSenseManager = 27DA4EAF0521141D00F8327E /* Code sense */; executables = ( 27D3915B059BEA860035F25F /* Wcalc.app */, 2773DD5009180D4300DBDA9D /* wcalc */, ); expressions = ( "[sender tag]", ); perUserDictionary = { "PBXConfiguration.PBXBreakpointsDataSource.v1:1CA1AED706398EBD00589147" = { PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; PBXFileTableDataSourceColumnSortingKey = PBXBreakpointsDataSource_BreakpointID; PBXFileTableDataSourceColumnWidthsKey = ( 20, 20, 210, 20, 110, 109, 20, ); PBXFileTableDataSourceColumnsKey = ( PBXBreakpointsDataSource_ActionID, PBXBreakpointsDataSource_TypeID, PBXBreakpointsDataSource_BreakpointID, PBXBreakpointsDataSource_UseID, PBXBreakpointsDataSource_LocationID, PBXBreakpointsDataSource_ConditionID, PBXBreakpointsDataSource_ContinueID, ); }; PBXConfiguration.PBXFileTableDataSource3.PBXErrorsWarningsDataSource = { PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; PBXFileTableDataSourceColumnSortingKey = PBXErrorsWarningsDataSource_LocationID; PBXFileTableDataSourceColumnWidthsKey = ( 20, 295.8799, 170.2085, ); PBXFileTableDataSourceColumnsKey = ( PBXErrorsWarningsDataSource_TypeID, PBXErrorsWarningsDataSource_MessageID, PBXErrorsWarningsDataSource_LocationID, ); }; PBXConfiguration.PBXFileTableDataSource3.PBXExecutablesDataSource = { PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; PBXFileTableDataSourceColumnSortingKey = PBXExecutablesDataSource_NameID; PBXFileTableDataSourceColumnWidthsKey = ( 22, 300, 454.58349609375, ); PBXFileTableDataSourceColumnsKey = ( PBXExecutablesDataSource_ActiveFlagID, PBXExecutablesDataSource_NameID, PBXExecutablesDataSource_CommentsID, ); }; PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = { PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID; PBXFileTableDataSourceColumnWidthsKey = ( 20, 562, 20, 53, 43, 43, 20, ); PBXFileTableDataSourceColumnsKey = ( PBXFileDataSource_FiletypeID, PBXFileDataSource_Filename_ColumnID, PBXFileDataSource_Built_ColumnID, PBXFileDataSource_ObjectSize_ColumnID, PBXFileDataSource_Errors_ColumnID, PBXFileDataSource_Warnings_ColumnID, PBXFileDataSource_Target_ColumnID, ); }; PBXConfiguration.PBXFileTableDataSource3.PBXSymbolsDataSource = { PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; PBXFileTableDataSourceColumnSortingKey = PBXSymbolsDataSource_SymbolNameID; PBXFileTableDataSourceColumnWidthsKey = ( 16, 200, 50, 200, ); PBXFileTableDataSourceColumnsKey = ( PBXSymbolsDataSource_SymbolTypeIconID, PBXSymbolsDataSource_SymbolNameID, PBXSymbolsDataSource_SymbolTypeID, PBXSymbolsDataSource_ReferenceNameID, ); }; PBXConfiguration.PBXTargetDataSource.PBXTargetDataSource = { PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID; PBXFileTableDataSourceColumnWidthsKey = ( 20, 521, 60, 20, 54, 43, 43, ); PBXFileTableDataSourceColumnsKey = ( PBXFileDataSource_FiletypeID, PBXFileDataSource_Filename_ColumnID, PBXTargetDataSource_PrimaryAttribute, PBXFileDataSource_Built_ColumnID, PBXFileDataSource_ObjectSize_ColumnID, PBXFileDataSource_Errors_ColumnID, PBXFileDataSource_Warnings_ColumnID, ); }; PBXPerProjectTemplateStateSaveDate = 246748178; PBXPrepackagedSmartGroups_v2 = ( { PBXTransientLocationAtTop = bottom; absolutePathToBundle = ""; activationKey = OldTargetSmartGroup; clz = PBXTargetSmartGroup; description = "Displays all targets of the project."; globalID = 1C37FABC04509CD000000102; name = Targets; preferences = { image = Targets; }; }, { PBXTransientLocationAtTop = bottom; absolutePathToBundle = ""; clz = PBXTargetSmartGroup2; description = "Displays all targets of the project as well as nested build phases."; globalID = 1C37FBAC04509CD000000102; name = Targets; preferences = { image = Targets; }; }, { PBXTransientLocationAtTop = bottom; absolutePathToBundle = ""; clz = PBXExecutablesSmartGroup; description = "Displays all executables of the project."; globalID = 1C37FAAC04509CD000000102; name = Executables; preferences = { image = Executable; }; }, { " PBXTransientLocationAtTop " = bottom; absolutePathToBundle = ""; clz = PBXErrorsWarningsSmartGroup; description = "Displays files with errors or warnings."; globalID = 1C08E77C0454961000C914BD; name = "Errors and Warnings"; preferences = { fnmatch = ""; image = WarningsErrors; recursive = 1; regex = ""; root = ""; }; }, { PBXTransientLocationAtTop = bottom; absolutePathToBundle = ""; clz = PBXFilenameSmartGroup; description = "Filters items in a given group (potentially recursively) based on matching the name with the regular expression of the filter."; globalID = 1CC0EA4004350EF90044410B; name = "Implementation Files"; preferences = { canSave = 1; fnmatch = ""; image = SmartFolder; isLeaf = 0; recursive = 1; regex = "?*\\.[mcMC]"; root = ""; }; }, { PBXTransientLocationAtTop = bottom; absolutePathToBundle = ""; clz = PBXFilenameSmartGroup; description = "This group displays Interface Builder NIB Files."; globalID = 1CC0EA4004350EF90041110B; name = "NIB Files"; preferences = { canSave = 1; fnmatch = "*.nib"; image = SmartFolder; isLeaf = 0; recursive = 1; regex = ""; root = ""; }; }, { PBXTransientLocationAtTop = no; absolutePathToBundle = ""; clz = PBXFindSmartGroup; description = "Displays Find Results."; globalID = 1C37FABC05509CD000000102; name = "Find Results"; preferences = { image = spyglass; }; }, { PBXTransientLocationAtTop = no; absolutePathToBundle = ""; clz = PBXBookmarksSmartGroup; description = "Displays Project Bookmarks."; globalID = 1C37FABC05539CD112110102; name = Bookmarks; preferences = { image = Bookmarks; }; }, { PBXTransientLocationAtTop = bottom; absolutePathToBundle = ""; clz = XCSCMSmartGroup; description = "Displays files with interesting SCM status."; globalID = E2644B35053B69B200211256; name = SCM; preferences = { image = PBXRepository; isLeaf = 0; }; }, { PBXTransientLocationAtTop = bottom; absolutePathToBundle = ""; clz = PBXSymbolsSmartGroup; description = "Displays all symbols for the project."; globalID = 1C37FABC04509CD000100104; name = "Project Symbols"; preferences = { image = ProjectSymbols; isLeaf = 1; }; }, { PBXTransientLocationAtTop = bottom; absolutePathToBundle = ""; clz = PBXFilenameSmartGroup; description = "Filters items in a given group (potentially recursively) based on matching the name with the regular expression of the filter."; globalID = PBXTemplateMarker; name = "Simple Filter SmartGroup"; preferences = { canSave = 1; fnmatch = "*.nib"; image = SmartFolder; isLeaf = 0; recursive = 1; regex = ""; root = ""; }; }, { PBXTransientLocationAtTop = bottom; absolutePathToBundle = ""; clz = PBXFilenameSmartGroup; description = "Filters items in a given group (potentially recursively) based on matching the name with the regular expression of the filter."; globalID = PBXTemplateMarker; name = "Simple Regular Expression SmartGroup"; preferences = { canSave = 1; fnmatch = ""; image = SmartFolder; isLeaf = 0; recursive = 1; regex = "?*\\.[mcMC]"; root = ""; }; }, ); PBXWorkspaceContents = ( { PBXProjectWorkspaceModule_StateKey_Rev39 = { PBXProjectWorkspaceModule_DEGV_Geometry = { _collapsingFrameDimension = 0; _indexOfCollapsedView = 0; _percentageOfCollapsedView = 0; isCollapsed = yes; sizes = ( "{{0, 0}, {513, 116}}", "{{0, 116}, {513, 421}}", ); }; PBXProjectWorkspaceModule_DataSourceSelectionKey_Rev6 = { BoundsStr = "{{0, 0}, {498, 690}}"; Rows = ( 0, ); VisibleRectStr = "{{0, 0}, {498, 99}}"; }; PBXProjectWorkspaceModule_EditorOpen = true; PBXProjectWorkspaceModule_EmbeddedNavigatorGroup = { PBXSplitModuleInNavigatorKey = { Split0 = { bookmark = 277C267905A234BA00BF1623; history = ( 2711C66D059CCD3A00548DB5, 27BDF440059EC0BB00CF1DF6, 27BDF49F059EC32400CF1DF6, 27EF1EBE059F763500381F74, 27EF1ECA059F776A00381F74, 27EF1EDB059F77C300381F74, 27EF1EF6059F783B00381F74, 27EF1F1105A003DD00381F74, 27EF1F1A05A011F900381F74, 277C260005A08F6500BF1623, 277C260805A0912B00BF1623, 277C261805A091FD00BF1623, 277C262905A0D68E00BF1623, 277C263605A0D6D500BF1623, 277C263B05A0D6D700BF1623, 277C264A05A0D6E200BF1623, 277C264F05A0DADE00BF1623, 277C265705A0DD5F00BF1623, 277C267305A0E66300BF1623, 277C263105A0D6AB00BF1623, ); prevStack = ( 2711C66A059CCD2500548DB5, 2711C66F059CCD3A00548DB5, 2711C674059E9FC800548DB5, 2711C678059E9FDA00548DB5, 27BDF405059EBE2400CF1DF6, 27BDF438059EC09800CF1DF6, 27BDF4A1059EC32400CF1DF6, 27EF1EAD059F75CE00381F74, 27EF1EC0059F763500381F74, 27EF1ECC059F776A00381F74, 27EF1EF8059F783B00381F74, 277C25FD05A08F6000BF1623, 277C260205A08F6500BF1623, 277C260905A0912B00BF1623, 277C261505A091F900BF1623, 277C261905A091FD00BF1623, 277C262B05A0D68E00BF1623, 277C263305A0D6AB00BF1623, 277C263805A0D6D500BF1623, 277C263D05A0D6D700BF1623, 277C264205A0D6DA00BF1623, 277C264705A0D6DE00BF1623, 277C264C05A0D6E200BF1623, 277C265005A0DADE00BF1623, 277C265405A0DD5D00BF1623, 277C265805A0DD5F00BF1623, 277C267405A0E66300BF1623, ); }; SplitCount = 1; }; }; PBXProjectWorkspaceModule_GeometryKey_Rev15 = { PBXProjectWorkspaceModule_SGTM_Geometry = { _collapsingFrameDimension = 0; _indexOfCollapsedView = 0; _percentageOfCollapsedView = 0; sizes = ( "{{0, 0}, {217, 537}}", "{{217, 0}, {513, 537}}", ); }; }; PBXProjectWorkspaceModule_OldDetailFrame = "{{0, 0}, {513, 116}}"; PBXProjectWorkspaceModule_OldEditorFrame = "{{0, 116}, {513, 421}}"; PBXProjectWorkspaceModule_OldSuperviewFrame = "{{217, 0}, {513, 537}}"; PBXProjectWorkspaceModule_SGTM = { PBXBottomSmartGroupGIDs = ( 1C37FBAC04509CD000000102, 1C37FAAC04509CD000000102, 1C08E77C0454961000C914BD, 1CC0EA4004350EF90044410B, 1CC0EA4004350EF90041110B, 1C37FABC05509CD000000102, 1C37FABC05539CD112110102, E2644B35053B69B200211256, 1C37FABC04509CD000100104, ); PBXSmartGroupTreeModuleColumnData = { PBXSmartGroupTreeModuleColumnWidthsKey = ( 200, ); PBXSmartGroupTreeModuleColumnsKey_v4 = ( MainColumn, ); }; PBXSmartGroupTreeModuleOutlineStateKey_v7 = { PBXSmartGroupTreeModuleOutlineStateExpansionKey = ( 1C37FBAC04509CD000000102, ); PBXSmartGroupTreeModuleOutlineStateSelectionKey = ( ( 4, 1, ), ); PBXSmartGroupTreeModuleOutlineStateVisibleRectKey = "{{0, 0}, {200, 519}}"; }; PBXTopSmartGroupGIDs = ( ); }; }; }, ); "PBXWorkspaceContents:PBXConfiguration.PBXModule.PBXBuildResultsModule" = { }; "PBXWorkspaceContents:PBXConfiguration.PBXModule.PBXCVSModule" = { }; "PBXWorkspaceContents:PBXConfiguration.PBXModule.PBXDebugCLIModule" = { }; "PBXWorkspaceContents:PBXConfiguration.PBXModule.PBXDebugSessionModule" = { Debugger = { HorizontalSplitView = { _collapsingFrameDimension = 0; _indexOfCollapsedView = 0; _percentageOfCollapsedView = 0; isCollapsed = yes; sizes = ( "{{0, 0}, {283, 206}}", "{{283, 0}, {462, 206}}", ); }; VerticalSplitView = { _collapsingFrameDimension = 0; _indexOfCollapsedView = 0; _percentageOfCollapsedView = 0; isCollapsed = yes; sizes = ( "{{0, 0}, {745, 206}}", "{{0, 206}, {745, 216}}", ); }; }; LauncherConfigVersion = 8; }; "PBXWorkspaceContents:PBXConfiguration.PBXModule.PBXNavigatorGroup" = { PBXSplitModuleInNavigatorKey = { SplitCount = 1; }; }; "PBXWorkspaceContents:PBXConfiguration.PBXModule.PBXProjectWorkspaceModule" = { PBXProjectWorkspaceModule_StateKey_Rev39 = { PBXProjectWorkspaceModule_DEGV_Geometry = { _collapsingFrameDimension = 0; _indexOfCollapsedView = 0; _percentageOfCollapsedView = 0; isCollapsed = yes; sizes = ( "{{0, 0}, {513, 116}}", "{{0, 116}, {513, 421}}", ); }; PBXProjectWorkspaceModule_DataSourceSelectionKey_Rev6 = { BoundsStr = "{{0, 0}, {498, 99}}"; Rows = ( 0, ); VisibleRectStr = "{{0, 0}, {498, 99}}"; }; PBXProjectWorkspaceModule_EditorOpen = true; PBXProjectWorkspaceModule_EmbeddedNavigatorGroup = { PBXSplitModuleInNavigatorKey = { Split0 = { bookmark = 277C265D05A0DD7600BF1623; history = ( 2711C66D059CCD3A00548DB5, 27BDF440059EC0BB00CF1DF6, 27BDF49F059EC32400CF1DF6, 27EF1EBE059F763500381F74, 27EF1ECA059F776A00381F74, 27EF1EDB059F77C300381F74, 27EF1EF6059F783B00381F74, 27EF1F1105A003DD00381F74, 27EF1F1A05A011F900381F74, 277C260005A08F6500BF1623, 277C260805A0912B00BF1623, 277C261805A091FD00BF1623, 277C262905A0D68E00BF1623, 277C263105A0D6AB00BF1623, 277C263605A0D6D500BF1623, 277C263B05A0D6D700BF1623, 277C264A05A0D6E200BF1623, 277C264F05A0DADE00BF1623, 277C265705A0DD5F00BF1623, 277C265305A0DD5D00BF1623, ); prevStack = ( 2711C66A059CCD2500548DB5, 2711C66F059CCD3A00548DB5, 2711C674059E9FC800548DB5, 2711C678059E9FDA00548DB5, 27BDF405059EBE2400CF1DF6, 27BDF438059EC09800CF1DF6, 27BDF4A1059EC32400CF1DF6, 27EF1EAD059F75CE00381F74, 27EF1EC0059F763500381F74, 27EF1ECC059F776A00381F74, 27EF1EF8059F783B00381F74, 277C25FD05A08F6000BF1623, 277C260205A08F6500BF1623, 277C260905A0912B00BF1623, 277C261505A091F900BF1623, 277C261905A091FD00BF1623, 277C262B05A0D68E00BF1623, 277C263305A0D6AB00BF1623, 277C263805A0D6D500BF1623, 277C263D05A0D6D700BF1623, 277C264205A0D6DA00BF1623, 277C264705A0D6DE00BF1623, 277C264C05A0D6E200BF1623, 277C265005A0DADE00BF1623, 277C265405A0DD5D00BF1623, 277C265805A0DD5F00BF1623, ); }; SplitCount = 1; }; }; PBXProjectWorkspaceModule_GeometryKey_Rev15 = { PBXProjectWorkspaceModule_SGTM_Geometry = { _collapsingFrameDimension = 0; _indexOfCollapsedView = 0; _percentageOfCollapsedView = 0; sizes = ( "{{0, 0}, {217, 537}}", "{{217, 0}, {513, 537}}", ); }; }; PBXProjectWorkspaceModule_OldDetailFrame = "{{0, 0}, {513, 116}}"; PBXProjectWorkspaceModule_OldEditorFrame = "{{0, 116}, {513, 421}}"; PBXProjectWorkspaceModule_OldSuperviewFrame = "{{217, 0}, {513, 537}}"; PBXProjectWorkspaceModule_SGTM = { PBXBottomSmartGroupGIDs = ( 1C37FBAC04509CD000000102, 1C37FAAC04509CD000000102, 1C08E77C0454961000C914BD, 1CC0EA4004350EF90044410B, 1CC0EA4004350EF90041110B, 1C37FABC05509CD000000102, 1C37FABC05539CD112110102, E2644B35053B69B200211256, 1C37FABC04509CD000100104, ); PBXSmartGroupTreeModuleColumnData = { PBXSmartGroupTreeModuleColumnWidthsKey = ( 200, ); PBXSmartGroupTreeModuleColumnsKey_v4 = ( MainColumn, ); }; PBXSmartGroupTreeModuleOutlineStateKey_v7 = { PBXSmartGroupTreeModuleOutlineStateExpansionKey = ( 29B97314FDCFA39411CA2CEA, 080E96DDFE201D6D7F000001, 29B97317FDCFA39411CA2CEA, 1C08E77C0454961000C914BD, ); PBXSmartGroupTreeModuleOutlineStateSelectionKey = ( ( 28, 22, 0, ), ); PBXSmartGroupTreeModuleOutlineStateVisibleRectKey = "{{0, 110}, {200, 519}}"; }; PBXTopSmartGroupGIDs = ( ); }; }; }; "PBXWorkspaceContents:PBXConfiguration.PBXModule.PBXRunSessionModule" = { LauncherConfigVersion = 3; Runner = { HorizontalSplitView = { _collapsingFrameDimension = 0; _indexOfCollapsedView = 0; _percentageOfCollapsedView = 0; isCollapsed = yes; sizes = ( "{{0, 0}, {491, 167}}", "{{0, 176}, {491, 267}}", ); }; VerticalSplitView = { _collapsingFrameDimension = 0; _indexOfCollapsedView = 0; _percentageOfCollapsedView = 0; isCollapsed = yes; sizes = ( "{{0, 0}, {405, 443}}", "{{414, 0}, {514, 443}}", ); }; }; }; PBXWorkspaceGeometries = ( { Frame = "{{0, 0}, {730, 537}}"; PBXProjectWorkspaceModule_GeometryKey_Rev15 = { }; RubberWindowFrame = "356 167 730 579 0 0 1152 746 "; }, ); "PBXWorkspaceGeometries:PBXConfiguration.PBXModule.PBXBuildResultsModule" = { Frame = "{{0, 0}, {570, 346}}"; PBXModuleWindowStatusBarHidden = YES; RubberWindowFrame = "501 123 570 367 0 0 1152 746 "; }; "PBXWorkspaceGeometries:PBXConfiguration.PBXModule.PBXCVSModule" = { Frame = "{{0, 0}, {482, 276}}"; RubberWindowFrame = "671 428 482 318 0 0 1152 746 "; }; "PBXWorkspaceGeometries:PBXConfiguration.PBXModule.PBXDebugCLIModule" = { Frame = "{{0, 0}, {400, 201}}"; PBXModuleWindowStatusBarHidden = YES; RubberWindowFrame = "50 718 400 222 0 0 1152 746 "; }; "PBXWorkspaceGeometries:PBXConfiguration.PBXModule.PBXDebugSessionModule" = { DebugConsoleDrawerSize = "{100, 120}"; DebugConsoleVisible = Drawer; DebugConsoleWindowFrame = "{{200, 200}, {500, 300}}"; DebugSTDIOWindowFrame = "{{200, 200}, {500, 300}}"; Frame = "{{0, 0}, {745, 422}}"; RubberWindowFrame = "307 274 745 464 0 0 1152 746 "; }; "PBXWorkspaceGeometries:PBXConfiguration.PBXModule.PBXNavigatorGroup" = { Frame = "{{0, 0}, {750, 481}}"; PBXModuleWindowStatusBarHidden = YES; RubberWindowFrame = "15 239 750 502 0 0 1152 746 "; }; "PBXWorkspaceGeometries:PBXConfiguration.PBXModule.PBXProjectWorkspaceModule" = { Frame = "{{0, 0}, {730, 537}}"; PBXProjectWorkspaceModule_GeometryKey_Rev15 = { }; RubberWindowFrame = "356 167 730 579 0 0 1152 746 "; }; "PBXWorkspaceGeometries:PBXConfiguration.PBXModule.PBXRunSessionModule" = { Frame = "{{0, 0}, {745, 443}}"; PBXModuleWindowStatusBarHidden = YES; RubberWindowFrame = "455 165 745 464 0 0 1152 746 "; }; PBXWorkspaceStateSaveDate = 246748178; }; perUserProjectItems = { 270437A10C458C830024DB8D /* PBXTextBookmark */ = 270437A10C458C830024DB8D /* PBXTextBookmark */; 27085D720EB3D3BE009B43DD /* PBXBookmark */ = 27085D720EB3D3BE009B43DD /* PBXBookmark */; 27085D7A0EB3D5AE009B43DD /* PBXTextBookmark */ = 27085D7A0EB3D5AE009B43DD /* PBXTextBookmark */; 27085D940EB3D881009B43DD /* PBXTextBookmark */ = 27085D940EB3D881009B43DD /* PBXTextBookmark */; 27085D990EB40B1B009B43DD /* PBXTextBookmark */ = 27085D990EB40B1B009B43DD /* PBXTextBookmark */; 27085DDF0EB41838009B43DD /* PBXTextBookmark */ = 27085DDF0EB41838009B43DD /* PBXTextBookmark */; 27085DF90EB418EC009B43DD /* PBXTextBookmark */ = 27085DF90EB418EC009B43DD /* PBXTextBookmark */; 27085E7F0EB4FC43009B43DD /* PBXTextBookmark */ = 27085E7F0EB4FC43009B43DD /* PBXTextBookmark */; 27085E8F0EB4FE3E009B43DD /* PlistBookmark */ = 27085E8F0EB4FE3E009B43DD /* PlistBookmark */; 27085E910EB4FE3E009B43DD /* PBXTextBookmark */ = 27085E910EB4FE3E009B43DD /* PBXTextBookmark */; 27085EB40EB4FFB8009B43DD /* PBXTextBookmark */ = 27085EB40EB4FFB8009B43DD /* PBXTextBookmark */; 27085F2D0EB51634009B43DD /* PBXTextBookmark */ = 27085F2D0EB51634009B43DD /* PBXTextBookmark */; 2721CBBA0865FD2800E3BB4D /* PBXTextBookmark */ = 2721CBBA0865FD2800E3BB4D /* PBXTextBookmark */; 2721CBC30865FD3C00E3BB4D /* PBXTextBookmark */ = 2721CBC30865FD3C00E3BB4D /* PBXTextBookmark */; 2721CBE90865FDFE00E3BB4D /* PBXTextBookmark */ = 2721CBE90865FDFE00E3BB4D /* PBXTextBookmark */; 2721CBFF086604FD00E3BB4D /* PBXTextBookmark */ = 2721CBFF086604FD00E3BB4D /* PBXTextBookmark */; 2721CC090866055400E3BB4D /* PBXBookmark */ = 2721CC090866055400E3BB4D /* PBXBookmark */; 2721CC4108660C9200E3BB4D /* PBXTextBookmark */ = 2721CC4108660C9200E3BB4D /* PBXTextBookmark */; 2721CC49086652BA00E3BB4D /* PBXTextBookmark */ = 2721CC49086652BA00E3BB4D /* PBXTextBookmark */; 2721CD220869C0C400E3BB4D /* PBXBookmark */ = 2721CD220869C0C400E3BB4D /* PBXBookmark */; 2721CD280869C0C400E3BB4D /* PBXTextBookmark */ = 2721CD280869C0C400E3BB4D /* PBXTextBookmark */; 2721CD2B0869C0C400E3BB4D /* PBXBookmark */ = 2721CD2B0869C0C400E3BB4D /* PBXBookmark */; 2721CD2C0869C0C400E3BB4D /* PBXBookmark */ = 2721CD2C0869C0C400E3BB4D /* PBXBookmark */; 2721CD2E0869C0C400E3BB4D /* PBXTextBookmark */ = 2721CD2E0869C0C400E3BB4D /* PBXTextBookmark */; 2729A45C09B22FE2001F07F4 /* PBXTextBookmark */ = 2729A45C09B22FE2001F07F4 /* PBXTextBookmark */; 2729A45D09B22FE2001F07F4 /* PBXTextBookmark */ = 2729A45D09B22FE2001F07F4 /* PBXTextBookmark */; 2729A55E09B25AE9001F07F4 /* PBXTextBookmark */ = 2729A55E09B25AE9001F07F4 /* PBXTextBookmark */; 2729A55F09B25AE9001F07F4 /* PBXTextBookmark */ = 2729A55F09B25AE9001F07F4 /* PBXTextBookmark */; 272C35D908C16738009EA18F /* PBXTextBookmark */ = 272C35D908C16738009EA18F /* PBXTextBookmark */; 272C35DD08C16738009EA18F /* PBXTextBookmark */ = 272C35DD08C16738009EA18F /* PBXTextBookmark */; 272C35E408C16738009EA18F /* PBXTextBookmark */ = 272C35E408C16738009EA18F /* PBXTextBookmark */; 272C35EB08C16738009EA18F /* PBXTextBookmark */ = 272C35EB08C16738009EA18F /* PBXTextBookmark */; 272C35ED08C16738009EA18F /* PBXTextBookmark */ = 272C35ED08C16738009EA18F /* PBXTextBookmark */; 272C35F008C16738009EA18F /* PBXTextBookmark */ = 272C35F008C16738009EA18F /* PBXTextBookmark */; 272C35F308C16738009EA18F /* PBXTextBookmark */ = 272C35F308C16738009EA18F /* PBXTextBookmark */; 272C35F608C16738009EA18F /* PBXTextBookmark */ = 272C35F608C16738009EA18F /* PBXTextBookmark */; 272C35F708C16738009EA18F /* PBXTextBookmark */ = 272C35F708C16738009EA18F /* PBXTextBookmark */; 272C35F908C16738009EA18F /* PBXTextBookmark */ = 272C35F908C16738009EA18F /* PBXTextBookmark */; 272C35FB08C16738009EA18F /* PBXTextBookmark */ = 272C35FB08C16738009EA18F /* PBXTextBookmark */; 272C35FC08C16738009EA18F /* PBXTextBookmark */ = 272C35FC08C16738009EA18F /* PBXTextBookmark */; 272C35FD08C16738009EA18F /* PBXTextBookmark */ = 272C35FD08C16738009EA18F /* PBXTextBookmark */; 272C363C08C17E7F009EA18F /* PBXTextBookmark */ = 272C363C08C17E7F009EA18F /* PBXTextBookmark */; 272C373F08C21615009EA18F /* PBXTextBookmark */ = 272C373F08C21615009EA18F /* PBXTextBookmark */; 272C374508C21615009EA18F /* PBXTextBookmark */ = 272C374508C21615009EA18F /* PBXTextBookmark */; 272C374608C21615009EA18F /* PBXTextBookmark */ = 272C374608C21615009EA18F /* PBXTextBookmark */; 2736561D094C69B80043391C /* PBXTextBookmark */ = 2736561D094C69B80043391C /* PBXTextBookmark */; 27365622094C69B80043391C /* PBXTextBookmark */ = 27365622094C69B80043391C /* PBXTextBookmark */; 2754E75508C0D6E1007F45CF /* PBXTextBookmark */ = 2754E75508C0D6E1007F45CF /* PBXTextBookmark */; 2754E75608C0D6E1007F45CF /* PBXTextBookmark */ = 2754E75608C0D6E1007F45CF /* PBXTextBookmark */; 2754E7E408C0E659007F45CF /* PBXTextBookmark */ = 2754E7E408C0E659007F45CF /* PBXTextBookmark */; 2754E7E508C0E659007F45CF /* PBXTextBookmark */ = 2754E7E508C0E659007F45CF /* PBXTextBookmark */; 2754E7E708C0E659007F45CF /* PBXTextBookmark */ = 2754E7E708C0E659007F45CF /* PBXTextBookmark */; 2754E7E808C0E659007F45CF /* PBXTextBookmark */ = 2754E7E808C0E659007F45CF /* PBXTextBookmark */; 2754E80108C0F6E5007F45CF /* PBXTextBookmark */ = 2754E80108C0F6E5007F45CF /* PBXTextBookmark */; 2754E80A08C10043007F45CF /* PBXTextBookmark */ = 2754E80A08C10043007F45CF /* PBXTextBookmark */; 2754E81108C10043007F45CF /* PBXTextBookmark */ = 2754E81108C10043007F45CF /* PBXTextBookmark */; 2754E81208C10043007F45CF /* PBXTextBookmark */ = 2754E81208C10043007F45CF /* PBXTextBookmark */; 2754E81308C10043007F45CF /* PBXTextBookmark */ = 2754E81308C10043007F45CF /* PBXTextBookmark */; 2754E81408C10043007F45CF /* PBXTextBookmark */ = 2754E81408C10043007F45CF /* PBXTextBookmark */; 2754E81508C10043007F45CF /* PBXTextBookmark */ = 2754E81508C10043007F45CF /* PBXTextBookmark */; 2754E81708C10043007F45CF /* PBXTextBookmark */ = 2754E81708C10043007F45CF /* PBXTextBookmark */; 2754E8CB08C126B6007F45CF /* PBXTextBookmark */ = 2754E8CB08C126B6007F45CF /* PBXTextBookmark */; 275D2B270C4DDA3B0056D137 /* PBXTextBookmark */ = 275D2B270C4DDA3B0056D137 /* PBXTextBookmark */; 275D2C930C50346B0056D137 /* PBXTextBookmark */ = 275D2C930C50346B0056D137 /* PBXTextBookmark */; 275D2C940C50346B0056D137 /* PBXTextBookmark */ = 275D2C940C50346B0056D137 /* PBXTextBookmark */; 275D2CC00C5137330056D137 /* PBXTextBookmark */ = 275D2CC00C5137330056D137 /* PBXTextBookmark */; 275D2D690C5144DD0056D137 /* PBXTextBookmark */ = 275D2D690C5144DD0056D137 /* PBXTextBookmark */; 275D2DA60C5148550056D137 /* PBXTextBookmark */ = 275D2DA60C5148550056D137 /* PBXTextBookmark */; 276C7002091D1AB7005A5B75 /* PBXTextBookmark */ = 276C7002091D1AB7005A5B75 /* PBXTextBookmark */; 2773DCF40917EF3400DBDA9D /* PBXTextBookmark */ = 2773DCF40917EF3400DBDA9D /* PBXTextBookmark */; 2773DCF80917EF3400DBDA9D /* PBXTextBookmark */ = 2773DCF80917EF3400DBDA9D /* PBXTextBookmark */; 278132170C7CF38500EF848E /* PBXTextBookmark */ = 278132170C7CF38500EF848E /* PBXTextBookmark */; 2781326D0C7E07BB00EF848E /* PBXTextBookmark */ = 2781326D0C7E07BB00EF848E /* PBXTextBookmark */; 2789AAE40EB178B0008DEB99 /* PBXTextBookmark */ = 2789AAE40EB178B0008DEB99 /* PBXTextBookmark */; 2789AAE60EB178B0008DEB99 /* PBXTextBookmark */ = 2789AAE60EB178B0008DEB99 /* PBXTextBookmark */; 2789AAE90EB178B0008DEB99 /* PBXTextBookmark */ = 2789AAE90EB178B0008DEB99 /* PBXTextBookmark */; 2789AAEA0EB178B0008DEB99 /* PBXBookmark */ = 2789AAEA0EB178B0008DEB99 /* PBXBookmark */; 2789AAEE0EB178B0008DEB99 /* PBXTextBookmark */ = 2789AAEE0EB178B0008DEB99 /* PBXTextBookmark */; 2789AAF30EB178B0008DEB99 /* PBXBookmark */ = 2789AAF30EB178B0008DEB99 /* PBXBookmark */; 2789AB640EB18A8E008DEB99 /* PBXTextBookmark */ = 2789AB640EB18A8E008DEB99 /* PBXTextBookmark */; 2789AB6D0EB18E9F008DEB99 /* PBXTextBookmark */ = 2789AB6D0EB18E9F008DEB99 /* PBXTextBookmark */; 2789AB6E0EB18E9F008DEB99 /* PBXTextBookmark */ = 2789AB6E0EB18E9F008DEB99 /* PBXTextBookmark */; 2798434D0E084DE100CE1ED5 /* PBXTextBookmark */ = 2798434D0E084DE100CE1ED5 /* PBXTextBookmark */; 2798437B0E0851D500CE1ED5 /* PBXTextBookmark */ = 2798437B0E0851D500CE1ED5 /* PBXTextBookmark */; 2798437D0E0851D500CE1ED5 /* PBXTextBookmark */ = 2798437D0E0851D500CE1ED5 /* PBXTextBookmark */; 279AB4210D5CDB02002AFBEA /* PBXTextBookmark */ = 279AB4210D5CDB02002AFBEA /* PBXTextBookmark */; 27B38FB5085A077900C2FE3C /* PBXTextBookmark */ = 27B38FB5085A077900C2FE3C /* PBXTextBookmark */; 27B4AFFD09C1EE4F00EE3874 /* PBXTextBookmark */ = 27B4AFFD09C1EE4F00EE3874 /* PBXTextBookmark */; 27C1F3590A622F000072F397 /* PBXTextBookmark */ = 27C1F3590A622F000072F397 /* PBXTextBookmark */; 27C40A7809B5DA910043C42F /* PBXTextBookmark */ = 27C40A7809B5DA910043C42F /* PBXTextBookmark */; 27C40AAF09B5E58B0043C42F /* PBXTextBookmark */ = 27C40AAF09B5E58B0043C42F /* PBXTextBookmark */; 27C40B6709B623D00043C42F /* PBXTextBookmark */ = 27C40B6709B623D00043C42F /* PBXTextBookmark */; 27C40B8909B626690043C42F /* PBXTextBookmark */ = 27C40B8909B626690043C42F /* PBXTextBookmark */; 27C40BBB09B628F50043C42F /* PBXTextBookmark */ = 27C40BBB09B628F50043C42F /* PBXTextBookmark */; 27E050E50918749700928DC2 /* PBXTextBookmark */ = 27E050E50918749700928DC2 /* PBXTextBookmark */; 27E050E60918749700928DC2 /* PBXTextBookmark */ = 27E050E60918749700928DC2 /* PBXTextBookmark */; 27EC73FD0992B6BB0097E39E /* PBXTextBookmark */ = 27EC73FD0992B6BB0097E39E /* PBXTextBookmark */; 27EC73FE0992B6BB0097E39E /* PBXBookmark */ = 27EC73FE0992B6BB0097E39E /* PBXBookmark */; 27FAECD6093FAA8400D7EE3E /* PBXTextBookmark */ = 27FAECD6093FAA8400D7EE3E /* PBXTextBookmark */; 27FAECD7093FAA8400D7EE3E /* PBXTextBookmark */ = 27FAECD7093FAA8400D7EE3E /* PBXTextBookmark */; 27FAED01093FAF2400D7EE3E /* PBXTextBookmark */ = 27FAED01093FAF2400D7EE3E /* PBXTextBookmark */; 27FAED1B093FB0BB00D7EE3E /* PBXTextBookmark */ = 27FAED1B093FB0BB00D7EE3E /* PBXTextBookmark */; }; sourceControlManager = 27DA4EAE0521141D00F8327E /* Source Control */; userBuildSettings = { }; }; 29B97316FDCFA39411CA2CEA /* main.m */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {745, 664}}"; sepNavSelRange = "{0, 0}"; sepNavVisRange = "{0, 816}"; sepNavVisRect = "{{0, 201}, {742, 154}}"; sepNavWindowFrame = "{{15, 671}, {750, 502}}"; }; }; F521993F01F8D2B801A80164 /* main.c */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {745, 13874}}"; sepNavSelRange = "{2771, 0}"; sepNavVisRange = "{300, 1295}"; sepNavVisRect = "{{0, 1136}, {627, 403}}"; sepNavWindowFrame = "{{848, 248}, {750, 502}}"; }; }; F521994301FA86B001A80164 /* VariableList.m */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {888, 2000}}"; sepNavSelRange = "{3541, 29}"; sepNavVisRange = "{3642, 8}"; sepNavVisRect = "{{0, 1512}, {742, 154}}"; sepNavWindowFrame = "{{41, 138}, {750, 502}}"; }; }; F521994601FA8EC401A80164 /* VariableList.h */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {818, 319}}"; sepNavSelRange = "{537, 31}"; sepNavVisRect = "{{0, 0}, {642, 319}}"; sepNavWindowFrame = "{{28, 482}, {750, 502}}"; }; }; F521994801FA927601A80164 /* ChangeLog */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {621, 39074}}"; sepNavSelRange = "{43050, 0}"; sepNavVisRect = "{{0, 0}, {621, 417}}"; sepNavWindowFrame = "{{128, 42}, {750, 558}}"; }; }; F5293926023032E201A80164 /* string_manip.h */ = { uiCtxt = { sepNavWindowFrame = "{{15, 671}, {750, 502}}"; }; }; F5293927023032E201A80164 /* string_manip.c */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {1472, 1582}}"; sepNavSelRange = "{1053, 0}"; sepNavVisRect = "{{0, 734}, {742, 255}}"; }; }; F574E09901FD0FD701A80164 /* HistoryList.h */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {642, 482}}"; sepNavSelRange = "{415, 0}"; sepNavVisRect = "{{0, 0}, {642, 482}}"; }; }; F574E09A01FD0FD701A80164 /* HistoryList.m */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {762, 1034}}"; sepNavSelRange = "{1893, 29}"; sepNavVisRange = "{1994, 8}"; sepNavVisRect = "{{0, 616}, {742, 154}}"; sepNavWindowFrame = "{{38, 650}, {750, 502}}"; }; }; F574E09D01FD122F01A80164 /* historyManager.h */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {627, 429}}"; sepNavSelRange = "{0, 0}"; sepNavVisRect = "{{0, 0}, {627, 429}}"; sepNavWindowFrame = "{{32, 676}, {750, 502}}"; }; }; F574E09E01FD122F01A80164 /* historyManager.c */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {745, 2422}}"; sepNavSelRange = "{1447, 0}"; sepNavVisRange = "{1319, 1380}"; sepNavVisRect = "{{0, 1192}, {627, 403}}"; }; }; F5A165F7030711ED01A80164 /* ConversionList.h */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {642, 609}}"; sepNavSelRange = "{383, 0}"; sepNavVisRect = "{{0, 0}, {642, 609}}"; sepNavWindowFrame = "{{38, 549}, {600, 411}}"; }; }; F5A165F8030711ED01A80164 /* ConversionList.m */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {745, 868}}"; sepNavSelRange = "{1585, 0}"; sepNavVisRange = "{0, 1326}"; sepNavVisRect = "{{0, 0}, {642, 609}}"; sepNavWindowFrame = "{{15, 219}, {778, 762}}"; }; }; F5B29D6101F7391001A80164 /* AboutBoxController.h */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {745, 664}}"; sepNavSelRange = "{34, 0}"; sepNavVisRange = "{0, 230}"; sepNavVisRect = "{{0, 0}, {642, 417}}"; }; }; F5B29D6201F7391001A80164 /* AboutBoxController.m */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {745, 664}}"; sepNavSelRange = "{225, 0}"; sepNavVisRange = "{0, 370}"; sepNavVisRect = "{{0, 0}, {627, 429}}"; sepNavWindowFrame = "{{38, 238}, {879, 764}}"; }; }; F5B29D6501F7391601A80164 /* calculator.c */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {988, 18256}}"; sepNavSelRange = "{12848, 0}"; sepNavVisRange = "{12627, 525}"; sepNavVisRect = "{{0, 9227}, {742, 154}}"; sepNavWindowFrame = "{{61, 141}, {750, 558}}"; }; }; F5B29D6601F7391601A80164 /* calculator.h */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {745, 2366}}"; sepNavSelRange = "{2268, 0}"; sepNavVisRange = "{1220, 1280}"; sepNavVisRect = "{{0, 168}, {748, 154}}"; sepNavWindowFrame = "{{130, 78}, {750, 558}}"; }; }; F5B29D6901F7392301A80164 /* ErrorController.h */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {627, 429}}"; sepNavSelRange = "{24, 7}"; sepNavVisRect = "{{0, 0}, {627, 429}}"; sepNavWindowFrame = "{{130, 566}, {750, 502}}"; }; }; F5B29D6A01F7392301A80164 /* ErrorController.m */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {642, 609}}"; sepNavSelRange = "{8, 0}"; sepNavVisRect = "{{0, 0}, {642, 609}}"; sepNavWindowFrame = "{{244, 609}, {750, 502}}"; }; }; F5B29D6D01F7393A01A80164 /* parser.y */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {1454, 9450}}"; sepNavSelRange = "{18119, 0}"; sepNavVisRect = "{{0, 5208}, {742, 154}}"; sepNavWindowFrame = "{{38, 162}, {750, 558}}"; }; }; F5B29D6E01F7393A01A80164 /* scanner.l */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {1118, 8036}}"; sepNavSelRange = "{446, 20}"; sepNavVisRect = "{{0, 215}, {742, 256}}"; sepNavWindowFrame = "{{15, 185}, {784, 556}}"; }; }; F5B29D7301F7394501A80164 /* variables.c */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {621, 3696}}"; sepNavSelRange = "{1440, 11}"; sepNavVisRect = "{{0, 840}, {621, 295}}"; sepNavWindowFrame = "{{917, 182}, {680, 813}}"; }; }; F5B29D7401F7394501A80164 /* variables.h */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {627, 826}}"; sepNavSelRange = "{197, 0}"; sepNavVisRect = "{{0, 0}, {627, 429}}"; sepNavWindowFrame = "{{37, 546}, {750, 502}}"; }; }; F5B29D7701F7395001A80164 /* WcalcController.h */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {745, 1554}}"; sepNavSelRange = "{1654, 0}"; sepNavVisRange = "{454, 1528}"; sepNavVisRect = "{{0, 657}, {648, 609}}"; sepNavWindowFrame = "{{15, 183}, {750, 558}}"; }; }; F5B29D7801F7395001A80164 /* WcalcController.m */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {745, 17024}}"; sepNavSelRange = "{13051, 89}"; sepNavVisRange = "{12641, 716}"; sepNavVisRect = "{{0, 3378}, {648, 514}}"; sepNavWindowFrame = "{{515, 224}, {778, 762}}"; }; }; F5D446D00263B46801A80164 /* MyTextField.h */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {627, 429}}"; sepNavSelRange = "{99, 0}"; sepNavVisRect = "{{0, 0}, {627, 429}}"; sepNavWindowFrame = "{{743, 69}, {750, 558}}"; }; }; F5D446D10263B46801A80164 /* MyTextField.m */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {745, 1946}}"; sepNavSelRange = "{3141, 0}"; sepNavVisRange = "{2323, 928}"; sepNavVisRect = "{{0, 1098}, {742, 154}}"; sepNavWindowFrame = "{{190, 188}, {750, 558}}"; }; }; F5DD321602F8F43501A80164 /* conversion.c */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {7856, 15288}}"; sepNavSelRange = "{104812, 0}"; sepNavVisRect = "{{0, 13230}, {742, 154}}"; sepNavWindowFrame = "{{61, 141}, {750, 558}}"; }; }; F5DD321702F8F43501A80164 /* conversion.h */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {648, 1190}}"; sepNavSelRange = "{417, 41}"; sepNavVisRect = "{{0, 74}, {648, 286}}"; sepNavWindowFrame = "{{816, 166}, {750, 558}}"; }; }; F5DEAE8F021254A501A80164 /* definitions.h */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {1782, 1162}}"; sepNavSelRange = "{201, 0}"; sepNavVisRange = "{0, 2228}"; sepNavVisRect = "{{0, 0}, {627, 429}}"; sepNavWindowFrame = "{{187, 249}, {750, 502}}"; }; }; F5EF54D202022A7001A80164 /* theDelegate.m */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {627, 429}}"; sepNavSelRange = "{8, 0}"; sepNavVisRect = "{{0, 0}, {627, 429}}"; }; }; F5EF54D302022A7001A80164 /* theDelegate.h */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {627, 429}}"; sepNavSelRange = "{27, 0}"; sepNavVisRect = "{{0, 0}, {627, 429}}"; }; }; } wcalc-2.4/Wcalc.xcodeproj/project.pbxproj0000644000175000000620000017676411101157264017061 0ustar kkstaff// !$*UTF8*$! { archiveVersion = 1; classes = { }; objectVersion = 42; objects = { /* Begin PBXBuildFile section */ 2704376C0C4584640024DB8D /* number.c in Sources */ = {isa = PBXBuildFile; fileRef = 2704376A0C4584640024DB8D /* number.c */; }; 2704376D0C4584640024DB8D /* number.h in Headers */ = {isa = PBXBuildFile; fileRef = 2704376B0C4584640024DB8D /* number.h */; }; 2704376E0C4584640024DB8D /* number.c in Sources */ = {isa = PBXBuildFile; fileRef = 2704376A0C4584640024DB8D /* number.c */; }; 2704376F0C4584640024DB8D /* number.h in Headers */ = {isa = PBXBuildFile; fileRef = 2704376B0C4584640024DB8D /* number.h */; }; 27085E2A0EB4D75E009B43DD /* libl.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2789AB460EB1877D008DEB99 /* libl.a */; }; 27085F000EB512E1009B43DD /* libncurses.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 27085EFF0EB512E1009B43DD /* libncurses.dylib */; }; 27085F040EB51331009B43DD /* iscmd.c in Sources */ = {isa = PBXBuildFile; fileRef = 27085F020EB51331009B43DD /* iscmd.c */; }; 27085F050EB51331009B43DD /* iscmd.h in Headers */ = {isa = PBXBuildFile; fileRef = 27085F030EB51331009B43DD /* iscmd.h */; }; 27085F060EB51331009B43DD /* iscmd.c in Sources */ = {isa = PBXBuildFile; fileRef = 27085F020EB51331009B43DD /* iscmd.c */; }; 27085F070EB51331009B43DD /* iscmd.h in Headers */ = {isa = PBXBuildFile; fileRef = 27085F030EB51331009B43DD /* iscmd.h */; }; 27085F0A0EB51382009B43DD /* libreadline.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 27085F090EB51382009B43DD /* libreadline.a */; }; 27085F0C0EB5138C009B43DD /* libhistory.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 27085F0B0EB5138C009B43DD /* libhistory.a */; }; 2729A40209B1ECE5001F07F4 /* add_commas.h in Headers */ = {isa = PBXBuildFile; fileRef = 2729A40009B1ECE5001F07F4 /* add_commas.h */; }; 2729A40309B1ECE5001F07F4 /* add_commas.c in Sources */ = {isa = PBXBuildFile; fileRef = 2729A40109B1ECE5001F07F4 /* add_commas.c */; }; 2729A40409B1ECE5001F07F4 /* add_commas.h in Headers */ = {isa = PBXBuildFile; fileRef = 2729A40009B1ECE5001F07F4 /* add_commas.h */; }; 2729A40509B1ECE5001F07F4 /* add_commas.c in Sources */ = {isa = PBXBuildFile; fileRef = 2729A40109B1ECE5001F07F4 /* add_commas.c */; }; 2729A53809B256DA001F07F4 /* PersVarList.h in Headers */ = {isa = PBXBuildFile; fileRef = 2729A53609B256DA001F07F4 /* PersVarList.h */; }; 2729A53909B256DA001F07F4 /* PersVarList.m in Sources */ = {isa = PBXBuildFile; fileRef = 2729A53709B256DA001F07F4 /* PersVarList.m */; }; 272C376308C3FDAF009EA18F /* number_formatting.h in Headers */ = {isa = PBXBuildFile; fileRef = 272C375F08C3FDAF009EA18F /* number_formatting.h */; }; 272C376408C3FDAF009EA18F /* number_formatting.c in Sources */ = {isa = PBXBuildFile; fileRef = 272C376008C3FDAF009EA18F /* number_formatting.c */; }; 273655E6094C63910043391C /* list.h in Headers */ = {isa = PBXBuildFile; fileRef = 273655E4094C63910043391C /* list.h */; }; 273655E7094C63910043391C /* list.c in Sources */ = {isa = PBXBuildFile; fileRef = 273655E5094C63910043391C /* list.c */; }; 273655E8094C63910043391C /* list.h in Headers */ = {isa = PBXBuildFile; fileRef = 273655E4094C63910043391C /* list.h */; }; 273655E9094C63910043391C /* list.c in Sources */ = {isa = PBXBuildFile; fileRef = 273655E5094C63910043391C /* list.c */; }; 273655F3094C63F20043391C /* explain.c in Sources */ = {isa = PBXBuildFile; fileRef = 273655EF094C63F20043391C /* explain.c */; }; 273655F4094C63F20043391C /* explain.h in Headers */ = {isa = PBXBuildFile; fileRef = 273655F0094C63F20043391C /* explain.h */; }; 273655F5094C63F20043391C /* extract_vars.c in Sources */ = {isa = PBXBuildFile; fileRef = 273655F1094C63F20043391C /* extract_vars.c */; }; 273655F6094C63F20043391C /* extract_vars.h in Headers */ = {isa = PBXBuildFile; fileRef = 273655F2094C63F20043391C /* extract_vars.h */; }; 273655F7094C63F20043391C /* explain.c in Sources */ = {isa = PBXBuildFile; fileRef = 273655EF094C63F20043391C /* explain.c */; }; 273655F8094C63F20043391C /* explain.h in Headers */ = {isa = PBXBuildFile; fileRef = 273655F0094C63F20043391C /* explain.h */; }; 273655F9094C63F20043391C /* extract_vars.c in Sources */ = {isa = PBXBuildFile; fileRef = 273655F1094C63F20043391C /* extract_vars.c */; }; 273655FA094C63F20043391C /* extract_vars.h in Headers */ = {isa = PBXBuildFile; fileRef = 273655F2094C63F20043391C /* extract_vars.h */; }; 27365601094C64170043391C /* isconst.c in Sources */ = {isa = PBXBuildFile; fileRef = 273655FD094C64170043391C /* isconst.c */; }; 27365602094C64170043391C /* isfunc.c in Sources */ = {isa = PBXBuildFile; fileRef = 273655FE094C64170043391C /* isfunc.c */; }; 27365603094C64170043391C /* isconst.h in Headers */ = {isa = PBXBuildFile; fileRef = 273655FF094C64170043391C /* isconst.h */; }; 27365604094C64170043391C /* isfunc.h in Headers */ = {isa = PBXBuildFile; fileRef = 27365600094C64170043391C /* isfunc.h */; }; 27365605094C64170043391C /* isconst.c in Sources */ = {isa = PBXBuildFile; fileRef = 273655FD094C64170043391C /* isconst.c */; }; 27365606094C64170043391C /* isfunc.c in Sources */ = {isa = PBXBuildFile; fileRef = 273655FE094C64170043391C /* isfunc.c */; }; 27365607094C64170043391C /* isconst.h in Headers */ = {isa = PBXBuildFile; fileRef = 273655FF094C64170043391C /* isconst.h */; }; 27365608094C64170043391C /* isfunc.h in Headers */ = {isa = PBXBuildFile; fileRef = 27365600094C64170043391C /* isfunc.h */; }; 2736560B094C642B0043391C /* evalvar.c in Sources */ = {isa = PBXBuildFile; fileRef = 27365609094C642B0043391C /* evalvar.c */; }; 2736560C094C642B0043391C /* evalvar.h in Headers */ = {isa = PBXBuildFile; fileRef = 2736560A094C642B0043391C /* evalvar.h */; }; 2736560D094C642B0043391C /* evalvar.c in Sources */ = {isa = PBXBuildFile; fileRef = 27365609094C642B0043391C /* evalvar.c */; }; 2736560E094C642B0043391C /* evalvar.h in Headers */ = {isa = PBXBuildFile; fileRef = 2736560A094C642B0043391C /* evalvar.h */; }; 275D2B5E0C5032E50056D137 /* WcalcService.h in Headers */ = {isa = PBXBuildFile; fileRef = 275D2B5C0C5032E50056D137 /* WcalcService.h */; }; 275D2B5F0C5032E50056D137 /* WcalcService.m in Sources */ = {isa = PBXBuildFile; fileRef = 275D2B5D0C5032E50056D137 /* WcalcService.m */; }; 2773DD3409180D4300DBDA9D /* calculator.h in Headers */ = {isa = PBXBuildFile; fileRef = F5B29D6601F7391601A80164 /* calculator.h */; }; 2773DD3509180D4300DBDA9D /* variables.h in Headers */ = {isa = PBXBuildFile; fileRef = F5B29D7401F7394501A80164 /* variables.h */; }; 2773DD3609180D4300DBDA9D /* definitions.h in Headers */ = {isa = PBXBuildFile; fileRef = F5DEAE8F021254A501A80164 /* definitions.h */; }; 2773DD3709180D4300DBDA9D /* string_manip.h in Headers */ = {isa = PBXBuildFile; fileRef = F5293926023032E201A80164 /* string_manip.h */; }; 2773DD3809180D4300DBDA9D /* conversion.h in Headers */ = {isa = PBXBuildFile; fileRef = F5DD321702F8F43501A80164 /* conversion.h */; }; 2773DD3909180D4300DBDA9D /* help.h in Headers */ = {isa = PBXBuildFile; fileRef = 2799DA4303FAD61400CA71DD /* help.h */; }; 2773DD3A09180D4300DBDA9D /* files.h in Headers */ = {isa = PBXBuildFile; fileRef = 275710BC042D0472004ACA36 /* files.h */; }; 2773DD3B09180D4300DBDA9D /* number_formatting.h in Headers */ = {isa = PBXBuildFile; fileRef = 272C375F08C3FDAF009EA18F /* number_formatting.h */; }; 2773DD3D09180D4300DBDA9D /* calculator.c in Sources */ = {isa = PBXBuildFile; fileRef = F5B29D6501F7391601A80164 /* calculator.c */; }; 2773DD3E09180D4300DBDA9D /* variables.c in Sources */ = {isa = PBXBuildFile; fileRef = F5B29D7301F7394501A80164 /* variables.c */; }; 2773DD3F09180D4300DBDA9D /* parser.y in Sources */ = {isa = PBXBuildFile; fileRef = F5B29D6D01F7393A01A80164 /* parser.y */; }; 2773DD4009180D4300DBDA9D /* scanner.l in Sources */ = {isa = PBXBuildFile; fileRef = F5B29D6E01F7393A01A80164 /* scanner.l */; }; 2773DD4109180D4300DBDA9D /* main.c in Sources */ = {isa = PBXBuildFile; fileRef = F521993F01F8D2B801A80164 /* main.c */; }; 2773DD4209180D4300DBDA9D /* string_manip.c in Sources */ = {isa = PBXBuildFile; fileRef = F5293927023032E201A80164 /* string_manip.c */; }; 2773DD4309180D4300DBDA9D /* conversion.c in Sources */ = {isa = PBXBuildFile; fileRef = F5DD321602F8F43501A80164 /* conversion.c */; }; 2773DD4409180D4300DBDA9D /* help.c in Sources */ = {isa = PBXBuildFile; fileRef = 2799DA4403FAD61400CA71DD /* help.c */; }; 2773DD4509180D4300DBDA9D /* files.c in Sources */ = {isa = PBXBuildFile; fileRef = 275710BD042D0472004ACA36 /* files.c */; }; 2773DD4609180D4300DBDA9D /* number_formatting.c in Sources */ = {isa = PBXBuildFile; fileRef = 272C376008C3FDAF009EA18F /* number_formatting.c */; }; 2773DD650918117800DBDA9D /* historyManager.c in Sources */ = {isa = PBXBuildFile; fileRef = F574E09E01FD122F01A80164 /* historyManager.c */; }; 2773DD660918117900DBDA9D /* historyManager.h in Headers */ = {isa = PBXBuildFile; fileRef = F574E09D01FD122F01A80164 /* historyManager.h */; }; 2789AADA0EB1772B008DEB99 /* NewWcalc.icns in Resources */ = {isa = PBXBuildFile; fileRef = 2789AAD90EB1772B008DEB99 /* NewWcalc.icns */; }; 2789AB470EB1877D008DEB99 /* libl.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2789AB460EB1877D008DEB99 /* libl.a */; }; 27BDF4C8059F712200CF1DF6 /* simpleCalc.c in Sources */ = {isa = PBXBuildFile; fileRef = 27BDF4C4059F712100CF1DF6 /* simpleCalc.c */; }; 27BDF4C9059F712200CF1DF6 /* simpleCalc.h in Headers */ = {isa = PBXBuildFile; fileRef = 27BDF4C5059F712100CF1DF6 /* simpleCalc.h */; }; 27D39129059BEA850035F25F /* AboutBoxController.h in Headers */ = {isa = PBXBuildFile; fileRef = F5B29D6101F7391001A80164 /* AboutBoxController.h */; }; 27D3912A059BEA850035F25F /* calculator.h in Headers */ = {isa = PBXBuildFile; fileRef = F5B29D6601F7391601A80164 /* calculator.h */; }; 27D3912B059BEA850035F25F /* ErrorController.h in Headers */ = {isa = PBXBuildFile; fileRef = F5B29D6901F7392301A80164 /* ErrorController.h */; }; 27D3912C059BEA850035F25F /* variables.h in Headers */ = {isa = PBXBuildFile; fileRef = F5B29D7401F7394501A80164 /* variables.h */; }; 27D3912D059BEA850035F25F /* WcalcController.h in Headers */ = {isa = PBXBuildFile; fileRef = F5B29D7701F7395001A80164 /* WcalcController.h */; }; 27D3912E059BEA850035F25F /* VariableList.h in Headers */ = {isa = PBXBuildFile; fileRef = F521994601FA8EC401A80164 /* VariableList.h */; }; 27D3912F059BEA850035F25F /* HistoryList.h in Headers */ = {isa = PBXBuildFile; fileRef = F574E09901FD0FD701A80164 /* HistoryList.h */; }; 27D39130059BEA850035F25F /* historyManager.h in Headers */ = {isa = PBXBuildFile; fileRef = F574E09D01FD122F01A80164 /* historyManager.h */; }; 27D39131059BEA850035F25F /* theDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = F5EF54D302022A7001A80164 /* theDelegate.h */; }; 27D39132059BEA850035F25F /* definitions.h in Headers */ = {isa = PBXBuildFile; fileRef = F5DEAE8F021254A501A80164 /* definitions.h */; }; 27D39133059BEA850035F25F /* string_manip.h in Headers */ = {isa = PBXBuildFile; fileRef = F5293926023032E201A80164 /* string_manip.h */; }; 27D39134059BEA850035F25F /* MyTextField.h in Headers */ = {isa = PBXBuildFile; fileRef = F5D446D00263B46801A80164 /* MyTextField.h */; }; 27D39135059BEA850035F25F /* conversion.h in Headers */ = {isa = PBXBuildFile; fileRef = F5DD321702F8F43501A80164 /* conversion.h */; }; 27D39136059BEA850035F25F /* ConversionList.h in Headers */ = {isa = PBXBuildFile; fileRef = F5A165F7030711ED01A80164 /* ConversionList.h */; }; 27D39137059BEA850035F25F /* help.h in Headers */ = {isa = PBXBuildFile; fileRef = 2799DA4303FAD61400CA71DD /* help.h */; }; 27D39138059BEA850035F25F /* files.h in Headers */ = {isa = PBXBuildFile; fileRef = 275710BC042D0472004ACA36 /* files.h */; }; 27D3913A059BEA850035F25F /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; }; 27D3913B059BEA850035F25F /* TheW.icns in Resources */ = {isa = PBXBuildFile; fileRef = F5B29D6F01F7393A01A80164 /* TheW.icns */; }; 27D3913C059BEA850035F25F /* MainMenu.nib in Resources */ = {isa = PBXBuildFile; fileRef = F5B29D7B01F7398A01A80164 /* MainMenu.nib */; }; 27D3913D059BEA850035F25F /* w.png in Resources */ = {isa = PBXBuildFile; fileRef = F5B29D8301F73C2701A80164 /* w.png */; }; 27D3913E059BEA850035F25F /* ChangeLog in Resources */ = {isa = PBXBuildFile; fileRef = F521994801FA927601A80164 /* ChangeLog */; }; 27D3913F059BEA850035F25F /* Wred.png in Resources */ = {isa = PBXBuildFile; fileRef = F5463560020065B401A80164 /* Wred.png */; }; 27D39140059BEA850035F25F /* COPYING in Resources */ = {isa = PBXBuildFile; fileRef = 277DB27D042F5173004ACA36 /* COPYING */; }; 27D39141059BEA850035F25F /* NEWS in Resources */ = {isa = PBXBuildFile; fileRef = 277DB27F042F51A5004ACA36 /* NEWS */; }; 27D39143059BEA850035F25F /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; }; 27D39144059BEA850035F25F /* AboutBoxController.m in Sources */ = {isa = PBXBuildFile; fileRef = F5B29D6201F7391001A80164 /* AboutBoxController.m */; }; 27D39145059BEA850035F25F /* calculator.c in Sources */ = {isa = PBXBuildFile; fileRef = F5B29D6501F7391601A80164 /* calculator.c */; }; 27D39146059BEA850035F25F /* ErrorController.m in Sources */ = {isa = PBXBuildFile; fileRef = F5B29D6A01F7392301A80164 /* ErrorController.m */; }; 27D39147059BEA850035F25F /* parser.y in Sources */ = {isa = PBXBuildFile; fileRef = F5B29D6D01F7393A01A80164 /* parser.y */; }; 27D39148059BEA850035F25F /* variables.c in Sources */ = {isa = PBXBuildFile; fileRef = F5B29D7301F7394501A80164 /* variables.c */; }; 27D39149059BEA850035F25F /* WcalcController.m in Sources */ = {isa = PBXBuildFile; fileRef = F5B29D7801F7395001A80164 /* WcalcController.m */; }; 27D3914A059BEA850035F25F /* VariableList.m in Sources */ = {isa = PBXBuildFile; fileRef = F521994301FA86B001A80164 /* VariableList.m */; }; 27D3914B059BEA850035F25F /* HistoryList.m in Sources */ = {isa = PBXBuildFile; fileRef = F574E09A01FD0FD701A80164 /* HistoryList.m */; }; 27D3914C059BEA850035F25F /* theDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = F5EF54D202022A7001A80164 /* theDelegate.m */; }; 27D3914D059BEA850035F25F /* historyManager.c in Sources */ = {isa = PBXBuildFile; fileRef = F574E09E01FD122F01A80164 /* historyManager.c */; }; 27D3914E059BEA850035F25F /* string_manip.c in Sources */ = {isa = PBXBuildFile; fileRef = F5293927023032E201A80164 /* string_manip.c */; }; 27D3914F059BEA850035F25F /* MyTextField.m in Sources */ = {isa = PBXBuildFile; fileRef = F5D446D10263B46801A80164 /* MyTextField.m */; }; 27D39150059BEA850035F25F /* scanner.l in Sources */ = {isa = PBXBuildFile; fileRef = F5B29D6E01F7393A01A80164 /* scanner.l */; }; 27D39151059BEA850035F25F /* conversion.c in Sources */ = {isa = PBXBuildFile; fileRef = F5DD321602F8F43501A80164 /* conversion.c */; }; 27D39152059BEA850035F25F /* ConversionList.m in Sources */ = {isa = PBXBuildFile; fileRef = F5A165F8030711ED01A80164 /* ConversionList.m */; }; 27D39153059BEA850035F25F /* help.c in Sources */ = {isa = PBXBuildFile; fileRef = 2799DA4403FAD61400CA71DD /* help.c */; }; 27D39154059BEA850035F25F /* files.c in Sources */ = {isa = PBXBuildFile; fileRef = 275710BD042D0472004ACA36 /* files.c */; }; 27D39156059BEA850035F25F /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; }; 27FAECF2093FAE5A00D7EE3E /* InspectorController.h in Headers */ = {isa = PBXBuildFile; fileRef = 27FAECF0093FAE5A00D7EE3E /* InspectorController.h */; }; 27FAECF3093FAE5A00D7EE3E /* InspectorController.m in Sources */ = {isa = PBXBuildFile; fileRef = 27FAECF1093FAE5A00D7EE3E /* InspectorController.m */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ 089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; 2704376A0C4584640024DB8D /* number.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = number.c; sourceTree = ""; }; 2704376B0C4584640024DB8D /* number.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = number.h; sourceTree = ""; }; 27085EFF0EB512E1009B43DD /* libncurses.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libncurses.dylib; path = usr/lib/libncurses.dylib; sourceTree = SDKROOT; }; 27085F020EB51331009B43DD /* iscmd.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = iscmd.c; sourceTree = ""; }; 27085F030EB51331009B43DD /* iscmd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = iscmd.h; sourceTree = ""; }; 27085F090EB51382009B43DD /* libreadline.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libreadline.a; path = "../universal-libs/lib/libreadline.a"; sourceTree = SOURCE_ROOT; }; 27085F0B0EB5138C009B43DD /* libhistory.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libhistory.a; path = "../universal-libs/lib/libhistory.a"; sourceTree = SOURCE_ROOT; }; 2721CD490869C13400E3BB4D /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 2729A40009B1ECE5001F07F4 /* add_commas.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = add_commas.h; sourceTree = ""; }; 2729A40109B1ECE5001F07F4 /* add_commas.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = add_commas.c; sourceTree = ""; }; 2729A53609B256DA001F07F4 /* PersVarList.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PersVarList.h; sourceTree = ""; }; 2729A53709B256DA001F07F4 /* PersVarList.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = PersVarList.m; sourceTree = ""; }; 272C375F08C3FDAF009EA18F /* number_formatting.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = number_formatting.h; sourceTree = ""; }; 272C376008C3FDAF009EA18F /* number_formatting.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = number_formatting.c; sourceTree = ""; }; 273655E4094C63910043391C /* list.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = list.h; sourceTree = ""; }; 273655E5094C63910043391C /* list.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = list.c; sourceTree = ""; }; 273655EF094C63F20043391C /* explain.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = explain.c; sourceTree = ""; }; 273655F0094C63F20043391C /* explain.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = explain.h; sourceTree = ""; }; 273655F1094C63F20043391C /* extract_vars.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = extract_vars.c; sourceTree = ""; }; 273655F2094C63F20043391C /* extract_vars.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = extract_vars.h; sourceTree = ""; }; 273655FD094C64170043391C /* isconst.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = isconst.c; sourceTree = ""; }; 273655FE094C64170043391C /* isfunc.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = isfunc.c; sourceTree = ""; }; 273655FF094C64170043391C /* isconst.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = isconst.h; sourceTree = ""; }; 27365600094C64170043391C /* isfunc.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = isfunc.h; sourceTree = ""; }; 27365609094C642B0043391C /* evalvar.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = evalvar.c; sourceTree = ""; }; 2736560A094C642B0043391C /* evalvar.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = evalvar.h; sourceTree = ""; }; 275710BC042D0472004ACA36 /* files.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = files.h; sourceTree = ""; }; 275710BD042D0472004ACA36 /* files.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = files.c; sourceTree = ""; }; 275D2B5C0C5032E50056D137 /* WcalcService.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WcalcService.h; sourceTree = ""; }; 275D2B5D0C5032E50056D137 /* WcalcService.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WcalcService.m; sourceTree = ""; }; 2773DD4F09180D4300DBDA9D /* wcalc */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = wcalc; sourceTree = BUILT_PRODUCTS_DIR; }; 277DB27D042F5173004ACA36 /* COPYING */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = COPYING; sourceTree = ""; }; 277DB27F042F51A5004ACA36 /* NEWS */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = NEWS; sourceTree = ""; }; 2789AAD90EB1772B008DEB99 /* NewWcalc.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = NewWcalc.icns; sourceTree = ""; }; 2789AB460EB1877D008DEB99 /* libl.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libl.a; path = /usr/lib/libl.a; sourceTree = ""; }; 2799DA4303FAD61400CA71DD /* help.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = help.h; sourceTree = ""; }; 2799DA4403FAD61400CA71DD /* help.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = help.c; sourceTree = ""; }; 27BDF4C4059F712100CF1DF6 /* simpleCalc.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = simpleCalc.c; sourceTree = ""; }; 27BDF4C5059F712100CF1DF6 /* simpleCalc.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = simpleCalc.h; sourceTree = ""; }; 27D3915A059BEA860035F25F /* Wcalc.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Wcalc.app; sourceTree = BUILT_PRODUCTS_DIR; }; 27FAECF0093FAE5A00D7EE3E /* InspectorController.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = InspectorController.h; sourceTree = ""; }; 27FAECF1093FAE5A00D7EE3E /* InspectorController.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = InspectorController.m; sourceTree = ""; }; 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; 29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; F521993F01F8D2B801A80164 /* main.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = main.c; sourceTree = ""; }; F521994301FA86B001A80164 /* VariableList.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = VariableList.m; sourceTree = ""; }; F521994601FA8EC401A80164 /* VariableList.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = VariableList.h; sourceTree = ""; }; F521994801FA927601A80164 /* ChangeLog */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = ChangeLog; sourceTree = ""; }; F5293926023032E201A80164 /* string_manip.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = string_manip.h; sourceTree = ""; }; F5293927023032E201A80164 /* string_manip.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = string_manip.c; sourceTree = ""; }; F5463560020065B401A80164 /* Wred.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Wred.png; sourceTree = ""; }; F574E09901FD0FD701A80164 /* HistoryList.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = HistoryList.h; sourceTree = ""; }; F574E09A01FD0FD701A80164 /* HistoryList.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = HistoryList.m; sourceTree = ""; }; F574E09D01FD122F01A80164 /* historyManager.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = historyManager.h; sourceTree = ""; }; F574E09E01FD122F01A80164 /* historyManager.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = historyManager.c; sourceTree = ""; }; F5A165F7030711ED01A80164 /* ConversionList.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ConversionList.h; sourceTree = ""; }; F5A165F8030711ED01A80164 /* ConversionList.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = ConversionList.m; sourceTree = ""; }; F5B29D6101F7391001A80164 /* AboutBoxController.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AboutBoxController.h; sourceTree = ""; }; F5B29D6201F7391001A80164 /* AboutBoxController.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = AboutBoxController.m; sourceTree = ""; }; F5B29D6501F7391601A80164 /* calculator.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = calculator.c; sourceTree = ""; }; F5B29D6601F7391601A80164 /* calculator.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = calculator.h; sourceTree = ""; }; F5B29D6901F7392301A80164 /* ErrorController.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ErrorController.h; sourceTree = ""; }; F5B29D6A01F7392301A80164 /* ErrorController.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = ErrorController.m; sourceTree = ""; }; F5B29D6D01F7393A01A80164 /* parser.y */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.yacc; path = parser.y; sourceTree = ""; }; F5B29D6E01F7393A01A80164 /* scanner.l */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.lex; path = scanner.l; sourceTree = ""; }; F5B29D6F01F7393A01A80164 /* TheW.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = TheW.icns; sourceTree = ""; }; F5B29D7301F7394501A80164 /* variables.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = variables.c; sourceTree = ""; }; F5B29D7401F7394501A80164 /* variables.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = variables.h; sourceTree = ""; }; F5B29D7701F7395001A80164 /* WcalcController.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = WcalcController.h; sourceTree = ""; }; F5B29D7801F7395001A80164 /* WcalcController.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = WcalcController.m; sourceTree = ""; }; F5B29D7C01F7398A01A80164 /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/MainMenu.nib; sourceTree = ""; }; F5B29D8301F73C2701A80164 /* w.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = w.png; sourceTree = ""; }; F5D446D00263B46801A80164 /* MyTextField.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MyTextField.h; sourceTree = ""; }; F5D446D10263B46801A80164 /* MyTextField.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = MyTextField.m; sourceTree = ""; }; F5DD321602F8F43501A80164 /* conversion.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = conversion.c; sourceTree = ""; }; F5DD321702F8F43501A80164 /* conversion.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = conversion.h; sourceTree = ""; }; F5DEAE8F021254A501A80164 /* definitions.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = definitions.h; sourceTree = ""; }; F5EF54D202022A7001A80164 /* theDelegate.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = theDelegate.m; sourceTree = ""; }; F5EF54D302022A7001A80164 /* theDelegate.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = theDelegate.h; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ 2773DD4709180D4300DBDA9D /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( 27085E2A0EB4D75E009B43DD /* libl.a in Frameworks */, 27085F000EB512E1009B43DD /* libncurses.dylib in Frameworks */, 27085F0A0EB51382009B43DD /* libreadline.a in Frameworks */, 27085F0C0EB5138C009B43DD /* libhistory.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; 27D39155059BEA850035F25F /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( 27D39156059BEA850035F25F /* Cocoa.framework in Frameworks */, 2789AB470EB1877D008DEB99 /* libl.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ 080E96DDFE201D6D7F000001 /* Classes */ = { isa = PBXGroup; children = ( 275D2B5C0C5032E50056D137 /* WcalcService.h */, 275D2B5D0C5032E50056D137 /* WcalcService.m */, F5B29D6101F7391001A80164 /* AboutBoxController.h */, F5B29D6201F7391001A80164 /* AboutBoxController.m */, F5B29D6901F7392301A80164 /* ErrorController.h */, F5B29D6A01F7392301A80164 /* ErrorController.m */, F5B29D7701F7395001A80164 /* WcalcController.h */, F5B29D7801F7395001A80164 /* WcalcController.m */, 27BDF4C5059F712100CF1DF6 /* simpleCalc.h */, 27BDF4C4059F712100CF1DF6 /* simpleCalc.c */, F5B29D6001F738F601A80164 /* Shared Code */, F521994601FA8EC401A80164 /* VariableList.h */, F521994301FA86B001A80164 /* VariableList.m */, F574E09901FD0FD701A80164 /* HistoryList.h */, F574E09A01FD0FD701A80164 /* HistoryList.m */, F5EF54D302022A7001A80164 /* theDelegate.h */, F5EF54D202022A7001A80164 /* theDelegate.m */, F5D446D00263B46801A80164 /* MyTextField.h */, F5D446D10263B46801A80164 /* MyTextField.m */, F5A165F7030711ED01A80164 /* ConversionList.h */, F5A165F8030711ED01A80164 /* ConversionList.m */, 27FAECF0093FAE5A00D7EE3E /* InspectorController.h */, 27FAECF1093FAE5A00D7EE3E /* InspectorController.m */, 2729A53609B256DA001F07F4 /* PersVarList.h */, 2729A53709B256DA001F07F4 /* PersVarList.m */, ); name = Classes; sourceTree = ""; }; 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = { isa = PBXGroup; children = ( 2789AB460EB1877D008DEB99 /* libl.a */, 27085F0B0EB5138C009B43DD /* libhistory.a */, 27085F090EB51382009B43DD /* libreadline.a */, 27085EFF0EB512E1009B43DD /* libncurses.dylib */, 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */, ); name = "Linked Frameworks"; sourceTree = ""; }; 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = { isa = PBXGroup; children = ( 29B97325FDCFA39411CA2CEA /* Foundation.framework */, 29B97324FDCFA39411CA2CEA /* AppKit.framework */, ); name = "Other Frameworks"; sourceTree = ""; }; 19C28FACFE9D520D11CA2CBB /* Products */ = { isa = PBXGroup; children = ( 27D3915A059BEA860035F25F /* Wcalc.app */, 2773DD4F09180D4300DBDA9D /* wcalc */, ); name = Products; sourceTree = ""; }; 29B97314FDCFA39411CA2CEA /* Wcalc */ = { isa = PBXGroup; children = ( 080E96DDFE201D6D7F000001 /* Classes */, 29B97315FDCFA39411CA2CEA /* Other Sources */, 29B97317FDCFA39411CA2CEA /* Resources */, 29B97323FDCFA39411CA2CEA /* Frameworks */, 19C28FACFE9D520D11CA2CBB /* Products */, ); name = Wcalc; sourceTree = ""; }; 29B97315FDCFA39411CA2CEA /* Other Sources */ = { isa = PBXGroup; children = ( 29B97316FDCFA39411CA2CEA /* main.m */, F521993F01F8D2B801A80164 /* main.c */, ); name = "Other Sources"; sourceTree = ""; }; 29B97317FDCFA39411CA2CEA /* Resources */ = { isa = PBXGroup; children = ( F5B29D6F01F7393A01A80164 /* TheW.icns */, 2789AAD90EB1772B008DEB99 /* NewWcalc.icns */, 2721CD490869C13400E3BB4D /* Info.plist */, F5B29D7B01F7398A01A80164 /* MainMenu.nib */, 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */, F5463560020065B401A80164 /* Wred.png */, F5B29D8301F73C2701A80164 /* w.png */, F521994801FA927601A80164 /* ChangeLog */, 277DB27F042F51A5004ACA36 /* NEWS */, 277DB27D042F5173004ACA36 /* COPYING */, ); name = Resources; sourceTree = ""; }; 29B97323FDCFA39411CA2CEA /* Frameworks */ = { isa = PBXGroup; children = ( 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */, 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */, ); name = Frameworks; sourceTree = ""; }; F5B29D6001F738F601A80164 /* Shared Code */ = { isa = PBXGroup; children = ( F5DEAE8F021254A501A80164 /* definitions.h */, 2729A40009B1ECE5001F07F4 /* add_commas.h */, 2729A40109B1ECE5001F07F4 /* add_commas.c */, F5B29D6601F7391601A80164 /* calculator.h */, F5B29D6501F7391601A80164 /* calculator.c */, 27365609094C642B0043391C /* evalvar.c */, 2736560A094C642B0043391C /* evalvar.h */, 273655EF094C63F20043391C /* explain.c */, 273655F0094C63F20043391C /* explain.h */, 273655F1094C63F20043391C /* extract_vars.c */, 273655F2094C63F20043391C /* extract_vars.h */, 2799DA4303FAD61400CA71DD /* help.h */, 2799DA4403FAD61400CA71DD /* help.c */, 27085F020EB51331009B43DD /* iscmd.c */, 27085F030EB51331009B43DD /* iscmd.h */, 273655FD094C64170043391C /* isconst.c */, 273655FE094C64170043391C /* isfunc.c */, 273655FF094C64170043391C /* isconst.h */, 27365600094C64170043391C /* isfunc.h */, 273655E4094C63910043391C /* list.h */, 273655E5094C63910043391C /* list.c */, F5B29D7401F7394501A80164 /* variables.h */, F5B29D7301F7394501A80164 /* variables.c */, F5B29D6D01F7393A01A80164 /* parser.y */, F5B29D6E01F7393A01A80164 /* scanner.l */, F5293926023032E201A80164 /* string_manip.h */, F5293927023032E201A80164 /* string_manip.c */, F5DD321702F8F43501A80164 /* conversion.h */, F5DD321602F8F43501A80164 /* conversion.c */, 275710BC042D0472004ACA36 /* files.h */, 275710BD042D0472004ACA36 /* files.c */, F574E09D01FD122F01A80164 /* historyManager.h */, F574E09E01FD122F01A80164 /* historyManager.c */, 272C375F08C3FDAF009EA18F /* number_formatting.h */, 272C376008C3FDAF009EA18F /* number_formatting.c */, 2704376A0C4584640024DB8D /* number.c */, 2704376B0C4584640024DB8D /* number.h */, ); name = "Shared Code"; sourceTree = ""; }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ 2773DD3309180D4300DBDA9D /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( 2773DD3409180D4300DBDA9D /* calculator.h in Headers */, 2773DD3509180D4300DBDA9D /* variables.h in Headers */, 2773DD3609180D4300DBDA9D /* definitions.h in Headers */, 2773DD3709180D4300DBDA9D /* string_manip.h in Headers */, 2773DD3809180D4300DBDA9D /* conversion.h in Headers */, 2773DD3909180D4300DBDA9D /* help.h in Headers */, 2773DD3A09180D4300DBDA9D /* files.h in Headers */, 2773DD3B09180D4300DBDA9D /* number_formatting.h in Headers */, 2773DD660918117900DBDA9D /* historyManager.h in Headers */, 273655E8094C63910043391C /* list.h in Headers */, 273655F8094C63F20043391C /* explain.h in Headers */, 273655FA094C63F20043391C /* extract_vars.h in Headers */, 27365607094C64170043391C /* isconst.h in Headers */, 27365608094C64170043391C /* isfunc.h in Headers */, 2736560E094C642B0043391C /* evalvar.h in Headers */, 2729A40409B1ECE5001F07F4 /* add_commas.h in Headers */, 2704376F0C4584640024DB8D /* number.h in Headers */, 27085F050EB51331009B43DD /* iscmd.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; 27D39128059BEA850035F25F /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( 27D39129059BEA850035F25F /* AboutBoxController.h in Headers */, 27D3912A059BEA850035F25F /* calculator.h in Headers */, 27D3912B059BEA850035F25F /* ErrorController.h in Headers */, 27D3912C059BEA850035F25F /* variables.h in Headers */, 27D3912D059BEA850035F25F /* WcalcController.h in Headers */, 27D3912E059BEA850035F25F /* VariableList.h in Headers */, 27D3912F059BEA850035F25F /* HistoryList.h in Headers */, 27D39130059BEA850035F25F /* historyManager.h in Headers */, 27D39131059BEA850035F25F /* theDelegate.h in Headers */, 27D39132059BEA850035F25F /* definitions.h in Headers */, 27D39133059BEA850035F25F /* string_manip.h in Headers */, 27D39134059BEA850035F25F /* MyTextField.h in Headers */, 27D39135059BEA850035F25F /* conversion.h in Headers */, 27D39136059BEA850035F25F /* ConversionList.h in Headers */, 27D39137059BEA850035F25F /* help.h in Headers */, 27D39138059BEA850035F25F /* files.h in Headers */, 27BDF4C9059F712200CF1DF6 /* simpleCalc.h in Headers */, 272C376308C3FDAF009EA18F /* number_formatting.h in Headers */, 27FAECF2093FAE5A00D7EE3E /* InspectorController.h in Headers */, 273655E6094C63910043391C /* list.h in Headers */, 273655F4094C63F20043391C /* explain.h in Headers */, 273655F6094C63F20043391C /* extract_vars.h in Headers */, 27365603094C64170043391C /* isconst.h in Headers */, 27365604094C64170043391C /* isfunc.h in Headers */, 2736560C094C642B0043391C /* evalvar.h in Headers */, 2729A40209B1ECE5001F07F4 /* add_commas.h in Headers */, 2729A53809B256DA001F07F4 /* PersVarList.h in Headers */, 2704376D0C4584640024DB8D /* number.h in Headers */, 275D2B5E0C5032E50056D137 /* WcalcService.h in Headers */, 27085F070EB51331009B43DD /* iscmd.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ 2773DD3209180D4300DBDA9D /* wcalc */ = { isa = PBXNativeTarget; buildConfigurationList = 2773DD4B09180D4300DBDA9D /* Build configuration list for PBXNativeTarget "wcalc" */; buildPhases = ( 2773DD3309180D4300DBDA9D /* Headers */, 2773DD3C09180D4300DBDA9D /* Sources */, 2773DD4709180D4300DBDA9D /* Frameworks */, 2773DD4A09180D4300DBDA9D /* Rez */, ); buildRules = ( ); dependencies = ( ); name = wcalc; productName = wcalc; productReference = 2773DD4F09180D4300DBDA9D /* wcalc */; productType = "com.apple.product-type.tool"; }; 27D39127059BEA850035F25F /* Wcalc.app */ = { isa = PBXNativeTarget; buildConfigurationList = 27B38FA00859DCBE00C2FE3C /* Build configuration list for PBXNativeTarget "Wcalc.app" */; buildPhases = ( 27D39128059BEA850035F25F /* Headers */, 27D39139059BEA850035F25F /* Resources */, 27D39142059BEA850035F25F /* Sources */, 27D39155059BEA850035F25F /* Frameworks */, ); buildRules = ( ); dependencies = ( ); name = Wcalc.app; productName = Wcalc; productReference = 27D3915A059BEA860035F25F /* Wcalc.app */; productType = "com.apple.product-type.application"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ 29B97313FDCFA39411CA2CEA /* Project object */ = { isa = PBXProject; buildConfigurationList = 27B38FA40859DCBE00C2FE3C /* Build configuration list for PBXProject "Wcalc" */; compatibilityVersion = "Xcode 2.4"; hasScannedForEncodings = 1; mainGroup = 29B97314FDCFA39411CA2CEA /* Wcalc */; projectDirPath = ""; projectRoot = ""; targets = ( 2773DD3209180D4300DBDA9D /* wcalc */, 27D39127059BEA850035F25F /* Wcalc.app */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ 27D39139059BEA850035F25F /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( 27D3913A059BEA850035F25F /* InfoPlist.strings in Resources */, 27D3913B059BEA850035F25F /* TheW.icns in Resources */, 27D3913C059BEA850035F25F /* MainMenu.nib in Resources */, 27D3913D059BEA850035F25F /* w.png in Resources */, 27D3913E059BEA850035F25F /* ChangeLog in Resources */, 27D3913F059BEA850035F25F /* Wred.png in Resources */, 27D39140059BEA850035F25F /* COPYING in Resources */, 27D39141059BEA850035F25F /* NEWS in Resources */, 2789AADA0EB1772B008DEB99 /* NewWcalc.icns in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ /* Begin PBXRezBuildPhase section */ 2773DD4A09180D4300DBDA9D /* Rez */ = { isa = PBXRezBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXRezBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ 2773DD3C09180D4300DBDA9D /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 2773DD3D09180D4300DBDA9D /* calculator.c in Sources */, 2773DD3E09180D4300DBDA9D /* variables.c in Sources */, 2773DD3F09180D4300DBDA9D /* parser.y in Sources */, 2773DD4009180D4300DBDA9D /* scanner.l in Sources */, 2773DD4109180D4300DBDA9D /* main.c in Sources */, 2773DD4209180D4300DBDA9D /* string_manip.c in Sources */, 2773DD4309180D4300DBDA9D /* conversion.c in Sources */, 2773DD4409180D4300DBDA9D /* help.c in Sources */, 2773DD4509180D4300DBDA9D /* files.c in Sources */, 2773DD4609180D4300DBDA9D /* number_formatting.c in Sources */, 2773DD650918117800DBDA9D /* historyManager.c in Sources */, 273655E9094C63910043391C /* list.c in Sources */, 273655F7094C63F20043391C /* explain.c in Sources */, 273655F9094C63F20043391C /* extract_vars.c in Sources */, 27365605094C64170043391C /* isconst.c in Sources */, 27365606094C64170043391C /* isfunc.c in Sources */, 2736560D094C642B0043391C /* evalvar.c in Sources */, 2729A40509B1ECE5001F07F4 /* add_commas.c in Sources */, 2704376E0C4584640024DB8D /* number.c in Sources */, 27085F040EB51331009B43DD /* iscmd.c in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; 27D39142059BEA850035F25F /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 27D39143059BEA850035F25F /* main.m in Sources */, 27D39144059BEA850035F25F /* AboutBoxController.m in Sources */, 27D39145059BEA850035F25F /* calculator.c in Sources */, 27D39146059BEA850035F25F /* ErrorController.m in Sources */, 27D39147059BEA850035F25F /* parser.y in Sources */, 27D39148059BEA850035F25F /* variables.c in Sources */, 27D39149059BEA850035F25F /* WcalcController.m in Sources */, 27D3914A059BEA850035F25F /* VariableList.m in Sources */, 27D3914B059BEA850035F25F /* HistoryList.m in Sources */, 27D3914C059BEA850035F25F /* theDelegate.m in Sources */, 27D3914D059BEA850035F25F /* historyManager.c in Sources */, 27D3914E059BEA850035F25F /* string_manip.c in Sources */, 27D3914F059BEA850035F25F /* MyTextField.m in Sources */, 27D39150059BEA850035F25F /* scanner.l in Sources */, 27D39151059BEA850035F25F /* conversion.c in Sources */, 27D39152059BEA850035F25F /* ConversionList.m in Sources */, 27D39153059BEA850035F25F /* help.c in Sources */, 27D39154059BEA850035F25F /* files.c in Sources */, 27BDF4C8059F712200CF1DF6 /* simpleCalc.c in Sources */, 272C376408C3FDAF009EA18F /* number_formatting.c in Sources */, 27FAECF3093FAE5A00D7EE3E /* InspectorController.m in Sources */, 273655E7094C63910043391C /* list.c in Sources */, 273655F3094C63F20043391C /* explain.c in Sources */, 273655F5094C63F20043391C /* extract_vars.c in Sources */, 27365601094C64170043391C /* isconst.c in Sources */, 27365602094C64170043391C /* isfunc.c in Sources */, 2736560B094C642B0043391C /* evalvar.c in Sources */, 2729A40309B1ECE5001F07F4 /* add_commas.c in Sources */, 2729A53909B256DA001F07F4 /* PersVarList.m in Sources */, 2704376C0C4584640024DB8D /* number.c in Sources */, 275D2B5F0C5032E50056D137 /* WcalcService.m in Sources */, 27085F060EB51331009B43DD /* iscmd.c in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXVariantGroup section */ 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = { isa = PBXVariantGroup; children = ( 089C165DFE840E0CC02AAC07 /* English */, ); name = InfoPlist.strings; sourceTree = ""; }; F5B29D7B01F7398A01A80164 /* MainMenu.nib */ = { isa = PBXVariantGroup; children = ( F5B29D7C01F7398A01A80164 /* English */, ); name = MainMenu.nib; sourceTree = ""; }; /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ 275D2DBF0C514B850056D137 /* Deployment Universal */ = { isa = XCBuildConfiguration; buildSettings = { COPY_PHASE_STRIP = YES; DEAD_CODE_STRIPPING = YES; DEPLOYMENT_POSTPROCESSING = YES; GCC_CW_ASM_SYNTAX = NO; GCC_ENABLE_FIX_AND_CONTINUE = NO; GCC_ENABLE_PASCAL_STRINGS = NO; GCC_OPTIMIZATION_LEVEL = 2; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREPROCESSOR_DEFINITIONS = ( "$(GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_TARGET_1)", GUI, HAVE_READLINE_READLINE_H, HAVE_LIBREADLINE, HAVE_READLINE_HISTORY, HAVE_READLINE_HISTORY_H, STDC_HEADERS, ); GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_TARGET_1 = "VERSION=\\\"${CURRENT_PROJECT_VERSION}\\\""; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNKNOWN_PRAGMAS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_LABEL = YES; GCC_WARN_UNUSED_PARAMETER = NO; GCC_WARN_UNUSED_VALUE = YES; GCC_WARN_UNUSED_VARIABLE = YES; HEADER_SEARCH_PATHS = "/Users/kyle/Wcalc_Development/universal-libs/include"; LIBRARY_SEARCH_PATHS = ( "/Users/kyle/Wcalc_Development/universal-libs/lib", "$(LIBRARY_SEARCH_PATHS_QUOTED_1)", ); LIBRARY_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)\""; OTHER_LDFLAGS = ( "/Users/kyle/Wcalc_Development/universal-libs/lib/libmpfr.a", "/Users/kyle/Wcalc_Development/universal-libs/lib/libgmp.a", "/Users/kyle/Wcalc_Development/universal-libs/lib/libreadline.a", ); PREBINDING = YES; PRODUCT_NAME = wcalc; SECTORDER_FLAGS = ""; WARNING_CFLAGS = ( "-Wchar-subscripts", "-Wcomment", "-Wimplicit", "-Wmain", "-Wsequence-point", ); ZERO_LINK = NO; }; name = "Deployment Universal"; }; 275D2DC00C514B850056D137 /* Deployment Universal */ = { isa = XCBuildConfiguration; buildSettings = { ARCHS = ( ppc, i386, ); COPY_PHASE_STRIP = YES; DEAD_CODE_STRIPPING = YES; DEPLOYMENT_POSTPROCESSING = YES; FRAMEWORK_SEARCH_PATHS = ""; GCC_AUTO_VECTORIZATION = NO; GCC_CW_ASM_SYNTAX = NO; GCC_DEBUGGING_SYMBOLS = full; GCC_DYNAMIC_NO_PIC = YES; GCC_ENABLE_FIX_AND_CONTINUE = NO; GCC_ENABLE_PASCAL_STRINGS = NO; GCC_ENABLE_SYMBOL_SEPARATION = NO; GCC_FAST_OBJC_DISPATCH = YES; GCC_GENERATE_DEBUGGING_SYMBOLS = NO; GCC_MODEL_TUNING = ""; GCC_OPTIMIZATION_LEVEL = 2; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREPROCESSOR_DEFINITIONS = ( "$(GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_TARGET_1)", GUI, HAVE_READLINE_READLINE_H, HAVE_LIBREADLINE, HAVE_READLINE_HISTORY, HAVE_READLINE_HISTORY_H, STDC_HEADERS, ); GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_TARGET_1 = "VERSION=\\\"${CURRENT_PROJECT_VERSION}\\\""; GCC_STRICT_ALIASING = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_PEDANTIC = NO; GCC_WARN_SHADOW = YES; GCC_WARN_SIGN_COMPARE = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNKNOWN_PRAGMAS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_LABEL = YES; GCC_WARN_UNUSED_PARAMETER = NO; GCC_WARN_UNUSED_VALUE = YES; GCC_WARN_UNUSED_VARIABLE = YES; HEADER_SEARCH_PATHS = ( /Users/kyle/Wcalc_Development/Wcalc, "/Users/kyle/Wcalc_Development/universal-libs/include", ); INFOPLIST_FILE = Info.plist; LIBRARY_SEARCH_PATHS = "\"$(SRCROOT)\""; MACOSX_DEPLOYMENT_TARGET = 10.4; OTHER_CFLAGS = ""; OTHER_LDFLAGS = ( /usr/lib/libl.a, "/Users/kyle/Wcalc_Development/universal-libs/lib/libmpfr.a", "/Users/kyle/Wcalc_Development/universal-libs/lib/libgmp.a", ); PRIVATE_HEADERS_FOLDER_PATH = "$(CONTENTS_FOLDER_PATH)/PrivateHeaders"; PRODUCT_NAME = Wcalc; SECTORDER_FLAGS = ""; SEPARATE_STRIP = YES; STRIP_INSTALLED_PRODUCT = YES; WARNING_CFLAGS = ( "-Wchar-subscripts", "-Wcomment", "-Wimplicit", "-Wmain", "-Wsequence-point", ); WRAPPER_EXTENSION = app; ZERO_LINK = NO; }; name = "Deployment Universal"; }; 275D2DC10C514B850056D137 /* Deployment Universal */ = { isa = XCBuildConfiguration; buildSettings = { ARCHS = "$(ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1)"; ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1 = "ppc i386"; COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 2.4; GCC_MODEL_TUNING = ""; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( HAVE_READLINE_READLINE_H, HAVE_LIBREADLINE, HAVE_READLINE_HISTORY, HAVE_READLINE_HISTORY_H, "$(GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_PROJECT_1)", ); GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_PROJECT_1 = "VERSION=\"${CURRENT_PROJECT_VERSION}\""; GCC_VERSION = ""; HEADER_SEARCH_PATHS = "/Users/kyle/Wcalc_Development/universal-libs/include/"; MACOSX_DEPLOYMENT_TARGET = 10.4; ONLY_ACTIVE_ARCH = NO; OTHER_LDFLAGS = ( "/Users/kyle/Wcalc_Development/universal-libs/lib/libgmp.a", "/Users/kyle/Wcalc_Development/universal-libs/lib/libmpfr.a", "/Users/kyle/Wcalc_Development/universal-libs/lib/libreadline.a", ); SCAN_ALL_SOURCE_FILES_FOR_INCLUDES = YES; SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk; STANDARD_C_PLUS_PLUS_LIBRARY_TYPE = static; VERSIONING_SYSTEM = "apple-generic"; }; name = "Deployment Universal"; }; 276C6F5D091A9B97005A5B75 /* Development */ = { isa = XCBuildConfiguration; buildSettings = { COPY_PHASE_STRIP = YES; DEAD_CODE_STRIPPING = YES; DEPLOYMENT_POSTPROCESSING = YES; GCC_CW_ASM_SYNTAX = NO; GCC_ENABLE_FIX_AND_CONTINUE = NO; GCC_ENABLE_PASCAL_STRINGS = NO; GCC_OPTIMIZATION_LEVEL = 2; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREPROCESSOR_DEFINITIONS = ( "$(GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_TARGET_1)", GUI, HAVE_READLINE_READLINE_H, HAVE_LIBREADLINE, HAVE_READLINE_HISTORY, HAVE_READLINE_HISTORY_H, STDC_HEADERS, ); GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_TARGET_1 = "VERSION=\\\"${CURRENT_PROJECT_VERSION}\\\""; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNKNOWN_PRAGMAS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_LABEL = YES; GCC_WARN_UNUSED_PARAMETER = NO; GCC_WARN_UNUSED_VALUE = YES; GCC_WARN_UNUSED_VARIABLE = YES; HEADER_SEARCH_PATHS = /opt/local/include; LIBRARY_SEARCH_PATHS = ( /opt/local/lib, "$(LIBRARY_SEARCH_PATHS_QUOTED_1)", "$(LIBRARY_SEARCH_PATHS_QUOTED_2)", ); LIBRARY_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)\""; LIBRARY_SEARCH_PATHS_QUOTED_2 = "\"$(SRCROOT)/../universal-libs/lib\""; OTHER_LDFLAGS = ( /opt/local/lib/libmpfr.a, /opt/local/lib/libgmp.a, /opt/local/lib/libreadline.a, /opt/local/lib/libncursesw.a, ); PREBINDING = YES; PRODUCT_NAME = wcalc; SECTORDER_FLAGS = ""; WARNING_CFLAGS = ( "-Wchar-subscripts", "-Wcomment", "-Wimplicit", "-Wmain", "-Wsequence-point", ); ZERO_LINK = NO; }; name = Development; }; 276C6F5E091A9B97005A5B75 /* Development */ = { isa = XCBuildConfiguration; buildSettings = { COPY_PHASE_STRIP = NO; DEAD_CODE_STRIPPING = NO; DEBUG_INFORMATION_FORMAT = dwarf; DEPLOYMENT_POSTPROCESSING = NO; FRAMEWORK_SEARCH_PATHS = ""; GCC_AUTO_VECTORIZATION = NO; GCC_CW_ASM_SYNTAX = NO; GCC_DEBUGGING_SYMBOLS = full; GCC_DYNAMIC_NO_PIC = YES; GCC_ENABLE_FIX_AND_CONTINUE = NO; GCC_ENABLE_PASCAL_STRINGS = NO; GCC_MODEL_TUNING = G4; GCC_OPTIMIZATION_LEVEL = 0; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREPROCESSOR_DEFINITIONS = ( "$(GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_TARGET_1)", GUI, HAVE_READLINE_READLINE_H, HAVE_LIBREADLINE, HAVE_READLINE_HISTORY, HAVE_READLINE_HISTORY_H, STDC_HEADERS, EBUG, ); GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_TARGET_1 = "VERSION=\\\"${CURRENT_PROJECT_VERSION}\\\""; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_PEDANTIC = NO; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; GCC_WARN_UNKNOWN_PRAGMAS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_LABEL = YES; GCC_WARN_UNUSED_PARAMETER = NO; GCC_WARN_UNUSED_VALUE = YES; GCC_WARN_UNUSED_VARIABLE = YES; INFOPLIST_FILE = Info.plist; LIBRARY_SEARCH_PATHS = "\"$(SRCROOT)\""; OTHER_CFLAGS = ""; OTHER_LDFLAGS = ( /Users/kyle/Wcalc_Development/Wcalc/libmpfr.a, /Users/kyle/Wcalc_Development/Wcalc/libgmp.a, ); PRIVATE_HEADERS_FOLDER_PATH = "$(CONTENTS_FOLDER_PATH)/PrivateHeaders"; PRODUCT_NAME = Wcalc; SECTORDER_FLAGS = ""; SEPARATE_STRIP = NO; STRIP_INSTALLED_PRODUCT = NO; WARNING_CFLAGS = ( "-Wchar-subscripts", "-Wcomment", "-Wimplicit", "-Wmain", "-Wsequence-point", ); WRAPPER_EXTENSION = app; ZERO_LINK = NO; }; name = Development; }; 276C6F5F091A9B97005A5B75 /* Development */ = { isa = XCBuildConfiguration; buildSettings = { ARCHS = "$(ONLY_ACTIVE_ARCH_PRE_XCODE_3_1)"; COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 2.4; GCC_CW_ASM_SYNTAX = NO; GCC_MODEL_TUNING = ""; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( HAVE_READLINE_READLINE_H, HAVE_LIBREADLINE, HAVE_READLINE_HISTORY, HAVE_READLINE_HISTORY_H, "$(GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_PROJECT_1)", ); GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_PROJECT_1 = "VERSION=\"${CURRENT_PROJECT_VERSION}\""; GCC_VERSION = ""; HEADER_SEARCH_PATHS = ( "/Users/kyle/Wcalc_Development/universal-libs/include/", /Users/kyle/Wcalc_Development/Wcalc/, ); LIBRARY_SEARCH_PATHS = "/Users/kyle/Wcalc_Development/universal-libs/lib/"; MACOSX_DEPLOYMENT_TARGET = ""; ONLY_ACTIVE_ARCH_PRE_XCODE_3_1 = "$(NATIVE_ARCH)"; SCAN_ALL_SOURCE_FILES_FOR_INCLUDES = YES; STANDARD_C_PLUS_PLUS_LIBRARY_TYPE = static; STRIP_INSTALLED_PRODUCT = NO; VERSIONING_SYSTEM = "apple-generic"; }; name = Development; }; 277E70AD0D6A0ECD001C912C /* Deployment 10.3.9 */ = { isa = XCBuildConfiguration; buildSettings = { COPY_PHASE_STRIP = YES; DEAD_CODE_STRIPPING = YES; DEPLOYMENT_POSTPROCESSING = YES; GCC_CW_ASM_SYNTAX = NO; GCC_ENABLE_FIX_AND_CONTINUE = NO; GCC_ENABLE_PASCAL_STRINGS = NO; GCC_OPTIMIZATION_LEVEL = 2; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREPROCESSOR_DEFINITIONS = ( "$(GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_TARGET_1)", GUI, HAVE_READLINE_READLINE_H, HAVE_LIBREADLINE, HAVE_READLINE_HISTORY, HAVE_READLINE_HISTORY_H, STDC_HEADERS, ); GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_TARGET_1 = "VERSION=\\\"${CURRENT_PROJECT_VERSION}\\\""; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNKNOWN_PRAGMAS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_LABEL = YES; GCC_WARN_UNUSED_PARAMETER = NO; GCC_WARN_UNUSED_VALUE = YES; GCC_WARN_UNUSED_VARIABLE = YES; HEADER_SEARCH_PATHS = /Users/kyle/Wcalc_Development/10.3.9/include; LIBRARY_SEARCH_PATHS = ( /Users/kyle/Wcalc_Development/10.3.9/lib, "$(LIBRARY_SEARCH_PATHS_QUOTED_1)", "$(LIBRARY_SEARCH_PATHS_QUOTED_2)", ); LIBRARY_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)\""; LIBRARY_SEARCH_PATHS_QUOTED_2 = "\"$(SRCROOT)/../universal-libs/lib\""; MACOSX_DEPLOYMENT_TARGET = 10.3; OTHER_LDFLAGS = ( /Users/kyle/Wcalc_Development/10.3.9/lib/libgmp.a, /Users/kyle/Wcalc_Development/10.3.9/lib/libmpfr.a, /Users/kyle/Wcalc_Development/10.3.9/lib/libreadline.a, ); PREBINDING = YES; PRODUCT_NAME = wcalc; SECTORDER_FLAGS = ""; WARNING_CFLAGS = ( "-Wchar-subscripts", "-Wcomment", "-Wimplicit", "-Wmain", "-Wsequence-point", ); ZERO_LINK = NO; }; name = "Deployment 10.3.9"; }; 277E70AE0D6A0ECD001C912C /* Deployment 10.3.9 */ = { isa = XCBuildConfiguration; buildSettings = { COPY_PHASE_STRIP = YES; DEAD_CODE_STRIPPING = YES; DEPLOYMENT_POSTPROCESSING = YES; GCC_AUTO_VECTORIZATION = NO; GCC_CW_ASM_SYNTAX = NO; GCC_DEBUGGING_SYMBOLS = full; GCC_DYNAMIC_NO_PIC = YES; GCC_ENABLE_FIX_AND_CONTINUE = NO; GCC_ENABLE_PASCAL_STRINGS = NO; GCC_ENABLE_SYMBOL_SEPARATION = NO; GCC_FAST_OBJC_DISPATCH = NO; GCC_GENERATE_DEBUGGING_SYMBOLS = NO; GCC_MODEL_TUNING = ""; GCC_OPTIMIZATION_LEVEL = 2; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREPROCESSOR_DEFINITIONS = ( "$(GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_TARGET_1)", GUI, HAVE_READLINE_READLINE_H, HAVE_LIBREADLINE, HAVE_READLINE_HISTORY, HAVE_READLINE_HISTORY_H, STDC_HEADERS, ); GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_TARGET_1 = "VERSION=\\\"${CURRENT_PROJECT_VERSION}\\\""; GCC_STRICT_ALIASING = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_PEDANTIC = NO; GCC_WARN_SHADOW = YES; GCC_WARN_SIGN_COMPARE = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNKNOWN_PRAGMAS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_LABEL = YES; GCC_WARN_UNUSED_PARAMETER = NO; GCC_WARN_UNUSED_VALUE = YES; GCC_WARN_UNUSED_VARIABLE = YES; HEADER_SEARCH_PATHS = ( /Users/kyle/Wcalc_Development/Wcalc, /Users/kyle/Wcalc_Development/10.3.9/include, ); INFOPLIST_FILE = Info.plist; LIBRARY_SEARCH_PATHS = "\"$(SRCROOT)\""; MACOSX_DEPLOYMENT_TARGET = 10.3; OTHER_CFLAGS = ""; OTHER_LDFLAGS = ( /Developer/SDKs/MacOSX10.3.9.sdk/usr/lib/libl.a, /Users/kyle/Wcalc_Development/10.3.9/lib/libmpfr.a, /Users/kyle/Wcalc_Development/10.3.9/lib/libgmp.a, ); PRIVATE_HEADERS_FOLDER_PATH = "$(CONTENTS_FOLDER_PATH)/PrivateHeaders"; PRODUCT_NAME = Wcalc; SDKROOT = /Developer/SDKs/MacOSX10.3.9.sdk; SECTORDER_FLAGS = ""; SEPARATE_STRIP = YES; STRIP_INSTALLED_PRODUCT = YES; WARNING_CFLAGS = ( "-Wchar-subscripts", "-Wcomment", "-Wimplicit", "-Wmain", "-Wsequence-point", ); WRAPPER_EXTENSION = app; ZERO_LINK = NO; }; name = "Deployment 10.3.9"; }; 277E70AF0D6A0ECD001C912C /* Deployment 10.3.9 */ = { isa = XCBuildConfiguration; buildSettings = { ARCHS = ppc; COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 2.4; GCC_MODEL_TUNING = ""; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( HAVE_READLINE_READLINE_H, HAVE_LIBREADLINE, HAVE_READLINE_HISTORY, HAVE_READLINE_HISTORY_H, "$(GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_PROJECT_1)", ); GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_PROJECT_1 = "VERSION=\"${CURRENT_PROJECT_VERSION}\""; GCC_VERSION = ""; MACOSX_DEPLOYMENT_TARGET = 10.3; ONLY_ACTIVE_ARCH = YES; SCAN_ALL_SOURCE_FILES_FOR_INCLUDES = YES; SDKROOT = /Developer/SDKs/MacOSX10.3.9.sdk; STANDARD_C_PLUS_PLUS_LIBRARY_TYPE = static; VERSIONING_SYSTEM = "apple-generic"; }; name = "Deployment 10.3.9"; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ 2773DD4B09180D4300DBDA9D /* Build configuration list for PBXNativeTarget "wcalc" */ = { isa = XCConfigurationList; buildConfigurations = ( 276C6F5D091A9B97005A5B75 /* Development */, 275D2DBF0C514B850056D137 /* Deployment Universal */, 277E70AD0D6A0ECD001C912C /* Deployment 10.3.9 */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = "Deployment Universal"; }; 27B38FA00859DCBE00C2FE3C /* Build configuration list for PBXNativeTarget "Wcalc.app" */ = { isa = XCConfigurationList; buildConfigurations = ( 276C6F5E091A9B97005A5B75 /* Development */, 275D2DC00C514B850056D137 /* Deployment Universal */, 277E70AE0D6A0ECD001C912C /* Deployment 10.3.9 */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = "Deployment Universal"; }; 27B38FA40859DCBE00C2FE3C /* Build configuration list for PBXProject "Wcalc" */ = { isa = XCConfigurationList; buildConfigurations = ( 276C6F5F091A9B97005A5B75 /* Development */, 275D2DC10C514B850056D137 /* Deployment Universal */, 277E70AF0D6A0ECD001C912C /* Deployment 10.3.9 */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = "Deployment Universal"; }; /* End XCConfigurationList section */ }; rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; } wcalc-2.4/._WcalcController.h0000644000175000000620000000024711100724770014422 0ustar kkstaffMac OS X  2uATTR5  com.apple.TextEncodingMACINTOSH;0wcalc-2.4/WcalcController.h0000644000175000000620000000636411100724770014213 0ustar kkstaff/* WcalcController */ #ifndef WCALC_CONTROLLER_H #define WCALC_CONTROLLER_H #include #include "InspectorController.h" @interface WcalcController : NSObject { IBOutlet NSMenuItem *affectKeyboardMenu; IBOutlet NSMenuItem *baseMenu; IBOutlet NSMenuItem *saveMenuItem; IBOutlet NSMenuItem *saveAsMenuItem; IBOutlet NSMenuItem *sizeToggleMenu; IBOutlet NSMenuItem *conversionMenu; IBOutlet NSWindow *mainWindow; IBOutlet NSWindow *inspectorWindow; IBOutlet NSWindow *persVarsWindow; IBOutlet InspectorController *inspector; IBOutlet NSButton *capsLockKey; IBOutlet NSButton *shiftKey1; IBOutlet NSButton *shiftKey2; IBOutlet NSButton *historyDuplicates; IBOutlet NSButton *pickyVariables; IBOutlet NSButton *printPrefixes; IBOutlet NSButton *useRadians; IBOutlet NSButton *updateHistory; IBOutlet NSButton *strictSyntax; IBOutlet NSButton *decimalKey; IBOutlet NSButton *rememberErrors; IBOutlet NSButton *enterKey; IBOutlet NSButton *limitHistory; IBOutlet NSButton *precisionGuard; IBOutlet NSButton *printInts; IBOutlet NSButton *simpleCalculator; IBOutlet NSButton *printDelimiters; IBOutlet NSButton *livePrecision; IBOutlet NSButton *cModPref; IBOutlet NSButton *alternateInputPref; IBOutlet NSTextField *AnswerField; IBOutlet NSTextField *ExpressionField; IBOutlet NSTextField *limitHistoryLen; IBOutlet NSTextField *limitHistoryLenTag; IBOutlet NSTextField *bitsPref; IBOutlet NSTextField *sliderPref; IBOutlet NSTextField *altInputDecSep; IBOutlet NSTextField *altInputThouSep; IBOutlet NSDrawer *baseDrawer; IBOutlet NSStepper *bitsStepper; IBOutlet NSStepper *sliderStepper; IBOutlet NSMatrix *outputFormat; IBOutlet NSMatrix *outputFormat2; IBOutlet NSSlider *PrecisionSlider; IBOutlet id errorController; IBOutlet id historyList; IBOutlet id theKeyboard; IBOutlet id keypad; IBOutlet NSPanel *thePrefPanel; IBOutlet NSPanel *conversionWindow; IBOutlet NSPopUpButton *engineeringNotation; IBOutlet NSPopUpButton *roundingIndication; IBOutlet NSPopUpButton *convertType; IBOutlet NSTableView *variableList; IBOutlet NSTableView *convertFrom; IBOutlet NSTableView *convertTo; IBOutlet NSApplication *meta; bool just_answered; NSView *superview; } - (IBAction)clear:(id)sender; - (IBAction)enterData:(id)sender; - (IBAction)go:(id)sender; - (IBAction)setPrecision:(id)sender; - (IBAction)showKeyboardDrawer:(id)sender; - (IBAction)toggleSize:(id)sender; - (IBAction)menuFunction:(id)sender; - (IBAction)menuConstant:(id)sender; - (IBAction)setPrefs:(id)sender; - (IBAction)showPrefs:(id)sender; - (IBAction)displayPrefs:(id)sender; - (IBAction)showBaseDrawer:(id)sender; - (IBAction)shConversions:(id)sender; - (IBAction)convert:(id)sender; - (IBAction)open:(id)sender; - (IBAction)save:(id)sender; - (IBAction)saveAs:(id)sender; - (IBAction)closeWindow:(id)sender; - (IBAction)quit:(id)sender; - (IBAction)savePrefs:(id)sender; - (void)displayAnswer; - (void)displayErrno:(int)err forFile:(NSString*)filename; - (BOOL)validateMenuItem:(NSMenuItem *)anItem; - (void)openBDrawer: (id) sender; - (void)openIDrawer: (id) sender; @end #endif wcalc-2.4/._WcalcController.m0000644000175000000620000000024711100757071014427 0ustar kkstaffMac OS X  2uATTR6  com.apple.TextEncodingMACINTOSH;0wcalc-2.4/WcalcController.m0000644000175000000620000012110411100757071014206 0ustar kkstaff#include #include "calculator.h" #include "variables.h" #include "conversion.h" #include "ErrorController.h" #include "historyManager.h" #include "WcalcController.h" #include "string_manip.h" #include "files.h" #include "MyTextField.h" #include "simpleCalc.h" #include "list.h" #include "number.h" #ifdef MEMWATCH #include "memwatch.h" #endif #define KEYPAD_HEIGHT 165 #define MIN_WINDOW_WIDTH 171 #define MIN_WINDOW_HEIGHT_TOGGLED 112 #define MIN_WINDOW_HEIGHT_UNTOGGLED 277 #define FIELD_WIDTH_DIFFERENCE 22 #define MAX_WINDOW_SIZE 10000 static char update_history = 0; NSButton *e; NSTextField *ef; static NSString *curFile = NULL; static pthread_mutex_t displayLock; @implementation WcalcController - (IBAction)toggleSize:(id)sender { static BOOL shrinking = TRUE; NSRect mainwindow = [mainWindow frame]; NSRect expr = [ExpressionField frame]; NSRect prec = [PrecisionSlider frame]; NSRect ans = [AnswerField frame]; NSSize w; NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults]; if (shrinking) { // if removing the keypad, change the window height mainwindow.size.height -= KEYPAD_HEIGHT; mainwindow.origin.y += KEYPAD_HEIGHT; // this is set in case the calc starts up toggled (under other // conditions it is not strictly necessary, because the ExpressionField // has achieved the correct size automatically expr.size.height = mainwindow.size.height - ans.size.height - prec.size.height - 57 /* the size of the rest of the window, including title bar */; [sizeToggleMenu setTitle:@"Show Keypad"]; } else { // if adding the keypad, change the window height mainwindow.size.height += KEYPAD_HEIGHT; mainwindow.origin.y -= KEYPAD_HEIGHT; mainwindow.size.width = MIN_WINDOW_WIDTH; [sizeToggleMenu setTitle:@"Hide Keypad"]; } expr.size.width = prec.size.width = mainwindow.size.width - FIELD_WIDTH_DIFFERENCE; if (shrinking) { [keypad removeFromSuperview]; expr.origin.y -= KEYPAD_HEIGHT; prec.origin.y -= KEYPAD_HEIGHT; } else { expr.origin.y += KEYPAD_HEIGHT; prec.origin.y += KEYPAD_HEIGHT; } [ExpressionField removeFromSuperview]; [PrecisionSlider removeFromSuperview]; if (sender != 0) { [mainWindow setFrame:mainwindow display:TRUE animate:TRUE]; } else { [mainWindow setFrame:mainwindow display:FALSE animate:FALSE]; } if (! shrinking) { [superview addSubview:keypad]; w.width = MIN_WINDOW_WIDTH; w.height = MIN_WINDOW_HEIGHT_UNTOGGLED + (ans.size.height - 21); [mainWindow setMinSize:w]; w.width = MIN_WINDOW_WIDTH; w.height = MAX_WINDOW_SIZE; [mainWindow setMaxSize:w]; [prefs setObject:@"NO" forKey:@"toggled"]; } else { w.width = MIN_WINDOW_WIDTH; w.height = MIN_WINDOW_HEIGHT_TOGGLED + (ans.size.height - 21); [mainWindow setMinSize:w]; w.width = MAX_WINDOW_SIZE; w.height = MAX_WINDOW_SIZE; [mainWindow setMaxSize:w]; [prefs setObject:@"YES" forKey:@"toggled"]; } [ExpressionField setFrame:expr]; [PrecisionSlider setFrame:prec]; [superview addSubview:ExpressionField]; [superview addSubview:PrecisionSlider]; [ExpressionField selectText:sender]; shrinking = ! shrinking; } - (IBAction)clear:(id)sender { if ([[ExpressionField stringValue] length]) { [ExpressionField setStringValue:@""]; [ExpressionField selectText:self]; } else if ([[AnswerField stringValue] length]) { [AnswerField setStringValue:@""]; [ExpressionField selectText:self]; } } - (IBAction)menuConstant:(id)sender { NSString *str = [ExpressionField stringValue]; NSString *str2 = @"error!"; switch ([sender tag]) { case 1: str2 = [NSString stringWithFormat:@"%C", 0x03c0]; break; case 2: str2 = @"e"; break; case 3: str2 = [NSString stringWithFormat:@"%C", 0x03b3]; break; case 4: str2 = @"g"; break; case 5: str2 = @"Cc"; break; case 8: str = @"K"; break; case 101: str2 = @"Z0"; break; case 102: str2 = [NSString stringWithFormat:@"%C0", 0x03b5]; break; case 103: str2 = [NSString stringWithFormat:@"%C0", 0x03bc]; break; case 104: str2 = @"G"; break; case 105: str2 = @"h"; break; case 106: str2 = @"c"; break; case 201: str2 = [NSString stringWithFormat:@"%CB", 0x03bc]; break; case 202: str2 = [NSString stringWithFormat:@"%CN", 0x03bc]; break; case 203: str2 = @"G0"; break; case 204: str2 = @"ec"; break; case 205: str2 = @"Kj"; break; case 206: str2 = @"Rk"; break; case 207: str2 = [NSString stringWithFormat:@"%C0", 0x03a6]; break; case 301: str2 = [NSString stringWithFormat:@"M%C", 0x03b1]; break; case 302: str2 = @"a0"; break; case 303: str2 = @"Md"; break; case 304: str2 = @"Me"; break; case 305: str2 = @"re"; break; case 306: str2 = @"eV"; break; case 307: str2 = @"Gf"; break; case 308: str2 = [NSString stringWithFormat:@"%C", 0x03b1]; break; case 309: str2 = @"Eh"; break; case 310: str2 = @"Mh"; break; case 311: str2 = [NSString stringWithFormat:@"m%C", 0x03bc]; break; case 312: str2 = @"Mn"; break; case 313: str2 = @"Mp"; break; case 314: str2 = [NSString stringWithFormat:@"R%C", 0x221E]; break; case 315: str2 = [NSString stringWithFormat:@"M%C", 0x03c4]; break; case 401: str2 = @"u"; break; case 402: str2 = @"Na"; break; case 403: str2 = @"k"; break; case 404: str2 = @"F"; break; case 405: str2 = @"c1"; break; case 406: str2 = @"n0"; break; case 407: str2 = @"R"; break; case 408: str2 = @"Vm"; break; case 409: str2 = @"c2"; break; case 410: str2 = [NSString stringWithFormat:@"%C", 0x03c3]; break; case 411: str2 = @"b"; break; case 6: str2 = @"random"; break; case 7: str2 = @"irandom"; break; default: return; } if ([str length]) { NSString *str3 = [NSString stringWithFormat:@"%C",0x00d7]; [ExpressionField setStringValue:[str stringByAppendingString:[str3 stringByAppendingString:str2]]]; } else { [ExpressionField setStringValue:str2]; } } - (IBAction)menuFunction:(id)sender { NSString *str = [[ExpressionField stringValue] stringByAppendingString:@")"]; NSString *str2; if ([str length] == 1) str = @""; switch ([sender tag]) { case 1: str2 = @"sin("; break; case 2: str2 = @"cos("; break; case 3: str2 = @"tan("; break; case 4: str2 = @"asin("; break; case 5: str2 = @"acos("; break; case 6: str2 = @"atan("; break; case 7: str2 = @"sinh("; break; case 8: str2 = @"cosh("; break; case 9: str2 = @"tanh("; break; case 10: str2 = @"asinh("; break; case 11: str2 = @"acosh("; break; case 12: str2 = @"atanh("; break; case 13: str2 = @"log("; break; case 14: str2 = @"ln("; break; case 15: str2 = @"round("; break; case 16: str2 = @"abs("; break; case 17: str2 = @"sqrt("; break; case 18: str2 = @"floor("; break; case 19: str2 = @"ceil("; break; case 20: str2 = @"cbrt("; break; case 21: str2 = @"logtwo("; break; case 22: str2 = @"cot("; break; case 23: str2 = @"acot("; break; case 24: str2 = @"coth("; break; case 25: str2 = @"acoth("; break; case 26: str2 = @"rand("; break; case 27: str2 = @"irand("; break; case 28: str2 = @"Gamma("; break; case 29: str2 = @"lnGamma("; break; case 30: str2 = @"zeta("; break; case 31: str2 = @"sec("; break; case 32: str2 = @"csc("; break; case 33: str2 = @"asec("; break; case 34: str2 = @"acsc("; break; case 35: str2 = @"sech("; break; case 36: str2 = @"csch("; break; case 37: str2 = @"asech("; break; case 38: str2 = @"acsch("; break; case 39: str2 = @"eint("; break; case 40: str2 = @"sinc("; break; case 41: str2 = @"exp("; break; case 42: str2 = @"fact("; break; case 43: str2 = @"comp("; break; default: return; } [ExpressionField setStringValue:[str2 stringByAppendingString:str]]; } - (void)awakeFromNib { NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults]; NSRect w; NSSize bounds; int prefsVersion; Dprintf("awakeFromNib\n"); prefsVersion = [prefs integerForKey:@"initialized"]; Dprintf("prefsVersion: %i\n", prefsVersion); if (prefsVersion < 1) { Dprintf("Upgrading prefs to v1\n"); [prefs setObject:@"-1" forKey:@"precision"]; [prefs setObject:@"NO" forKey:@"historyDuplicatesAllowed"]; [prefs setObject:@"NO" forKey:@"flagUndefinedVariables"]; [prefs setObject:@"YES" forKey:@"useRadians"]; [prefs setObject:@"0" forKey:@"outputFormat"]; [prefs setObject:@"YES" forKey:@"printPrefixes"]; [prefs setObject:@"NO" forKey:@"updateHistory"]; [prefs setObject:@"YES" forKey:@"strictSyntax"]; [prefs setObject:@"0" forKey:@"roundingIndication"]; [prefs setObject:@"NO" forKey:@"historyShowing"]; [prefs setObject:@"YES" forKey:@"rememberErrors"]; [prefs setObject:@"NO" forKey:@"baseShowing"]; [prefs setObject:@"YES" forKey:@"precisionGuard"]; [prefs setObject:@"NO" forKey:@"historyLimit"]; [prefs setObject:@"1000" forKey:@"historyLimitLength"]; [prefs setObject:@"NO" forKey:@"printInts"]; [prefs setObject:@"NO" forKey:@"simpleCalc"]; [prefs setObject:@"NO" forKey:@"printDelimiters"]; } if (prefsVersion < 2) { Dprintf("Upgrading prefs to v2\n"); [prefs setObject:@"YES" forKey:@"livePrecision"]; [prefs setObject:@"1024" forKey:@"internalPrecision"]; [prefs setObject:@"YES" forKey:@"cModStyle"]; } if (prefsVersion < 3) { Dprintf("Upgrading prefs to v3\n"); [prefs setObject:@"3" forKey:@"initialized"]; [prefs setObject:@"147" forKey:@"maxSliderPrecision"]; } if (prefsVersion < 4) { Dprintf("Upgrading prefs to v4\n"); [prefs setObject:@"4" forKey:@"initialized"]; [prefs setObject:@"1" forKey:@"engineeringNotation"]; } if (prefsVersion < 5) { Dprintf("Upgrading prefs to v5\n"); [prefs setObject:@"5" forKey:@"initialized"]; [prefs setObject:@"" forKey:@"alternateInputDecimalSeparator"]; [prefs setObject:@"" forKey:@"alternateInputThousandsSeparator"]; } conf.precision = [prefs integerForKey:@"precision"]; switch([prefs integerForKey:@"engineeringNotation"]) { case 1: conf.engineering = automatic; break; case 2: conf.engineering = never; break; case 3: conf.engineering = always; break; } conf.picky_variables = [prefs boolForKey:@"flagUndefinedVariables"]; conf.use_radians = [prefs boolForKey:@"useRadians"]; conf.output_format = [prefs integerForKey:@"outputFormat"]; conf.print_prefixes = [prefs boolForKey:@"printPrefixes"]; /* conf.strict_syntax = [prefs boolForKey:@"strictSyntax"]; */ conf.rounding_indication = [prefs integerForKey:@"roundingIndication"]; conf.precision_guard = [prefs boolForKey:@"precisionGuard"]; conf.print_ints = [prefs boolForKey:@"printInts"]; conf.print_commas = [prefs boolForKey:@"printDelimiters"]; conf.simple_calc = [prefs boolForKey:@"simpleCalc"]; conf.live_precision = [prefs boolForKey:@"livePrecision"]; [PrecisionSlider setMaxValue:[prefs floatForKey:@"maxSliderPrecision"]]; /* history preferences */ allow_duplicates = [prefs boolForKey:@"historyDuplicatesAllowed"]; update_history = [prefs boolForKey:@"updateHistory"]; conf.remember_errors = [prefs boolForKey:@"rememberErrors"]; conf.history_limit = [prefs boolForKey:@"historyLimit"]; conf.history_limit_len = [prefs integerForKey:@"historyLimitLen"]; { NSDictionary *temp = [prefs dictionaryForKey:@"persistentVariables"]; NSEnumerator *enumerator = [temp keyEnumerator]; id key; while ((key = [enumerator nextObject])) { putexp(strdup([key UTF8String]),strdup([[temp objectForKey:key] UTF8String]),"preloaded"); } } if ([prefs integerForKey:@"internalPrecision"] < 32) { [prefs setObject:@"1024" forKey:@"internalPrecision"]; } if ([prefs integerForKey:@"internalPrecision"] > 4096) { [prefs setObject:@"4096" forKey:@"internalPrecision"]; } init_numbers(); num_set_default_prec([prefs integerForKey:@"internalPrecision"]); Dprintf("preferences read\n"); [PrecisionSlider setIntValue:conf.precision]; Dprintf("precision slider\n"); just_answered = FALSE; /* Set up the character translation */ NSNumberFormatter *numFormat = [[[NSNumberFormatter alloc] init] autorelease]; if ([[numFormat decimalSeparator] length] > 0) { Dprintf("NSDecimalSeparator > 0\n"); conf.dec_delimiter = [[numFormat decimalSeparator] characterAtIndex:0]; } else { conf.dec_delimiter = '.'; } Dprintf("NSDecimalSeparator set (%c)\n", conf.dec_delimiter); if ([[numFormat groupingSeparator] length] > 0) { Dprintf("NSGroupingSeparator > 0\n"); conf.thou_delimiter = [[numFormat groupingSeparator] characterAtIndex:0]; } else { conf.thou_delimiter = 0; } Dprintf("NSGroupingSeparator set (%c)\n", conf.thou_delimiter); if ([prefs integerForKey:@"alternateInputDecimalSeparator"]) { if ([[prefs stringForKey:@"alternateInputDecimalSeparator"] length] > 0) { conf.in_dec_delimiter = [[prefs stringForKey:@"alternateInputDecimalSeparator"] characterAtIndex:0]; } if ([[prefs stringForKey:@"alternateInputThousandsSeparator"] length] > 0) { conf.in_thou_delimiter = [[prefs stringForKey:@"alternateInputThousandsSeparator"] characterAtIndex:0]; } if (conf.in_dec_delimiter != 0) { [decimalKey setTitle:[NSString stringWithCString:&conf.in_dec_delimiter length:1]]; } } else { [decimalKey setTitle:[numFormat decimalSeparator]]; Dprintf("decimalKey title set\n"); } /* reset the window to the saved setting */ superview = [keypad superview]; [keypad retain]; [PrecisionSlider retain]; [ExpressionField retain]; Dprintf("interface retained\n"); [mainWindow useOptimizedDrawing:TRUE]; [mainWindow setFrameAutosaveName:@"wcalc"]; Dprintf("frame autosave set\n"); w = [mainWindow frame]; if ([prefs boolForKey:@"toggled"]) { Dprintf("window is toggled\n"); w.size.height += KEYPAD_HEIGHT; w.origin.y -= KEYPAD_HEIGHT; [mainWindow setFrame:w display:TRUE animate:FALSE]; Dprintf("frame set\n"); [self toggleSize:0]; Dprintf("toggled\n"); } else { Dprintf("window not toggled\n"); w.size.width = MIN_WINDOW_WIDTH; [mainWindow setFrame:w display:TRUE animate:FALSE]; bounds.width = MIN_WINDOW_WIDTH; bounds.height = MIN_WINDOW_HEIGHT_UNTOGGLED; [mainWindow setMinSize:bounds]; bounds.width = MIN_WINDOW_WIDTH; bounds.height = MAX_WINDOW_SIZE; [mainWindow setMaxSize:bounds]; Dprintf("window size restored\n"); } // w = [mainWindow frame]; // bounds = [mainWindow minSize]; e = enterKey; ef = ExpressionField; /* this restores the drawer states */ if ([prefs boolForKey:@"historyShowing"]) { Dprintf("history showing\n"); [NSTimer scheduledTimerWithTimeInterval:0 target:self selector:@selector(openIDrawer:) userInfo:nil repeats:NO]; Dprintf("history drawer displayed\n"); } if ([prefs boolForKey:@"baseShowing"]) { Dprintf("base showing\n"); [NSTimer scheduledTimerWithTimeInterval:0 target:self selector:@selector(openBDrawer:) userInfo:nil repeats:NO]; Dprintf("base drawer displayed\n"); } Dprintf("done with drawers\n"); /* set the correct expression display for simple_calc */ if (conf.simple_calc) { Dprintf("simple calc\n"); [ExpressionField setStringValue:@"0"]; [AnswerField setStringValue:@"0"]; Dprintf("values zeroed\n"); simpleClearAll(); Dprintf("simple all cleared\n"); } num_init_set_ui(last_answer, 0); Dprintf("last answer cleared\n"); pthread_mutex_init(&displayLock,NULL); [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(quit:) name:NSWindowWillCloseNotification object:mainWindow]; NSUpdateDynamicServices(); } - (void)openBDrawer: (id) sender { [baseDrawer open]; [baseMenu setTitle:@"Close Base Drawer"]; } - (void)openIDrawer: (id) sender { [inspector openIt:sender]; } - (IBAction)setPrecision:(id)sender { int last_pres=0; NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults]; last_pres = [prefs integerForKey:@"precision"]; if (last_pres == [PrecisionSlider intValue]) return; else last_pres = [PrecisionSlider intValue]; Dprintf("setPrecision: %i to %i\n",conf.precision,last_pres); conf.precision = last_pres; [prefs setObject:[NSString stringWithFormat:@"%i",conf.precision] forKey:@"precision"]; Dprintf("setPrecision - prefs set\n"); Dprintf("getting lock\n"); pthread_mutex_lock(&displayLock); Dprintf("locked\n"); { set_prettyanswer(last_answer); Dprintf("setPrecision - set_prettyanswer\n"); [self displayAnswer]; Dprintf("setPrecision - done\n"); } pthread_mutex_unlock(&displayLock); Dprintf("unlocked\n"); } - (IBAction)go:(id)sender { char * expression; extern char * errstring; expression = strdup([[ExpressionField stringValue] UTF8String]); parseme(expression); putval("a",last_answer,"previous answer"); /* if it isn't an error (or if you want me to remember errors) record it in the history */ if (!errstring || (errstring && !strlen(errstring)) || conf.remember_errors) { addToHistory(expression, last_answer); free(expression); } [self displayAnswer]; } - (void)displayAnswer { extern char * errstring; Dprintf("displayAnswer\n"); /* if there is an error, display it */ if (errstring && strlen(errstring)) { extern int scanerror; scanerror = 0; Dprintf("displayAnswer error %s\n",errstring); [errorController throwAlert:[NSString stringWithUTF8String:errstring]]; free(errstring); errstring = NULL; } /* display the answer */ Dprintf("displayAnswer - pretty_answer(%p)\n",pretty_answer); Dprintf("displayAnswer - %s\n",pretty_answer); [AnswerField setStringValue:[NSString stringWithFormat:@"%s",pretty_answer]]; [AnswerField setTextColor:(not_all_displayed?[NSColor redColor]:[NSColor blackColor])]; Dprintf("displayAnswer - changing size\n"); { // Make the Answerfield big enough to display the answer NSRect curFrame, newFrame; curFrame = [AnswerField frame]; Dprintf("displayAnswer - current size: %f x %f\n", curFrame.size.height, curFrame.size.width); newFrame = curFrame; // we set the height to a huge number because cellSizeForBounds only // works "within" the specified bound, which we want because we want to // limit the width. newFrame.size.height = DBL_MAX; newFrame.size = [[AnswerField cell] cellSizeForBounds:newFrame]; Dprintf("displayAnswer - needed size: %f x %f\n", newFrame.size.height, newFrame.size.width); if (curFrame.size.height != newFrame.size.height) { size_t newHeight = newFrame.size.height; int difference = newHeight - curFrame.size.height; NSRect windowFrame = [mainWindow frame]; int nonAnswerPixels = windowFrame.size.height - curFrame.size.height; NSSize ms = [mainWindow minSize]; newFrame = curFrame; newFrame.size.height = newHeight; ms.height += difference; windowFrame.size.height += difference; if (windowFrame.size.height < newFrame.size.height + nonAnswerPixels) { windowFrame.size.height = newFrame.size.height + nonAnswerPixels; } windowFrame.origin.y -= difference; curFrame = [ExpressionField frame]; [AnswerField setHidden:TRUE]; [ExpressionField setHidden:TRUE]; [mainWindow setFrame:windowFrame display:YES animate:YES]; windowFrame = [mainWindow frame]; /* At this point, the windowFrame may not be *quite* what I wanted it to be, screens being of finite size and all... so we have to recalculate the size that the AnswerField should be. */ newFrame.size.height = windowFrame.size.height - nonAnswerPixels; [mainWindow setMinSize:ms]; [AnswerField setFrame:newFrame]; [ExpressionField setFrame:curFrame]; [AnswerField setHidden:FALSE]; [ExpressionField setHidden:FALSE]; } } Dprintf("displayAnswer - refresh inspector\n"); // if the drawer is open, refresh the data. if ([inspectorWindow isVisible]) { [variableList reloadData]; [historyList reloadData]; } just_answered = TRUE; // refresh the prefs if necessary Dprintf("displayAnswer - refresh prefs\n"); if ([thePrefPanel isVisible]) [self displayPrefs:0]; Dprintf("displayAnswer - cleaning up\n"); [outputFormat2 selectCellWithTag:conf.output_format]; [ExpressionField selectText:self]; Dprintf("displayAnswer - done\n"); } - (IBAction)convert:(id)sender { int type = [convertType indexOfSelectedItem]; int from = [convertFrom selectedRow]; int to = [convertTo selectedRow]; if (type < 0 || type > MAX_TYPE) return; if (from < 0) return; if (to < 0) return; uber_conversion(last_answer, type, from, to, last_answer); set_prettyanswer(last_answer); [AnswerField setStringValue:[NSString stringWithUTF8String:(pretty_answer?pretty_answer:"Not Enough Memory")]]; putval("a",last_answer,"previous answer"); if ([inspectorWindow isVisible]) { [variableList reloadData]; } } - (IBAction)enterData:(id)sender { NSString * sent = [NSString stringWithString:[[sender attributedTitle] string]]; static short shiftdown = 0, capsdown = 0; int tag; Dprintf("enterData\n"); [ExpressionField setSelectable:FALSE]; tag = [sender tag]; switch (tag) { case 101: /* delete key on the onscreen keyboard */ if ([[ExpressionField stringValue] length] > 0) { unsigned len = [[ExpressionField stringValue] length]; [ExpressionField setStringValue:[[ExpressionField stringValue] substringToIndex:len-1]]; } break; case 100: /* clear key on the onscreen keypad */ if (!conf.simple_calc) { if ([[ExpressionField stringValue] length] > 0) { [ExpressionField setStringValue:@""]; [ExpressionField selectText:self]; } else if ([[AnswerField stringValue] length] > 0) { [AnswerField setStringValue:@""]; [ExpressionField selectText:self]; } } else { if (! [[ExpressionField stringValue] isEqualToString:@"0"]) { [ExpressionField setStringValue:@"0"]; [ExpressionField selectText:self]; simpleClearEntry(); } else { [AnswerField setStringValue:@"0"]; [ExpressionField selectText:self]; simpleClearAll(); } } break; case 102: /* caps lock key on onscreen keyboard */ if (capsdown) { [shiftKey1 setEnabled:true]; [shiftKey2 setEnabled:true]; capsdown = 0; } else { [shiftKey1 setEnabled:false]; [shiftKey2 setEnabled:false]; capsdown = 1; } break; case 103: /* shift key on onscreen keyboard */ if (shiftdown) { [shiftKey1 setState:NSOffState]; [shiftKey2 setState:NSOffState]; shiftdown = 0; } else { [shiftKey1 setState:NSOnState]; [shiftKey2 setState:NSOnState]; shiftdown = 1; } break; case 104: /* = key on onscreen keypad */ if (! conf.simple_calc) { [self go:sender]; } else { char * expr = strdup([[ExpressionField stringValue] UTF8String]); char * ret; ret = simpleCalc('=',expr); if (ret) { [ExpressionField setStringValue:[NSString stringWithUTF8String:ret]]; free(ret); } else { [self displayAnswer]; [ExpressionField setStringValue:[AnswerField stringValue]]; } free(expr); } break; case 105: /* the divide key on the onscreen keypad */ case 106: /* the minus key on the onscreen keypad */ case 107: /* the times key on the onscreen keypad */ default: if (! conf.simple_calc) { /* the real power of Wcalc */ if (just_answered == FALSE) { [ExpressionField setStringValue:[[ExpressionField stringValue] stringByAppendingString:sent]]; } else if ([sent isEqualToString:@"+"] || [sent isEqualToString:@"-"] || [sent isEqualToString:@"*"] || [sent isEqualToString:@"/"] || [sent isEqualToString:@"%"] || [sent isEqualToString:@"("] || [sent isEqualToString:@"&"] || [sent isEqualToString:@"|"] || [sent isEqualToString:[NSString stringWithFormat:@"%C",0x00f7]]) { [ExpressionField setStringValue:[[@"a" self] stringByAppendingString:sent]]; } else { [ExpressionField setStringValue:sent]; } if (shiftdown) { [shiftKey1 setState:NSOffState]; [shiftKey2 setState:NSOffState]; shiftdown = 0; } just_answered = FALSE; } else { /* stupid calculator */ char *ret, *expr; expr = strdup([[ExpressionField stringValue] UTF8String]); Dprintf("expr: %s\n",expr); switch (tag) { case 105: ret = simpleCalc('/', expr); break; case 106: ret = simpleCalc('-', expr); break; case 107: ret = simpleCalc('*', expr); break; default: ret = simpleCalc([sent characterAtIndex:0], expr); } free(expr); if (ret) { [ExpressionField setStringValue:[NSString stringWithUTF8String:ret]]; free(ret); } else { [self displayAnswer]; [ExpressionField setStringValue:[AnswerField stringValue]]; } } break; } [ExpressionField setEditable:TRUE]; } - (IBAction)shConversions:(id)sender { static char initialized = 0; if (! [conversionWindow isVisible]) { [conversionWindow makeKeyAndOrderFront:self]; if (! initialized) { [conversionWindow center]; initialized = 1; } } else { [conversionWindow close]; } } - (IBAction)showKeyboardDrawer:(id)sender { static char initialized = 0; if (! [theKeyboard isVisible]) { [theKeyboard setBecomesKeyOnlyIfNeeded:YES]; [theKeyboard orderFront:self]; if (! initialized) { [theKeyboard center]; initialized = 1; } } else { [theKeyboard close]; } } - (IBAction)showBaseDrawer:(id)sender { NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults]; if (! [baseDrawer state]) { [baseDrawer open]; [prefs setObject:@"YES" forKey:@"baseShowing"]; [baseMenu setTitle:@"Close Base Drawer"]; } else { [baseDrawer close]; [prefs setObject:@"NO" forKey:@"baseShowing"]; [baseMenu setTitle:@"Open Base Drawer"]; } } - (IBAction)setPrefs:(id)sender { short need_redraw = 0; short olde; NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults]; int tag = [sender tag]; switch (tag) { case 1: // Flag Undefined Variables olde = conf.picky_variables; conf.picky_variables = ([pickyVariables state]==NSOnState); if (olde != conf.picky_variables) { [prefs setObject:(conf.picky_variables?@"YES":@"NO") forKey:@"flagUndefinedVariables"]; } break; case 2: // Use Radians olde = conf.use_radians; conf.use_radians = ([useRadians state]==NSOnState); if (olde != conf.use_radians) { need_redraw = 2; [prefs setObject:(conf.use_radians?@"YES":@"NO") forKey:@"useRadians"]; } break; case 3: // Use Engineering Notation { int savedas = 1; olde = conf.engineering; printf("index: %i\n", [sender indexOfSelectedItem]); switch([sender indexOfSelectedItem]) { case 0: conf.engineering = automatic; savedas = 1; break; case 1: conf.engineering = never; savedas = 2; break; case 2: conf.engineering = always; savedas = 3; break; } if (olde != conf.engineering) { need_redraw = 1; printf("integet: %i\n", conf.engineering); [prefs setObject:[NSString stringWithFormat:@"%i",savedas] forKey:@"engineeringNotation"]; } } break; case 4: // Allow Duplicates in History olde = allow_duplicates; allow_duplicates = ([historyDuplicates state]==NSOnState); if (olde != allow_duplicates) { [prefs setObject:(allow_duplicates?@"YES":@"NO") forKey:@"historyDuplicatesAllowed"]; } break; case 5: // Output Format olde = conf.output_format; conf.output_format = [[sender selectedCell] tag]; if (olde != conf.output_format) { need_redraw = 1; [prefs setObject:[NSString stringWithFormat:@"%i",conf.output_format] forKey:@"outputFormat"]; [printPrefixes setEnabled:(conf.output_format!=DECIMAL_FORMAT)]; [engineeringNotation setEnabled:(conf.output_format==DECIMAL_FORMAT)]; } [outputFormat selectCellWithTag:conf.output_format]; [outputFormat2 selectCellWithTag:conf.output_format]; break; case 6: // Print Prefixes olde = conf.print_prefixes; conf.print_prefixes = ([sender state]==NSOnState); if (olde != conf.print_prefixes) { need_redraw = 1; [prefs setObject:(conf.print_prefixes?@"YES":@"NO") forKey:@"printPrefixes"]; } break; case 7: // Update History olde = update_history; update_history = ([sender state]==NSOnState); if (olde != update_history) { [prefs setObject:(update_history?@"YES":@"NO") forKey:@"updateHistory"]; } break; case 10: // Rounding Indication olde = conf.rounding_indication; conf.rounding_indication = [sender indexOfSelectedItem]; if (olde != conf.rounding_indication) { need_redraw = 1; [prefs setObject:[NSString stringWithFormat:@"%i",conf.rounding_indication] forKey:@"roundingIndication"]; } break; case 11: // Record errors in history olde = conf.remember_errors; conf.remember_errors = ([sender state]==NSOnState); if (olde != conf.remember_errors) { [prefs setObject:(conf.remember_errors?@"YES":@"NO") forKey:@"rememberErrors"]; } break; case 12: // Conservative precision olde = conf.precision_guard; conf.precision_guard = ([sender state]==NSOnState); if (olde != conf.precision_guard) { need_redraw = 2; [prefs setObject:(conf.precision_guard?@"YES":@"NO") forKey:@"precisionGuard"]; } break; case 13: // History length limit toggle olde = conf.history_limit; conf.history_limit = ([sender state]==NSOnState); [limitHistoryLen setEnabled:conf.history_limit]; [limitHistoryLenTag setEnabled:conf.history_limit]; if (olde != conf.history_limit) { [prefs setObject:(conf.history_limit?@"YES":@"NO") forKey:@"historyLimit"]; } break; case 14: // History length limit if ((unsigned)[sender intValue] != conf.history_limit_len) { conf.history_limit_len = [sender intValue]; [prefs setObject:[NSString stringWithFormat:@"%i",conf.history_limit_len] forKey:@"historyLimitLength"]; } break; case 15: // Print ints olde = conf.print_ints; conf.print_ints = ([sender state]==NSOnState); if (olde != conf.print_ints) { need_redraw = 1; [prefs setObject:(conf.print_ints?@"YES":@"NO") forKey:@"printInts"]; } break; case 16: // Simple calculator olde = conf.simple_calc; conf.simple_calc = ([sender state]==NSOnState); if (olde != conf.simple_calc) { [prefs setObject:(conf.simple_calc?@"YES":@"NO") forKey:@"simpleCalc"]; if (conf.simple_calc) { [ExpressionField setStringValue:@"0"]; [AnswerField setStringValue:@"0"]; simpleClearAll(); } else { [ExpressionField setStringValue:@""]; [AnswerField setStringValue:@""]; } /* disable irrelevant preferences */ [historyDuplicates setEnabled:!conf.simple_calc]; [limitHistory setEnabled:!conf.simple_calc]; [limitHistoryLen setEnabled:!conf.simple_calc]; [limitHistoryLenTag setEnabled:!conf.simple_calc]; [pickyVariables setEnabled:!conf.simple_calc]; [rememberErrors setEnabled:!conf.simple_calc]; [updateHistory setEnabled:!conf.simple_calc]; [useRadians setEnabled:!conf.simple_calc]; } break; case 17: olde = conf.print_commas; conf.print_commas = ([sender state]==NSOnState); if (olde != conf.print_commas) { need_redraw = 1; [prefs setObject:(conf.print_ints?@"YES":@"NO") forKey:@"printDelimiters"]; } break; case 18: if ((unsigned)[sender intValue] != num_get_default_prec()) { [bitsStepper takeIntValueFrom:sender]; num_set_default_prec([bitsStepper intValue]); // to handle limits placed on bitsStepper [prefs setObject:[NSString stringWithFormat:@"%lu",num_get_default_prec()] forKey:@"internalPrecision"]; } break; case 19: if ((unsigned)[bitsStepper intValue] != num_get_default_prec()) { num_set_default_prec([bitsStepper intValue]); need_redraw = 2; [bitsPref takeIntValueFrom:bitsStepper]; [prefs setObject:[NSString stringWithFormat:@"%lu",num_get_default_prec()] forKey:@"internalPrecision"]; } break; case 20: olde = conf.live_precision; conf.live_precision = ([sender state] == NSOnState); if (olde != conf.print_commas) { [prefs setObject:(conf.live_precision?@"YES":@"NO") forKey:@"livePrecision"]; [PrecisionSlider setContinuous:(conf.live_precision?true:false)]; } break; case 21: olde = conf.c_style_mod; conf.c_style_mod = ([sender state] == NSOnState); if (olde != conf.c_style_mod) { need_redraw = 2; [prefs setObject:(conf.c_style_mod?@"YES":@"NO") forKey:@"cModStyle"]; } break; case 22: if ((unsigned)[sliderStepper intValue] != [PrecisionSlider maxValue]) { unsigned long tmp = [sliderStepper intValue]; [PrecisionSlider setMaxValue:(double)tmp]; [sliderPref takeIntValueFrom:sliderStepper]; [prefs setObject:[NSString stringWithFormat:@"%lu",tmp] forKey:@"maxSliderPrecision"]; } break; case 23: if ((double)[sender intValue] != [PrecisionSlider maxValue]) { [sliderStepper takeIntValueFrom:sender]; // these handle limits placed on sliderStepper [sliderPref takeIntValueFrom:sliderStepper]; [PrecisionSlider setMaxValue:[sliderStepper doubleValue]]; [prefs setObject:[NSString stringWithFormat:@"%lu",[sliderStepper intValue]] forKey:@"maxSliderPrecision"]; } break; case 24: [altInputDecSep setEnabled:([sender state] == NSOnState)]; [altInputThouSep setEnabled:([sender state] == NSOnState)]; if ([sender state] != NSOnState) { [altInputDecSep setStringValue:@""]; [altInputThouSep setStringValue:@""]; [decimalKey setTitle:[NSString stringWithCString:&conf.dec_delimiter length:1]]; } break; case 25: if ([[sender stringValue] length] > 0) { conf.in_dec_delimiter = [[sender stringValue] characterAtIndex:0]; [decimalKey setTitle:[NSString stringWithCString:&conf.in_dec_delimiter length:1]]; } else { conf.in_dec_delimiter = 0; [decimalKey setTitle:[NSString stringWithCString:&conf.dec_delimiter length:1]]; } break; case 26: if ([[sender stringValue] length] > 0) { conf.in_thou_delimiter = [[sender stringValue] characterAtIndex:0]; } else { conf.in_thou_delimiter = 0; } default: return; } switch (need_redraw) { case 2: if (update_history) recalculate = 1; [self go:sender]; break; case 1: set_prettyanswer(last_answer); [AnswerField setStringValue:[NSString stringWithUTF8String:(pretty_answer?pretty_answer:"Not Enough Memory")]]; [AnswerField setTextColor:((not_all_displayed)?([NSColor redColor]):([NSColor blackColor]))]; break; } if ([inspectorWindow isVisible] || recalculate) { [historyList reloadData]; } [ExpressionField selectText:self]; } - (IBAction)showPrefs:(id)sender { //static char initialized = 0; [self displayPrefs:sender]; [thePrefPanel setBecomesKeyOnlyIfNeeded:TRUE]; [thePrefPanel orderFront:self]; // centering at first /*if (! initialized) { initialized=1; [thePrefPanel center]; }*/ // this should be redundant [thePrefPanel setFrameAutosaveName:@"wcalc_prefs"]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(savePrefs:) name:NSWindowWillCloseNotification object:thePrefPanel]; } - (IBAction)savePrefs:(id)sender { NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults]; Dprintf("synching the prefs to disk\n"); [prefs synchronize]; } - (IBAction)open:(id)sender { int result; NSArray *fileTypes = [NSArray arrayWithObjects:@"txt",@"text",@"wcalc", NSFileTypeForHFSTypeCode('TEXT'), nil]; NSOpenPanel *oPanel = [NSOpenPanel openPanel]; [oPanel setAllowsMultipleSelection:NO]; /* display the panel */ result = [oPanel runModalForDirectory:nil file:nil types:fileTypes]; /* if they clicked the OK button */ if (result == NSOKButton) { NSArray *filesToOpen = [oPanel filenames]; int i, count = [filesToOpen count]; /* loop through the files to open (there should only be one, but it's good to be able to handle multiple anyway */ for (i=0; i @interface WcalcService : NSObject { IBOutlet NSWindow *inspectorWindow; IBOutlet NSTableView *variableList; IBOutlet NSTableView *historyList; } @end wcalc-2.4/WcalcService.m0000644000175000000620000000426710650207552013500 0ustar kkstaff// // WcalcService.m // Wcalc // // Created by Kyle Wheeler on 7/19/07. // Copyright 2007 Kyle Wheeler. All rights reserved. // #import "WcalcService.h" #include "calculator.h" /* for parseme() */ #include "variables.h" /* for putval() */ #include "historyManager.h" /* for addToHistory() */ #include "WcalcController.h" /* for access to the controller */ @implementation WcalcService /* This service returns the value; * this is inspired in a large part by the SimpleService example Apple provides */ - (void)doWcalcCalculateService:(NSPasteboard *)pboard userData:(NSString *)data error:(NSString **)error { NSString *pboardString; NSString *newString; NSArray *types; char * expression; extern char * errstring; types = [pboard types]; if (![types containsObject:NSStringPboardType] || !(pboardString = [pboard stringForType:NSStringPboardType])) { *error = NSLocalizedString(@"Error: Pasteboard doesn't contain a string.", @"Pasteboard couldn't give string."); return; } expression = strdup([pboardString UTF8String]); parseme(expression); //putval("a",last_answer,"last answer from WcalcService"); putval("WcalcServiceAnswer",last_answer,"last answer from WcalcService"); /* if it isn't an error (or if you want me to remember errors) record it in the history */ if (!errstring || (errstring && !strlen(errstring)) || conf.remember_errors) { addToHistory(expression, last_answer); } free(expression); if (errstring && strlen(errstring)) { extern int scanerror; scanerror = 0; *error = NSLocalizedString([NSString stringWithUTF8String:errstring], @"Couldn't perform service operation."); free(errstring); errstring = NULL; return; } newString = [NSString stringWithFormat:@"%s",pretty_answer]; if ([inspectorWindow isVisible]) { /* XXX: why does this not work??? */ [variableList reloadData]; [historyList reloadData]; } /* We now return the capitalized string... */ types = [NSArray arrayWithObject:NSStringPboardType]; [pboard declareTypes:types owner:nil]; [pboard setString:newString forType:NSStringPboardType]; return; } @end wcalc-2.4/Wred.png0000644000175000000620000000235307436002462012352 0ustar kkstaffPNG  IHDR0+ gAMAܲPLTEf3̙f3f3ffffff3f3333f333f3f3̙f3̙̙̙̙f̙3̙ffffff3f3333f333f3̙f3̙̙f3̙f3ff̙ffff3f33̙33f333̙f3ffffff3ffff̙fff3fffffff3ffffffffffff3fff3f3f3f3ff33f3ffffff3f3333f333333̙3f3333333f3333f3f3f3ff3f33f33333333f333333333f333f3̙f3f3ffffff3f3333f333f3wUD"wUD"wUD"YOQtRNS@ftEXtSoftwareGraphicConverter5]HIDATxU;1ێ?g";E& $ yơG>:q&yGy`1M5@ !YIJ"@P)j;ԇS5A,A4K1Zo GbW'/u9f/ɪgBD_zF!F2Qh( G2lQR5 PmICw=`|dgwS02re [,ަA7`~ x򦨳fo՟$d痄jmkshh7[`]|IENDB`wcalc-2.4/ylwrap0000755000175000000620000001407410765561625012224 0ustar kkstaff#! /bin/sh # ylwrap - wrapper for lex/yacc invocations. scriptversion=2007-11-22.22 # Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005, # 2007 Free Software Foundation, Inc. # # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . case "$1" in '') echo "$0: No files given. Try \`$0 --help' for more information." 1>&2 exit 1 ;; --basedir) basedir=$2 shift 2 ;; -h|--h*) cat <<\EOF Usage: ylwrap [--help|--version] INPUT [OUTPUT DESIRED]... -- PROGRAM [ARGS]... Wrapper for lex/yacc invocations, renaming files as desired. INPUT is the input file OUTPUT is one file PROG generates DESIRED is the file we actually want instead of OUTPUT PROGRAM is program to run ARGS are passed to PROG Any number of OUTPUT,DESIRED pairs may be used. Report bugs to . EOF exit $? ;; -v|--v*) echo "ylwrap $scriptversion" exit $? ;; esac # The input. input="$1" shift case "$input" in [\\/]* | ?:[\\/]*) # Absolute path; do nothing. ;; *) # Relative path. Make it absolute. input="`pwd`/$input" ;; esac pairlist= while test "$#" -ne 0; do if test "$1" = "--"; then shift break fi pairlist="$pairlist $1" shift done # The program to run. prog="$1" shift # Make any relative path in $prog absolute. case "$prog" in [\\/]* | ?:[\\/]*) ;; *[\\/]*) prog="`pwd`/$prog" ;; esac # FIXME: add hostname here for parallel makes that run commands on # other machines. But that might take us over the 14-char limit. dirname=ylwrap$$ trap "cd '`pwd`'; rm -rf $dirname > /dev/null 2>&1" 1 2 3 15 mkdir $dirname || exit 1 cd $dirname case $# in 0) "$prog" "$input" ;; *) "$prog" "$@" "$input" ;; esac ret=$? if test $ret -eq 0; then set X $pairlist shift first=yes # Since DOS filename conventions don't allow two dots, # the DOS version of Bison writes out y_tab.c instead of y.tab.c # and y_tab.h instead of y.tab.h. Test to see if this is the case. y_tab_nodot="no" if test -f y_tab.c || test -f y_tab.h; then y_tab_nodot="yes" fi # The directory holding the input. input_dir=`echo "$input" | sed -e 's,\([\\/]\)[^\\/]*$,\1,'` # Quote $INPUT_DIR so we can use it in a regexp. # FIXME: really we should care about more than `.' and `\'. input_rx=`echo "$input_dir" | sed 's,\\\\,\\\\\\\\,g;s,\\.,\\\\.,g'` while test "$#" -ne 0; do from="$1" # Handle y_tab.c and y_tab.h output by DOS if test $y_tab_nodot = "yes"; then if test $from = "y.tab.c"; then from="y_tab.c" else if test $from = "y.tab.h"; then from="y_tab.h" fi fi fi if test -f "$from"; then # If $2 is an absolute path name, then just use that, # otherwise prepend `../'. case "$2" in [\\/]* | ?:[\\/]*) target="$2";; *) target="../$2";; esac # We do not want to overwrite a header file if it hasn't # changed. This avoid useless recompilations. However the # parser itself (the first file) should always be updated, # because it is the destination of the .y.c rule in the # Makefile. Divert the output of all other files to a temporary # file so we can compare them to existing versions. if test $first = no; then realtarget="$target" target="tmp-`echo $target | sed s/.*[\\/]//g`" fi # Edit out `#line' or `#' directives. # # We don't want the resulting debug information to point at # an absolute srcdir; it is better for it to just mention the # .y file with no path. # # We want to use the real output file name, not yy.lex.c for # instance. # # We want the include guards to be adjusted too. FROM=`echo "$from" | sed \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'\ -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'` TARGET=`echo "$2" | sed \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'\ -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'` sed -e "/^#/!b" -e "s,$input_rx,," -e "s,$from,$2," \ -e "s,$FROM,$TARGET," "$from" >"$target" || ret=$? # Check whether header files must be updated. if test $first = no; then if test -f "$realtarget" && cmp -s "$realtarget" "$target"; then echo "$2" is unchanged rm -f "$target" else echo updating "$2" mv -f "$target" "$realtarget" fi fi else # A missing file is only an error for the first file. This # is a blatant hack to let us support using "yacc -d". If -d # is not specified, we don't want an error when the header # file is "missing". if test $first = yes; then ret=1 fi fi shift shift first=no done else ret=$? fi # Remove the directory. cd .. rm -rf $dirname exit $ret # 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: